Package: gio
Class gio:simple-action
Superclassesgio:action, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct Slotsenabled The enabled property of type :boolean (Read / Write) 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 / Write / Construct Only) The name of the action. This is mostly meaningful for identifying the action once it has been added to a g:action-map instance. Default value: nil parameter-type The parameter-type property of type g:variant-type (Read / Write / Construct Only) The type of the parameter that must be given when activating the action. state The state property of type g:variant (Read / Write / Construct) The state of the action, or the cffi:null-pointer value if the action is stateless. state-type The state-type property of type g:variant-type (Read) The type of the state that the action has, or nil if the action is stateless. Details The g:simple-action class is the obvious simple implementation of the g:action interface.
This is the easiest way to create an action for purposes of adding it to a g:simple-action-group object. Signal DetailsThe "activate" signallambda (action parameter) :run-last
The "change-state" signallambda (action value) :run-last
Examples: Implementation of a "change-state" signal handler: (g:signal-connect action "change-state" (lambda (simple value) (let ((requested (g:variant-int32 value))) ;; Volume only goes from 0 to 10 (when (and (>= requested 0) (<= requested 10)) (setf (g:simple-action-state simple) value)))))The handler need not set the state to the requested value. It could set it to any value at all, or take some other action. | Returned bySlot Access Functions
Inherited Slot Access Functions
See also |
2024-12-29