Back to index

indicator-appmenu  12.10.0
gactionobservable.h
Go to the documentation of this file.
00001 /*
00002  * Copyright © 2011 Canonical Limited
00003  *
00004  * This library is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU Lesser General Public License as
00006  * published by the Free Software Foundation; either version 2 of the
00007  * licence or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
00016  *
00017  * Authors: Ryan Lortie <desrt@desrt.ca>
00018  */
00019 
00020 #ifndef __G_ACTION_OBSERVABLE_H__
00021 #define __G_ACTION_OBSERVABLE_H__
00022 
00023 #include "gactionobserver.h"
00024 
00025 G_BEGIN_DECLS
00026 
00027 #define G_TYPE_ACTION_OBSERVABLE                            (g_action_observable_get_type ())
00028 #define G_ACTION_OBSERVABLE(inst)                           (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
00029                                                              G_TYPE_ACTION_OBSERVABLE, GActionObservable))
00030 #define G_IS_ACTION_OBSERVABLE(inst)                        (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
00031                                                              G_TYPE_ACTION_OBSERVABLE))
00032 #define G_ACTION_OBSERVABLE_GET_IFACE(inst)                 (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
00033                                                              G_TYPE_ACTION_OBSERVABLE, GActionObservableInterface))
00034 
00035 typedef struct _GActionObservableInterface                  GActionObservableInterface;
00036 
00037 struct _GActionObservableInterface
00038 {
00039   GTypeInterface g_iface;
00040 
00041   void (* register_observer)   (GActionObservable *observable,
00042                                 const gchar       *action_name,
00043                                 GActionObserver   *observer);
00044   void (* unregister_observer) (GActionObservable *observable,
00045                                 const gchar       *action_name,
00046                                 GActionObserver   *observer);
00047 };
00048 
00049 G_GNUC_INTERNAL
00050 GType                   g_action_observable_get_type                    (void);
00051 G_GNUC_INTERNAL
00052 void                    g_action_observable_register_observer           (GActionObservable  *observable,
00053                                                                          const gchar        *action_name,
00054                                                                          GActionObserver    *observer);
00055 G_GNUC_INTERNAL
00056 void                    g_action_observable_unregister_observer         (GActionObservable  *observable,
00057                                                                          const gchar        *action_name,
00058                                                                          GActionObserver    *observer);
00059 
00060 G_END_DECLS
00061 
00062 #endif /* __G_ACTION_OBSERVABLE_H__ */