2 * Copyright © 2011 Canonical Limited
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.
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.
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/>.
17 * Authors: Ryan Lortie <desrt@desrt.ca>
20 #ifndef __G_ACTION_OBSERVER_H__
21 #define __G_ACTION_OBSERVER_H__
27 #define G_TYPE_ACTION_OBSERVER (g_action_observer_get_type ())
28 #define G_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
29 G_TYPE_ACTION_OBSERVER, GActionObserver))
30 #define G_IS_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
31 G_TYPE_ACTION_OBSERVER))
32 #define G_ACTION_OBSERVER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
33 G_TYPE_ACTION_OBSERVER, GActionObserverInterface))
35 typedef struct _GActionObserverInterface GActionObserverInterface;
36 typedef struct _GActionObservable GActionObservable;
37 typedef struct _GActionObserver GActionObserver;
39 struct _GActionObserverInterface
41 GTypeInterface g_iface;
43 void (* action_added) (GActionObserver *observer,
44 GActionObservable *observable,
45 const gchar *action_name,
46 const GVariantType *parameter_type,
49 void (* action_enabled_changed) (GActionObserver *observer,
50 GActionObservable *observable,
51 const gchar *action_name,
53 void (* action_state_changed) (GActionObserver *observer,
54 GActionObservable *observable,
55 const gchar *action_name,
57 void (* action_removed) (GActionObserver *observer,
58 GActionObservable *observable,
59 const gchar *action_name);
63 GType g_action_observer_get_type (void);
65 void g_action_observer_action_added (GActionObserver *observer,
66 GActionObservable *observable,
67 const gchar *action_name,
68 const GVariantType *parameter_type,
72 void g_action_observer_action_enabled_changed (GActionObserver *observer,
73 GActionObservable *observable,
74 const gchar *action_name,
77 void g_action_observer_action_state_changed (GActionObserver *observer,
78 GActionObservable *observable,
79 const gchar *action_name,
82 void g_action_observer_action_removed (GActionObserver *observer,
83 GActionObservable *observable,
84 const gchar *action_name);
88 #endif /* __G_ACTION_OBSERVER_H__ */