]> Pileus Git - ~andy/gtk/blob - gtk/gtkactionable.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkactionable.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_ACTIONABLE_H__
21 #define __GTK_ACTIONABLE_H__
22
23 #include <glib-object.h>
24 #include <gdk/gdk.h>
25
26 G_BEGIN_DECLS
27
28 #define GTK_TYPE_ACTIONABLE                                 (gtk_actionable_get_type ())
29 #define GTK_ACTIONABLE(inst)                                (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
30                                                              GTK_TYPE_ACTIONABLE, GtkActionable))
31 #define GTK_IS_ACTIONABLE(inst)                             (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
32                                                              GTK_TYPE_ACTIONABLE))
33 #define GTK_ACTIONABLE_GET_IFACE(inst)                      (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
34                                                              GTK_TYPE_ACTIONABLE, GtkActionableInterface))
35
36 typedef struct _GtkActionableInterface                      GtkActionableInterface;
37 typedef struct _GtkActionable                               GtkActionable;
38
39 struct _GtkActionableInterface
40 {
41   GTypeInterface g_iface;
42
43   const gchar * (* get_action_name)             (GtkActionable *actionable);
44   void          (* set_action_name)             (GtkActionable *actionable,
45                                                  const gchar   *action_name);
46   GVariant *    (* get_action_target_value)     (GtkActionable *actionable);
47   void          (* set_action_target_value)     (GtkActionable *actionable,
48                                                  GVariant      *target_value);
49 };
50
51 GDK_AVAILABLE_IN_3_4
52 GType                   gtk_actionable_get_type                         (void) G_GNUC_CONST;
53
54 GDK_AVAILABLE_IN_3_4
55 const gchar *           gtk_actionable_get_action_name                  (GtkActionable *actionable);
56 GDK_AVAILABLE_IN_3_4
57 void                    gtk_actionable_set_action_name                  (GtkActionable *actionable,
58                                                                          const gchar   *action_name);
59
60 GDK_AVAILABLE_IN_3_4
61 GVariant *              gtk_actionable_get_action_target_value          (GtkActionable *actionable);
62 GDK_AVAILABLE_IN_3_4
63 void                    gtk_actionable_set_action_target_value          (GtkActionable *actionable,
64                                                                          GVariant      *target_value);
65
66 GDK_AVAILABLE_IN_3_4
67 void                    gtk_actionable_set_action_target                (GtkActionable *actionable,
68                                                                          const gchar   *format_string,
69                                                                          ...);
70
71 GDK_AVAILABLE_IN_3_4
72 void                    gtk_actionable_set_detailed_action_name         (GtkActionable *actionable,
73                                                                          const gchar   *detailed_action_name);
74
75 G_END_DECLS
76
77 #endif /* __GTK_ACTIONABLE_H__ */