Merge "Region show on item elements fixed" into tizen
[platform/upstream/elementary.git] / src / lib / elm_gengrid_item.eo
1 import elm_general;
2
3 enum Elm.Gengrid.Item.Scrollto_Type
4 {
5    [[Defines where to position the item in the genlist.]]
6    legacy: elm_gengrid_item_scrollto;
7    none = 0,   [[No scrollto.]]
8    in = (1 << 0),   [[To the nearest viewport.]]
9    top = (1 << 1),   [[To the top of viewport.]]
10    middle = (1 << 2),   [[To the middle of viewport.]]
11    // @tizen_feature
12    bottom = (1 << 3)   [[To the bottom of viewport.]]
13    //
14 }
15
16 enum Elm.Gengrid.Item.Field_Type
17 {
18    [[Defines the type of the item part Used while updating item's parts.
19      It can be used at updating multi fields.]]
20    legacy: elm_gengrid_item_field;
21    all = 0,
22    text = (1 << 0),
23    content = (1 << 1),
24    state = (1 << 2)
25 }
26
27
28 class Elm.Gengrid_Item(Elm.Widget_Item)
29 {
30       eo_prefix: elm_obj_gengrid_item;
31       data: Elm_Gen_Item;
32       methods {
33            @property prev {
34                 get {
35                      [[Get the previous item in a gengrid widget's internal list of items, given a handle to one of those items.
36
37                        This returns the item placed before the $item, on the container
38                        gengrid.]]
39                 }
40                 values {
41                      item: Elm.Widget_Item *; [[The item before $item, or $NULL if there's none (and on errors)]]
42                 }
43            }
44            @property next {
45                 get {
46                      [[Get the next item in a gengrid widget's internal list of items,
47                        given a handle to one of those items.
48
49                        This returns the item placed after the $item, on the container
50                        gengrid.]]
51                 }
52                 values {
53                      item: Elm.Widget_Item *; [[The item after $item, or $NULL if there's none (and on errors)]]
54                 }
55            }
56            @property selected {
57                 [[Control whether a given gengrid item is selected or not
58
59                   This API returns true for all the items selected in multi-select mode as well.
60
61                   This sets the selected state of an item. If multi-selection is
62                   not enabled on the containing gengrid and $selected is
63                   true, any other previously selected items will get
64                   unselected in favor of this new one.]]
65                 get {
66                 }
67                 set {
68                 }
69                 values {
70                      selected: bool; [[the selected state ($true selected, $false not selected)]]
71                 }
72            }
73            @property item_class {
74                 get {
75                      [[Get the Gengrid Item class for the given Gengrid Item.
76
77                        This returns the Gengrid_Item_Class for the given item. It can be used to examine
78                        the function pointers and item_style.]]
79                 }
80                 values {
81                      itc: const (Elm_Gengrid_Item_Class) *; [[Gengrid Item class for the given item]]
82                 }
83            }
84            @property index {
85                 get {
86                      [[Get the index of the item. It is only valid once displayed.]]
87                 }
88                 values {
89                      index: int(-1); [[the position inside the list of item.]]
90                 }
91            }
92            @property pos {
93                 get {
94                      [[Get a given gengrid item's position, relative to the whole gengrid's grid area.
95
96                        This returns the "logical" position of the item within the
97                        gengrid. For example, $(0, 1) would stand for first row,
98                        second column.]]
99                 }
100                 values {
101                      x: uint; [[Pointer to variable to store the item's <b>row number</b>.]]
102                      y: uint; [[Pointer to variable to store the item's <b>column number</b>.]]
103                 }
104            }
105            @property select_mode {
106                 [[Control the gengrid item's select mode.
107
108                   (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
109
110                   elm_gengrid_select_mode_set() changes item's select mode.
111                   - ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and
112                        callback when first becoming selected. Any further clicks will
113                        do nothing, unless you set always select mode.
114                   - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
115                        every click will make the selected callbacks be called.
116                   - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item
117                        entirely and they will neither appear selected nor call selected
118                        callback functions.
119                   - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
120                        with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
121                        smaller than lower limit. Clickable objects should be bigger than
122                        human touch point device (your finger) for some touch or
123                        small screen devices. So it is enabled, the item can be shrink than
124                        predefined finger-size value. And the item will be updated.]]
125                 get {
126                 }
127                 set {
128                 }
129                 values {
130                      mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The selected mode]]
131                 }
132            }
133            /*      init { FIXME
134                    params {
135                    Evas_Smart_Cb func;
136                    const(void)* data;
137                    }
138                    }*/
139            show {
140                 [[Show the portion of a gengrid's internal grid containing a given
141                   item, immediately.
142
143                   This causes gengrid to redraw its viewport's contents to the
144                   region containing the given $item item, if it is not fully
145                   visible.]]
146                 params {
147                      @in type: Elm_Gengrid_Item_Scrollto_Type; [[Where to position the item in the viewport.]]
148                 }
149            }
150            bring_in {
151                 [[Animatedly bring in, to the visible area of a gengrid, a given item on it.
152
153                   This causes gengrid to jump to the given $item and show
154                   it (by scrolling), if it is not fully visible. This will use
155                   animation to do so and take a period of time to complete.]]
156                 params {
157                      @in type: Elm_Gengrid_Item_Scrollto_Type; [[Where to position the item in the viewport.]]
158                 }
159            }
160            update {
161                 [[Update the contents of a given gengrid item
162
163                   This updates an item by calling all the item class functions
164                   again to get the contents, texts and states. Use this when the
165                   original item data has changed and you want the changes to be
166                   reflected.]]
167            }
168            fields_update {
169                 [[Update the part of an item
170
171                   This updates an item's part by calling item's fetching functions again
172                   to get the contents, texts and states. Use this when the original
173                   item data has changed and the changes are desired to be reflected.
174                   Second parts argument is used for globbing to match '*', '?', and '.'
175                   It can be used at updating multi fields.
176
177                   Use elm_gengrid_realized_items_update() to update an item's all
178                   property.
179
180                   @since 1.15]]
181                 params {
182                      @in parts: const (char) *; [[The name of item's part]]
183                      @in itf: Elm.Gengrid.Item.Field_Type; [[The type of item's part type]]
184                 }
185            }
186            item_class_update {
187                 [[Update the item class of a gengrid item.
188
189                   This sets another class of the item, changing the way that it is
190                   displayed. After changing the item class, elm_gengrid_item_update() is
191                   called on the item $it.]]
192                 params {
193                      @in itc: const (Elm_Gengrid_Item_Class) *; [[The gengrid item class describing the function pointers and the item style.]]
194                 }
195            }
196            all_contents_unset{
197
198                  [[Unset all contents fetched by the item class
199
200                  This instructs gengrid to release references to contents in the item,
201                  meaning that they will no longer be managed by gengrid and are
202                  floating "orphans" that can be re-used elsewhere if the user wants
203                  to.]]
204                 params {
205                      @out l: own(list<own(Evas.Object *)> *); [[The contents list to return.]]
206                 }
207            }
208       }
209       implements {
210            Eo.Base.constructor;
211            Elm.Widget_Item.del_pre;
212            Elm.Widget_Item.disable;
213            Elm.Widget_Item.signal_emit;
214            Elm.Widget_Item.focus.set;
215            Elm.Widget_Item.focus.get;
216            Elm.Widget_Item.part_text.get;
217            Elm.Widget_Item.part_content.get;
218            Elm.Widget_Item.tooltip_text_set;
219            Elm.Widget_Item.tooltip_style.get;
220            Elm.Widget_Item.tooltip_style.set;
221            Elm.Widget_Item.tooltip_window_mode.get;
222            Elm.Widget_Item.tooltip_window_mode.set;
223            Elm.Widget_Item.tooltip_content_cb_set;
224            Elm.Widget_Item.tooltip_unset;
225            Elm.Widget_Item.cursor.set;
226            Elm.Widget_Item.cursor_unset;
227            Elm_Interface_Atspi_Accessible.name.get;
228            Elm_Interface_Atspi_Accessible.state_set.get;
229            Elm_Interface_Atspi_Accessible.children.get;
230            Elm_Interface_Atspi_Component.highlight_grab;
231            Elm_Interface_Atspi_Component.highlight_clear;
232       }
233 }