elementary: fix some doxygen warnings
[framework/uifw/elementary.git] / src / lib / elm_object_item.h
1 /**
2  * Get the widget object's handle which contains a given item
3  *
4  * @param it The Elementary object item
5  * @return The widget object
6  *
7  * @note This returns the widget object itself that an item belongs to.
8  * @note Every elm_object_item supports this API
9  * @ingroup General
10  */
11 EAPI Evas_Object                 *elm_object_item_widget_get(const Elm_Object_Item *it);
12
13 /**
14  * Set a content of an object item
15  *
16  * @param it The Elementary object item
17  * @param part The content part name to set (NULL for the default content)
18  * @param content The new content of the object item
19  *
20  * @note Elementary object items may have many contents
21  *
22  * @ingroup General
23  */
24 EAPI void                         elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
25
26 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
27
28 /**
29  * Get a content of an object item
30  *
31  * @param it The Elementary object item
32  * @param part The content part name to unset (NULL for the default content)
33  * @return content of the object item or NULL for any error
34  *
35  * @note Elementary object items may have many contents
36  *
37  * @ingroup General
38  */
39 EAPI Evas_Object                 *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
40
41 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
42
43 /**
44  * Unset a content of an object item
45  *
46  * @param it The Elementary object item
47  * @param part The content part name to unset (NULL for the default content)
48  *
49  * @note Elementary object items may have many contents
50  *
51  * @ingroup General
52  */
53 EAPI Evas_Object                 *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
54
55 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
56
57 /**
58  * Set a label of an object item
59  *
60  * @param it The Elementary object item
61  * @param part The text part name to set (NULL for the default label)
62  * @param label The new text of the label
63  *
64  * @note Elementary object items may have many labels
65  *
66  * @ingroup General
67  */
68 EAPI void                         elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
69
70 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
71
72 /**
73  * Get a label of an object item
74  *
75  * @param it The Elementary object item
76  * @param part The text part name to get (NULL for the default label)
77  * @return text of the label or NULL for any error
78  *
79  * @note Elementary object items may have many labels
80  *
81  * @ingroup General
82  */
83 EAPI const char                  *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
84
85 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
86
87 /**
88  * Set the text to read out when in accessibility mode
89  *
90  * @param it The object item which is to be described
91  * @param txt The text that describes the widget to people with poor or no vision
92  *
93  * @ingroup General
94  */
95 EAPI void                         elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
96
97 /**
98  * Get the data associated with an object item
99  * @param it The Elementary object item
100  * @return The data associated with @p it
101  *
102  * @note Every elm_object_item supports this API
103  * @ingroup General
104  */
105 EAPI void                        *elm_object_item_data_get(const Elm_Object_Item *it);
106
107 /**
108  * Set the data associated with an object item
109  * @param it The Elementary object item
110  * @param data The data to be associated with @p it
111  *
112  * @note Every elm_object_item supports this API
113  * @ingroup General
114  */
115 EAPI void                         elm_object_item_data_set(Elm_Object_Item *it, void *data);
116
117 /**
118  * Send a signal to the edje object of the widget item.
119  *
120  * This function sends a signal to the edje object of the obj item. An
121  * edje program can respond to a signal by specifying matching
122  * 'signal' and 'source' fields.
123  *
124  * @param it The Elementary object item
125  * @param emission The signal's name.
126  * @param source The signal's source.
127  * @ingroup General
128  */
129 EAPI void                         elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
130
131 /**
132  * Set the disabled state of an widget item.
133  *
134  * @param it The Elementary object item
135  * @param disabled The state to put in in: @c EINA_TRUE for
136  *        disabled, @c EINA_FALSE for enabled
137  *
138  * Elementary object item can be @b disabled, in which state they won't
139  * receive input and, in general, will be themed differently from
140  * their normal state, usually greyed out. Useful for contexts
141  * where you don't want your users to interact with some of the
142  * parts of you interface.
143  *
144  * This sets the state for the widget item, either disabling it or
145  * enabling it back.
146  *
147  * @ingroup Styles
148  */
149 EAPI void                         elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
150
151 /**
152  * Get the disabled state of an widget item.
153  *
154  * @param it The Elementary object item
155  * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
156  *            if it's enabled (or on errors)
157  *
158  * This gets the state of the widget, which might be enabled or disabled.
159  *
160  * @ingroup Styles
161  */
162 EAPI Eina_Bool                    elm_object_item_disabled_get(const Elm_Object_Item *it);
163
164 /**
165  * @brief Set the function to be called when an item from the widget is
166  * freed.
167  *
168  * @param it The item to set the callback on
169  * @param del_cb The function called
170  *
171  * That function will receive these parameters:
172  * @li void * item data
173  * @li Evas_Object * widget object
174  * @li Elm_Object_Item * widget item
175  *
176  * @note Every elm_object_item supports this API
177  *
178  * @see elm_object_item_del()
179  * @ingroup General
180  */
181 EAPI void                         elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
182
183 /**
184  * Delete the given item.
185  *
186  * @param it The item to be deleted.
187  *
188  * @ingroup General
189  */
190 EAPI void                       elm_object_item_del(Elm_Object_Item *it);
191
192 /**
193  * Set the text to be shown in a given object item's tooltips.
194  *
195  * @param it Target item.
196  * @param text The text to set in the content.
197  *
198  * Setup the text as tooltip to object. The item can have only one tooltip,
199  * so any previous tooltip data - set with this function or
200  * elm_object_item_tooltip_content_cb_set() - is removed.
201  *
202  * @see elm_object_tooltip_text_set() for more details.
203  *
204  * @ingroup General
205  */
206 EAPI void                         elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
207
208 /**
209  * @brief Disable size restrictions on an object's tooltip
210  * @param it The tooltip's anchor object
211  * @param disable If EINA_TRUE, size restrictions are disabled
212  * @return EINA_FALSE on failure, EINA_TRUE on success
213  *
214  * This function allows a tooltip to expand beyond its parent window's canvas.
215  * It will instead be limited only by the size of the display.
216  */
217 EAPI Eina_Bool                    elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
218
219 /**
220  * @brief Retrieve size restriction state of an object's tooltip
221  * @param it The tooltip's anchor object
222  * @return If EINA_TRUE, size restrictions are disabled
223  *
224  * This function returns whether a tooltip is allowed to expand beyond
225  * its parent window's canvas.
226  * It will instead be limited only by the size of the display.
227  */
228 EAPI Eina_Bool                    elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
229
230 /**
231  * Set the content to be shown in the tooltip item.
232  *
233  * Setup the tooltip to item. The item can have only one tooltip,
234  * so any previous tooltip data is removed. @p func(with @p data) will
235  * be called every time that need show the tooltip and it should
236  * return a valid Evas_Object. This object is then managed fully by
237  * tooltip system and is deleted when the tooltip is gone.
238  *
239  * @param it the object item being attached a tooltip.
240  * @param func the function used to create the tooltip contents.
241  * @param data what to provide to @a func as callback data/context.
242  * @param del_cb called when data is not needed anymore, either when
243  *        another callback replaces @a func, the tooltip is unset with
244  *        elm_object_item_tooltip_unset() or the owner @a item
245  *        dies. This callback receives as the first parameter the
246  *        given @a data, and @c event_info is the item.
247  *
248  * @see elm_object_tooltip_content_cb_set() for more details.
249  *
250  * @ingroup General
251  */
252 EAPI void                         elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
253
254 /**
255  * Unset tooltip from item.
256  *
257  * @param it object item to remove previously set tooltip.
258  *
259  * Remove tooltip from item. The callback provided as del_cb to
260  * elm_object_item_tooltip_content_cb_set() will be called to notify
261  * it is not used anymore.
262  *
263  * @see elm_object_tooltip_unset() for more details.
264  * @see elm_object_item_tooltip_content_cb_set()
265  *
266  * @ingroup General
267  */
268 EAPI void                         elm_object_item_tooltip_unset(Elm_Object_Item *it);
269
270 /**
271  * Sets a different style for this item tooltip.
272  *
273  * @note before you set a style you should define a tooltip with
274  *       elm_object_item_tooltip_content_cb_set() or
275  *       elm_object_item_tooltip_text_set()
276  *
277  * @param it object item with tooltip already set.
278  * @param style the theme style to use (default, transparent, ...)
279  *
280  * @see elm_object_tooltip_style_set() for more details.
281  *
282  * @ingroup General
283  */
284 EAPI void                         elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
285
286 /**
287  * Get the style for this item tooltip.
288  *
289  * @param it object item with tooltip already set.
290  * @return style the theme style in use, defaults to "default". If the
291  *         object does not have a tooltip set, then NULL is returned.
292  *
293  * @see elm_object_tooltip_style_get() for more details.
294  * @see elm_object_item_tooltip_style_set()
295  *
296  * @ingroup General
297  */
298 EAPI const char                  *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
299
300 /**
301   * Set the type of mouse pointer/cursor decoration to be shown,
302   * when the mouse pointer is over the given item
303   *
304   * @param it item to customize cursor on
305   * @param cursor the cursor type's name
306   *
307   * This function works analogously as elm_object_cursor_set(), but
308   * here the cursor's changing area is restricted to the item's
309   * area, and not the whole widget's. Note that that item cursors
310   * have precedence over widget cursors, so that a mouse over an
311   * item with custom cursor set will always show @b that cursor.
312   *
313   * If this function is called twice for an object, a previously set
314   * cursor will be unset on the second call.
315   *
316   * @see elm_object_cursor_set()
317   * @see elm_object_item_cursor_get()
318   * @see elm_object_item_cursor_unset()
319   *
320   * @ingroup General
321   */
322 EAPI void                         elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
323
324 /*
325  * Get the type of mouse pointer/cursor decoration set to be shown,
326  * when the mouse pointer is over the given item
327  *
328  * @param it item with custom cursor set
329  * @return the cursor type's name or @c NULL, if no custom cursors
330  * were set to @p item (and on errors)
331  *
332  * @see elm_object_cursor_get()
333  * @see elm_object_item_cursor_set()
334  * @see elm_object_item_cursor_unset()
335  *
336  * @ingroup General
337  */
338 EAPI const char                  *elm_object_item_cursor_get(const Elm_Object_Item *it);
339
340 /**
341  * Unset any custom mouse pointer/cursor decoration set to be
342  * shown, when the mouse pointer is over the given
343  * item, thus making it show the @b default cursor again.
344  *
345  * @param it the item
346  *
347  * Use this call to undo any custom settings on this item's cursor
348  * decoration, bringing it back to defaults (no custom style set).
349  *
350  * @see elm_object_cursor_unset()
351  * @see elm_object_item_cursor_set()
352  *
353  * @ingroup General
354  */
355 EAPI void                         elm_object_item_cursor_unset(Elm_Object_Item *it);
356
357 /**
358  * Set a different @b style for a given custom cursor set for an
359  * item.
360  *
361  * @param it item with custom cursor set
362  * @param style the <b>theme style</b> to use (e.g. @c "default",
363  * @c "transparent", etc)
364  *
365  * This function only makes sense when one is using custom mouse
366  * cursor decorations <b>defined in a theme file</b>, which can have,
367  * given a cursor name/type, <b>alternate styles</b> on it. It
368  * works analogously as elm_object_cursor_style_set(), but here
369  * applies only to item objects.
370  *
371  * @warning Before you set a cursor style you should have defined a
372  *       custom cursor previously on the item, with
373  *       elm_object_item_cursor_set()
374  *
375  * @see elm_object_item_cursor_engine_only_set()
376  * @see elm_object_item_cursor_style_get()
377  *
378  * @ingroup General
379  */
380 EAPI void                         elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
381
382 /**
383  * Get the current @b style set for a given item's custom
384  * cursor
385  *
386  * @param it item with custom cursor set.
387  * @return style the cursor style in use. If the object does not
388  *         have a cursor set, then @c NULL is returned.
389  *
390  * @see elm_object_item_cursor_style_set() for more details
391  *
392  * @ingroup General
393  */
394 EAPI const char                  *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
395
396 /**
397  * Set if the (custom)cursor for a given item should be
398  * searched in its theme, also, or should only rely on the
399  * rendering engine.
400  *
401  * @param it item with custom (custom) cursor already set on
402  * @param engine_only Use @c EINA_TRUE to have cursors looked for
403  * only on those provided by the rendering engine, @c EINA_FALSE to
404  * have them searched on the widget's theme, as well.
405  *
406  * @note This call is of use only if you've set a custom cursor
407  * for items, with elm_object_item_cursor_set().
408  *
409  * @note By default, cursors will only be looked for between those
410  * provided by the rendering engine.
411  *
412  * @ingroup General
413  */
414 EAPI void                         elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
415
416 /**
417  * Get if the (custom) cursor for a given item is being
418  * searched in its theme, also, or is only relying on the rendering
419  * engine.
420  *
421  * @param item an item
422  * @return @c EINA_TRUE, if cursors are being looked for only on
423  * those provided by the rendering engine, @c EINA_FALSE if they
424  * are being searched on the widget's theme, as well.
425  *
426  * @see elm_object_item_cursor_engine_only_set(), for more details
427  *
428  * @ingroup General
429  */
430 EAPI Eina_Bool                    elm_object_item_cursor_engine_only_get(const Elm_Object_Item *item);