2015-05-20 04:15:49 -07:00
|
|
|
import elm_general;
|
|
|
|
|
2015-07-07 07:14:07 -07:00
|
|
|
enum Elm.Gengrid.Item.Scrollto_Type
|
|
|
|
{
|
2015-07-08 07:49:38 -07:00
|
|
|
[[Defines where to position the item in the genlist.]]
|
2015-07-07 07:14:07 -07:00
|
|
|
legacy: elm_gengrid_item_scrollto;
|
|
|
|
none = 0, [[No scrollto.]]
|
|
|
|
in = (1 << 0), [[To the nearest viewport.]]
|
|
|
|
top = (1 << 1), [[To the top of viewport.]]
|
2016-01-04 14:06:21 -08:00
|
|
|
middle = (1 << 2), [[To the middle of viewport.]]
|
|
|
|
bottom = (1 << 3) [[To the bottom of viewport.]]
|
2015-07-07 07:14:07 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Elm.Gengrid.Item.Field_Type
|
|
|
|
{
|
2015-07-08 07:49:38 -07:00
|
|
|
[[Defines the type of the item part Used while updating item's parts.
|
|
|
|
It can be used at updating multi fields.]]
|
2015-07-07 07:14:07 -07:00
|
|
|
legacy: elm_gengrid_item_field;
|
|
|
|
all = 0,
|
|
|
|
text = (1 << 0),
|
|
|
|
content = (1 << 1),
|
|
|
|
state = (1 << 2)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-05-12 03:21:36 -07:00
|
|
|
class Elm.Gengrid.Item(Elm.Widget.Item)
|
2014-09-27 22:15:37 -07:00
|
|
|
{
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_gengrid_item;
|
2014-09-27 22:15:37 -07:00
|
|
|
eo_prefix: elm_obj_gengrid_item;
|
|
|
|
data: Elm_Gen_Item;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property prev {
|
2014-09-27 22:15:37 -07:00
|
|
|
get {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Get the previous item in a gengrid widget's internal list of items, given a handle to one of those items.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This returns the item placed before the $item, on the container
|
|
|
|
gengrid.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-05-23 07:41:28 -07:00
|
|
|
item: Elm.Widget.Item; [[The item before $item, or $NULL if there's none (and on errors)]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property next {
|
2014-09-27 22:15:37 -07:00
|
|
|
get {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Get the next item in a gengrid widget's internal list of items,
|
|
|
|
given a handle to one of those items.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This returns the item placed after the $item, on the container
|
|
|
|
gengrid.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-05-23 07:41:28 -07:00
|
|
|
item: Elm.Widget.Item; [[The item after $item, or $NULL if there's none (and on errors)]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property selected {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Control whether a given gengrid item is selected or not
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This API returns true for all the items selected in multi-select mode as well.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This sets the selected state of an item. If multi-selection is
|
|
|
|
not enabled on the containing gengrid and $selected is
|
|
|
|
true, any other previously selected items will get
|
|
|
|
unselected in favor of this new one.]]
|
|
|
|
get {
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
values {
|
2015-08-10 04:51:00 -07:00
|
|
|
selected: bool; [[the selected state ($true selected, $false not selected)]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property item_class {
|
2014-09-27 22:15:37 -07:00
|
|
|
get {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Get the Gengrid Item class for the given Gengrid Item.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This returns the Gengrid_Item_Class for the given item. It can be used to examine
|
|
|
|
the function pointers and item_style.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-01-21 13:16:22 -08:00
|
|
|
itc: const (Elm.Gengrid.Item.Class) *; [[Gengrid Item class for the given item]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property index {
|
2014-09-27 22:15:37 -07:00
|
|
|
get {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Get the index of the item. It is only valid once displayed.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-10 04:51:00 -07:00
|
|
|
index: int(-1); [[the position inside the list of item.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property pos {
|
2014-09-27 22:15:37 -07:00
|
|
|
get {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Get a given gengrid item's position, relative to the whole gengrid's grid area.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This returns the "logical" position of the item within the
|
|
|
|
gengrid. For example, $(0, 1) would stand for first row,
|
|
|
|
second column.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-10 04:51:00 -07:00
|
|
|
x: uint; [[Pointer to variable to store the item's <b>row number</b>.]]
|
|
|
|
y: uint; [[Pointer to variable to store the item's <b>column number</b>.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property select_mode {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Control the gengrid item's select mode.
|
|
|
|
|
|
|
|
(If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
|
|
|
|
|
|
|
|
elm_gengrid_select_mode_set() changes item's select mode.
|
|
|
|
- ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and
|
|
|
|
callback when first becoming selected. Any further clicks will
|
|
|
|
do nothing, unless you set always select mode.
|
|
|
|
- ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
|
|
|
|
every click will make the selected callbacks be called.
|
|
|
|
- ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item
|
|
|
|
entirely and they will neither appear selected nor call selected
|
|
|
|
callback functions.
|
|
|
|
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
|
|
|
|
with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
|
|
|
|
smaller than lower limit. Clickable objects should be bigger than
|
|
|
|
human touch point device (your finger) for some touch or
|
|
|
|
small screen devices. So it is enabled, the item can be shrink than
|
|
|
|
predefined finger-size value. And the item will be updated.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
values {
|
2015-08-10 04:51:00 -07:00
|
|
|
mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The selected mode]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/* init { FIXME
|
|
|
|
params {
|
|
|
|
Evas_Smart_Cb func;
|
|
|
|
const(void)* data;
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
show {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Show the portion of a gengrid's internal grid containing a given
|
|
|
|
item, immediately.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This causes gengrid to redraw its viewport's contents to the
|
|
|
|
region containing the given $item item, if it is not fully
|
|
|
|
visible.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
params {
|
2016-01-18 09:03:50 -08:00
|
|
|
@in type: Elm.Gengrid.Item.Scrollto_Type; [[Where to position the item in the viewport.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
bring_in {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Animatedly bring in, to the visible area of a gengrid, a given item on it.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This causes gengrid to jump to the given $item and show
|
|
|
|
it (by scrolling), if it is not fully visible. This will use
|
|
|
|
animation to do so and take a period of time to complete.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
params {
|
2016-01-18 09:03:50 -08:00
|
|
|
@in type: Elm.Gengrid.Item.Scrollto_Type; [[Where to position the item in the viewport.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
update {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Update the contents of a given gengrid item
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This updates an item by calling all the item class functions
|
|
|
|
again to get the contents, texts and states. Use this when the
|
|
|
|
original item data has changed and you want the changes to be
|
|
|
|
reflected.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
fields_update {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Update the part of an item
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This updates an item's part by calling item's fetching functions again
|
|
|
|
to get the contents, texts and states. Use this when the original
|
|
|
|
item data has changed and the changes are desired to be reflected.
|
|
|
|
Second parts argument is used for globbing to match '*', '?', and '.'
|
|
|
|
It can be used at updating multi fields.
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
Use elm_gengrid_realized_items_update() to update an item's all
|
|
|
|
property.
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
@since 1.15]]
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
params {
|
2015-08-10 04:51:00 -07:00
|
|
|
@in parts: const (char) *; [[The name of item's part]]
|
|
|
|
@in itf: Elm.Gengrid.Item.Field_Type; [[The type of item's part type]]
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
}
|
|
|
|
}
|
2014-09-27 22:15:37 -07:00
|
|
|
item_class_update {
|
2015-08-10 04:51:00 -07:00
|
|
|
[[Update the item class of a gengrid item.
|
2014-09-27 22:15:37 -07:00
|
|
|
|
2015-08-10 04:51:00 -07:00
|
|
|
This sets another class of the item, changing the way that it is
|
|
|
|
displayed. After changing the item class, elm_gengrid_item_update() is
|
|
|
|
called on the item $it.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
params {
|
2016-01-21 13:16:22 -08:00
|
|
|
@in itc: const (Elm.Gengrid.Item.Class) *; [[The gengrid item class describing the function pointers and the item style.]]
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|
2016-02-15 22:28:45 -08:00
|
|
|
all_contents_unset{
|
|
|
|
|
|
|
|
[[Unset all contents fetched by the item class
|
|
|
|
|
|
|
|
This instructs gengrid to release references to contents in the item,
|
|
|
|
meaning that they will no longer be managed by gengrid and are
|
|
|
|
floating "orphans" that can be re-used elsewhere if the user wants
|
|
|
|
to.]]
|
|
|
|
params {
|
2016-05-23 07:41:28 -07:00
|
|
|
@out l: own(list<own(Evas.Object)>); [[The contents list to return.]]
|
2016-02-15 22:28:45 -08:00
|
|
|
}
|
|
|
|
}
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
implements {
|
|
|
|
Eo.Base.constructor;
|
2016-05-12 03:21:36 -07:00
|
|
|
Elm.Widget.Item.del_pre;
|
|
|
|
Elm.Widget.Item.disable;
|
|
|
|
Elm.Widget.Item.signal_emit;
|
|
|
|
Elm.Widget.Item.focus.set;
|
|
|
|
Elm.Widget.Item.focus.get;
|
|
|
|
Elm.Widget.Item.part_text.get;
|
|
|
|
Elm.Widget.Item.part_content.get;
|
|
|
|
Elm.Widget.Item.tooltip_text_set;
|
|
|
|
Elm.Widget.Item.tooltip_style.get;
|
|
|
|
Elm.Widget.Item.tooltip_style.set;
|
|
|
|
Elm.Widget.Item.tooltip_window_mode.get;
|
|
|
|
Elm.Widget.Item.tooltip_window_mode.set;
|
|
|
|
Elm.Widget.Item.tooltip_content_cb_set;
|
|
|
|
Elm.Widget.Item.tooltip_unset;
|
|
|
|
Elm.Widget.Item.cursor.set;
|
|
|
|
Elm.Widget.Item.cursor_unset;
|
2016-05-12 03:37:43 -07:00
|
|
|
Elm.Interface.Atspi_Accessible.name.get;
|
|
|
|
Elm.Interface.Atspi_Accessible.state_set.get;
|
2014-09-27 22:15:37 -07:00
|
|
|
}
|
|
|
|
}
|