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