]> Pileus Git - ~andy/gtk/blob - gtk/gsimpleactionobserver.h
877358f7d94fe9dd4fc5bbe2dae78b498cdfd4e5
[~andy/gtk] / gtk / gsimpleactionobserver.h
1 /*
2  * Copyright © 2012 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 __G_SIMPLE_ACTION_OBSERVER_H__
21 #define __G_SIMPLE_ACTION_OBSERVER_H__
22
23 #include "gactionobserver.h"
24
25 G_BEGIN_DECLS
26
27 #define G_TYPE_SIMPLE_ACTION_OBSERVER                       (g_simple_action_observer_get_type ())
28 #define G_SIMPLE_ACTION_OBSERVER(inst)                      (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
29                                                              G_TYPE_SIMPLE_ACTION_OBSERVER,                          \
30                                                              GSimpleActionObserver))
31 #define G_IS_SIMPLE_ACTION_OBSERVER(inst)                   (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
32                                                              G_TYPE_SIMPLE_ACTION_OBSERVER))
33
34 typedef struct _GSimpleActionObserver                       GSimpleActionObserver;
35
36 G_GNUC_INTERNAL
37 GType                   g_simple_action_observer_get_type               (void);
38 G_GNUC_INTERNAL
39 GSimpleActionObserver * g_simple_action_observer_new                    (GActionObservable     *observable,
40                                                                          const gchar           *action_name,
41                                                                          GVariant              *target);
42 G_GNUC_INTERNAL
43 void                    g_simple_action_observer_activate               (GSimpleActionObserver *observer);
44 G_GNUC_INTERNAL
45 gboolean                g_simple_action_observer_get_active             (GSimpleActionObserver *observer);
46 G_GNUC_INTERNAL
47 gboolean                g_simple_action_observer_get_enabled            (GSimpleActionObserver *observer);
48
49 G_END_DECLS
50
51 #endif /* __G_SIMPLE_ACTION_OBSERVER_H__ */