Changeset 7122bc7 in mainline for uspace/lib/libc/generic/console.c


Ignore:
Timestamp:
2009-01-01T13:58:05Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fb69f39
Parents:
9805cde
Message:

More console IPC wrapper functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/console.c

    r9805cde r7122bc7  
    3838#include <console.h>
    3939
     40void console_clear(void)
     41{
     42        int cons_phone = get_cons_phone();
     43        async_msg_0(cons_phone, CONSOLE_CLEAR);
     44}
     45
     46void console_goto(int row, int col)
     47{
     48        int cons_phone = get_cons_phone();
     49        async_msg_2(cons_phone, CONSOLE_GOTO, row, col);
     50}
     51
     52void console_flush(void)
     53{
     54        int cons_phone = get_cons_phone();
     55        async_msg_0(cons_phone, CONSOLE_FLUSH);
     56}
     57
     58int console_get_size(int *rows, int *cols)
     59{
     60        int cons_phone = get_cons_phone();
     61        ipcarg_t r, c;
     62        int rc;
     63
     64        rc = async_req_0_2(cons_phone, CONSOLE_GETSIZE, &r, &c);
     65
     66        *rows = (int) r;
     67        *cols = (int) c;
     68
     69        return rc;
     70}
     71
    4072void console_set_style(int style)
    4173{
    4274        int cons_phone = get_cons_phone();
    43 
    4475        async_msg_1(cons_phone, CONSOLE_SET_STYLE, style);
    4576}
     
    4879{
    4980        int cons_phone = get_cons_phone();
    50 
    5181        async_msg_3(cons_phone, CONSOLE_SET_COLOR, fg_color, bg_color, flags);
    5282}
     
    5585{
    5686        int cons_phone = get_cons_phone();
     87        async_msg_2(cons_phone, CONSOLE_SET_RGB_COLOR, fg_color, bg_color);
     88}
    5789
    58         async_msg_2(cons_phone, CONSOLE_SET_RGB_COLOR, fg_color, bg_color);
     90void console_cursor_visibility(int show)
     91{
     92        int cons_phone = get_cons_phone();
     93        async_msg_1(cons_phone, CONSOLE_CURSOR_VISIBILITY, show != 0);
    5994}
    6095
Note: See TracChangeset for help on using the changeset viewer.