WPEWebKit.InputMethodContext
Description: Reference for WPEWebKit.InputMethodContext

### Class

# WPEWebKitInputMethodContext

#### Description [src]

    abstract class WPEWebKit.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

#### Ancestors

- GObject

#### 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 pre-edit string and a list of WebKitInputMethodUnderline.

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.

Available since: 2.28

###### webkit_input_method_context_reset

Reset the `context`.

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

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### WPEWebKit.InputMethodContext:input-hints

The `WebKitInputHints` of the input associated with this context.

Available since: 2.28

###### WPEWebKit.InputMethodContext:input-purpose

The `WebKitInputPurpose` of the input associated with this context.

Available since: 2.28

#### Signals

###### WPEWebKit.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

###### WPEWebKit.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

###### WPEWebKit.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

###### WPEWebKit.InputMethodContext::preedit-finished

Emitted when a preediting sequence has been completed or canceled.

Available since: 2.28

###### WPEWebKit.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 WPEWebKitInputMethodContextClass {
      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,
        wpe_input_keyboard_event* 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` |
    GObjectClass
| No description available.
`preedit_started` |
    void (* preedit_started) (
        WebKitInputMethodContext* context
      )
| No description available.
`preedit_changed` |
    void (* preedit_changed) (
        WebKitInputMethodContext* context
      )
| No description available.
`preedit_finished` |
    void (* preedit_finished) (
        WebKitInputMethodContext* context
      )
| No description available.
`committed` |
    void (* committed) (
        WebKitInputMethodContext* context,
        const char* text
      )
| No description available.
`delete_surrounding` |
    void (* delete_surrounding) (
        WebKitInputMethodContext* context,
        int offset,
        guint n_chars
      )
| No description available.
`set_enable_preedit` |
    void (* set_enable_preedit) (
        WebKitInputMethodContext* context,
        gboolean enabled
      )
| No description available.
`get_preedit` |
    void (* get_preedit) (
        WebKitInputMethodContext* context,
        gchar** text,
        GList** underlines,
        guint* cursor_offset
      )
| No description available.
`filter_key_event` |
    gboolean (* filter_key_event) (
        WebKitInputMethodContext* context,
        wpe_input_keyboard_event* key_event
      )
| No description available.
`notify_focus_in` |
    void (* notify_focus_in) (
        WebKitInputMethodContext* context
      )
| No description available.
`notify_focus_out` |
    void (* notify_focus_out) (
        WebKitInputMethodContext* context
      )
| No description available.
`notify_cursor_area` |
    void (* notify_cursor_area) (
        WebKitInputMethodContext* context,
        int x,
        int y,
        int width,
        int height
      )
| No description available.
`notify_surrounding` |
    void (* notify_surrounding) (
        WebKitInputMethodContext* context,
        const gchar* text,
        guint length,
        guint cursor_index,
        guint selection_index
      )
| No description available.
`reset` |
    void (* reset) (
        WebKitInputMethodContext* context
      )
| No description available.
`_webkit_reserved0` |
    void (* _webkit_reserved0) (
    void
      )
| No description available.
`_webkit_reserved1` |
    void (* _webkit_reserved1) (
    void
      )
| No description available.
`_webkit_reserved2` |
    void (* _webkit_reserved2) (
    void
      )
| No description available.
`_webkit_reserved3` |
    void (* _webkit_reserved3) (
    void
      )
| No description available.
`_webkit_reserved4` |
    void (* _webkit_reserved4) (
    void
      )
| No description available.
`_webkit_reserved5` |
    void (* _webkit_reserved5) (
    void
      )
| No description available.
`_webkit_reserved6` |
    void (* _webkit_reserved6) (
    void
      )
| No description available.
`_webkit_reserved7` |
    void (* _webkit_reserved7) (
    void
      )
| No description available.

#### Virtual methods

###### WPEWebKit.InputMethodContextClass.committed

No description available.

###### WPEWebKit.InputMethodContextClass.delete_surrounding

No description available.

###### WPEWebKit.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

###### WPEWebKit.InputMethodContextClass.get_preedit

Get the pre-edit string and a list of WebKitInputMethodUnderline.

Available since: 2.28

###### WPEWebKit.InputMethodContextClass.notify_cursor_area

Notify `context` that cursor area changed in input associated.

Available since: 2.28

###### WPEWebKit.InputMethodContextClass.notify_focus_in

Notify `context` that input associated has gained focus.

Available since: 2.28

###### WPEWebKit.InputMethodContextClass.notify_focus_out

Notify `context` that input associated has lost focus.

Available since: 2.28

###### WPEWebKit.InputMethodContextClass.notify_surrounding

Notify `context` that the context surrounding the cursor has changed.

Available since: 2.28

###### WPEWebKit.InputMethodContextClass.preedit_changed

No description available.

###### WPEWebKit.InputMethodContextClass.preedit_finished

No description available.

###### WPEWebKit.InputMethodContextClass.preedit_started

No description available.

###### WPEWebKit.InputMethodContextClass.reset

Reset the `context`.

Available since: 2.28

###### WPEWebKit.InputMethodContextClass.set_enable_preedit

Set whether `context` should enable preedit to display feedback.

Available since: 2.28