launch: merge header files in one (launch.h)
[platform/core/uifw/libds-tizen.git] / include / libds-tizen / keyrouter.h
1 #ifndef LIBDS_TIZEN_KEYROUTER_H
2 #define LIBDS_TIZEN_KEYROUTER_H
3
4 #include <wayland-server.h>
5 #include <libds/seat.h>
6 #include <libds/surface.h>
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 /**
13  * A handle for accessing ds_tizen_keyrouter.
14  */
15 struct ds_tizen_keyrouter;
16
17 /**
18  * Creates a ds_tizen_keyrouter.
19  */
20 struct ds_tizen_keyrouter *
21 ds_tizen_keyrouter_create(struct wl_display *display);
22
23 /**
24  * Adds destroy listener of ds_tizen_keyrouter
25  */
26 void
27 ds_tizen_keyrouter_add_destroy_listener(struct ds_tizen_keyrouter *keyrouter,
28         struct wl_listener *listener);
29
30 /**
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
36  * differently.
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.
41  */
42 void
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);
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif