Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ActionMap

[18:7] extends: object

GActionMap is an interface for action containers. The GActionMap interface is implemented by [iface@Gio.ActionGroup] implementations that operate by containing a number of named [iface@Gio.Action] instances, such as [class@Gio.SimpleActionGroup]. One useful application of this interface is to map the names of actions from various action groups to unique, prefixed names (e.g. by prepending "app." or "win."). This is the motivation for the ‘Map’ part of the interface name.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ActionMap (Handle = null)

    Creates a new ActionMap by wrapping a native handle or another wrapper.

    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • add_action (object action)

    Adds an action to the @action_map. If the action map already contains an action with the same name as @action then the old action is dropped from the action map. The action map takes its own reference on @action.

    • @p action is a [iface@Gio.Action].
    • @r None.
  • lookup_action (string action_name)

    Looks up the action with the name @action_name in @action_map. If no such action exists, returns NULL.

    • @p action_name is the name of an action.
  • remove_action (string action_name)

    Removes the named action from the action map. If no action of this name is in the map then nothing happens.

    • @p action_name is the name of the action.
    • @r None.