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))
147 * Gets the original string set as translatable for an object item.
149 * When setting translated strings, the function elm_object_item_part_text_get()
150 * will return the translation returned by @c gettext(). To get the original
151 * string use this function.
153 * @param it The object item.
154 * @param part The name of the part that was set
156 * @return The original, untranslated string
161 EAPI const char *elm_object_item_translatable_part_text_get(const Elm_Object_Item *it, const char *part);
163 #define elm_object_item_translatable_text_get(it) elm_object_item_translatable_part_text_get((it), NULL)
166 * Set the text to read out when in accessibility mode
168 * @param it The object item which is to be described
169 * @param txt The text that describes the widget to people with poor or no vision
173 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
176 * @brief Register object item as an accessible object.
179 * @param item The elementary object item
180 * @return Accessible object of the object item or NULL for any error
184 EAPI Evas_Object *elm_object_item_access_register(Elm_Object_Item *item);
187 * @brief Unregister accessible object of the object item.
190 * @param item The elementary object item
194 EAPI void elm_object_item_access_unregister(Elm_Object_Item *item);
197 * @brief Get an accessible object of the object item.
200 * @param item The elementary object item
201 * @return Accessible object of the object item or NULL for any error
205 EAPI Evas_Object *elm_object_item_access_object_get(const Elm_Object_Item *item);
208 * @brief Set highlight order
211 * @param item The container object item
212 * @param objs Order of objects to pass highlight
216 EAPI void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs);
219 * @brief Get highlight order
222 * @param item The container object item
223 * @return Order of objects to pass highlight
227 EAPI const Eina_List *elm_object_item_access_order_get(const Elm_Object_Item *item);
230 * @brief Unset highlight order
233 * @param item The container object item
237 EAPI void elm_object_item_access_order_unset(Elm_Object_Item *item);
240 * Get the data associated with an object item
241 * @param it The Elementary object item
242 * @return The data associated with @p it
244 * @note Every elm_object_item supports this API
247 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
250 * Set the data associated with an object item
251 * @param it The Elementary object item
252 * @param data The data to be associated with @p it
254 * @note Every elm_object_item supports this API
257 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
260 * Send a signal to the edje object of the widget item.
262 * This function sends a signal to the edje object of the obj item. An
263 * edje program can respond to a signal by specifying matching
264 * 'signal' and 'source' fields.
266 * @param it The Elementary object item
267 * @param emission The signal's name.
268 * @param source The signal's source.
271 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
274 * Add a callback for a signal emitted by object item edje.
276 * This function connects a callback function to a signal emitted by the
277 * edje object of the object item.
278 * Globs can occur in either the emission or source name.
280 * @param it The elementary object item
281 * @param emission The signal's name.
282 * @param source The signal's source.
283 * @param func The callback function to be executed when the signal is
285 * @param data A pointer to data to pass to the callback function.
290 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);
293 * Remove a signal-triggered callback from a object item edje object.
295 * @param it The elementary object item
296 * @param emission The signal's name.
297 * @param source The signal's source.
298 * @param func The callback function to be executed when the signal is
300 * @return The data pointer of the signal callback or @c NULL, on
303 * This function removes the @b last callback, previously attached to
304 * a signal emitted by an underlying Edje object of @a it, whose
305 * parameters @a emission, @a source and @c func match exactly with
306 * those passed to a previous call to
307 * elm_object_item_signal_callback_add(). The data pointer that was passed
308 * to this call will be returned.
310 * @see elm_object_item_signal_callback_add()
315 EAPI void *elm_object_item_signal_callback_del(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func);
318 * Set the disabled state of an widget item.
320 * @param it The Elementary object item
321 * @param disabled The state to put in in: @c EINA_TRUE for
322 * disabled, @c EINA_FALSE for enabled
324 * Elementary object item can be @b disabled, in which state they won't
325 * receive input and, in general, will be themed differently from
326 * their normal state, usually greyed out. Useful for contexts
327 * where you don't want your users to interact with some of the
328 * parts of you interface.
330 * This sets the state for the widget item, either disabling it or
335 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
338 * Get the disabled state of an widget item.
340 * @param it The Elementary object item
341 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
342 * if it's enabled (or on errors)
344 * This gets the state of the widget, which might be enabled or disabled.
348 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
351 * @brief Set the function to be called when an item from the widget is
354 * @param it The item to set the callback on
355 * @param del_cb The function called
357 * That function will receive these parameters:
358 * @li void * item data
359 * @li Evas_Object * widget object
360 * @li Elm_Object_Item * widget item
362 * @note Every elm_object_item supports this API
364 * @see elm_object_item_del()
367 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
370 * Delete the given item.
372 * @param it The item to be deleted.
376 EAPI void elm_object_item_del(Elm_Object_Item *it);
379 * Set the text to be shown in a given object item's tooltips.
381 * @param it Target item.
382 * @param text The text to set in the content.
384 * Setup the text as tooltip to object. The item can have only one tooltip,
385 * so any previous tooltip data - set with this function or
386 * elm_object_item_tooltip_content_cb_set() - is removed.
388 * @see elm_object_tooltip_text_set() for more details.
392 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
395 * @brief Disable size restrictions on an object's tooltip
396 * @param it The tooltip's anchor object
397 * @param disable If EINA_TRUE, size restrictions are disabled
398 * @return EINA_FALSE on failure, EINA_TRUE on success
400 * This function allows a tooltip to expand beyond its parent window's canvas.
401 * It will instead be limited only by the size of the display.
403 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
406 * @brief Retrieve size restriction state of an object's tooltip
407 * @param it The tooltip's anchor object
408 * @return If EINA_TRUE, size restrictions are disabled
410 * This function returns whether a tooltip is allowed to expand beyond
411 * its parent window's canvas.
412 * It will instead be limited only by the size of the display.
414 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
417 * Set the content to be shown in the tooltip item.
419 * Setup the tooltip to item. The item can have only one tooltip,
420 * so any previous tooltip data is removed. @p func(with @p data) will
421 * be called every time that need show the tooltip and it should
422 * return a valid Evas_Object. This object is then managed fully by
423 * tooltip system and is deleted when the tooltip is gone.
425 * @param it the object item being attached a tooltip.
426 * @param func the function used to create the tooltip contents.
427 * @param data what to provide to @a func as callback data/context.
428 * @param del_cb called when data is not needed anymore, either when
429 * another callback replaces @a func, the tooltip is unset with
430 * elm_object_item_tooltip_unset() or the owner @a item
431 * dies. This callback receives as the first parameter the
432 * given @a data, and @c event_info is the item.
434 * @see elm_object_tooltip_content_cb_set() for more details.
438 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);
441 * Unset tooltip from item.
443 * @param it object item to remove previously set tooltip.
445 * Remove tooltip from item. The callback provided as del_cb to
446 * elm_object_item_tooltip_content_cb_set() will be called to notify
447 * it is not used anymore.
449 * @see elm_object_tooltip_unset() for more details.
450 * @see elm_object_item_tooltip_content_cb_set()
454 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it);
457 * Sets a different style for this item tooltip.
459 * @note before you set a style you should define a tooltip with
460 * elm_object_item_tooltip_content_cb_set() or
461 * elm_object_item_tooltip_text_set()
463 * @param it object item with tooltip already set.
464 * @param style the theme style to use (default, transparent, ...)
466 * @see elm_object_tooltip_style_set() for more details.
470 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
473 * Get the style for this item tooltip.
475 * @param it object item with tooltip already set.
476 * @return style the theme style in use, defaults to "default". If the
477 * object does not have a tooltip set, then NULL is returned.
479 * @see elm_object_tooltip_style_get() for more details.
480 * @see elm_object_item_tooltip_style_set()
484 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
487 * Set the type of mouse pointer/cursor decoration to be shown,
488 * when the mouse pointer is over the given item
490 * @param it item to customize cursor on
491 * @param cursor the cursor type's name
493 * This function works analogously as elm_object_cursor_set(), but
494 * here the cursor's changing area is restricted to the item's
495 * area, and not the whole widget's. Note that that item cursors
496 * have precedence over widget cursors, so that a mouse over an
497 * item with custom cursor set will always show @b that cursor.
499 * If this function is called twice for an object, a previously set
500 * cursor will be unset on the second call.
502 * @see elm_object_cursor_set()
503 * @see elm_object_item_cursor_get()
504 * @see elm_object_item_cursor_unset()
508 EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
511 * Get the type of mouse pointer/cursor decoration set to be shown,
512 * when the mouse pointer is over the given item
514 * @param it item with custom cursor set
515 * @return the cursor type's name or @c NULL, if no custom cursors
516 * were set to @p item (and on errors)
518 * @see elm_object_cursor_get()
519 * @see elm_object_item_cursor_set()
520 * @see elm_object_item_cursor_unset()
524 EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it);
527 * Unset any custom mouse pointer/cursor decoration set to be
528 * shown, when the mouse pointer is over the given
529 * item, thus making it show the @b default cursor again.
533 * Use this call to undo any custom settings on this item's cursor
534 * decoration, bringing it back to defaults (no custom style set).
536 * @see elm_object_cursor_unset()
537 * @see elm_object_item_cursor_set()
541 EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it);
544 * Set a different @b style for a given custom cursor set for an
547 * @param it item with custom cursor set
548 * @param style the <b>theme style</b> to use (e.g. @c "default",
549 * @c "transparent", etc)
551 * This function only makes sense when one is using custom mouse
552 * cursor decorations <b>defined in a theme file</b>, which can have,
553 * given a cursor name/type, <b>alternate styles</b> on it. It
554 * works analogously as elm_object_cursor_style_set(), but here
555 * applies only to item objects.
557 * @warning Before you set a cursor style you should have defined a
558 * custom cursor previously on the item, with
559 * elm_object_item_cursor_set()
561 * @see elm_object_item_cursor_engine_only_set()
562 * @see elm_object_item_cursor_style_get()
566 EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
569 * Get the current @b style set for a given item's custom
572 * @param it item with custom cursor set.
573 * @return style the cursor style in use. If the object does not
574 * have a cursor set, then @c NULL is returned.
576 * @see elm_object_item_cursor_style_set() for more details
580 EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
583 * Set if the (custom)cursor for a given item should be
584 * searched in its theme, also, or should only rely on the
587 * @param it item with custom (custom) cursor already set on
588 * @param engine_only Use @c EINA_TRUE to have cursors looked for
589 * only on those provided by the rendering engine, @c EINA_FALSE to
590 * have them searched on the widget's theme, as well.
592 * @note This call is of use only if you've set a custom cursor
593 * for items, with elm_object_item_cursor_set().
595 * @note By default, cursors will only be looked for between those
596 * provided by the rendering engine.
600 EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
603 * Get if the (custom) cursor for a given item is being
604 * searched in its theme, also, or is only relying on the rendering
607 * @param it an object item
608 * @return @c EINA_TRUE, if cursors are being looked for only on
609 * those provided by the rendering engine, @c EINA_FALSE if they
610 * are being searched on the widget's theme, as well.
612 * @see elm_object_item_cursor_engine_only_set(), for more details
616 EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it);