Class
WebKit2InputMethodContext
Description [src]
abstract class WebKit2.InputMethodContext : GObject.Object {
parent: GObject
}
Base class for input method contexts.
WebKitInputMethodContext defines the interface to implement WebKit input methods. The input methods are used by WebKit, when editable content is focused, to map from key events to Unicode character strings.
An input method may consume multiple key events in sequence and finally output the composed result. This is called preediting, and an input method may provide feedback about this process by displaying the intermediate composition states as preedit text.
Available since: | 2.28 |
Instance methods
webkit_input_method_context_filter_key_event
Allow key_event
to be handled by the input method. If TRUE
is returned, then no further processing should be
done for the key event.
Available since: 2.28
webkit_input_method_context_get_input_hints
Get the value of the WebKitInputMethodContext:input-hints
property.
Available since: 2.28
webkit_input_method_context_get_input_purpose
Get the value of the WebKitInputMethodContext:input-purpose
property.
Available since: 2.28
webkit_input_method_context_get_preedit
Get the current preedit string for the context
, and a list of WebKitInputMethodUnderline to apply to the string.
The string will be displayed inserted at cursor_offset
.
Available since: 2.28
webkit_input_method_context_notify_cursor_area
Notify context
that cursor area changed in input associated.
Available since: 2.28
webkit_input_method_context_notify_focus_in
Notify context
that input associated has gained focus.
Available since: 2.28
webkit_input_method_context_notify_focus_out
Notify context
that input associated has lost focus.
Available since: 2.28
webkit_input_method_context_notify_surrounding
Notify context
that the context surrounding the cursor has changed.
If there’s no selection selection_index
is the same as cursor_index
.
Available since: 2.28
webkit_input_method_context_reset
Reset the context
. This will typically cause the input to clear the preedit state.
Available since: 2.28
webkit_input_method_context_set_enable_preedit
Set whether context
should enable preedit to display feedback.
Available since: 2.28
webkit_input_method_context_set_input_hints
Set the value of the WebKitInputMethodContext:input-hints
property.
Available since: 2.28
webkit_input_method_context_set_input_purpose
Set the value of the WebKitInputMethodContext:input-purpose
property.
Available since: 2.28
Properties
WebKit2.InputMethodContext:input-hints
The WebKitInputHints
of the input associated with this context.
Available since: 2.28
WebKit2.InputMethodContext:input-purpose
The WebKitInputPurpose
of the input associated with this context.
Available since: 2.28
Signals
WebKit2.InputMethodContext::committed
Emitted when a complete input sequence has been entered by the user. This can be a single character immediately after a key press or the final result of preediting.
Available since: 2.28
WebKit2.InputMethodContext::delete-surrounding
Emitted when the input method wants to delete the context surrounding the cursor.
If offset
is a negative value, it means a position before the cursor.
Available since: 2.28
WebKit2.InputMethodContext::preedit-changed
Emitted whenever the preedit sequence currently being entered has changed.
It is also emitted at the end of a preedit sequence, in which case
webkit_input_method_context_get_preedit()
returns the empty string.
Available since: 2.28
WebKit2.InputMethodContext::preedit-finished
Emitted when a preediting sequence has been completed or canceled.
Available since: 2.28
WebKit2.InputMethodContext::preedit-started
Emitted when a new preediting sequence starts.
Available since: 2.28
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct WebKit2InputMethodContextClass {
GObjectClass parent_class;
void (* preedit_started) (
WebKitInputMethodContext* context
);
void (* preedit_changed) (
WebKitInputMethodContext* context
);
void (* preedit_finished) (
WebKitInputMethodContext* context
);
void (* committed) (
WebKitInputMethodContext* context,
const char* text
);
void (* delete_surrounding) (
WebKitInputMethodContext* context,
int offset,
guint n_chars
);
void (* set_enable_preedit) (
WebKitInputMethodContext* context,
gboolean enabled
);
void (* get_preedit) (
WebKitInputMethodContext* context,
gchar** text,
GList** underlines,
guint* cursor_offset
);
gboolean (* filter_key_event) (
WebKitInputMethodContext* context,
GdkEventKey* key_event
);
void (* notify_focus_in) (
WebKitInputMethodContext* context
);
void (* notify_focus_out) (
WebKitInputMethodContext* context
);
void (* notify_cursor_area) (
WebKitInputMethodContext* context,
int x,
int y,
int width,
int height
);
void (* notify_surrounding) (
WebKitInputMethodContext* context,
const gchar* text,
guint length,
guint cursor_index,
guint selection_index
);
void (* reset) (
WebKitInputMethodContext* context
);
void (* _webkit_reserved0) (
void
);
void (* _webkit_reserved1) (
void
);
void (* _webkit_reserved2) (
void
);
void (* _webkit_reserved3) (
void
);
void (* _webkit_reserved4) (
void
);
void (* _webkit_reserved5) (
void
);
void (* _webkit_reserved6) (
void
);
void (* _webkit_reserved7) (
void
);
}
Class members
parent_class |
|
No description available. | |
preedit_started |
|
No description available. | |
preedit_changed |
|
No description available. | |
preedit_finished |
|
No description available. | |
committed |
|
No description available. | |
delete_surrounding |
|
No description available. | |
set_enable_preedit |
|
No description available. | |
get_preedit |
|
No description available. | |
filter_key_event |
|
No description available. | |
notify_focus_in |
|
No description available. | |
notify_focus_out |
|
No description available. | |
notify_cursor_area |
|
No description available. | |
notify_surrounding |
|
No description available. | |
reset |
|
No description available. | |
_webkit_reserved0 |
|
No description available. | |
_webkit_reserved1 |
|
No description available. | |
_webkit_reserved2 |
|
No description available. | |
_webkit_reserved3 |
|
No description available. | |
_webkit_reserved4 |
|
No description available. | |
_webkit_reserved5 |
|
No description available. | |
_webkit_reserved6 |
|
No description available. | |
_webkit_reserved7 |
|
No description available. |
Virtual methods
WebKit2.InputMethodContextClass.committed
WebKit2.InputMethodContextClass.delete_surrounding
WebKit2.InputMethodContextClass.filter_key_event
Allow key_event
to be handled by the input method. If TRUE
is returned, then no further processing should be
done for the key event.
Available since: 2.28
WebKit2.InputMethodContextClass.get_preedit
Get the current preedit string for the context
, and a list of WebKitInputMethodUnderline to apply to the string.
The string will be displayed inserted at cursor_offset
.
Available since: 2.28
WebKit2.InputMethodContextClass.notify_cursor_area
Notify context
that cursor area changed in input associated.
Available since: 2.28
WebKit2.InputMethodContextClass.notify_focus_in
Notify context
that input associated has gained focus.
Available since: 2.28
WebKit2.InputMethodContextClass.notify_focus_out
Notify context
that input associated has lost focus.
Available since: 2.28
WebKit2.InputMethodContextClass.notify_surrounding
Notify context
that the context surrounding the cursor has changed.
If there’s no selection selection_index
is the same as cursor_index
.
Available since: 2.28
WebKit2.InputMethodContextClass.preedit_changed
WebKit2.InputMethodContextClass.preedit_finished
WebKit2.InputMethodContextClass.preedit_started
WebKit2.InputMethodContextClass.reset
Reset the context
. This will typically cause the input to clear the preedit state.
Available since: 2.28
WebKit2.InputMethodContextClass.set_enable_preedit
Set whether context
should enable preedit to display feedback.
Available since: 2.28