Class IMContext.Builder<B extends 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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theIMContextobject.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.Emitted when the filtered keys do not compose to a single valid character.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 GObject.Builder
onNotifyMethods inherited from class Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theIMContextobject. This will callGObject.withProperties(Type, String[], Value[])to create a new GObject instance, which is then cast toIMContext.- Overrides:
buildin classGObject.Builder<B extends IMContext.Builder<B>>- Returns:
- a new instance of
IMContextwith 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-hintsproperty- Returns:
- the
Builderinstance 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-purposeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInputHints
Additional hints that allow input methods to fine-tune their behaviour.- Parameters:
inputHints- the value for theinput-hintsproperty- Returns:
- the
Builderinstance 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
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-
onInvalidComposition
Emitted when the filtered keys do not compose to a single valid character.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.22
- 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(Out, Out, Out)returns the empty string.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
Builderinstance 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
Builderinstance 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(String, int, int)method.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-