Ecore Input Method Context Functions

Functions that operate on Ecore Input Method Context objects. More...

Functions

EAPI Eina_List * ecore_imf_context_available_ids_get (void)
 Get the list of the available Input Method Context ids.
EAPI const char * ecore_imf_context_default_id_get (void)
 Get the id of the default Input Method Context.
EAPI const Ecore_IMF_Context_Info * ecore_imf_context_info_by_id_get (const char *id)
 Retrieve the info for the Input Method Context with id.
EAPI Ecore_IMF_Context * ecore_imf_context_add (const char *id)
 Create a new Input Method Context defined by the given id.
EAPI const Ecore_IMF_Context_Info * ecore_imf_context_info_get (Ecore_IMF_Context *ctx)
 Retrieve the info for the given Input Method Context.
EAPI void ecore_imf_context_del (Ecore_IMF_Context *ctx)
 Delete the given Input Method Context and free its memory.
EAPI void ecore_imf_context_client_window_set (Ecore_IMF_Context *ctx, void *window)
 Set the client window for the Input Method Context; this is the Ecore_X_Window when using X11, Ecore_Win32_Window when using Win32, etc.
EAPI void ecore_imf_context_client_canvas_set (Ecore_IMF_Context *ctx, void *canvas)
 Set the client canvas for the Input Method Context; this is the canvas in which the input appears.
EAPI void ecore_imf_context_show (Ecore_IMF_Context *ctx)
 Ask the Input Method Context to show itself.
EAPI void ecore_imf_context_hide (Ecore_IMF_Context *ctx)
 Ask the Input Method Context to hide itself.
EAPI void ecore_imf_context_focus_in (Ecore_IMF_Context *ctx)
 Notify the Input Method Context that the widget to which its correspond has gained focus.
EAPI void ecore_imf_context_focus_out (Ecore_IMF_Context *ctx)
 Notify the Input Method Context that the widget to which its correspond has lost focus.
EAPI void ecore_imf_context_reset (Ecore_IMF_Context *ctx)
 Notify the Input Method Context that a change such as a change in cursor position has been made.
EAPI void ecore_imf_context_cursor_position_set (Ecore_IMF_Context *ctx, int cursor_pos)
 Notify the Input Method Context that a change in the cursor position has been made.
EAPI void ecore_imf_context_use_preedit_set (Ecore_IMF_Context *ctx, int use_preedit)
 Set whether the IM context should use the preedit string to display feedback.
EAPI void ecore_imf_context_retrieve_surrounding_callback_set (Ecore_IMF_Context *ctx, int(*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data)
 Set the callback to be used on get_surrounding request.
EAPI void ecore_imf_context_input_mode_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode)
 Set the input mode used by the Ecore Input Context.
EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get (Ecore_IMF_Context *ctx)
 Get the input mode being used by the Ecore Input Context.
EAPI int ecore_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event)
 Allow an Ecore Input Context to internally handle an event.

Detailed Description

Functions that operate on Ecore Input Method Context objects.


Function Documentation

EAPI Ecore_IMF_Context* ecore_imf_context_add ( const char *  id)

Create a new Input Method Context defined by the given id.

Parameters:
idThe Input Method Context id.
Returns:
A newly allocated Input Method Context; on failure it returns NULL.

References ecore_imf_context_input_mode_set(), and ecore_imf_context_use_preedit_set().

EAPI Eina_List* ecore_imf_context_available_ids_get ( void  )

Get the list of the available Input Method Context ids.

Note that the caller is responsible for freeing the Eina_List when finished with it. There is no need to finish the list strings.

Returns:
Return an EIna_List of strings; on failure it returns NULL.
EAPI void ecore_imf_context_client_canvas_set ( Ecore_IMF_Context *  ctx,
void *  canvas 
)

Set the client canvas for the Input Method Context; this is the canvas in which the input appears.

The canvas type can be determined by using the context canvas type. Actually only canvas with type "evas" (Evas *) is supported. This canvas may be used in order to correctly position status windows, and may also be used for purposes internal to the Input Method Context.

Parameters:
ctxAn #Ecore_IMF_Context.
canasThe client canvas. This may be NULL to indicate that the previous client canvas no longer exists.
EAPI void ecore_imf_context_client_window_set ( Ecore_IMF_Context *  ctx,
void *  window 
)

Set the client window for the Input Method Context; this is the Ecore_X_Window when using X11, Ecore_Win32_Window when using Win32, etc.

This window is used in order to correctly position status windows, and may also be used for purposes internal to the Input Method Context.

Parameters:
ctxAn #Ecore_IMF_Context.
windowThe client window. This may be NULL to indicate that the previous client window no longer exists.
EAPI void ecore_imf_context_cursor_position_set ( Ecore_IMF_Context *  ctx,
int  cursor_pos 
)

Notify the Input Method Context that a change in the cursor position has been made.

Parameters:
ctxAn #Ecore_IMF_Context.
cursor_posNew cursor position in characters.
EAPI const char* ecore_imf_context_default_id_get ( void  )

Get the id of the default Input Method Context.

The id may to used to create a new instance of an Input Method Context object.

Returns:
Return a string containing the id of the default Input Method Context; on failure it returns NULL.
EAPI void ecore_imf_context_del ( Ecore_IMF_Context *  ctx)

Delete the given Input Method Context and free its memory.

Parameters:
ctxAn #Ecore_IMF_Context.
EAPI int ecore_imf_context_filter_event ( Ecore_IMF_Context *  ctx,
Ecore_IMF_Event_Type  type,
Ecore_IMF_Event *  event 
)

Allow an Ecore Input Context to internally handle an event.

If this function returns 1, then no further processing should be done for this event.

Input methods must be able to accept all types of events (simply returning 0 if the event was not handled), but there is no obligation of any events to be submitted to this function.

Parameters:
ctxAn #Ecore_IMF_Context.
typeThe type of event defined by #Ecore_IMF_Event_Type.
eventThe event itself.
Returns:
1 if the event was handled; otherwise 0.
EAPI void ecore_imf_context_focus_in ( Ecore_IMF_Context *  ctx)

Notify the Input Method Context that the widget to which its correspond has gained focus.

Parameters:
ctxAn #Ecore_IMF_Context.
EAPI void ecore_imf_context_focus_out ( Ecore_IMF_Context *  ctx)

Notify the Input Method Context that the widget to which its correspond has lost focus.

Parameters:
ctxAn #Ecore_IMF_Context.
EAPI void ecore_imf_context_hide ( Ecore_IMF_Context *  ctx)

Ask the Input Method Context to hide itself.

Parameters:
ctxAn #Ecore_IMF_Context.
EAPI const Ecore_IMF_Context_Info* ecore_imf_context_info_by_id_get ( const char *  id)

Retrieve the info for the Input Method Context with id.

Parameters:
idThe Input Method Context id to query for.
Returns:
Return a #Ecore_IMF_Context_Info for the Input Method Context with id; on failure it returns NULL.
EAPI const Ecore_IMF_Context_Info* ecore_imf_context_info_get ( Ecore_IMF_Context *  ctx)

Retrieve the info for the given Input Method Context.

Parameters:
ctxAn #Ecore_IMF_Context.
Returns:
Return a #Ecore_IMF_Context_Info for the given Input Method Context; on failure it returns NULL.
EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get ( Ecore_IMF_Context *  ctx)

Get the input mode being used by the Ecore Input Context.

See ecore_imf_context_input_mode_set for more details.

Parameters:
ctxAn #Ecore_IMF_Context.
Returns:
The input mode being used by ctx.
EAPI void ecore_imf_context_input_mode_set ( Ecore_IMF_Context *  ctx,
Ecore_IMF_Input_Mode  input_mode 
)

Set the input mode used by the Ecore Input Context.

The input mode can be one of the input modes defined in #Ecore_IMF_Input_Mode. The default input mode is ECORE_IMF_INPUT_MODE_FULL.

Parameters:
ctxAn #Ecore_IMF_Context.
input_modeThe input mode to be used by ctx.

Referenced by ecore_imf_context_add().

EAPI void ecore_imf_context_reset ( Ecore_IMF_Context *  ctx)

Notify the Input Method Context that a change such as a change in cursor position has been made.

This will typically cause the Input Method Context to clear the preedit state.

Parameters:
ctxAn #Ecore_IMF_Context.
EAPI void ecore_imf_context_retrieve_surrounding_callback_set ( Ecore_IMF_Context *  ctx,
int(*)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos)  func,
const void *  data 
)

Set the callback to be used on get_surrounding request.

This callback will be called when the Input Method Context module requests the surrounding context.

Parameters:
ctxAn #Ecore_IMF_Context.
funcThe callback to be called.
dataThe data pointer to be passed to func
EAPI void ecore_imf_context_show ( Ecore_IMF_Context *  ctx)

Ask the Input Method Context to show itself.

Parameters:
ctxAn #Ecore_IMF_Context.
EAPI void ecore_imf_context_use_preedit_set ( Ecore_IMF_Context *  ctx,
int  use_preedit 
)

Set whether the IM context should use the preedit string to display feedback.

If is 0 (default is 1), then the IM context may use some other method to display feedback, such as displaying it in a child of the root window.

Parameters:
ctxAn #Ecore_IMF_Context.
use_preeditWhether the IM context should use the preedit string.

Referenced by ecore_imf_context_add().