summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-08-01 18:14:55 +0200
committerdavemds <dave@gurumeditation.it>2014-08-01 18:14:55 +0200
commita4d321dacc846a62821a5cbe7f45baaeaa1409e7 (patch)
treeceeec53ae18cee1137e56d1f674345f86e720c53 /efl
parentf5dd70b70fd9e1ae529b6f55c1c81bff3677da16 (diff)
Gengrid: new property reorder_type, with test for reorder mode
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/enums.pxd4
-rw-r--r--efl/elementary/gengrid.pxd3
-rw-r--r--efl/elementary/gengrid.pyx21
-rw-r--r--efl/elementary/gengrid_widget.pxi17
4 files changed, 44 insertions, 1 deletions
diff --git a/efl/elementary/enums.pxd b/efl/elementary/enums.pxd
index 87ea2e9..5ac71f4 100644
--- a/efl/elementary/enums.pxd
+++ b/efl/elementary/enums.pxd
@@ -170,6 +170,10 @@ cdef extern from "Elementary.h":
170 ELM_FOCUS_AUTOSCROLL_MODE_NONE 170 ELM_FOCUS_AUTOSCROLL_MODE_NONE
171 ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN 171 ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN
172 172
173 ctypedef enum Elm_Gengrid_Reorder_Type:
174 ELM_GENGRID_REORDER_TYPE_NORMAL
175 ELM_GENGRID_REORDER_TYPE_SWAP
176
173 ctypedef enum Elm_Genlist_Item_Type: 177 ctypedef enum Elm_Genlist_Item_Type:
174 ELM_GENLIST_ITEM_NONE 178 ELM_GENLIST_ITEM_NONE
175 ELM_GENLIST_ITEM_TREE 179 ELM_GENLIST_ITEM_TREE
diff --git a/efl/elementary/gengrid.pxd b/efl/elementary/gengrid.pxd
index a8f5bb9..3d166d7 100644
--- a/efl/elementary/gengrid.pxd
+++ b/efl/elementary/gengrid.pxd
@@ -4,7 +4,7 @@ from efl.c_eo cimport Eo
4from object_item cimport Elm_Object_Item 4from object_item cimport Elm_Object_Item
5from general cimport Elm_Tooltip_Item_Content_Cb 5from general cimport Elm_Tooltip_Item_Content_Cb
6from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Object_Select_Mode, \ 6from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Object_Select_Mode, \
7 Elm_Object_Multi_Select_Mode, Elm_Glob_Match_Flags 7 Elm_Object_Multi_Select_Mode, Elm_Glob_Match_Flags, Elm_Gengrid_Reorder_Type
8from efl.ecore.enums cimport Ecore_Pos_Map 8from efl.ecore.enums cimport Ecore_Pos_Map
9 9
10cdef extern from "Elementary.h": 10cdef extern from "Elementary.h":
@@ -56,6 +56,7 @@ cdef extern from "Elementary.h":
56 Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj) 56 Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj)
57 void elm_gengrid_reorder_mode_start(Evas_Object *obj, Ecore_Pos_Map tween_mode) 57 void elm_gengrid_reorder_mode_start(Evas_Object *obj, Ecore_Pos_Map tween_mode)
58 void elm_gengrid_reorder_mode_stop(Evas_Object *obj) 58 void elm_gengrid_reorder_mode_stop(Evas_Object *obj)
59 void elm_gengrid_reorder_type_set(Evas_Object *obj, Elm_Gengrid_Reorder_Type reorder_type)
59 void elm_gengrid_page_show(Evas_Object *obj, int h_pagenum, int v_pagenum) 60 void elm_gengrid_page_show(Evas_Object *obj, int h_pagenum, int v_pagenum)
60 void elm_gengrid_filled_set(Evas_Object *obj, Eina_Bool fill) 61 void elm_gengrid_filled_set(Evas_Object *obj, Eina_Bool fill)
61 Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj) 62 Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj)
diff --git a/efl/elementary/gengrid.pyx b/efl/elementary/gengrid.pyx
index 42c36e6..46b25fe 100644
--- a/efl/elementary/gengrid.pyx
+++ b/efl/elementary/gengrid.pyx
@@ -304,6 +304,24 @@ Multi-select mode
304 304
305 .. versionadded:: 1.10 305 .. versionadded:: 1.10
306 306
307
308.. _Elm_Gengrid_Reorder_Type:
309
310Reorder type
311============
312
313.. data:: ELM_GENGRID_REORDER_TYPE_NORMAL
314
315 Normal reorder mode
316
317 .. versionadded:: 1.11
318
319.. data:: ELM_GENGRID_REORDER_TYPE_SWAP
320
321 Swap reorder mode
322
323 .. versionadded:: 1.11
324
307""" 325"""
308 326
309include "tooltips.pxi" 327include "tooltips.pxi"
@@ -337,6 +355,9 @@ ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT = enums.ELM_OBJECT_MULTI_SELECT_MODE_DEFAUL
337ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL = enums.ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL 355ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL = enums.ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL
338ELM_OBJECT_MULTI_SELECT_MODE_MAX = enums.ELM_OBJECT_MULTI_SELECT_MODE_MAX 356ELM_OBJECT_MULTI_SELECT_MODE_MAX = enums.ELM_OBJECT_MULTI_SELECT_MODE_MAX
339 357
358ELM_GENGRID_REORDER_TYPE_NORMAL = enums.ELM_GENGRID_REORDER_TYPE_NORMAL
359ELM_GENGRID_REORDER_TYPE_SWAP = enums.ELM_GENGRID_REORDER_TYPE_SWAP
360
340def _cb_object_item_conv(uintptr_t addr): 361def _cb_object_item_conv(uintptr_t addr):
341 cdef Elm_Object_Item *it = <Elm_Object_Item *>addr 362 cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
342 return _object_item_to_python(it) 363 return _object_item_to_python(it)
diff --git a/efl/elementary/gengrid_widget.pxi b/efl/elementary/gengrid_widget.pxi
index 4e6af66..d9cab8a 100644
--- a/efl/elementary/gengrid_widget.pxi
+++ b/efl/elementary/gengrid_widget.pxi
@@ -431,6 +431,23 @@ cdef class Gengrid(Object):
431 elm_gengrid_reorder_mode_stop(self.obj) 431 elm_gengrid_reorder_mode_stop(self.obj)
432 432
433 433
434 property reorder_type:
435 """ Set the order type.
436
437 This affect the way items are moved (when in reorder mode) with the
438 keyboard arrows.
439
440 :type: :ref:`Elm_Gengrid_Reorder_Type`
441
442 .. versionadded:: 1.11
443
444 """
445 def __set__(self, value):
446 elm_gengrid_reorder_type_set(self.obj, value)
447
448 def reorder_type_set(self, value):
449 elm_gengrid_reorder_type_set(self.obj, value)
450
434 property filled: 451 property filled:
435 """The fill state of the whole grid of items of a gengrid 452 """The fill state of the whole grid of items of a gengrid
436 within its given viewport. By default, this value is False, meaning 453 within its given viewport. By default, this value is False, meaning