Changeset bb14312 in mainline for uspace/lib/congfx/src/console.c
- Timestamp:
- 2021-06-26T16:40:28Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1215db9
- Parents:
- 69511176
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/congfx/src/console.c
r69511176 rbb14312 57 57 static errno_t console_gc_bitmap_render(void *, gfx_rect_t *, gfx_coord2_t *); 58 58 static errno_t console_gc_bitmap_get_alloc(void *, gfx_bitmap_alloc_t *); 59 static errno_t console_gc_cursor_get_pos(void *, gfx_coord2_t *); 60 static errno_t console_gc_cursor_set_pos(void *, gfx_coord2_t *); 61 static errno_t console_gc_cursor_set_visible(void *, bool); 59 62 60 63 gfx_context_ops_t console_gc_ops = { … … 66 69 .bitmap_destroy = console_gc_bitmap_destroy, 67 70 .bitmap_render = console_gc_bitmap_render, 68 .bitmap_get_alloc = console_gc_bitmap_get_alloc 71 .bitmap_get_alloc = console_gc_bitmap_get_alloc, 72 .cursor_get_pos = console_gc_cursor_get_pos, 73 .cursor_set_pos = console_gc_cursor_set_pos, 74 .cursor_set_visible = console_gc_cursor_set_visible 69 75 }; 70 76 … … 435 441 } 436 442 443 /** Get cursor position on console GC. 444 * 445 * @param arg Console GC 446 * @param pos Place to store position 447 * 448 * @return EOK on success or an error code 449 */ 450 static errno_t console_gc_cursor_get_pos(void *arg, gfx_coord2_t *pos) 451 { 452 console_gc_t *cgc = (console_gc_t *) arg; 453 sysarg_t col; 454 sysarg_t row; 455 errno_t rc; 456 457 rc = console_get_pos(cgc->con, &col, &row); 458 if (rc != EOK) 459 return rc; 460 461 pos->x = col; 462 pos->y = row; 463 return EOK; 464 } 465 466 /** Set cursor position on console GC. 467 * 468 * @param arg Console GC 469 * @param pos New cursor position 470 * 471 * @return EOK on success or an error code 472 */ 473 static errno_t console_gc_cursor_set_pos(void *arg, gfx_coord2_t *pos) 474 { 475 console_gc_t *cgc = (console_gc_t *) arg; 476 477 console_set_pos(cgc->con, pos->x, pos->y); 478 return EOK; 479 } 480 481 /** Set cursor visibility on console GC. 482 * 483 * @param arg Console GC 484 * @param visible @c true iff cursor should be made visible 485 * 486 * @return EOK on success or an error code 487 */ 488 static errno_t console_gc_cursor_set_visible(void *arg, bool visible) 489 { 490 console_gc_t *cgc = (console_gc_t *) arg; 491 492 console_cursor_visibility(cgc->con, visible); 493 return EOK; 494 } 495 437 496 /** @} 438 497 */
Note:
See TracChangeset
for help on using the changeset viewer.