Changeset b2c9e42c in mainline
- Timestamp:
- 2024-10-03T18:21:04Z (8 weeks ago)
- Branches:
- master
- Children:
- e273e9e
- Parents:
- d05c237
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/input/include/io/kbd_event.h
rd05c237 rb2c9e42c 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 36 36 #define _LIBINPUT_IO_KBD_EVENT_H_ 37 37 38 #include <adt/list.h>39 38 #include <inttypes.h> 40 39 #include <io/keycode.h> … … 48 47 /** Console event structure. */ 49 48 typedef struct { 50 /** List handle */51 link_t link;52 53 49 /** Keyboard device ID */ 54 50 sysarg_t kbd_id; -
uspace/lib/ui/include/types/ui/testctl.h
rd05c237 rb2c9e42c 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 36 36 #ifndef _UI_TYPES_TESTCTL_H 37 37 #define _UI_TYPES_TESTCTL_H 38 39 #include <errno.h> 40 #include <io/kbd_event.h> 41 #include <io/pos_event.h> 42 #include <stdbool.h> 43 #include <types/ui/event.h> 38 44 39 45 struct ui_test_ctl; -
uspace/srv/hid/remcons/remcons.c
rd05c237 rb2c9e42c 348 348 * @param c Pressed character. 349 349 */ 350 static kbd_event_t *new_kbd_event(kbd_event_type_t type, keymod_t mods,350 static remcons_event_t *new_kbd_event(kbd_event_type_t type, keymod_t mods, 351 351 keycode_t key, char c) 352 352 { 353 kbd_event_t *event = malloc(sizeof(kbd_event_t));353 remcons_event_t *event = malloc(sizeof(remcons_event_t)); 354 354 assert(event); 355 355 356 356 link_initialize(&event->link); 357 event-> type = type;358 event-> mods = mods;359 event->k ey = key;360 event-> c = c;357 event->kbd.type = type; 358 event->kbd.mods = mods; 359 event->kbd.key = key; 360 event->kbd.c = c; 361 361 362 362 return event; … … 381 381 382 382 link_t *link = prodcons_consume(&remcons->in_events); 383 kbd_event_t *tmp = list_get_instance(link, kbd_event_t, link);383 remcons_event_t *tmp = list_get_instance(link, remcons_event_t, link); 384 384 385 385 event->type = CEV_KEY; 386 event->ev.key = *tmp;386 event->ev.key = tmp->kbd; 387 387 388 388 free(tmp); … … 587 587 remcons_t *remcons = (remcons_t *)arg; 588 588 589 kbd_event_t *down = new_kbd_event(KEY_PRESS, mods, key, c);590 kbd_event_t *up = new_kbd_event(KEY_RELEASE, mods, key, c);589 remcons_event_t *down = new_kbd_event(KEY_PRESS, mods, key, c); 590 remcons_event_t *up = new_kbd_event(KEY_RELEASE, mods, key, c); 591 591 assert(down); 592 592 assert(up); -
uspace/srv/hid/remcons/remcons.h
rd05c237 rb2c9e42c 38 38 39 39 #include <adt/prodcons.h> 40 #include <io/kbd_event.h> 40 41 #include <stdbool.h> 41 42 #include <vt/vt100.h> … … 56 57 bool curs_visible; /**< cursor is visible */ 57 58 58 /** Producer-consumer of kbd_event_t. */59 /** Producer-consumer of remcons_event_t. */ 59 60 prodcons_t in_events; 60 61 } remcons_t; 62 63 /** Remote console event */ 64 typedef struct { 65 link_t link; /**< link to list of events */ 66 kbd_event_t kbd; /**< keyboard event */ 67 } remcons_event_t; 61 68 62 69 #endif
Note:
See TracChangeset
for help on using the changeset viewer.