Changeset 96b02eb9 in mainline for uspace/srv/hid/console


Ignore:
Timestamp:
2010-12-14T12:52:38Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b10dab
Parents:
554debd
Message:

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

Location:
uspace/srv/hid/console
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/console/console.c

    r554debd r96b02eb9  
    7474struct {
    7575        int phone;           /**< Framebuffer phone */
    76         ipcarg_t cols;       /**< Framebuffer columns */
    77         ipcarg_t rows;       /**< Framebuffer rows */
    78         ipcarg_t color_cap;  /**< Color capabilities (FB_CCAP_xxx) */
     76        sysarg_t cols;       /**< Framebuffer columns */
     77        sysarg_t rows;       /**< Framebuffer rows */
     78        sysarg_t color_cap;  /**< Color capabilities (FB_CCAP_xxx) */
    7979} fb_info;
    8080
     
    101101/** Information on row-span yet unsent to FB driver. */
    102102struct {
    103         ipcarg_t col;  /**< Leftmost column of the span. */
    104         ipcarg_t row;  /**< Row where the span lies. */
    105         ipcarg_t cnt;  /**< Width of the span. */
     103        sysarg_t col;  /**< Leftmost column of the span. */
     104        sysarg_t row;  /**< Row where the span lies. */
     105        sysarg_t cnt;  /**< Width of the span. */
    106106} fb_pending;
    107107
     
    119119}
    120120
    121 static void curs_goto(ipcarg_t x, ipcarg_t y)
     121static void curs_goto(sysarg_t x, sysarg_t y)
    122122{
    123123        async_msg_2(fb_info.phone, FB_CURSOR_GOTO, x, y);
     
    180180}
    181181
    182 static int ccap_fb_to_con(ipcarg_t ccap_fb, ipcarg_t *ccap_con)
     182static int ccap_fb_to_con(sysarg_t ccap_fb, sysarg_t *ccap_con)
    183183{
    184184        switch (ccap_fb) {
     
    203203
    204204/** Send an area of screenbuffer to the FB driver. */
    205 static void fb_update_area(console_t *cons, ipcarg_t x0, ipcarg_t y0, ipcarg_t width, ipcarg_t height)
     205static void fb_update_area(console_t *cons, sysarg_t x0, sysarg_t y0, sysarg_t width, sysarg_t height)
    206206{
    207207        if (interbuffer) {
    208                 ipcarg_t x;
    209                 ipcarg_t y;
     208                sysarg_t x;
     209                sysarg_t y;
    210210               
    211211                for (y = 0; y < height; y++) {
     
    237237 *
    238238 */
    239 static void cell_mark_changed(ipcarg_t col, ipcarg_t row)
     239static void cell_mark_changed(sysarg_t col, sysarg_t row)
    240240{
    241241        if (fb_pending.cnt != 0) {
     
    255255
    256256/** Print a character to the active VC with buffering. */
    257 static void fb_putchar(wchar_t c, ipcarg_t col, ipcarg_t row)
     257static void fb_putchar(wchar_t c, sysarg_t col, sysarg_t row)
    258258{
    259259        async_msg_3(fb_info.phone, FB_PUTCHAR, c, col, row);
     
    352352                curs_visibility(false);
    353353               
    354                 ipcarg_t x;
    355                 ipcarg_t y;
     354                sysarg_t x;
     355                sysarg_t y;
    356356                int rc = 0;
    357357               
     
    584584        ipc_callid_t callid;
    585585        ipc_call_t call;
    586         ipcarg_t arg1;
    587         ipcarg_t arg2;
    588         ipcarg_t arg3;
     586        sysarg_t arg1;
     587        sysarg_t arg2;
     588        sysarg_t arg3;
    589589       
    590590        int rc;
     
    726726       
    727727        /* NB: The callback connection is slotted for removal */
    728         ipcarg_t phonehash;
     728        sysarg_t phonehash;
    729729        if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
    730730                printf(NAME ": Failed to create callback from input device\n");
  • uspace/srv/hid/console/gcons.c

    r554debd r96b02eb9  
    8282
    8383static bool use_gcons = false;
    84 static ipcarg_t xres;
    85 static ipcarg_t yres;
     84static sysarg_t xres;
     85static sysarg_t yres;
    8686
    8787enum butstate {
     
    107107static size_t active_console = 0;
    108108
    109 static ipcarg_t mouse_x = 0;
    110 static ipcarg_t mouse_y= 0;
     109static sysarg_t mouse_x = 0;
     110static sysarg_t mouse_y= 0;
    111111
    112112static bool btn_pressed = false;
    113 static ipcarg_t btn_x = 0;
    114 static ipcarg_t btn_y = 0;
     113static sysarg_t btn_x = 0;
     114static sysarg_t btn_y = 0;
    115115
    116116static void vp_switch(int vp)
     
    120120
    121121/** Create view port */
    122 static int vp_create(ipcarg_t x, ipcarg_t y, ipcarg_t width, ipcarg_t height)
     122static int vp_create(sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height)
    123123{
    124124        return async_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y,
     
    137137
    138138/** Transparent putchar */
    139 static void tran_putch(wchar_t ch, ipcarg_t col, ipcarg_t row)
     139static void tran_putch(wchar_t ch, sysarg_t col, sysarg_t row)
    140140{
    141141        async_msg_3(fbphone, FB_PUTCHAR, ch, col, row);
     
    297297}
    298298
    299 static int gcons_find_conbut(ipcarg_t x, ipcarg_t y)
    300 {
    301         ipcarg_t status_start = STATUS_START + (xres - 800) / 2;
     299static int gcons_find_conbut(sysarg_t x, sysarg_t y)
     300{
     301        sysarg_t status_start = STATUS_START + (xres - 800) / 2;
    302302       
    303303        if ((y < STATUS_TOP) || (y >= STATUS_TOP + STATUS_HEIGHT))
     
    313313                return -1;
    314314       
    315         ipcarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);
     315        sysarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);
    316316       
    317317        if (btn < CONSOLE_COUNT)
     
    363363 *
    364364 */
    365 static void draw_pixmap(char *logo, size_t size, ipcarg_t x, ipcarg_t y)
     365static void draw_pixmap(char *logo, size_t size, sysarg_t x, sysarg_t y)
    366366{
    367367        /* Create area */
     
    374374       
    375375        /* Send area */
    376         int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (ipcarg_t) shm);
     376        int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm);
    377377        if (rc)
    378378                goto exit;
     
    436436       
    437437        /* Send area */
    438         int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (ipcarg_t) shm);
     438        int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm);
    439439        if (rc)
    440440                goto exit;
     
    513513       
    514514        /* Create status buttons */
    515         ipcarg_t status_start = STATUS_START + (xres - 800) / 2;
     515        sysarg_t status_start = STATUS_START + (xres - 800) / 2;
    516516        size_t i;
    517517        for (i = 0; i < CONSOLE_COUNT; i++) {
Note: See TracChangeset for help on using the changeset viewer.