Package: gio

Interface g-action

Superclasses

g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots

enabled
The enabled property of type :boolean (Read)
Whether the action is currently enabled. If the action is disabled then calls to the g-action-activate and g-action-change-state functions have no effect.
Default value: true
name
The name property of type :string (Read)
The name of the action. This is mostly meaningful for identifying the action once it has been added to a g-action-group object.
Default value: nil
parameter-type
The parameter-type property of type g-variant-type (Read)
The type of the parameter that must be given when activating the action.
state
The state property of type g-variant (Read)
The state of the action, or nil if the action is stateless.
Allowed values: GVariant<*>
Default value: nil
state-type
The state-type property of type g-variant-type (Read)
The parameter type of the state that the action has, or nil if the action is stateless.

Details

The g-action interface represents a single named action.

The main interface to an action is that it can be activated with the g-action-activate function. This results in the "activate" signal being emitted. An activation has a g-variant parameter, which may be nil. The correct type for the parameter is determined by a static parameter type, which is given at construction time.

An action may optionally have a state, in which case the state may be set with the g-action-change-state function. This call takes a g-variant parameter. The correct type for the state is determined by a static state type, which is given at construction time.

The state may have a hint associated with it, specifying its valid range.

The g-action interface is merely the interface to the concept of an action, as described above. Various implementations of actions exist, including the g-simple-action class.

In all cases, the implementing class is responsible for storing the name of the action, the parameter type, the enabled state, the optional state type and the state and emitting the appropriate signals when these change. The implementor responsible for filtering calls to the g-action-activate and g-action-change-state functions for type safety and for the state being enabled.

Probably the only useful thing to do with a g-action object is to put it inside of a g-simple-action-group object.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2021-12-10