![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
IBusInputContext; gboolean ibus_input_context_process_key_event (IBusInputContext *context, guint32 keyval, guint32 keycode, guint32 state); void ibus_input_context_set_cursor_location (IBusInputContext *context, gint32 x, gint32 y, gint32 w, gint32 h); void ibus_input_context_set_capabilities (IBusInputContext *context, guint32 capabilities); void ibus_input_context_focus_in (IBusInputContext *context); void ibus_input_context_focus_out (IBusInputContext *context); void ibus_input_context_reset (IBusInputContext *context); void ibus_input_context_enable (IBusInputContext *context); void ibus_input_context_disable (IBusInputContext *context);
GObject +----GInitiallyUnowned +----IBusObject +----IBusProxy +----IBusInputContext
"commit-text" : Run Last "cursor-down-lookup-table" : Run Last "cursor-up-lookup-table" : Run Last "disabled" : Run Last "enabled" : Run Last "forward-key-event" : Run Last "hide-auxiliary-text" : Run Last "hide-lookup-table" : Run Last "hide-preedit-text" : Run Last "page-down-lookup-table" : Run Last "page-up-lookup-table" : Run Last "register-properties" : Run Last "show-auxiliary-text" : Run Last "show-lookup-table" : Run Last "show-preedit-text" : Run Last "update-auxiliary-text" : Run Last "update-lookup-table" : Run Last "update-preedit-text" : Run Last "update-property" : Run Last
An IBusInputContext is a proxy object of BusInputContext, which manages the context for input methods that supports text input in various natural languages.
Clients call the IBusInputContext to invoke BusInputContext, through which invokes IBusEngine.
typedef struct _IBusInputContext IBusInputContext;
An opaque data type representing an IBusInputContext.
gboolean ibus_input_context_process_key_event (IBusInputContext *context, guint32 keyval, guint32 keycode, guint32 state);
Pass the key event to input method engine.
Key symbols are characters/symbols produced by key press, for example, pressing "s" generates key symbol "s"; pressing shift-"s" generates key symbol "S". Same key on keyboard may produce different key symbols on different keyboard layout. e.g., "s" key on QWERTY keyboard produces "o" in DVORAK layout.
Unlike key symbol, keycode is only determined by the location of the key, and irrelevant of the keyboard layout.
Briefly speaking, input methods that expect certain keyboard layout should use keycode; otherwise keyval is sufficient. For example, Chewing, Cangjie, Wubi expect an en-US QWERTY keyboard, these should use keycode; while pinyin can rely on keyval only, as it is less sensitive to the keyboard layout change, DVORAK users can still use DVORAK layout to input pinyin.
Use ibus_keymap_lookup_keysym()
to convert keycode to keysym in given keyboard layout.
see_also
: "process-key-event"
|
An IBusInputContext. |
|
Key symbol of a key event. |
|
Keycode of a key event. |
|
Key modifier flags. |
Returns : |
TRUE for successfully process the key; FALSE otherwise. |
void ibus_input_context_set_cursor_location (IBusInputContext *context, gint32 x, gint32 y, gint32 w, gint32 h);
Set the cursor location of IBus input context.
see_also
: "set-cursor-location"
|
An IBusInputContext. |
|
X coordinate of the cursor. |
|
Y coordinate of the cursor. |
|
Width of the cursor. |
|
Height of the cursor. |
void ibus_input_context_set_capabilities (IBusInputContext *context, guint32 capabilities);
Set the capabilities flags of client application.
see_also
: "set-capabilities"
|
An IBusInputContext. |
|
Capabilities flags of IBusEngine, see IBusCapabilite |
void ibus_input_context_focus_in (IBusInputContext *context);
Invoked when the client application get focus.
see_also
: "focus_in".
|
An IBusInputContext. |
void ibus_input_context_focus_out (IBusInputContext *context);
Invoked when the client application get focus.
see_also
: "focus_out".
|
An IBusInputContext. |
void ibus_input_context_reset (IBusInputContext *context);
Invoked when the IME is reset.
see_also
: "reset"
|
An IBusInputContext. |
void ibus_input_context_enable (IBusInputContext *context);
Invoked when the IME is enabled, either by IME switch hotkey or select from the menu.
see_also
: "enable"
|
An IBusInputContext. |
void ibus_input_context_disable (IBusInputContext *context);
Invoked when the IME is disabled, either by IME switch hotkey or select from the menu.
see_also
: "disable"
|
An IBusInputContext. |
"commit-text"
signalvoid user_function (IBusInputContext *context, IBusText *text, gpointer user_data) : Run Last
Emitted when the text is going to be committed.
|
An IBusInputContext. |
|
Text to be committed. |
|
user data set when the signal handler was connected. |
"cursor-down-lookup-table"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to select next candidate of lookup table.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"cursor-up-lookup-table"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to select previous candidate of lookup table.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"disabled"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted when an IME is disabled.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"enabled"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted when an IME is enabled.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"forward-key-event"
signalvoid user_function (IBusInputContext *context, guint keyval, guint keycode, guint modifiers, gpointer user_data) : Run Last
Emitted to forward key event from IME to client of IME.
|
An IBusInputContext. |
|
Key symbol of the keyboard event. |
|
Key symbol of the keyboard event. |
|
Key modifier flags. |
|
user data set when the signal handler was connected. |
"hide-auxiliary-text"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to hide auxiliary text.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"hide-lookup-table"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to hide lookup table.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"hide-preedit-text"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to hide preedit text.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"page-down-lookup-table"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to view the next page of lookup table.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"page-up-lookup-table"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to view the previous page of lookup table.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"register-properties"
signalvoid user_function (IBusInputContext *context, IBusPropList *props, gpointer user_data) : Run Last
Emitted to register the properties in props
.
|
An IBusInputContext. |
|
An IBusPropList that contains properties. |
|
user data set when the signal handler was connected. |
"show-auxiliary-text"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to show auxiliary text.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"show-lookup-table"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to show lookup table.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"show-preedit-text"
signalvoid user_function (IBusInputContext *context, gpointer user_data) : Run Last
Emitted to show preedit text.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"update-auxiliary-text"
signalvoid user_function (IBusInputContext *context, IBusText *arg1, gboolean arg2, gpointer user_data) : Run Last
Emitted to hide auxilary text.
|
An IBusInputContext. |
|
user data set when the signal handler was connected. |
"update-lookup-table"
signalvoid user_function (IBusInputContext *context, IBusLookupTable *table, gboolean visible, gpointer user_data) : Run Last
Emitted to update lookup table.
|
An IBusInputContext. |
|
An IBusLookupTable to be updated. |
|
Whether the table should be visible. |
|
user data set when the signal handler was connected. |
"update-preedit-text"
signalvoid user_function (IBusInputContext *context, IBusText *text, guint cursor_pos, gboolean visible, gpointer user_data) : Run Last
Emitted to update preedit text.
|
An IBusInputContext. |
|
Text to be updated. |
|
Cursor position. |
|
Whether the update is visible. |
|
user data set when the signal handler was connected. |
"update-property"
signalvoid user_function (IBusInputContext *context, IBusProperty *prop, gpointer user_data) : Run Last
Emitted to update the property prop
.
|
An IBusInputContext. |
|
The IBusProperty to be updated. |
|
user data set when the signal handler was connected. |