Tizen Native API
5.5
|
The Input Method API provides the functions for starting IME application lifecycle, methods to interact with current UI state of IME, and getting attributes/events.
Required Header
#include <inputmethod.h>
Overview
Input method editor (IME) is an input panel that lets users provide input and the platform receive the text data entered. Custom keyboards can be built according to the application's necessity by these API sets. Tizen provides a framework to create such input method editors. Such extra input methods can be selected from Settings.
Functions | |
int | ime_run (ime_callback_s *basic_cb, void *user_data) |
Runs the main loop of IME application. | |
int | ime_event_set_focus_in_cb (ime_focus_in_cb callback_func, void *user_data) |
Sets focus_in event callback function. | |
int | ime_event_set_focus_out_cb (ime_focus_out_cb callback_func, void *user_data) |
Sets focus_out event callback function. | |
int | ime_event_set_surrounding_text_updated_cb (ime_surrounding_text_updated_cb callback_func, void *user_data) |
Sets surrounding_text_updated event callback function. | |
int | ime_event_set_input_context_reset_cb (ime_input_context_reset_cb callback_func, void *user_data) |
Sets input_context_reset event callback function. | |
int | ime_event_set_cursor_position_updated_cb (ime_cursor_position_updated_cb callback_func, void *user_data) |
Sets cursor_position_updated event callback function. | |
int | ime_event_set_language_requested_cb (ime_language_requested_cb callback_func, void *user_data) |
Sets language_requested event callback function. | |
int | ime_event_set_language_set_cb (ime_language_set_cb callback_func, void *user_data) |
Sets language_set event callback function. | |
int | ime_event_set_imdata_set_cb (ime_imdata_set_cb callback_func, void *user_data) |
Sets imdata_set event callback function. | |
int | ime_event_set_imdata_requested_cb (ime_imdata_requested_cb callback_func, void *user_data) |
Sets imdata_requested event callback function. | |
int | ime_event_set_layout_set_cb (ime_layout_set_cb callback_func, void *user_data) |
Sets layout_set event callback function. | |
int | ime_event_set_return_key_type_set_cb (ime_return_key_type_set_cb callback_func, void *user_data) |
Sets return_key_type_set event callback function. | |
int | ime_event_set_return_key_state_set_cb (ime_return_key_state_set_cb callback_func, void *user_data) |
Sets return_key_state_set event callback function. | |
int | ime_event_set_geometry_requested_cb (ime_geometry_requested_cb callback_func, void *user_data) |
Sets geometry_requested event callback function. | |
int | ime_event_set_process_key_event_cb (ime_process_key_event_cb callback_func, void *user_data) |
Sets process_key_event event callback function. | |
int | ime_event_set_process_key_event_with_keycode_cb (ime_process_key_event_with_keycode_cb callback_func, void *user_data) |
Sets process_key_event_with_keycode callback function to handle the key event with a keycode. | |
int | ime_event_set_display_language_changed_cb (ime_display_language_changed_cb callback_func, void *user_data) |
Sets display_language_changed event callback function. | |
int | ime_event_set_rotation_degree_changed_cb (ime_rotation_degree_changed_cb callback_func, void *user_data) |
Sets rotation_degree_changed event callback function. | |
int | ime_event_set_accessibility_state_changed_cb (ime_accessibility_state_changed_cb callback_func, void *user_data) |
Sets accessibility_state_changed event callback function. | |
int | ime_event_set_option_window_created_cb (ime_option_window_created_cb callback_func, void *user_data) |
Sets option_window_created event callback function. | |
int | ime_event_set_option_window_destroyed_cb (ime_option_window_destroyed_cb callback_func, void *user_data) |
Sets option_window_destroyed event callback function. | |
int | ime_send_key_event (ime_key_code_e keycode, ime_key_mask_e keymask, bool forward_key) |
Sends a key event to the associated text input UI control. | |
int | ime_commit_string (const char *str) |
Sends the text to the associated text input UI control. | |
int | ime_show_preedit_string (void) |
Requests to show preedit string. | |
int | ime_hide_preedit_string (void) |
Requests to hide preedit string. | |
int | ime_update_preedit_string (const char *str, Eina_List *attrs) |
Updates a new preedit string. | |
int | ime_request_surrounding_text (int maxlen_before, int maxlen_after) |
Requests the surrounding text from the position of the cursor, asynchronously. | |
int | ime_delete_surrounding_text (int offset, int len) |
Requests to delete surrounding text. | |
int | ime_get_surrounding_text (int maxlen_before, int maxlen_after, char **text, int *cursor_pos) |
Gets the surrounding text from the position of the cursor, synchronously. | |
int | ime_set_selection (int start, int end) |
Requests to set selection. | |
int | ime_get_selected_text (char **text) |
Gets the selected text synchronously. | |
Evas_Object * | ime_get_main_window (void) |
Gets the pointer of input panel main window. | |
int | ime_set_size (int portrait_width, int portrait_height, int landscape_width, int landscape_height) |
Updates the input panel window's size information. | |
int | ime_create_option_window (void) |
Requests to create an option window from the input panel. | |
int | ime_destroy_option_window (Evas_Object *window) |
Requests to destroy an option window. | |
int | ime_context_get_layout (ime_context_h context, Ecore_IMF_Input_Panel_Layout *layout) |
Gets the layout information from the given input context. | |
int | ime_context_get_layout_variation (ime_context_h context, ime_layout_variation_e *layout_variation) |
Gets the layout variation information from the given input context. | |
int | ime_context_get_cursor_position (ime_context_h context, int *cursor_pos) |
Gets the cursor position information from the given input context. | |
int | ime_context_get_autocapital_type (ime_context_h context, Ecore_IMF_Autocapital_Type *autocapital_type) |
Gets the autocapital type information from the given input context. | |
int | ime_context_get_return_key_type (ime_context_h context, Ecore_IMF_Input_Panel_Return_Key_Type *return_key_type) |
Gets the Return key label type information from the given input context. | |
int | ime_context_get_return_key_state (ime_context_h context, bool *return_key_state) |
Gets the Return key state information from the given input context. | |
int | ime_context_get_prediction_mode (ime_context_h context, bool *prediction_mode) |
Gets the prediction mode information from the given input context. | |
int | ime_context_get_password_mode (ime_context_h context, bool *password_mode) |
Gets the password mode information from the given input context. | |
int | ime_context_get_input_hint (ime_context_h context, Ecore_IMF_Input_Hints *input_hint) |
Gets the input hint information from the given input context. | |
int | ime_context_get_bidi_direction (ime_context_h context, Ecore_IMF_BiDi_Direction *bidi) |
Gets the text bidirectional information from the given input context. | |
int | ime_context_get_language (ime_context_h context, Ecore_IMF_Input_Panel_Lang *language) |
Gets the preferred language information from the given input context. | |
int | ime_device_info_get_name (ime_device_info_h dev_info, char **dev_name) |
Gets the device name of the key event. | |
int | ime_device_info_get_class (ime_device_info_h dev_info, Ecore_IMF_Device_Class *dev_class) |
Gets the device class of the key event. | |
int | ime_device_info_get_subclass (ime_device_info_h dev_info, Ecore_IMF_Device_Subclass *dev_subclass) |
Gets the device subclass of the key event. | |
int | ime_event_set_prediction_hint_set_cb (ime_prediction_hint_set_cb callback_func, void *user_data) |
Sets prediction hint event callback function. | |
int | ime_event_set_mime_type_set_request_cb (ime_mime_type_set_request_cb callback_func, void *user_data) |
Sets MIME type event callback function. | |
int | ime_send_private_command (const char *command) |
Sends a private command to the associated text input UI control. | |
int | ime_commit_content (const char *content, const char *description, const char *mime_type) |
Commits contents such as image to the associated text input UI control. | |
int | ime_set_floating_mode (bool floating_mode) |
Sets the floating mode or not. | |
int | ime_set_floating_drag_start (void) |
Allows the floating input panel window to move along with the mouse pointer when the mouse is pressed. | |
int | ime_set_floating_drag_end (void) |
Disallows the movement of the floating input panel window with the mouse pointer when the mouse is pressed. | |
int | ime_event_set_prediction_hint_data_set_cb (ime_prediction_hint_data_set_cb callback_func, void *user_data) |
Sets a callback function to give a hint about predicted words. | |
int | ime_request_hide (void) |
Sends the request to hide IME. | |
int | ime_update_input_panel_event (ime_event_type_e type, unsigned int value) |
Updates the state of input panel event. | |
int | ime_set_candidate_visibility_state (bool visible) |
Enables whether candidate strings show or not. | |
int | ime_event_set_process_input_device_event_cb (ime_process_input_device_event_cb callback_func, void *user_data) |
Sets process_input_device_event event callback function. | |
int | ime_event_unset_process_input_device_event_cb (void) |
Unsets process_input_device_event event callback function. | |
int | ime_input_device_rotary_get_direction (ime_input_device_event_h event_handle, ime_input_device_rotary_direction_e *direction) |
Gets the direction of the rotary input device event. | |
Typedefs | |
typedef struct _ime_context * | ime_context_h |
Handle of an associated text input UI control's input context. | |
typedef struct _ime_device_info * | ime_device_info_h |
Handle of the device information of the key event. | |
typedef void(* | ime_create_cb )(void *user_data) |
Called when the input panel is created. | |
typedef void(* | ime_terminate_cb )(void *user_data) |
Called when the input panel is terminated. | |
typedef void(* | ime_show_cb )(int context_id, ime_context_h context, void *user_data) |
Called when an associated text input UI control requests the input panel to show itself. | |
typedef void(* | ime_hide_cb )(int context_id, void *user_data) |
Called when an associated text input UI control requests the input panel to hide itself. | |
typedef void(* | ime_focus_in_cb )(int context_id, void *user_data) |
Called when an associated text input UI control has focus. | |
typedef void(* | ime_focus_out_cb )(int context_id, void *user_data) |
Called when an associated text input UI control loses focus. | |
typedef void(* | ime_surrounding_text_updated_cb )(int context_id, const char *text, int cursor_pos, void *user_data) |
Called when an associated text input UI control responds to a request with the surrounding text. | |
typedef void(* | ime_input_context_reset_cb )(void *user_data) |
Called to reset the input context of an associated text input UI control. | |
typedef void(* | ime_cursor_position_updated_cb )(int cursor_pos, void *user_data) |
Called when the position of the cursor in an associated text input UI control changes. | |
typedef void(* | ime_language_requested_cb )(void *user_data, char **lang_code) |
Called when an associated text input UI control requests the language from the input panel. | |
typedef void(* | ime_language_set_cb )(Ecore_IMF_Input_Panel_Lang language, void *user_data) |
Called to set the preferred language to the input panel. | |
typedef void(* | ime_imdata_set_cb )(void *data, unsigned int data_length, void *user_data) |
Called to set the application specific data to deliver to the input panel. | |
typedef void(* | ime_imdata_requested_cb )(void *user_data, void **data, unsigned int *data_length) |
Called when an associated text input UI control requests the application specific data from the input panel. | |
typedef void(* | ime_layout_set_cb )(Ecore_IMF_Input_Panel_Layout layout, void *user_data) |
Called when an associated text input UI control requests the input panel to set its layout. | |
typedef void(* | ime_return_key_type_set_cb )(Ecore_IMF_Input_Panel_Return_Key_Type type, void *user_data) |
Called when an associated text input UI control requests the input panel to set the Return key label. The input panel can show text or image on the Return button according to the Return key action. | |
typedef void(* | ime_return_key_state_set_cb )(bool disabled, void *user_data) |
Called when an associated text input UI control requests the input panel to enable or disable the Return key state. | |
typedef void(* | ime_geometry_requested_cb )(void *user_data, int *x, int *y, int *w, int *h) |
Called when an associated text input UI control requests the position and size from the input panel. | |
typedef bool(* | ime_process_key_event_cb )(ime_key_code_e key_code, ime_key_mask_e key_mask, ime_device_info_h dev_info, void *user_data) |
Called when a key event is received from external devices or ime_send_key_event(). | |
typedef bool(* | ime_process_key_event_with_keycode_cb )(unsigned int key_code, ime_key_code_e key_sym, ime_key_mask_e key_mask, ime_device_info_h dev_info, void *user_data) |
Called when a key event is received from external devices or ime_send_key_event(). | |
typedef void(* | ime_display_language_changed_cb )(const char *language, void *user_data) |
Called when the system display language is changed. | |
typedef void(* | ime_rotation_degree_changed_cb )(int degree, void *user_data) |
Called when the device is rotated. | |
typedef void(* | ime_accessibility_state_changed_cb )(bool state, void *user_data) |
Called when Accessibility in Settings application is on or off. | |
typedef void(* | ime_option_window_created_cb )(Evas_Object *window, ime_option_window_type_e type, void *user_data) |
Called to create the option window. | |
typedef void(* | ime_option_window_destroyed_cb )(Evas_Object *window, void *user_data) |
Called to destroy the option window. | |
typedef void(* | ime_prediction_hint_set_cb )(const char *prediction_hint, void *user_data) |
Called to set the prediction hint string to deliver to the input panel. | |
typedef void(* | ime_mime_type_set_request_cb )(const char *mime_type, void *user_data) |
Called when an associated text input UI control requests the text entry to set the MIME type. | |
typedef void(* | ime_prediction_hint_data_set_cb )(const char *key, const char *value, void *user_data) |
Called to set key-value pairs of predicting messages to deliver to the input panel. | |
typedef void * | ime_input_device_event_h |
The handle to retrieve unconventional input device specific event data. | |
typedef void(* | ime_process_input_device_event_cb )(ime_input_device_type_e device_type, ime_input_device_event_h device_event, void *user_data) |
Called when the input event is received from an unconventional input device that does not generate key events. | |
Defines | |
#define | IME_ATTR_FONTSTYLE_UNDERLINE 1 |
Value for IME_ATTR_FONTSTYLE. Draw a line under the text. | |
#define | IME_ATTR_FONTSTYLE_HIGHLIGHT 2 |
Value for IME_ATTR_FONTSTYLE. Draw text in highlighted color. | |
#define | IME_ATTR_FONTSTYLE_REVERSAL 4 |
Value for IME_ATTR_FONTSTYLE. Draw text in reversal color. |
Define Documentation
#define IME_ATTR_FONTSTYLE_HIGHLIGHT 2 |
Value for IME_ATTR_FONTSTYLE. Draw text in highlighted color.
- Since :
- 2.4
#define IME_ATTR_FONTSTYLE_REVERSAL 4 |
Value for IME_ATTR_FONTSTYLE. Draw text in reversal color.
- Since :
- 2.4
#define IME_ATTR_FONTSTYLE_UNDERLINE 1 |
Value for IME_ATTR_FONTSTYLE. Draw a line under the text.
- Since :
- 2.4
Typedef Documentation
typedef void(* ime_accessibility_state_changed_cb)(bool state, void *user_data) |
Called when Accessibility in Settings application is on or off.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] state Accessibility option state [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_accessibility_state_changed_cb() function.
typedef struct _ime_context* ime_context_h |
Handle of an associated text input UI control's input context.
This is one of parameters of ime_show_cb() callback function. IME application should configure its input panel with this structure information.
- Since :
- 2.4
- See also:
- ime_context_get_layout()
- ime_context_get_layout_variation()
- ime_context_get_cursor_position()
- ime_context_get_autocapital_type()
- ime_context_get_return_key_type()
- ime_context_get_return_key_state()
- ime_context_get_prediction_mode()
- ime_context_get_password_mode()
- ime_context_get_input_hint()
- ime_context_get_bidi_direction()
- ime_context_get_language()
typedef void(* ime_create_cb)(void *user_data) |
Called when the input panel is created.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- This callback function is mandatory and must be registered using ime_run(). The ime_get_main_window() can be used to get the created input panel window.
- Parameters:
-
[in] user_data User data to be passed from the callback registration function
- Precondition:
- The ime_run() function calls this callback function.
- See also:
- ime_run()
- ime_set_size()
- ime_get_main_window()
typedef void(* ime_cursor_position_updated_cb)(int cursor_pos, void *user_data) |
Called when the position of the cursor in an associated text input UI control changes.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] cursor_pos The cursor position [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_cursor_position_updated_cb() function.
typedef struct _ime_device_info* ime_device_info_h |
Handle of the device information of the key event.
This is one of parameters of ime_process_key_event_cb() callback function. IME application may distinguish the key event by using this if necessary.
- Since :
- 2.4
typedef void(* ime_display_language_changed_cb)(const char *language, void *user_data) |
Called when the system display language is changed.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] language The language code [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_display_language_changed_cb() function.
typedef void(* ime_focus_in_cb)(int context_id, void *user_data) |
Called when an associated text input UI control has focus.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context_id The input context identification value of an associated text input UI control [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_focus_in_cb() function.
- See also:
- ime_event_set_focus_in_cb()
typedef void(* ime_focus_out_cb)(int context_id, void *user_data) |
Called when an associated text input UI control loses focus.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context_id The input context identification value of an associated text input UI control [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_focus_out_cb() function.
- See also:
- ime_event_set_focus_out_cb()
typedef void(* ime_geometry_requested_cb)(void *user_data, int *x, int *y, int *w, int *h) |
Called when an associated text input UI control requests the position and size from the input panel.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- x, y, w, and h should not be released.
- Parameters:
-
[in] user_data User data to be passed from the callback registration function [out] x The x position in screen [out] y The y position in screen [out] w The window width [out] h The window height
- Precondition:
- The callback can be registered using ime_event_set_geometry_requested_cb() function.
typedef void(* ime_hide_cb)(int context_id, void *user_data) |
Called when an associated text input UI control requests the input panel to hide itself.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- This callback function is mandatory and must be registered using ime_run(). The ime_get_main_window() can be used to get the created input panel window.
- Parameters:
-
[in] context_id The input context identification value of an associated text input UI control [in] user_data User data to be passed from the callback registration function
- See also:
- ime_run()
- ime_get_main_window()
typedef void(* ime_imdata_requested_cb)(void *user_data, void **data, unsigned int *data_length) |
Called when an associated text input UI control requests the application specific data from the input panel.
This function is used by the applications to request the specific data from the input panel. The data format MUST be negotiated by both application and input panel.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The allocated data and data_length will be released internally.
- Parameters:
-
[in] user_data User data to be passed from the callback registration function [out] data Input panel's data to be set to the application [out] data_length The length of data, in bytes, to send to the application
- Precondition:
- The callback can be registered using ime_event_set_imdata_requested_cb() function.
- See also:
- ime_event_set_imdata_requested_cb()
typedef void(* ime_imdata_set_cb)(void *data, unsigned int data_length, void *user_data) |
Called to set the application specific data to deliver to the input panel.
This function is used by the applications to deliver the specific data to the input panel. The data format MUST be negotiated by both application and input panel.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- data should not be released.
- Parameters:
-
[in] data The specific data to be set to the input panel [in] data_length The length of data, in bytes, to send to the input panel [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_imdata_set_cb() function.
- See also:
- ime_event_set_imdata_set_cb()
typedef void(* ime_input_context_reset_cb)(void *user_data) |
Called to reset the input context of an associated text input UI control.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_input_context_reset_cb() function.
typedef void* ime_input_device_event_h |
The handle to retrieve unconventional input device specific event data.
- Since :
typedef void(* ime_language_requested_cb)(void *user_data, char **lang_code) |
Called when an associated text input UI control requests the language from the input panel.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The allocated lang_code will be released internally.
- Parameters:
-
[in] user_data User data to be passed from the callback registration function [out] lang_code Input panel's current input language code (e.g., "en_US")
- Precondition:
- The callback can be registered using ime_event_set_language_requested_cb() function.
typedef void(* ime_language_set_cb)(Ecore_IMF_Input_Panel_Lang language, void *user_data) |
Called to set the preferred language to the input panel.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- language information is already set to the input panel when it is shown through ime_context_h. This callback function will be only called when the client application changes the edit field's language attribute after the input panel is shown.
- Parameters:
-
[in] language The preferred language that the client application wants [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_language_set_cb() function.
- See also:
- ime_event_set_language_set_cb()
typedef void(* ime_layout_set_cb)(Ecore_IMF_Input_Panel_Layout layout, void *user_data) |
Called when an associated text input UI control requests the input panel to set its layout.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- layout information is already set to the input panel when it is shown through ime_context_h. This callback function will be only called when the client application changes the edit field's layout attribute after the input panel is shown.
- Parameters:
-
[in] layout The input panel layout [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_layout_set_cb() function.
- See also:
- ime_event_set_layout_set_cb()
typedef void(* ime_mime_type_set_request_cb)(const char *mime_type, void *user_data) |
Called when an associated text input UI control requests the text entry to set the MIME type.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- mime_type is valid only in the callback. To use outside the callback, make a copy. This function is used by the applications to deliver the MIME type to the input panel.
- Parameters:
-
[in] mime_type The MIME type to be set to the input panel [in] user_data User data to be passed to the callback function
- Precondition:
- The callback can be registered using ime_event_set_mime_type_set_request_cb() function.
typedef void(* ime_option_window_created_cb)(Evas_Object *window, ime_option_window_type_e type, void *user_data) |
Called to create the option window.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- if Input panel requests to open the option window, type will be IME_OPTION_WINDOW_TYPE_KEYBOARD. And if Settings application requests to open it, type will be IME_OPTION_WINDOW_TYPE_SETTING_APPLICATION. The window should not be released. The window can be used until ime_option_window_destroyed_cb() will be called.
- Parameters:
-
[in] window The created window object [in] type The type of option window [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_option_window_created_cb() function. The ime_create_option_window() calls this callback function or Settings application can call this callback function.
typedef void(* ime_option_window_destroyed_cb)(Evas_Object *window, void *user_data) |
Called to destroy the option window.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The window should be released using evas_object_del().
- Parameters:
-
[in] window The window object to destroy [in] user_data User data to be passed to the callback function
- Precondition:
- The callback can be registered using ime_event_set_option_window_destroyed_cb() function. ime_destroy_option_window() calls this callback function.
typedef void(* ime_prediction_hint_data_set_cb)(const char *key, const char *value, void *user_data) |
Called to set key-value pairs of predicting messages to deliver to the input panel.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- key and value is valid only in the callback. To use outside the callback, make a copy. This function is used by applications to deliver predicted hint messages to the input panel.
- Parameters:
-
[in] key The prediction hint key to be set to the input panel [in] value The prediction hint value to be set to the input panel [in] user_data User data to be passed to the callback function
- Precondition:
- The callback can be registered using ime_event_set_prediction_hint_data_set_cb() function.
typedef void(* ime_prediction_hint_set_cb)(const char *prediction_hint, void *user_data) |
Called to set the prediction hint string to deliver to the input panel.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- prediction_hint is valid only in the callback. To use outside the callback, make a copy. This function is used by the applications to deliver the prediction hint message to the input panel.
- Parameters:
-
[in] prediction_hint The prediction hint to be set to the input panel [in] user_data User data to be passed to the callback function
- Precondition:
- The callback can be registered using ime_event_set_prediction_hint_set_cb() function.
typedef void(* ime_process_input_device_event_cb)(ime_input_device_type_e device_type, ime_input_device_event_h device_event, void *user_data) |
Called when the input event is received from an unconventional input device that does not generate key events.
This function processes the input event before an associated text input UI control does.
- Since :
- Remarks:
- device_type contains the information what kind of unconventional input device generated the given event, and the handle device_event is used for obtaining device-specific input device event data. device_event should not be released.
- Parameters:
-
[in] device_type The unconventional input device type [in] device_event The handle for device_type specific input device event [in] user_data User data to be passed to the callback function
- Precondition:
- The callback can be registered using ime_event_set_input_device_event_cb() function.
typedef bool(* ime_process_key_event_cb)(ime_key_code_e key_code, ime_key_mask_e key_mask, ime_device_info_h dev_info, void *user_data) |
Called when a key event is received from external devices or ime_send_key_event().
This function processes the key event before an associated text input UI control does.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- If the key event is from the external device, dev_info will have its name, class and subclass information. dev_info should not be released by the application. The platform manages the handle; the handle is released when ime_process_key_event_cb() exits.
- Parameters:
-
[in] key_code The key code to be sent [in] key_mask The modifier key mask [in] dev_info The device information handle [in] user_data User data to be passed from the callback registration function
- Returns:
true
if the event was processed, otherwise the event was not processed and was forwarded to the client application.
- Precondition:
- The callback should be registered using ime_event_set_process_key_event_cb() function.
typedef bool(* ime_process_key_event_with_keycode_cb)(unsigned int key_code, ime_key_code_e key_sym, ime_key_mask_e key_mask, ime_device_info_h dev_info, void *user_data) |
Called when a key event is received from external devices or ime_send_key_event().
This function processes a key event with a keycode before an associated UI control for the text input deals with the key event.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- If the key event is from the external device, dev_info will have its name, class and subclass information. dev_info should not be released by the application. The platform manages the handle; the handle is released when ime_process_key_event_with_keycode_cb() exits.
- Parameters:
-
[in] key_code The X11 key code to be sent [in] key_sym The key symbol to be sent [in] key_mask The modifier key mask [in] dev_info The device information handle [in] user_data User data to be passed from the callback registration function
- Returns:
true
if the event was processed, otherwisefalse
. Whenfalse
returns, the event was not processed and was forwarded to the client application.
- Precondition:
- The callback should be registered using ime_event_set_process_key_event_with_keycode_cb() function.
typedef void(* ime_return_key_state_set_cb)(bool disabled, void *user_data) |
Called when an associated text input UI control requests the input panel to enable or disable the Return
key state.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- disabled information is already set to the input panel when it is shown through ime_context_h. This callback function will be only called when the client application changes the edit field's
Return
key disable attribute after the input panel is shown.
- Parameters:
-
[in] disabled The Boolean state to disable Return
key. TheReturn
key is enabled by default[in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_return_key_state_set_cb() function.
typedef void(* ime_return_key_type_set_cb)(Ecore_IMF_Input_Panel_Return_Key_Type type, void *user_data) |
Called when an associated text input UI control requests the input panel to set the Return
key label. The input panel can show text or image on the Return
button according to the Return
key action.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- type information is already set to the input panel when it is shown through ime_context_h. This callback function will be only called when the client application changes the edit field's
Return
key type attribute after the input panel is shown.
- Parameters:
-
[in] type The type of Return
key on the input panel[in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_return_key_type_set_cb() function.
typedef void(* ime_rotation_degree_changed_cb)(int degree, void *user_data) |
Called when the device is rotated.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] degree The rotation degree [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_rotation_degree_changed_cb() function.
typedef void(* ime_show_cb)(int context_id, ime_context_h context, void *user_data) |
Called when an associated text input UI control requests the input panel to show itself.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- This callback function is mandatory and must be registered using ime_run(). IME application should configure its input panel with ime_context_h structure information. The ime_get_main_window() can be used to get the created input panel window. context should not be released.
- Parameters:
-
[in] context_id The input context identification value of an associated text input UI control [in] context The input context information handle [in] user_data User data to be passed from the callback registration function
- See also:
- ime_run()
- ime_get_main_window()
- ime_context_get_layout()
- ime_context_get_layout_variation()
- ime_context_get_cursor_position()
- ime_context_get_autocapital_type()
- ime_context_get_return_key_type()
- ime_context_get_return_key_state()
- ime_context_get_prediction_mode()
- ime_context_get_password_mode()
- ime_context_get_input_hint()
- ime_context_get_bidi_direction()
- ime_context_get_language()
typedef void(* ime_surrounding_text_updated_cb)(int context_id, const char *text, int cursor_pos, void *user_data) |
Called when an associated text input UI control responds to a request with the surrounding text.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_request_surrounding_text() must be called to invoke this callback function, asynchronously.
- text can be used only in the callback. To use outside, make a copy.
- Parameters:
-
[in] context_id The input context identification value of an associated text input UI control [in] text The UTF-8 string requested [in] cursor_pos The cursor position [in] user_data User data to be passed from the callback registration function
- Precondition:
- The callback can be registered using ime_event_set_surrounding_text_updated_cb() function.
typedef void(* ime_terminate_cb)(void *user_data) |
Called when the input panel is terminated.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- This callback function is mandatory and must be registered using ime_run(). The ime_get_main_window() can be used to get the created input panel window.
- Parameters:
-
[in] user_data User data to be passed from the callback registration function
- See also:
- ime_run()
- ime_get_main_window()
Enumeration Type Documentation
enum ime_attribute_type |
Enumeration of string attribute type.
- Since :
- 2.4
- Remarks:
- Currently, a font style is available to use.
enum ime_error_e |
Enumeration for input method function error.
- Since :
- 2.4
- Enumerator:
enum ime_event_type_e |
Enumeration of directions for rotary input device's rotation event.
- Since :
Enumeration of unconventional input devices.
- Since :
enum ime_key_code_e |
Enumeration for the key codes. If keycode & 0xff000000 == 0x01000000 then this key code is directly encoded 24-bit UCS character. The UCS value is keycode & 0x00ffffff.
Defines the list of keys supported by the system. Note that certain keys may not be available on all devices.
- Since :
- 2.4
- Enumerator:
enum ime_key_mask_e |
Enumeration for the key masks. The key masks indicate which modifier keys is pressed down during the keyboard hit. The special IME_KEY_MASK_RELEASED indicates the key release event.
- Since :
- 2.4
- Enumerator:
Enumeration of layout variation.
- Since :
- 2.4
- See also:
- ime_context_get_layout_variation()
- Enumerator:
Function Documentation
int ime_commit_content | ( | const char * | content, |
const char * | description, | ||
const char * | mime_type | ||
) |
Commits contents such as image to the associated text input UI control.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] content The content URI to be sent [in] description The content description [in] mime_type The MIME type received from the ime_mime_type_set_request_cb()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_commit_string | ( | const char * | str | ) |
Sends the text to the associated text input UI control.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] str The UTF-8 string to be committed
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_context_get_autocapital_type | ( | ime_context_h | context, |
Ecore_IMF_Autocapital_Type * | autocapital_type | ||
) |
Gets the autocapital type information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the autocapital type information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] autocapital_type Autocapital type information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
int ime_context_get_bidi_direction | ( | ime_context_h | context, |
Ecore_IMF_BiDi_Direction * | bidi | ||
) |
Gets the text bidirectional information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the bidirectional information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] bidi Text bidirectional information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
int ime_context_get_cursor_position | ( | ime_context_h | context, |
int * | cursor_pos | ||
) |
Gets the cursor position information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the cursor position information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] cursor_pos Cursor position information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
int ime_context_get_input_hint | ( | ime_context_h | context, |
Ecore_IMF_Input_Hints * | input_hint | ||
) |
Gets the input hint information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the input hint information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- input_hint is a bit-wise value which recommends the input panel provide an auto completion and so on if it is capable of supporting such features.
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] input_hint Input hint information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
int ime_context_get_language | ( | ime_context_h | context, |
Ecore_IMF_Input_Panel_Lang * | language | ||
) |
Gets the preferred language information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the preferred language information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] language Preferred language information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
int ime_context_get_layout | ( | ime_context_h | context, |
Ecore_IMF_Input_Panel_Layout * | layout | ||
) |
Gets the layout information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the layout information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] layout Layout information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
- ime_layout_set_cb()
int ime_context_get_layout_variation | ( | ime_context_h | context, |
ime_layout_variation_e * | layout_variation | ||
) |
Gets the layout variation information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the layout variation information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] layout_variation Layout variation information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
- ime_layout_variation_e
int ime_context_get_password_mode | ( | ime_context_h | context, |
bool * | password_mode | ||
) |
Gets the password mode information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the password mode information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- If password_mode is
true
, the input panel is advised not to support the predictive text.
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] password_mode Password mode information
true
to indicate that a password being inputted,false
to indicate non-password edit field.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
int ime_context_get_prediction_mode | ( | ime_context_h | context, |
bool * | prediction_mode | ||
) |
Gets the prediction mode information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the prediction mode information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] prediction_mode Prediction mode information
true
to allow the predictive text feature if available,false
to disable the predictive text feature
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
- See also:
- ime_show_cb()
int ime_context_get_return_key_state | ( | ime_context_h | context, |
bool * | return_key_state | ||
) |
Gets the Return
key state information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the Return
key state information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] return_key_state The Return
key state information
true
to enableReturn
key button,false
to disableReturn
key button
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
int ime_context_get_return_key_type | ( | ime_context_h | context, |
Ecore_IMF_Input_Panel_Return_Key_Type * | return_key_type | ||
) |
Gets the Return
key label type information from the given input context.
Each edit field has various attributes for input panel. This function can be called to get the Return
key label type information in ime_show_cb() callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] context The input context information of an associated text input UI control [out] return_key_type The Return
key label type information
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- Input panel UI should be drawn or operated by this information accordingly.
int ime_create_option_window | ( | void | ) |
Requests to create an option window from the input panel.
The input panel can call this function to open the option window. This function calls ime_option_window_created_cb() callback function with IME_OPTION_WINDOW_TYPE_KEYBOARD parameter.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set IME_ERROR_NOT_RUNNING IME main loop is not started yet IME_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The ime_option_window_created_cb() and ime_option_window_destroyed_cb() callback functions MUST be set by ime_event_set_option_window_created_cb() and ime_event_set_option_window_destroyed_cb() respectively.
- Postcondition:
- This function calls ime_option_window_created_cb() callback function to create the option window. And ime_destroy_option_window() function can be called to close the option window.
int ime_delete_surrounding_text | ( | int | offset, |
int | len | ||
) |
Requests to delete surrounding text.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] offset The offset value from the cursor position [in] len The length of the text to delete
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- See also:
- ime_request_surrounding_text()
int ime_destroy_option_window | ( | Evas_Object * | window | ) |
Requests to destroy an option window.
The input panel can call this function to close the option window which is created from either the input panel or Settings application.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] window The option window to destroy
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Precondition:
- The ime_option_window_created_cb() and ime_option_window_destroyed_cb() callback functions MUST be set by ime_event_set_option_window_created_cb() and ime_event_set_option_window_destroyed_cb() respectively.
- Postcondition:
- This function calls ime_option_window_destroyed_cb() callback function to destroy the option window.
int ime_device_info_get_class | ( | ime_device_info_h | dev_info, |
Ecore_IMF_Device_Class * | dev_class | ||
) |
Gets the device class of the key event.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] dev_info The device information from the key event [out] dev_class The class of key input device. This can be ECORE_IMF_DEVICE_CLASS_NONE if the device class is not available
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_device_info_get_name | ( | ime_device_info_h | dev_info, |
char ** | dev_name | ||
) |
Gets the device name of the key event.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- dev_name must be released using free().
- Parameters:
-
[in] dev_info The device information from the key event [out] dev_name The name of key input device. This can be an empty string if the device name is not available
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_device_info_get_subclass | ( | ime_device_info_h | dev_info, |
Ecore_IMF_Device_Subclass * | dev_subclass | ||
) |
Gets the device subclass of the key event.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] dev_info The device information from the key event [out] dev_subclass The subclass of key input device. This can be ECORE_IMF_DEVICE_SUBCLASS_NONE if the device subclass is not available
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_event_set_accessibility_state_changed_cb | ( | ime_accessibility_state_changed_cb | callback_func, |
void * | user_data | ||
) |
Sets accessibility_state_changed
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_accessibility_state_changed_cb() callback function is called when Accessibility in Settings application is on or off.
- Parameters:
-
[in] callback_func accessibility_state_changed
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_cursor_position_updated_cb | ( | ime_cursor_position_updated_cb | callback_func, |
void * | user_data | ||
) |
Sets cursor_position_updated
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_cursor_position_updated_cb() callback function is called when the position of the cursor in an associated text input UI control changes.
- Parameters:
-
[in] callback_func cursor_position_updated
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_display_language_changed_cb | ( | ime_display_language_changed_cb | callback_func, |
void * | user_data | ||
) |
Sets display_language_changed
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_display_language_changed_cb() callback function is called when the system display language is changed.
- Parameters:
-
[in] callback_func display_language_changed
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_focus_in_cb | ( | ime_focus_in_cb | callback_func, |
void * | user_data | ||
) |
Sets focus_in
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_focus_in_cb() callback function is called when an associated text input UI control has focus.
- Parameters:
-
[in] callback_func focus_in
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_focus_in_cb()
- ime_run()
int ime_event_set_focus_out_cb | ( | ime_focus_out_cb | callback_func, |
void * | user_data | ||
) |
Sets focus_out
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_focus_out_cb() callback function is called when an associated text input UI control loses focus.
- Parameters:
-
[in] callback_func focus_out
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_focus_out_cb()
- ime_run()
int ime_event_set_geometry_requested_cb | ( | ime_geometry_requested_cb | callback_func, |
void * | user_data | ||
) |
Sets geometry_requested
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_geometry_requested_cb() callback function is called when an associated text input UI control requests the position and size from the input panel.
- Parameters:
-
[in] callback_func geometry_requested
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_geometry_requested_cb()
- ime_run()
int ime_event_set_imdata_requested_cb | ( | ime_imdata_requested_cb | callback_func, |
void * | user_data | ||
) |
Sets imdata_requested
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_imdata_requested_cb() callback function is called when an associated text input UI control requests the application specific data from the input panel.
- Parameters:
-
[in] callback_func imdata_requested
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_imdata_set_cb | ( | ime_imdata_set_cb | callback_func, |
void * | user_data | ||
) |
Sets imdata_set
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_imdata_set_cb() callback function is called to set the application specific data to deliver to the input panel.
- Parameters:
-
[in] callback_func imdata_set
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_input_context_reset_cb | ( | ime_input_context_reset_cb | callback_func, |
void * | user_data | ||
) |
Sets input_context_reset
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_input_context_reset_cb() callback function is called to reset the input context of an associated text input UI control.
- Parameters:
-
[in] callback_func input_context_reset
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_input_context_reset_cb()
- ime_run()
int ime_event_set_language_requested_cb | ( | ime_language_requested_cb | callback_func, |
void * | user_data | ||
) |
Sets language_requested
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_language_requested_cb() callback function is called when an associated text input UI control requests the language from the input panel.
- Parameters:
-
[in] callback_func language_requested
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_language_requested_cb()
- ime_run()
int ime_event_set_language_set_cb | ( | ime_language_set_cb | callback_func, |
void * | user_data | ||
) |
Sets language_set
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_language_set_cb() callback function is called to set the preferred language to the input panel.
- Parameters:
-
[in] callback_func language_set
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_language_set_cb()
- ime_run()
int ime_event_set_layout_set_cb | ( | ime_layout_set_cb | callback_func, |
void * | user_data | ||
) |
Sets layout_set
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_layout_set_cb() callback function is called when an associated text input UI control requests the input panel to set its layout.
- Parameters:
-
[in] callback_func layout_set
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_layout_set_cb()
- ime_run()
int ime_event_set_mime_type_set_request_cb | ( | ime_mime_type_set_request_cb | callback_func, |
void * | user_data | ||
) |
Sets MIME type event callback function.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_mime_type_set_request_cb() callback function is called when an associated text input UI control requests the text entry to set the MIME type.
- Parameters:
-
[in] callback_func MIME type event callback function [in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_mime_type_set_request_cb()
- ime_run()
int ime_event_set_option_window_created_cb | ( | ime_option_window_created_cb | callback_func, |
void * | user_data | ||
) |
Sets option_window_created
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_option_window_created_cb() callback function is called to create the option window.
- Parameters:
-
[in] callback_func option_window_created
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_option_window_created_cb()
- ime_run()
int ime_event_set_option_window_destroyed_cb | ( | ime_option_window_destroyed_cb | callback_func, |
void * | user_data | ||
) |
Sets option_window_destroyed
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_option_window_destroyed_cb() callback function is called to destroy the option window.
- Parameters:
-
[in] callback_func option_window_destroyed
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_prediction_hint_data_set_cb | ( | ime_prediction_hint_data_set_cb | callback_func, |
void * | user_data | ||
) |
Sets a callback function to give a hint about predicted words.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_prediction_hint_data_set_cb() callback function is called to provide the prediction hint key and value which can be delivered to the input panel.
- Parameters:
-
[in] callback_func The callback function to give hints [in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_prediction_hint_set_cb | ( | ime_prediction_hint_set_cb | callback_func, |
void * | user_data | ||
) |
Sets prediction hint event callback function.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_prediction_hint_set_cb() callback function is called to set the prediction hint string to deliver to the input panel.
- Parameters:
-
[in] callback_func The prediction hint event callback function [in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_prediction_hint_set_cb()
- ime_run()
int ime_event_set_process_input_device_event_cb | ( | ime_process_input_device_event_cb | callback_func, |
void * | user_data | ||
) |
Sets process_input_device_event
event callback function.
- Since :
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_process_input_device_event_cb() callback function is called when the event is received from unconventional input devices that needs to be handled by IMEs.
- Parameters:
-
[in] callback_func inputmethod_process_input_device_event_cb
callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start to run IME application's main loop.
- See also:
- ime_process_input_device_event_cb()
- ime_event_unset_process_input_device_event_cb()
- ime_run()
static void inputmethod_create_cb(void *user_data); static void inputmethod_terminate_cb(void *user_data); static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); static void inputmethod_hide_cb(int context_id, void *user_data); static void inputmethod_process_input_device_event_cb(ime_input_device_type_e device_type, ime_input_device_event_h device_event, void *user_data) { if (device_type == IME_INPUT_DEVICE_TYPE_ROTARY) { dlog_print(DLOG_INFO, "INPUTMETHOD", "Input device type is rotary\n"); } } void ime_app_main(int argc, char **argv) { ime_callback_s basic_callback = { inputmethod_create_cb, inputmethod_terminate_cb, inputmethod_show_cb, inputmethod_hide_cb, }; ime_event_set_process_input_device_event_cb(inputmethod_process_input_device_event_cb, NULL); ime_run(&basic_callback, NULL); }
int ime_event_set_process_key_event_cb | ( | ime_process_key_event_cb | callback_func, |
void * | user_data | ||
) |
Sets process_key_event
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_process_key_event_cb() callback function is called when the key event is received from the external keyboard devices or ime_send_key_event() function.
- Parameters:
-
[in] callback_func process_key_event
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_process_key_event_cb()
- ime_run()
static void inputmethod_create_cb(void *user_data); static void inputmethod_terminate_cb(void *user_data); static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); static void inputmethod_hide_cb(int context_id, void *user_data); static bool inputmethod_process_key_event_cb(ime_key_code_e keycode, ime_key_mask_e keymask, void *user_data); { if (keymask & IME_KEY_MASK_CONTROL) { return false; // e.g., Control+C key event would be forwarded to UI control of the client application } if (keymask & IME_KEY_MASK_ALT) { return false; } if (!(keymask & IME_KEY_MASK_RELEASED)) { // The key is pressed if (keycode == IME_KEY_1) { ime_update_preedit_string("1"); // Show "1" preedit string return true; } else if (keycode == IME_KEY_2) { ime_commit_string("12"); // Input "12" string return true; } } return false; } void ime_app_main(int argc, char **argv) { ime_callback_s basic_callback = { inputmethod_create_cb, inputmethod_terminate_cb, inputmethod_show_cb, inputmethod_hide_cb, }; ime_event_set_process_key_event_cb(inputmethod_process_key_event_cb, NULL); ime_run(&basic_callback, NULL); }
int ime_event_set_process_key_event_with_keycode_cb | ( | ime_process_key_event_with_keycode_cb | callback_func, |
void * | user_data | ||
) |
Sets process_key_event_with_keycode
callback function to handle the key event with a keycode.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_process_key_event_with_keycode_cb() callback function is called when the key event is received from external keyboard devices or ime_send_key_event().
- Parameters:
-
[in] callback_func process_key_event_with_keycode()
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_return_key_state_set_cb | ( | ime_return_key_state_set_cb | callback_func, |
void * | user_data | ||
) |
Sets return_key_state_set
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_return_key_state_set_cb() callback function is called when an associated text input UI control requests the input panel to enable or disable the
Return
key state.
- Parameters:
-
[in] callback_func return_key_state_set
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_return_key_state_set_cb()
- ime_run()
int ime_event_set_return_key_type_set_cb | ( | ime_return_key_type_set_cb | callback_func, |
void * | user_data | ||
) |
Sets return_key_type_set
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_return_key_type_set_cb() callback function is called when an associated text input UI control requests the input panel to set the
Return
key label.
- Parameters:
-
[in] callback_func return_key_type_set
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
- See also:
- ime_return_key_type_set_cb()
- ime_run()
int ime_event_set_rotation_degree_changed_cb | ( | ime_rotation_degree_changed_cb | callback_func, |
void * | user_data | ||
) |
Sets rotation_degree_changed
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_rotation_degree_changed_cb() callback function is called when the device is rotated.
- Parameters:
-
[in] callback_func rotation_degree_changed
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_set_surrounding_text_updated_cb | ( | ime_surrounding_text_updated_cb | callback_func, |
void * | user_data | ||
) |
Sets surrounding_text_updated
event callback function.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_surrounding_text_updated_cb() callback function is called when an associated text input UI control responds to a request with the surrounding text.
- Parameters:
-
[in] callback_func surrounding_text_updated
event callback function[in] user_data User data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- The ime_run() function should be called to start the IME application's main loop.
int ime_event_unset_process_input_device_event_cb | ( | void | ) |
Unsets process_input_device_event
event callback function.
- Since :
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The ime_process_input_device_event_cb() callback function is called when the event is received from unconventional input devices that needs to be handled by IMEs.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function IME_ERROR_OPERATION_FAILED Operation failed
Evas_Object* ime_get_main_window | ( | void | ) |
Gets the pointer of input panel main window.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- The specific error code can be obtained using the get_last_result() method if this function returns NULL.
- The returned value should not be released. The returned value is managed by the platform and will be released when terminating this process.
- Returns:
- The input panel main window object on success, otherwise NULL
- Exceptions:
-
IME_ERROR_NONE Successful IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet IME_ERROR_OPERATION_FAILED Operation failed
int ime_get_selected_text | ( | char ** | text | ) |
Gets the selected text synchronously.
If multi-line text is selected, the result will contain '
' for each newline character. And if the selected text is empty, the result will be an empty string.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- text must be released using free().
- Parameters:
-
[out] text The selected text
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_get_surrounding_text | ( | int | maxlen_before, |
int | maxlen_after, | ||
char ** | text, | ||
int * | cursor_pos | ||
) |
Gets the surrounding text from the position of the cursor, synchronously.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- text must be released using free().
- Parameters:
-
[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited [in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited [out] text The surrounding text [out] cursor_pos The cursor position
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet IME_ERROR_OUT_OF_MEMORY Failed to obtain text due to out of memory
- See also:
- ime_delete_surrounding_text()
int ime_hide_preedit_string | ( | void | ) |
Requests to hide preedit string.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_input_device_rotary_get_direction | ( | ime_input_device_event_h | event_handle, |
ime_input_device_rotary_direction_e * | direction | ||
) |
Gets the direction of the rotary input device event.
If the device_type parameter of the ime_process_input_device_event_cb() function indicates the current input device type is IME_INPUT_DEVICE_TYPE_ROTARY, then the device_event parameter can be used to retrieve rotary device specific parameters, such as direction, as shown in the sample code.
- Since :
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] event_handle The input device event handle [out] direction The direction that the rotary input device was rotated to
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop isn't started yet
static void inputmethod_process_input_device_event_cb(ime_input_device_type_e device_type, ime_input_device_event_h device_event) { if (device_type == IME_INPUT_DEVICE_TYPE_ROTARY) { ime_input_device_rotary_direction_e direction; if (IME_ERROR_NONE == ime_input_device_rotary_get_direction(device_event, &direction)) { dlog_print(DLOG_INFO, "INPUTMETHOD", "Direction : %d", direction); } } }
int ime_request_hide | ( | void | ) |
Sends the request to hide IME.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_request_surrounding_text | ( | int | maxlen_before, |
int | maxlen_after | ||
) |
Requests the surrounding text from the position of the cursor, asynchronously.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited [in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Precondition:
- The ime_surrounding_text_updated_cb() callback function MUST be set by ime_event_set_surrounding_text_updated_cb().
- Postcondition:
- The requested surrounding text can be received using the ime_surrounding_text_updated_cb() callback function.
int ime_run | ( | ime_callback_s * | basic_cb, |
void * | user_data | ||
) |
Runs the main loop of IME application.
This function starts to run IME application's main loop. The ime_create_cb() callback function is called to initialize IME application before the main loop starts up. And the ime_terminate_cb() callback function is called when IME application is terminated.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- IME application MUST implement ime_app_main() function which is the main entry point of IME application. In ime_app_main() function, the ime_run() function MUST be called with the necessary callback functions; ime_create_cb(), ime_terminate_cb(), ime_show_cb(), and ime_hide_cb() callback functions are mandatory for IME application.
- Parameters:
-
[in] basic_cb The structure pointer of the essential callback functions [in] user_data User data to be passed to the callback functions
- Returns:
- 0 if IME application ends successfully, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set IME_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The ime_event_set_***() functions can be called to set the event handling callback functions.
- See also:
- ime_callback_s
- ime_event_set_focus_in_cb()
- ime_event_set_focus_out_cb()
- ime_event_set_surrounding_text_updated_cb()
- ime_event_set_input_context_reset_cb()
- ime_event_set_cursor_position_updated_cb()
- ime_event_set_language_requested_cb()
- ime_event_set_language_set_cb()
- ime_event_set_imdata_set_cb()
- ime_event_set_layout_set_cb()
- ime_event_set_return_key_type_set_cb()
- ime_event_set_return_key_state_set_cb()
- ime_event_set_geometry_requested_cb()
- ime_event_set_display_language_changed_cb()
- ime_event_set_rotation_degree_changed_cb()
- ime_event_set_accessibility_state_changed_cb()
- ime_event_set_option_window_created_cb()
- ime_event_set_option_window_destroyed_cb()
- ime_event_set_prediction_hint_set_cb()
static void inputmethod_create_cb(void *user_data); static void inputmethod_terminate_cb(void *user_data); static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); static void inputmethod_hide_cb(int context_id, void *user_data); static void inputmethod_focus_in_cb(int context_id, void *user_data); static void inputmethod_focus_out_cb(int context_id, void *user_data); static void inputmethod_cursor_position_updated_cb(int cursor_pos, void *user_data); static void inputmethod_create_cb(void *user_data) { Evas_Object *ime_win = NULL; ime_set_size(480, 400, 800, 400); ime_win = ime_get_main_window(); if (ime_win) { // Prepare before showing IME window. } } static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data) { Ecore_IMF_Input_Panel_Layout layout; ime_layout_variation_e layout_variation; Evas_Object *ime_win; ime_context_get_layout(context, &layout); ime_context_get_layout_variation(context, &layout_variation); ime_win = ime_get_main_window(); if (ime_win) { // Compose IME UI properly with the context information and show. evas_object_show(ime_win); } } static void inputmethod_hide_cb(int context_id, void *user_data) { Evas_Object *ime_win = ime_get_main_window(); if (ime_win) { evas_object_hide(ime_win); } } void ime_app_main(int argc, char **argv) { ime_callback_s basic_callback = { inputmethod_create_cb, inputmethod_terminate_cb, inputmethod_show_cb, inputmethod_hide_cb, }; ime_event_set_focus_in_cb(inputmethod_focus_in_cb, NULL); ime_event_set_focus_out_cb(inputmethod_focus_out_cb, NULL); ime_event_set_cursor_position_updated_cb(inputmethod_cursor_position_updated_cb, NULL); ime_run(&basic_callback, NULL); }
int ime_send_key_event | ( | ime_key_code_e | keycode, |
ime_key_mask_e | keymask, | ||
bool | forward_key | ||
) |
Sends a key event to the associated text input UI control.
This function sends key down or up event with key mask to the client application. If forward_key is true
, this key event goes to the edit field directly. And if forward_key is false
, the ime_process_key_event_cb() callback function receives the key event before the edit field.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] keycode The key code to be sent [in] keymask The modifier key mask [in] forward_key The flag to send the key event directly to the edit field
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- If forward_key is
false
, the ime_process_key_event_cb() callback function can compose the text with the key events.
int ime_send_private_command | ( | const char * | command | ) |
Sends a private command to the associated text input UI control.
This can be used by IME to deliver specific data to an application. The data format MUST be negotiated by both application and IME.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] command The UTF-8 string to be sent
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_set_candidate_visibility_state | ( | bool | visible | ) |
Enables whether candidate strings show or not.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] visible true
if candidate strings show,false
otherwise.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_set_floating_drag_end | ( | void | ) |
Disallows the movement of the floating input panel window with the mouse pointer when the mouse is pressed.
This function must be called after invoking ime_set_floating_drag_start(). Otherwise the call is ignored.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Precondition:
- The floating mode was turned on with ime_set_floating_mode().
- ime_set_floating_drag_start() was called before.
int ime_set_floating_drag_start | ( | void | ) |
Allows the floating input panel window to move along with the mouse pointer when the mouse is pressed.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Remarks:
- This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Precondition:
- The floating mode was turned on with ime_set_floating_mode().
int ime_set_floating_mode | ( | bool | floating_mode | ) |
Sets the floating mode or not.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] floating_mode true
- floating mode on,false
- floating mode off
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_set_selection | ( | int | start, |
int | end | ||
) |
Requests to set selection.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] start The start cursor position in text (in characters not bytes) [in] end The end cursor position in text (in characters not bytes)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_set_size | ( | int | portrait_width, |
int | portrait_height, | ||
int | landscape_width, | ||
int | landscape_height | ||
) |
Updates the input panel window's size information.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] portrait_width The width in portrait mode [in] portrait_height The height in portrait mode [in] landscape_width The width in landscape mode [in] landscape_height The height in landscape mode
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- See also:
- ime_create_cb()
int ime_show_preedit_string | ( | void | ) |
Requests to show preedit string.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_NOT_RUNNING IME main loop is not started yet
int ime_update_input_panel_event | ( | ime_event_type_e | type, |
unsigned int | value | ||
) |
Updates the state of input panel event.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] type The input panel event type [in] value The value of event type
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- See also:
- ime_event_type_e
int ime_update_preedit_string | ( | const char * | str, |
Eina_List * | attrs | ||
) |
Updates a new preedit string.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/ime
- Parameters:
-
[in] str The UTF-8 string to be updated in preedit [in] attrs The Eina_List which has ime_preedit_attribute lists; str can be composed of multiple string attributes: underline, highlight color and reversal color. The attrs will be released internally on success and it can be NULL if no attributes to set
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
IME_ERROR_NONE No error IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function. IME_ERROR_INVALID_PARAMETER Invalid parameter IME_ERROR_NOT_RUNNING IME main loop is not started yet
- Postcondition:
- This function is supposed to be followed by the ime_show_preedit_string() function.
- See also:
- ime_preedit_attribute
- ime_commit_string()
- ime_show_preedit_string()
- ime_hide_preedit_string()
{ int ret; Eina_List *list = NULL; ime_preedit_attribute *attr = calloc(1, sizeof(ime_preedit_attribute)); attr->start = 0; attr->length = 1; attr->type = IME_ATTR_FONTSTYLE; attr->value = IME_ATTR_FONTSTYLE_UNDERLINE; list = eina_list_append(list, attr); attr = calloc(1, sizeof(ime_preedit_attribute)); attr->start = 1; attr->length = 1; attr->type = IME_ATTR_FONTSTYLE; attr->value = IME_ATTR_FONTSTYLE_HIGHLIGHT; list = eina_list_append(list, attr); attr = calloc(1, sizeof(ime_preedit_attribute)); attr->start = 2; attr->length = 1; attr->type = IME_ATTR_FONTSTYLE; attr->value = IME_ATTR_FONTSTYLE_REVERSAL; list = eina_list_append(list, attr); ret = ime_update_preedit_string("abcd", list); if (ret != IME_ERROR_NONE) { EINA_LIST_FREE(list, attr) free(attr); } }