1 #ifndef LIBDS_TIZEN_KEYROUTER_H
2 #define LIBDS_TIZEN_KEYROUTER_H
4 #include <wayland-server.h>
5 #include <libds/seat.h>
6 #include <libds/surface.h>
13 * A handle for accessing ds_tizen_keyrouter.
15 struct ds_tizen_keyrouter;
18 * Creates a ds_tizen_keyrouter.
20 struct ds_tizen_keyrouter *
21 ds_tizen_keyrouter_create(struct wl_display *display);
24 * Adds destroy listener of ds_tizen_keyrouter
27 ds_tizen_keyrouter_add_destroy_listener(struct ds_tizen_keyrouter *keyrouter,
28 struct wl_listener *listener);
31 * Notify the keyrouter that a key has been pressed on the keyboard.
32 * This will eventually notify a given seat of key events, and if there is
33 * no destination to be routed, then it sends key events to the focused one
34 * automatically. So, if you call this, you don't need to call
35 * ds_seat_keyboard_notify_key() manually unless you want to do something
37 * The parameter, topmost_surface, should be given for the keyrouter to
38 * determine whether the given topmost_surface require a keycode exclusively
39 * when the surface is on very top of stack.
40 * See tizen_keyrouter protocol in tizen-extension.xml for more detail.
43 ds_tizen_keyrouter_notify_key(struct ds_tizen_keyrouter *keyrouter,
44 struct ds_seat *seat, struct ds_surface *topmost_surface,
45 uint32_t time_msec, uint32_t key, uint32_t state);