Changeset 287688f in mainline
- Timestamp:
- 2020-02-01T22:08:18Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f7fb2b21
- Parents:
- 3275736
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/window.c
r3275736 r287688f 82 82 static pixel_t color_caption_focus = PIXEL(255, 255, 255, 255); 83 83 static pixel_t color_caption_unfocus = PIXEL(255, 207, 207, 207); 84 85 static void window_kbd_event(void *, kbd_event_t *); 86 87 static display_wnd_cb_t window_cb = { 88 .kbd_event = window_kbd_event 89 }; 84 90 85 91 static void paint_internal(widget_t *widget) … … 400 406 wparams.rect.p1.y = height; 401 407 402 rc = display_window_create(win->display, &wparams, NULL, NULL,403 &new_window);408 rc = display_window_create(win->display, &wparams, &window_cb, 409 (void *) win, &new_window); 404 410 if (rc != EOK) { 405 411 surface_destroy(new_surface); … … 794 800 } 795 801 802 static void window_kbd_event(void *arg, kbd_event_t *kevent) 803 { 804 window_t *win = (window_t *) arg; 805 window_event_t *event; 806 807 event = (window_event_t *) calloc(1, sizeof(window_event_t)); 808 if (event == NULL) 809 return; 810 811 link_initialize(&event->link); 812 event->type = ET_KEYBOARD_EVENT; 813 event->data.kbd = *kevent; 814 prodcons_produce(&win->events, &event->link); 815 } 816 796 817 /** @} 797 818 */
Note:
See TracChangeset
for help on using the changeset viewer.