About all my projects
Gnome::Gio::R-ActionMap

Gnome::Gio::R-ActionMap

Description

Gnome::Gio::R-ActionMap is an interface for action containers.

The Gnome::Gio::R-ActionMap interface is implemented by Gnome::Gio::ActionMap implementations that operate by containing a number of named Gnome::Gio::ActionMap instances, such as Gnome::Gio::ActionMap.

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.

Methods

add-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.

method add-action ( N-Object() $action )
  • $action; a Gnome::Gio::R-Action.

add-action-entries

A convenience function for creating multiple Gnome::Gio::SimpleAction instances and adding them to a Gnome::Gio::R-ActionMap.

Each action is constructed as per one Gnome::Gio::N-ActionEntry.

method add-action-entries ( N-Object $entries, Int() $n-entries, gpointer $user-data )
  • $entries; a pointer to the first item in an array of Gnome::Gio::N-ActionEntry structs

  • $n-entries; the length of $entries, or -1 if $entries is undefined-terminated.

  • $user-data; the user data for signal connections.

lookup-action

Looks up the action with the name $action-name in $action-map.

If no such action exists, returns undefined.

method lookup-action ( Str $action-name --> N-Object )
  • $action-name; the name of an action.

Return value; a Gnome::Gio::R-Action, or undefined.

remove-action

Removes the named action from the action map.

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

method remove-action ( Str $action-name )
  • $action-name; the name of the action.

remove-action-entries

Remove actions from a Gnome::Gio::R-ActionMap. This is meant as the reverse of .add-action-entries().

method remove-action-entries ( N-Object $entries, Int() $n-entries )
  • $entries; a pointer to the first item in an array of Gnome::Gio::N-ActionEntry structs

  • $n-entries; the length of $entries, or -1 if $entries is undefined-terminated.