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_OBSERVABLE_H__
21 #define __G_ACTION_OBSERVABLE_H__
23 #include <gtk/gactionobserver.h>
27 #define G_TYPE_ACTION_OBSERVABLE (g_action_observable_get_type ())
28 #define G_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
29 G_TYPE_ACTION_OBSERVABLE, GActionObservable))
30 #define G_IS_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
31 G_TYPE_ACTION_OBSERVABLE))
32 #define G_ACTION_OBSERVABLE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
33 G_TYPE_ACTION_OBSERVABLE, GActionObservableInterface))
35 typedef struct _GActionObservableInterface GActionObservableInterface;
37 struct _GActionObservableInterface
39 GTypeInterface g_iface;
41 void (* register_observer) (GActionObservable *observable,
42 const gchar *action_name,
43 GActionObserver *observer);
44 void (* unregister_observer) (GActionObservable *observable,
45 const gchar *action_name,
46 GActionObserver *observer);
50 GType g_action_observable_get_type (void);
52 void g_action_observable_register_observer (GActionObservable *observable,
53 const gchar *action_name,
54 GActionObserver *observer);
56 void g_action_observable_unregister_observer (GActionObservable *observable,
57 const gchar *action_name,
58 GActionObserver *observer);
62 #endif /* __G_ACTION_OBSERVABLE_H__ */