InputMethodContext

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.

Constructors

this
this(WebKitInputMethodContext* webKitInputMethodContext, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

addOnCommitted
gulong addOnCommitted(void delegate(string, InputMethodContext) dlg, ConnectFlags connectFlags)

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.

addOnDeleteSurrounding
gulong addOnDeleteSurrounding(void delegate(int, uint, InputMethodContext) dlg, ConnectFlags connectFlags)

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.

addOnPreeditChanged
gulong addOnPreeditChanged(void delegate(InputMethodContext) dlg, ConnectFlags connectFlags)

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.

addOnPreeditFinished
gulong addOnPreeditFinished(void delegate(InputMethodContext) dlg, ConnectFlags connectFlags)

Emitted when a preediting sequence has been completed or canceled.

addOnPreeditStarted
gulong addOnPreeditStarted(void delegate(InputMethodContext) dlg, ConnectFlags connectFlags)

Emitted when a new preediting sequence starts.

filterKeyEvent
bool filterKeyEvent(GdkEventKey* keyEvent)

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.

getInputHints
WebKitInputHints getInputHints()

Get the value of the #WebKitInputMethodContext:input-hints property.

getInputMethodContextStruct
WebKitInputMethodContext* getInputMethodContextStruct(bool transferOwnership)

Get the main Gtk struct

getInputPurpose
WebKitInputPurpose getInputPurpose()

Get the value of the #WebKitInputMethodContext:input-purpose property.

getPreedit
void getPreedit(string text, ListG underlines, uint cursorOffset)

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.

getStruct
void* getStruct()

the main Gtk struct as a void*

notifyCursorArea
void notifyCursorArea(int x, int y, int width, int height)

Notify @context that cursor area changed in input associated.

notifyFocusIn
void notifyFocusIn()

Notify @context that input associated has gained focus.

notifyFocusOut
void notifyFocusOut()

Notify @context that input associated has lost focus.

notifySurrounding
void notifySurrounding(string text, int length, uint cursorIndex, uint selectionIndex)

Notify @context that the context surrounding the cursor has changed. If there's no selection @selection_index is the same as @cursor_index.

reset
void reset()

Reset the @context. This will typically cause the input to clear the preedit state.

setEnablePreedit
void setEnablePreedit(bool enabled)

Set whether @context should enable preedit to display feedback.

setInputHints
void setInputHints(WebKitInputHints hints)
setInputPurpose
void setInputPurpose(WebKitInputPurpose purpose)

Set the value of the #WebKitInputMethodContext:input-purpose property.

Static functions

getType
GType getType()

Variables

webKitInputMethodContext
WebKitInputMethodContext* webKitInputMethodContext;

the main Gtk struct

Meta

Since

2.28