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 for an object item's part, marking it as translatable.
120 * The string to set as @p text must be the original one. Do not pass the
121 * return of @c gettext() here. Elementary will translate the string
122 * internally and set it on the object item using
123 * elm_object_item_part_text_set(), also storing the original string so that it
124 * can be automatically translated when the language is changed with
125 * elm_language_set(). The @p domain will be stored along to find the
126 * translation in the correct catalog. It can be NULL, in which case it will use
127 * whatever domain was set by the application with @c textdomain(). This is
128 * useful in case you are building a library on top of Elementary that will have
129 * its own translatable strings, that should not be mixed with those of programs
132 * @param it The object item containing the text part
133 * @param part The name of the part to set
134 * @param domain The translation domain to use
135 * @param text The original, non-translated text to set
140 EAPI void elm_object_item_domain_translatable_part_text_set(Elm_Object_Item *it, const char *part, const char *domain, const char *text);
142 #define elm_object_item_domain_translatable_text_set(it, domain, text) elm_object_item_domain_translatable_part_text_set((it), NULL, (domain), (text))
144 #define elm_object_item_translatable_text_set(it, text) elm_object_item_domain_translatable_part_text_set((it), NULL, NULL, (text))
146 #define elm_object_item_translatable_part_text_set(it, part, text) elm_object_item_domain_translatable_part_text_set((it), (part), NULL, (text))
149 * Gets the original string set as translatable for an object item.
151 * When setting translated strings, the function elm_object_item_part_text_get()
152 * will return the translation returned by @c gettext(). To get the original
153 * string use this function.
155 * @param it The object item.
156 * @param part The name of the part that was set
158 * @return The original, untranslated string
163 EAPI const char *elm_object_item_translatable_part_text_get(const Elm_Object_Item *it, const char *part);
165 #define elm_object_item_translatable_text_get(it) elm_object_item_translatable_part_text_get((it), NULL)
168 * Mark the part text to be transltable or not.
170 * Once you mark the part text to be translatable, the text will be translated
171 * internally regardless of elm_object_item_part_text_set() and
172 * elm_object_item_domain_translatable_part_text_set(). In other case, if you
173 * set the Elementary policy that all text will be translatable in default, you
174 * can set the part text to not be translated by calling this API.
176 * @param it The object item containing the text part
177 * @param part The part name of the translatable text
178 * @param domain The translation domain to use
179 * @param translatable @c EINA_TRUE, the part text will be translated
180 * internally. @c EINA_FALSE, otherwise.
182 * @see elm_object_item_domain_translatable_part_text_set()
183 * @see elm_object_item_part_text_set()
190 EAPI void elm_object_item_domain_part_text_translatable_set(Elm_Object_Item *it, const char *part, const char *domain, Eina_Bool translatable);
192 #define elm_object_item_part_text_translatable_set(it, part, translatable) elm_object_item_domain_part_text_translatable_set((it), (part), NULL, (translatable))
194 #define elm_object_item_domain_text_translatable_set(it, domain, translatable) elm_object_item_domain_part_text_translatable_set((it), NULL, (domain), (translatable))
197 * Set the text to read out when in accessibility mode
199 * @param it The object item which is to be described
200 * @param txt The text that describes the widget to people with poor or no vision
204 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
207 * @brief Register object item as an accessible object.
210 * @param item The elementary object item
211 * @return Accessible object of the object item or NULL for any error
215 EAPI Evas_Object *elm_object_item_access_register(Elm_Object_Item *item);
218 * @brief Register a part on an object item as an accessible object.
221 * @param item The elementary object item
222 * @param part The part name to set
223 * @return Accessible object of the object item or NULL for any error
227 EAPI Evas_Object *elm_object_item_part_access_register(Elm_Object_Item *item, const char *part);
230 * @brief Unregister accessible object of the object item.
233 * @param item The elementary object item
237 EAPI void elm_object_item_access_unregister(Elm_Object_Item *item);
240 * @brief Get an accessible object of the object item.
243 * @param item The elementary object item
244 * @return Accessible object of the object item or NULL for any error
248 EAPI Evas_Object *elm_object_item_access_object_get(const Elm_Object_Item *item);
251 * @brief Set highlight order
254 * @param item The container object item
255 * @param objs Order of objects to pass highlight
259 EAPI void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs);
262 * @brief Get highlight order
265 * @param item The container object item
266 * @return Order of objects to pass highlight
270 EAPI const Eina_List *elm_object_item_access_order_get(const Elm_Object_Item *item);
273 * @brief Unset highlight order
276 * @param item The container object item
280 EAPI void elm_object_item_access_order_unset(Elm_Object_Item *item);
283 * Get the data associated with an object item
284 * @param it The Elementary object item
285 * @return The data associated with @p it
287 * @note Every elm_object_item supports this API
290 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
293 * Set the data associated with an object item
294 * @param it The Elementary object item
295 * @param data The data to be associated with @p it
297 * @note Every elm_object_item supports this API
300 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
303 * Send a signal to the edje object of the widget item.
305 * This function sends a signal to the edje object of the obj item. An
306 * edje program can respond to a signal by specifying matching
307 * 'signal' and 'source' fields.
309 * @param it The Elementary object item
310 * @param emission The signal's name.
311 * @param source The signal's source.
314 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
317 * Add a callback for a signal emitted by object item edje.
319 * This function connects a callback function to a signal emitted by the
320 * edje object of the object item.
321 * Globs can occur in either the emission or source name.
323 * @param it The elementary object item
324 * @param emission The signal's name.
325 * @param source The signal's source.
326 * @param func The callback function to be executed when the signal is
328 * @param data A pointer to data to pass to the callback function.
333 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);
336 * Remove a signal-triggered callback from a object item edje object.
338 * @param it The elementary object item
339 * @param emission The signal's name.
340 * @param source The signal's source.
341 * @param func The callback function to be executed when the signal is
343 * @return The data pointer of the signal callback or @c NULL, on
346 * This function removes the @b last callback, previously attached to
347 * a signal emitted by an underlying Edje object of @a it, whose
348 * parameters @a emission, @a source and @c func match exactly with
349 * those passed to a previous call to
350 * elm_object_item_signal_callback_add(). The data pointer that was passed
351 * to this call will be returned.
353 * @see elm_object_item_signal_callback_add()
358 EAPI void *elm_object_item_signal_callback_del(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func);
361 * Set the disabled state of an widget item.
363 * @param it The Elementary object item
364 * @param disabled The state to put in in: @c EINA_TRUE for
365 * disabled, @c EINA_FALSE for enabled
367 * Elementary object item can be @b disabled, in which state they won't
368 * receive input and, in general, will be themed differently from
369 * their normal state, usually greyed out. Useful for contexts
370 * where you don't want your users to interact with some of the
371 * parts of you interface.
373 * This sets the state for the widget item, either disabling it or
378 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
381 * Get the disabled state of an widget item.
383 * @param it The Elementary object item
384 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
385 * if it's enabled (or on errors)
387 * This gets the state of the widget, which might be enabled or disabled.
391 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
394 * @brief Set the function to be called when an item from the widget is
397 * @param it The item to set the callback on
398 * @param del_cb The function called
400 * That function will receive these parameters:
401 * @li void * item data
402 * @li Evas_Object * widget object
403 * @li Elm_Object_Item * widget item
405 * @note Every elm_object_item supports this API
407 * @see elm_object_item_del()
410 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
413 * Delete the given item.
415 * @param it The item to be deleted.
419 EAPI void elm_object_item_del(Elm_Object_Item *it);
422 * Set the text to be shown in a given object item's tooltips.
424 * @param it Target item.
425 * @param text The text to set in the content.
427 * Setup the text as tooltip to object. The item can have only one tooltip,
428 * so any previous tooltip data - set with this function or
429 * elm_object_item_tooltip_content_cb_set() - is removed.
431 * @see elm_object_tooltip_text_set() for more details.
435 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
438 * @brief Disable size restrictions on an object's tooltip
439 * @param it The tooltip's anchor object
440 * @param disable If EINA_TRUE, size restrictions are disabled
441 * @return EINA_FALSE on failure, EINA_TRUE on success
443 * This function allows a tooltip to expand beyond its parent window's canvas.
444 * It will instead be limited only by the size of the display.
446 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
449 * @brief Retrieve size restriction state of an object's tooltip
450 * @param it The tooltip's anchor object
451 * @return If EINA_TRUE, size restrictions are disabled
453 * This function returns whether a tooltip is allowed to expand beyond
454 * its parent window's canvas.
455 * It will instead be limited only by the size of the display.
457 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
460 * Set the content to be shown in the tooltip item.
462 * Setup the tooltip to item. The item can have only one tooltip,
463 * so any previous tooltip data is removed. @p func(with @p data) will
464 * be called every time that need show the tooltip and it should
465 * return a valid Evas_Object. This object is then managed fully by
466 * tooltip system and is deleted when the tooltip is gone.
468 * @param it the object item being attached a tooltip.
469 * @param func the function used to create the tooltip contents.
470 * @param data what to provide to @a func as callback data/context.
471 * @param del_cb called when data is not needed anymore, either when
472 * another callback replaces @a func, the tooltip is unset with
473 * elm_object_item_tooltip_unset() or the owner @a item
474 * dies. This callback receives as the first parameter the
475 * given @a data, and @c event_info is the item.
477 * @see elm_object_tooltip_content_cb_set() for more details.
481 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);
484 * Unset tooltip from item.
486 * @param it object item to remove previously set tooltip.
488 * Remove tooltip from item. The callback provided as del_cb to
489 * elm_object_item_tooltip_content_cb_set() will be called to notify
490 * it is not used anymore.
492 * @see elm_object_tooltip_unset() for more details.
493 * @see elm_object_item_tooltip_content_cb_set()
497 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it);
500 * Sets a different style for this item tooltip.
502 * @note before you set a style you should define a tooltip with
503 * elm_object_item_tooltip_content_cb_set() or
504 * elm_object_item_tooltip_text_set()
506 * @param it object item with tooltip already set.
507 * @param style the theme style to use (default, transparent, ...)
509 * @see elm_object_tooltip_style_set() for more details.
513 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
516 * Get the style for this item tooltip.
518 * @param it object item with tooltip already set.
519 * @return style the theme style in use, defaults to "default". If the
520 * object does not have a tooltip set, then NULL is returned.
522 * @see elm_object_tooltip_style_get() for more details.
523 * @see elm_object_item_tooltip_style_set()
527 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
530 * Set the type of mouse pointer/cursor decoration to be shown,
531 * when the mouse pointer is over the given item
533 * @param it item to customize cursor on
534 * @param cursor the cursor type's name
536 * This function works analogously as elm_object_cursor_set(), but
537 * here the cursor's changing area is restricted to the item's
538 * area, and not the whole widget's. Note that that item cursors
539 * have precedence over widget cursors, so that a mouse over an
540 * item with custom cursor set will always show @b that cursor.
542 * If this function is called twice for an object, a previously set
543 * cursor will be unset on the second call.
545 * @see elm_object_cursor_set()
546 * @see elm_object_item_cursor_get()
547 * @see elm_object_item_cursor_unset()
551 EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
554 * Get the type of mouse pointer/cursor decoration set to be shown,
555 * when the mouse pointer is over the given item
557 * @param it item with custom cursor set
558 * @return the cursor type's name or @c NULL, if no custom cursors
559 * were set to @p item (and on errors)
561 * @see elm_object_cursor_get()
562 * @see elm_object_item_cursor_set()
563 * @see elm_object_item_cursor_unset()
567 EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it);
570 * Unset any custom mouse pointer/cursor decoration set to be
571 * shown, when the mouse pointer is over the given
572 * item, thus making it show the @b default cursor again.
576 * Use this call to undo any custom settings on this item's cursor
577 * decoration, bringing it back to defaults (no custom style set).
579 * @see elm_object_cursor_unset()
580 * @see elm_object_item_cursor_set()
584 EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it);
587 * Set a different @b style for a given custom cursor set for an
590 * @param it item with custom cursor set
591 * @param style the <b>theme style</b> to use (e.g. @c "default",
592 * @c "transparent", etc)
594 * This function only makes sense when one is using custom mouse
595 * cursor decorations <b>defined in a theme file</b>, which can have,
596 * given a cursor name/type, <b>alternate styles</b> on it. It
597 * works analogously as elm_object_cursor_style_set(), but here
598 * applies only to item objects.
600 * @warning Before you set a cursor style you should have defined a
601 * custom cursor previously on the item, with
602 * elm_object_item_cursor_set()
604 * @see elm_object_item_cursor_engine_only_set()
605 * @see elm_object_item_cursor_style_get()
609 EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
612 * Get the current @b style set for a given item's custom
615 * @param it item with custom cursor set.
616 * @return style the cursor style in use. If the object does not
617 * have a cursor set, then @c NULL is returned.
619 * @see elm_object_item_cursor_style_set() for more details
623 EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
626 * Set if the (custom)cursor for a given item should be
627 * searched in its theme, also, or should only rely on the
630 * @param it item with custom (custom) cursor already set on
631 * @param engine_only Use @c EINA_TRUE to have cursors looked for
632 * only on those provided by the rendering engine, @c EINA_FALSE to
633 * have them searched on the widget's theme, as well.
635 * @note This call is of use only if you've set a custom cursor
636 * for items, with elm_object_item_cursor_set().
638 * @note By default, cursors will only be looked for between those
639 * provided by the rendering engine.
643 EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
646 * Get if the (custom) cursor for a given item is being
647 * searched in its theme, also, or is only relying on the rendering
650 * @param it an object item
651 * @return @c EINA_TRUE, if cursors are being looked for only on
652 * those provided by the rendering engine, @c EINA_FALSE if they
653 * are being searched on the widget's theme, as well.
655 * @see elm_object_item_cursor_engine_only_set(), for more details
659 EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it);