diff options
Diffstat (limited to 'src/androidgui.h')
| -rw-r--r-- | src/androidgui.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/androidgui.h b/src/androidgui.h index 1f0d34e67aa..25dc6754fff 100644 --- a/src/androidgui.h +++ b/src/androidgui.h | |||
| @@ -235,6 +235,7 @@ enum android_event_type | |||
| 235 | ANDROID_DEICONIFIED, | 235 | ANDROID_DEICONIFIED, |
| 236 | ANDROID_CONTEXT_MENU, | 236 | ANDROID_CONTEXT_MENU, |
| 237 | ANDROID_EXPOSE, | 237 | ANDROID_EXPOSE, |
| 238 | ANDROID_INPUT_METHOD, | ||
| 238 | }; | 239 | }; |
| 239 | 240 | ||
| 240 | struct android_any_event | 241 | struct android_any_event |
| @@ -419,6 +420,52 @@ struct android_menu_event | |||
| 419 | int menu_event_id; | 420 | int menu_event_id; |
| 420 | }; | 421 | }; |
| 421 | 422 | ||
| 423 | enum android_ime_operation | ||
| 424 | { | ||
| 425 | ANDROID_IME_COMMIT_TEXT, | ||
| 426 | ANDROID_IME_DELETE_SURROUNDING_TEXT, | ||
| 427 | ANDROID_IME_FINISH_COMPOSING_TEXT, | ||
| 428 | ANDROID_IME_SET_COMPOSING_TEXT, | ||
| 429 | ANDROID_IME_SET_COMPOSING_REGION, | ||
| 430 | ANDROID_IME_SET_POINT, | ||
| 431 | ANDROID_IME_START_BATCH_EDIT, | ||
| 432 | ANDROID_IME_END_BATCH_EDIT, | ||
| 433 | }; | ||
| 434 | |||
| 435 | struct android_ime_event | ||
| 436 | { | ||
| 437 | /* Type of the event. */ | ||
| 438 | enum android_event_type type; | ||
| 439 | |||
| 440 | /* The event serial. */ | ||
| 441 | unsigned long serial; | ||
| 442 | |||
| 443 | /* The associated window. */ | ||
| 444 | android_window window; | ||
| 445 | |||
| 446 | /* What operation is being performed. */ | ||
| 447 | enum android_ime_operation operation; | ||
| 448 | |||
| 449 | /* The details of the operation. START and END provide buffer | ||
| 450 | indices, and may actually mean ``left'' and ``right''. */ | ||
| 451 | ptrdiff_t start, end, position; | ||
| 452 | |||
| 453 | /* The number of characters in TEXT. */ | ||
| 454 | size_t length; | ||
| 455 | |||
| 456 | /* TEXT is either NULL, or a pointer to LENGTH bytes of malloced | ||
| 457 | UTF-16 encoded text that must be decoded by Emacs. | ||
| 458 | |||
| 459 | POSITION is where point should end up after the text is | ||
| 460 | committed, relative to TEXT. If POSITION is less than 0, it is | ||
| 461 | relative to TEXT's start; otherwise, it is relative to its | ||
| 462 | end. */ | ||
| 463 | unsigned short *text; | ||
| 464 | |||
| 465 | /* Value to set the counter to after the operation completes. */ | ||
| 466 | unsigned long counter; | ||
| 467 | }; | ||
| 468 | |||
| 422 | union android_event | 469 | union android_event |
| 423 | { | 470 | { |
| 424 | enum android_event_type type; | 471 | enum android_event_type type; |
| @@ -447,6 +494,9 @@ union android_event | |||
| 447 | 494 | ||
| 448 | /* This is only used to transmit selected menu items. */ | 495 | /* This is only used to transmit selected menu items. */ |
| 449 | struct android_menu_event menu; | 496 | struct android_menu_event menu; |
| 497 | |||
| 498 | /* This is used to dispatch input method editing requests. */ | ||
| 499 | struct android_ime_event ime; | ||
| 450 | }; | 500 | }; |
| 451 | 501 | ||
| 452 | enum | 502 | enum |
| @@ -463,6 +513,13 @@ enum android_lookup_status | |||
| 463 | ANDROID_LOOKUP_BOTH, | 513 | ANDROID_LOOKUP_BOTH, |
| 464 | }; | 514 | }; |
| 465 | 515 | ||
| 516 | enum android_ic_mode | ||
| 517 | { | ||
| 518 | ANDROID_IC_MODE_NULL = 0, | ||
| 519 | ANDROID_IC_MODE_ACTION = 1, | ||
| 520 | ANDROID_IC_MODE_TEXT = 2, | ||
| 521 | }; | ||
| 522 | |||
| 466 | extern int android_pending (void); | 523 | extern int android_pending (void); |
| 467 | extern void android_next_event (union android_event *); | 524 | extern void android_next_event (union android_event *); |
| 468 | 525 | ||
| @@ -554,6 +611,9 @@ extern void android_sync (void); | |||
| 554 | extern int android_wc_lookup_string (android_key_pressed_event *, | 611 | extern int android_wc_lookup_string (android_key_pressed_event *, |
| 555 | wchar_t *, int, int *, | 612 | wchar_t *, int, int *, |
| 556 | enum android_lookup_status *); | 613 | enum android_lookup_status *); |
| 614 | extern void android_update_ic (android_window, ptrdiff_t, ptrdiff_t, | ||
| 615 | ptrdiff_t, ptrdiff_t); | ||
| 616 | extern void android_reset_ic (android_window, enum android_ic_mode); | ||
| 557 | 617 | ||
| 558 | #endif | 618 | #endif |
| 559 | 619 | ||