Changeset b3c185b6 in mainline for uspace/srv/hid/display/output.c
- Timestamp:
- 2019-11-04T14:05:35Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- be15256
- Parents:
- 22faaf2
- git-author:
- Jiri Svoboda <jiri@…> (2019-10-03 18:05:09)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-11-04 14:05:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/output.c
r22faaf2 rb3c185b6 42 42 #include "output.h" 43 43 44 errno_t output_init(gfx_context_t **rgc) 44 static void (*kbd_ev_handler)(void *, kbd_event_t *); 45 static void *kbd_ev_arg; 46 47 static void on_keyboard_event(widget_t *widget, void *data) 48 { 49 printf("Keyboard event\n"); 50 kbd_ev_handler(kbd_ev_arg, (kbd_event_t *) data); 51 } 52 53 errno_t output_init(void (*kbd_event_handler)(void *, kbd_event_t *), 54 void *arg, gfx_context_t **rgc) 45 55 { 46 56 canvas_gc_t *cgc = NULL; … … 53 63 54 64 printf("Init canvas..\n"); 65 kbd_ev_handler = kbd_event_handler; 66 kbd_ev_arg = arg; 55 67 56 68 window = window_open("comp:0/winreg", NULL, … … 83 95 } 84 96 97 sig_connect(&canvas->keyboard_event, NULL, on_keyboard_event); 98 85 99 window_resize(window, 0, 0, vw + 10, vh + 30, WINDOW_PLACEMENT_ANY); 86 100 window_exec(window);
Note:
See TracChangeset
for help on using the changeset viewer.