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_OBSERVABLE_H__ 21 #define __GTK_ACTION_OBSERVABLE_H__ 22 23 #include "gtkactionobserver.h" 24 25 G_BEGIN_DECLS 26 27 #define GTK_TYPE_ACTION_OBSERVABLE (gtk_action_observable_get_type ()) 28 #define GTK_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ 29 GTK_TYPE_ACTION_OBSERVABLE, GtkActionObservable)) 30 #define GTK_IS_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ 31 GTK_TYPE_ACTION_OBSERVABLE)) 32 #define GTK_ACTION_OBSERVABLE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \ 33 GTK_TYPE_ACTION_OBSERVABLE, \ 34 GtkActionObservableInterface)) 35 36 typedef struct _GtkActionObservableInterface GtkActionObservableInterface; 37 38 struct _GtkActionObservableInterface 39 { 40 GTypeInterface g_iface; 41 42 void (* register_observer) (GtkActionObservable *observable, 43 const gchar *action_name, 44 GtkActionObserver *observer); 45 void (* unregister_observer) (GtkActionObservable *observable, 46 const gchar *action_name, 47 GtkActionObserver *observer); 48 }; 49 50 GType gtk_action_observable_get_type (void); 51 void gtk_action_observable_register_observer (GtkActionObservable *observable, 52 const gchar *action_name, 53 GtkActionObserver *observer); 54 void gtk_action_observable_unregister_observer (GtkActionObservable *observable, 55 const gchar *action_name, 56 GtkActionObserver *observer); 57 58 G_END_DECLS 59 60 #endif /* __GTK_ACTION_OBSERVABLE_H__ */ 61