WPEPlatform.InputMethodContext
Description: Reference for WPEPlatform.InputMethodContext

### Class

# WPEPlatformInputMethodContext

#### Description

    abstract class WPEPlatform.InputMethodContext : GObject.Object
    {
      WPEInputMethodContextPrivate* priv
    }

No description available.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### wpe_input_method_context_new

Create a new `WPEInputMethodContext` for `view`.

#### Instance methods

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

###### wpe_input_method_context_focus_in

Notify `context` that input associated has gained focus.

###### wpe_input_method_context_focus_out

Notify `context` that input associated has lost focus.

###### wpe_input_method_context_get_display

Get the `WPEDisplay` of `context`.

###### wpe_input_method_context_get_input_hints

Get hints of `context` that allow input methods to fine-tune their behaviour.

###### wpe_input_method_context_get_input_purpose

Get the purpose of the text field that `context` is connected to.

###### wpe_input_method_context_get_preedit_string

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

###### wpe_input_method_context_get_view

Get the `WPEView` of `context`.

###### wpe_input_method_context_reset

Reset the `context`.

###### wpe_input_method_context_set_cursor_area

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

###### wpe_input_method_context_set_input_hints

Set hints of `context` that allow input methods to fine-tune their behaviour.

###### wpe_input_method_context_set_input_purpose

Set the purpose of the text field that `context` is connected to.

###### wpe_input_method_context_set_surrounding

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

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

Please see GObject for a full list of methods.

#### Properties

###### WPEPlatform.InputMethodContext:input-hints

Additional hints that allow input methods to fine-tune their behaviour.

###### WPEPlatform.InputMethodContext:input-purpose

The purpose of the text field that the `WPEInputMethodContext` is connected to.

###### WPEPlatform.InputMethodContext:view

The `WPEView` associated to the `WPEInputMethodContext`.

#### Signals

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

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

###### WPEPlatform.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 `wpe_input_method_context_get_preedit()` returns the empty string.

###### WPEPlatform.InputMethodContext::preedit-finished

Emitted when a preediting sequence has been completed or canceled.

###### WPEPlatform.InputMethodContext::preedit-started

No description available.

##### Signals inherited from GObject (1)

###### GObject::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 WPEPlatformInputMethodContextClass {
      GObjectClass parent_class;
      void (* get_preedit_string) (
        WPEInputMethodContext* context,
        gchar** text,
        GList** underlines,
        guint* cursor_offset
      );
      gboolean (* filter_key_event) (
        WPEInputMethodContext* context,
        WPEEvent* event
      );
      void (* focus_in) (
        WPEInputMethodContext* context
      );
      void (* focus_out) (
        WPEInputMethodContext* context
      );
      void (* set_cursor_area) (
        WPEInputMethodContext* context,
        int x,
        int y,
        int width,
        int height
      );
      void (* set_surrounding) (
        WPEInputMethodContext* context,
        const gchar* text,
        guint length,
        guint cursor_index,
        guint selection_index
      );
      void (* reset) (
        WPEInputMethodContext* context
      );
      gpointer padding;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`get_preedit_string: void (* get_preedit_string) ( WPEInputMethodContext* context, gchar** text, GList** underlines, guint* cursor_offset )`

  No description available.

`filter_key_event: gboolean (* filter_key_event) ( WPEInputMethodContext* context, WPEEvent* event )`

  No description available.

`focus_in: void (* focus_in) ( WPEInputMethodContext* context )`

  No description available.

`focus_out: void (* focus_out) ( WPEInputMethodContext* context )`

  No description available.

`set_cursor_area: void (* set_cursor_area) ( WPEInputMethodContext* context, int x, int y, int width, int height )`

  No description available.

`set_surrounding: void (* set_surrounding) ( WPEInputMethodContext* context, const gchar* text, guint length, guint cursor_index, guint selection_index )`

  No description available.

`reset: void (* reset) ( WPEInputMethodContext* context )`

  No description available.

`padding: gpointer`

  No description available.

#### Virtual methods

###### WPEPlatform.InputMethodContextClass.filter_key_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.

###### WPEPlatform.InputMethodContextClass.focus_in

Notify `context` that input associated has gained focus.

###### WPEPlatform.InputMethodContextClass.focus_out

Notify `context` that input associated has lost focus.

###### WPEPlatform.InputMethodContextClass.get_preedit_string

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

###### WPEPlatform.InputMethodContextClass.reset

Reset the `context`.

###### WPEPlatform.InputMethodContextClass.set_cursor_area

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

###### WPEPlatform.InputMethodContextClass.set_surrounding

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