1 #ifndef _ELM_GENGRID_ITEM_EO_LEGACY_H_
2 #define _ELM_GENGRID_ITEM_EO_LEGACY_H_
3 
4 #ifndef _ELM_GENGRID_ITEM_EO_CLASS_TYPE
5 #define _ELM_GENGRID_ITEM_EO_CLASS_TYPE
6 
7 typedef Eo Elm_Gengrid_Item;
8 
9 #endif
10 
11 #ifndef _ELM_GENGRID_ITEM_EO_TYPES
12 #define _ELM_GENGRID_ITEM_EO_TYPES
13 
14 
15 #endif
16 
17 /**
18  * @defgroup Elm_Gengrid_Item_Group Gengrid Item
19  * @ingroup Elm_Gengrid_Group
20  */
21 
22 /**
23  * @brief Get the previous item in a gengrid widget's internal list of items,
24  * given a handle to one of those items.
25  *
26  * This returns the item placed before the @c item, on the container gengrid.
27  *
28  * @param[in] obj The object.
29  *
30  * @return The item before @c item, or @c NULL if there's none (and on errors)
31  *
32  * @ingroup Elm_Gengrid_Item_Group
33  */
34 EAPI Elm_Widget_Item *elm_gengrid_item_prev_get(const Elm_Gengrid_Item *obj);
35 
36 /**
37  * @brief Get the next item in a gengrid widget's internal list of items, given
38  * a handle to one of those items.
39  *
40  * This returns the item placed after the @c item, on the container gengrid.
41  *
42  * @param[in] obj The object.
43  *
44  * @return The item after @c item, or @c NULL if there's none (and on errors)
45  *
46  * @ingroup Elm_Gengrid_Item_Group
47  */
48 EAPI Elm_Widget_Item *elm_gengrid_item_next_get(const Elm_Gengrid_Item *obj);
49 
50 /**
51  * @brief Control whether a given gengrid item is selected or not
52  *
53  * This API returns true for all the items selected in multi-select mode as
54  * well.
55  *
56  * This sets the selected state of an item. If multi-selection is not enabled
57  * on the containing gengrid and @c selected is true, any other previously
58  * selected items will get unselected in favor of this new one.
59  *
60  * @param[in] obj The object.
61  * @param[in] selected The selected state ($true selected, @c false not
62  * selected)
63  *
64  * @ingroup Elm_Gengrid_Item_Group
65  */
66 EAPI void elm_gengrid_item_selected_set(Elm_Gengrid_Item *obj, Eina_Bool selected);
67 
68 /**
69  * @brief Control whether a given gengrid item is selected or not
70  *
71  * This API returns true for all the items selected in multi-select mode as
72  * well.
73  *
74  * This sets the selected state of an item. If multi-selection is not enabled
75  * on the containing gengrid and @c selected is true, any other previously
76  * selected items will get unselected in favor of this new one.
77  *
78  * @param[in] obj The object.
79  *
80  * @return The selected state ($true selected, @c false not selected)
81  *
82  * @ingroup Elm_Gengrid_Item_Group
83  */
84 EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Gengrid_Item *obj);
85 
86 /**
87  * @brief Get the Gengrid Item class for the given Gengrid Item.
88  *
89  * This returns the Gengrid_Item_Class for the given item. It can be used to
90  * examine the function pointers and item_style.
91  *
92  * @param[in] obj The object.
93  *
94  * @return Gengrid Item class for the given item
95  *
96  * @ingroup Elm_Gengrid_Item_Group
97  */
98 EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *obj);
99 
100 /**
101  * @brief Get the index of the item. It is only valid once displayed.
102  *
103  * @param[in] obj The object.
104  *
105  * @return The position inside the list of item.
106  *
107  * @ingroup Elm_Gengrid_Item_Group
108  */
109 EAPI int elm_gengrid_item_index_get(const Elm_Gengrid_Item *obj);
110 
111 /**
112  * @brief Get a given gengrid item's position, relative to the whole gengrid's
113  * grid area.
114  *
115  * This returns the "logical" position of the item within the gengrid. For
116  * example, $(0, 1) would stand for first row, second column.
117  *
118  * @param[in] obj The object.
119  * @param[out] x Pointer to variable to store the item's <b>row number</b>.
120  * @param[out] y Pointer to variable to store the item's <b>column number</b>.
121  *
122  * @ingroup Elm_Gengrid_Item_Group
123  */
124 EAPI void elm_gengrid_item_pos_get(const Elm_Gengrid_Item *obj, unsigned int *x, unsigned int *y);
125 
126 /**
127  * @brief Control the gengrid item's select mode.
128  *
129  * (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
130  *
131  * elm_gengrid_select_mode_set() changes item's select mode. -
132  * ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection
133  * func and callback when first becoming selected. Any further clicks will do
134  * nothing, unless you set always select mode. - ELM_OBJECT_SELECT_MODE_ALWAYS
135  * : This means that, even if selected, every click will make the selected
136  * callbacks be called. - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
137  * ability to select the item entirely and they will neither appear selected
138  * nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
139  * : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
140  * No-finger-size rule makes an item can be smaller than lower limit. Clickable
141  * objects should be bigger than human touch point device (your finger) for
142  * some touch or small screen devices. So it is enabled, the item can be shrink
143  * than predefined finger-size value. And the item will be updated.
144  *
145  * @param[in] obj The object.
146  * @param[in] mode The selected mode
147  *
148  * @ingroup Elm_Gengrid_Item_Group
149  */
150 EAPI void elm_gengrid_item_select_mode_set(Elm_Gengrid_Item *obj, Elm_Object_Select_Mode mode);
151 
152 /**
153  * @brief Control the gengrid item's select mode.
154  *
155  * (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
156  *
157  * elm_gengrid_select_mode_set() changes item's select mode. -
158  * ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection
159  * func and callback when first becoming selected. Any further clicks will do
160  * nothing, unless you set always select mode. - ELM_OBJECT_SELECT_MODE_ALWAYS
161  * : This means that, even if selected, every click will make the selected
162  * callbacks be called. - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
163  * ability to select the item entirely and they will neither appear selected
164  * nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
165  * : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
166  * No-finger-size rule makes an item can be smaller than lower limit. Clickable
167  * objects should be bigger than human touch point device (your finger) for
168  * some touch or small screen devices. So it is enabled, the item can be shrink
169  * than predefined finger-size value. And the item will be updated.
170  *
171  * @param[in] obj The object.
172  *
173  * @return The selected mode
174  *
175  * @ingroup Elm_Gengrid_Item_Group
176  */
177 EAPI Elm_Object_Select_Mode elm_gengrid_item_select_mode_get(const Elm_Gengrid_Item *obj);
178 
179 /**
180  * @brief Custom size mode for non-homogeneous gengrid.
181  *
182  * Resize dimensions of a gengrid item.
183  *
184  * In case of a horizontal grid, only the widths only be resized and in case of
185  * vertical only the heights can be resized. Item size should be set by
186  * elm_gengrid_item_size_set() beforehand.
187  *
188  * The values set by elm_gengrid_item_size_set() will be used for the dimension
189  * that remains fixed.
190  *
191  * @param[in] obj The object.
192  * @param[in] w The item's width.
193  * @param[in] h The item's height.
194  *
195  * @since 1.19
196  *
197  * @ingroup Elm_Gengrid_Item_Group
198  */
199 EAPI void elm_gengrid_item_custom_size_set(Elm_Gengrid_Item *obj, int w, int h);
200 
201 /**
202  * @brief Custom size mode for non-homogeneous gengrid.
203  *
204  * Get the dimensions of a gengrid item.
205  *
206  * Gives the dimensions set with elm_gengrid_item_custom_size_set(). If the
207  * item has not been modified values set with elm_gengrid_item_size_set() are
208  * obtained.
209  *
210  * @param[in] obj The object.
211  * @param[out] w The item's width.
212  * @param[out] h The item's height.
213  *
214  * @since 1.19
215  *
216  * @ingroup Elm_Gengrid_Item_Group
217  */
218 EAPI void elm_gengrid_item_custom_size_get(const Elm_Gengrid_Item *obj, int *w, int *h);
219 
220 /**
221  * @brief Show the portion of a gengrid's internal grid containing a given
222  * item, immediately.
223  *
224  * This causes gengrid to redraw its viewport's contents to the region
225  * containing the given @c item item, if it is not fully visible.
226  *
227  * @param[in] obj The object.
228  * @param[in] type Where to position the item in the viewport.
229  *
230  * @ingroup Elm_Gengrid_Item_Group
231  */
232 EAPI void elm_gengrid_item_show(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type);
233 
234 /**
235  * @brief Animatedly bring in, to the visible area of a gengrid, a given item
236  * on it.
237  *
238  * This causes gengrid to jump to the given @c item and show it (by scrolling),
239  * if it is not fully visible. This will use animation to do so and take a
240  * period of time to complete.
241  *
242  * @param[in] obj The object.
243  * @param[in] type Where to position the item in the viewport.
244  *
245  * @ingroup Elm_Gengrid_Item_Group
246  */
247 EAPI void elm_gengrid_item_bring_in(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type);
248 
249 /**
250  * @brief Update the contents of a given gengrid item
251  *
252  * This updates an item by calling all the item class functions again to get
253  * the contents, texts and states. Use this when the original item data has
254  * changed and you want the changes to be reflected.
255  * @param[in] obj The object.
256  *
257  * @ingroup Elm_Gengrid_Item_Group
258  */
259 EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *obj);
260 
261 /**
262  * @brief Update the part of an item
263  *
264  * This updates an item's part by calling item's fetching functions again to
265  * get the contents, texts and states. Use this when the original item data has
266  * changed and the changes are desired to be reflected. Second parts argument
267  * is used for globbing to match '*', '?', and '.' It can be used at updating
268  * multi fields.
269  *
270  * Use elm_gengrid_realized_items_update() to update an item's all property.
271  *
272  * @param[in] obj The object.
273  * @param[in] parts The name of item's part
274  * @param[in] itf The type of item's part type
275  *
276  * @since 1.15
277  *
278  * @ingroup Elm_Gengrid_Item_Group
279  */
280 EAPI void elm_gengrid_item_fields_update(Elm_Gengrid_Item *obj, const char *parts, Elm_Gengrid_Item_Field_Type itf);
281 
282 /**
283  * @brief Update the item class of a gengrid item.
284  *
285  * This sets another class of the item, changing the way that it is displayed.
286  * After changing the item class, elm_gengrid_item_update() is called on the
287  * item @c it.
288  *
289  * @param[in] obj The object.
290  * @param[in] itc The gengrid item class describing the function pointers and
291  * the item style.
292  *
293  * @ingroup Elm_Gengrid_Item_Group
294  */
295 EAPI void elm_gengrid_item_item_class_update(Elm_Gengrid_Item *obj, const Elm_Gengrid_Item_Class *itc);
296 
297 /**
298  * @brief Unset all contents fetched by the item class
299  *
300  * This instructs gengrid to release references to contents in the item,
301  * meaning that they will no longer be managed by gengrid and are floating
302  * "orphans" that can be re-used elsewhere if the user wants to.
303  *
304  * @param[in] obj The object.
305  * @param[out] l The contents list to return.
306  *
307  * @since 1.18
308  *
309  * @ingroup Elm_Gengrid_Item_Group
310  */
311 EAPI void elm_gengrid_item_all_contents_unset(Elm_Gengrid_Item *obj, Eina_List **l);
312 
313 #endif
314