add GActionMap interface

This is an interface to represent GSimpleActionGroup-like objects (ie:
those GActionGroups that operate by containing a number of named GAction
instances).
This commit is contained in:
Ryan Lortie
2011-11-30 11:36:08 -05:00
parent 02b001f8f6
commit 76527e5cd5
7 changed files with 392 additions and 194 deletions

View File

@@ -27,6 +27,7 @@
#define __G_SIMPLE_ACTION_GROUP_H__
#include "gactiongroup.h"
#include "gactionmap.h"
G_BEGIN_DECLS
@@ -45,8 +46,6 @@ G_BEGIN_DECLS
typedef struct _GSimpleActionGroupPrivate GSimpleActionGroupPrivate;
typedef struct _GSimpleActionGroupClass GSimpleActionGroupClass;
typedef struct _GActionEntry GActionEntry;
/**
* GSimpleActionGroup:
*
@@ -84,26 +83,6 @@ void g_simple_action_group_insert (GSimple
void g_simple_action_group_remove (GSimpleActionGroup *simple,
const gchar *action_name);
struct _GActionEntry
{
const gchar *name;
void (* activate) (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
const gchar *parameter_type;
const gchar *state;
void (* change_state) (GSimpleAction *action,
GVariant *value,
gpointer user_data);
/*< private >*/
gsize padding[3];
};
void g_simple_action_group_add_entries (GSimpleActionGroup *simple,
const GActionEntry *entries,
gint n_entries,