2 * Copyright © 2012 Canonical Limited
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * licence or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Authors: Ryan Lortie <desrt@desrt.ca>
20 #ifndef __GTK_ACTION_HELPER_H__
21 #define __GTK_ACTION_HELPER_H__
23 #include <gtk/gtkapplication.h>
24 #include <gtk/gtkactionable.h>
26 #define GTK_TYPE_ACTION_HELPER (gtk_action_helper_get_type ())
27 #define GTK_ACTION_HELPER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
28 GTK_TYPE_ACTION_HELPER, GtkActionHelper))
29 #define GTK_IS_ACTION_HELPER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
30 GTK_TYPE_ACTION_HELPER))
32 typedef struct _GtkActionHelper GtkActionHelper;
36 GTK_ACTION_HELPER_ROLE_NORMAL,
37 GTK_ACTION_HELPER_ROLE_TOGGLE,
38 GTK_ACTION_HELPER_ROLE_RADIO
39 } GtkActionHelperRole;
42 GType gtk_action_helper_get_type (void);
45 GtkActionHelper * gtk_action_helper_new (GtkActionable *widget);
48 GtkActionHelper * gtk_action_helper_new_with_application (GtkApplication *application);
51 void gtk_action_helper_set_action_name (GtkActionHelper *helper,
52 const gchar *action_name);
54 void gtk_action_helper_set_action_target_value (GtkActionHelper *helper,
55 GVariant *action_target);
57 const gchar * gtk_action_helper_get_action_name (GtkActionHelper *helper);
59 GVariant * gtk_action_helper_get_action_target_value (GtkActionHelper *helper);
62 GtkActionHelperRole gtk_action_helper_get_role (GtkActionHelper *helper);
64 gboolean gtk_action_helper_get_enabled (GtkActionHelper *helper);
66 gboolean gtk_action_helper_get_active (GtkActionHelper *helper);
69 void gtk_action_helper_activate (GtkActionHelper *helper);
71 #endif /* __GTK_ACTION_HELPER_H__ */