Ignore:
File:
1 edited

Legend:

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

    rb7fd2a0 rc8211849  
    101101static console_t *active_console = &consoles[0];
    102102
    103 static errno_t input_ev_active(input_t *);
    104 static errno_t input_ev_deactive(input_t *);
    105 static errno_t input_ev_key(input_t *, kbd_event_type_t, keycode_t, keymod_t, wchar_t);
    106 static errno_t input_ev_move(input_t *, int, int);
    107 static errno_t input_ev_abs_move(input_t *, unsigned, unsigned, unsigned, unsigned);
    108 static errno_t input_ev_button(input_t *, int, int);
     103static int input_ev_active(input_t *);
     104static int input_ev_deactive(input_t *);
     105static int input_ev_key(input_t *, kbd_event_type_t, keycode_t, keymod_t, wchar_t);
     106static int input_ev_move(input_t *, int, int);
     107static int input_ev_abs_move(input_t *, unsigned, unsigned, unsigned, unsigned);
     108static int input_ev_button(input_t *, int, int);
    109109
    110110static input_ev_ops_t input_ev_ops = {
     
    117117};
    118118
    119 static errno_t cons_open(con_srvs_t *, con_srv_t *);
    120 static errno_t cons_close(con_srv_t *);
    121 static errno_t cons_read(con_srv_t *, void *, size_t, size_t *);
    122 static errno_t cons_write(con_srv_t *, void *, size_t, size_t *);
     119static int cons_open(con_srvs_t *, con_srv_t *);
     120static int cons_close(con_srv_t *);
     121static int cons_read(con_srv_t *, void *, size_t, size_t *);
     122static int cons_write(con_srv_t *, void *, size_t, size_t *);
    123123static void cons_sync(con_srv_t *);
    124124static void cons_clear(con_srv_t *);
    125125static void cons_set_pos(con_srv_t *, sysarg_t col, sysarg_t row);
    126 static errno_t cons_get_pos(con_srv_t *, sysarg_t *, sysarg_t *);
    127 static errno_t cons_get_size(con_srv_t *, sysarg_t *, sysarg_t *);
    128 static errno_t cons_get_color_cap(con_srv_t *, console_caps_t *);
     126static int cons_get_pos(con_srv_t *, sysarg_t *, sysarg_t *);
     127static int cons_get_size(con_srv_t *, sysarg_t *, sysarg_t *);
     128static int cons_get_color_cap(con_srv_t *, console_caps_t *);
    129129static void cons_set_style(con_srv_t *, console_style_t);
    130130static void cons_set_color(con_srv_t *, console_color_t, console_color_t,
     
    132132static void cons_set_rgb_color(con_srv_t *, pixel_t, pixel_t);
    133133static void cons_set_cursor_visibility(con_srv_t *, bool);
    134 static errno_t cons_get_event(con_srv_t *, cons_event_t *);
     134static int cons_get_event(con_srv_t *, cons_event_t *);
    135135
    136136static con_ops_t con_ops = {
     
    230230}
    231231
    232 static errno_t input_ev_active(input_t *input)
     232static int input_ev_active(input_t *input)
    233233{
    234234        active = true;
     
    239239}
    240240
    241 static errno_t input_ev_deactive(input_t *input)
     241static int input_ev_deactive(input_t *input)
    242242{
    243243        active = false;
     
    247247}
    248248
    249 static errno_t input_ev_key(input_t *input, kbd_event_type_t type, keycode_t key,
     249static int input_ev_key(input_t *input, kbd_event_type_t type, keycode_t key,
    250250    keymod_t mods, wchar_t c)
    251251{
     
    274274}
    275275
    276 static errno_t input_ev_move(input_t *input, int dx, int dy)
    277 {
    278         return EOK;
    279 }
    280 
    281 static errno_t input_ev_abs_move(input_t *input, unsigned x , unsigned y,
     276static int input_ev_move(input_t *input, int dx, int dy)
     277{
     278        return EOK;
     279}
     280
     281static int input_ev_abs_move(input_t *input, unsigned x , unsigned y,
    282282    unsigned max_x, unsigned max_y)
    283283{
     
    285285}
    286286
    287 static errno_t input_ev_button(input_t *input, int bnum, int bpress)
     287static int input_ev_button(input_t *input, int bnum, int bpress)
    288288{
    289289        return EOK;
     
    328328}
    329329
    330 static errno_t cons_open(con_srvs_t *srvs, con_srv_t *srv)
    331 {
    332         return EOK;
    333 }
    334 
    335 static errno_t cons_close(con_srv_t *srv)
    336 {
    337         return EOK;
    338 }
    339 
    340 static errno_t cons_read(con_srv_t *srv, void *buf, size_t size, size_t *nread)
     330static int cons_open(con_srvs_t *srvs, con_srv_t *srv)
     331{
     332        return EOK;
     333}
     334
     335static int cons_close(con_srv_t *srv)
     336{
     337        return EOK;
     338}
     339
     340static int cons_read(con_srv_t *srv, void *buf, size_t size, size_t *nread)
    341341{
    342342        uint8_t *bbuf = buf;
     
    382382}
    383383
    384 static errno_t cons_write(con_srv_t *srv, void *data, size_t size, size_t *nwritten)
     384static int cons_write(con_srv_t *srv, void *data, size_t size, size_t *nwritten)
    385385{
    386386        console_t *cons = srv_to_console(srv);
     
    423423}
    424424
    425 static errno_t cons_get_pos(con_srv_t *srv, sysarg_t *col, sysarg_t *row)
     425static int cons_get_pos(con_srv_t *srv, sysarg_t *col, sysarg_t *row)
    426426{
    427427        console_t *cons = srv_to_console(srv);
     
    434434}
    435435
    436 static errno_t cons_get_size(con_srv_t *srv, sysarg_t *cols, sysarg_t *rows)
     436static int cons_get_size(con_srv_t *srv, sysarg_t *cols, sysarg_t *rows)
    437437{
    438438        console_t *cons = srv_to_console(srv);
     
    446446}
    447447
    448 static errno_t cons_get_color_cap(con_srv_t *srv, console_caps_t *ccaps)
     448static int cons_get_color_cap(con_srv_t *srv, console_caps_t *ccaps)
    449449{
    450450        console_t *cons = srv_to_console(srv);
     
    493493}
    494494
    495 static errno_t cons_get_event(con_srv_t *srv, cons_event_t *event)
     495static int cons_get_event(con_srv_t *srv, cons_event_t *event)
    496496{
    497497        console_t *cons = srv_to_console(srv);
     
    528528}
    529529
    530 static errno_t input_connect(const char *svc)
     530static int input_connect(const char *svc)
    531531{
    532532        async_sess_t *sess;
    533533        service_id_t dsid;
    534534       
    535         errno_t rc = loc_service_get_id(svc, &dsid, 0);
     535        int rc = loc_service_get_id(svc, &dsid, 0);
    536536        if (rc != EOK) {
    537537                printf("%s: Input service %s not found\n", NAME, svc);
     
    562562        service_id_t dsid;
    563563       
    564         errno_t rc = loc_service_get_id(svc, &dsid, 0);
     564        int rc = loc_service_get_id(svc, &dsid, 0);
    565565        if (rc == EOK) {
    566566                sess = loc_service_connect(dsid, INTERFACE_OUTPUT, 0);
     
    579579{
    580580        /* Connect to input service */
    581         errno_t rc = input_connect(input_svc);
     581        int rc = input_connect(input_svc);
    582582        if (rc != EOK)
    583583                return false;
Note: See TracChangeset for help on using the changeset viewer.