]> Pileus Git - ~andy/gtk/blob - gtk/gactionobserver.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gactionobserver.h
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 __G_ACTION_OBSERVER_H__
21 #define __G_ACTION_OBSERVER_H__
22
23 #include <gio/gio.h>
24
25 G_BEGIN_DECLS
26
27 #define G_TYPE_ACTION_OBSERVER                              (g_action_observer_get_type ())
28 #define G_ACTION_OBSERVER(inst)                             (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
29                                                              G_TYPE_ACTION_OBSERVER, GActionObserver))
30 #define G_IS_ACTION_OBSERVER(inst)                          (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
31                                                              G_TYPE_ACTION_OBSERVER))
32 #define G_ACTION_OBSERVER_GET_IFACE(inst)                   (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
33                                                              G_TYPE_ACTION_OBSERVER, GActionObserverInterface))
34
35 typedef struct _GActionObserverInterface                    GActionObserverInterface;
36 typedef struct _GActionObservable                           GActionObservable;
37 typedef struct _GActionObserver                             GActionObserver;
38
39 struct _GActionObserverInterface
40 {
41   GTypeInterface g_iface;
42
43   void (* action_added)           (GActionObserver    *observer,
44                                    GActionObservable  *observable,
45                                    const gchar        *action_name,
46                                    const GVariantType *parameter_type,
47                                    gboolean            enabled,
48                                    GVariant           *state);
49   void (* action_enabled_changed) (GActionObserver    *observer,
50                                    GActionObservable  *observable,
51                                    const gchar        *action_name,
52                                    gboolean            enabled);
53   void (* action_state_changed)   (GActionObserver    *observer,
54                                    GActionObservable  *observable,
55                                    const gchar        *action_name,
56                                    GVariant           *state);
57   void (* action_removed)         (GActionObserver    *observer,
58                                    GActionObservable  *observable,
59                                    const gchar        *action_name);
60 };
61
62 G_GNUC_INTERNAL
63 GType                   g_action_observer_get_type                      (void);
64 G_GNUC_INTERNAL
65 void                    g_action_observer_action_added                  (GActionObserver    *observer,
66                                                                          GActionObservable  *observable,
67                                                                          const gchar        *action_name,
68                                                                          const GVariantType *parameter_type,
69                                                                          gboolean            enabled,
70                                                                          GVariant           *state);
71 G_GNUC_INTERNAL
72 void                    g_action_observer_action_enabled_changed        (GActionObserver    *observer,
73                                                                          GActionObservable  *observable,
74                                                                          const gchar        *action_name,
75                                                                          gboolean            enabled);
76 G_GNUC_INTERNAL
77 void                    g_action_observer_action_state_changed          (GActionObserver    *observer,
78                                                                          GActionObservable  *observable,
79                                                                          const gchar        *action_name,
80                                                                          GVariant           *state);
81 G_GNUC_INTERNAL
82 void                    g_action_observer_action_removed                (GActionObserver    *observer,
83                                                                          GActionObservable  *observable,
84                                                                          const gchar        *action_name);
85
86 G_END_DECLS
87
88 #endif /* __G_ACTION_OBSERVER_H__ */