summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-06-25 14:01:30 +0100
committerChris Michael <cp.michael@samsung.com>2013-06-25 14:14:04 +0100
commitabf8a3b7bfaff7b68369ec7260dfbdb9701905ac (patch)
tree47e01302b80c1841faf65d2fc09c76ce04996ae4
parent0615dfe4ee1636b56086545605ea9dd6dadb95c2 (diff)
Format for EFL style
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/ecore_imf/wayland/text-client-protocol.h551
1 files changed, 264 insertions, 287 deletions
diff --git a/src/modules/ecore_imf/wayland/text-client-protocol.h b/src/modules/ecore_imf/wayland/text-client-protocol.h
index f9de29c9e5..bcad325fce 100644
--- a/src/modules/ecore_imf/wayland/text-client-protocol.h
+++ b/src/modules/ecore_imf/wayland/text-client-protocol.h
@@ -69,20 +69,21 @@ extern const struct wl_interface wl_text_input_manager_interface;
69 * Content hint is a bitmask to allow to modify the behavior of the text 69 * Content hint is a bitmask to allow to modify the behavior of the text
70 * input. 70 * input.
71 */ 71 */
72enum wl_text_input_content_hint { 72enum wl_text_input_content_hint
73 WL_TEXT_INPUT_CONTENT_HINT_NONE = 0x0, 73{
74 WL_TEXT_INPUT_CONTENT_HINT_DEFAULT = 0x7, 74 WL_TEXT_INPUT_CONTENT_HINT_NONE = 0x0,
75 WL_TEXT_INPUT_CONTENT_HINT_PASSWORD = 0xc0, 75 WL_TEXT_INPUT_CONTENT_HINT_DEFAULT = 0x7,
76 WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION = 0x1, 76 WL_TEXT_INPUT_CONTENT_HINT_PASSWORD = 0xc0,
77 WL_TEXT_INPUT_CONTENT_HINT_AUTO_CORRECTION = 0x2, 77 WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION = 0x1,
78 WL_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION = 0x4, 78 WL_TEXT_INPUT_CONTENT_HINT_AUTO_CORRECTION = 0x2,
79 WL_TEXT_INPUT_CONTENT_HINT_LOWERCASE = 0x8, 79 WL_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION = 0x4,
80 WL_TEXT_INPUT_CONTENT_HINT_UPPERCASE = 0x10, 80 WL_TEXT_INPUT_CONTENT_HINT_LOWERCASE = 0x8,
81 WL_TEXT_INPUT_CONTENT_HINT_TITLECASE = 0x20, 81 WL_TEXT_INPUT_CONTENT_HINT_UPPERCASE = 0x10,
82 WL_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT = 0x40, 82 WL_TEXT_INPUT_CONTENT_HINT_TITLECASE = 0x20,
83 WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA = 0x80, 83 WL_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT = 0x40,
84 WL_TEXT_INPUT_CONTENT_HINT_LATIN = 0x100, 84 WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA = 0x80,
85 WL_TEXT_INPUT_CONTENT_HINT_MULTILINE = 0x200, 85 WL_TEXT_INPUT_CONTENT_HINT_LATIN = 0x100,
86 WL_TEXT_INPUT_CONTENT_HINT_MULTILINE = 0x200,
86}; 87};
87#endif /* WL_TEXT_INPUT_CONTENT_HINT_ENUM */ 88#endif /* WL_TEXT_INPUT_CONTENT_HINT_ENUM */
88 89
@@ -113,43 +114,46 @@ enum wl_text_input_content_hint {
113 * This allows an input method to show special purpose input panels with 114 * This allows an input method to show special purpose input panels with
114 * extra characters or to disallow some characters. 115 * extra characters or to disallow some characters.
115 */ 116 */
116enum wl_text_input_content_purpose { 117enum wl_text_input_content_purpose
117 WL_TEXT_INPUT_CONTENT_PURPOSE_NORMAL = 0, 118{
118 WL_TEXT_INPUT_CONTENT_PURPOSE_ALPHA = 1, 119 WL_TEXT_INPUT_CONTENT_PURPOSE_NORMAL = 0,
119 WL_TEXT_INPUT_CONTENT_PURPOSE_DIGITS = 2, 120 WL_TEXT_INPUT_CONTENT_PURPOSE_ALPHA = 1,
120 WL_TEXT_INPUT_CONTENT_PURPOSE_NUMBER = 3, 121 WL_TEXT_INPUT_CONTENT_PURPOSE_DIGITS = 2,
121 WL_TEXT_INPUT_CONTENT_PURPOSE_PHONE = 4, 122 WL_TEXT_INPUT_CONTENT_PURPOSE_NUMBER = 3,
122 WL_TEXT_INPUT_CONTENT_PURPOSE_URL = 5, 123 WL_TEXT_INPUT_CONTENT_PURPOSE_PHONE = 4,
123 WL_TEXT_INPUT_CONTENT_PURPOSE_EMAIL = 6, 124 WL_TEXT_INPUT_CONTENT_PURPOSE_URL = 5,
124 WL_TEXT_INPUT_CONTENT_PURPOSE_NAME = 7, 125 WL_TEXT_INPUT_CONTENT_PURPOSE_EMAIL = 6,
125 WL_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD = 8, 126 WL_TEXT_INPUT_CONTENT_PURPOSE_NAME = 7,
126 WL_TEXT_INPUT_CONTENT_PURPOSE_DATE = 9, 127 WL_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD = 8,
127 WL_TEXT_INPUT_CONTENT_PURPOSE_TIME = 10, 128 WL_TEXT_INPUT_CONTENT_PURPOSE_DATE = 9,
128 WL_TEXT_INPUT_CONTENT_PURPOSE_DATETIME = 11, 129 WL_TEXT_INPUT_CONTENT_PURPOSE_TIME = 10,
129 WL_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL = 12, 130 WL_TEXT_INPUT_CONTENT_PURPOSE_DATETIME = 11,
131 WL_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL = 12,
130}; 132};
131#endif /* WL_TEXT_INPUT_CONTENT_PURPOSE_ENUM */ 133#endif /* WL_TEXT_INPUT_CONTENT_PURPOSE_ENUM */
132 134
133#ifndef WL_TEXT_INPUT_PREEDIT_STYLE_ENUM 135#ifndef WL_TEXT_INPUT_PREEDIT_STYLE_ENUM
134#define WL_TEXT_INPUT_PREEDIT_STYLE_ENUM 136#define WL_TEXT_INPUT_PREEDIT_STYLE_ENUM
135enum wl_text_input_preedit_style { 137enum wl_text_input_preedit_style
136 WL_TEXT_INPUT_PREEDIT_STYLE_DEFAULT = 0, 138{
137 WL_TEXT_INPUT_PREEDIT_STYLE_NONE = 1, 139 WL_TEXT_INPUT_PREEDIT_STYLE_DEFAULT = 0,
138 WL_TEXT_INPUT_PREEDIT_STYLE_ACTIVE = 2, 140 WL_TEXT_INPUT_PREEDIT_STYLE_NONE = 1,
139 WL_TEXT_INPUT_PREEDIT_STYLE_INACTIVE = 3, 141 WL_TEXT_INPUT_PREEDIT_STYLE_ACTIVE = 2,
140 WL_TEXT_INPUT_PREEDIT_STYLE_HIGHLIGHT = 4, 142 WL_TEXT_INPUT_PREEDIT_STYLE_INACTIVE = 3,
141 WL_TEXT_INPUT_PREEDIT_STYLE_UNDERLINE = 5, 143 WL_TEXT_INPUT_PREEDIT_STYLE_HIGHLIGHT = 4,
142 WL_TEXT_INPUT_PREEDIT_STYLE_SELECTION = 6, 144 WL_TEXT_INPUT_PREEDIT_STYLE_UNDERLINE = 5,
143 WL_TEXT_INPUT_PREEDIT_STYLE_INCORRECT = 7, 145 WL_TEXT_INPUT_PREEDIT_STYLE_SELECTION = 6,
146 WL_TEXT_INPUT_PREEDIT_STYLE_INCORRECT = 7,
144}; 147};
145#endif /* WL_TEXT_INPUT_PREEDIT_STYLE_ENUM */ 148#endif /* WL_TEXT_INPUT_PREEDIT_STYLE_ENUM */
146 149
147#ifndef WL_TEXT_INPUT_TEXT_DIRECTION_ENUM 150#ifndef WL_TEXT_INPUT_TEXT_DIRECTION_ENUM
148#define WL_TEXT_INPUT_TEXT_DIRECTION_ENUM 151#define WL_TEXT_INPUT_TEXT_DIRECTION_ENUM
149enum wl_text_input_text_direction { 152enum wl_text_input_text_direction
150 WL_TEXT_INPUT_TEXT_DIRECTION_AUTO = 0, 153{
151 WL_TEXT_INPUT_TEXT_DIRECTION_LTR = 1, 154 WL_TEXT_INPUT_TEXT_DIRECTION_AUTO = 0,
152 WL_TEXT_INPUT_TEXT_DIRECTION_RTL = 2, 155 WL_TEXT_INPUT_TEXT_DIRECTION_LTR = 1,
156 WL_TEXT_INPUT_TEXT_DIRECTION_RTL = 2,
153}; 157};
154#endif /* WL_TEXT_INPUT_TEXT_DIRECTION_ENUM */ 158#endif /* WL_TEXT_INPUT_TEXT_DIRECTION_ENUM */
155 159
@@ -189,330 +193,303 @@ enum wl_text_input_text_direction {
189 * The text input can then ignore events from the input method which are 193 * The text input can then ignore events from the input method which are
190 * based on an outdated state (for example after a reset). 194 * based on an outdated state (for example after a reset).
191 */ 195 */
192struct wl_text_input_listener { 196struct wl_text_input_listener
193 /** 197{
194 * enter - enter event 198 /**
195 * @surface: (none) 199 * enter - enter event
196 * 200 * @surface: (none)
197 * Notify the text-input object when it received focus. Typically 201 *
198 * in response to an activate request. 202 * Notify the text-input object when it received focus. Typically
199 */ 203 * in response to an activate request.
200 void (*enter)(void *data, 204 */
201 struct wl_text_input *wl_text_input, 205 void (*enter)(void *data, struct wl_text_input *wl_text_input, struct wl_surface *surface);
202 struct wl_surface *surface); 206
203 /** 207 /**
204 * leave - leave event 208 * leave - leave event
205 * 209 *
206 * Notify the text-input object when it lost focus. Either in 210 * Notify the text-input object when it lost focus. Either in
207 * response to a deactivate request or when the assigned surface 211 * response to a deactivate request or when the assigned surface
208 * lost focus or was destroyed. 212 * lost focus or was destroyed.
209 */ 213 */
210 void (*leave)(void *data, 214 void (*leave)(void *data, struct wl_text_input *wl_text_input);
211 struct wl_text_input *wl_text_input); 215
212 /** 216 /**
213 * modifiers_map - modifiers map 217 * modifiers_map - modifiers map
214 * @map: (none) 218 * @map: (none)
215 * 219 *
216 * Transfer an array of 0-terminated modifiers names. The 220 * Transfer an array of 0-terminated modifiers names. The
217 * position in the array is the index of the modifier as used in 221 * position in the array is the index of the modifier as used in
218 * the modifiers bitmask in the keysym event. 222 * the modifiers bitmask in the keysym event.
219 */ 223 */
220 void (*modifiers_map)(void *data, 224 void (*modifiers_map)(void *data, struct wl_text_input *wl_text_input, struct wl_array *map);
221 struct wl_text_input *wl_text_input, 225
222 struct wl_array *map); 226 /**
223 /** 227 * input_panel_state - state of the input panel
224 * input_panel_state - state of the input panel 228 * @state: (none)
225 * @state: (none) 229 *
226 * 230 * Notify when the visibility state of the input panel changed.
227 * Notify when the visibility state of the input panel changed. 231 */
228 */ 232 void (*input_panel_state)(void *data, struct wl_text_input *wl_text_input, uint32_t state);
229 void (*input_panel_state)(void *data, 233
230 struct wl_text_input *wl_text_input, 234 /**
231 uint32_t state); 235 * preedit_string - pre-edit
232 /** 236 * @serial: serial of the latest known text input state
233 * preedit_string - pre-edit 237 * @text: (none)
234 * @serial: serial of the latest known text input state 238 * @commit: (none)
235 * @text: (none) 239 *
236 * @commit: (none) 240 * Notify when a new composing text (pre-edit) should be set
237 * 241 * around the current cursor position. Any previously set composing
238 * Notify when a new composing text (pre-edit) should be set 242 * text should be removed.
239 * around the current cursor position. Any previously set composing 243 *
240 * text should be removed. 244 * The commit text can be used to replace the preedit text on reset
241 * 245 * (for example on unfocus).
242 * The commit text can be used to replace the preedit text on reset 246 *
243 * (for example on unfocus). 247 * The text input should also handle all preedit_style and
244 * 248 * preedit_cursor events occuring directly before preedit_string.
245 * The text input should also handle all preedit_style and 249 */
246 * preedit_cursor events occuring directly before preedit_string. 250 void (*preedit_string)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, const char *text, const char *commit);
247 */ 251
248 void (*preedit_string)(void *data, 252 /**
249 struct wl_text_input *wl_text_input, 253 * preedit_styling - pre-edit styling
250 uint32_t serial, 254 * @index: (none)
251 const char *text, 255 * @length: (none)
252 const char *commit); 256 * @style: (none)
253 /** 257 *
254 * preedit_styling - pre-edit styling 258 * Sets styling information on composing text. The style is
255 * @index: (none) 259 * applied for length Unicode characters from index relative to the
256 * @length: (none) 260 * beginning of the composing text (as Unicode character offset).
257 * @style: (none) 261 * Multiple styles can be applied to a composing text by sending
258 * 262 * multiple preedit_styling events.
259 * Sets styling information on composing text. The style is 263 *
260 * applied for length Unicode characters from index relative to the 264 * This event is handled as part of a following preedit_string
261 * beginning of the composing text (as Unicode character offset). 265 * event.
262 * Multiple styles can be applied to a composing text by sending 266 */
263 * multiple preedit_styling events. 267 void (*preedit_styling)(void *data, struct wl_text_input *wl_text_input, uint32_t index, uint32_t length, uint32_t style);
264 * 268
265 * This event is handled as part of a following preedit_string 269 /**
266 * event. 270 * preedit_cursor - pre-edit cursor
267 */ 271 * @index: (none)
268 void (*preedit_styling)(void *data, 272 *
269 struct wl_text_input *wl_text_input, 273 * Sets the cursor position inside the composing text (as Unicode
270 uint32_t index, 274 * character offset) relative to the start of the composing text.
271 uint32_t length, 275 * When index is a negative number no cursor is shown.
272 uint32_t style); 276 *
273 /** 277 * This event is handled as part of a following preedit_string
274 * preedit_cursor - pre-edit cursor 278 * event.
275 * @index: (none) 279 */
276 * 280 void (*preedit_cursor)(void *data, struct wl_text_input *wl_text_input, int32_t index);
277 * Sets the cursor position inside the composing text (as Unicode 281
278 * character offset) relative to the start of the composing text. 282 /**
279 * When index is a negative number no cursor is shown. 283 * commit_string - commit
280 * 284 * @serial: serial of the latest known text input state
281 * This event is handled as part of a following preedit_string 285 * @text: (none)
282 * event. 286 *
283 */ 287 * Notify when text should be inserted into the editor widget.
284 void (*preedit_cursor)(void *data, 288 * The text to commit could be either just a single character after
285 struct wl_text_input *wl_text_input, 289 * a key press or the result of some composing (pre-edit). It could
286 int32_t index); 290 * be also an empty text when some text should be removed (see
287 /** 291 * delete_surrounding_text) or when the input cursor should be
288 * commit_string - commit 292 * moved (see cursor_position).
289 * @serial: serial of the latest known text input state 293 *
290 * @text: (none) 294 * Any previously set composing text should be removed.
291 * 295 */
292 * Notify when text should be inserted into the editor widget. 296 void (*commit_string)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, const char *text);
293 * The text to commit could be either just a single character after 297
294 * a key press or the result of some composing (pre-edit). It could 298 /**
295 * be also an empty text when some text should be removed (see 299 * cursor_position - set cursor to new position
296 * delete_surrounding_text) or when the input cursor should be 300 * @index: (none)
297 * moved (see cursor_position). 301 * @anchor: (none)
298 * 302 *
299 * Any previously set composing text should be removed. 303 * Notify when the cursor or anchor position should be modified.
300 */ 304 *
301 void (*commit_string)(void *data, 305 * This event should be handled as part of a following
302 struct wl_text_input *wl_text_input, 306 * commit_string event.
303 uint32_t serial, 307 */
304 const char *text); 308 void (*cursor_position)(void *data, struct wl_text_input *wl_text_input, int32_t index, int32_t anchor);
305 /** 309
306 * cursor_position - set cursor to new position 310 /**
307 * @index: (none) 311 * delete_surrounding_text - delete surrounding text
308 * @anchor: (none) 312 * @index: (none)
309 * 313 * @length: (none)
310 * Notify when the cursor or anchor position should be modified. 314 *
311 * 315 * Notify when the text around the current cursor position should
312 * This event should be handled as part of a following 316 * be deleted.
313 * commit_string event. 317 *
314 */ 318 * Index is relative to the current cursor (in Unicode characters).
315 void (*cursor_position)(void *data, 319 * Length is the length of deleted text (in Unicode characters).
316 struct wl_text_input *wl_text_input, 320 *
317 int32_t index, 321 * This event should be handled as part of a following
318 int32_t anchor); 322 * commit_string event.
319 /** 323 */
320 * delete_surrounding_text - delete surrounding text 324 void (*delete_surrounding_text)(void *data, struct wl_text_input *wl_text_input, int32_t index, uint32_t length);
321 * @index: (none) 325
322 * @length: (none) 326 /**
323 * 327 * keysym - keysym
324 * Notify when the text around the current cursor position should 328 * @serial: serial of the latest known text input state
325 * be deleted. 329 * @time: (none)
326 * 330 * @sym: (none)
327 * Index is relative to the current cursor (in Unicode characters). 331 * @state: (none)
328 * Length is the length of deleted text (in Unicode characters). 332 * @modifiers: (none)
329 * 333 *
330 * This event should be handled as part of a following 334 * Notify when a key event was sent. Key events should not be
331 * commit_string event. 335 * used for normal text input operations, which should be done with
332 */ 336 * commit_string, delete_surrounding_text, etc. The key event
333 void (*delete_surrounding_text)(void *data, 337 * follows the wl_keyboard key event convention. Sym is a XKB
334 struct wl_text_input *wl_text_input, 338 * keysym, state a wl_keyboard key_state. Modifiers are a mask for
335 int32_t index, 339 * effective modifiers (where the modifier indices are set by the
336 uint32_t length); 340 * modifiers_map event)
337 /** 341 */
338 * keysym - keysym 342 void (*keysym)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers);
339 * @serial: serial of the latest known text input state 343
340 * @time: (none) 344 /**
341 * @sym: (none) 345 * language - language
342 * @state: (none) 346 * @serial: serial of the latest known text input state
343 * @modifiers: (none) 347 * @language: (none)
344 * 348 *
345 * Notify when a key event was sent. Key events should not be 349 * Sets the language of the input text. The "language" argument
346 * used for normal text input operations, which should be done with 350 * is a RFC-3066 format language tag.
347 * commit_string, delete_surrounding_text, etc. The key event 351 */
348 * follows the wl_keyboard key event convention. Sym is a XKB 352 void (*language)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, const char *language);
349 * keysym, state a wl_keyboard key_state. Modifiers are a mask for 353
350 * effective modifiers (where the modifier indices are set by the 354 /**
351 * modifiers_map event) 355 * text_direction - text direction
352 */ 356 * @serial: serial of the latest known text input state
353 void (*keysym)(void *data, 357 * @direction: (none)
354 struct wl_text_input *wl_text_input, 358 *
355 uint32_t serial, 359 * Sets the text direction of input text.
356 uint32_t time, 360 *
357 uint32_t sym, 361 * It is mainly needed for showing input cursor on correct side of
358 uint32_t state, 362 * the editor when there is no input yet done and making sure
359 uint32_t modifiers); 363 * neutral direction text is laid out properly.
360 /** 364 */
361 * language - language 365 void (*text_direction)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, uint32_t direction);
362 * @serial: serial of the latest known text input state
363 * @language: (none)
364 *
365 * Sets the language of the input text. The "language" argument
366 * is a RFC-3066 format language tag.
367 */
368 void (*language)(void *data,
369 struct wl_text_input *wl_text_input,
370 uint32_t serial,
371 const char *language);
372 /**
373 * text_direction - text direction
374 * @serial: serial of the latest known text input state
375 * @direction: (none)
376 *
377 * Sets the text direction of input text.
378 *
379 * It is mainly needed for showing input cursor on correct side of
380 * the editor when there is no input yet done and making sure
381 * neutral direction text is laid out properly.
382 */
383 void (*text_direction)(void *data,
384 struct wl_text_input *wl_text_input,
385 uint32_t serial,
386 uint32_t direction);
387}; 366};
388 367
389static inline int 368static inline int
390wl_text_input_add_listener(struct wl_text_input *wl_text_input, 369wl_text_input_add_listener(struct wl_text_input *wl_text_input, const struct wl_text_input_listener *listener, void *data)
391 const struct wl_text_input_listener *listener, void *data)
392{ 370{
393 return wl_proxy_add_listener((struct wl_proxy *) wl_text_input, 371 return wl_proxy_add_listener((struct wl_proxy *) wl_text_input,
394 (void (**)(void)) listener, data); 372 (void (**)(void)) listener, data);
395} 373}
396 374
397#define WL_TEXT_INPUT_ACTIVATE 0 375#define WL_TEXT_INPUT_ACTIVATE 0
398#define WL_TEXT_INPUT_DEACTIVATE 1 376#define WL_TEXT_INPUT_DEACTIVATE 1
399#define WL_TEXT_INPUT_SHOW_INPUT_PANEL 2 377#define WL_TEXT_INPUT_SHOW_INPUT_PANEL 2
400#define WL_TEXT_INPUT_HIDE_INPUT_PANEL 3 378#define WL_TEXT_INPUT_HIDE_INPUT_PANEL 3
401#define WL_TEXT_INPUT_RESET 4 379#define WL_TEXT_INPUT_RESET 4
402#define WL_TEXT_INPUT_SET_SURROUNDING_TEXT 5 380#define WL_TEXT_INPUT_SET_SURROUNDING_TEXT 5
403#define WL_TEXT_INPUT_SET_CONTENT_TYPE 6 381#define WL_TEXT_INPUT_SET_CONTENT_TYPE 6
404#define WL_TEXT_INPUT_SET_CURSOR_RECTANGLE 7 382#define WL_TEXT_INPUT_SET_CURSOR_RECTANGLE 7
405#define WL_TEXT_INPUT_SET_PREFERRED_LANGUAGE 8 383#define WL_TEXT_INPUT_SET_PREFERRED_LANGUAGE 8
406#define WL_TEXT_INPUT_COMMIT_STATE 9 384#define WL_TEXT_INPUT_COMMIT_STATE 9
407#define WL_TEXT_INPUT_INVOKE_ACTION 10 385#define WL_TEXT_INPUT_INVOKE_ACTION 10
408 386
409static inline void 387static inline void
410wl_text_input_set_user_data(struct wl_text_input *wl_text_input, void *user_data) 388wl_text_input_set_user_data(struct wl_text_input *wl_text_input, void *user_data)
411{ 389{
412 if (!wl_text_input) return; 390 if (!wl_text_input) return;
413 wl_proxy_set_user_data((struct wl_proxy *) wl_text_input, user_data); 391 wl_proxy_set_user_data((struct wl_proxy *) wl_text_input, user_data);
414} 392}
415 393
416static inline void * 394static inline void *
417wl_text_input_get_user_data(struct wl_text_input *wl_text_input) 395wl_text_input_get_user_data(struct wl_text_input *wl_text_input)
418{ 396{
419 if (!wl_text_input) return NULL; 397 if (!wl_text_input) return NULL;
420 return wl_proxy_get_user_data((struct wl_proxy *) wl_text_input); 398 return wl_proxy_get_user_data((struct wl_proxy *) wl_text_input);
421} 399}
422 400
423static inline void 401static inline void
424wl_text_input_destroy(struct wl_text_input *wl_text_input) 402wl_text_input_destroy(struct wl_text_input *wl_text_input)
425{ 403{
426 if (!wl_text_input) return; 404 if (!wl_text_input) return;
427 wl_proxy_destroy((struct wl_proxy *) wl_text_input); 405 wl_proxy_destroy((struct wl_proxy *) wl_text_input);
428} 406}
429 407
430static inline void 408static inline void
431wl_text_input_activate(struct wl_text_input *wl_text_input, struct wl_seat *seat, struct wl_surface *surface) 409wl_text_input_activate(struct wl_text_input *wl_text_input, struct wl_seat *seat, struct wl_surface *surface)
432{ 410{
433 if (!wl_text_input) return; 411 if (!wl_text_input) return;
434 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 412 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
435 WL_TEXT_INPUT_ACTIVATE, seat, surface); 413 WL_TEXT_INPUT_ACTIVATE, seat, surface);
436} 414}
437 415
438static inline void 416static inline void
439wl_text_input_deactivate(struct wl_text_input *wl_text_input, struct wl_seat *seat) 417wl_text_input_deactivate(struct wl_text_input *wl_text_input, struct wl_seat *seat)
440{ 418{
441 if (!wl_text_input) return; 419 if (!wl_text_input) return;
442 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 420 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
443 WL_TEXT_INPUT_DEACTIVATE, seat); 421 WL_TEXT_INPUT_DEACTIVATE, seat);
444} 422}
445 423
446static inline void 424static inline void
447wl_text_input_show_input_panel(struct wl_text_input *wl_text_input) 425wl_text_input_show_input_panel(struct wl_text_input *wl_text_input)
448{ 426{
449 if (!wl_text_input) return; 427 if (!wl_text_input) return;
450 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 428 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
451 WL_TEXT_INPUT_SHOW_INPUT_PANEL); 429 WL_TEXT_INPUT_SHOW_INPUT_PANEL);
452} 430}
453 431
454static inline void 432static inline void
455wl_text_input_hide_input_panel(struct wl_text_input *wl_text_input) 433wl_text_input_hide_input_panel(struct wl_text_input *wl_text_input)
456{ 434{
457 if (!wl_text_input) return; 435 if (!wl_text_input) return;
458 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 436 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
459 WL_TEXT_INPUT_HIDE_INPUT_PANEL); 437 WL_TEXT_INPUT_HIDE_INPUT_PANEL);
460} 438}
461 439
462static inline void 440static inline void
463wl_text_input_reset(struct wl_text_input *wl_text_input) 441wl_text_input_reset(struct wl_text_input *wl_text_input)
464{ 442{
465 if (!wl_text_input) return; 443 if (!wl_text_input) return;
466 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 444 wl_proxy_marshal((struct wl_proxy *) wl_text_input, WL_TEXT_INPUT_RESET);
467 WL_TEXT_INPUT_RESET);
468} 445}
469 446
470static inline void 447static inline void
471wl_text_input_set_surrounding_text(struct wl_text_input *wl_text_input, const char *text, uint32_t cursor, uint32_t anchor) 448wl_text_input_set_surrounding_text(struct wl_text_input *wl_text_input, const char *text, uint32_t cursor, uint32_t anchor)
472{ 449{
473 if (!wl_text_input) return; 450 if (!wl_text_input) return;
474 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 451 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
475 WL_TEXT_INPUT_SET_SURROUNDING_TEXT, text, cursor, anchor); 452 WL_TEXT_INPUT_SET_SURROUNDING_TEXT, text, cursor, anchor);
476} 453}
477 454
478static inline void 455static inline void
479wl_text_input_set_content_type(struct wl_text_input *wl_text_input, uint32_t hint, uint32_t purpose) 456wl_text_input_set_content_type(struct wl_text_input *wl_text_input, uint32_t hint, uint32_t purpose)
480{ 457{
481 if (!wl_text_input) return; 458 if (!wl_text_input) return;
482 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 459 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
483 WL_TEXT_INPUT_SET_CONTENT_TYPE, hint, purpose); 460 WL_TEXT_INPUT_SET_CONTENT_TYPE, hint, purpose);
484} 461}
485 462
486static inline void 463static inline void
487wl_text_input_set_cursor_rectangle(struct wl_text_input *wl_text_input, int32_t x, int32_t y, int32_t width, int32_t height) 464wl_text_input_set_cursor_rectangle(struct wl_text_input *wl_text_input, int32_t x, int32_t y, int32_t width, int32_t height)
488{ 465{
489 if (!wl_text_input) return; 466 if (!wl_text_input) return;
490 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 467 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
491 WL_TEXT_INPUT_SET_CURSOR_RECTANGLE, x, y, width, height); 468 WL_TEXT_INPUT_SET_CURSOR_RECTANGLE, x, y, width, height);
492} 469}
493 470
494static inline void 471static inline void
495wl_text_input_set_preferred_language(struct wl_text_input *wl_text_input, const char *language) 472wl_text_input_set_preferred_language(struct wl_text_input *wl_text_input, const char *language)
496{ 473{
497 if (!wl_text_input) return; 474 if (!wl_text_input) return;
498 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 475 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
499 WL_TEXT_INPUT_SET_PREFERRED_LANGUAGE, language); 476 WL_TEXT_INPUT_SET_PREFERRED_LANGUAGE, language);
500} 477}
501 478
502static inline void 479static inline void
503wl_text_input_commit_state(struct wl_text_input *wl_text_input, uint32_t serial) 480wl_text_input_commit_state(struct wl_text_input *wl_text_input, uint32_t serial)
504{ 481{
505 if (!wl_text_input) return; 482 if (!wl_text_input) return;
506 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 483 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
507 WL_TEXT_INPUT_COMMIT_STATE, serial); 484 WL_TEXT_INPUT_COMMIT_STATE, serial);
508} 485}
509 486
510static inline void 487static inline void
511wl_text_input_invoke_action(struct wl_text_input *wl_text_input, uint32_t button, uint32_t index) 488wl_text_input_invoke_action(struct wl_text_input *wl_text_input, uint32_t button, uint32_t index)
512{ 489{
513 if (!wl_text_input) return; 490 if (!wl_text_input) return;
514 wl_proxy_marshal((struct wl_proxy *) wl_text_input, 491 wl_proxy_marshal((struct wl_proxy *) wl_text_input,
515 WL_TEXT_INPUT_INVOKE_ACTION, button, index); 492 WL_TEXT_INPUT_INVOKE_ACTION, button, index);
516} 493}
517 494
518#define WL_TEXT_INPUT_MANAGER_CREATE_TEXT_INPUT 0 495#define WL_TEXT_INPUT_MANAGER_CREATE_TEXT_INPUT 0
@@ -521,39 +498,39 @@ static inline void
521wl_text_input_manager_set_user_data(struct wl_text_input_manager *wl_text_input_manager, void *user_data) 498wl_text_input_manager_set_user_data(struct wl_text_input_manager *wl_text_input_manager, void *user_data)
522{ 499{
523 if (!wl_text_input_manager) return; 500 if (!wl_text_input_manager) return;
524 wl_proxy_set_user_data((struct wl_proxy *) wl_text_input_manager, user_data); 501 wl_proxy_set_user_data((struct wl_proxy *) wl_text_input_manager,
502 user_data);
525} 503}
526 504
527static inline void * 505static inline void *
528wl_text_input_manager_get_user_data(struct wl_text_input_manager *wl_text_input_manager) 506wl_text_input_manager_get_user_data(struct wl_text_input_manager *wl_text_input_manager)
529{ 507{
530 if (!wl_text_input_manager) return NULL; 508 if (!wl_text_input_manager) return NULL;
531 return wl_proxy_get_user_data((struct wl_proxy *) wl_text_input_manager); 509 return wl_proxy_get_user_data((struct wl_proxy *) wl_text_input_manager);
532} 510}
533 511
534static inline void 512static inline void
535wl_text_input_manager_destroy(struct wl_text_input_manager *wl_text_input_manager) 513wl_text_input_manager_destroy(struct wl_text_input_manager *wl_text_input_manager)
536{ 514{
537 if (!wl_text_input_manager) return; 515 if (!wl_text_input_manager) return;
538 wl_proxy_destroy((struct wl_proxy *) wl_text_input_manager); 516 wl_proxy_destroy((struct wl_proxy *) wl_text_input_manager);
539} 517}
540 518
541static inline struct wl_text_input * 519static inline struct wl_text_input *
542wl_text_input_manager_create_text_input(struct wl_text_input_manager *wl_text_input_manager) 520wl_text_input_manager_create_text_input(struct wl_text_input_manager *wl_text_input_manager)
543{ 521{
544 struct wl_proxy *id; 522 struct wl_proxy *id;
545 523
546 if (!wl_text_input_manager) return NULL; 524 if (!wl_text_input_manager) return NULL;
547 525
548 id = wl_proxy_create((struct wl_proxy *) wl_text_input_manager, 526 id = wl_proxy_create((struct wl_proxy *) wl_text_input_manager,
549 &wl_text_input_interface); 527 &wl_text_input_interface);
550 if (!id) 528 if (!id) return NULL;
551 return NULL;
552 529
553 wl_proxy_marshal((struct wl_proxy *) wl_text_input_manager, 530 wl_proxy_marshal((struct wl_proxy *) wl_text_input_manager,
554 WL_TEXT_INPUT_MANAGER_CREATE_TEXT_INPUT, id); 531 WL_TEXT_INPUT_MANAGER_CREATE_TEXT_INPUT, id);
555 532
556 return (struct wl_text_input *) id; 533 return (struct wl_text_input *) id;
557} 534}
558 535
559#ifdef __cplusplus 536#ifdef __cplusplus