2 * Get the widget object's handle which contains a given item
4 * @param it The Elementary object item
5 * @return The widget object
7 * @note This returns the widget object itself that an item belongs to.
8 * @note Every elm_object_item supports this API
11 EAPI Evas_Object *elm_object_item_widget_get(const Elm_Object_Item *it);
14 * Set a content of an object item
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
20 * This sets a new object to an item as a content object. If any object was
21 * already set as a content object in the same part, previous object will be
22 * deleted automatically.
24 * @note Elementary object items may have many contents
28 EAPI void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
30 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
33 * Get a content of an object item
35 * @param it The Elementary object item
36 * @param part The content part name to unset (NULL for the default content)
37 * @return content of the object item or NULL for any error
39 * @note Elementary object items may have many contents
43 EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
45 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
48 * Unset a content of an object item
50 * @param it The Elementary object item
51 * @param part The content part name to unset (NULL for the default content)
53 * @note Elementary object items may have many contents
57 EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
59 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
62 * Set a label of an object item
64 * @param it The Elementary object item
65 * @param part The text part name to set (NULL for the default label)
66 * @param label The new text of the label
68 * @note Elementary object items may have many labels
72 EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
74 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
77 * Get a label of an object item
79 * @param it The Elementary object item
80 * @param part The text part name to get (NULL for the default label)
81 * @return text of the label or NULL for any error
83 * @note Elementary object items may have many labels
87 EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
89 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
92 * Set the text to read out when in accessibility mode
94 * @param it The object item which is to be described
95 * @param txt The text that describes the widget to people with poor or no vision
99 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
102 * Get the data associated with an object item
103 * @param it The Elementary object item
104 * @return The data associated with @p it
106 * @note Every elm_object_item supports this API
109 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
112 * Set the data associated with an object item
113 * @param it The Elementary object item
114 * @param data The data to be associated with @p it
116 * @note Every elm_object_item supports this API
119 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
122 * Send a signal to the edje object of the widget item.
124 * This function sends a signal to the edje object of the obj item. An
125 * edje program can respond to a signal by specifying matching
126 * 'signal' and 'source' fields.
128 * @param it The Elementary object item
129 * @param emission The signal's name.
130 * @param source The signal's source.
133 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
136 * Set the disabled state of an widget item.
138 * @param it The Elementary object item
139 * @param disabled The state to put in in: @c EINA_TRUE for
140 * disabled, @c EINA_FALSE for enabled
142 * Elementary object item can be @b disabled, in which state they won't
143 * receive input and, in general, will be themed differently from
144 * their normal state, usually greyed out. Useful for contexts
145 * where you don't want your users to interact with some of the
146 * parts of you interface.
148 * This sets the state for the widget item, either disabling it or
153 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
156 * Get the disabled state of an widget item.
158 * @param it The Elementary object item
159 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
160 * if it's enabled (or on errors)
162 * This gets the state of the widget, which might be enabled or disabled.
166 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
169 * @brief Set the function to be called when an item from the widget is
172 * @param it The item to set the callback on
173 * @param del_cb The function called
175 * That function will receive these parameters:
176 * @li void * item data
177 * @li Evas_Object * widget object
178 * @li Elm_Object_Item * widget item
180 * @note Every elm_object_item supports this API
182 * @see elm_object_item_del()
185 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
188 * Delete the given item.
190 * @param it The item to be deleted.
194 EAPI void elm_object_item_del(Elm_Object_Item *it);
197 * Set the text to be shown in a given object item's tooltips.
199 * @param it Target item.
200 * @param text The text to set in the content.
202 * Setup the text as tooltip to object. The item can have only one tooltip,
203 * so any previous tooltip data - set with this function or
204 * elm_object_item_tooltip_content_cb_set() - is removed.
206 * @see elm_object_tooltip_text_set() for more details.
210 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
213 * @brief Disable size restrictions on an object's tooltip
214 * @param it The tooltip's anchor object
215 * @param disable If EINA_TRUE, size restrictions are disabled
216 * @return EINA_FALSE on failure, EINA_TRUE on success
218 * This function allows a tooltip to expand beyond its parent window's canvas.
219 * It will instead be limited only by the size of the display.
221 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
224 * @brief Retrieve size restriction state of an object's tooltip
225 * @param it The tooltip's anchor object
226 * @return If EINA_TRUE, size restrictions are disabled
228 * This function returns whether a tooltip is allowed to expand beyond
229 * its parent window's canvas.
230 * It will instead be limited only by the size of the display.
232 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
235 * Set the content to be shown in the tooltip item.
237 * Setup the tooltip to item. The item can have only one tooltip,
238 * so any previous tooltip data is removed. @p func(with @p data) will
239 * be called every time that need show the tooltip and it should
240 * return a valid Evas_Object. This object is then managed fully by
241 * tooltip system and is deleted when the tooltip is gone.
243 * @param it the object item being attached a tooltip.
244 * @param func the function used to create the tooltip contents.
245 * @param data what to provide to @a func as callback data/context.
246 * @param del_cb called when data is not needed anymore, either when
247 * another callback replaces @a func, the tooltip is unset with
248 * elm_object_item_tooltip_unset() or the owner @a item
249 * dies. This callback receives as the first parameter the
250 * given @a data, and @c event_info is the item.
252 * @see elm_object_tooltip_content_cb_set() for more details.
256 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);
259 * Unset tooltip from item.
261 * @param it object item to remove previously set tooltip.
263 * Remove tooltip from item. The callback provided as del_cb to
264 * elm_object_item_tooltip_content_cb_set() will be called to notify
265 * it is not used anymore.
267 * @see elm_object_tooltip_unset() for more details.
268 * @see elm_object_item_tooltip_content_cb_set()
272 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it);
275 * Sets a different style for this item tooltip.
277 * @note before you set a style you should define a tooltip with
278 * elm_object_item_tooltip_content_cb_set() or
279 * elm_object_item_tooltip_text_set()
281 * @param it object item with tooltip already set.
282 * @param style the theme style to use (default, transparent, ...)
284 * @see elm_object_tooltip_style_set() for more details.
288 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
291 * Get the style for this item tooltip.
293 * @param it object item with tooltip already set.
294 * @return style the theme style in use, defaults to "default". If the
295 * object does not have a tooltip set, then NULL is returned.
297 * @see elm_object_tooltip_style_get() for more details.
298 * @see elm_object_item_tooltip_style_set()
302 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
305 * Set the type of mouse pointer/cursor decoration to be shown,
306 * when the mouse pointer is over the given item
308 * @param it item to customize cursor on
309 * @param cursor the cursor type's name
311 * This function works analogously as elm_object_cursor_set(), but
312 * here the cursor's changing area is restricted to the item's
313 * area, and not the whole widget's. Note that that item cursors
314 * have precedence over widget cursors, so that a mouse over an
315 * item with custom cursor set will always show @b that cursor.
317 * If this function is called twice for an object, a previously set
318 * cursor will be unset on the second call.
320 * @see elm_object_cursor_set()
321 * @see elm_object_item_cursor_get()
322 * @see elm_object_item_cursor_unset()
326 EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
329 * Get the type of mouse pointer/cursor decoration set to be shown,
330 * when the mouse pointer is over the given item
332 * @param it item with custom cursor set
333 * @return the cursor type's name or @c NULL, if no custom cursors
334 * were set to @p item (and on errors)
336 * @see elm_object_cursor_get()
337 * @see elm_object_item_cursor_set()
338 * @see elm_object_item_cursor_unset()
342 EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it);
345 * Unset any custom mouse pointer/cursor decoration set to be
346 * shown, when the mouse pointer is over the given
347 * item, thus making it show the @b default cursor again.
351 * Use this call to undo any custom settings on this item's cursor
352 * decoration, bringing it back to defaults (no custom style set).
354 * @see elm_object_cursor_unset()
355 * @see elm_object_item_cursor_set()
359 EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it);
362 * Set a different @b style for a given custom cursor set for an
365 * @param it item with custom cursor set
366 * @param style the <b>theme style</b> to use (e.g. @c "default",
367 * @c "transparent", etc)
369 * This function only makes sense when one is using custom mouse
370 * cursor decorations <b>defined in a theme file</b>, which can have,
371 * given a cursor name/type, <b>alternate styles</b> on it. It
372 * works analogously as elm_object_cursor_style_set(), but here
373 * applies only to item objects.
375 * @warning Before you set a cursor style you should have defined a
376 * custom cursor previously on the item, with
377 * elm_object_item_cursor_set()
379 * @see elm_object_item_cursor_engine_only_set()
380 * @see elm_object_item_cursor_style_get()
384 EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
387 * Get the current @b style set for a given item's custom
390 * @param it item with custom cursor set.
391 * @return style the cursor style in use. If the object does not
392 * have a cursor set, then @c NULL is returned.
394 * @see elm_object_item_cursor_style_set() for more details
398 EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
401 * Set if the (custom)cursor for a given item should be
402 * searched in its theme, also, or should only rely on the
405 * @param it item with custom (custom) cursor already set on
406 * @param engine_only Use @c EINA_TRUE to have cursors looked for
407 * only on those provided by the rendering engine, @c EINA_FALSE to
408 * have them searched on the widget's theme, as well.
410 * @note This call is of use only if you've set a custom cursor
411 * for items, with elm_object_item_cursor_set().
413 * @note By default, cursors will only be looked for between those
414 * provided by the rendering engine.
418 EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
421 * Get if the (custom) cursor for a given item is being
422 * searched in its theme, also, or is only relying on the rendering
425 * @param it an object item
426 * @return @c EINA_TRUE, if cursors are being looked for only on
427 * those provided by the rendering engine, @c EINA_FALSE if they
428 * are being searched on the widget's theme, as well.
430 * @see elm_object_item_cursor_engine_only_set(), for more details
434 EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it);