[752:14] static extends: object
Generated metadata helpers for ActionGroup interface surfaces.
signals ()
Returns signal metadata for
ActionGroup.
A list.[469:7] extends: object
Generated low-level callback wrapper for GIR callback action-added.
ActionGroupActionaddedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, action_name, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[44:7] extends: object
GActionGroup represents a group of actions. Actions can be used to expose
functionality in a structured way, either from one part of a program to
another, or to the outside world. Action groups are often used together with
a [type@Gio.MenuModel] that provides additional representation data for
displaying the actions to the user, e.g. in a menu. The main way to interact
with the actions in a GActionGroup is to activate them with
[method@Gio.ActionGroup.activate_action]. Activating an action may require a
[type@GLib.Variant] parameter. The required type of the parameter can be
inquired with [method@Gio.ActionGroup.get_action_parameter_type]. Actions may
be disabled, see [method@Gio.ActionGroup.get_action_enabled]. Activating a
disabled action has no effect. Actions may optionally have a state in the
form of a [type@GLib.Variant]. The current state of an action can be inquired
with [method@Gio.ActionGroup.get_action_state]. Activating a stateful action
may change its state, but it is also possible to set the state by calling
[method@Gio.ActionGroup.change_action_state]. As typical example, consider a
text editing application which has an option to change the current font to
‘bold’. A good way to represent this would be a stateful action, with a
boolean state. Activating the action would toggle the state. Each action in
the group has a unique name (which is a string). All method calls, except
[method@Gio.ActionGroup.list_actions] take the name of an action as an
argument. The GActionGroup API is meant to be the ‘public’ API to the
action group. The calls here are exactly the interaction that ‘external
forces’ (eg: UI, incoming D-Bus messages, etc.) are supposed to have with
actions. ‘Internal’ APIs (ie: ones meant only to be accessed by the action
group implementation) are found on subclasses. This is why you will find –
for example – [method@Gio.ActionGroup.get_action_enabled] but not an
equivalent set_action_enabled() method. Signals are emitted on the action
group in response to state changes on individual actions. Implementations of
GActionGroup should provide implementations for the virtual functions
[method@Gio.ActionGroup.list_actions] and
[method@Gio.ActionGroup.query_action]. The other virtual functions should not
be implemented — their ‘wrappers’ are actually implemented with calls to
[method@Gio.ActionGroup.query_action].
ActionGroup (Handle = null)
Creates a new
ActionGroupby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnActionadded (callback Fn, UserData = null)
Signals that a new action was just added to the group. This signal is emitted after the action has been added and is now visible.
Fn is the Aussom callback.Fn is called with (ActionGroup Self, string Action_name).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnActionenabledchanged (callback Fn, UserData = null)
Signals that the enabled status of the named action has changed.
Fn is the Aussom callback.Fn is called with (ActionGroup Self, string Action_name, bool Enabled).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnActionremoved (callback Fn, UserData = null)
Signals that an action is just about to be removed from the group. This signal is emitted before the action is removed, so the action is still visible and can be queried from the signal handler.
Fn is the Aussom callback.Fn is called with (ActionGroup Self, string Action_name).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnActionstatechanged (callback Fn, UserData = null)
Signals that the state of the named action has changed.
Fn is the Aussom callback.Fn is called with (ActionGroup Self, string Action_name, Variant Value).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.action_added (string action_name)
Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group. This function should only be called by [type@Gio.ActionGroup] implementations.
action_name is the name of an action in the group.None.action_enabled_changed (string action_name, bool enabled)
Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on
This function should only be called by [type@Gio.ActionGroup] implementations.action_name is the name of an action in the group.enabled is whether the action is now enabled.None.action_removed (string action_name)
Emits the [signal@Gio.ActionGroup::action-removed] signal on
This function should only be called by [type@Gio.ActionGroup] implementations.action_name is the name of an action in the group.None.action_state_changed (string action_name, object state)
Emits the [signal@Gio.ActionGroup::action-state-changed] signal on
This function should only be called by [type@Gio.ActionGroup] implementations.action_name is the name of an action in the group.state is the new state of the named action.None.activate_action (string action_name, object parameter)
Activate the named action within @action_group. If the action is expecting a parameter, then the correct type of parameter must be given as @parameter. If the action is expecting no parameters then @parameter must be
NULL. See [method@Gio.ActionGroup.get_action_parameter_type]. If the [type@Gio.ActionGroup] implementation supports asynchronous remote activation over D-Bus, this call may return before the relevant D-Bus traffic has been sent, or any replies have been received. In order to block on such asynchronous activation calls, [method@Gio.DBusConnection.flush] should be called prior to the code, which depends on the result of the action activation. Without flushing the D-Bus connection, there is no guarantee that the action would have been activated. The following code which runs in a remote app instance, shows an example of a ‘quit’ action being activated on the primary app instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called beforeexit(). Withoutg_dbus_connection_flush(), the ‘quit’ action may fail to be activated on the primary instance.c // call ‘quit’ action on primary instance g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL); // make sure the action is activated now g_dbus_connection_flush (…); g_debug ("Application has been terminated. Exiting."); exit (0);
action_name is the name of the action to activate.parameter is parameters to the activation.None.change_action_state (string action_name, object value)
Request for the state of the named action within @action_group to be changed to @value. The action must be stateful and @value must be of the correct type. See [method@Gio.ActionGroup.get_action_state_type]. This call merely requests a change. The action may refuse to change its state or may change its state to something other than @value. See [method@Gio.ActionGroup.get_action_state_hint]. If the @value GVariant is floating, it is consumed.
action_name is the name of the action to request the change on.value is the new state.None.get_action_enabled (string action_name)
Checks if the named action within @action_group is currently enabled. An action must be enabled in order to be activated or in order to have its state changed from outside callers.
action_name is the name of the action to query.get_action_parameter_type (string action_name)
Queries the type of the parameter that must be given when activating the named action within @action_group. When activating the action using [method@Gio.ActionGroup.activate_action], the [type@GLib.Variant] given to that function must be of the type returned by this function. In the case that this function returns
NULL, you must not give any [type@GLib.Variant], butNULLinstead. The parameter type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different parameter type.
action_name is the name of the action to query.get_action_state (string action_name)
Queries the current state of the named action within @action_group. If the action is not stateful then
NULLwill be returned. If the action is stateful then the type of the return value is the type given by [method@Gio.ActionGroup.get_action_state_type]. The return value (if non-NULL) should be freed with [method@GLib.Variant.unref] when it is no longer required.
action_name is the name of the action to query.get_action_state_hint (string action_name)
Requests a hint about the valid range of values for the state of the named action within @action_group. If
NULLis returned it either means that the action is not stateful or that there is no hint about the valid range of values for the state of the action. If a [type@GLib.Variant] array is returned then each item in the array is a possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is returned then the tuple specifies the inclusive lower and upper bound of valid values for the state. In any case, the information is merely a hint. It may be possible to have a state value outside of the hinted range and setting a value within the range may fail. The return value (if non-NULL) should be freed with [method@GLib.Variant.unref] when it is no longer required.
action_name is the name of the action to query.get_action_state_type (string action_name)
Queries the type of the state of the named action within @action_group. If the action is stateful then this function returns the [type@GLib.VariantType] of the state. All calls to [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant] of the same type. If the action is not stateful then this function will return
NULL. In that case, [method@Gio.ActionGroup.get_action_state] will returnNULLand you must not call [method@Gio.ActionGroup.change_action_state]. The state type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different state type.
action_name is the name of the action to query.has_action (string action_name)
Checks if the named action exists within @action_group.
action_name is the name of the action to check for.list_actions ()
Lists the actions contained within @action_group. The caller is responsible for freeing the list with [func@GLib.strfreev] when it is no longer required.
[540:7] extends: object
Generated low-level callback wrapper for GIR callback
action-enabled-changed.
ActionGroupActionenabledchangedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, action_name, enabled, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[611:7] extends: object
Generated low-level callback wrapper for GIR callback action-removed.
ActionGroupActionremovedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, action_name, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[681:7] extends: object
Generated low-level callback wrapper for GIR callback action-state-changed.
ActionGroupActionstatechangedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, action_name, value, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.