1 typedef void (*Elm_Object_Item_Smart_Cb) (void *data, Elm_Object_Item *it, void *event_info);
4 * Get the widget object's handle which contains a given item
6 * @param it The Elementary object item
7 * @return The widget object
9 * @note This returns the widget object itself that an item belongs to.
10 * @note Every elm_object_item supports this API
13 EAPI Evas_Object *elm_object_item_widget_get(const Elm_Object_Item *it);
16 * Set a content of an object item
18 * @param it The Elementary object item
19 * @param part The content part name to set (NULL for the default content)
20 * @param content The new content of the object item
22 * @note Elementary object items may have many contents
26 EAPI void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
28 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
31 * Get a content of an object item
33 * @param it The Elementary object item
34 * @param part The content part name to unset (NULL for the default content)
35 * @return content of the object item or NULL for any error
37 * @note Elementary object items may have many contents
41 EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
43 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
46 * Unset a content of an object item
48 * @param it The Elementary object item
49 * @param part The content part name to unset (NULL for the default content)
51 * @note Elementary object items may have many contents
55 EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
57 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
60 * Set a label of an object item
62 * @param it The Elementary object item
63 * @param part The text part name to set (NULL for the default label)
64 * @param label The new text of the label
66 * @note Elementary object items may have many labels
70 EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
72 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
75 * Get a label of an object item
77 * @param it The Elementary object item
78 * @param part The text part name to get (NULL for the default label)
79 * @return text of the label or NULL for any error
81 * @note Elementary object items may have many labels
85 EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
87 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
90 * Set the text to read out when in accessibility mode
92 * @param it The object item which is to be described
93 * @param txt The text that describes the widget to people with poor or no vision
97 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
100 * Get the data associated with an object item
101 * @param it The Elementary object item
102 * @return The data associated with @p it
104 * @note Every elm_object_item supports this API
107 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
110 * Set the data associated with an object item
111 * @param it The Elementary object item
112 * @param data The data to be associated with @p it
114 * @note Every elm_object_item supports this API
117 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
120 * Send a signal to the edje object of the widget item.
122 * This function sends a signal to the edje object of the obj item. An
123 * edje program can respond to a signal by specifying matching
124 * 'signal' and 'source' fields.
126 * @param it The Elementary object item
127 * @param emission The signal's name.
128 * @param source The signal's source.
131 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
134 * Set the disabled state of an widget item.
136 * @param it The Elementary object item
137 * @param disabled The state to put in in: @c EINA_TRUE for
138 * disabled, @c EINA_FALSE for enabled
140 * Elementary object item can be @b disabled, in which state they won't
141 * receive input and, in general, will be themed differently from
142 * their normal state, usually greyed out. Useful for contexts
143 * where you don't want your users to interact with some of the
144 * parts of you interface.
146 * This sets the state for the widget item, either disabling it or
151 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
154 * Get the disabled state of an widget item.
156 * @param it The Elementary object item
157 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
158 * if it's enabled (or on errors)
160 * This gets the state of the widget, which might be enabled or disabled.
164 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
167 * @brief Set the function to be called when an item from the widget is
170 * @param it The item to set the callback on
171 * @param del_cb The function called
173 * That function will receive these parameters:
174 * @li void * item data
175 * @li Evas_Object * widget object
176 * @li Elm_Object_Item * widget item
178 * @note Every elm_object_item supports this API
180 * @see elm_object_item_del()
183 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
186 * Delete the given item.
188 * @param it The item to be deleted.
192 EAPI void elm_object_item_del(Elm_Object_Item *it);
195 * Set the text to be shown in a given object item's tooltips.
197 * @param it Target item.
198 * @param text The text to set in the content.
200 * Setup the text as tooltip to object. The item can have only one tooltip,
201 * so any previous tooltip data - set with this function or
202 * elm_object_item_tooltip_content_cb_set() - is removed.
204 * @see elm_object_tooltip_text_set() for more details.
208 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
211 * @brief Disable size restrictions on an object's tooltip
212 * @param it The tooltip's anchor object
213 * @param disable If EINA_TRUE, size restrictions are disabled
214 * @return EINA_FALSE on failure, EINA_TRUE on success
216 * This function allows a tooltip to expand beyond its parent window's canvas.
217 * It will instead be limited only by the size of the display.
219 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
222 * @brief Retrieve size restriction state of an object's tooltip
223 * @param it The tooltip's anchor object
224 * @return If EINA_TRUE, size restrictions are disabled
226 * This function returns whether a tooltip is allowed to expand beyond
227 * its parent window's canvas.
228 * It will instead be limited only by the size of the display.
230 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
233 * Set the content to be shown in the tooltip item.
235 * Setup the tooltip to item. The item can have only one tooltip,
236 * so any previous tooltip data is removed. @p func(with @p data) will
237 * be called every time that need show the tooltip and it should
238 * return a valid Evas_Object. This object is then managed fully by
239 * tooltip system and is deleted when the tooltip is gone.
241 * @param it the object item being attached a tooltip.
242 * @param func the function used to create the tooltip contents.
243 * @param data what to provide to @a func as callback data/context.
244 * @param del_cb called when data is not needed anymore, either when
245 * another callback replaces @a func, the tooltip is unset with
246 * elm_object_item_tooltip_unset() or the owner @a item
247 * dies. This callback receives as the first parameter the
248 * given @a data, and @c event_info is the item.
250 * @see elm_object_tooltip_content_cb_set() for more details.
254 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);
257 * Unset tooltip from item.
259 * @param it object item to remove previously set tooltip.
261 * Remove tooltip from item. The callback provided as del_cb to
262 * elm_object_item_tooltip_content_cb_set() will be called to notify
263 * it is not used anymore.
265 * @see elm_object_tooltip_unset() for more details.
266 * @see elm_object_item_tooltip_content_cb_set()
270 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it);
273 * Sets a different style for this item tooltip.
275 * @note before you set a style you should define a tooltip with
276 * elm_object_item_tooltip_content_cb_set() or
277 * elm_object_item_tooltip_text_set()
279 * @param it object item with tooltip already set.
280 * @param style the theme style to use (default, transparent, ...)
282 * @see elm_object_tooltip_style_set() for more details.
286 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
289 * Get the style for this item tooltip.
291 * @param it object item with tooltip already set.
292 * @return style the theme style in use, defaults to "default". If the
293 * object does not have a tooltip set, then NULL is returned.
295 * @see elm_object_tooltip_style_get() for more details.
296 * @see elm_object_item_tooltip_style_set()
300 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
303 * Set the type of mouse pointer/cursor decoration to be shown,
304 * when the mouse pointer is over the given item
306 * @param it item to customize cursor on
307 * @param cursor the cursor type's name
309 * This function works analogously as elm_object_cursor_set(), but
310 * here the cursor's changing area is restricted to the item's
311 * area, and not the whole widget's. Note that that item cursors
312 * have precedence over widget cursors, so that a mouse over an
313 * item with custom cursor set will always show @b that cursor.
315 * If this function is called twice for an object, a previously set
316 * cursor will be unset on the second call.
318 * @see elm_object_cursor_set()
319 * @see elm_object_item_cursor_get()
320 * @see elm_object_item_cursor_unset()
324 EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
327 * Get the type of mouse pointer/cursor decoration set to be shown,
328 * when the mouse pointer is over the given item
330 * @param it item with custom cursor set
331 * @return the cursor type's name or @c NULL, if no custom cursors
332 * were set to @p item (and on errors)
334 * @see elm_object_cursor_get()
335 * @see elm_object_item_cursor_set()
336 * @see elm_object_item_cursor_unset()
340 EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it);
343 * Unset any custom mouse pointer/cursor decoration set to be
344 * shown, when the mouse pointer is over the given
345 * item, thus making it show the @b default cursor again.
349 * Use this call to undo any custom settings on this item's cursor
350 * decoration, bringing it back to defaults (no custom style set).
352 * @see elm_object_cursor_unset()
353 * @see elm_object_item_cursor_set()
357 EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it);
360 * Set a different @b style for a given custom cursor set for an
363 * @param it item with custom cursor set
364 * @param style the <b>theme style</b> to use (e.g. @c "default",
365 * @c "transparent", etc)
367 * This function only makes sense when one is using custom mouse
368 * cursor decorations <b>defined in a theme file</b>, which can have,
369 * given a cursor name/type, <b>alternate styles</b> on it. It
370 * works analogously as elm_object_cursor_style_set(), but here
371 * applies only to item objects.
373 * @warning Before you set a cursor style you should have defined a
374 * custom cursor previously on the item, with
375 * elm_object_item_cursor_set()
377 * @see elm_object_item_cursor_engine_only_set()
378 * @see elm_object_item_cursor_style_get()
382 EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
385 * Get the current @b style set for a given item's custom
388 * @param it item with custom cursor set.
389 * @return style the cursor style in use. If the object does not
390 * have a cursor set, then @c NULL is returned.
392 * @see elm_object_item_cursor_style_set() for more details
396 EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
399 * Set if the (custom)cursor for a given item should be
400 * searched in its theme, also, or should only rely on the
403 * @param it item with custom (custom) cursor already set on
404 * @param engine_only Use @c EINA_TRUE to have cursors looked for
405 * only on those provided by the rendering engine, @c EINA_FALSE to
406 * have them searched on the widget's theme, as well.
408 * @note This call is of use only if you've set a custom cursor
409 * for items, with elm_object_item_cursor_set().
411 * @note By default, cursors will only be looked for between those
412 * provided by the rendering engine.
416 EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
419 * Get if the (custom) cursor for a given item is being
420 * searched in its theme, also, or is only relying on the rendering
423 * @param it an object item
424 * @return @c EINA_TRUE, if cursors are being looked for only on
425 * those provided by the rendering engine, @c EINA_FALSE if they
426 * are being searched on the widget's theme, as well.
428 * @see elm_object_item_cursor_engine_only_set(), for more details
432 EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it);
435 * Add (register) a callback function to the smart event specified by @p event
436 * on the elm_object_item @p it.
438 * @param it an object item
439 * @param event the event's name string
440 * @param func the callback function
441 * @param data user data to be passed to the callback function
443 * Smart callbacks look very similar to Evas Smart callbacks, but are
444 * implemented as elementary object item's custom ones.
446 * This function adds a function callback to an elementary object item when the
447 * event named @p event occurs in it. The function is @p func.
449 * A smart callback function must have the Elm_Object_Item_Smart_Cb prototype
450 * definition. The first parameter (@p data) in this definition will be a user
451 * specific data. The second parameter @p it is a handle to the object item on
452 * which event occurred. The third parameter, @p event_info, is a pointer to
453 * data which is totally dependent on the elementary object item's
454 * implementation and semantic for the given event.
456 * @see elm_object_item_smart_callback_del()
460 //Don't use this APIs
461 //EAPI void elm_object_item_smart_callback_add(Elm_Object_Item *it, const char *event, Elm_Object_Item_Smart_Cb func, const void *data);
464 * Delete (unregister) a callback function from the smart event specified by @p
465 * event on the elementary object item @p it.
467 * @param it an object item
468 * @param event the event's name string
469 * @param func the callback function
470 * @return data user data.
472 * This function removes <b>the first</b> added smart callback on the item @p it
473 * matching the event name @p event and the registered function pointer @p func.
474 * If the removal is successful it will also return the data pointer that was
475 * passed to elm_object_item_smart_callback_add() (that will be the same as the
476 * parameter) when the callback(s) was(were) added to the item. If not
477 * successful @c NULL will be returned.
479 * @see elm_object_item_smart_callback_add()
483 //Don't use this APIs
484 //EAPI void *elm_object_item_smart_callback_del(Elm_Object_Item *it, const char *event, Elm_Object_Item_Smart_Cb func);