1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2009  Intel Corporation
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * Author:
22  *      Emmanuele Bassi <ebassi@linux.intel.com>
23  */
24 
25 #ifndef __CLUTTER_LAYOUT_META_H__
26 #define __CLUTTER_LAYOUT_META_H__
27 
28 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <clutter/clutter.h> can be included directly."
30 #endif
31 
32 #include <clutter/clutter-types.h>
33 #include <clutter/clutter-child-meta.h>
34 #include <clutter/clutter-layout-manager.h>
35 
36 G_BEGIN_DECLS
37 
38 #define CLUTTER_TYPE_LAYOUT_META                (clutter_layout_meta_get_type ())
39 #define CLUTTER_LAYOUT_META(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_LAYOUT_META, ClutterLayoutMeta))
40 #define CLUTTER_IS_LAYOUT_META(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_LAYOUT_META))
41 #define CLUTTER_LAYOUT_META_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_LAYOUT_META, ClutterLayoutMetaClass))
42 #define CLUTTER_IS_LAYOUT_META_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_LAYOUT_META))
43 #define CLUTTER_LAYOUT_META_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_LAYOUT_META, ClutterLayoutMetaClass))
44 
45 /* ClutterLayoutMeta is defined in clutter-types.h */
46 
47 typedef struct _ClutterLayoutMetaClass          ClutterLayoutMetaClass;
48 
49 /**
50  * ClutterLayoutMeta:
51  * @manager: the layout manager handling this data
52  *
53  * Sub-class of #ClutterChildMeta specific for layout managers
54  *
55  * A #ClutterLayoutManager sub-class should create a #ClutterLayoutMeta
56  * instance by overriding the #ClutterLayoutManager::create_child_meta()
57  * virtual function
58  *
59  * Since: 1.2
60  */
61 struct _ClutterLayoutMeta
62 {
63   /*< private >*/
64   ClutterChildMeta parent_instance;
65 
66   /*< public >*/
67   ClutterLayoutManager *manager;
68 
69   /*< private >*/
70   /* padding */
71   gint32 dummy0;
72   gpointer dummy1;
73 };
74 
75 /**
76  * ClutterLayoutMetaClass:
77  *
78  * The #ClutterLayoutMetaClass contains only private data and
79  * should never be accessed directly
80  *
81  * Since: 1.2
82  */
83 struct _ClutterLayoutMetaClass
84 {
85   /*< private >*/
86   ClutterChildMetaClass parent_class;
87 
88   /* padding, for expansion */
89   void (*_clutter_padding1) (void);
90   void (*_clutter_padding2) (void);
91   void (*_clutter_padding3) (void);
92   void (*_clutter_padding4) (void);
93 };
94 
95 CLUTTER_AVAILABLE_IN_1_2
96 GType clutter_layout_meta_get_type (void) G_GNUC_CONST;
97 
98 CLUTTER_AVAILABLE_IN_1_2
99 ClutterLayoutManager *clutter_layout_meta_get_manager (ClutterLayoutMeta *data);
100 
101 G_END_DECLS
102 
103 #endif /* __CLUTTER_LAYOUT_META_H__ */
104