InputMethodContext

open class InputMethodContext(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Skipped during bindings generation

  • parameter text: text: Out parameter is not supported

Since

2.28

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The #WebKitInputHints of the input associated with this context.

Link copied to clipboard

The #WebKitInputPurpose of the input associated with this context.

Link copied to clipboard
val webkitInputMethodContextPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun connectCommitted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (text: String) -> Unit): <Error class: unknown class>

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.

Link copied to clipboard
fun connectDeleteSurrounding(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>) -> Unit): <Error class: unknown class>

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.

Link copied to clipboard
fun connectPreeditChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

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.

Link copied to clipboard
fun connectPreeditFinished(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when a preediting sequence has been completed or canceled.

Link copied to clipboard
fun connectPreeditStarted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when a new preediting sequence starts.

Link copied to clipboard
open fun filterKeyEvent(keyEvent: <Error class: unknown class>): Boolean

Allow @key_event to be handled by the input method.

Link copied to clipboard
open fun notifyCursorArea(x: <Error class: unknown class>, y: <Error class: unknown class>, width: <Error class: unknown class>, height: <Error class: unknown class>)

Notify @context that cursor area changed in input associated.

Link copied to clipboard
open fun notifyFocusIn()

Notify @context that input associated has gained focus.

Link copied to clipboard
open fun notifyFocusOut()

Notify @context that input associated has lost focus.

Link copied to clipboard
open fun notifySurrounding(text: String, length: <Error class: unknown class>, cursorIndex: <Error class: unknown class>, selectionIndex: <Error class: unknown class>)

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

Link copied to clipboard
open fun reset()

Reset the @context.

Link copied to clipboard
open fun setEnablePreedit(enabled: Boolean)

Set whether @context should enable preedit to display feedback.