Merge "Region show on item elements fixed" into tizen
[platform/upstream/elementary.git] / src / lib / elm_widget_item.eo
1 class Elm.Widget_Item(Eo.Base, Elm_Interface_Atspi_Accessible,
2                       Elm_Interface_Atspi_Component)
3 {
4       eo_prefix: elm_wdg_item;
5       legacy_prefix: elm_object_item;
6       methods {
7            @property tooltip_window_mode {
8                [[Control size restriction state of an object's tooltip
9
10                  This function returns whether a tooltip is allowed to expand beyond
11                  its parent window's canvas.
12                  It will instead be limited only by the size of the display.]]
13                 get {
14                 }
15                 set {
16                      return: bool; [[$false on failure, $true on success]]
17                 }
18                 values {
19                      disable: bool; [[If $true, size restrictions are disabled]]
20                 }
21            }
22            @property tooltip_style {
23                 [[Control a different style for this item tooltip.
24
25                   Note: before you set a style you should define a tooltip with
26                   @.tooltip_content_cb_set or
27                   @.tooltip_text_set
28
29                   See: elm_object_tooltip_style_set() for more details.]]
30                 get {
31                 }
32                 set {
33                 }
34                 values {
35                      style: const (char)*; [[the theme style used/to use (default, transparent, ...)]]
36                 }
37            }
38            @property cursor {
39                 [[Control the type of mouse pointer/cursor decoration to be shown,
40                   when the mouse pointer is over the given item
41
42                   This function works analogously as elm_object_cursor_set(), but
43                   here the cursor's changing area is restricted to the item's
44                   area, and not the whole widget's. Note that that item cursors
45                   have precedence over widget cursors, so that a mouse over an
46                   item with custom cursor set will always show that cursor.
47
48                   If this function is called twice for an object, a previously set
49                   cursor will be unset on the second call.]]
50                 get {
51                 }
52                 set {
53                 }
54                 values {
55                      cursor: const (char) *; [[the cursor type's name]]
56                 }
57            }
58            @property cursor_style {
59                 [[Conrol a different $style for a given custom cursor set for an item.
60
61                   This function only makes sense when one is using custom mouse
62                   cursor decorations defined in a theme file, which can have,
63                   given a cursor name/type, alternate styles on it. It
64                   works analogously as elm_object_cursor_style_set(), but here
65                   applies only to item objects.
66
67                   Warning: Before you set a cursor style you should have defined a
68                   custom cursor previously on the item, with @.cursor.set]]
69                 get {
70                 }
71                 set {
72                 }
73                 values {
74                      style: const (char) *; [[the theme style to use/in use (e.g. $"default", $"transparent", etc)]]
75                 }
76            }
77            @property cursor_engine_only {
78                 [[Control if the (custom)cursor for a given item should be
79                   searched in its theme, also, or should only rely on the
80                   rendering engine.
81
82                   Note: This call is of use only if you've set a custom cursor
83                   for items, with @.cursor.set.
84
85                   Note: By default, cursors will only be looked for between those
86                   provided by the rendering engine.]]
87                 get {
88                 }
89                 set {
90                 }
91                 values {
92                      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.]]
93                 }
94            }
95            @property part_content {
96                 [[Control a content of an object item
97
98                   This sets a new object to an item as a content object. If any object was
99                   already set as a content object in the same part, previous object will be
100                   deleted automatically.]]
101                 get {
102                 }
103                 set {
104                 }
105                 keys {
106                      part: const (char) * @nullable; [[The content part name  (NULL for the default content)]]
107                 }
108                 values {
109                      content: Evas.Object *; [[The content of the object item]]
110                 }
111            }
112            @property part_text {
113                 [[Control a label of an object item
114
115                   Note: Elementary object items may have many labels]]
116                 get {
117                 }
118                 set {
119                 }
120                 keys {
121                      part: const (char) * @nullable; [[The text part name (NULL for the default label)]]
122                 }
123                 values {
124                      label: const (char) *; [[Text of the label]]
125                 }
126            }
127            @property part_text_custom @protected {
128                 get {
129                      [[Get additional text part content]]
130                      legacy: null;
131                 }
132                 set {
133                      [[Save additional text part content]]
134                      legacy: null;
135                 }
136                 keys {
137                      part: const (char) *;
138                 }
139                 values {
140                      label: const (char) *;
141                 }
142            }
143            @property focus {
144                 [[Control the object item focused
145
146                   @since 1.10]]
147                 get {
148                 }
149                 set {
150                 }
151                 values {
152                      focused: bool; [[The focused state]]
153                 }
154            }
155            @property style {
156                 [[Control the style of an object item
157
158                   @since 1.9]]
159                 get {
160                 }
161                 set {
162                 }
163                 values {
164                      style: const (char) *; [[The style of object item]]
165                 }
166            }
167            @property disabled {
168                 [[Control the disabled state of an widget item.
169
170                   Elementary object item can be disabled, in which state they won't
171                   receive input and, in general, will be themed differently from
172                   their normal state, usually greyed out. Useful for contexts
173                   where you don't want your users to interact with some of the
174                   parts of you interface.
175
176                   This sets the state for the widget item, either disabling it or
177                   enabling it back.]]
178                 get {
179                 }
180                 set {
181                 }
182                 values {
183                      disable: bool; [[$true, if the widget item is disabled, $false if it's enabled (or on errors)]]
184                 }
185            }
186            access_order_get {
187                   [[Get highlight order
188
189                     @since 1.8]]
190                 return: const(list<Evas.Object *>) *;
191            }
192            access_order_set {
193                 [[Set highlight order
194
195                   @since 1.8]]
196                 params {
197                      @in objs: own(list<Evas.Object *> *); [[Order of objects to pass highlight]]
198                 }
199            }
200            widget_get @const {
201                 [[Get the widget object's handle which contains a given item
202
203                   Note: This returns the widget object itself that an item belongs to.
204                   Note: Every elm_object_item supports this API]]
205                   return: Evas.Object*; [[The widget object]]
206            }
207            del {
208                 [[Delete the given item.]]
209            }
210            pre_notify_del @protected {
211                 [[notify deletion of widget item]]
212                 legacy: null;
213            }
214            tooltip_text_set {
215                 [[Set the text to be shown in a given object item's tooltips.
216
217                   Setup the text as tooltip to object. The item can have only one tooltip,
218                   so any previous tooltip data - set with this function or
219                   @.tooltip_content_cb_set - is removed.
220
221                   See: elm_object_tooltip_text_set() for more details.]]
222                 params {
223                      text: const (char) *; [[The text to set in the content.]]
224                 }
225            }
226            tooltip_translatable_text_set @protected {
227                 [[Set widget item tooltip as a text string]]
228                 legacy: null;
229                 params {
230                      text: const (char) *;
231                 }
232            }
233            tooltip_unset {
234                 [[Unset tooltip from item.
235
236                   Remove tooltip from item. The callback provided as del_cb to
237                   @.tooltip_content_cb_set will be called to notify
238                   it is not used anymore.
239
240                   See: elm_object_tooltip_unset() for more details.
241                   See: @.tooltip_content_cb_set]]
242            }
243            cursor_unset {
244                 [[Unset any custom mouse pointer/cursor decoration set to be
245                   shown, when the mouse pointer is over the given
246                   item, thus making it show the default cursor again.
247
248                   Use this call to undo any custom settings on this item's cursor
249                   decoration, bringing it back to defaults (no custom style set).
250
251                   See: elm_object_cursor_unset()
252                   See: @.cursor.set]]
253            }
254            part_content_unset {
255                 [[Unset a content of an object item
256
257                   Note: Elementary object items may have many contents]]
258                 params {
259                      part: const (char) *; [[The content part name to unset (NULL for the default content)]]
260                 }
261                 return: Evas.Object*;
262            }
263            part_text_custom_update @protected {
264                 [[Update additional text part content]]
265                 legacy: null;
266            }
267            signal_callback_add {
268                 [[Add a callback for a signal emitted by object item edje.
269
270                   This function connects a callback function to a signal emitted by the
271                   edje object of the object item.
272                   Globs can occur in either the emission or source name.
273
274                   @since 1.8]]
275                 params {
276                      emission: const (char) *; [[The signal's name.]]
277                      source: const (char) *; [[The signal's source.]]
278                      func: Elm_Object_Item_Signal_Cb; [[The callback function to be executed when the signal is emitted.]]
279                      data: void *; [[A pointer to data to pass to the callback function.]]
280                 }
281            }
282            signal_callback_del {
283                 [[Remove a signal-triggered callback from a object item edje object.
284
285                   This function removes the last callback, previously attached to
286                   a signal emitted by an underlying Edje object of $it, whose
287                   parameters $emission, $source and $func match exactly with
288                   those passed to a previous call to
289                   @.signal_callback_add. The data pointer that was passed
290                   to this call will be returned.
291
292                   See: @.signal_callback_add
293
294                   @since 1.8]]
295                 params {
296                      emission: const (char) *; [[The signal's name.]]
297                      source: const (char) *; [[The signal's source.]]
298                      func: Elm_Object_Item_Signal_Cb; [[The callback function to be executed when the signal is emitted.]]
299                 }
300                 return: void*; [[The data pointer of the signal callback or $NULL, on errors.]]
301            }
302            signal_emit {
303                 [[Send a signal to the edje object of the widget item.
304
305                   This function sends a signal to the edje object of the obj item. An
306                   edje program can respond to a signal by specifying matching
307                   'signal' and 'source' fields.]]
308                 params {
309                      emission: const (char) *; [[The signal's name.]]
310                      source: const (char) *; [[The signal's source.]]
311                 }
312            }
313            access_info_set {
314                 [[Set the text to read out when in accessibility mode]]
315                 params {
316                      txt: const (char) *; [[The text that describes the widget to people with poor or no vision]]
317                 }
318            }
319            access_object_get @const {
320                 [[Get an accessible object of the object item.
321
322                   @since 1.8]]
323                 return: Evas.Object*; [[Accessible object of the object item or NULL for any error]]
324            }
325            domain_translatable_part_text_set {
326                 [[Set the text for an object item's part, marking it as translatable.
327
328                   The string to set as $text must be the original one. Do not pass the
329                   return of $gettext() here. Elementary will translate the string
330                   internally and set it on the object item using
331                   @.part_text.set, also storing the original string so that it
332                   can be automatically translated when the language is changed with
333                   elm_language_set(). The $domain will be stored along to find the
334                   translation in the correct catalog. It can be NULL, in which case it will use
335                   whatever domain was set by the application with $textdomain(). This is
336                   useful in case you are building a library on top of Elementary that will have
337                   its own translatable strings, that should not be mixed with those of programs
338                   using the library.
339
340                   @since 1.8]]
341                 params {
342                      part: const (char) *; [[The name of the part to set]]
343                      domain: const (char) *; [[The translation domain to use]]
344                      label: const (char) *; [[The original, non-translated text to set]]
345                 }
346            }
347            translatable_part_text_get @const {
348                 [[Get the original string set as translatable for an object item.
349
350                   When setting translated strings, the function @.part_text.get
351                   will return the translation returned by $gettext(). To get the original
352                   string use this function.
353
354                   @since 1.8]]
355                 params {
356                      part: const (char) *; [[The name of the part that was set]]
357                 }
358                 return: const (char)*; [[The original, untranslated string]]
359            }
360            translate @protected {
361                 [[Query translate]]
362                 legacy: null;
363            }
364            domain_part_text_translatable_set {
365                 [[Mark the part text to be translatable or not.
366
367                   Once you mark the part text to be translatable, the text will be translated
368                   internally regardless of @.part_text.set and
369                   @.domain_translatable_part_text_set. In other case, if you
370                   set the Elementary policy that all text will be translatable in default, you
371                   can set the part text to not be translated by calling this API.
372
373                   See: @.domain_translatable_part_text_set
374                   See: @.part_text.set
375                   See: elm_policy()
376
377                   @since 1.8]]
378                 params {
379                      part: const (char) *; [[The part name of the translatable text]]
380                      domain: const (char) *; [[The translation domain to use]]
381                      translatable: bool; [[$true, the part text will be translated internally. $false, otherwise.]]
382                 }
383            }
384            track {
385                 [[This returns track object of the item.
386
387                   Note: This gets a rectangle object that represents the object item's internal
388                   object. If you want to check the geometry, visibility of the item, you
389                   can call the evas apis such as evas_object_geometry_get(),
390                   evas_object_visible_get() to the track object. Note that all of the
391                   widget items may/may not have the internal object so this api may
392                   return $NULL if the widget item doesn't have it. Additionally, the
393                   widget item is managed/controlled by the widget, the widget item could
394                   be changed(moved, resized even deleted) anytime by it's own widget's
395                   decision. So please dont' change the track object as well as don't
396                   keep the track object in your side as possible but get the track object
397                   at the moment you need to refer. Otherwise, you need to add some
398                   callbacks to the track object to track it's attributes changes.
399
400                   Warning: After use the track object, please call the
401                   @.untrack() paired to elm_object_item_track
402                   definitely to free the track object properly. Don't delete the
403                   track object.
404
405                   See: @.untrack
406                   See: @.track_get
407
408                   @since 1.8]]
409                 return: Evas.Object*; [[The track object]]
410            }
411            untrack {
412                 [[This retrieve the track object of the item.
413
414                   Note: This retrieves the track object that was returned from
415                   @.track.
416
417                   See: @.track
418                   See: @.track_get
419
420                   @since 1.8]]
421            }
422            track_get @const {
423                 [[Get the track object reference count.
424
425                   Note: This gets the reference count for the track object. Whenever you call
426                   the @.track, the reference count will be increased by
427                   one. Likely the reference count will be decreased again when you call
428                   the @.untrack. Unless the reference count reaches to
429                   zero, the track object won't be deleted. So please be sure to call
430                   @.untrack() paired to the elm_object_item_track call
431                   count.
432
433                   See: @.track
434                   See: @.track_get
435
436                   @since 1.8]]
437                 return: int;
438            }
439            track_cancel @protected {
440                 [[Query track_cancel]]
441                 legacy: null;
442            }
443            del_cb_set {
444                 [[Set the function to be called when an item from the widget is
445                   freed.
446
447                   Note: Every elm_object_item supports this API]]
448                 params {
449                      del_cb: Evas_Smart_Cb @nullable; [[The function called]]
450                 }
451            }
452            tooltip_content_cb_set {
453                 [[Set the content to be shown in the tooltip item.
454
455                   Setup the tooltip to item. The item can have only one tooltip,
456                   so any previous tooltip data is removed. $func(with $data) will
457                   be called every time that need show the tooltip and it should
458                   return a valid Evas_Object. This object is then managed fully by
459                   tooltip system and is deleted when the tooltip is gone.
460
461                   See: elm_object_tooltip_content_cb_set() for more details.]]
462                 params {
463                      func: Elm_Tooltip_Item_Content_Cb @nullable; [[the function used to create the tooltip contents.]]
464                      data: const (void) * @optional; [[what to provide to $func as callback data/context.]]
465                      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.]]
466
467                 }
468            }
469            access_register {
470                 [[Register object item as an accessible object.
471
472                   @since 1.8]]
473                 return: Evas.Object*; [[Accessible object of the object item or NULL for any error]]
474            }
475            access_unregister {
476                 [[Unregister accessible object of the object item.
477
478                   @since 1.8]]
479            }
480            access_order_unset {
481                 [[Unset highlight order
482
483                   @since 1.8]]
484            }
485            disable @protected {
486                 legacy: null;
487            }
488            del_pre @protected {
489                 legacy: null;
490                 return: bool;
491            }
492            focus_next_object_get @const {
493                 [[Get the next object with specific focus direction.
494
495                   @since 1.16]]
496                 params {
497                      dir: Elm.Focus_Direction; [[Focus direction]]
498                 }
499                 return: Evas.Object *; [[Focus next object]]
500            }
501            focus_next_object_set {
502                 [[Set the next object with specific focus direction.
503
504                   @since 1.16]]
505                 params {
506                      next: Evas.Object * @nullable; [[Focus next object]]
507                      dir: Elm.Focus_Direction; [[Focus direction]]
508                 }
509            }
510            focus_next_item_get @const {
511                 [[Get the next object item with specific focus direction.
512
513                   @since 1.16]]
514                 params {
515                      dir: Elm.Focus_Direction; [[Focus direction]]
516                 }
517                 return: Elm_Object_Item *; [[Focus next object item]]
518            }
519            focus_next_item_set {
520                 [[Set the next object item with specific focus direction.
521
522                   @since 1.16]]
523                 params {
524                      next_item: Elm_Object_Item * @nullable; [[Focus next object item]]
525                      dir: Elm.Focus_Direction; [[Focus direction]]
526                 }
527            }
528       }
529       implements {
530            Eo.Base.constructor;
531            Eo.Base.destructor;
532            //TIZEN_ONLY(20150713) : add widget_item name setter
533            Elm_Interface_Atspi_Accessible.name.get;
534            Elm_Interface_Atspi_Accessible.name.set;
535            ///
536            Elm_Interface_Atspi_Accessible.state_set.get;
537            Elm_Interface_Atspi_Accessible.parent.get;
538            //TIZEN_ONLY(20150709) : atspi relations api
539            Elm_Interface_Atspi_Accessible.relationship_append;
540            Elm_Interface_Atspi_Accessible.relationship_remove;
541            //
542            Elm_Interface_Atspi_Component.extents.get;
543            Elm_Interface_Atspi_Component.extents.set;
544            Elm_Interface_Atspi_Component.alpha.get;
545            Elm_Interface_Atspi_Component.layer.get;
546            Elm_Interface_Atspi_Component.focus_grab;
547       }
548 }