Package ch.bailu.gtk.gio
Klasse SimpleAction
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.SimpleAction
- Alle implementierten Schnittstellen:
PointerInterface
A `GSimpleAction` is the obvious simple implementation of the
[iface@Gio.Action] interface. This is the easiest way to create an action for
purposes of adding it to a [class@Gio.SimpleActionGroup].
[iface@Gio.Action] interface. This is the easiest way to create an action for
purposes of adding it to a [class@Gio.SimpleActionGroup].
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSimpleAction
(PointerContainer pointer) SimpleAction
(Str name, VariantType parameter_type) Creates a new action.SimpleAction
(String name, VariantType parameter_type) Creates a new action. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungasAction()
Implements interfaceAction
.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
static SimpleAction
newStatefulSimpleAction
(Str name, VariantType parameter_type, Variant state) Creates a new stateful action.static SimpleAction
newStatefulSimpleAction
(String name, VariantType parameter_type, Variant state) Creates a new stateful action.onActivate
(SimpleAction.OnActivate signal) Connect to signal "activate".Connect to signal "change-state".void
setEnabled
(boolean enabled) Sets the action as enabled or not.void
Sets the state of the action.void
setStateHint
(Variant state_hint) Sets the state hint for the action.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
SIGNAL_ON_ACTIVATE
- Siehe auch:
-
SIGNAL_ON_CHANGE_STATE
- Siehe auch:
-
-
Konstruktordetails
-
SimpleAction
-
SimpleAction
Creates a new action.
The created action is stateless. See g_simple_action_new_stateful() to create
an action that has state.- Parameter:
name
- the name of the actionparameter_type
- the type of parameter that will be passed to handlers for the #GSimpleAction::activate signal, or %NULL for no parameter
-
SimpleAction
Creates a new action.
The created action is stateless. See g_simple_action_new_stateful() to create
an action that has state.- Parameter:
name
- the name of the actionparameter_type
- the type of parameter that will be passed to handlers for the #GSimpleAction::activate signal, or %NULL for no parameter
-
-
Methodendetails
-
getClassHandler
-
newStatefulSimpleAction
public static SimpleAction newStatefulSimpleAction(@Nonnull Str name, @Nullable VariantType parameter_type, @Nonnull Variant state) Creates a new stateful action.
All future state values must have the same #GVariantType as the initial
@state.
If the @state #GVariant is floating, it is consumed.- Parameter:
name
- the name of the actionparameter_type
- the type of the parameter that will be passed to handlers for the #GSimpleAction::activate signal, or %NULL for no parameterstate
- the initial state of the action- Gibt zurück:
- a new #GSimpleAction
-
newStatefulSimpleAction
public static SimpleAction newStatefulSimpleAction(String name, @Nullable VariantType parameter_type, @Nonnull Variant state) Creates a new stateful action.
All future state values must have the same #GVariantType as the initial
@state.
If the @state #GVariant is floating, it is consumed.- Parameter:
name
- the name of the actionparameter_type
- the type of the parameter that will be passed to handlers for the #GSimpleAction::activate signal, or %NULL for no parameterstate
- the initial state of the action- Gibt zurück:
- a new #GSimpleAction
-
setEnabled
public void setEnabled(boolean enabled) Sets the action as enabled or not.
An action must be enabled in order to be activated or in order to
have its state changed from outside callers.
This should only be called by the implementor of the action. Users
of the action should not attempt to modify its enabled flag.- Parameter:
enabled
- whether the action is enabled
-
setState
Sets the state of the action.
This directly updates the 'state' property to the given value.
This should only be called by the implementor of the action. Users
of the action should not attempt to directly modify the 'state'
property. Instead, they should call g_action_change_state() to
request the change.
If the @value GVariant is floating, it is consumed.- Parameter:
value
- the new #GVariant for the state
-
setStateHint
Sets the state hint for the action.
See g_action_get_state_hint() for more information about
action state hints.- Parameter:
state_hint
- a #GVariant representing the state hint
-
onActivate
Connect to signal "activate".
SeeSimpleAction.OnActivate.onActivate(ch.bailu.gtk.glib.Variant)
for signal description.
FieldSIGNAL_ON_ACTIVATE
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onChangeState
Connect to signal "change-state".
SeeSimpleAction.OnChangeState.onChangeState(ch.bailu.gtk.glib.Variant)
for signal description.
FieldSIGNAL_ON_CHANGE_STATE
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
asAction
Implements interfaceAction
. Call this to get access to interface functions.- Gibt zurück:
Action
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-