1/*
2 * Copyright © 2011 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_OBSERVER_PRIVATE_H__
21#define __GTK_ACTION_OBSERVER_PRIVATE_H__
22
23#include <gio/gio.h>
24
25G_BEGIN_DECLS
26
27#define GTK_TYPE_ACTION_OBSERVER (gtk_action_observer_get_type ())
28#define GTK_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
29 GTK_TYPE_ACTION_OBSERVER, GtkActionObserver))
30#define GTK_IS_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
31 GTK_TYPE_ACTION_OBSERVER))
32#define GTK_ACTION_OBSERVER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
33 GTK_TYPE_ACTION_OBSERVER, GtkActionObserverInterface))
34
35typedef struct _GtkActionObserverInterface GtkActionObserverInterface;
36typedef struct _GtkActionObservable GtkActionObservable;
37typedef struct _GtkActionObserver GtkActionObserver;
38
39struct _GtkActionObserverInterface
40{
41 GTypeInterface g_iface;
42
43 void (* action_added) (GtkActionObserver *observer,
44 GtkActionObservable *observable,
45 const char *action_name,
46 const GVariantType *parameter_type,
47 gboolean enabled,
48 GVariant *state);
49 void (* action_enabled_changed) (GtkActionObserver *observer,
50 GtkActionObservable *observable,
51 const char *action_name,
52 gboolean enabled);
53 void (* action_state_changed) (GtkActionObserver *observer,
54 GtkActionObservable *observable,
55 const char *action_name,
56 GVariant *state);
57 void (* action_removed) (GtkActionObserver *observer,
58 GtkActionObservable *observable,
59 const char *action_name);
60 void (* primary_accel_changed) (GtkActionObserver *observer,
61 GtkActionObservable *observable,
62 const char *action_name,
63 const char *action_and_target);
64};
65
66GType gtk_action_observer_get_type (void);
67void gtk_action_observer_action_added (GtkActionObserver *observer,
68 GtkActionObservable *observable,
69 const char *action_name,
70 const GVariantType *parameter_type,
71 gboolean enabled,
72 GVariant *state);
73void gtk_action_observer_action_enabled_changed (GtkActionObserver *observer,
74 GtkActionObservable *observable,
75 const char *action_name,
76 gboolean enabled);
77void gtk_action_observer_action_state_changed (GtkActionObserver *observer,
78 GtkActionObservable *observable,
79 const char *action_name,
80 GVariant *state);
81void gtk_action_observer_action_removed (GtkActionObserver *observer,
82 GtkActionObservable *observable,
83 const char *action_name);
84void gtk_action_observer_primary_accel_changed (GtkActionObserver *observer,
85 GtkActionObservable *observable,
86 const char *action_name,
87 const char *action_and_target);
88
89G_END_DECLS
90
91#endif /* __GTK_ACTION_OBSERVER_PRIVATE_H__ */
92

source code of gtk/gtk/gtkactionobserverprivate.h