Changeset 89c57b6 in mainline for uspace/srv/hid/console/gcons.c


Ignore:
Timestamp:
2011-04-13T14:45:41Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88634420
Parents:
cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rcefb126 r89c57b6  
    3434
    3535#include <ipc/fb.h>
    36 #include <ipc/ipc.h>
    3736#include <async.h>
    3837#include <stdio.h>
     
    8281
    8382static bool use_gcons = false;
    84 static ipcarg_t xres;
    85 static ipcarg_t yres;
     83static sysarg_t xres;
     84static sysarg_t yres;
    8685
    8786enum butstate {
     
    107106static size_t active_console = 0;
    108107
    109 static ipcarg_t mouse_x = 0;
    110 static ipcarg_t mouse_y= 0;
     108static sysarg_t mouse_x = 0;
     109static sysarg_t mouse_y= 0;
    111110
    112111static bool btn_pressed = false;
    113 static ipcarg_t btn_x = 0;
    114 static ipcarg_t btn_y = 0;
     112static sysarg_t btn_x = 0;
     113static sysarg_t btn_y = 0;
    115114
    116115static void vp_switch(int vp)
     
    120119
    121120/** Create view port */
    122 static int vp_create(ipcarg_t x, ipcarg_t y, ipcarg_t width, ipcarg_t height)
     121static int vp_create(sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height)
    123122{
    124123        return async_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y,
     
    137136
    138137/** Transparent putchar */
    139 static void tran_putch(wchar_t ch, ipcarg_t col, ipcarg_t row)
     138static void tran_putch(wchar_t ch, sysarg_t col, sysarg_t row)
    140139{
    141140        async_msg_3(fbphone, FB_PUTCHAR, ch, col, row);
     
    157156               
    158157                char data[5];
    159                 snprintf(data, 5, "%u", index + 1);
     158                snprintf(data, 5, "%zu", index + 1);
    160159               
    161160                size_t i;
     
    287286        ssize_t ny = (ssize_t) mouse_y + dy;
    288287       
     288        /* Until gcons is initalized we don't have the screen resolution */
     289        if (xres == 0 || yres == 0)
     290                return;
     291       
    289292        mouse_x = (size_t) limit(nx, 0, xres);
    290293        mouse_y = (size_t) limit(ny, 0, yres);
     
    294297}
    295298
    296 static int gcons_find_conbut(ipcarg_t x, ipcarg_t y)
    297 {
    298         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;
    299302       
    300303        if ((y < STATUS_TOP) || (y >= STATUS_TOP + STATUS_HEIGHT))
     
    310313                return -1;
    311314       
    312         ipcarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);
     315        sysarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);
    313316       
    314317        if (btn < CONSOLE_COUNT)
     
    360363 *
    361364 */
    362 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)
    363366{
    364367        /* Create area */
     
    371374       
    372375        /* Send area */
    373         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);
    374377        if (rc)
    375378                goto exit;
     
    433436       
    434437        /* Send area */
    435         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);
    436439        if (rc)
    437440                goto exit;
     
    510513       
    511514        /* Create status buttons */
    512         ipcarg_t status_start = STATUS_START + (xres - 800) / 2;
     515        sysarg_t status_start = STATUS_START + (xres - 800) / 2;
    513516        size_t i;
    514517        for (i = 0; i < CONSOLE_COUNT; i++) {
Note: See TracChangeset for help on using the changeset viewer.