mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 07:08:54 +02:00
Add GActionMap to the docs
This commit is contained in:
committed by
Ryan Lortie
parent
41e5ba86a7
commit
c8e76fdda2
@@ -195,6 +195,7 @@
|
|||||||
<xi:include href="xml/gapplication.xml"/>
|
<xi:include href="xml/gapplication.xml"/>
|
||||||
<xi:include href="xml/gapplicationcommandline.xml"/>
|
<xi:include href="xml/gapplicationcommandline.xml"/>
|
||||||
<xi:include href="xml/gactiongroup.xml"/>
|
<xi:include href="xml/gactiongroup.xml"/>
|
||||||
|
<xi:include href="xml/gactionmap.xml"/>
|
||||||
<xi:include href="xml/gsimpleactiongroup.xml"/>
|
<xi:include href="xml/gsimpleactiongroup.xml"/>
|
||||||
<xi:include href="xml/gaction.xml"/>
|
<xi:include href="xml/gaction.xml"/>
|
||||||
<xi:include href="xml/gsimpleaction.xml"/>
|
<xi:include href="xml/gsimpleaction.xml"/>
|
||||||
|
@@ -2996,7 +2996,6 @@ g_simple_action_group_insert
|
|||||||
g_simple_action_group_remove
|
g_simple_action_group_remove
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
GActionEntry
|
|
||||||
g_simple_action_group_add_entries
|
g_simple_action_group_add_entries
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
@@ -3011,6 +3010,27 @@ G_IS_SIMPLE_ACTION_GROUP_CLASS
|
|||||||
G_SIMPLE_ACTION_GROUP
|
G_SIMPLE_ACTION_GROUP
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
<SECTION>
|
||||||
|
<FILE>gactionmap</FILE>
|
||||||
|
<TITLE>GActionMap</TITLE>
|
||||||
|
GActionMap
|
||||||
|
g_action_map_lookup_action
|
||||||
|
GActionEntry
|
||||||
|
g_action_map_add_action_entries
|
||||||
|
g_action_map_add_action
|
||||||
|
g_action_map_remove_action
|
||||||
|
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GActionMapInterface
|
||||||
|
G_TYPE_ACTION_MAP
|
||||||
|
G_ACTION_MAP
|
||||||
|
G_IS_ACTION_MAP
|
||||||
|
G_ACTION_MAP_GET_IFACE
|
||||||
|
|
||||||
|
<SUBSECTION Private>
|
||||||
|
g_action_map_get_type
|
||||||
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gproxyresolver</FILE>
|
<FILE>gproxyresolver</FILE>
|
||||||
<TITLE>GProxyResolver</TITLE>
|
<TITLE>GProxyResolver</TITLE>
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
g_action_get_type
|
g_action_get_type
|
||||||
g_simple_action_get_type
|
g_simple_action_get_type
|
||||||
g_action_group_get_type
|
g_action_group_get_type
|
||||||
|
g_action_map_get_type
|
||||||
g_simple_action_group_get_type
|
g_simple_action_group_get_type
|
||||||
g_app_info_get_type
|
g_app_info_get_type
|
||||||
g_app_launch_context_get_type
|
g_app_launch_context_get_type
|
||||||
|
@@ -26,6 +26,22 @@
|
|||||||
#include "gactionmap.h"
|
#include "gactionmap.h"
|
||||||
#include "gaction.h"
|
#include "gaction.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:gactionmap
|
||||||
|
* @title: GActionMap
|
||||||
|
* @short_description: Interface for action containers
|
||||||
|
*
|
||||||
|
* The GActionMap interface is implemented by #GActionGroup
|
||||||
|
* implementations that operate by containing a number of
|
||||||
|
* named #GAction instances, such as #GSimpleActionGroup.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
G_DEFINE_INTERFACE (GActionMap, g_action_map, G_TYPE_ACTION_GROUP)
|
G_DEFINE_INTERFACE (GActionMap, g_action_map, G_TYPE_ACTION_GROUP)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -33,6 +49,19 @@ g_action_map_default_init (GActionMapInterface *iface)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_action_map_lookup_action:
|
||||||
|
* @action_map: a #GActionMap
|
||||||
|
* @action_name: the name of an action
|
||||||
|
*
|
||||||
|
* Looks up the action with the name @action_name in @action_map.
|
||||||
|
*
|
||||||
|
* If no such action exists, returns %NULL.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): a #GAction, or %NULL
|
||||||
|
*
|
||||||
|
* Since: 2.32
|
||||||
|
*/
|
||||||
GAction *
|
GAction *
|
||||||
g_action_map_lookup_action (GActionMap *action_map,
|
g_action_map_lookup_action (GActionMap *action_map,
|
||||||
const gchar *action_name)
|
const gchar *action_name)
|
||||||
@@ -41,6 +70,20 @@ g_action_map_lookup_action (GActionMap *action_map,
|
|||||||
->lookup_action (action_map, action_name);
|
->lookup_action (action_map, action_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_action_map_add_action:
|
||||||
|
* @action_map: a #GActionMap
|
||||||
|
* @action: a #GAction
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Since: 2.32
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
g_action_map_add_action (GActionMap *action_map,
|
g_action_map_add_action (GActionMap *action_map,
|
||||||
GAction *action)
|
GAction *action)
|
||||||
@@ -49,6 +92,17 @@ g_action_map_add_action (GActionMap *action_map,
|
|||||||
->add_action (action_map, action);
|
->add_action (action_map, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_action_map_remove_action:
|
||||||
|
* @action_map: a #GActionMap
|
||||||
|
* @action_name: the name of the action
|
||||||
|
*
|
||||||
|
* Removes the named action from the action map.
|
||||||
|
*
|
||||||
|
* If no action of this name is in the map then nothing happens.
|
||||||
|
*
|
||||||
|
* Since: 2.32
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
g_action_map_remove_action (GActionMap *action_map,
|
g_action_map_remove_action (GActionMap *action_map,
|
||||||
const gchar *action_name)
|
const gchar *action_name)
|
||||||
@@ -86,10 +140,10 @@ g_action_map_remove_action (GActionMap *action_map,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_action_map_add_action_entries:
|
* g_action_map_add_action_entries:
|
||||||
* @simple: a #GSimpleActionGroup
|
* @action_map: a #GActionMap
|
||||||
* @entries: a pointer to the first item in an array of #GActionEntry
|
* @entries: a pointer to the first item in an array of #GActionEntry
|
||||||
* structs
|
* structs
|
||||||
* @n_entries: the length of @entries, or -1
|
* @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated
|
||||||
* @user_data: the user data for signal connections
|
* @user_data: the user data for signal connections
|
||||||
*
|
*
|
||||||
* A convenience function for creating multiple #GSimpleAction instances
|
* A convenience function for creating multiple #GSimpleAction instances
|
||||||
@@ -133,8 +187,8 @@ g_action_map_remove_action (GActionMap *action_map,
|
|||||||
* </programlisting>
|
* </programlisting>
|
||||||
* </example>
|
* </example>
|
||||||
*
|
*
|
||||||
* Since: 2.30
|
* Since: 2.32
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_action_map_add_action_entries (GActionMap *action_map,
|
g_action_map_add_action_entries (GActionMap *action_map,
|
||||||
const GActionEntry *entries,
|
const GActionEntry *entries,
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
* @short_description: A simple GActionGroup implementation
|
* @short_description: A simple GActionGroup implementation
|
||||||
*
|
*
|
||||||
* #GSimpleActionGroup is a hash table filled with #GAction objects,
|
* #GSimpleActionGroup is a hash table filled with #GAction objects,
|
||||||
* implementing the #GActionGroup interface.
|
* implementing the #GActionGroup and #GActionMap interfaces.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
struct _GSimpleActionGroupPrivate
|
struct _GSimpleActionGroupPrivate
|
||||||
@@ -310,7 +310,7 @@ g_simple_action_group_new (void)
|
|||||||
* Returns: (transfer none): a #GAction, or %NULL
|
* Returns: (transfer none): a #GAction, or %NULL
|
||||||
*
|
*
|
||||||
* Since: 2.28
|
* Since: 2.28
|
||||||
**/
|
*/
|
||||||
GAction *
|
GAction *
|
||||||
g_simple_action_group_lookup (GSimpleActionGroup *simple,
|
g_simple_action_group_lookup (GSimpleActionGroup *simple,
|
||||||
const gchar *action_name)
|
const gchar *action_name)
|
||||||
|
Reference in New Issue
Block a user