2 * Copyright (c) 2014-2021 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_UIX_INPUTMETHOD_INTERNAL_H__
18 #define __TIZEN_UIX_INPUTMETHOD_INTERNAL_H__
21 * @file inputmethod_internal.h
22 * @brief This file contains input method internal APIs and related enumeration.
34 * @brief Enumeration for input method optimization hint.
39 IME_OPTIMIZATION_HINT_NONE = 0, /**< No hint provided */
40 IME_OPTIMIZATION_HINT_SHOW_PREPARE, /**< This IME is going to be displayed on screen soon */
41 } ime_optimization_hint_e;
43 typedef struct _ime_context *ime_context_h;
46 * @brief Called when an caps mode is changed.
50 * @privilege %http://tizen.org/privilege/ime
52 * @param[in] mode caps mode
53 * @param[in] user_data User data to be passed from the callback registration function
55 typedef void (*ime_caps_mode_changed_cb)(int mode, void *user_data);
58 * @brief Called when a candidate list provided by IMEngine should be shown.
62 * @privilege %http://tizen.org/privilege/ime
64 * @param[in] context_id The input context identification value of an associated text input UI control
65 * @param[in] user_data User data to be passed from the callback registration function
67 typedef void (*ime_candidate_show_cb)(int context_id, void *user_data);
70 * @brief Called when a candidate list provided by IMEngine should be hidden.
74 * @privilege %http://tizen.org/privilege/ime
76 * @param[in] context_id The input context identification value of an associated text input UI control
77 * @param[in] user_data User data to be passed from the callback registration function
79 typedef void (*ime_candidate_hide_cb)(int context_id, void *user_data);
82 * @brief Called when a candidate list provided by IMEngine is changed.
86 * @privilege %http://tizen.org/privilege/ime
88 * @remarks @a list should not be released.
90 * @param[in] list candidate list
91 * @param[in] user_data User data to be passed from the callback registration function
93 typedef void (*ime_lookup_table_changed_cb)(Eina_List *list, void *user_data);
96 * @brief Called when a optimization hint value is set.
100 * @privilege %http://tizen.org/privilege/ime
102 * @param[in] hint The hint value used for optimization
103 * @param[in] user_data User data to be passed from the callback registration function
105 typedef void (*ime_optimization_hint_set_cb)(ime_optimization_hint_e hint, void *user_data);
108 * @brief Called when a key event is received from external devices or ime_send_key_event().
112 * @privilege %http://tizen.org/privilege/ime
114 * @param[in] key The key event of the keyboard
115 * @param[in] user_data User data to be passed from the callback registration function
117 typedef void (*ime_process_key_event_with_imengine_cb)(scim::KeyEvent &key, uint32_t serial, void *user_data);
120 * @brief Called when a autocapital type is set.
124 * @privilege %http://tizen.org/privilege/ime
126 * @param[in] type The autocapital type to be set to the input panel
127 * @param[in] user_data User data to be passed to the callback function
129 typedef void (*ime_autocapital_type_set_cb)(uint32_t type, void *user_data);
132 * @brief Called when a prediction allow is set.
136 * @privilege %http://tizen.org/privilege/ime
138 * @param[in] prediction_allow The prediction allow to be set to the input panel
139 * @param[in] user_data User data to be passed to the callback function
141 typedef void (*ime_prediction_allow_set_cb)(uint32_t prediction_allow, void *user_data);
144 * @brief Called when a trigger property value is set.
148 * @privilege %http://tizen.org/privilege/ime
150 * @param[in] property The trigger property
151 * @param[in] user_data User data to be passed to the callback function
153 typedef void (*ime_trigger_property_set_cb)(const char *property, void *user_data);
156 * @brief Called when a candidate more window is shown.
160 * @privilege %http://tizen.org/privilege/ime
162 * @param[in] user_data User data to be passed to the callback function
164 typedef void (*ime_candidate_more_window_show_cb)(void *user_data);
167 * @brief Called when a candidate more window is hidden.
171 * @privilege %http://tizen.org/privilege/ime
173 * @param[in] user_data User data to be passed to the callback function
175 typedef void (*ime_candidate_more_window_hide_cb)(void *user_data);
178 * @brief Called when an AUX item is selected.
182 * @privilege %http://tizen.org/privilege/ime
184 * @param[in] item The AUX item
185 * @param[in] user_data User data to be passed to the callback function
187 typedef void (*ime_aux_select_cb)(uint32_t item, void *user_data);
190 * @brief Called when a candidate item is selected.
194 * @privilege %http://tizen.org/privilege/ime
196 * @param[in] item The cadidate item
197 * @param[in] user_data User data to be passed to the callback function
199 typedef void (*ime_candidate_select_cb)(uint32_t item, void *user_data);
202 * @brief Called when a candidate table page is up.
206 * @privilege %http://tizen.org/privilege/ime
208 * @param[in] user_data User data to be passed to the callback function
210 typedef void (*ime_candidate_table_page_up_cb)(void *user_data);
213 * @brief Called when a candidate table page is down.
217 * @privilege %http://tizen.org/privilege/ime
219 * @param[in] user_data User data to be passed to the callback function
221 typedef void (*ime_candidate_table_page_down_cb)(void *user_data);
224 * @brief Called when a page size of the candidate window is changed.
228 * @privilege %http://tizen.org/privilege/ime
230 * @param[in] size The page size of the candidate window
231 * @param[in] user_data User data to be passed from the callback registration function
233 typedef void (*ime_candidate_table_page_size_chaned_cb)(uint32_t size, void *user_data);
236 * @brief Called when a candidate item layout is set.
240 * @privilege %http://tizen.org/privilege/ime
242 * @param[in] item The candidate item layout
243 * @param[in] user_data User data to be passed to the callback function
245 typedef void (*ime_candidate_item_layout_set_cb)(std::vector<uint32_t> item, void *user_data);
248 * @brief Called when a displayed candidate number is changed.
252 * @privilege %http://tizen.org/privilege/ime
254 * @param[in] page_num The displayed candidate number
255 * @param[in] user_data User data to be passed from the callback registration function
257 typedef void (*ime_displayed_candidate_number_chaned_cb)(uint32_t page_num, void *user_data);
260 * @brief Called when the candidate item is long pressed.
264 * @privilege %http://tizen.org/privilege/ime
266 * @param[in] index The index of the candidate item
267 * @param[in] user_data User data to be passed from the callback registration function
269 typedef void (*ime_candidate_item_long_pressed_cb)(uint32_t index, void *user_data);
272 * @brief Sets @c ime_caps_mode_changed_cb() event callback function.
276 * @privilege %http://tizen.org/privilege/ime
278 * @remarks The ime_caps_mode_changed_cb() callback function is called when an associated text input
279 * UI control sends the change of caps mode.
281 * @param[in] callback_func @c ime_caps_mode_changed_cb() event callback function
282 * @param[in] user_data User data to be passed to the callback function
284 * @return 0 on success, otherwise a negative error value
285 * @retval #IME_ERROR_NONE No error
286 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
287 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
288 * @retval #IME_ERROR_OPERATION_FAILED Operation failed
290 * @post The ime_run() function should be called to start to run IME application's main loop.
294 int ime_event_set_caps_mode_changed_cb(ime_caps_mode_changed_cb callback_func, void *user_data);
297 * @brief Sets @c ime_candidate_show_cb() event callback function.
301 * @privilege %http://tizen.org/privilege/ime
303 * @param[in] callback_func @c ime_candidate_show_cb() event callback function
304 * @param[in] user_data User data to be passed to the callback function
306 * @return 0 on success, otherwise a negative error value
307 * @retval #IME_ERROR_NONE No error
308 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
309 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
310 * @retval #IME_ERROR_OPERATION_FAILED Operation failed
312 * @post The ime_run() function should be called to start to run IME application's main loop.
316 int ime_event_set_candidate_show_cb(ime_candidate_show_cb callback_func, void *user_data);
318 int ime_event_set_candidate_hide_cb(ime_candidate_hide_cb callback_func, void *user_data);
321 * @brief Sets @c ime_lookup_table_changed_cb() event callback function.
325 * @privilege %http://tizen.org/privilege/ime
327 * @remarks The ime_lookup_table_changed_cb() callback function is called when an associated text input
328 * UI control sends the change of caps mode.
330 * @param[in] callback_func @c ime_lookup_table_changed_cb() event callback function
331 * @param[in] user_data User data to be passed to the callback function
333 * @return 0 on success, otherwise a negative error value
334 * @retval #IME_ERROR_NONE No error
335 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
336 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
337 * @retval #IME_ERROR_OPERATION_FAILED Operation failed
339 * @post The ime_run() function should be called to start to run IME application's main loop.
343 int ime_event_set_lookup_table_changed_cb(ime_lookup_table_changed_cb callback_func, void *user_data);
346 * @brief Gets the caps mode information from the given input context.
348 * @details Each edit field has various attributes for input panel. This function can be
349 * called to get the caps mode information in ime_show_cb() callback function.
353 * @privilege %http://tizen.org/privilege/ime
355 * @param[in] context The input context information of an associated text input UI control
356 * @param[out] caps_mode Caps mode information \n @c true to turn on shift mode
357 * text feature if available, @c false to disable the predictive text feature
359 * @return 0 on success, otherwise a negative error value
360 * @retval #IME_ERROR_NONE No error
361 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
362 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
363 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
365 * @post Input panel UI should be drawn or operated by this information accordingly.
369 int ime_context_get_caps_mode(ime_context_h context, bool *caps_mode);
372 * @brief Sets keyboard engine.
376 * @privilege %http://tizen.org/privilege/ime
378 * @param[in] engine_id The engine UUID
380 * @return 0 on success, otherwise a negative error value
381 * @retval #IME_ERROR_NONE No error
382 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
383 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
384 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
386 int ime_set_imengine(const char *engine_id);
389 * @brief Flushes state in Input Method engine.
393 * @privilege %http://tizen.org/privilege/ime
395 * @return 0 on success, otherwise a negative error value
396 * @retval #IME_ERROR_NONE No error
397 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
398 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
400 int ime_flush_imengine(void);
403 * @brief Resets state in Input Method engine.
407 * @privilege %http://tizen.org/privilege/ime
409 * @return 0 on success, otherwise a negative error value
410 * @retval #IME_ERROR_NONE No error
411 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
412 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
414 int ime_reset_imengine(void);
417 * @brief Send an Event to IMEngine.
421 * @privilege %http://tizen.org/privilege/ime
423 * @param[in] command The command to be sent.
424 * @param[in] value The value corresponding to the command.
426 * @return 0 on success, otherwise a negative error value
427 * @retval #IME_ERROR_NONE No error
428 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
430 int ime_send_imengine_event(int command, unsigned int value);
433 * @brief Sends the selected item index in the candidate list.
437 * @privilege %http://tizen.org/privilege/ime
439 * @param[in] index the selected index in the candidate list
441 * @return 0 on success, otherwise a negative error value
442 * @retval #IME_ERROR_NONE No error
443 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
444 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
446 int ime_select_candidate(unsigned int index);
449 * @brief Sends the input context event.
453 * @privilege %http://tizen.org/privilege/ime
455 * @param[in] type the event type
456 * @param[in] value the event value
458 * @return 0 on success, otherwise a negative error value
459 * @retval #IME_ERROR_NONE No error
460 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
461 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
463 int ime_update_input_context(unsigned int type, unsigned int value);
466 * @brief Requests IME to initialize explicitly.
468 * @details When using ime_run() API, the initialize / prepare / finalize procedures
469 * are processed automatically inside the IME application loop.
470 * But in case of not using ime_run() API, which means the IME application has
471 * its own main loop, these procedures need to be requested explicitly.
475 * @privilege %http://tizen.org/privilege/ime
477 * @return 0 on success, otherwise a negative error value
478 * @retval #IME_ERROR_NONE No error
479 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
481 int ime_initialize(void);
484 * @brief Requests IME to prepare resources such as IME window and socket connection.
486 * @details Like ime_initialize() function, this procedure is automatically processed
487 * when using ime_run() API. Call this function only when ime_run() is not used and
488 * the IME application has to handle main loop by itself.
492 * @privilege %http://tizen.org/privilege/ime
494 * @return 0 on success, otherwise a negative error value
495 * @retval #IME_ERROR_NONE No error
496 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
497 * @retval #IME_ERROR_OPERATION_FAILED Operation failed
499 int ime_prepare(void);
502 * @brief Requests IME to finalize explicitly.
506 * @privilege %http://tizen.org/privilege/ime
508 * @return 0 on success, otherwise a negative error value
509 * @retval #IME_ERROR_NONE No error
510 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
512 int ime_finalize(void);
515 * @brief Sets flag whether IME is called from dotnet.
519 * @privilege %http://tizen.org/privilege/ime
521 * @param[in] set Set with Dotnet mode
522 * @return 0 on success, otherwise a negative error value
523 * @retval #IME_ERROR_NONE No error
524 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
526 int ime_set_dotnet_flag(bool set);
529 * @brief Sets flag whether creating IME window should be deferred until there is a access request.
533 * @privilege %http://tizen.org/privilege/ime
535 * @param[in] flag true if deferring window creation is desired
536 * @return 0 on success, otherwise a negative error value
537 * @retval #IME_ERROR_NONE No error
538 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
540 int ime_set_window_creation_defer_flag(bool flag);
543 * @brief Sets @c ime_optimization_hint_set_cb() event callback function.
547 * @privilege %http://tizen.org/privilege/ime
549 * @remarks The ime_optimization_hint_set_cb() callback function is called when an optimization hint is set
551 * @param[in] callback_func @c ime_optimization_hint_set_cb() event callback function
552 * @param[in] user_data User data to be passed to the callback function
554 * @return 0 on success, otherwise a negative error value
555 * @retval #IME_ERROR_NONE No error
556 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
557 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
558 * @retval #IME_ERROR_OPERATION_FAILED Operation failed
560 * @post The ime_run() function should be called to start to run IME application's main loop.
564 int ime_event_set_optimization_hint_set_cb(ime_optimization_hint_set_cb callback_func, void *user_data);
567 * @brief Sets @c ime_process_key_event_with_imengine_cb() event callback function.
571 * @privilege %http://tizen.org/privilege/ime
573 * @remarks The ime_process_key_event_cb() callback function is called when the key event
574 * is received from the external keyboard devices or ime_send_key_event() function.
576 * @param[in] callback_func @c ime_process_key_event_with_imengine_cb() event callback function
577 * @param[in] user_data User data to be passed to the callback function
579 * @return 0 on success, otherwise a negative error value
580 * @retval #IME_ERROR_NONE No error
581 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
582 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
584 * @post The ime_run() function should be called to start to run IME application's main loop.
588 int ime_event_set_process_key_event_with_imengine_cb(ime_process_key_event_with_imengine_cb callback_func, void *user_data);
591 * @brief Sets @c ime_autocapital_type_set_cb() event callback function.
595 * @privilege %http://tizen.org/privilege/ime
597 * @remarks The ime_autocapital_type_set_cb() callback function is called when an optimization hint is set
599 * @param[in] callback_func @c ime_autocapital_type_set_cb() event callback function
600 * @param[in] user_data User data to be passed to the callback function
602 * @return 0 on success, otherwise a negative error value
603 * @retval #IME_ERROR_NONE No error
604 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
605 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
607 * @post The ime_run() function should be called to start to run IME application's main loop.
611 int ime_event_set_autocapital_type_set_cb(ime_autocapital_type_set_cb callback_func, void *user_data);
614 * @brief Sets @c ime_prediction_allow_set_cb() event callback function.
618 * @privilege %http://tizen.org/privilege/ime
620 * @remarks The ime_prediction_allow_set_cb() callback function is called when an optimization hint is set
622 * @param[in] callback_func @c ime_prediction_allow_set_cb() event callback function
623 * @param[in] user_data User data to be passed to the callback function
625 * @return 0 on success, otherwise a negative error value
626 * @retval #IME_ERROR_NONE No error
627 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
628 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
630 * @post The ime_run() function should be called to start to run IME application's main loop.
634 int ime_event_set_prediction_allow_set_cb(ime_prediction_allow_set_cb callback_func, void *user_data);
637 * @brief Sets @c ime_trigger_property_set_cb() event callback function.
641 * @privilege %http://tizen.org/privilege/ime
643 * @param[in] callback_func @c ime_trigger_property_set_cb() event callback function
644 * @param[in] user_data User data to be passed to the callback function
646 * @return 0 on success, otherwise a negative error value
647 * @retval #IME_ERROR_NONE No error
648 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
649 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
651 * @post The ime_run() function should be called to start to run IME application's main loop.
655 int ime_event_set_trigger_property_set_cb(ime_trigger_property_set_cb callback_func, void *user_data);
658 * @brief Sets @c ime_candidate_more_window_show_cb() event callback function.
662 * @privilege %http://tizen.org/privilege/ime
664 * @param[in] callback_func @c ime_candidate_more_window_show_cb() event callback function
665 * @param[in] user_data User data to be passed to the callback function
667 * @return 0 on success, otherwise a negative error value
668 * @retval #IME_ERROR_NONE No error
669 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
670 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
672 * @post The ime_run() function should be called to start to run IME application's main loop.
676 int ime_event_set_candidate_more_window_show_cb(ime_candidate_more_window_show_cb callback_func, void *user_data);
679 * @brief Sets @c ime_candidate_more_window_hide_cb() event callback function.
683 * @privilege %http://tizen.org/privilege/ime
685 * @param[in] callback_func @c ime_candidate_more_window_hide_cb() event callback function
686 * @param[in] user_data User data to be passed to the callback function
688 * @return 0 on success, otherwise a negative error value
689 * @retval #IME_ERROR_NONE No error
690 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
691 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
693 * @post The ime_run() function should be called to start to run IME application's main loop.
697 int ime_event_set_candidate_more_window_hide_cb(ime_candidate_more_window_hide_cb callback_func, void *user_data);
700 * @brief Sets @c ime_aux_select_cb() event callback function.
704 * @privilege %http://tizen.org/privilege/ime
706 * @param[in] callback_func @c ime_aux_select_cb() event callback function
707 * @param[in] user_data User data to be passed to the callback function
709 * @return 0 on success, otherwise a negative error value
710 * @retval #IME_ERROR_NONE No error
711 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
712 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
714 * @post The ime_run() function should be called to start to run IME application's main loop.
718 int ime_event_set_aux_select_cb(ime_aux_select_cb callback_func, void *user_data);
721 * @brief Sets @c ime_candidate_select_cb() event callback function.
725 * @privilege %http://tizen.org/privilege/ime
727 * @param[in] callback_func @c ime_candidate_select_cb() event callback function
728 * @param[in] user_data User data to be passed to the callback function
730 * @return 0 on success, otherwise a negative error value
731 * @retval #IME_ERROR_NONE No error
732 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
733 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
735 * @post The ime_run() function should be called to start to run IME application's main loop.
739 int ime_event_set_candidate_select_cb(ime_candidate_select_cb callback_func, void *user_data);
742 * @brief Sets @c ime_candidate_table_page_up_cb() event callback function.
746 * @privilege %http://tizen.org/privilege/ime
748 * @param[in] callback_func @c ime_candidate_table_page_up_cb() event callback function
749 * @param[in] user_data User data to be passed to the callback function
751 * @return 0 on success, otherwise a negative error value
752 * @retval #IME_ERROR_NONE No error
753 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
754 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
756 * @post The ime_run() function should be called to start to run IME application's main loop.
760 int ime_event_set_candidate_table_page_up_cb(ime_candidate_table_page_up_cb callback_func, void *user_data);
763 * @brief Sets @c ime_candidate_table_page_down_cb() event callback function.
767 * @privilege %http://tizen.org/privilege/ime
769 * @param[in] callback_func @c ime_candidate_table_page_down_cb() event callback function
770 * @param[in] user_data User data to be passed to the callback function
772 * @return 0 on success, otherwise a negative error value
773 * @retval #IME_ERROR_NONE No error
774 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
775 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
777 * @post The ime_run() function should be called to start to run IME application's main loop.
781 int ime_event_set_candidate_table_page_down_cb(ime_candidate_table_page_down_cb callback_func, void *user_data);
784 * @brief Sets @c ime_candidate_table_page_size_chaned_cb() event callback function.
788 * @privilege %http://tizen.org/privilege/ime
790 * @param[in] callback_func @c ime_candidate_table_page_size_chaned_cb() event callback function
791 * @param[in] user_data User data to be passed to the callback function
793 * @return 0 on success, otherwise a negative error value
794 * @retval #IME_ERROR_NONE No error
795 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
796 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
798 * @post The ime_run() function should be called to start to run IME application's main loop.
802 int ime_event_set_candidate_table_page_size_chaned_cb(ime_candidate_table_page_size_chaned_cb callback_func, void *user_data);
805 * @brief Sets @c ime_candidate_item_layout_set_cb() event callback function.
809 * @privilege %http://tizen.org/privilege/ime
811 * @param[in] callback_func @c ime_candidate_item_layout_set_cb() event callback function
812 * @param[in] user_data User data to be passed to the callback function
814 * @return 0 on success, otherwise a negative error value
815 * @retval #IME_ERROR_NONE No error
816 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
817 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
819 * @post The ime_run() function should be called to start to run IME application's main loop.
823 int ime_event_set_candidate_item_layout_set_cb(ime_candidate_item_layout_set_cb callback_func, void *user_data);
826 * @brief Sets @c ime_displayed_candidate_number_chaned_cb() event callback function.
830 * @privilege %http://tizen.org/privilege/ime
832 * @param[in] callback_func @c ime_displayed_candidate_number_chaned_cb() event callback function
833 * @param[in] user_data User data to be passed to the callback function
835 * @return 0 on success, otherwise a negative error value
836 * @retval #IME_ERROR_NONE No error
837 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
838 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
840 * @post The ime_run() function should be called to start to run IME application's main loop.
844 int ime_event_set_displayed_candidate_number_chaned_cb(ime_displayed_candidate_number_chaned_cb callback_func, void *user_data);
847 * @brief Sets @c ime_candidate_item_long_pressed_cb() event callback function.
851 * @privilege %http://tizen.org/privilege/ime
853 * @param[in] callback_func @c ime_candidate_item_long_pressed_cb() event callback function
854 * @param[in] user_data User data to be passed to the callback function
856 * @return 0 on success, otherwise a negative error value
857 * @retval #IME_ERROR_NONE No error
858 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
859 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
861 * @post The ime_run() function should be called to start to run IME application's main loop.
865 int ime_event_set_candidate_item_long_pressed_cb(ime_candidate_item_long_pressed_cb callback_func, void *user_data);
868 * @brief Requests to show aux string.
872 * @privilege %http://tizen.org/privilege/ime
874 * @return 0 on success, otherwise a negative error value
875 * @retval #IME_ERROR_NONE No error
876 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
878 int ime_show_aux_string(void);
881 * @brief Requests to hide aux string.
885 * @privilege %http://tizen.org/privilege/ime
887 * @return 0 on success, otherwise a negative error value
888 * @retval #IME_ERROR_NONE No error
889 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
891 int ime_hide_aux_string(void);
894 * @brief Requests to show lookup table.
898 * @privilege %http://tizen.org/privilege/ime
900 * @return 0 on success, otherwise a negative error value
901 * @retval #IME_ERROR_NONE No error
902 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
904 int ime_show_lookup_table(void);
907 * @brief Requests to hide lookup table.
911 * @privilege %http://tizen.org/privilege/ime
913 * @return 0 on success, otherwise a negative error value
914 * @retval #IME_ERROR_NONE No error
915 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
917 int ime_hide_lookup_table(void);
920 * @brief Requests to update preedit caret.
924 * @privilege %http://tizen.org/privilege/ime
926 * @param[in] caret The preedit caret
928 * @return 0 on success, otherwise a negative error value
929 * @retval #IME_ERROR_NONE No error
930 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
931 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
933 int ime_update_preedit_caret(int caret);
936 * @brief Requests to update preedit string with commit string.
940 * @privilege %http://tizen.org/privilege/ime
942 * @param[in] preedit The UTF-8 string to be updated in preedit
943 * @param[in] commit The UTF-8 string to be committed
944 * @param[in] attrs @a preedit can be composed of multiple string attributes: underline, highlight color and reversal color
945 * @param[in] caret The preedit caret
947 * @return 0 on success, otherwise a negative error value
948 * @retval #IME_ERROR_NONE No error
949 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
950 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
952 int ime_update_preedit_string_with_commit(const char *preedit, const char *commit, scim::AttributeList &attrs, int caret);
955 * @brief Requests to update aux string.
959 * @privilege %http://tizen.org/privilege/ime
961 * @param[in] str The aux string
963 * @return 0 on success, otherwise a negative error value
964 * @retval #IME_ERROR_NONE No error
965 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
966 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
968 int ime_update_aux_string(const char *str);
971 * @brief Requests to update recapture string.
975 * @privilege %http://tizen.org/privilege/ime
977 * @param[in] offset The offset value from the cursor position
978 * @param[in] len The length of the preedit
979 * @param[in] preedit The UTF-8 string to be updated in preedit
980 * @param[in] commit The UTF-8 string to be committed
981 * @param[in] attrs @a preedit can be composed of multiple string attributes: underline, highlight color and reversal color
983 * @return 0 on success, otherwise a negative error value
984 * @retval #IME_ERROR_NONE No error
985 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
986 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
988 int ime_recapture_string(int offset, int len, const char *preedit, const char *commit, scim::AttributeList &attrs);
991 * @brief Requests to update lookup table.
995 * @privilege %http://tizen.org/privilege/ime
997 * @param[in] table The lookup table
999 * @return 0 on success, otherwise a negative error value
1000 * @retval #IME_ERROR_NONE No error
1001 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1003 int ime_update_lookup_table(scim::LookupTable &table);
1006 * @brief Requests to register properties.
1010 * @privilege %http://tizen.org/privilege/ime
1012 * @param[in] properties The property list
1014 * @return 0 on success, otherwise a negative error value
1015 * @retval #IME_ERROR_NONE No error
1016 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1018 int ime_register_properties(scim::PropertyList &properties);
1021 * @brief Requests to update property.
1025 * @privilege %http://tizen.org/privilege/ime
1027 * @param[in] property The imengine property
1029 * @return 0 on success, otherwise a negative error value
1030 * @retval #IME_ERROR_NONE No error
1031 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1033 int ime_update_property(scim::Property &property);
1036 * @brief Requests to expand candidate.
1040 * @privilege %http://tizen.org/privilege/ime
1042 * @return 0 on success, otherwise a negative error value
1043 * @retval #IME_ERROR_NONE No error
1044 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1046 int ime_expand_candidate(void);
1049 * @brief Requests to contract candidate.
1053 * @privilege %http://tizen.org/privilege/ime
1055 * @return 0 on success, otherwise a negative error value
1056 * @retval #IME_ERROR_NONE No error
1057 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1059 int ime_contract_candidate(void);
1062 * @brief Requests to set candidate style.
1066 * @privilege %http://tizen.org/privilege/ime
1068 * @param[in] portrait_line The candidate portrait line
1069 * @param[in] mode The candidate mode
1071 * @return 0 on success, otherwise a negative error value
1072 * @retval #IME_ERROR_NONE No error
1073 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1074 * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
1076 int ime_set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
1079 * @brief Sets flag whether IMEngine is loaded by engine_loader.
1083 * @privilege %http://tizen.org/privilege/ime
1085 * @param[in] flag Set with Engine Loader mode
1086 * @return 0 on success, otherwise a negative error value
1087 * @retval #IME_ERROR_NONE No error
1088 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1089 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
1091 int ime_set_engine_loader_flag(bool flag);
1094 * @brief Sends the key event processing result.
1098 * @privilege %http://tizen.org/privilege/ime
1100 * @param[in] is_success The result value to be sent, indicating whether the key event processing succeeded or not
1101 * @return 0 on success, otherwise a negative error value
1102 * @retval #IME_ERROR_NONE No error
1103 * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
1104 * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
1106 int ime_send_key_event_processing_result(scim::KeyEvent &key, uint32_t serial, bool is_success);
1112 #endif /* __TIZEN_UIX_INPUTMETHOD_INTERNAL_H__ */