~martin-decky/helenos/rcu

« back to all changes in this revision

Viewing changes to uspace/srv/hid/fb/fb.c

  • Committer: Martin Decky
  • Date: 2010-12-14 12:52:38 UTC
  • Revision ID: martin@decky.cz-20101214125238-a5utoxafbvljh323
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)

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
 
199
199
static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a);
200
200
static int rgb_from_style(attr_rgb_t *rgb, int style);
201
 
static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,
202
 
    ipcarg_t bg_color, ipcarg_t flags);
 
201
static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color,
 
202
    sysarg_t bg_color, sysarg_t flags);
203
203
 
204
 
static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,
205
 
    ipcarg_t bg_color, ipcarg_t attr);
 
204
static int fb_set_color(viewport_t *vport, sysarg_t fg_color,
 
205
    sysarg_t bg_color, sysarg_t attr);
206
206
 
207
207
static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor,
208
208
    uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color);
1071
1071
        static size_t intersize = 0;
1072
1072
        
1073
1073
        static unsigned char *shm = NULL;
1074
 
        static ipcarg_t shm_id = 0;
 
1074
        static sysarg_t shm_id = 0;
1075
1075
        static size_t shm_size;
1076
1076
        
1077
1077
        bool handled = true;
1528
1528
        return EOK;
1529
1529
}
1530
1530
 
1531
 
static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,
1532
 
    ipcarg_t bg_color, ipcarg_t flags)
 
1531
static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color,
 
1532
    sysarg_t bg_color, sysarg_t flags)
1533
1533
{
1534
1534
        fg_color = (fg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0);
1535
1535
        bg_color = (bg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0);
1561
1561
        return rc;
1562
1562
}
1563
1563
 
1564
 
static int fb_set_style(viewport_t *vport, ipcarg_t style)
 
1564
static int fb_set_style(viewport_t *vport, sysarg_t style)
1565
1565
{
1566
1566
        return rgb_from_style(&vport->attr, (int) style);
1567
1567
}
1568
1568
 
1569
 
static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,
1570
 
    ipcarg_t bg_color, ipcarg_t flags)
 
1569
static int fb_set_color(viewport_t *vport, sysarg_t fg_color,
 
1570
    sysarg_t bg_color, sysarg_t flags)
1571
1571
{
1572
1572
        return rgb_from_idx(&vport->attr, fg_color, bg_color, flags);
1573
1573
}