]> Pileus Git - ~andy/gtk/blob - gtk/gtkactionable.h
gtk: Use versioned deprecations
[~andy/gtk] / gtk / gtkactionable.h
1 /*
2  * Copyright © 2012 Canonical Limited
3  *
4  * This program 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, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
17  * USA.
18  *
19  * Authors: Ryan Lortie <desrt@desrt.ca>
20  */
21
22 #ifndef __GTK_ACTIONABLE_H__
23 #define __GTK_ACTIONABLE_H__
24
25 #include <glib-object.h>
26 #include <gdk/gdk.h>
27
28 G_BEGIN_DECLS
29
30 #define GTK_TYPE_ACTIONABLE                                 (gtk_actionable_get_type ())
31 #define GTK_ACTIONABLE(inst)                                (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
32                                                              GTK_TYPE_ACTIONABLE, GtkActionable))
33 #define GTK_IS_ACTIONABLE(inst)                             (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
34                                                              GTK_TYPE_ACTIONABLE))
35 #define GTK_ACTIONABLE_GET_IFACE(inst)                      (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
36                                                              GTK_TYPE_ACTIONABLE, GtkActionableInterface))
37
38 typedef struct _GtkActionableInterface                      GtkActionableInterface;
39 typedef struct _GtkActionable                               GtkActionable;
40
41 struct _GtkActionableInterface
42 {
43   GTypeInterface g_iface;
44
45   const gchar * (* get_action_name)             (GtkActionable *actionable);
46   void          (* set_action_name)             (GtkActionable *actionable,
47                                                  const gchar   *action_name);
48   GVariant *    (* get_action_target_value)     (GtkActionable *actionable);
49   void          (* set_action_target_value)     (GtkActionable *actionable,
50                                                  GVariant      *action_target_value);
51 };
52
53 GDK_AVAILABLE_IN_3_4
54 GType                   gtk_actionable_get_type                         (void) G_GNUC_CONST;
55
56 GDK_AVAILABLE_IN_3_4
57 const gchar *           gtk_actionable_get_action_name                  (GtkActionable *actionable);
58 GDK_AVAILABLE_IN_3_4
59 void                    gtk_actionable_set_action_name                  (GtkActionable *actionable,
60                                                                          const gchar   *action_name);
61
62 GDK_AVAILABLE_IN_3_4
63 GVariant *              gtk_actionable_get_action_target_value          (GtkActionable *actionable);
64 GDK_AVAILABLE_IN_3_4
65 void                    gtk_actionable_set_action_target_value          (GtkActionable *actionable,
66                                                                          GVariant      *target_value);
67
68 GDK_AVAILABLE_IN_3_4
69 void                    gtk_actionable_set_action_target                (GtkActionable *actionable,
70                                                                          const gchar   *format_string,
71                                                                          ...);
72
73 GDK_AVAILABLE_IN_3_4
74 void                    gtk_actionable_set_detailed_action_name         (GtkActionable *actionable,
75                                                                          const gchar   *detailed_action_name);
76
77 G_END_DECLS
78
79 #endif /* __GTK_ACTIONABLE_H__ */