Signal

WPEPlatformInputMethodContext::delete-surrounding

Declaration

void
delete_surrounding (
  WPEInputMethodContext* self,
  gint offset,
  guint n_chars,
  gpointer user_data
)

Description [src]

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 start of the selection, or before the cursor if there is no selection. The text to be deleted can include part of the selection. If n_chars is 0, nothing is deleted and the cursor is moved by offset.

Both offset and n_chars are counted in UTF-16 code units, not in characters: a character outside the Basic Multilingual Plane, like most emoji, counts as 2. Note that the indexes passed to wpe_input_method_context_set_surrounding() are in bytes instead.

Default handler:

The default handler is called after the handlers added via g_signal_connect().

Parameters

offset

Type: gint

The offset of the text to be deleted from the start of the selection, in UTF-16 code units.

n_chars

Type: guint

The number of UTF-16 code units to be deleted.