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_object_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 * @note Elementary object items may have many contents
24 EAPI void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
26 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
29 * Get a content of an object item
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
35 * @note Elementary object items may have many contents
39 EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
41 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
44 * Unset a content of an object item
46 * @param it The Elementary object item
47 * @param part The content part name to unset (NULL for the default content)
49 * @note Elementary object items may have many contents
53 EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
55 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
58 * Set a label of an object item
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
64 * @note Elementary object items may have many labels
68 EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
70 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
73 * Get a label of an object item
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
79 * @note Elementary object items may have many labels
83 EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
85 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
88 * Set the text to read out when in accessibility mode
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
95 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
98 * Get the data associated with an object item
99 * @param it The Elementary object item
100 * @return The data associated with @p it
102 * @note Every elm_object_item supports this API
105 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
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
112 * @note Every elm_object_item supports this API
115 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
118 * Send a signal to the edje object of the widget item.
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.
124 * @param it The Elementary object item
125 * @param emission The signal's name.
126 * @param source The signal's source.
129 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
132 * Set the disabled state of an widget item.
134 * @param obj The Elementary object item
135 * @param disabled The state to put in in: @c EINA_TRUE for
136 * disabled, @c EINA_FALSE for enabled
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.
144 * This sets the state for the widget item, either disabling it or
149 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
152 * Get the disabled state of an widget item.
154 * @param obj The Elementary object
155 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
156 * if it's enabled (or on errors)
158 * This gets the state of the widget, which might be enabled or disabled.
162 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
165 * @brief Set the function to be called when an item from the widget is
168 * @param it The item to set the callback on
169 * @param func The function called
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
176 * @note Every elm_object_item supports this API
178 * @see elm_object_item_del()
181 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
184 // XXX: One more API is to be added.
185 //EAPI void elm_object_item_del(Elm_Object_Item *it);
189 * Set the text to be shown in a given object item's tooltips.
191 * @param item Target item.
192 * @param text The text to set in the content.
194 * Setup the text as tooltip to object. The item can have only one tooltip,
195 * so any previous tooltip data - set with this function or
196 * elm_object_item_tooltip_content_cb_set() - is removed.
198 * @see elm_object_tooltip_text_set() for more details.
202 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *item, const char *text);
205 * @brief Disable size restrictions on an object's tooltip
206 * @param item The tooltip's anchor object
207 * @param disable If EINA_TRUE, size restrictions are disabled
208 * @return EINA_FALSE on failure, EINA_TRUE on success
210 * This function allows a tooltip to expand beyond its parant window's canvas.
211 * It will instead be limited only by the size of the display.
213 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *item, Eina_Bool disable);
216 * @brief Retrieve size restriction state of an object's tooltip
217 * @param obj The tooltip's anchor object
218 * @return If EINA_TRUE, size restrictions are disabled
220 * This function returns whether a tooltip is allowed to expand beyond
221 * its parant window's canvas.
222 * It will instead be limited only by the size of the display.
224 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *item);
227 * Set the content to be shown in the tooltip item.
229 * Setup the tooltip to item. The item can have only one tooltip,
230 * so any previous tooltip data is removed. @p func(with @p data) will
231 * be called every time that need show the tooltip and it should
232 * return a valid Evas_Object. This object is then managed fully by
233 * tooltip system and is deleted when the tooltip is gone.
235 * @param item the object item being attached a tooltip.
236 * @param func the function used to create the tooltip contents.
237 * @param data what to provide to @a func as callback data/context.
238 * @param del_cb called when data is not needed anymore, either when
239 * another callback replaces @a func, the tooltip is unset with
240 * elm_object_item_tooltip_unset() or the owner @a item
241 * dies. This callback receives as the first parameter the
242 * given @a data, and @c event_info is the item.
244 * @see elm_object_tooltip_content_cb_set() for more details.
248 EAPI void elm_object_item_tooltip_content_cb_set(Elm_Object_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
251 * Unset tooltip from item.
253 * @param item object item to remove previously set tooltip.
255 * Remove tooltip from item. The callback provided as del_cb to
256 * elm_object_item_tooltip_content_cb_set() will be called to notify
257 * it is not used anymore.
259 * @see elm_object_tooltip_unset() for more details.
260 * @see elm_object_item_tooltip_content_cb_set()
264 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *item);
267 * Sets a different style for this item tooltip.
269 * @note before you set a style you should define a tooltip with
270 * elm_object_item_tooltip_content_cb_set() or
271 * elm_object_item_tooltip_text_set()
273 * @param item object item with tooltip already set.
274 * @param style the theme style to use (default, transparent, ...)
276 * @see elm_object_tooltip_style_set() for more details.
280 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *item, const char *style);
283 * Get the style for this item tooltip.
285 * @param item object item with tooltip already set.
286 * @return style the theme style in use, defaults to "default". If the
287 * object does not have a tooltip set, then NULL is returned.
289 * @see elm_object_tooltip_style_get() for more details.
290 * @see elm_object_item_tooltip_style_set()
294 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *item);