1 #ifndef LIBDS_TIZEN_INPUT_METHOD_H
2 #define LIBDS_TIZEN_INPUT_METHOD_H
5 #include <wayland-server.h>
6 #include <libds/seat.h>
11 struct ds_tizen_input_method_manager;
12 struct ds_tizen_input_method_context;
13 struct ds_tizen_input_method;
15 struct ds_tizen_input_method_manager_event_set_transient_for
17 struct ds_tizen_input_method_manager *im_mgr;
18 uint32_t pid_parent, pid_child;
21 struct ds_tizen_input_method_context_event_commit_string
23 struct ds_tizen_input_method_context *im_context;
28 struct ds_tizen_input_method_context_event_preedit_string
30 struct ds_tizen_input_method_context *im_context;
32 const char *text, *commit;
35 struct ds_tizen_input_method_context_event_preedit_styling
37 struct ds_tizen_input_method_context *im_context;
38 uint32_t index, length, style;
41 struct ds_tizen_input_method_context_event_preedit_cursor
43 struct ds_tizen_input_method_context *im_context;
47 struct ds_tizen_input_method_context_event_delete_surrounding_text
49 struct ds_tizen_input_method_context *im_context;
54 struct ds_tizen_input_method_context_event_cursor_position
56 struct ds_tizen_input_method_context *im_context;
57 int32_t index, anchor;
60 struct ds_tizen_input_method_context_event_modifiers_map
62 struct ds_tizen_input_method_context *im_context;
66 struct ds_tizen_input_method_context_event_keysym
68 struct ds_tizen_input_method_context *im_context;
69 uint32_t serial, time, sym, state, modifiers;
72 struct ds_tizen_input_method_context_event_language
74 struct ds_tizen_input_method_context *im_context;
79 struct ds_tizen_input_method_context_event_text_direction
81 struct ds_tizen_input_method_context *im_context;
82 uint32_t serial, direction;
85 //input_method_manager
86 struct ds_tizen_input_method_manager *
87 ds_tizen_input_method_manager_create(struct wl_display *display);
90 ds_tizen_input_method_manager_add_destroy_listener(
91 struct ds_tizen_input_method_manager *im_mgr, struct wl_listener *listener);
93 ds_tizen_input_method_manager_add_set_transient_for_listener(
94 struct ds_tizen_input_method_manager *im_mgr, struct wl_listener *listener);
97 struct ds_tizen_input_method *
98 ds_tizen_input_method_create(struct wl_display *display);
100 struct ds_tizen_input_method_context *
101 ds_tizen_input_method_create_context(struct ds_tizen_input_method *input_method);
104 ds_tizen_input_method_add_destroy_listener(
105 struct ds_tizen_input_method *im, struct wl_listener *listener);
108 void ds_tizen_input_method_send_activate(struct ds_tizen_input_method *im,
109 struct ds_tizen_input_method_context *context);
110 void ds_tizen_input_method_send_deactivate(struct ds_tizen_input_method *im,
111 struct ds_tizen_input_method_context *context);
113 //input_method_context
115 ds_tizen_input_method_context_add_destroy_listener(
116 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
118 ds_tizen_input_method_context_add_commit_string_listener(
119 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
121 ds_tizen_input_method_context_add_preedit_string_listener(
122 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
124 ds_tizen_input_method_context_add_preedit_styling_listener(
125 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
127 ds_tizen_input_method_context_add_preedit_cursor_listener(
128 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
130 ds_tizen_input_method_context_add_delete_surrounding_text_listener(
131 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
133 ds_tizen_input_method_context_add_cursor_position_listener(
134 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
136 ds_tizen_input_method_context_add_modifiers_map_listener(
137 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
139 ds_tizen_input_method_context_add_keysym_listener(
140 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
142 ds_tizen_input_method_context_add_grab_keyboard_listener(
143 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
145 ds_tizen_input_method_context_add_key_listener(
146 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
148 ds_tizen_input_method_context_add_modifiers_listener(
149 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
151 ds_tizen_input_method_context_add_language_listener(
152 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
154 ds_tizen_input_method_context_add_text_direction_listener(
155 struct ds_tizen_input_method_context *context, struct wl_listener *listener);
159 ds_tizen_input_method_context_send_surrounding_text(struct ds_tizen_input_method_context *context,
160 const char *text, uint32_t cursor, uint32_t anchor);
162 ds_tizen_input_method_context_send_reset(struct ds_tizen_input_method_context *context);
164 ds_tizen_input_method_context_send_content_type(
165 struct ds_tizen_input_method_context *context, uint32_t hint, uint32_t purpose);
167 ds_tizen_input_method_context_send_invoke_action(
168 struct ds_tizen_input_method_context *context, uint32_t button, uint32_t index);
170 ds_tizen_input_method_context_send_commit_state(
171 struct ds_tizen_input_method_context *context, uint32_t serial);
173 ds_tizen_input_method_context_send_preferred_language(
174 struct ds_tizen_input_method_context *context, const char *launguage);