X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgactiongroup.h;h=647d6acad5557667e351ec1455bfeea72f7a1b27;hb=c8d10470939847069b1a346d4c44f2adde3469f6;hp=75779c29b0e1c6bf0a773dec6319413bcd0ffee8;hpb=e71dbb97326f767881142cb24cf0850ee8c40008;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gactiongroup.h b/gio/gactiongroup.h index 75779c2..647d6ac 100644 --- a/gio/gactiongroup.h +++ b/gio/gactiongroup.h @@ -12,162 +12,150 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Authors: Ryan Lortie */ +#ifndef __G_ACTION_GROUP_H__ +#define __G_ACTION_GROUP_H__ + #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) #error "Only can be included directly." #endif -#ifndef __G_ACTION_GROUP_H__ -#define __G_ACTION_GROUP_H__ - #include G_BEGIN_DECLS + #define G_TYPE_ACTION_GROUP (g_action_group_get_type ()) #define G_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_ACTION_GROUP, GActionGroup)) -#define G_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ - G_TYPE_ACTION_GROUP, GActionGroupClass)) -#define G_IS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_ACTION)) -#define G_IS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ACTION)) -#define G_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ - G_TYPE_ACTION_GROUP, GActionGroupClass)) - -typedef struct _GActionGroupPrivate GActionGroupPrivate; -typedef struct _GActionGroupClass GActionGroupClass; - -/** - * GActionGroup: - * - * The #GActionGroup structure contains private data and should only be accessed using the provided API. - * - * Since: 2.26 - */ -struct _GActionGroup -{ - /*< private >*/ - GObject parent_instance; +#define G_IS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ + G_TYPE_ACTION_GROUP)) +#define G_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ + G_TYPE_ACTION_GROUP, GActionGroupInterface)) - GActionGroupPrivate *priv; -}; +typedef struct _GActionGroupInterface GActionGroupInterface; -/** - * GActionGroupClass: - * @has_action: the virtual function pointer for g_action_group_has_action() - * @list_actions: the virtual function pointer for g_action_group_list_actions() - * @get_parameter_type: the virtual function pointer for g_action_group_get_parameter_type() - * @get_state_type: the virtual function pointer for g_action_group_get_state_type() - * @get_state_hint: the virtual function pointer for g_action_group_get_state_hint() - * @get_enabled: the virtual function pointer for g_action_group_get_enabled() - * @get_state: the virtual function pointer for g_action_group_get_state() - * @set_state: the virtual function pointer for g_action_group_set_state() - * @activate: the virtual function pointer for g_action_group_activate() - * @action_added: the class closure for the action-added signal - * @action_removed: the class closure for the action-removed signal - * @action_enabled_changed: the class closure for the action-enabled-changed signal - * @action_state_changed: the class closure for the action-enabled-changed signal - * - * The virtual function table for #GActionGroup. - * - * Since: 2.26 - */ -struct _GActionGroupClass +struct _GActionGroupInterface { - /*< private >*/ - GObjectClass parent_class; + GTypeInterface g_iface; - /*< public >*/ /* virtual functions */ - gboolean (* has_action) (GActionGroup *action_group, - const gchar *action_name); + gboolean (* has_action) (GActionGroup *action_group, + const gchar *action_name); - gchar ** (* list_actions) (GActionGroup *action_group); + gchar ** (* list_actions) (GActionGroup *action_group); - gboolean (* get_enabled) (GActionGroup *action_group, - const gchar *action_name); + gboolean (* get_action_enabled) (GActionGroup *action_group, + const gchar *action_name); - const GVariantType * (* get_parameter_type) (GActionGroup *action_group, - const gchar *action_name); + const GVariantType * (* get_action_parameter_type) (GActionGroup *action_group, + const gchar *action_name); - const GVariantType * (* get_state_type) (GActionGroup *action_group, - const gchar *action_name); + const GVariantType * (* get_action_state_type) (GActionGroup *action_group, + const gchar *action_name); - GVariant * (* get_state_hint) (GActionGroup *action_group, - const gchar *action_name); + GVariant * (* get_action_state_hint) (GActionGroup *action_group, + const gchar *action_name); - GVariant * (* get_state) (GActionGroup *action_group, - const gchar *action_name); + GVariant * (* get_action_state) (GActionGroup *action_group, + const gchar *action_name); - void (* set_state) (GActionGroup *action_group, - const gchar *action_name, - GVariant *value); + void (* change_action_state) (GActionGroup *action_group, + const gchar *action_name, + GVariant *value); - void (* activate) (GActionGroup *action_group, - const gchar *action_name, - GVariant *parameter); + void (* activate_action) (GActionGroup *action_group, + const gchar *action_name, + GVariant *parameter); /* signals */ - void (* action_added) (GActionGroup *action_group, - const gchar *action_name); - void (* action_removed) (GActionGroup *action_group, - const gchar *action_name); - void (* action_enabled_changed) (GActionGroup *action_group, - const gchar *action_name, - gboolean enabled); - void (* action_state_changed) (GActionGroup *action_group, - const gchar *action_name, - GVariant *value); - - /*< private >*/ - gpointer signal_padding[6]; + void (* action_added) (GActionGroup *action_group, + const gchar *action_name); + void (* action_removed) (GActionGroup *action_group, + const gchar *action_name); + void (* action_enabled_changed) (GActionGroup *action_group, + const gchar *action_name, + gboolean enabled); + void (* action_state_changed) (GActionGroup *action_group, + const gchar *action_name, + GVariant *state); + + /* more virtual functions */ + gboolean (* query_action) (GActionGroup *action_group, + const gchar *action_name, + gboolean *enabled, + const GVariantType **parameter_type, + const GVariantType **state_type, + GVariant **state_hint, + GVariant **state); }; +GLIB_AVAILABLE_IN_ALL GType g_action_group_get_type (void) G_GNUC_CONST; +GLIB_AVAILABLE_IN_ALL gboolean g_action_group_has_action (GActionGroup *action_group, const gchar *action_name); +GLIB_AVAILABLE_IN_ALL gchar ** g_action_group_list_actions (GActionGroup *action_group); -const GVariantType * g_action_group_get_parameter_type (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_action_group_get_action_parameter_type (GActionGroup *action_group, const gchar *action_name); -const GVariantType * g_action_group_get_state_type (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group, const gchar *action_name); -GVariant * g_action_group_get_state_hint (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +GVariant * g_action_group_get_action_state_hint (GActionGroup *action_group, const gchar *action_name); -gboolean g_action_group_get_enabled (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +gboolean g_action_group_get_action_enabled (GActionGroup *action_group, const gchar *action_name); -GVariant * g_action_group_get_state (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +GVariant * g_action_group_get_action_state (GActionGroup *action_group, const gchar *action_name); -void g_action_group_set_state (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +void g_action_group_change_action_state (GActionGroup *action_group, const gchar *action_name, GVariant *value); -void g_action_group_activate (GActionGroup *action_group, +GLIB_AVAILABLE_IN_ALL +void g_action_group_activate_action (GActionGroup *action_group, const gchar *action_name, GVariant *parameter); /* signals */ +GLIB_AVAILABLE_IN_ALL void g_action_group_action_added (GActionGroup *action_group, const gchar *action_name); +GLIB_AVAILABLE_IN_ALL void g_action_group_action_removed (GActionGroup *action_group, const gchar *action_name); +GLIB_AVAILABLE_IN_ALL void g_action_group_action_enabled_changed (GActionGroup *action_group, const gchar *action_name, gboolean enabled); +GLIB_AVAILABLE_IN_ALL void g_action_group_action_state_changed (GActionGroup *action_group, const gchar *action_name, GVariant *state); +GLIB_AVAILABLE_IN_2_32 +gboolean g_action_group_query_action (GActionGroup *action_group, + const gchar *action_name, + gboolean *enabled, + const GVariantType **parameter_type, + const GVariantType **state_type, + GVariant **state_hint, + GVariant **state); + G_END_DECLS #endif /* __G_ACTION_GROUP_H__ */