gi-webkit2-4.0.30: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Objects.InputMethodContext

Description

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.

Since: 2.28

Synopsis

Exported types

newtype InputMethodContext Source #

Memory-managed wrapper type.

Constructors

InputMethodContext (ManagedPtr InputMethodContext) 

Instances

Instances details
Eq InputMethodContext Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

GObject InputMethodContext Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

ManagedPtrNewtype InputMethodContext Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

TypedObject InputMethodContext Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

Methods

glibType :: IO GType

HasParentTypes InputMethodContext Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

IsGValue (Maybe InputMethodContext) Source #

Convert InputMethodContext to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

type ParentTypes InputMethodContext Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

type ParentTypes InputMethodContext = '[Object]

class (GObject o, IsDescendantOf InputMethodContext o) => IsInputMethodContext o Source #

Type class for types which can be safely cast to InputMethodContext, for instance with toInputMethodContext.

Instances

Instances details
(GObject o, IsDescendantOf InputMethodContext o) => IsInputMethodContext o Source # 
Instance details

Defined in GI.WebKit2.Objects.InputMethodContext

toInputMethodContext :: (MonadIO m, IsInputMethodContext o) => o -> m InputMethodContext Source #

Cast to InputMethodContext, for types for which this is known to be safe. For general casts, use castTo.

Methods

filterKeyEvent

inputMethodContextFilterKeyEvent Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> EventKey

keyEvent: the key event to filter

-> m Bool

Returns: True if the key event was handled, or False otherwise

Allow keyEvent to be handled by the input method.

If True is returned, then no further processing should be done for the key event.

Since: 2.28

getInputHints

inputMethodContextGetInputHints Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> m [InputHints]

Returns: the InputHints of the input associated with context

Get the value of the InputMethodContext:inputHints property.

Since: 2.28

getInputPurpose

inputMethodContextGetInputPurpose Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> m InputPurpose

Returns: the InputPurpose of the input associated with context

Get the value of the InputMethodContext:inputPurpose property.

Since: 2.28

getPreedit

inputMethodContextGetPreedit Source #

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

Get the current pre-edit string for the context, and a list of WebKitInputMethodUnderline to apply to the string. The string will be displayed inserted at cursorOffset.

Since: 2.28

notifyCursorArea

inputMethodContextNotifyCursorArea Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> Int32

x: the x coordinate of cursor location

-> Int32

y: the y coordinate of cursor location

-> Int32

width: the width of cursor area

-> Int32

height: the height of cursor area

-> m () 

Notify context that cursor area changed in input associated.

Since: 2.28

notifyFocusIn

inputMethodContextNotifyFocusIn Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> m () 

Notify context that input associated has gained focus.

Since: 2.28

notifyFocusOut

inputMethodContextNotifyFocusOut Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> m () 

Notify context that input associated has lost focus.

Since: 2.28

notifySurrounding

inputMethodContextNotifySurrounding Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> Text

text: text surrounding the insertion point

-> Int32

length: the length of text, or -1 if text is nul-terminated

-> Word32

cursorIndex: the byte index of the insertion cursor within text.

-> Word32

selectionIndex: the byte index of the selection cursor within text.

-> m () 

Notify context that the context surrounding the cursor has changed.

If there's no selection selectionIndex is the same as cursorIndex.

Since: 2.28

reset

inputMethodContextReset Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> m () 

Reset the context.

This will typically cause the input to clear the preedit state.

Since: 2.28

setEnablePreedit

inputMethodContextSetEnablePreedit Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> Bool

enabled: whether to enable preedit

-> m () 

Set whether context should enable preedit to display feedback.

Since: 2.28

setInputHints

inputMethodContextSetInputHints Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> [InputHints]

hints: a InputHints

-> m () 

Set the value of the InputMethodContext:inputHints property.

Since: 2.28

setInputPurpose

inputMethodContextSetInputPurpose Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputMethodContext a) 
=> a

context: a InputMethodContext

-> InputPurpose

purpose: a InputPurpose

-> m () 

Set the value of the InputMethodContext:inputPurpose property.

Since: 2.28

Properties

inputHints

The InputHints of the input associated with this context.

Since: 2.28

constructInputMethodContextInputHints :: (IsInputMethodContext o, MonadIO m) => [InputHints] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “input-hints” property. This is rarely needed directly, but it is used by new.

getInputMethodContextInputHints :: (MonadIO m, IsInputMethodContext o) => o -> m [InputHints] Source #

Get the value of the “input-hints” property. When overloading is enabled, this is equivalent to

get inputMethodContext #inputHints

setInputMethodContextInputHints :: (MonadIO m, IsInputMethodContext o) => o -> [InputHints] -> m () Source #

Set the value of the “input-hints” property. When overloading is enabled, this is equivalent to

set inputMethodContext [ #inputHints := value ]

inputPurpose

The InputPurpose of the input associated with this context.

Since: 2.28

constructInputMethodContextInputPurpose :: (IsInputMethodContext o, MonadIO m) => InputPurpose -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “input-purpose” property. This is rarely needed directly, but it is used by new.

getInputMethodContextInputPurpose :: (MonadIO m, IsInputMethodContext o) => o -> m InputPurpose Source #

Get the value of the “input-purpose” property. When overloading is enabled, this is equivalent to

get inputMethodContext #inputPurpose

setInputMethodContextInputPurpose :: (MonadIO m, IsInputMethodContext o) => o -> InputPurpose -> m () Source #

Set the value of the “input-purpose” property. When overloading is enabled, this is equivalent to

set inputMethodContext [ #inputPurpose := value ]

Signals

committed

type InputMethodContextCommittedCallback Source #

Arguments

 = Text

text: the string result

-> IO () 

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.

Since: 2.28

afterInputMethodContextCommitted :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextCommittedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the committed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after inputMethodContext #committed callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onInputMethodContextCommitted :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextCommittedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the committed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on inputMethodContext #committed callback

deleteSurrounding

type InputMethodContextDeleteSurroundingCallback Source #

Arguments

 = Int32

offset: the character offset from the cursor position of the text to be deleted.

-> Word32

nChars: the number of characters to be deleted

-> IO () 

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.

Since: 2.28

afterInputMethodContextDeleteSurrounding :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextDeleteSurroundingCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deleteSurrounding signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after inputMethodContext #deleteSurrounding callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onInputMethodContextDeleteSurrounding :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextDeleteSurroundingCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deleteSurrounding signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on inputMethodContext #deleteSurrounding callback

preeditChanged

type InputMethodContextPreeditChangedCallback = IO () Source #

Emitted whenever the preedit sequence currently being entered has changed. It is also emitted at the end of a preedit sequence, in which case inputMethodContextGetPreedit returns the empty string.

Since: 2.28

afterInputMethodContextPreeditChanged :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextPreeditChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after inputMethodContext #preeditChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onInputMethodContextPreeditChanged :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextPreeditChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on inputMethodContext #preeditChanged callback

preeditFinished

type InputMethodContextPreeditFinishedCallback = IO () Source #

Emitted when a preediting sequence has been completed or canceled.

Since: 2.28

afterInputMethodContextPreeditFinished :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextPreeditFinishedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditFinished signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after inputMethodContext #preeditFinished callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onInputMethodContextPreeditFinished :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextPreeditFinishedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditFinished signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on inputMethodContext #preeditFinished callback

preeditStarted

type InputMethodContextPreeditStartedCallback = IO () Source #

Emitted when a new preediting sequence starts.

Since: 2.28

afterInputMethodContextPreeditStarted :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextPreeditStartedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditStarted signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after inputMethodContext #preeditStarted callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onInputMethodContextPreeditStarted :: (IsInputMethodContext a, MonadIO m) => a -> ((?self :: a) => InputMethodContextPreeditStartedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditStarted signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on inputMethodContext #preeditStarted callback