Package org.gnome.gtk
Class IMContext.Builder<B extends IMContext.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.IMContext.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
IMContextSimple.Builder
,IMMulticontext.Builder
,VimIMContext.Builder
- Enclosing class:
IMContext
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theIMContext
object.onCommit
(IMContext.CommitCallback handler) The ::commit signal is emitted when a complete input sequence has been entered by the user.The ::delete-surrounding signal is emitted when the input method needs to delete all or part of the context surrounding the cursor.The ::preedit-changed signal is emitted whenever the preedit sequence currently being entered has changed.onPreeditEnd
(IMContext.PreeditEndCallback handler) The ::preedit-end signal is emitted when a preediting sequence has been completed or canceled.The ::preedit-start signal is emitted when a new preediting sequence starts.The ::retrieve-surrounding signal is emitted when the input method requires the context surrounding the cursor.setInputHints
(Set<InputHints> inputHints) Additional hints that allow input methods to fine-tune their behaviour.setInputHints
(InputHints... inputHints) Additional hints that allow input methods to fine-tune their behaviour.setInputPurpose
(InputPurpose inputPurpose) The purpose of the text field that the `GtkIMContext is connected to.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theIMContext
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toIMContext
.- Overrides:
build
in classGObject.Builder<B extends IMContext.Builder<B>>
- Returns:
- a new instance of
IMContext
with the properties that were set in the Builder object.
-
setInputHints
Additional hints that allow input methods to fine-tune their behaviour.- Parameters:
inputHints
- the value for theinput-hints
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputPurpose
The purpose of the text field that the `GtkIMContext is connected to.This property can be used by on-screen keyboards and other input methods to adjust their behaviour.
- Parameters:
inputPurpose
- the value for theinput-purpose
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInputHints
Additional hints that allow input methods to fine-tune their behaviour.- Parameters:
inputHints
- the value for theinput-hints
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onCommit
The ::commit signal is emitted when a complete input sequence has been entered by the user.If the commit comes after a preediting sequence, the ::commit signal is emitted after ::preedit-end.
This can be a single character immediately after a key press or the final result of preediting.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onDeleteSurrounding
The ::delete-surrounding signal is emitted when the input method needs to delete all or part of the context surrounding the cursor.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPreeditChanged
The ::preedit-changed signal is emitted whenever the preedit sequence currently being entered has changed.It is also emitted at the end of a preedit sequence, in which case
IMContext.getPreeditString(io.github.jwharm.javagi.base.Out<java.lang.String>, io.github.jwharm.javagi.base.Out<org.gnome.pango.AttrList>, io.github.jwharm.javagi.base.Out<java.lang.Integer>)
returns the empty string.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPreeditEnd
The ::preedit-end signal is emitted when a preediting sequence has been completed or canceled.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPreeditStart
The ::preedit-start signal is emitted when a new preediting sequence starts.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onRetrieveSurrounding
The ::retrieve-surrounding signal is emitted when the input method requires the context surrounding the cursor.The callback should set the input method surrounding context by calling the
IMContext.setSurrounding(java.lang.String, int, int)
method.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-