Back to index

indicator-appmenu  12.10.0
gactionobserver.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_OBSERVER_H__
00021 #define __G_ACTION_OBSERVER_H__
00022 
00023 #include <gio/gio.h>
00024 
00025 G_BEGIN_DECLS
00026 
00027 #define G_TYPE_ACTION_OBSERVER                              (g_action_observer_get_type ())
00028 #define G_ACTION_OBSERVER(inst)                             (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
00029                                                              G_TYPE_ACTION_OBSERVER, GActionObserver))
00030 #define G_IS_ACTION_OBSERVER(inst)                          (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
00031                                                              G_TYPE_ACTION_OBSERVER))
00032 #define G_ACTION_OBSERVER_GET_IFACE(inst)                   (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
00033                                                              G_TYPE_ACTION_OBSERVER, GActionObserverInterface))
00034 
00035 typedef struct _GActionObserverInterface                    GActionObserverInterface;
00036 typedef struct _GActionObservable                           GActionObservable;
00037 typedef struct _GActionObserver                             GActionObserver;
00038 
00039 struct _GActionObserverInterface
00040 {
00041   GTypeInterface g_iface;
00042 
00043   void (* action_added)           (GActionObserver    *observer,
00044                                    GActionObservable  *observable,
00045                                    const gchar        *action_name,
00046                                    const GVariantType *parameter_type,
00047                                    gboolean            enabled,
00048                                    GVariant           *state);
00049   void (* action_enabled_changed) (GActionObserver    *observer,
00050                                    GActionObservable  *observable,
00051                                    const gchar        *action_name,
00052                                    gboolean            enabled);
00053   void (* action_state_changed)   (GActionObserver    *observer,
00054                                    GActionObservable  *observable,
00055                                    const gchar        *action_name,
00056                                    GVariant           *state);
00057   void (* action_removed)         (GActionObserver    *observer,
00058                                    GActionObservable  *observable,
00059                                    const gchar        *action_name);
00060 };
00061 
00062 G_GNUC_INTERNAL
00063 GType                   g_action_observer_get_type                      (void);
00064 G_GNUC_INTERNAL
00065 void                    g_action_observer_action_added                  (GActionObserver    *observer,
00066                                                                          GActionObservable  *observable,
00067                                                                          const gchar        *action_name,
00068                                                                          const GVariantType *parameter_type,
00069                                                                          gboolean            enabled,
00070                                                                          GVariant           *state);
00071 G_GNUC_INTERNAL
00072 void                    g_action_observer_action_enabled_changed        (GActionObserver    *observer,
00073                                                                          GActionObservable  *observable,
00074                                                                          const gchar        *action_name,
00075                                                                          gboolean            enabled);
00076 G_GNUC_INTERNAL
00077 void                    g_action_observer_action_state_changed          (GActionObserver    *observer,
00078                                                                          GActionObservable  *observable,
00079                                                                          const gchar        *action_name,
00080                                                                          GVariant           *state);
00081 G_GNUC_INTERNAL
00082 void                    g_action_observer_action_removed                (GActionObserver    *observer,
00083                                                                          GActionObservable  *observable,
00084                                                                          const gchar        *action_name);
00085 
00086 G_END_DECLS
00087 
00088 #endif /* __G_ACTION_OBSERVER_H__ */