2 * @typedef Elm_Object_Item_Signal_Cb
4 * Elm_Object_Item Signal Callback functions' prototype definition. @c data
5 * will have the auxiliary data pointer at the time the callback registration.
6 * @c it will be a pointer the Elm_Object_Item that have the edje object where
7 * the signal comes from. @c emission will identify the exact signal's emission
8 * string and @c source the exact signal's source one.
10 * @see elm_object_item_signal_callback_add()
15 typedef void (*Elm_Object_Item_Signal_Cb)(void *data, Elm_Object_Item *it, const char *emission, const char *source);
18 * Get the widget object's handle which contains a given item
20 * @param it The Elementary object item
21 * @return The widget object
23 * @note This returns the widget object itself that an item belongs to.
24 * @note Every elm_object_item supports this API
27 EAPI Evas_Object *elm_object_item_widget_get(const Elm_Object_Item *it);
30 * Set a content of an object item
32 * @param it The Elementary object item
33 * @param part The content part name to set (NULL for the default content)
34 * @param content The new content of the object item
36 * This sets a new object to an item as a content object. If any object was
37 * already set as a content object in the same part, previous object will be
38 * deleted automatically.
40 * @note Elementary object items may have many contents
44 EAPI void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
46 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
49 * Get a content of an object item
51 * @param it The Elementary object item
52 * @param part The content part name to unset (NULL for the default content)
53 * @return content of the object item or NULL for any error
55 * @note Elementary object items may have many contents
59 EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
61 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
64 * Unset a content of an object item
66 * @param it The Elementary object item
67 * @param part The content part name to unset (NULL for the default content)
69 * @note Elementary object items may have many contents
73 EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
75 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
78 * Set a label of an object item
80 * @param it The Elementary object item
81 * @param part The text part name to set (NULL for the default label)
82 * @param label The new text of the label
84 * @note Elementary object items may have many labels
88 EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
91 * Macro to set a label of an object item.
93 * @param it The Elementary object item.
94 * @param label The new text of the label.
96 * @note Elementary object items may have many labels.
100 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
103 * Get a label of an object item
105 * @param it The Elementary object item
106 * @param part The text part name to get (NULL for the default label)
107 * @return text of the label or NULL for any error
109 * @note Elementary object items may have many labels
113 EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
115 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
118 * Set the text to read out when in accessibility mode
120 * @param it The object item which is to be described
121 * @param txt The text that describes the widget to people with poor or no vision
125 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
128 * @brief Register object item as an accessible object.
131 * @param item The elementary object item
132 * @return Accessible object of the object item or NULL for any error
136 EAPI Evas_Object *elm_object_item_access_register(Elm_Object_Item *item);
139 * @brief Unregister accessible object of the object item.
142 * @param item The elementary object item
146 EAPI void elm_object_item_access_unregister(Elm_Object_Item *item);
149 * @brief Get an accessible object of the object item.
152 * @param item The elementary object item
153 * @return Accessible object of the object item or NULL for any error
157 EAPI Evas_Object *elm_object_item_access_object_get(const Elm_Object_Item *item);
160 * @brief Set highlight order
163 * @param item The container object item
164 * @param objs Order of objects to pass highlight
168 EAPI void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs);
171 * @brief Get highlight order
174 * @param item The container object item
175 * @return Order of objects to pass highlight
179 EAPI const Eina_List *elm_object_item_access_order_get(const Elm_Object_Item *item);
182 * @brief Unset highlight order
185 * @param item The container object item
189 EAPI void elm_object_item_access_order_unset(Elm_Object_Item *item);
192 * Get the data associated with an object item
193 * @param it The Elementary object item
194 * @return The data associated with @p it
196 * @note Every elm_object_item supports this API
199 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
202 * Set the data associated with an object item
203 * @param it The Elementary object item
204 * @param data The data to be associated with @p it
206 * @note Every elm_object_item supports this API
209 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
212 * Send a signal to the edje object of the widget item.
214 * This function sends a signal to the edje object of the obj item. An
215 * edje program can respond to a signal by specifying matching
216 * 'signal' and 'source' fields.
218 * @param it The Elementary object item
219 * @param emission The signal's name.
220 * @param source The signal's source.
223 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
226 * Add a callback for a signal emitted by object item edje.
228 * This function connects a callback function to a signal emitted by the
229 * edje object of the object item.
230 * Globs can occur in either the emission or source name.
232 * @param it The elementary object item
233 * @param emission The signal's name.
234 * @param source The signal's source.
235 * @param func The callback function to be executed when the signal is
237 * @param data A pointer to data to pass to the callback function.
242 EAPI void elm_object_item_signal_callback_add(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func, void *data);
245 * Remove a signal-triggered callback from a object item edje object.
247 * @param it The elementary object item
248 * @param emission The signal's name.
249 * @param source The signal's source.
250 * @param func The callback function to be executed when the signal is
252 * @return The data pointer of the signal callback or @c NULL, on
255 * This function removes the @b last callback, previously attached to
256 * a signal emitted by an underlying Edje object of @a it, whose
257 * parameters @a emission, @a source and @c func match exactly with
258 * those passed to a previous call to
259 * elm_object_item_signal_callback_add(). The data pointer that was passed
260 * to this call will be returned.
262 * @see elm_object_item_signal_callback_add()
267 EAPI void *elm_object_item_signal_callback_del(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func);
270 * Set the disabled state of an widget item.
272 * @param it The Elementary object item
273 * @param disabled The state to put in in: @c EINA_TRUE for
274 * disabled, @c EINA_FALSE for enabled
276 * Elementary object item can be @b disabled, in which state they won't
277 * receive input and, in general, will be themed differently from
278 * their normal state, usually greyed out. Useful for contexts
279 * where you don't want your users to interact with some of the
280 * parts of you interface.
282 * This sets the state for the widget item, either disabling it or
287 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
290 * Get the disabled state of an widget item.
292 * @param it The Elementary object item
293 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
294 * if it's enabled (or on errors)
296 * This gets the state of the widget, which might be enabled or disabled.
300 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
303 * @brief Set the function to be called when an item from the widget is
306 * @param it The item to set the callback on
307 * @param del_cb The function called
309 * That function will receive these parameters:
310 * @li void * item data
311 * @li Evas_Object * widget object
312 * @li Elm_Object_Item * widget item
314 * @note Every elm_object_item supports this API
316 * @see elm_object_item_del()
319 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
322 * Delete the given item.
324 * @param it The item to be deleted.
328 EAPI void elm_object_item_del(Elm_Object_Item *it);
331 * Set the text to be shown in a given object item's tooltips.
333 * @param it Target item.
334 * @param text The text to set in the content.
336 * Setup the text as tooltip to object. The item can have only one tooltip,
337 * so any previous tooltip data - set with this function or
338 * elm_object_item_tooltip_content_cb_set() - is removed.
340 * @see elm_object_tooltip_text_set() for more details.
344 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
347 * @brief Disable size restrictions on an object's tooltip
348 * @param it The tooltip's anchor object
349 * @param disable If EINA_TRUE, size restrictions are disabled
350 * @return EINA_FALSE on failure, EINA_TRUE on success
352 * This function allows a tooltip to expand beyond its parent window's canvas.
353 * It will instead be limited only by the size of the display.
355 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
358 * @brief Retrieve size restriction state of an object's tooltip
359 * @param it The tooltip's anchor object
360 * @return If EINA_TRUE, size restrictions are disabled
362 * This function returns whether a tooltip is allowed to expand beyond
363 * its parent window's canvas.
364 * It will instead be limited only by the size of the display.
366 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
369 * Set the content to be shown in the tooltip item.
371 * Setup the tooltip to item. The item can have only one tooltip,
372 * so any previous tooltip data is removed. @p func(with @p data) will
373 * be called every time that need show the tooltip and it should
374 * return a valid Evas_Object. This object is then managed fully by
375 * tooltip system and is deleted when the tooltip is gone.
377 * @param it the object item being attached a tooltip.
378 * @param func the function used to create the tooltip contents.
379 * @param data what to provide to @a func as callback data/context.
380 * @param del_cb called when data is not needed anymore, either when
381 * another callback replaces @a func, the tooltip is unset with
382 * elm_object_item_tooltip_unset() or the owner @a item
383 * dies. This callback receives as the first parameter the
384 * given @a data, and @c event_info is the item.
386 * @see elm_object_tooltip_content_cb_set() for more details.
390 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);
393 * Unset tooltip from item.
395 * @param it object item to remove previously set tooltip.
397 * Remove tooltip from item. The callback provided as del_cb to
398 * elm_object_item_tooltip_content_cb_set() will be called to notify
399 * it is not used anymore.
401 * @see elm_object_tooltip_unset() for more details.
402 * @see elm_object_item_tooltip_content_cb_set()
406 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it);
409 * Sets a different style for this item tooltip.
411 * @note before you set a style you should define a tooltip with
412 * elm_object_item_tooltip_content_cb_set() or
413 * elm_object_item_tooltip_text_set()
415 * @param it object item with tooltip already set.
416 * @param style the theme style to use (default, transparent, ...)
418 * @see elm_object_tooltip_style_set() for more details.
422 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
425 * Get the style for this item tooltip.
427 * @param it object item with tooltip already set.
428 * @return style the theme style in use, defaults to "default". If the
429 * object does not have a tooltip set, then NULL is returned.
431 * @see elm_object_tooltip_style_get() for more details.
432 * @see elm_object_item_tooltip_style_set()
436 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
439 * Set the type of mouse pointer/cursor decoration to be shown,
440 * when the mouse pointer is over the given item
442 * @param it item to customize cursor on
443 * @param cursor the cursor type's name
445 * This function works analogously as elm_object_cursor_set(), but
446 * here the cursor's changing area is restricted to the item's
447 * area, and not the whole widget's. Note that that item cursors
448 * have precedence over widget cursors, so that a mouse over an
449 * item with custom cursor set will always show @b that cursor.
451 * If this function is called twice for an object, a previously set
452 * cursor will be unset on the second call.
454 * @see elm_object_cursor_set()
455 * @see elm_object_item_cursor_get()
456 * @see elm_object_item_cursor_unset()
460 EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
463 * Get the type of mouse pointer/cursor decoration set to be shown,
464 * when the mouse pointer is over the given item
466 * @param it item with custom cursor set
467 * @return the cursor type's name or @c NULL, if no custom cursors
468 * were set to @p item (and on errors)
470 * @see elm_object_cursor_get()
471 * @see elm_object_item_cursor_set()
472 * @see elm_object_item_cursor_unset()
476 EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it);
479 * Unset any custom mouse pointer/cursor decoration set to be
480 * shown, when the mouse pointer is over the given
481 * item, thus making it show the @b default cursor again.
485 * Use this call to undo any custom settings on this item's cursor
486 * decoration, bringing it back to defaults (no custom style set).
488 * @see elm_object_cursor_unset()
489 * @see elm_object_item_cursor_set()
493 EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it);
496 * Set a different @b style for a given custom cursor set for an
499 * @param it item with custom cursor set
500 * @param style the <b>theme style</b> to use (e.g. @c "default",
501 * @c "transparent", etc)
503 * This function only makes sense when one is using custom mouse
504 * cursor decorations <b>defined in a theme file</b>, which can have,
505 * given a cursor name/type, <b>alternate styles</b> on it. It
506 * works analogously as elm_object_cursor_style_set(), but here
507 * applies only to item objects.
509 * @warning Before you set a cursor style you should have defined a
510 * custom cursor previously on the item, with
511 * elm_object_item_cursor_set()
513 * @see elm_object_item_cursor_engine_only_set()
514 * @see elm_object_item_cursor_style_get()
518 EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
521 * Get the current @b style set for a given item's custom
524 * @param it item with custom cursor set.
525 * @return style the cursor style in use. If the object does not
526 * have a cursor set, then @c NULL is returned.
528 * @see elm_object_item_cursor_style_set() for more details
532 EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
535 * Set if the (custom)cursor for a given item should be
536 * searched in its theme, also, or should only rely on the
539 * @param it item with custom (custom) cursor already set on
540 * @param engine_only Use @c EINA_TRUE to have cursors looked for
541 * only on those provided by the rendering engine, @c EINA_FALSE to
542 * have them searched on the widget's theme, as well.
544 * @note This call is of use only if you've set a custom cursor
545 * for items, with elm_object_item_cursor_set().
547 * @note By default, cursors will only be looked for between those
548 * provided by the rendering engine.
552 EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
555 * Get if the (custom) cursor for a given item is being
556 * searched in its theme, also, or is only relying on the rendering
559 * @param it an object item
560 * @return @c EINA_TRUE, if cursors are being looked for only on
561 * those provided by the rendering engine, @c EINA_FALSE if they
562 * are being searched on the widget's theme, as well.
564 * @see elm_object_item_cursor_engine_only_set(), for more details
568 EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it);