It derives from <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.
parent-instanceprivThe <WebKitInputHints> of the input associated
with this context.
Its value is a <WebKitInputHints> (or, to set
it, a list of its symbols, or one of them).
Set it with (set! (input-method-context:input-hints self) value).
The <WebKitInputPurpose> of the input
associated with this context.
Its value is a <WebKitInputPurpose> (or, to
set it, one of its symbols).
Set it with (set! (input-method-context:input-purpose self)
value).
Allow key-event to be handled by the input method.
If #t is returned, then no further processing should be done for
the key event.
Passed: a <WebKitInputMethodContext>.
Passed: a <GdkEvent>.
the key event to filter
Returned: a boolean.
#t if the key event was handled, or #f otherwise
Get the value of the input-method-context:input-hints property.
Passed: a <WebKitInputMethodContext>.
Returned: a <WebKitInputHints>.
the <WebKitInputHints> of the input associated
with self
Get the value of the input-method-context:input-purpose property.
Passed: a <WebKitInputMethodContext>.
Returned: a <WebKitInputPurpose>.
the <WebKitInputPurpose> of the input
associated with self
Get the pre-edit string and a list of WebKitInputMethodUnderline.
Get the current pre-edit string for the self, and a list of WebKitInputMethodUnderline to apply to the string. The string will be displayed inserted at cursor-offset.
Passed: a <WebKitInputMethodContext>.
Returned: a string, or #f.
location to store the preedit string
Returned: a list, each a
<WebKitInputMethodUnderline>, or
#f.
location to store the underlines as a GList of
<WebKitInputMethodUnderline>
Returned: an unsigned 32-bit integer.
location to store the position of cursor in preedit string
Notify self that cursor area changed in input associated.
Passed: a <WebKitInputMethodContext>.
Passed: a 32-bit integer.
the x coordinate of cursor location
Passed: a 32-bit integer.
the y coordinate of cursor location
Passed: a 32-bit integer.
the width of cursor area
Passed: a 32-bit integer.
the height of cursor area
Notify self that input associated has gained focus.
Passed: a <WebKitInputMethodContext>.
Notify self that input associated has lost focus.
Passed: a <WebKitInputMethodContext>.
Notify self that the context surrounding the cursor has changed.
If there’s no selection selection-index is the same as cursor-index.
Passed: a <WebKitInputMethodContext>.
Passed: a string.
text surrounding the insertion point
Passed: a 32-bit integer.
the length of text, or -1 if text is nul-terminated
Passed: an unsigned 32-bit integer.
the byte index of the insertion cursor within text.
Passed: an unsigned 32-bit integer.
the byte index of the selection cursor within text.
Reset the self.
This will typically cause the input to clear the preedit state.
Passed: a <WebKitInputMethodContext>.
Set whether self should enable preedit to display feedback.
Passed: a <WebKitInputMethodContext>.
Passed: a boolean.
whether to enable preedit
Set the value of the input-method-context:input-hints property.
Passed: a <WebKitInputMethodContext>.
Passed: a <WebKitInputHints>, or a list of its
symbols, or one of them.
Set the value of the input-method-context:input-purpose property.
Passed: a <WebKitInputMethodContext>.
Passed: a <WebKitInputPurpose>, or one of its
symbols.
Connect a handler with (connect object
input-method-context:committed handler). It is called as
(handler self text).
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.
Passed: a <WebKitInputMethodContext>.
Passed: a string.
the string result
Connect a handler with (connect object
input-method-context:delete-surrounding handler). It is called as
(handler self offset n-chars).
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.
Passed: a <WebKitInputMethodContext>.
Passed: a 32-bit integer.
the character offset from the cursor position of the text to be deleted.
Passed: an unsigned 32-bit integer.
the number of characters to be deleted
Connect a handler with (connect object
input-method-context:preedit-changed handler). It is called as
(handler self).
Emitted whenever the preedit sequence currently being entered has
changed. It is also emitted at the end of a preedit sequence, in which
case input-method-context:get-preedit returns the empty
string.
Passed: a <WebKitInputMethodContext>.
Connect a handler with (connect object
input-method-context:preedit-finished handler). It is called as
(handler self).
Emitted when a preediting sequence has been completed or canceled.
Passed: a <WebKitInputMethodContext>.
Connect a handler with (connect object
input-method-context:preedit-started handler). It is called as
(handler self).
Emitted when a new preediting sequence starts.
Passed: a <WebKitInputMethodContext>.
To override it in a new class, give register-type #:vfuncs
`((committed . ,procedure)). The procedure is called as
(procedure self text).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Passed: a string.
To override it in a new class, give register-type #:vfuncs
`((delete-surrounding . ,procedure)). The procedure is called as
(procedure self offset n-chars).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Passed: a 32-bit integer.
Passed: an unsigned 32-bit integer.
Allow key-event to be handled by the input method.
If #t is returned, then no further processing should be done for
the key event.
To override it in a new class, give register-type #:vfuncs
`((filter-key-event . ,procedure)). The procedure is called as
(procedure self key-event) ⇒ %return.
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Passed: a <GdkEvent>.
the key event to filter
Returned: a boolean.
#t if the key event was handled, or #f otherwise
Get the pre-edit string and a list of WebKitInputMethodUnderline.
Get the current pre-edit string for the self, and a list of WebKitInputMethodUnderline to apply to the string. The string will be displayed inserted at cursor-offset.
To override it in a new class, give register-type #:vfuncs
`((get-preedit . ,procedure)). The procedure is called as
(procedure self) ⇒ text underlines cursor-offset.
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Returned: a string, or #f.
location to store the preedit string
Returned: a list, each a
<WebKitInputMethodUnderline>, or
#f.
location to store the underlines as a GList of
<WebKitInputMethodUnderline>
Returned: an unsigned 32-bit integer.
location to store the position of cursor in preedit string
Notify self that cursor area changed in input associated.
To override it in a new class, give register-type #:vfuncs
`((notify-cursor-area . ,procedure)). The procedure is called as
(procedure self x y width height).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Passed: a 32-bit integer.
the x coordinate of cursor location
Passed: a 32-bit integer.
the y coordinate of cursor location
Passed: a 32-bit integer.
the width of cursor area
Passed: a 32-bit integer.
the height of cursor area
Notify self that input associated has gained focus.
To override it in a new class, give register-type #:vfuncs
`((notify-focus-in . ,procedure)). The procedure is called as
(procedure self).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Notify self that input associated has lost focus.
To override it in a new class, give register-type #:vfuncs
`((notify-focus-out . ,procedure)). The procedure is called as
(procedure self).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Notify self that the context surrounding the cursor has changed.
If there’s no selection selection-index is the same as cursor-index.
To override it in a new class, give register-type #:vfuncs
`((notify-surrounding . ,procedure)). The procedure is called as
(procedure self text length cursor-index selection-index).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Passed: a string.
text surrounding the insertion point
Passed: an unsigned 32-bit integer.
the length of text, or -1 if text is nul-terminated
Passed: an unsigned 32-bit integer.
the byte index of the insertion cursor within text.
Passed: an unsigned 32-bit integer.
the byte index of the selection cursor within text.
To override it in a new class, give register-type #:vfuncs
`((preedit-changed . ,procedure)). The procedure is called as
(procedure self).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
To override it in a new class, give register-type #:vfuncs
`((preedit-finished . ,procedure)). The procedure is called as
(procedure self).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
To override it in a new class, give register-type #:vfuncs
`((preedit-started . ,procedure)). The procedure is called as
(procedure self).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Reset the self.
This will typically cause the input to clear the preedit state.
To override it in a new class, give register-type #:vfuncs
`((reset . ,procedure)). The procedure is called as (procedure
self).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Set whether self should enable preedit to display feedback.
To override it in a new class, give register-type #:vfuncs
`((set-enable-preedit . ,procedure)). The procedure is called as
(procedure self enabled).
Passed: the class whose implementation to call:
<WebKitInputMethodContext>, or a class
that derives from it, or its GType number.
Passed: a <WebKitInputMethodContext>.
Passed: a boolean.
whether to enable preedit