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 | /*< private >*/ |
42 | GTypeInterface g_iface; |
43 | |
44 | /*< public >*/ |
45 | |
46 | const gchar * (* get_action_name) (GtkActionable *actionable); |
47 | void (* set_action_name) (GtkActionable *actionable, |
48 | const gchar *action_name); |
49 | GVariant * (* get_action_target_value) (GtkActionable *actionable); |
50 | void (* set_action_target_value) (GtkActionable *actionable, |
51 | GVariant *target_value); |
52 | }; |
53 | |
54 | GDK_AVAILABLE_IN_3_4 |
55 | GType gtk_actionable_get_type (void) G_GNUC_CONST; |
56 | |
57 | GDK_AVAILABLE_IN_3_4 |
58 | const gchar * gtk_actionable_get_action_name (GtkActionable *actionable); |
59 | GDK_AVAILABLE_IN_3_4 |
60 | void gtk_actionable_set_action_name (GtkActionable *actionable, |
61 | const gchar *action_name); |
62 | |
63 | GDK_AVAILABLE_IN_3_4 |
64 | GVariant * gtk_actionable_get_action_target_value (GtkActionable *actionable); |
65 | GDK_AVAILABLE_IN_3_4 |
66 | void gtk_actionable_set_action_target_value (GtkActionable *actionable, |
67 | GVariant *target_value); |
68 | |
69 | GDK_AVAILABLE_IN_3_4 |
70 | void gtk_actionable_set_action_target (GtkActionable *actionable, |
71 | const gchar *format_string, |
72 | ...); |
73 | |
74 | GDK_AVAILABLE_IN_3_4 |
75 | void gtk_actionable_set_detailed_action_name (GtkActionable *actionable, |
76 | const gchar *detailed_action_name); |
77 | |
78 | G_END_DECLS |
79 | |
80 | #endif /* __GTK_ACTIONABLE_H__ */ |
81 | |