summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_grid_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_grid_eo.h')
-rw-r--r--src/lib/evas/canvas/evas_grid_eo.h185
1 files changed, 185 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_grid_eo.h b/src/lib/evas/canvas/evas_grid_eo.h
new file mode 100644
index 0000000..4064c62
--- /dev/null
+++ b/src/lib/evas/canvas/evas_grid_eo.h
@@ -0,0 +1,185 @@
1#ifndef _EVAS_GRID_EO_H_
2#define _EVAS_GRID_EO_H_
3
4#ifndef _EVAS_GRID_EO_CLASS_TYPE
5#define _EVAS_GRID_EO_CLASS_TYPE
6
7typedef Eo Evas_Grid;
8
9#endif
10
11#ifndef _EVAS_GRID_EO_TYPES
12#define _EVAS_GRID_EO_TYPES
13
14
15#endif
16/** Evas grid class
17 *
18 * @ingroup Evas_Grid
19 */
20#define EVAS_GRID_CLASS evas_grid_class_get()
21
22EWAPI const Efl_Class *evas_grid_class_get(void);
23
24/**
25 * @brief Set the virtual resolution for the grid
26 *
27 * @param[in] obj The object.
28 * @param[in] w The virtual horizontal size (resolution) in integer units.
29 * @param[in] h The virtual vertical size (resolution) in integer units.
30 *
31 * @since 1.1
32 *
33 * @ingroup Evas_Grid
34 */
35EOAPI void evas_obj_grid_size_set(Eo *obj, int w, int h);
36
37/**
38 * @brief Get the current virtual resolution
39 *
40 * See also @ref evas_obj_grid_size_set
41 *
42 * @param[in] obj The object.
43 * @param[out] w The virtual horizontal size (resolution) in integer units.
44 * @param[out] h The virtual vertical size (resolution) in integer units.
45 *
46 * @since 1.1
47 *
48 * @ingroup Evas_Grid
49 */
50EOAPI void evas_obj_grid_size_get(const Eo *obj, int *w, int *h);
51
52/**
53 * @brief Get the list of children for the grid.
54 *
55 * @note This is a duplicate of the list kept by the grid internally. It's up
56 * to the user to destroy it when it no longer needs it. It's possible to
57 * remove objects from the grid when walking this list, but these removals
58 * won't be reflected on it.
59 *
60 * @param[in] obj The object.
61 *
62 * @return Iterator to grid children
63 *
64 * @since 1.1
65 *
66 * @ingroup Evas_Grid
67 */
68EOAPI Eina_List *evas_obj_grid_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
69
70/**
71 * @brief Get an accessor to get random access to the list of children for the
72 * grid.
73 *
74 * @note Do not remove or delete objects while walking the list.
75 *
76 * @param[in] obj The object.
77 *
78 * @return Accessor to children list
79 *
80 * @since 1.1
81 *
82 * @ingroup Evas_Grid
83 */
84EOAPI Eina_Accessor *evas_obj_grid_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
85
86/**
87 * @brief Faster way to remove all child objects from a grid object.
88 *
89 * @param[in] obj The object.
90 * @param[in] clear If @c true, it will delete just removed children.
91 *
92 * @since 1.1
93 *
94 * @ingroup Evas_Grid
95 */
96EOAPI void evas_obj_grid_clear(Eo *obj, Eina_Bool clear);
97
98/**
99 * @brief Get an iterator to walk the list of children for the grid.
100 *
101 * @note Do not remove or delete objects while walking the list.
102 *
103 * @param[in] obj The object.
104 *
105 * @return Iterator
106 *
107 * @since 1.1
108 *
109 * @ingroup Evas_Grid
110 */
111EOAPI Eina_Iterator *evas_obj_grid_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
112
113/**
114 * @brief Create a grid that is child of a given element parent.
115 *
116 * @ref evas_object_grid_add()
117 *
118 * @param[in] obj The object.
119 *
120 * @return New child object
121 *
122 * @since 1.1
123 *
124 * @ingroup Evas_Grid
125 */
126EOAPI Efl_Canvas_Object *evas_obj_grid_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
127
128/**
129 * @brief Remove child from grid.
130 *
131 * @note removing a child will immediately call a walk over children in order
132 * to recalculate numbers of columns and rows. If you plan to remove all
133 * children, use evas_object_grid_clear() instead.
134 *
135 * @param[in] obj The object.
136 * @param[in] child Child to be removed
137 *
138 * @return 1 on success, 0 on failure.
139 *
140 * @since 1.1
141 *
142 * @ingroup Evas_Grid
143 */
144EOAPI Eina_Bool evas_obj_grid_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
145
146/**
147 * @brief Get the pack options for a grid child
148 *
149 * Get the pack x, y, width and height in virtual coordinates set by
150 * @ref evas_obj_grid_pack.
151 *
152 * @param[in] obj The object.
153 * @param[in] child The grid child to query for coordinates.
154 * @param[out] x The pointer to where the x coordinate will be returned.
155 * @param[out] y The pointer to where the y coordinate will be returned.
156 * @param[out] w The pointer to where the width will be returned.
157 * @param[out] h The pointer to where the height will be returned.
158 *
159 * @return 1 on success, 0 on failure.
160 *
161 * @since 1.1
162 *
163 * @ingroup Evas_Grid
164 */
165EOAPI Eina_Bool evas_obj_grid_pack_get(const Eo *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
166
167/**
168 * @brief Add a new child to a grid object.
169 *
170 * @param[in] obj The object.
171 * @param[in] child The child object to add.
172 * @param[in] x The virtual x coordinate of the child.
173 * @param[in] y The virtual y coordinate of the child.
174 * @param[in] w The virtual width of the child.
175 * @param[in] h The virtual height of the child.
176 *
177 * @return 1 on success, 0 on failure.
178 *
179 * @since 1.1
180 *
181 * @ingroup Evas_Grid
182 */
183EOAPI Eina_Bool evas_obj_grid_pack(Eo *obj, Efl_Canvas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(2);
184
185#endif