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