1 /*
2  * Copyright © 2012 Canonical Limited
3  *
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.
8  *
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.
13  *
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/>.
16  *
17  * Authors: Ryan Lortie <desrt@desrt.ca>
18  */
19 
20 #ifndef __GTK_ACTION_HELPER_H__
21 #define __GTK_ACTION_HELPER_H__
22 
23 #include <gtk/gtkapplication.h>
24 #include <gtk/gtkactionable.h>
25 
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))
31 
32 typedef struct _GtkActionHelper                             GtkActionHelper;
33 
34 G_GNUC_INTERNAL
35 GType                   gtk_action_helper_get_type                      (void);
36 
37 G_GNUC_INTERNAL
38 GtkActionHelper *       gtk_action_helper_new                           (GtkActionable   *widget);
39 
40 G_GNUC_INTERNAL
41 void                    gtk_action_helper_set_action_name               (GtkActionHelper *helper,
42                                                                          const gchar     *action_name);
43 G_GNUC_INTERNAL
44 void                    gtk_action_helper_set_action_target_value       (GtkActionHelper *helper,
45                                                                          GVariant        *action_target);
46 G_GNUC_INTERNAL
47 const gchar *           gtk_action_helper_get_action_name               (GtkActionHelper *helper);
48 G_GNUC_INTERNAL
49 GVariant *              gtk_action_helper_get_action_target_value       (GtkActionHelper *helper);
50 
51 G_GNUC_INTERNAL
52 gboolean                gtk_action_helper_get_enabled                   (GtkActionHelper *helper);
53 G_GNUC_INTERNAL
54 gboolean                gtk_action_helper_get_active                    (GtkActionHelper *helper);
55 
56 G_GNUC_INTERNAL
57 void                    gtk_action_helper_activate                      (GtkActionHelper *helper);
58 
59 #endif /* __GTK_ACTION_HELPER_H__ */
60