Changes in uspace/srv/hid/console/gcons.c [306061a:e3a46c2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/gcons.c
r306061a re3a46c2 35 35 #include <ipc/fb.h> 36 36 #include <async.h> 37 #include <async_obsolete.h> 37 38 #include <stdio.h> 38 39 #include <sys/mman.h> … … 115 116 static void vp_switch(int vp) 116 117 { 117 async_ msg_1(fbphone, FB_VIEWPORT_SWITCH, vp);118 async_obsolete_msg_1(fbphone, FB_VIEWPORT_SWITCH, vp); 118 119 } 119 120 … … 121 122 static int vp_create(sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height) 122 123 { 123 return async_ req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y,124 return async_obsolete_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y, 124 125 (width << 16) | height); 125 126 } … … 127 128 static void clear(void) 128 129 { 129 async_ msg_0(fbphone, FB_CLEAR);130 async_obsolete_msg_0(fbphone, FB_CLEAR); 130 131 } 131 132 132 133 static void set_rgb_color(uint32_t fgcolor, uint32_t bgcolor) 133 134 { 134 async_ msg_2(fbphone, FB_SET_RGB_COLOR, fgcolor, bgcolor);135 async_obsolete_msg_2(fbphone, FB_SET_RGB_COLOR, fgcolor, bgcolor); 135 136 } 136 137 … … 138 139 static void tran_putch(wchar_t ch, sysarg_t col, sysarg_t row) 139 140 { 140 async_ msg_3(fbphone, FB_PUTCHAR, ch, col, row);141 async_obsolete_msg_3(fbphone, FB_PUTCHAR, ch, col, row); 141 142 } 142 143 … … 149 150 150 151 if (ic_pixmaps[state] != -1) 151 async_ msg_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[index],152 async_obsolete_msg_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[index], 152 153 ic_pixmaps[state]); 153 154 … … 167 168 void gcons_change_console(size_t index) 168 169 { 169 if (!use_gcons) 170 return; 170 if (!use_gcons) { 171 active_console = index; 172 return; 173 } 171 174 172 175 if (active_console == KERNEL_CONSOLE) { … … 177 180 178 181 if (animation != -1) 179 async_ msg_1(fbphone, FB_ANIM_START, animation);182 async_obsolete_msg_1(fbphone, FB_ANIM_START, animation); 180 183 } else { 181 184 if (console_state[active_console] == CONS_DISCONNECTED_SEL) … … 258 261 { 259 262 if (animation != -1) 260 async_ msg_1(fbphone, FB_ANIM_STOP, animation);263 async_obsolete_msg_1(fbphone, FB_ANIM_STOP, animation); 261 264 262 265 active_console = KERNEL_CONSOLE; … … 294 297 295 298 if (active_console != KERNEL_CONSOLE) 296 async_ msg_2(fbphone, FB_POINTER_MOVE, mouse_x, mouse_y);299 async_obsolete_msg_2(fbphone, FB_POINTER_MOVE, mouse_x, mouse_y); 297 300 } 298 301 … … 374 377 375 378 /* Send area */ 376 int rc = async_ req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm);379 int rc = async_obsolete_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm); 377 380 if (rc) 378 381 goto exit; 379 382 380 rc = async_ share_out_start(fbphone, shm, PROTO_READ);383 rc = async_obsolete_share_out_start(fbphone, shm, PROTO_READ); 381 384 if (rc) 382 385 goto drop; 383 386 384 387 /* Draw logo */ 385 async_ msg_2(fbphone, FB_DRAW_PPM, x, y);388 async_obsolete_msg_2(fbphone, FB_DRAW_PPM, x, y); 386 389 387 390 drop: 388 391 /* Drop area */ 389 async_ msg_0(fbphone, FB_DROP_SHM);392 async_obsolete_msg_0(fbphone, FB_DROP_SHM); 390 393 391 394 exit: … … 436 439 437 440 /* Send area */ 438 int rc = async_ req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm);441 int rc = async_obsolete_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm); 439 442 if (rc) 440 443 goto exit; 441 444 442 rc = async_ share_out_start(fbphone, shm, PROTO_READ);445 rc = async_obsolete_share_out_start(fbphone, shm, PROTO_READ); 443 446 if (rc) 444 447 goto drop; 445 448 446 449 /* Obtain pixmap */ 447 rc = async_ req_0_0(fbphone, FB_SHM2PIXMAP);450 rc = async_obsolete_req_0_0(fbphone, FB_SHM2PIXMAP); 448 451 if (rc < 0) 449 452 goto drop; … … 453 456 drop: 454 457 /* Drop area */ 455 async_ msg_0(fbphone, FB_DROP_SHM);458 async_obsolete_msg_0(fbphone, FB_DROP_SHM); 456 459 457 460 exit: … … 464 467 static void make_anim(void) 465 468 { 466 int an = async_ req_1_0(fbphone, FB_ANIM_CREATE,469 int an = async_obsolete_req_1_0(fbphone, FB_ANIM_CREATE, 467 470 cstatus_vp[KERNEL_CONSOLE]); 468 471 if (an < 0) … … 471 474 int pm = make_pixmap(_binary_gfx_anim_1_ppm_start, 472 475 (size_t) &_binary_gfx_anim_1_ppm_size); 473 async_ msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);476 async_obsolete_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 474 477 475 478 pm = make_pixmap(_binary_gfx_anim_2_ppm_start, 476 479 (size_t) &_binary_gfx_anim_2_ppm_size); 477 async_ msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);480 async_obsolete_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 478 481 479 482 pm = make_pixmap(_binary_gfx_anim_3_ppm_start, 480 483 (size_t) &_binary_gfx_anim_3_ppm_size); 481 async_ msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);484 async_obsolete_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 482 485 483 486 pm = make_pixmap(_binary_gfx_anim_4_ppm_start, 484 487 (size_t) &_binary_gfx_anim_4_ppm_size); 485 async_ msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);486 487 async_ msg_1(fbphone, FB_ANIM_START, an);488 async_obsolete_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); 489 490 async_obsolete_msg_1(fbphone, FB_ANIM_START, an); 488 491 489 492 animation = an; … … 495 498 fbphone = phone; 496 499 497 int rc = async_ req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres);500 int rc = async_obsolete_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres); 498 501 if (rc) 499 502 return;
Note:
See TracChangeset
for help on using the changeset viewer.