Tizen Native API  3.0
Input Method

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_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.
Evas_Objectime_get_main_window (void)
 This API returns the pointer of input panel main window.
int ime_set_size (int portrait_width, int portrait_height, int landscape_width, int landscape_height)
 This API 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.

Typedefs

typedef struct _ime_context * ime_context_h
 An associated text input UI control's input context handle.
typedef struct _ime_device_info * ime_device_info_h
 The key event device information handle.
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 keycode, ime_key_mask_e keymask, ime_device_info_h dev_info, void *user_data)
 Called when the key event is received from the external devices or ime_send_key_event() function.
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.

Defines

#define IME_ATTR_FONTSTYLE_UNDERLINE   1
 Definition for value for IME_ATTR_FONTSTYLE. Draw a line under the text.
#define IME_ATTR_FONTSTYLE_HIGHLIGHT   2
 Definition for value for IME_ATTR_FONTSTYLE. Draw text in highlighted color.
#define IME_ATTR_FONTSTYLE_REVERSAL   4
 Definition for value for IME_ATTR_FONTSTYLE. Draw text in reversal color.

Define Documentation

Definition for value for IME_ATTR_FONTSTYLE. Draw text in highlighted color.

Since :
2.4

Definition for value for IME_ATTR_FONTSTYLE. Draw text in reversal color.

Since :
2.4

Definition for 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]stateAccessibility option state
[in]user_dataUser data to be passed from the callback registration function
Precondition:
The callback can be registered using ime_event_set_accessibility_state_changed_cb() function.
See also:
ime_event_set_accessibility_state_changed_cb()
typedef struct _ime_context* ime_context_h
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_dataUser 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_posThe cursor position
[in]user_dataUser data to be passed from the callback registration function
Precondition:
The callback can be registered using ime_event_set_cursor_position_updated_cb() function.
See also:
ime_event_set_cursor_position_updated_cb()
typedef struct _ime_device_info* ime_device_info_h

The key event device information handle.

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
See also:
ime_process_key_event_cb()
ime_device_info_get_name()
ime_device_info_get_class()
ime_device_info_get_subclass()
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]languageThe language code
[in]user_dataUser data to be passed from the callback registration function
Precondition:
The callback can be registered using ime_event_set_display_language_changed_cb() function.
See also:
ime_event_set_display_language_changed_cb()
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_idThe input context identification value of an associated text input UI control
[in]user_dataUser 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_idThe input context identification value of an associated text input UI control
[in]user_dataUser 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
Parameters:
[in]user_dataUser data to be passed from the callback registration function
[out]xThe x position in screen
[out]yThe y position in screen
[out]wThe window width
[out]hThe window height
Precondition:
The callback can be registered using ime_event_set_geometry_requested_cb() function.
See also:
ime_event_set_geometry_requested_cb()
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_idThe input context identification value of an associated text input UI control
[in]user_dataUser 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 API 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 will be released internally.
Parameters:
[in]user_dataUser data to be passed from the callback registration function
[out]dataInput panel's data to be set to the application
[out]data_lengthThe 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 API 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
Parameters:
[in]dataThe specific data to be set to the input panel
[in]data_lengthThe length of data, in bytes, to send to the input panel
[in]user_dataUser 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_dataUser data to be passed from the callback registration function
Precondition:
The callback can be registered using ime_event_set_input_context_reset_cb() function.
See also:
ime_event_set_input_context_reset_cb()
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_dataUser data to be passed from the callback registration function
[out]lang_codeInput panel's current input language code (e.g., "en_US")
Precondition:
The callback can be registered using ime_event_set_language_requested_cb() function.
See also:
ime_event_set_language_requested_cb()
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]languageThe preferred language that the client application wants
[in]user_dataUser 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]layoutThe input panel layout
[in]user_dataUser 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_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.
Parameters:
[in]windowThe created window object
[in]typeThe type of option window
[in]user_dataUser 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.
See also:
ime_event_set_option_window_created_cb()
ime_create_option_window()
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
Parameters:
[in]windowThe window object to destroy
[in]user_dataUser 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.
See also:
ime_event_set_option_window_destroyed_cb()
typedef bool(* ime_process_key_event_cb)(ime_key_code_e keycode, ime_key_mask_e keymask, ime_device_info_h dev_info, void *user_data)

Called when the key event is received from the external devices or ime_send_key_event() function.

This function processes the key event before an associated text input UI control does.

Remarks:
If the key event is from the external device, dev_info will have its name, class and subclass information.
Parameters:
[in]keycodeThe key code to be sent
[in]keymaskThe modifier key mask
[in]dev_infoThe device information handle
[in]user_dataUser data to be passed from the callback registration function
Returns:
true if the event is processed, otherwise the event is not processed and is forwarded to the client application
Precondition:
The callback can be registered using ime_event_set_process_key_event_cb() function.
See also:
ime_event_set_process_key_event_cb()
ime_device_info_get_name()
ime_device_info_get_class()
ime_device_info_get_subclass()
ime_send_key_event()
ime_commit_string()
ime_show_preedit_string()
ime_hide_preedit_string()
ime_update_preedit_string()
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]disabledThe Boolean state to disable Return key. The Return key is enabled by default
[in]user_dataUser 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.
See also:
ime_event_set_return_key_state_set_cb()
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]typeThe type of Return key on the input panel
[in]user_dataUser 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.
See also:
ime_event_set_return_key_type_set_cb()
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]degreeThe rotation degree
[in]user_dataUser data to be passed from the callback registration function
Precondition:
The callback can be registered using ime_event_set_rotation_degree_changed_cb() function.
See also:
ime_event_set_rotation_degree_changed_cb()
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.
Parameters:
[in]context_idThe input context identification value of an associated text input UI control
[in]contextThe input context information handle
[in]user_dataUser 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.
Parameters:
[in]context_idThe input context identification value of an associated text input UI control
[in]textThe UTF-8 string requested
[in]cursor_posThe cursor position
[in]user_dataUser data to be passed from the callback registration function
Precondition:
The callback can be registered using ime_event_set_surrounding_text_updated_cb() function.
See also:
ime_event_set_surrounding_text_updated_cb()
ime_request_surrounding_text()
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_dataUser data to be passed from the callback registration function
See also:
ime_run()
ime_get_main_window()

Enumeration Type Documentation

Enumeration for string attribute type.

Since :
2.4
Remarks:
Currently, a font style is available to use.
See also:
ime_preedit_attribute()
ime_update_preedit_string()
Enumerator:
IME_ATTR_NONE 

No attribute

IME_ATTR_FONTSTYLE 

A font style attribute, e.g., underline, etc.

Enumeration for input method function error.

Since :
2.4
Enumerator:
IME_ERROR_NONE 

Successful

IME_ERROR_INVALID_PARAMETER 

Invalid parameter

IME_ERROR_PERMISSION_DENIED 

Permission denied

IME_ERROR_NO_CALLBACK_FUNCTION 

Necessary callback function is not set

IME_ERROR_NOT_RUNNING 

IME main loop isn't started yet

IME_ERROR_OPERATION_FAILED 

Operation failed

IME_ERROR_OUT_OF_MEMORY 

out of memory

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:
IME_KEY_BackSpace 

The backspace key

IME_KEY_Tab 

The tab key

IME_KEY_Linefeed 

The linefeed key

IME_KEY_Clear 

The clear key

IME_KEY_Return 

The return key

IME_KEY_Pause 

The pause key

IME_KEY_Scroll_Lock 

The scroll lock key

IME_KEY_Sys_Req 

The sys req key

IME_KEY_Escape 

The escape key

IME_KEY_Delete 

The delete key

IME_KEY_Home 

The home key

IME_KEY_Left 

The left directional key

IME_KEY_Up 

The up directional key

IME_KEY_Right 

The right directional key

IME_KEY_Down 

The down directional key

IME_KEY_Prior 

The prior, previous key

IME_KEY_Page_Up 

The page up key

IME_KEY_Next 

The next key

IME_KEY_Page_Down 

The page down key

IME_KEY_End 

The end key

IME_KEY_Begin 

The begin key

IME_KEY_Select 

The select key

IME_KEY_Print 

The print key

IME_KEY_Execute 

The execute, run, do key

IME_KEY_Insert 

The insert key

IME_KEY_Undo 

The undo key

IME_KEY_Redo 

The redo key

IME_KEY_Menu 

The menu key

IME_KEY_Find 

The find key

IME_KEY_Cancel 

The cancel, stop, abort, exit key

IME_KEY_Help 

The help key

IME_KEY_Break 

The break key

IME_KEY_Mode_switch 

The character set switch key

IME_KEY_Num_Lock 

The num lock key

IME_KEY_KP_Space 

The Numpad space key

IME_KEY_KP_Tab 

The Numpad tab key

IME_KEY_KP_Enter 

The Numpad enter key

IME_KEY_KP_F1 

The Numpad function 1 key

IME_KEY_KP_F2 

The Numpad function 2 key

IME_KEY_KP_F3 

The Numpad function 3 key

IME_KEY_KP_F4 

The Numpad function 4 key

IME_KEY_KP_Home 

The Numpad home key

IME_KEY_KP_Left 

The Numpad left key

IME_KEY_KP_Up 

The Numpad up key

IME_KEY_KP_Right 

The Numpad right key

IME_KEY_KP_Down 

The Numpad down key

IME_KEY_KP_Prior 

The Numpad prior, previous key

IME_KEY_KP_Page_Up 

The Numpad page up key

IME_KEY_KP_Next 

The Numpad next key

IME_KEY_KP_Page_Down 

The Numpad page down key

IME_KEY_KP_End 

The Numpad end key

IME_KEY_KP_Begin 

The Numpad begin key

IME_KEY_KP_Insert 

The Numpad insert key

IME_KEY_KP_Delete 

The Numpad delete key

IME_KEY_KP_Equal 

The Numpad equal key

IME_KEY_KP_Multiply 

The Numpad multiply key

IME_KEY_KP_Add 

The Numpad add key

IME_KEY_KP_Separator 

The Numpad separator key

IME_KEY_KP_Subtract 

The Numpad subtract key

IME_KEY_KP_Decimal 

The Numpad decimal key

IME_KEY_KP_Divide 

The Numpad divide key

IME_KEY_KP_0 

The Numpad 0 key

IME_KEY_KP_1 

The Numpad 1 key

IME_KEY_KP_2 

The Numpad 2 key

IME_KEY_KP_3 

The Numpad 3 key

IME_KEY_KP_4 

The Numpad 4 key

IME_KEY_KP_5 

The Numpad 5 key

IME_KEY_KP_6 

The Numpad 6 key

IME_KEY_KP_7 

The Numpad 7 key

IME_KEY_KP_8 

The Numpad 8 key

IME_KEY_KP_9 

The Numpad 9 key

IME_KEY_F1 

The function 1 key

IME_KEY_F2 

The function 2 key

IME_KEY_F3 

The function 3 key

IME_KEY_F4 

The function 4 key

IME_KEY_F5 

The function 5 key

IME_KEY_F6 

The function 6 key

IME_KEY_F7 

The function 7 key

IME_KEY_F8 

The function 8 key

IME_KEY_F9 

The function 9 key

IME_KEY_F10 

The function 10 key

IME_KEY_F11 

The function 11 key

IME_KEY_F12 

The function 12 key

IME_KEY_F13 

The function 13 key

IME_KEY_F14 

The function 14 key

IME_KEY_F15 

The function 15 key

IME_KEY_F16 

The function 16 key

IME_KEY_F17 

The function 17 key

IME_KEY_F18 

The function 18 key

IME_KEY_F19 

The function 19 key

IME_KEY_F20 

The function 20 key

IME_KEY_F21 

The function 21 key

IME_KEY_F22 

The function 22 key

IME_KEY_F23 

The function 23 key

IME_KEY_F24 

The function 24 key

IME_KEY_F25 

The function 25 key

IME_KEY_F26 

The function 26 key

IME_KEY_F27 

The function 27 key

IME_KEY_F28 

The function 28 key

IME_KEY_F29 

The function 29 key

IME_KEY_F30 

The function 30 key

IME_KEY_F31 

The function 31 key

IME_KEY_F32 

The function 32 key

IME_KEY_F33 

The function 33 key

IME_KEY_F34 

The function 34 key

IME_KEY_F35 

The function 35 key

IME_KEY_Shift_L 

The left shift key

IME_KEY_Shift_R 

The right shift key

IME_KEY_Control_L 

The left control key

IME_KEY_Control_R 

The right control key

IME_KEY_Caps_Lock 

The caps lock key

IME_KEY_Shift_Lock 

The shift lock key

IME_KEY_Meta_L 

The left meta key

IME_KEY_Meta_R 

The right meta key

IME_KEY_Alt_L 

The left alt key

IME_KEY_Alt_R 

The right alt key

IME_KEY_Super_L 

The left super key

IME_KEY_Super_R 

The right super key

IME_KEY_Hyper_L 

The left hyper key

IME_KEY_Hyper_R 

The right hyper key

IME_KEY_space 

The space key

IME_KEY_exclam 

The exclamation key

IME_KEY_quotedbl 

The quotedbl key

IME_KEY_numbersign 

The number sign key

IME_KEY_dollar 

The dollar key

IME_KEY_percent 

The percent key

IME_KEY_ampersand 

The ampersand key

IME_KEY_apostrophe 

The apostrophe key

IME_KEY_parenleft 

The parenleft key

IME_KEY_parenright 

The parenright key

IME_KEY_asterisk 

The asterisk key

IME_KEY_plus 

The plus key

IME_KEY_comma 

The comma key

IME_KEY_minus 

The minus key

IME_KEY_period 

The period key

IME_KEY_slash 

The slash key

IME_KEY_0 

The 0 key

IME_KEY_1 

The 1 key

IME_KEY_2 

The 2 key

IME_KEY_3 

The 3 key

IME_KEY_4 

The 4 key

IME_KEY_5 

The 5 key

IME_KEY_6 

The 6 key

IME_KEY_7 

The 7 key

IME_KEY_8 

The 8 key

IME_KEY_9 

The 9 key

IME_KEY_colon 

The colon key

IME_KEY_semicolon 

The semicolon key

IME_KEY_less 

The less key

IME_KEY_equal 

The equal key

IME_KEY_greater 

The greater key

IME_KEY_question 

The question key

IME_KEY_at 

The at key

IME_KEY_A 

The A key

IME_KEY_B 

The B key

IME_KEY_C 

The C key

IME_KEY_D 

The D key

IME_KEY_E 

The E key

IME_KEY_F 

The F key

IME_KEY_G 

The G key

IME_KEY_H 

The H key

IME_KEY_I 

The I key

IME_KEY_J 

The J key

IME_KEY_K 

The K key

IME_KEY_L 

The L key

IME_KEY_M 

The M key

IME_KEY_N 

The N key

IME_KEY_O 

The O key

IME_KEY_P 

The P key

IME_KEY_Q 

The Q key

IME_KEY_R 

The R key

IME_KEY_S 

The S key

IME_KEY_T 

The T key

IME_KEY_U 

The U key

IME_KEY_V 

The V key

IME_KEY_W 

The W key

IME_KEY_X 

The X key

IME_KEY_Y 

The Y key

IME_KEY_Z 

The Z key

IME_KEY_bracketleft 

The left bracket key

IME_KEY_backslash 

The backslash key

IME_KEY_bracketright 

The right bracket key

IME_KEY_asciicircum 

The circumflex key

IME_KEY_underscore 

The underscore key

IME_KEY_grave 

The grave key

IME_KEY_a 

The a key

IME_KEY_b 

The b key

IME_KEY_c 

The c key

IME_KEY_d 

The d key

IME_KEY_e 

The e key

IME_KEY_f 

The f key

IME_KEY_g 

The g key

IME_KEY_h 

The h key

IME_KEY_i 

The i key

IME_KEY_j 

The j key

IME_KEY_k 

The k key

IME_KEY_l 

The l key

IME_KEY_m 

The m key

IME_KEY_n 

The n key

IME_KEY_o 

The o key

IME_KEY_p 

The p key

IME_KEY_q 

The q key

IME_KEY_r 

The r key

IME_KEY_s 

The s key

IME_KEY_t 

The t key

IME_KEY_u 

The u key

IME_KEY_v 

The v key

IME_KEY_w 

The w key

IME_KEY_x 

The x key

IME_KEY_y 

The y key

IME_KEY_z 

The z key

IME_KEY_braceleft 

The left brace key

IME_KEY_bar 

The bar key

IME_KEY_braceright 

The right brace key

IME_KEY_asciitilde 

The tilde key

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:
IME_KEY_MASK_PRESSED 

Key press event without modifier key

IME_KEY_MASK_SHIFT 

The Shift key is pressed down

IME_KEY_MASK_CAPSLOCK 

The CapsLock key is pressed down

IME_KEY_MASK_CONTROL 

The Control key is pressed down

IME_KEY_MASK_ALT 

The Alt key is pressed down

IME_KEY_MASK_META 

The Meta key is pressed down

IME_KEY_MASK_WIN 

The Win (between Control and Alt) is pressed down

IME_KEY_MASK_HYPER 

The Hyper key is pressed down

IME_KEY_MASK_NUMLOCK 

The NumLock key is pressed down

IME_KEY_MASK_RELEASED 

Key release event

Enumeration for layout variation.

Since :
2.4
See also:
ime_context_get_layout_variation()
Enumerator:
IME_LAYOUT_NORMAL_VARIATION_NORMAL 

The plain normal layout

IME_LAYOUT_NORMAL_VARIATION_FILENAME 

Filename layout; symbols such as '/', '*', '\', '|', '<', '>', '?', '"' and ':' should be disabled

IME_LAYOUT_NORMAL_VARIATION_PERSON_NAME 

The name of a person

IME_LAYOUT_NUMBERONLY_VARIATION_NORMAL 

The plain normal number layout

IME_LAYOUT_NUMBERONLY_VARIATION_SIGNED 

The number layout to allow a negative sign

IME_LAYOUT_NUMBERONLY_VARIATION_DECIMAL 

The number layout to allow decimal point to provide fractional value

IME_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL 

The number layout to allow decimal point and negative sign

IME_LAYOUT_PASSWORD_VARIATION_NORMAL 

The normal password layout

IME_LAYOUT_PASSWORD_VARIATION_NUMBERONLY 

The password layout to allow only number

Enumeration for the option window type.

Since :
2.4
See also:
ime_option_window_created_cb()
Enumerator:
IME_OPTION_WINDOW_TYPE_KEYBOARD 

Open from Keyboard

IME_OPTION_WINDOW_TYPE_SETTING_APPLICATION 

Open from Setting application


Function Documentation

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]strThe UTF-8 string to be committed
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_show_preedit_string()
ime_hide_preedit_string()
ime_update_preedit_string()

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]contextThe input context information of an associated text input UI control
[out]autocapital_typeAutocapital type information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
Input panel UI should be drawn or operated by this information accordingly.
See also:
ime_show_cb()

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]contextThe input context information of an associated text input UI control
[out]bidiText bidirectional information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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]contextThe input context information of an associated text input UI control
[out]cursor_posCursor position information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
Input panel UI should be drawn or operated by this information accordingly.
See also:
ime_show_cb()
ime_cursor_position_updated_cb()
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]contextThe input context information of an associated text input UI control
[out]input_hintInput hint information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
Input panel UI should be drawn or operated by this information accordingly.
See also:
ime_show_cb()

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]contextThe input context information of an associated text input UI control
[out]languagePreferred language information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
Input panel UI should be drawn or operated by this information accordingly.
See also:
ime_show_cb()

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]contextThe input context information of an associated text input UI control
[out]layoutLayout information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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]contextThe input context information of an associated text input UI control
[out]layout_variationLayout variation information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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]contextThe input context information of an associated text input UI control
[out]password_modePassword mode information true to indicate that a password being entered, false to indicate non-password edit field
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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]contextThe input context information of an associated text input UI control
[out]prediction_modePrediction 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_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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]contextThe input context information of an associated text input UI control
[out]return_key_stateThe Return key state information true to enable Return key button, false to disable Return key button
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
Input panel UI should be drawn or operated by this information accordingly.
See also:
ime_show_cb()
ime_return_key_state_set_cb()

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]contextThe input context information of an associated text input UI control
[out]return_key_typeThe Return key label type information
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
Input panel UI should be drawn or operated by this information accordingly.
See also:
ime_show_cb()
ime_return_key_type_set_cb()
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_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NO_CALLBACK_FUNCTIONNecessary callback function is not set
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
IME_ERROR_OPERATION_FAILEDOperation 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.
See also:
ime_event_set_option_window_created_cb()
ime_option_window_created_cb()
ime_destroy_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]offsetThe offset value from the cursor position
[in]lenThe length of the text to delete
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_request_surrounding_text()

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]windowThe option window to destroy
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NO_CALLBACK_FUNCTIONNecessary callback function is not set
IME_ERROR_NOT_RUNNINGIME main loop isn't 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.
See also:
ime_event_set_option_window_destroyed_cb()
ime_option_window_destroyed_cb()
ime_create_option_window()

Gets the device class of the key event.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/ime
Parameters:
[in]dev_infoThe device information from the key event
[out]dev_classThe 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_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_process_key_event_cb()
ime_device_info_get_name()
ime_device_info_get_subclass()
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_infoThe device information from the key event
[out]dev_nameThe 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_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_process_key_event_cb()
ime_device_info_get_class()
ime_device_info_get_subclass()

Gets the device subclass of the key event.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/ime
Parameters:
[in]dev_infoThe device information from the key event
[out]dev_subclassThe 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_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_process_key_event_cb()
ime_device_info_get_name()
ime_device_info_get_class()

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_funcaccessibility_state_changed event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_accessibility_state_changed_cb()
ime_run()
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_funccursor_position_updated event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_cursor_position_updated_cb()
ime_run()
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_funcdisplay_language_changed event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_display_language_changed_cb()
ime_run()
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_funcfocus_in event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funcfocus_out event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funcgeometry_requested event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funcimdata_requested event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_imdata_requested_cb()
ime_event_set_imdata_set_cb()
ime_run()
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_funcimdata_set event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_imdata_set_cb()
ime_event_set_imdata_requested_cb()
ime_run()
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_funcinput_context_reset event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funclanguage_requested event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funclanguage_set event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funclayout_set event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_layout_set_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_funcoption_window_created event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funcoption_window_destroyed event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_option_window_destroyed_cb()
ime_run()
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_funcprocess_key_event event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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., Cotrol+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_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_funcreturn_key_state_set event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funcreturn_key_type_set event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run 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_funcrotation_degree_changed event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_rotation_degree_changed_cb()
ime_run()
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_funcsurrounding_text_updated event callback function
[in]user_dataUser data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
The ime_run() function should be called to start to run IME application's main loop.
See also:
ime_surrounding_text_updated_cb()
ime_run()

This API returns 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.
Returns:
The input panel main window object on success, otherwise NULL
Exceptions:
IME_ERROR_NONESuccessful IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function IME_ERROR_NOT_RUNNING IME main loop isn't started yet IME_ERROR_OPERATION_FAILED Operation failed
See also:
ime_create_cb()
ime_terminate_cb()
ime_show_cb()
ime_hide_cb()
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
Remarks:
text must be released using free().
Privilege Level:
public
Privilege:
http://tizen.org/privilege/ime
Parameters:
[in]maxlen_beforeThe maximum length of string to be retrieved before the cursor; -1 means unlimited
[in]maxlen_afterThe maximum length of string to be retrieved after the cursor; -1 means unlimited
[out]textThe surrounding text
[out]cursor_posThe cursor position
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
IME_ERROR_OUT_OF_MEMORYFailed 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_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_commit_string()
ime_show_preedit_string()
ime_update_preedit_string()
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_beforeThe maximum length of string to be retrieved before the cursor; -1 means unlimited
[in]maxlen_afterThe 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_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NO_CALLBACK_FUNCTIONNecessary callback function is not set
IME_ERROR_NOT_RUNNINGIME main loop isn't 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.
See also:
ime_delete_surrounding_text()
ime_event_set_surrounding_text_updated_cb()
ime_surrounding_text_updated_cb()
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_cbThe structure pointer of the essential callback functions
[in]user_dataUser data to be passed to the callback functions
Returns:
0 if IME application ends successfully, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NO_CALLBACK_FUNCTIONNecessary callback function is not set
IME_ERROR_OPERATION_FAILEDOperation 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()
 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 filed 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]keycodeThe key code to be sent
[in]keymaskThe modifier key mask
[in]forward_keyThe flag to send the key event directly to the edit field
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
Postcondition:
If forward_key is false, the ime_process_key_event_cb() callback function can compose the text with the key events.
See also:
ime_key_code_e
ime_key_mask_e
ime_process_key_event_cb()
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]startThe start cursor position in text (in characters not bytes)
[in]endThe end cursor position in text (in characters not bytes)
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
int ime_set_size ( int  portrait_width,
int  portrait_height,
int  landscape_width,
int  landscape_height 
)

This API updates the input panel window's size information.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/ime
Parameters:
[in]portrait_widthThe width in portrait mode
[in]portrait_heightThe height in portrait mode
[in]landscape_widthThe width in landscape mode
[in]landscape_heightThe height in landscape mode
Returns:
0 on success, otherwise a negative error value
Return values:
IME_ERROR_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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_NONENo error
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't started yet
See also:
ime_commit_string()
ime_hide_preedit_string()
ime_update_preedit_string()
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]strThe UTF-8 string to be updated in preedit
[in]attrsThe 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_NONENo error
IME_ERROR_INVALID_PARAMETERInvalid parameter
IME_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this function
IME_ERROR_NOT_RUNNINGIME main loop isn't 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);
     }
 }