Top | ![]() |
![]() |
![]() |
![]() |
void | clutter_im_context_get_preedit_string () |
gboolean | clutter_im_context_filter_keypress () |
void | clutter_im_context_focus_in () |
void | clutter_im_context_focus_out () |
void | clutter_im_context_show () |
void | clutter_im_context_hide () |
void | clutter_im_context_reset () |
void | clutter_im_context_set_cursor_location () |
void | clutter_im_context_set_use_preedit () |
void | clutter_im_context_set_surrounding () |
gboolean | clutter_im_context_get_surrounding () |
gboolean | clutter_im_context_delete_surrounding () |
void | commit | Run Last |
gboolean | delete-surrounding | Run Last |
void | preedit-changed | Run Last |
void | preedit-end | Run Last |
void | preedit-start | Run Last |
gboolean | retrieve-surrounding | Run Last |
void clutter_im_context_get_preedit_string (ClutterIMContext *context
,gchar **str
,PangoAttrList **attrs
,gint *cursor_pos
);
Retrieve the current preedit string for the input context, and a list of attributes to apply to the string. This string should be displayed inserted at the insertion point.
context |
||
str |
location to store the retrieved string. The
string retrieved must be freed with |
|
attrs |
location to store the retrieved attribute list.
When you are done with this list, you must
unreference it with |
|
cursor_pos |
location to store position of cursor (in characters) within the preedit string. |
gboolean clutter_im_context_filter_keypress (ClutterIMContext *context
,ClutterKeyEvent *event
);
Allow an input method to internally handle key press and release
events. If this function returns TRUE
, then no further processing
should be done for this key event.
void
clutter_im_context_focus_in (ClutterIMContext *context
);
Notify the input method that the widget to which this input context corresponds has gained focus. The input method may, for example, change the displayed feedback to reflect this change.
void
clutter_im_context_focus_out (ClutterIMContext *context
);
Notify the input method that the widget to which this input context corresponds has lost focus. The input method may, for example, change the displayed feedback or reset the contexts state to reflect this change.
void
clutter_im_context_show (ClutterIMContext *context
);
Notify the input method that the IM UI need to be shown
void
clutter_im_context_hide (ClutterIMContext *context
);
Notify the input method that the IM UI need to be hidden
void
clutter_im_context_reset (ClutterIMContext *context
);
Notify the input method that a change such as a change in cursor position has been made. This will typically cause the input method to clear the preedit state.
void clutter_im_context_set_cursor_location (ClutterIMContext *context
,const ClutterIMRectangle *area
);
Notify the input method that a change in cursor position has been made. The location is relative to the client window.
void clutter_im_context_set_use_preedit (ClutterIMContext *context
,gboolean use_preedit
);
Sets whether the IM context should use the preedit string
to display feedback. If use_preedit
is FALSE (default
is TRUE), then the IM context may use some other method to display
feedback, such as displaying it in a child of the root window.
void clutter_im_context_set_surrounding (ClutterIMContext *context
,const gchar *text
,gint len
,gint cursor_index
);
Sets surrounding context around the insertion point and preedit string. This function is expected to be called in response to the ClutterIMContext::retrieve_surrounding signal, and will likely have no effect if called at other times.
gboolean clutter_im_context_get_surrounding (ClutterIMContext *context
,gchar **text
,gint *cursor_index
);
Retrieves context around the insertion point. Input methods typically want context in order to constrain input text based on existing text; this is important for languages such as Thai where only some sequences of characters are allowed.
This function is implemented by emitting the
ClutterIMContext::retrieve_surrounding signal on the input method; in
response to this signal, a widget should provide as much context as
is available, up to an entire paragraph, by calling
clutter_im_context_set_surrounding()
. Note that there is no obligation
for a widget to respond to the ::retrieve_surrounding signal, so input
methods must be prepared to function without context.
gboolean clutter_im_context_delete_surrounding (ClutterIMContext *context
,gint offset
,gint n_chars
);
Asks the widget that the input context is attached to to delete
characters around the cursor position by emitting the
ClutterIMContext::delete_surrounding signal. Note that offset
and n_chars
are in characters not in bytes which differs from the usage other
places in ClutterIMContext.
In order to use this function, you should first call
clutter_im_context_get_surrounding()
to get the current context, and
call this function immediately afterwards to make sure that you
know what you are deleting. You should also account for the fact
that even if the signal was handled, the input context might not
have deleted all the characters that were requested to be deleted.
This function is used by an input method that wants to make subsitutions in the existing text in response to new input. It is not useful for applications.
“commit”
signalvoid user_function (ClutterIMContext *context, char *str, gpointer user_data)
The ::commit signal is emitted when input method have some data to commit
context |
The context object that receive this signal |
|
str |
The UTF_8 string been committed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“delete-surrounding”
signalgboolean user_function (ClutterIMContext *context, int offset, int n_chars, gpointer user_data)
context |
The context object that receive this signal |
|
offset |
offset from cursor position in chars; a negative value means start before the cursor. |
|
n_chars |
number of characters to delete. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“preedit-changed”
signalvoid user_function (ClutterIMContext *context, gpointer user_data)
context |
The context object that receive this signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“preedit-end”
signalvoid user_function (ClutterIMContext *context, gpointer user_data)
context |
The context object that receive this signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“preedit-start”
signalvoid user_function (ClutterIMContext *context, gpointer user_data)
context |
The context object that receive this signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“retrieve-surrounding”
signalgboolean user_function (ClutterIMContext *context, gpointer user_data)
context |
The context object that receive this signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last