1 //TIZEN_ONLY(20160527): widget: add AtspiAction interface to all widgets
3 class Elm.Widget_Item(Eo.Base, Elm_Interface_Atspi_Accessible,
4 Elm_Interface_Atspi_Component)
6 class Elm.Widget_Item (Eo.Base, Elm_Interface_Atspi_Accessible,
7 Elm_Interface_Atspi_Component, Elm_Interface_Atspi_Widget_Action)
11 eo_prefix: elm_wdg_item;
12 legacy_prefix: elm_object_item;
14 @property tooltip_window_mode {
15 [[Control size restriction state of an object's tooltip
17 This function returns whether a tooltip is allowed to expand beyond
18 its parent window's canvas.
19 It will instead be limited only by the size of the display.
21 \@if MOBILE \@since_tizen 2.3
22 \@elseif WEARABLE \@since_tizen 2.3.1
28 return: bool; [[$false on failure, $true on success]]
31 disable: bool; [[If $true, size restrictions are disabled]]
34 @property tooltip_style {
35 [[Control a different style for this item tooltip.
37 Note: before you set a style you should define a tooltip with
38 @.tooltip_content_cb_set or
41 See: elm_object_tooltip_style_set() for more details.
43 \@if MOBILE \@since_tizen 2.3
44 \@elseif WEARABLE \@since_tizen 2.3.1
52 style: const (char)*; [[the theme style used/to use (default, transparent, ...)]]
56 [[Control the type of mouse pointer/cursor decoration to be shown,
57 when the mouse pointer is over the given item
59 This function works analogously as elm_object_cursor_set(), but
60 here the cursor's changing area is restricted to the item's
61 area, and not the whole widget's. Note that that item cursors
62 have precedence over widget cursors, so that a mouse over an
63 item with custom cursor set will always show that cursor.
65 If this function is called twice for an object, a previously set
66 cursor will be unset on the second call.
68 \@if MOBILE \@since_tizen 2.3
69 \@elseif WEARABLE \@since_tizen 2.3.1
77 cursor: const (char) *; [[the cursor type's name]]
80 @property cursor_style {
81 [[Conrol a different $style for a given custom cursor set for an item.
83 This function only makes sense when one is using custom mouse
84 cursor decorations defined in a theme file, which can have,
85 given a cursor name/type, alternate styles on it. It
86 works analogously as elm_object_cursor_style_set(), but here
87 applies only to item objects.
89 Warning: Before you set a cursor style you should have defined a
90 custom cursor previously on the item, with @.cursor.set
92 \@if MOBILE \@since_tizen 2.3
93 \@elseif WEARABLE \@since_tizen 2.3.1
101 style: const (char) *; [[the theme style to use/in use (e.g. $"default", $"transparent", etc)]]
104 @property cursor_engine_only {
105 [[Control if the (custom)cursor for a given item should be
106 searched in its theme, also, or should only rely on the
109 Note: This call is of use only if you've set a custom cursor
110 for items, with @.cursor.set.
112 Note: By default, cursors will only be looked for between those
113 provided by the rendering engine.
115 \@if MOBILE \@since_tizen 2.3
116 \@elseif WEARABLE \@since_tizen 2.3.1
124 engine_only: bool; [[Use $true to have cursors looked for only on those provided by the rendering engine, $false to have them searched on the widget's theme, as well.]]
127 @property part_content {
128 [[Control a content of an object item
130 This sets a new object to an item as a content object. If any object was
131 already set as a content object in the same part, previous object will be
132 deleted automatically.]]
138 part: const (char) * @nullable; [[The content part name (NULL for the default content)]]
141 content: Evas.Object *; [[The content of the object item]]
144 @property part_text {
145 [[Control a label of an object item
147 Note: Elementary object items may have many labels]]
153 part: const (char) * @nullable; [[The text part name (NULL for the default label)]]
156 label: const (char) *; [[Text of the label]]
159 @property part_text_custom @protected {
161 [[Get additional text part content]]
165 [[Save additional text part content]]
169 part: const (char) *;
172 label: const (char) *;
176 [[Control the object item focused
184 focused: bool; [[The focused state]]
188 [[Control the style of an object item
196 style: const (char) *; [[The style of object item]]
200 [[Control the disabled state of an widget item.
202 Elementary object item can be disabled, in which state they won't
203 receive input and, in general, will be themed differently from
204 their normal state, usually greyed out. Useful for contexts
205 where you don't want your users to interact with some of the
206 parts of you interface.
208 This sets the state for the widget item, either disabling it or
215 disable: bool; [[$true, if the widget item is disabled, $false if it's enabled (or on errors)]]
218 access_order_get @const {
219 [[Get highlight order
221 \@if MOBILE \@since_tizen 2.3
222 \@elseif WEARABLE \@since_tizen 2.3.1
227 return: const(list<Evas.Object *>) *;
230 [[Set highlight order
232 \@if MOBILE \@since_tizen 2.3
233 \@elseif WEARABLE \@since_tizen 2.3.1
239 @in objs: own(list<Evas.Object *> *); [[Order of objects to pass highlight]]
243 [[Get the widget object's handle which contains a given item
245 Note: This returns the widget object itself that an item belongs to.
246 Note: Every elm_object_item supports this API]]
247 return: Evas.Object*; [[The widget object]]
250 [[Delete the given item.]]
252 pre_notify_del @protected {
253 [[Notify deletion of widget item before preparing deletion of item object.
255 Note: This notification is not actaul item deletion.
256 See: elm_object_item_del_cb_set() for set callback on item deletion.]]
261 [[Set the text to be shown in a given object item's tooltips.
263 Setup the text as tooltip to object. The item can have only one tooltip,
264 so any previous tooltip data - set with this function or
265 @.tooltip_content_cb_set - is removed.
267 See: elm_object_tooltip_text_set() for more details.
269 \@if MOBILE \@since_tizen 2.3
270 \@elseif WEARABLE \@since_tizen 2.3.1
274 text: const (char) *; [[The text to set in the content.]]
277 tooltip_translatable_text_set @protected {
278 [[Set widget item tooltip as a text string]]
281 text: const (char) *;
285 [[Unset tooltip from item.
287 Remove tooltip from item. The callback provided as del_cb to
288 @.tooltip_content_cb_set will be called to notify
289 it is not used anymore.
291 See: elm_object_tooltip_unset() for more details.
292 See: @.tooltip_content_cb_set
294 \@if MOBILE \@since_tizen 2.3
295 \@elseif WEARABLE \@since_tizen 2.3.1
300 [[Unset any custom mouse pointer/cursor decoration set to be
301 shown, when the mouse pointer is over the given
302 item, thus making it show the default cursor again.
304 Use this call to undo any custom settings on this item's cursor
305 decoration, bringing it back to defaults (no custom style set).
307 See: elm_object_cursor_unset()
310 \@if MOBILE \@since_tizen 2.3
311 \@elseif WEARABLE \@since_tizen 2.3.1
316 [[Unset a content of an object item
318 Note: Elementary object items may have many contents]]
320 part: const (char) *; [[The content part name to unset (NULL for the default content)]]
322 return: Evas.Object*;
324 part_text_custom_update @protected {
325 [[Update additional text part content]]
328 signal_callback_add {
329 [[Add a callback for a signal emitted by object item edje.
331 This function connects a callback function to a signal emitted by the
332 edje object of the object item.
333 Globs can occur in either the emission or source name.
337 emission: const (char) *; [[The signal's name.]]
338 source: const (char) *; [[The signal's source.]]
339 func: Elm_Object_Item_Signal_Cb; [[The callback function to be executed when the signal is emitted.]]
340 data: void *; [[A pointer to data to pass to the callback function.]]
343 signal_callback_del {
344 [[Remove a signal-triggered callback from a object item edje object.
346 This function removes the last callback, previously attached to
347 a signal emitted by an underlying Edje object of $it, whose
348 parameters $emission, $source and $func match exactly with
349 those passed to a previous call to
350 @.signal_callback_add. The data pointer that was passed
351 to this call will be returned.
353 See: @.signal_callback_add
355 \@if MOBILE \@since_tizen 2.3
356 \@elseif WEARABLE \@since_tizen 2.3.1
362 emission: const (char) *; [[The signal's name.]]
363 source: const (char) *; [[The signal's source.]]
364 func: Elm_Object_Item_Signal_Cb; [[The callback function to be executed when the signal is emitted.]]
366 return: void*; [[The data pointer of the signal callback or $NULL, on errors.]]
369 [[Send a signal to the edje object of the widget item.
371 This function sends a signal to the edje object of the obj item. An
372 edje program can respond to a signal by specifying matching
373 'signal' and 'source' fields.]]
375 emission: const (char) *; [[The signal's name.]]
376 source: const (char) *; [[The signal's source.]]
380 [[Set the text to read out when in accessibility mode
382 \@if MOBILE \@since_tizen 2.3
383 \@elseif WEARABLE \@since_tizen 2.3.1
387 txt: const (char) *; [[The text that describes the widget to people with poor or no vision]]
390 access_object_get @const {
391 [[Get an accessible object of the object item.
393 \@if MOBILE \@since_tizen 2.3
394 \@elseif WEARABLE \@since_tizen 2.3.1
399 return: Evas.Object*; [[Accessible object of the object item or NULL for any error]]
401 domain_translatable_part_text_set {
402 [[Set the text for an object item's part, marking it as translatable.
404 The string to set as $text must be the original one. Do not pass the
405 return of $gettext() here. Elementary will translate the string
406 internally and set it on the object item using
407 @.part_text.set, also storing the original string so that it
408 can be automatically translated when the language is changed with
409 elm_language_set(). The $domain will be stored along to find the
410 translation in the correct catalog. It can be NULL, in which case it will use
411 whatever domain was set by the application with $textdomain(). This is
412 useful in case you are building a library on top of Elementary that will have
413 its own translatable strings, that should not be mixed with those of programs
416 \@if MOBILE \@since_tizen 2.3
417 \@elseif WEARABLE \@since_tizen 2.3.1
423 part: const (char) *; [[The name of the part to set]]
424 domain: const (char) *; [[The translation domain to use]]
425 label: const (char) *; [[The original, non-translated text to set]]
428 translatable_part_text_get @const {
429 [[Get the original string set as translatable for an object item.
431 When setting translated strings, the function @.part_text.get
432 will return the translation returned by $gettext(). To get the original
433 string use this function.
435 \@if MOBILE \@since_tizen 2.3
436 \@elseif WEARABLE \@since_tizen 2.3.1
442 part: const (char) *; [[The name of the part that was set]]
444 return: const (char)*; [[The original, untranslated string]]
446 translate @protected {
450 domain_part_text_translatable_set {
451 [[Mark the part text to be translatable or not.
453 Once you mark the part text to be translatable, the text will be translated
454 internally regardless of @.part_text.set and
455 @.domain_translatable_part_text_set. In other case, if you
456 set the Elementary policy that all text will be translatable in default, you
457 can set the part text to not be translated by calling this API.
459 See: @.domain_translatable_part_text_set
463 \@if MOBILE \@since_tizen 2.3
464 \@elseif WEARABLE \@since_tizen 2.3.1
470 part: const (char) *; [[The part name of the translatable text]]
471 domain: const (char) *; [[The translation domain to use]]
472 translatable: bool; [[$true, the part text will be translated internally. $false, otherwise.]]
476 [[This returns track object of the item.
478 Note: This gets a rectangle object that represents the object item's internal
479 object. If you want to check the geometry, visibility of the item, you
480 can call the evas apis such as evas_object_geometry_get(),
481 evas_object_visible_get() to the track object. Note that all of the
482 widget items may/may not have the internal object so this api may
483 return $NULL if the widget item doesn't have it. Additionally, the
484 widget item is managed/controlled by the widget, the widget item could
485 be changed(moved, resized even deleted) anytime by it's own widget's
486 decision. So please dont' change the track object as well as don't
487 keep the track object in your side as possible but get the track object
488 at the moment you need to refer. Otherwise, you need to add some
489 callbacks to the track object to track it's attributes changes.
491 Warning: After use the track object, please call the
492 @.untrack() paired to elm_object_item_track
493 definitely to free the track object properly. Don't delete the
499 \@if MOBILE \@since_tizen 2.3
500 \@elseif WEARABLE \@since_tizen 2.3.1
505 return: Evas.Object*; [[The track object]]
508 [[This retrieve the track object of the item.
510 Note: This retrieves the track object that was returned from
516 \@if MOBILE \@since_tizen 2.3
517 \@elseif WEARABLE \@since_tizen 2.3.1
524 [[Get the track object reference count.
526 Note: This gets the reference count for the track object. Whenever you call
527 the @.track, the reference count will be increased by
528 one. Likely the reference count will be decreased again when you call
529 the @.untrack. Unless the reference count reaches to
530 zero, the track object won't be deleted. So please be sure to call
531 @.untrack() paired to the elm_object_item_track call
537 \@if MOBILE \@since_tizen 2.3
538 \@elseif WEARABLE \@since_tizen 2.3.1
545 track_cancel @protected {
546 [[Query track_cancel]]
550 [[Set the function to be called when an item from the widget is
553 Note: Every elm_object_item supports this API]]
555 del_cb: Evas_Smart_Cb @nullable; [[The function called]]
558 tooltip_content_cb_set {
559 [[Set the content to be shown in the tooltip item.
561 Setup the tooltip to item. The item can have only one tooltip,
562 so any previous tooltip data is removed. $func(with $data) will
563 be called every time that need show the tooltip and it should
564 return a valid Evas_Object. This object is then managed fully by
565 tooltip system and is deleted when the tooltip is gone.
567 See: elm_object_tooltip_content_cb_set() for more details.
569 \@if MOBILE \@since_tizen 2.3
570 \@elseif WEARABLE \@since_tizen 2.3.1
574 func: Elm_Tooltip_Item_Content_Cb @nullable; [[the function used to create the tooltip contents.]]
575 data: const (void) * @optional; [[what to provide to $func as callback data/context.]]
576 del_cb: Evas_Smart_Cb @optional; [[called when data is not needed anymore, either when another callback replaces $func, the tooltip is unset with @.tooltip_unset or the owner $item dies. This callback receives as the first parameter the given $data, and $event_info is the item.]]
581 [[Register object item as an accessible object.
583 \@if MOBILE \@since_tizen 2.3
584 \@elseif WEARABLE \@since_tizen 2.3.1
589 return: Evas.Object*; [[Accessible object of the object item or NULL for any error]]
592 [[Unregister accessible object of the object item.
594 \@if MOBILE \@since_tizen 2.3
595 \@elseif WEARABLE \@since_tizen 2.3.1
602 [[Unset highlight order
604 \@if MOBILE \@since_tizen 2.3
605 \@elseif WEARABLE \@since_tizen 2.3.1
618 focus_next_object_get @const {
619 [[Get the next object with specific focus direction.
621 \@if MOBILE \@since_tizen 2.3
622 \@elseif WEARABLE \@since_tizen 2.3.1
627 dir: Elm.Focus_Direction; [[Focus direction]]
629 return: Evas.Object *; [[Focus next object]]
631 focus_next_object_set {
632 [[Set the next object with specific focus direction.
634 \@if MOBILE \@since_tizen 2.3
635 \@elseif WEARABLE \@since_tizen 2.3.1
640 next: Evas.Object * @nullable; [[Focus next object]]
641 dir: Elm.Focus_Direction; [[Focus direction]]
644 focus_next_item_get @const {
645 [[Get the next object item with specific focus direction.
647 \@if MOBILE \@since_tizen 2.3
648 \@elseif WEARABLE \@since_tizen 2.3.1
653 dir: Elm.Focus_Direction; [[Focus direction]]
655 return: Elm_Object_Item *; [[Focus next object item]]
657 focus_next_item_set {
658 [[Set the next object item with specific focus direction.
660 \@if MOBILE \@since_tizen 2.3
661 \@elseif WEARABLE \@since_tizen 2.3.1
666 next_item: Elm_Object_Item * @nullable; [[Focus next object item]]
667 dir: Elm.Focus_Direction; [[Focus direction]]
670 //TIZEN_ONLY(20161013): clean up elm color class feature
671 @property class_color {
673 [[Set the color of color class for the Elementary widget item.
675 Note: These color values are expected to be premultiplied by \@p a.
677 \@if MOBILE \@since_tizen 3.0
678 \@elseif WEARABLE \@since_tizen 3.0
682 legacy: elm_object_item_color_class_color_set;
685 [[Get the color of color class for the Elementary widget item.
687 Note: These color values are expected to be premultiplied by \@p a.
689 \@if MOBILE \@since_tizen 3.0
690 \@elseif WEARABLE \@since_tizen 3.0
694 legacy: elm_object_item_color_class_color_get;
697 color_class: const(char)*; [[The name of color class.]]
700 r: int; [[The intensity of the red color.]]
701 g: int; [[The intensity of the green color.]]
702 b: int; [[The intensity of the blue color.]]
703 a: int; [[The alpha value.]]
706 @property class_color2 {
708 [[Set the second color of color class for the Elementary widget item.
710 The second color is commonly used for outline of text.
712 Note: These color values are expected to be premultiplied by \@p a.
714 \@if MOBILE \@since_tizen 3.0
715 \@elseif WEARABLE \@since_tizen 3.0
719 legacy: elm_object_item_color_class_color2_set;
722 [[Get the second color of color class for the Elementary widget item.
724 The second color is commonly used for outline of text.
726 Note: These color values are expected to be premultiplied by \@p a.
728 \@if MOBILE \@since_tizen 3.0
729 \@elseif WEARABLE \@since_tizen 3.0
733 legacy: elm_object_item_color_class_color2_get;
736 color_class: const(char)*; [[The name of color class.]]
739 r: int; [[The intensity of the red color.]]
740 g: int; [[The intensity of the green color.]]
741 b: int; [[The intensity of the blue color.]]
742 a: int; [[The alpha value.]]
745 @property class_color3 {
747 [[Set the third color of color class for the Elementary widget item.
749 The third color is commonly used for shadow of text.
751 Note: These color values are expected to be premultiplied by \@p a.
753 \@if MOBILE \@since_tizen 3.0
754 \@elseif WEARABLE \@since_tizen 3.0
758 legacy: elm_object_item_color_class_color3_set;
761 [[Get the third color of color class for the Elementary widget item.
763 The third color is commonly used for shadow of text.
765 Note: These color values are expected to be premultiplied by \@p a.
767 \@if MOBILE \@since_tizen 3.0
768 \@elseif WEARABLE \@since_tizen 3.0
772 legacy: elm_object_item_color_class_color3_get;
775 color_class: const(char)*; [[The name of color class.]]
778 r: int; [[The intensity of the red color.]]
779 g: int; [[The intensity of the green color.]]
780 b: int; [[The intensity of the blue color.]]
781 a: int; [[The alpha value.]]
785 [[Delete the color class for the Elementary widget item.
787 Deleting the color class will revert it to the values defined by
788 elm_color_class_set() or the theme file.
790 \@if MOBILE \@since_tizen 3.0
791 \@elseif WEARABLE \@since_tizen 3.0
794 legacy: elm_object_item_color_class_del;
796 @in color_class: const(char)*;
800 [[Delete all color classes for the Elementary widget item.
802 This function deletes any color classes defined for the Elementary widget item.
803 Clearing color classes will revert the color of all parts to the values
804 defined by elm_color_class_set() or the theme file.
806 \@if MOBILE \@since_tizen 3.0
807 \@elseif WEARABLE \@since_tizen 3.0
810 legacy: elm_object_item_color_class_clear;
817 //TIZEN_ONLY(20150713) : add widget_item name setter
818 Elm_Interface_Atspi_Accessible.name.get;
819 Elm_Interface_Atspi_Accessible.name.set;
821 //TIZEN_ONLY(20161111) add widget/widget_item description get/set
822 Elm_Interface_Atspi_Accessible.description.set;
823 Elm_Interface_Atspi_Accessible.description.get;
825 Elm_Interface_Atspi_Accessible.state_set.get;
826 Elm_Interface_Atspi_Accessible.parent.get;
827 //TIZEN_ONLY(20150709) : atspi relations api
828 Elm_Interface_Atspi_Accessible.relationship_append;
829 Elm_Interface_Atspi_Accessible.relationship_remove;
830 Elm_Interface_Atspi_Accessible.relation_set.get;
831 Elm_Interface_Atspi_Accessible.relationships_clear;
833 //TIZEN_ONLY(20150731) : add i18n support for name and description
834 Elm_Interface_Atspi_Accessible.translation_domain.set;
835 Elm_Interface_Atspi_Accessible.translation_domain.get;
837 //TIZEN_ONLY(20160726): add API elm_atspi_accessible_can_highlight_set/get
838 Elm_Interface_Atspi_Accessible.can_highlight.set;
839 Elm_Interface_Atspi_Accessible.can_highlight.get;
841 Elm_Interface_Atspi_Component.extents.get;
842 Elm_Interface_Atspi_Component.extents.set;
843 Elm_Interface_Atspi_Component.alpha.get;
844 Elm_Interface_Atspi_Component.layer.get;
845 Elm_Interface_Atspi_Component.focus_grab;
846 Elm_Interface_Atspi_Component.highlight_grab;
847 Elm_Interface_Atspi_Component.highlight_clear;
848 //TIZEN_ONLY(20160527): widget item: add AtspiAction interface to all widget items
849 Elm_Interface_Atspi_Widget_Action.elm_actions.get;