gio.simple_action
Module for [SimpleAction] class
Types 3
A gio.simple_action.SimpleAction is the obvious simple implementation of the gio.action.Action interface. This is the easiest way to create an action for purposes of adding it to a gio.simple_action_group.SimpleActionGroup.
Methods
SimpleActionGidBuilder builder() static nothrowGet builder for [gio.simple_action.SimpleAction] Returns: New builder objectvoid enabled(bool propval) @property nothrowSet `enabled` property. Params: propval = If @action is currently enabled.string name() @property nothrowGet `name` property. Returns: The name of the action. This is mostly meaningful for identifying the action once it has been added to a #GSimpleActionGroup.glib.variant_type.VariantType parameterType() @property nothrowGet `parameterType` property. Returns: The type of the parameter that must be given when activating the action.glib.variant.Variant state() @property nothrowGet `state` property. Returns: The state of the action, or null if the action is stateless.void state(glib.variant.Variant propval) @property nothrowSet `state` property. Params: propval = The state of the action, or null if the action is stateless.glib.variant_type.VariantType stateType() @property nothrowGet `stateType` property. Returns: The #GVariantType of the state that the action has, or null if the action is stateless.gio.simple_action.SimpleAction newStateful(string name, glib.variant_type.VariantType parameterType, glib.variant.Variant state) static nothrowCreates a new stateful action.gulong connectActivate(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == glib.variant.Variant)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.simple_action.SimpleAction)))
&& Parameters!T.length < 3) nothrowConnect to `Activate` signal.gulong connectChangeState(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == glib.variant.Variant)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.simple_action.SimpleAction)))
&& Parameters!T.length < 3) nothrowConnect to `ChangeState` signal.Constructors
this(string name, glib.variant_type.VariantType parameterType = null)Creates a new action.classSimpleActionGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gio.action.ActionGidBuilderImpl!T
Fluent builder implementation template for gio.simple_action.SimpleAction
Methods
T enabled(bool propval) nothrowSet `enabled` property. Params: propval = If @action is currently enabled.T name(string propval) nothrowSet `name` property. Params: propval = The name of the action. This is mostly meaningful for identifying the action once it has been added to a #GSimpleActionGroup. Returns: Builder instance for fl...T parameterType(glib.variant_type.VariantType propval) nothrowSet `parameterType` property. Params: propval = The type of the parameter that must be given when activating the action. Returns: Builder instance for fluent chainingT state(glib.variant.Variant propval) nothrowSet `state` property. Params: propval = The state of the action, or null if the action is stateless. Returns: Builder instance for fluent chainingFluent builder for gio.simple_action.SimpleAction
Methods