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 * This sets a new object to an item as a content object. If any object was
23 * already set as a content object in the same part, previous object will be
24 * deleted automatically.
26 * @note Elementary object items may have many contents
30 EAPI void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
32 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
35 * Get a content of an object item
37 * @param it The Elementary object item
38 * @param part The content part name to unset (NULL for the default content)
39 * @return content of the object item or NULL for any error
41 * @note Elementary object items may have many contents
45 EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
47 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
50 * Unset a content of an object item
52 * @param it The Elementary object item
53 * @param part The content part name to unset (NULL for the default content)
55 * @note Elementary object items may have many contents
59 EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
61 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
64 * Set a label of an object item
66 * @param it The Elementary object item
67 * @param part The text part name to set (NULL for the default label)
68 * @param label The new text of the label
70 * @note Elementary object items may have many labels
74 EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
76 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
79 * Get a label of an object item
81 * @param it The Elementary object item
82 * @param part The text part name to get (NULL for the default label)
83 * @return text of the label or NULL for any error
85 * @note Elementary object items may have many labels
89 EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
91 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
94 * Set the text to read out when in accessibility mode
96 * @param it The object item which is to be described
97 * @param txt The text that describes the widget to people with poor or no vision
101 EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
104 * Get the data associated with an object item
105 * @param it The Elementary object item
106 * @return The data associated with @p it
108 * @note Every elm_object_item supports this API
111 EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
114 * Set the data associated with an object item
115 * @param it The Elementary object item
116 * @param data The data to be associated with @p it
118 * @note Every elm_object_item supports this API
121 EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
124 * Send a signal to the edje object of the widget item.
126 * This function sends a signal to the edje object of the obj item. An
127 * edje program can respond to a signal by specifying matching
128 * 'signal' and 'source' fields.
130 * @param it The Elementary object item
131 * @param emission The signal's name.
132 * @param source The signal's source.
135 EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
138 * Set the disabled state of an widget item.
140 * @param it The Elementary object item
141 * @param disabled The state to put in in: @c EINA_TRUE for
142 * disabled, @c EINA_FALSE for enabled
144 * Elementary object item can be @b disabled, in which state they won't
145 * receive input and, in general, will be themed differently from
146 * their normal state, usually greyed out. Useful for contexts
147 * where you don't want your users to interact with some of the
148 * parts of you interface.
150 * This sets the state for the widget item, either disabling it or
155 EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
158 * Get the disabled state of an widget item.
160 * @param it The Elementary object item
161 * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
162 * if it's enabled (or on errors)
164 * This gets the state of the widget, which might be enabled or disabled.
168 EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
171 * @brief Set the function to be called when an item from the widget is
174 * @param it The item to set the callback on
175 * @param del_cb The function called
177 * That function will receive these parameters:
178 * @li void * item data
179 * @li Evas_Object * widget object
180 * @li Elm_Object_Item * widget item
182 * @note Every elm_object_item supports this API
184 * @see elm_object_item_del()
187 EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
190 * Delete the given item.
192 * @param it The item to be deleted.
196 EAPI void elm_object_item_del(Elm_Object_Item *it);
199 * Set the text to be shown in a given object item's tooltips.
201 * @param it Target item.
202 * @param text The text to set in the content.
204 * Setup the text as tooltip to object. The item can have only one tooltip,
205 * so any previous tooltip data - set with this function or
206 * elm_object_item_tooltip_content_cb_set() - is removed.
208 * @see elm_object_tooltip_text_set() for more details.
212 EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
215 * @brief Disable size restrictions on an object's tooltip
216 * @param it The tooltip's anchor object
217 * @param disable If EINA_TRUE, size restrictions are disabled
218 * @return EINA_FALSE on failure, EINA_TRUE on success
220 * This function allows a tooltip to expand beyond its parent window's canvas.
221 * It will instead be limited only by the size of the display.
223 EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
226 * @brief Retrieve size restriction state of an object's tooltip
227 * @param it The tooltip's anchor object
228 * @return If EINA_TRUE, size restrictions are disabled
230 * This function returns whether a tooltip is allowed to expand beyond
231 * its parent window's canvas.
232 * It will instead be limited only by the size of the display.
234 EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it);
237 * Set the content to be shown in the tooltip item.
239 * Setup the tooltip to item. The item can have only one tooltip,
240 * so any previous tooltip data is removed. @p func(with @p data) will
241 * be called every time that need show the tooltip and it should
242 * return a valid Evas_Object. This object is then managed fully by
243 * tooltip system and is deleted when the tooltip is gone.
245 * @param it the object item being attached a tooltip.
246 * @param func the function used to create the tooltip contents.
247 * @param data what to provide to @a func as callback data/context.
248 * @param del_cb called when data is not needed anymore, either when
249 * another callback replaces @a func, the tooltip is unset with
250 * elm_object_item_tooltip_unset() or the owner @a item
251 * dies. This callback receives as the first parameter the
252 * given @a data, and @c event_info is the item.
254 * @see elm_object_tooltip_content_cb_set() for more details.
258 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);
261 * Unset tooltip from item.
263 * @param it object item to remove previously set tooltip.
265 * Remove tooltip from item. The callback provided as del_cb to
266 * elm_object_item_tooltip_content_cb_set() will be called to notify
267 * it is not used anymore.
269 * @see elm_object_tooltip_unset() for more details.
270 * @see elm_object_item_tooltip_content_cb_set()
274 EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it);
277 * Sets a different style for this item tooltip.
279 * @note before you set a style you should define a tooltip with
280 * elm_object_item_tooltip_content_cb_set() or
281 * elm_object_item_tooltip_text_set()
283 * @param it object item with tooltip already set.
284 * @param style the theme style to use (default, transparent, ...)
286 * @see elm_object_tooltip_style_set() for more details.
290 EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
293 * Get the style for this item tooltip.
295 * @param it object item with tooltip already set.
296 * @return style the theme style in use, defaults to "default". If the
297 * object does not have a tooltip set, then NULL is returned.
299 * @see elm_object_tooltip_style_get() for more details.
300 * @see elm_object_item_tooltip_style_set()
304 EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it);
307 * Set the type of mouse pointer/cursor decoration to be shown,
308 * when the mouse pointer is over the given item
310 * @param it item to customize cursor on
311 * @param cursor the cursor type's name
313 * This function works analogously as elm_object_cursor_set(), but
314 * here the cursor's changing area is restricted to the item's
315 * area, and not the whole widget's. Note that that item cursors
316 * have precedence over widget cursors, so that a mouse over an
317 * item with custom cursor set will always show @b that cursor.
319 * If this function is called twice for an object, a previously set
320 * cursor will be unset on the second call.
322 * @see elm_object_cursor_set()
323 * @see elm_object_item_cursor_get()
324 * @see elm_object_item_cursor_unset()
328 EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor);
331 * Get the type of mouse pointer/cursor decoration set to be shown,
332 * when the mouse pointer is over the given item
334 * @param it item with custom cursor set
335 * @return the cursor type's name or @c NULL, if no custom cursors
336 * were set to @p item (and on errors)
338 * @see elm_object_cursor_get()
339 * @see elm_object_item_cursor_set()
340 * @see elm_object_item_cursor_unset()
344 EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it);
347 * Unset any custom mouse pointer/cursor decoration set to be
348 * shown, when the mouse pointer is over the given
349 * item, thus making it show the @b default cursor again.
353 * Use this call to undo any custom settings on this item's cursor
354 * decoration, bringing it back to defaults (no custom style set).
356 * @see elm_object_cursor_unset()
357 * @see elm_object_item_cursor_set()
361 EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it);
364 * Set a different @b style for a given custom cursor set for an
367 * @param it item with custom cursor set
368 * @param style the <b>theme style</b> to use (e.g. @c "default",
369 * @c "transparent", etc)
371 * This function only makes sense when one is using custom mouse
372 * cursor decorations <b>defined in a theme file</b>, which can have,
373 * given a cursor name/type, <b>alternate styles</b> on it. It
374 * works analogously as elm_object_cursor_style_set(), but here
375 * applies only to item objects.
377 * @warning Before you set a cursor style you should have defined a
378 * custom cursor previously on the item, with
379 * elm_object_item_cursor_set()
381 * @see elm_object_item_cursor_engine_only_set()
382 * @see elm_object_item_cursor_style_get()
386 EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style);
389 * Get the current @b style set for a given item's custom
392 * @param it item with custom cursor set.
393 * @return style the cursor style in use. If the object does not
394 * have a cursor set, then @c NULL is returned.
396 * @see elm_object_item_cursor_style_set() for more details
400 EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it);
403 * Set if the (custom)cursor for a given item should be
404 * searched in its theme, also, or should only rely on the
407 * @param it item with custom (custom) cursor already set on
408 * @param engine_only Use @c EINA_TRUE to have cursors looked for
409 * only on those provided by the rendering engine, @c EINA_FALSE to
410 * have them searched on the widget's theme, as well.
412 * @note This call is of use only if you've set a custom cursor
413 * for items, with elm_object_item_cursor_set().
415 * @note By default, cursors will only be looked for between those
416 * provided by the rendering engine.
420 EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
423 * Get if the (custom) cursor for a given item is being
424 * searched in its theme, also, or is only relying on the rendering
427 * @param it an object item
428 * @return @c EINA_TRUE, if cursors are being looked for only on
429 * those provided by the rendering engine, @c EINA_FALSE if they
430 * are being searched on the widget's theme, as well.
432 * @see elm_object_item_cursor_engine_only_set(), for more details
436 EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it);
439 * Add (register) a callback function to the smart event specified by @p event
440 * on the elm_object_item @p it.
442 * @param it an object item
443 * @param event the event's name string
444 * @param func the callback function
445 * @param data user data to be passed to the callback function
447 * Smart callbacks look very similar to Evas Smart callbacks, but are
448 * implemented as elementary object item's custom ones.
450 * This function adds a function callback to an elementary object item when the
451 * event named @p event occurs in it. The function is @p func.
453 * A smart callback function must have the Elm_Object_Item_Smart_Cb prototype
454 * definition. The first parameter (@p data) in this definition will be a user
455 * specific data. The second parameter @p it is a handle to the object item on
456 * which event occurred. The third parameter, @p event_info, is a pointer to
457 * data which is totally dependent on the elementary object item's
458 * implementation and semantic for the given event.
460 * @see elm_object_item_smart_callback_del()
464 //Don't use this APIs
465 //EAPI void elm_object_item_smart_callback_add(Elm_Object_Item *it, const char *event, Elm_Object_Item_Smart_Cb func, const void *data);
468 * Delete (unregister) a callback function from the smart event specified by @p
469 * event on the elementary object item @p it.
471 * @param it an object item
472 * @param event the event's name string
473 * @param func the callback function
474 * @return data user data.
476 * This function removes <b>the first</b> added smart callback on the item @p it
477 * matching the event name @p event and the registered function pointer @p func.
478 * If the removal is successful it will also return the data pointer that was
479 * passed to elm_object_item_smart_callback_add() (that will be the same as the
480 * parameter) when the callback(s) was(were) added to the item. If not
481 * successful @c NULL will be returned.
483 * @see elm_object_item_smart_callback_add()
487 //Don't use this APIs
488 //EAPI void *elm_object_item_smart_callback_del(Elm_Object_Item *it, const char *event, Elm_Object_Item_Smart_Cb func);