]> Pileus Git - ~andy/gtk/blob - gtk/gtkactionhelper.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkactionhelper.h
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 typedef enum
35 {
36   GTK_ACTION_HELPER_ROLE_NORMAL,
37   GTK_ACTION_HELPER_ROLE_TOGGLE,
38   GTK_ACTION_HELPER_ROLE_RADIO
39 } GtkActionHelperRole;
40
41 G_GNUC_INTERNAL
42 GType                   gtk_action_helper_get_type                      (void);
43
44 G_GNUC_INTERNAL
45 GtkActionHelper *       gtk_action_helper_new                           (GtkActionable   *widget);
46
47 G_GNUC_INTERNAL
48 GtkActionHelper *       gtk_action_helper_new_with_application          (GtkApplication  *application);
49
50 G_GNUC_INTERNAL
51 void                    gtk_action_helper_set_action_name               (GtkActionHelper *helper,
52                                                                          const gchar     *action_name);
53 G_GNUC_INTERNAL
54 void                    gtk_action_helper_set_action_target_value       (GtkActionHelper *helper,
55                                                                          GVariant        *action_target);
56 G_GNUC_INTERNAL
57 const gchar *           gtk_action_helper_get_action_name               (GtkActionHelper *helper);
58 G_GNUC_INTERNAL
59 GVariant *              gtk_action_helper_get_action_target_value       (GtkActionHelper *helper);
60
61 G_GNUC_INTERNAL
62 GtkActionHelperRole     gtk_action_helper_get_role                      (GtkActionHelper *helper);
63 G_GNUC_INTERNAL
64 gboolean                gtk_action_helper_get_enabled                   (GtkActionHelper *helper);
65 G_GNUC_INTERNAL
66 gboolean                gtk_action_helper_get_active                    (GtkActionHelper *helper);
67
68 G_GNUC_INTERNAL
69 void                    gtk_action_helper_activate                      (GtkActionHelper *helper);
70
71 #endif /* __GTK_ACTION_HELPER_H__ */