summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-23 13:46:43 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-23 13:46:43 +0100
commit9809eb2739b64b11f0072a353308106dd5a4ece2 (patch)
treeca976b1c3c1ef8d045bb25c95bd9d3163f01c926 /efl
parent4f8dfc195f98bd1a12efe4f1c5d2259e75d2b4c1 (diff)
New 1.17 API: ELM_GEN[GRID/LIST]_ITEM_SCROLLTO_BOTTOM
The grid enum was a bit messed, it was using the list enums, fixed and leave the old one in place for compatibility
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/gengrid.py8
-rw-r--r--efl/elementary/gengrid_cdef.pxi10
-rw-r--r--efl/elementary/gengrid_item.pxi10
-rw-r--r--efl/elementary/genlist.py1
-rw-r--r--efl/elementary/genlist_cdef.pxi1
-rw-r--r--efl/elementary/genlist_item.pxi10
6 files changed, 32 insertions, 8 deletions
diff --git a/efl/elementary/gengrid.py b/efl/elementary/gengrid.py
index 81e57a9..24f33ba 100644
--- a/efl/elementary/gengrid.py
+++ b/efl/elementary/gengrid.py
@@ -1,9 +1,17 @@
1from . import Gengrid, GengridItem, GengridItemClass 1from . import Gengrid, GengridItem, GengridItemClass
2 2
3# deprecated
3from . import ELM_GENLIST_ITEM_SCROLLTO_NONE 4from . import ELM_GENLIST_ITEM_SCROLLTO_NONE
4from . import ELM_GENLIST_ITEM_SCROLLTO_IN 5from . import ELM_GENLIST_ITEM_SCROLLTO_IN
5from . import ELM_GENLIST_ITEM_SCROLLTO_TOP 6from . import ELM_GENLIST_ITEM_SCROLLTO_TOP
6from . import ELM_GENLIST_ITEM_SCROLLTO_MIDDLE 7from . import ELM_GENLIST_ITEM_SCROLLTO_MIDDLE
8#
9
10from . import ELM_GENGRID_ITEM_SCROLLTO_NONE
11from . import ELM_GENGRID_ITEM_SCROLLTO_IN
12from . import ELM_GENGRID_ITEM_SCROLLTO_TOP
13from . import ELM_GENGRID_ITEM_SCROLLTO_MIDDLE
14from . import ELM_GENGRID_ITEM_SCROLLTO_BOTTOM
7 15
8from . import ELM_OBJECT_SELECT_MODE_DEFAULT 16from . import ELM_OBJECT_SELECT_MODE_DEFAULT
9from . import ELM_OBJECT_SELECT_MODE_ALWAYS 17from . import ELM_OBJECT_SELECT_MODE_ALWAYS
diff --git a/efl/elementary/gengrid_cdef.pxi b/efl/elementary/gengrid_cdef.pxi
index 922a783..779aa6c 100644
--- a/efl/elementary/gengrid_cdef.pxi
+++ b/efl/elementary/gengrid_cdef.pxi
@@ -2,6 +2,7 @@ cdef extern from "Elementary.h":
2 2
3 ctypedef cEo Elm_Gengrid 3 ctypedef cEo Elm_Gengrid
4 4
5 # deprecated
5 cpdef enum Elm_Genlist_Item_Scrollto_Type: 6 cpdef enum Elm_Genlist_Item_Scrollto_Type:
6 ELM_GENLIST_ITEM_SCROLLTO_NONE 7 ELM_GENLIST_ITEM_SCROLLTO_NONE
7 ELM_GENLIST_ITEM_SCROLLTO_IN 8 ELM_GENLIST_ITEM_SCROLLTO_IN
@@ -10,6 +11,15 @@ cdef extern from "Elementary.h":
10 ctypedef enum Elm_Genlist_Item_Scrollto_Type: 11 ctypedef enum Elm_Genlist_Item_Scrollto_Type:
11 pass 12 pass
12 13
14 cpdef enum Elm_Gengrid_Item_Scrollto_Type:
15 ELM_GENGRID_ITEM_SCROLLTO_NONE
16 ELM_GENGRID_ITEM_SCROLLTO_IN
17 ELM_GENGRID_ITEM_SCROLLTO_TOP
18 ELM_GENGRID_ITEM_SCROLLTO_MIDDLE
19 ELM_GENGRID_ITEM_SCROLLTO_BOTTOM
20 ctypedef enum Elm_Gengrid_Item_Scrollto_Type:
21 pass
22
13 cpdef enum Elm_Object_Select_Mode: 23 cpdef enum Elm_Object_Select_Mode:
14 ELM_OBJECT_SELECT_MODE_DEFAULT 24 ELM_OBJECT_SELECT_MODE_DEFAULT
15 ELM_OBJECT_SELECT_MODE_ALWAYS 25 ELM_OBJECT_SELECT_MODE_ALWAYS
diff --git a/efl/elementary/gengrid_item.pxi b/efl/elementary/gengrid_item.pxi
index 54f4bd2..ce4b8f4 100644
--- a/efl/elementary/gengrid_item.pxi
+++ b/efl/elementary/gengrid_item.pxi
@@ -261,26 +261,28 @@ cdef class GengridItem(ObjectItem):
261 def selected_get(self): 261 def selected_get(self):
262 return bool(elm_gengrid_item_selected_get(self.item)) 262 return bool(elm_gengrid_item_selected_get(self.item))
263 263
264 def show(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): 264 def show(self, scrollto_type=ELM_GENGRID_ITEM_SCROLLTO_IN):
265 """This causes gengrid to **redraw** its viewport's contents to the 265 """This causes gengrid to **redraw** its viewport's contents to the
266 region containing the given ``item``, if it is not fully 266 region containing the given ``item``, if it is not fully
267 visible. 267 visible.
268 268
269 .. seealso:: :py:func:`bring_in()` 269 .. seealso:: :py:func:`bring_in()`
270 270
271 :param type: Where to position the item in the viewport. 271 :param scrollto_type: Where to position the item in the viewport.
272 :type scrollto_type: :ref:`Elm_Gengrid_Item_Scrollto_Type`
272 273
273 """ 274 """
274 elm_gengrid_item_show(self.item, scrollto_type) 275 elm_gengrid_item_show(self.item, scrollto_type)
275 276
276 def bring_in(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): 277 def bring_in(self, scrollto_type=ELM_GENGRID_ITEM_SCROLLTO_IN):
277 """This causes gengrid to jump to the item and show 278 """This causes gengrid to jump to the item and show
278 it (by scrolling), if it is not fully visible. This will use 279 it (by scrolling), if it is not fully visible. This will use
279 animation to do so and take a period of time to complete. 280 animation to do so and take a period of time to complete.
280 281
281 .. seealso:: :py:func:`show()` 282 .. seealso:: :py:func:`show()`
282 283
283 :param type: Where to position the item in the viewport. 284 :param scrollto_type: Where to position the item in the viewport.
285 :type scrollto_type: :ref:`Elm_Gengrid_Item_Scrollto_Type`
284 286
285 """ 287 """
286 elm_gengrid_item_bring_in(self.item, scrollto_type) 288 elm_gengrid_item_bring_in(self.item, scrollto_type)
diff --git a/efl/elementary/genlist.py b/efl/elementary/genlist.py
index c7b538d..94a8d57 100644
--- a/efl/elementary/genlist.py
+++ b/efl/elementary/genlist.py
@@ -14,6 +14,7 @@ from . import ELM_GENLIST_ITEM_SCROLLTO_NONE
14from . import ELM_GENLIST_ITEM_SCROLLTO_IN 14from . import ELM_GENLIST_ITEM_SCROLLTO_IN
15from . import ELM_GENLIST_ITEM_SCROLLTO_TOP 15from . import ELM_GENLIST_ITEM_SCROLLTO_TOP
16from . import ELM_GENLIST_ITEM_SCROLLTO_MIDDLE 16from . import ELM_GENLIST_ITEM_SCROLLTO_MIDDLE
17from . import ELM_GENLIST_ITEM_SCROLLTO_BOTTOM
17 18
18from . import ELM_LIST_COMPRESS 19from . import ELM_LIST_COMPRESS
19from . import ELM_LIST_SCROLL 20from . import ELM_LIST_SCROLL
diff --git a/efl/elementary/genlist_cdef.pxi b/efl/elementary/genlist_cdef.pxi
index 89779d3..0476ffb 100644
--- a/efl/elementary/genlist_cdef.pxi
+++ b/efl/elementary/genlist_cdef.pxi
@@ -21,6 +21,7 @@ cdef extern from "Elementary.h":
21 ELM_GENLIST_ITEM_SCROLLTO_IN 21 ELM_GENLIST_ITEM_SCROLLTO_IN
22 ELM_GENLIST_ITEM_SCROLLTO_TOP 22 ELM_GENLIST_ITEM_SCROLLTO_TOP
23 ELM_GENLIST_ITEM_SCROLLTO_MIDDLE 23 ELM_GENLIST_ITEM_SCROLLTO_MIDDLE
24 ELM_GENLIST_ITEM_SCROLLTO_BOTTOM
24 ctypedef enum Elm_Genlist_Item_Scrollto_Type: 25 ctypedef enum Elm_Genlist_Item_Scrollto_Type:
25 pass 26 pass
26 27
diff --git a/efl/elementary/genlist_item.pxi b/efl/elementary/genlist_item.pxi
index c5eb23f..409b52d 100644
--- a/efl/elementary/genlist_item.pxi
+++ b/efl/elementary/genlist_item.pxi
@@ -330,23 +330,25 @@ cdef class GenlistItem(ObjectItem):
330 cdef bint ret = elm_genlist_item_selected_get(self.item) 330 cdef bint ret = elm_genlist_item_selected_get(self.item)
331 return ret 331 return ret
332 332
333 def show(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): 333 def show(self, scrollto_type=ELM_GENLIST_ITEM_SCROLLTO_IN):
334 """This causes genlist to jump to the item and show it (by 334 """This causes genlist to jump to the item and show it (by
335 jumping to that position), if it is not fully visible. 335 jumping to that position), if it is not fully visible.
336 336
337 :type: :ref:`Elm_Genlist_Item_Scrollto_Type` 337 :param scrollto_type: Where to position the item in the viewport.
338 :type scrollto_type: :ref:`Elm_Genlist_Item_Scrollto_Type`
338 339
339 .. seealso:: :py:func:`bring_in()` 340 .. seealso:: :py:func:`bring_in()`
340 341
341 """ 342 """
342 elm_genlist_item_show(self.item, scrollto_type) 343 elm_genlist_item_show(self.item, scrollto_type)
343 344
344 def bring_in(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): 345 def bring_in(self, scrollto_type=ELM_GENLIST_ITEM_SCROLLTO_IN):
345 """This causes genlist to jump to the item and show it (by 346 """This causes genlist to jump to the item and show it (by
346 animatedly scrolling), if it is not fully visible. 347 animatedly scrolling), if it is not fully visible.
347 This may use animation and take a some time to do so. 348 This may use animation and take a some time to do so.
348 349
349 :type: :ref:`Elm_Genlist_Item_Scrollto_Type` 350 :param scrollto_type: Where to position the item in the viewport.
351 :type scrollto_type: :ref:`Elm_Genlist_Item_Scrollto_Type`
350 352
351 .. seealso:: :py:func:`show()` 353 .. seealso:: :py:func:`show()`
352 354