Changes in uspace/srv/hid/console/console.c [b7fd2a0:c8211849] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
rb7fd2a0 rc8211849 101 101 static console_t *active_console = &consoles[0]; 102 102 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);103 static int input_ev_active(input_t *); 104 static int input_ev_deactive(input_t *); 105 static int input_ev_key(input_t *, kbd_event_type_t, keycode_t, keymod_t, wchar_t); 106 static int input_ev_move(input_t *, int, int); 107 static int input_ev_abs_move(input_t *, unsigned, unsigned, unsigned, unsigned); 108 static int input_ev_button(input_t *, int, int); 109 109 110 110 static input_ev_ops_t input_ev_ops = { … … 117 117 }; 118 118 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 *);119 static int cons_open(con_srvs_t *, con_srv_t *); 120 static int cons_close(con_srv_t *); 121 static int cons_read(con_srv_t *, void *, size_t, size_t *); 122 static int cons_write(con_srv_t *, void *, size_t, size_t *); 123 123 static void cons_sync(con_srv_t *); 124 124 static void cons_clear(con_srv_t *); 125 125 static 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 *);126 static int cons_get_pos(con_srv_t *, sysarg_t *, sysarg_t *); 127 static int cons_get_size(con_srv_t *, sysarg_t *, sysarg_t *); 128 static int cons_get_color_cap(con_srv_t *, console_caps_t *); 129 129 static void cons_set_style(con_srv_t *, console_style_t); 130 130 static void cons_set_color(con_srv_t *, console_color_t, console_color_t, … … 132 132 static void cons_set_rgb_color(con_srv_t *, pixel_t, pixel_t); 133 133 static void cons_set_cursor_visibility(con_srv_t *, bool); 134 static errno_t cons_get_event(con_srv_t *, cons_event_t *);134 static int cons_get_event(con_srv_t *, cons_event_t *); 135 135 136 136 static con_ops_t con_ops = { … … 230 230 } 231 231 232 static errno_t input_ev_active(input_t *input)232 static int input_ev_active(input_t *input) 233 233 { 234 234 active = true; … … 239 239 } 240 240 241 static errno_t input_ev_deactive(input_t *input)241 static int input_ev_deactive(input_t *input) 242 242 { 243 243 active = false; … … 247 247 } 248 248 249 static errno_t input_ev_key(input_t *input, kbd_event_type_t type, keycode_t key,249 static int input_ev_key(input_t *input, kbd_event_type_t type, keycode_t key, 250 250 keymod_t mods, wchar_t c) 251 251 { … … 274 274 } 275 275 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,276 static int input_ev_move(input_t *input, int dx, int dy) 277 { 278 return EOK; 279 } 280 281 static int input_ev_abs_move(input_t *input, unsigned x , unsigned y, 282 282 unsigned max_x, unsigned max_y) 283 283 { … … 285 285 } 286 286 287 static errno_t input_ev_button(input_t *input, int bnum, int bpress)287 static int input_ev_button(input_t *input, int bnum, int bpress) 288 288 { 289 289 return EOK; … … 328 328 } 329 329 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)330 static int cons_open(con_srvs_t *srvs, con_srv_t *srv) 331 { 332 return EOK; 333 } 334 335 static int cons_close(con_srv_t *srv) 336 { 337 return EOK; 338 } 339 340 static int cons_read(con_srv_t *srv, void *buf, size_t size, size_t *nread) 341 341 { 342 342 uint8_t *bbuf = buf; … … 382 382 } 383 383 384 static errno_t cons_write(con_srv_t *srv, void *data, size_t size, size_t *nwritten)384 static int cons_write(con_srv_t *srv, void *data, size_t size, size_t *nwritten) 385 385 { 386 386 console_t *cons = srv_to_console(srv); … … 423 423 } 424 424 425 static errno_t cons_get_pos(con_srv_t *srv, sysarg_t *col, sysarg_t *row)425 static int cons_get_pos(con_srv_t *srv, sysarg_t *col, sysarg_t *row) 426 426 { 427 427 console_t *cons = srv_to_console(srv); … … 434 434 } 435 435 436 static errno_t cons_get_size(con_srv_t *srv, sysarg_t *cols, sysarg_t *rows)436 static int cons_get_size(con_srv_t *srv, sysarg_t *cols, sysarg_t *rows) 437 437 { 438 438 console_t *cons = srv_to_console(srv); … … 446 446 } 447 447 448 static errno_t cons_get_color_cap(con_srv_t *srv, console_caps_t *ccaps)448 static int cons_get_color_cap(con_srv_t *srv, console_caps_t *ccaps) 449 449 { 450 450 console_t *cons = srv_to_console(srv); … … 493 493 } 494 494 495 static errno_t cons_get_event(con_srv_t *srv, cons_event_t *event)495 static int cons_get_event(con_srv_t *srv, cons_event_t *event) 496 496 { 497 497 console_t *cons = srv_to_console(srv); … … 528 528 } 529 529 530 static errno_t input_connect(const char *svc)530 static int input_connect(const char *svc) 531 531 { 532 532 async_sess_t *sess; 533 533 service_id_t dsid; 534 534 535 errno_t rc = loc_service_get_id(svc, &dsid, 0);535 int rc = loc_service_get_id(svc, &dsid, 0); 536 536 if (rc != EOK) { 537 537 printf("%s: Input service %s not found\n", NAME, svc); … … 562 562 service_id_t dsid; 563 563 564 errno_t rc = loc_service_get_id(svc, &dsid, 0);564 int rc = loc_service_get_id(svc, &dsid, 0); 565 565 if (rc == EOK) { 566 566 sess = loc_service_connect(dsid, INTERFACE_OUTPUT, 0); … … 579 579 { 580 580 /* Connect to input service */ 581 errno_t rc = input_connect(input_svc);581 int rc = input_connect(input_svc); 582 582 if (rc != EOK) 583 583 return false;
Note:
See TracChangeset
for help on using the changeset viewer.