summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_table_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_table_eo.legacy.h')
-rw-r--r--src/lib/evas/canvas/evas_table_eo.legacy.h321
1 files changed, 321 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_table_eo.legacy.h b/src/lib/evas/canvas/evas_table_eo.legacy.h
new file mode 100644
index 0000000..d7fc5d1
--- /dev/null
+++ b/src/lib/evas/canvas/evas_table_eo.legacy.h
@@ -0,0 +1,321 @@
1#ifndef _EVAS_TABLE_EO_LEGACY_H_
2#define _EVAS_TABLE_EO_LEGACY_H_
3
4#ifndef _EVAS_TABLE_EO_CLASS_TYPE
5#define _EVAS_TABLE_EO_CLASS_TYPE
6
7typedef Eo Evas_Table;
8
9#endif
10
11#ifndef _EVAS_TABLE_EO_TYPES
12#define _EVAS_TABLE_EO_TYPES
13
14/**
15 * @brief How to pack items into cells in a table.
16 *
17 * See @ref evas_object_table_homogeneous_get for an explanation of the
18 * function of each one.
19 *
20 * @ingroup Evas_Object_Table
21 */
22typedef enum
23{
24 EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, /**< No mode specified */
25 EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, /**< Table mode */
26 EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 /**< Item mode */
27} Evas_Object_Table_Homogeneous_Mode;
28
29
30#endif
31
32/**
33 * @brief Set how this table should layout children.
34 *
35 * Todo: consider aspect hint and respect it.
36 *
37 * @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE If table does not use homogeneous
38 * mode then columns and rows will be calculated based on hints of individual
39 * cells. This operation mode is more flexible, but more complex and heavy to
40 * calculate as well. Weight properties are handled as a boolean expand.
41 * Negative alignment will be considered as 0.5. This is the default.
42 *
43 * Todo: @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
44 *
45 * @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE When homogeneous is relative to
46 * table the own table size is divided equally among children, filling the
47 * whole table area. That is, if table has @c WIDTH and @c COLUMNS, each cell
48 * will get _WIDTH / COLUMNS_ pixels. If children have minimum size that is
49 * larger than this amount (including padding), then it will overflow and be
50 * aligned respecting the alignment hint, possible overlapping sibling cells.
51 * Weight hint is used as a boolean, if greater than zero it will make the
52 * child expand in that axis, taking as much space as possible (bounded to
53 * maximum size hint). Negative alignment will be considered as 0.5.
54 *
55 * @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM When homogeneous is relative to item
56 * it means the greatest minimum cell size will be used. That is, if no element
57 * is set to expand, the table will have its contents to a minimum size, the
58 * bounding box of all these children will be aligned relatively to the table
59 * object using evas_object_table_align_get(). If the table area is too small
60 * to hold this minimum bounding box, then the objects will keep their size and
61 * the bounding box will overflow the box area, still respecting the alignment.
62 * Weight hint is used as a boolean, if greater than zero it will make that
63 * cell expand in that axis, toggling the *expand mode*, which makes the table
64 * behave much like @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
65 * bounding box will overflow and items will not overlap siblings. If no
66 * minimum size is provided at all then the table will fallback to expand mode
67 * as well.
68 *
69 * @param[in] obj The object.
70 * @param[in] homogeneous Table homogeneous mode
71 *
72 * @ingroup Evas_Object_Table_Group
73 */
74EAPI void evas_object_table_homogeneous_set(Evas_Table *obj, Evas_Object_Table_Homogeneous_Mode homogeneous);
75
76/**
77 * @brief Set how this table should layout children.
78 *
79 * Todo: consider aspect hint and respect it.
80 *
81 * @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE If table does not use homogeneous
82 * mode then columns and rows will be calculated based on hints of individual
83 * cells. This operation mode is more flexible, but more complex and heavy to
84 * calculate as well. Weight properties are handled as a boolean expand.
85 * Negative alignment will be considered as 0.5. This is the default.
86 *
87 * Todo: @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
88 *
89 * @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE When homogeneous is relative to
90 * table the own table size is divided equally among children, filling the
91 * whole table area. That is, if table has @c WIDTH and @c COLUMNS, each cell
92 * will get _WIDTH / COLUMNS_ pixels. If children have minimum size that is
93 * larger than this amount (including padding), then it will overflow and be
94 * aligned respecting the alignment hint, possible overlapping sibling cells.
95 * Weight hint is used as a boolean, if greater than zero it will make the
96 * child expand in that axis, taking as much space as possible (bounded to
97 * maximum size hint). Negative alignment will be considered as 0.5.
98 *
99 * @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM When homogeneous is relative to item
100 * it means the greatest minimum cell size will be used. That is, if no element
101 * is set to expand, the table will have its contents to a minimum size, the
102 * bounding box of all these children will be aligned relatively to the table
103 * object using evas_object_table_align_get(). If the table area is too small
104 * to hold this minimum bounding box, then the objects will keep their size and
105 * the bounding box will overflow the box area, still respecting the alignment.
106 * Weight hint is used as a boolean, if greater than zero it will make that
107 * cell expand in that axis, toggling the *expand mode*, which makes the table
108 * behave much like @ref EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
109 * bounding box will overflow and items will not overlap siblings. If no
110 * minimum size is provided at all then the table will fallback to expand mode
111 * as well.
112 *
113 * @param[in] obj The object.
114 *
115 * @return Table homogeneous mode
116 *
117 * @ingroup Evas_Object_Table_Group
118 */
119EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get(const Evas_Table *obj);
120
121/**
122 * @brief Control the alignment of the whole bounding box of contents.
123 *
124 * @param[in] obj The object.
125 * @param[in] horizontal Horizontal alignment
126 * @param[in] vertical Vertical alignment
127 *
128 * @ingroup Evas_Object_Table_Group
129 */
130EAPI void evas_object_table_align_set(Evas_Table *obj, double horizontal, double vertical);
131
132/**
133 * @brief Control the alignment of the whole bounding box of contents.
134 *
135 * @param[in] obj The object.
136 * @param[out] horizontal Horizontal alignment
137 * @param[out] vertical Vertical alignment
138 *
139 * @ingroup Evas_Object_Table_Group
140 */
141EAPI void evas_object_table_align_get(const Evas_Table *obj, double *horizontal, double *vertical);
142
143/**
144 * @brief Control the padding between cells.
145 *
146 * @param[in] obj The object.
147 * @param[in] horizontal Horizontal padding
148 * @param[in] vertical Vertical padding
149 *
150 * @ingroup Evas_Object_Table_Group
151 */
152EAPI void evas_object_table_padding_set(Evas_Table *obj, int horizontal, int vertical);
153
154/**
155 * @brief Control the padding between cells.
156 *
157 * @param[in] obj The object.
158 * @param[out] horizontal Horizontal padding
159 * @param[out] vertical Vertical padding
160 *
161 * @ingroup Evas_Object_Table_Group
162 */
163EAPI void evas_object_table_padding_get(const Evas_Table *obj, int *horizontal, int *vertical);
164
165/**
166 * @brief Get the number of columns and rows this table takes.
167 *
168 * @note columns and rows are virtual entities, one can specify a table with a
169 * single object that takes 4 columns and 5 rows. The only difference for a
170 * single cell table is that paddings will be accounted proportionally.
171 *
172 * @param[in] obj The object.
173 * @param[out] cols Columns in table
174 * @param[out] rows Rows in table
175 *
176 * @ingroup Evas_Object_Table_Group
177 */
178EAPI void evas_object_table_col_row_size_get(const Evas_Table *obj, int *cols, int *rows);
179
180/**
181 * @brief Get the list of children for the table.
182 *
183 * @note This is a duplicate of the list kept by the table internally. It's up
184 * to the user to destroy it when it no longer needs it. It's possible to
185 * remove objects from the table when walking this list, but these removals
186 * won't be reflected on it.
187 *
188 * @param[in] obj The object.
189 *
190 * @return Children list
191 *
192 * @ingroup Evas_Object_Table_Group
193 */
194EAPI Eina_List *evas_object_table_children_get(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
195
196/**
197 * @brief Get the child of the table at the given coordinates
198 *
199 * @note This does not take into account col/row spanning
200 *
201 * @param[in] obj The object.
202 * @param[in] col Child column
203 * @param[in] row Child row
204 *
205 * @return Child object
206 *
207 * @ingroup Evas_Object_Table_Group
208 */
209EAPI Efl_Canvas_Object *evas_object_table_child_get(const Evas_Table *obj, unsigned short col, unsigned short row);
210
211/**
212 * @brief Faster way to remove all child objects from a table object.
213 *
214 * @param[in] obj The object.
215 * @param[in] clear If @c true, it will delete just removed children.
216 *
217 * @ingroup Evas_Object_Table_Group
218 */
219EAPI void evas_object_table_clear(Evas_Table *obj, Eina_Bool clear);
220
221/**
222 * @brief Get an accessor to get random access to the list of children for the
223 * table.
224 *
225 * @note Do not remove or delete objects while walking the list.
226 *
227 * @param[in] obj The object.
228 *
229 * @return Accessor to children list
230 *
231 * @ingroup Evas_Object_Table_Group
232 */
233EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
234
235/**
236 * @brief Get an iterator to walk the list of children for the table.
237 *
238 * @note Do not remove or delete objects while walking the list.
239 *
240 * @param[in] obj The object.
241 *
242 * @return Iterator to children
243 *
244 * @ingroup Evas_Object_Table_Group
245 */
246EAPI Eina_Iterator *evas_object_table_iterator_new(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
247
248/**
249 * @brief Create a table that is child of a given element @c parent.
250 *
251 * @param[in] obj The object.
252 *
253 * @return Children table
254 *
255 * @ingroup Evas_Object_Table_Group
256 */
257EAPI Efl_Canvas_Object *evas_object_table_add_to(Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
258
259/**
260 * @brief Get packing location of a child of table
261 *
262 * @param[in] obj The object.
263 * @param[in] child The child object to add.
264 * @param[out] col Pointer to store relative-horizontal position to place
265 * child.
266 * @param[out] row Pointer to store relative-vertical position to place child.
267 * @param[out] colspan Pointer to store how many relative-horizontal positions
268 * to use for this child.
269 * @param[out] rowspan Pointer to store how many relative-vertical positions to
270 * use for this child.
271 *
272 * @return @c true on success, @c false on failure.
273 *
274 * @since 1.1
275 *
276 * @ingroup Evas_Object_Table_Group
277 */
278EAPI Eina_Bool evas_object_table_pack_get(const Evas_Table *obj, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
279
280/**
281 * @brief Add a new child to a table object or set its current packing.
282 *
283 * Note that columns and rows only guarantee 16bit unsigned values at best.
284 * That means that col + colspan AND row + rowspan must fit inside 16bit
285 * unsigned values cleanly. You will be warned once values exceed 15bit
286 * storage, and attempting to use values not able to fit in 16bits will result
287 * in failure.
288 *
289 * @param[in] obj The object.
290 * @param[in] child The child object to add.
291 * @param[in] col Relative-horizontal position to place child.
292 * @param[in] row Relative-vertical position to place child.
293 * @param[in] colspan How many relative-horizontal positions to use for this
294 * child.
295 * @param[in] rowspan How many relative-vertical positions to use for this
296 * child.
297 *
298 * @return @c true on success, @c false on failure.
299 *
300 * @ingroup Evas_Object_Table_Group
301 */
302EAPI Eina_Bool evas_object_table_pack(Evas_Table *obj, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(2);
303
304/**
305 * @brief Remove child from table.
306 *
307 * @note removing a child will immediately call a walk over children in order
308 * to recalculate numbers of columns and rows. If you plan to remove all
309 * children, use @ref evas_object_table_clear instead.
310 *
311 * @param[in] obj The object.
312 * @param[in] child Child to be removed
313 *
314 * @return @c true on success, @c false on failure.
315 *
316 * @ingroup Evas_Object_Table_Group
317 */
318EAPI Eina_Bool evas_object_table_unpack(Evas_Table *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
319
320
321#endif