]> Pileus Git - ~andy/gtk/blob - gtk/gactionobservable.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gactionobservable.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_OBSERVABLE_H__
21 #define __G_ACTION_OBSERVABLE_H__
22
23 #include <gtk/gactionobserver.h>
24
25 G_BEGIN_DECLS
26
27 #define G_TYPE_ACTION_OBSERVABLE                            (g_action_observable_get_type ())
28 #define G_ACTION_OBSERVABLE(inst)                           (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
29                                                              G_TYPE_ACTION_OBSERVABLE, GActionObservable))
30 #define G_IS_ACTION_OBSERVABLE(inst)                        (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
31                                                              G_TYPE_ACTION_OBSERVABLE))
32 #define G_ACTION_OBSERVABLE_GET_IFACE(inst)                 (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
33                                                              G_TYPE_ACTION_OBSERVABLE, GActionObservableInterface))
34
35 typedef struct _GActionObservableInterface                  GActionObservableInterface;
36
37 struct _GActionObservableInterface
38 {
39   GTypeInterface g_iface;
40
41   void (* register_observer)   (GActionObservable *observable,
42                                 const gchar       *action_name,
43                                 GActionObserver   *observer);
44   void (* unregister_observer) (GActionObservable *observable,
45                                 const gchar       *action_name,
46                                 GActionObserver   *observer);
47 };
48
49 G_GNUC_INTERNAL
50 GType                   g_action_observable_get_type                    (void);
51 G_GNUC_INTERNAL
52 void                    g_action_observable_register_observer           (GActionObservable  *observable,
53                                                                          const gchar        *action_name,
54                                                                          GActionObserver    *observer);
55 G_GNUC_INTERNAL
56 void                    g_action_observable_unregister_observer         (GActionObservable  *observable,
57                                                                          const gchar        *action_name,
58                                                                          GActionObserver    *observer);
59
60 G_END_DECLS
61
62 #endif /* __G_ACTION_OBSERVABLE_H__ */