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