Release Clutter 1.11.4 (snapshot)
[profile/ivi/clutter.git] / clutter / clutter-table-layout.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2010  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  *   Jose Dapena Paz <jdapena@igalia.com>
23  *
24  * Based on the MX MxTable actor by:
25  *   Thomas Wood <thomas.wood@intel.com>
26  */
27
28 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <clutter/clutter.h> can be included directly."
30 #endif
31
32 #ifndef __CLUTTER_TABLE_LAYOUT_H__
33 #define __CLUTTER_TABLE_LAYOUT_H__
34
35 #include <clutter/clutter-layout-manager.h>
36
37 G_BEGIN_DECLS
38
39 #define CLUTTER_TYPE_TABLE_LAYOUT                 (clutter_table_layout_get_type ())
40 #define CLUTTER_TABLE_LAYOUT(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_TABLE_LAYOUT, ClutterTableLayout))
41 #define CLUTTER_IS_TABLE_LAYOUT(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_TABLE_LAYOUT))
42 #define CLUTTER_TABLE_LAYOUT_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_TABLE_LAYOUT, ClutterTableLayoutClass))
43 #define CLUTTER_IS_TABLE_LAYOUT_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_TABLE_LAYOUT))
44 #define CLUTTER_TABLE_LAYOUT_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_TABLE_LAYOUT, ClutterTableLayoutClass))
45
46 typedef struct _ClutterTableLayout                ClutterTableLayout;
47 typedef struct _ClutterTableLayoutPrivate         ClutterTableLayoutPrivate;
48 typedef struct _ClutterTableLayoutClass           ClutterTableLayoutClass;
49
50 /**
51  * ClutterTableLayout:
52  *
53  * The #ClutterTableLayout structure contains only private data
54  * and should be accessed using the provided API
55  *
56  * Since: 1.4
57  */
58 struct _ClutterTableLayout
59 {
60   /*< private >*/
61   ClutterLayoutManager parent_instance;
62
63   ClutterTableLayoutPrivate *priv;
64 };
65
66 /**
67  * ClutterTableLayoutClass:
68  *
69  * The #ClutterTableLayoutClass structure contains only private
70  * data and should be accessed using the provided API
71  *
72  * Since: 1.4
73  */
74 struct _ClutterTableLayoutClass
75 {
76   /*< private >*/
77   ClutterLayoutManagerClass parent_class;
78 };
79
80 GType clutter_table_layout_get_type (void) G_GNUC_CONST;
81
82 ClutterLayoutManager *clutter_table_layout_new                 (void);
83
84 void                  clutter_table_layout_pack                (ClutterTableLayout    *layout,
85                                                                 ClutterActor          *actor,
86                                                                 gint                   column,
87                                                                 gint                   row);
88
89 void                  clutter_table_layout_set_column_spacing  (ClutterTableLayout    *layout,
90                                                                 guint                  spacing);
91 void                  clutter_table_layout_set_row_spacing     (ClutterTableLayout    *layout,
92                                                                 guint                  spacing);
93 guint                 clutter_table_layout_get_column_spacing  (ClutterTableLayout    *layout);
94 guint                 clutter_table_layout_get_row_spacing     (ClutterTableLayout    *layout);
95
96 void                  clutter_table_layout_set_span            (ClutterTableLayout    *layout,
97                                                                 ClutterActor          *actor,
98                                                                 gint                   column_span,
99                                                                 gint                   row_span);
100 void                  clutter_table_layout_get_span            (ClutterTableLayout    *layout,
101                                                                 ClutterActor          *actor,
102                                                                 gint                  *column_span,
103                                                                 gint                  *row_span);
104 void                  clutter_table_layout_set_alignment       (ClutterTableLayout    *layout,
105                                                                 ClutterActor          *actor,
106                                                                 ClutterTableAlignment  x_align,
107                                                                 ClutterTableAlignment  y_align);
108 void                  clutter_table_layout_get_alignment       (ClutterTableLayout    *layout,
109                                                                 ClutterActor          *actor,
110                                                                 ClutterTableAlignment *x_align,
111                                                                 ClutterTableAlignment *y_align);
112 void                  clutter_table_layout_set_fill            (ClutterTableLayout    *layout,
113                                                                 ClutterActor          *actor,
114                                                                 gboolean               x_fill,
115                                                                 gboolean               y_fill);
116 void                  clutter_table_layout_get_fill            (ClutterTableLayout    *layout,
117                                                                 ClutterActor          *actor,
118                                                                 gboolean              *x_fill,
119                                                                 gboolean              *y_fill);
120 void                  clutter_table_layout_set_expand          (ClutterTableLayout    *layout,
121                                                                 ClutterActor          *actor,
122                                                                 gboolean               x_expand,
123                                                                 gboolean               y_expand);
124 void                  clutter_table_layout_get_expand          (ClutterTableLayout    *layout,
125                                                                 ClutterActor          *actor,
126                                                                 gboolean              *x_expand,
127                                                                 gboolean              *y_expand);
128
129 gint                  clutter_table_layout_get_row_count       (ClutterTableLayout    *layout);
130 gint                  clutter_table_layout_get_column_count    (ClutterTableLayout    *layout);
131
132 CLUTTER_DEPRECATED_IN_1_12
133 void                  clutter_table_layout_set_use_animations  (ClutterTableLayout    *layout,
134                                                                 gboolean               animate);
135 CLUTTER_DEPRECATED_IN_1_12
136 gboolean              clutter_table_layout_get_use_animations  (ClutterTableLayout    *layout);
137 CLUTTER_DEPRECATED_IN_1_12
138 void                  clutter_table_layout_set_easing_mode     (ClutterTableLayout    *layout,
139                                                                 gulong                 mode);
140 CLUTTER_DEPRECATED_IN_1_12
141 gulong                clutter_table_layout_get_easing_mode     (ClutterTableLayout    *layout);
142 CLUTTER_DEPRECATED_IN_1_12
143 void                  clutter_table_layout_set_easing_duration (ClutterTableLayout    *layout,
144                                                                 guint                  msecs);
145 CLUTTER_DEPRECATED_IN_1_12
146 guint                 clutter_table_layout_get_easing_duration (ClutterTableLayout    *layout);
147
148 G_END_DECLS
149
150 #endif /* __CLUTTER_TABLE_LAYOUT_H__ */