2 * Copyright © 2011 Canonical Limited
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.
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, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
19 * Authors: Ryan Lortie <desrt@desrt.ca>
22 #ifndef __G_ACTION_OBSERVER_H__
23 #define __G_ACTION_OBSERVER_H__
29 #define G_TYPE_ACTION_OBSERVER (g_action_observer_get_type ())
30 #define G_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
31 G_TYPE_ACTION_OBSERVER, GActionObserver))
32 #define G_IS_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
33 G_TYPE_ACTION_OBSERVER))
34 #define G_ACTION_OBSERVER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
35 G_TYPE_ACTION_OBSERVER, GActionObserverInterface))
37 typedef struct _GActionObserverInterface GActionObserverInterface;
38 typedef struct _GActionObservable GActionObservable;
39 typedef struct _GActionObserver GActionObserver;
41 struct _GActionObserverInterface
43 GTypeInterface g_iface;
45 void (* action_added) (GActionObserver *observer,
46 GActionObservable *observable,
47 const gchar *action_name,
48 const GVariantType *parameter_type,
51 void (* action_enabled_changed) (GActionObserver *observer,
52 GActionObservable *observable,
53 const gchar *action_name,
55 void (* action_state_changed) (GActionObserver *observer,
56 GActionObservable *observable,
57 const gchar *action_name,
59 void (* action_removed) (GActionObserver *observer,
60 GActionObservable *observable,
61 const gchar *action_name);
65 GType g_action_observer_get_type (void);
67 void g_action_observer_action_added (GActionObserver *observer,
68 GActionObservable *observable,
69 const gchar *action_name,
70 const GVariantType *parameter_type,
74 void g_action_observer_action_enabled_changed (GActionObserver *observer,
75 GActionObservable *observable,
76 const gchar *action_name,
79 void g_action_observer_action_state_changed (GActionObserver *observer,
80 GActionObservable *observable,
81 const gchar *action_name,
84 void g_action_observer_action_removed (GActionObserver *observer,
85 GActionObservable *observable,
86 const gchar *action_name);
90 #endif /* __G_ACTION_OBSERVER_H__ */