summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-05-05 20:58:04 +0200
committerdavemds <dave@gurumeditation.it>2014-05-05 20:58:04 +0200
commit0281efaa87dae6239c0d99de2654e27e5a45aeab (patch)
treec8affdfe8c65527de8cd1f83355440d66805892d
parente38dfdbd8937e785efa5232c73441fc8bfab9b4d (diff)
New Gengrid reorder_mode functions and signals.
-rw-r--r--efl/elementary/gengrid.pxd3
-rw-r--r--efl/elementary/gengrid.pyx5
-rw-r--r--efl/elementary/gengrid_widget.pxi42
3 files changed, 50 insertions, 0 deletions
diff --git a/efl/elementary/gengrid.pxd b/efl/elementary/gengrid.pxd
index ac1054f..4706945 100644
--- a/efl/elementary/gengrid.pxd
+++ b/efl/elementary/gengrid.pxd
@@ -3,6 +3,7 @@ from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb, \
3from object_item cimport Elm_Object_Item 3from object_item cimport Elm_Object_Item
4from general cimport Elm_Tooltip_Item_Content_Cb 4from general cimport Elm_Tooltip_Item_Content_Cb
5from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Object_Select_Mode 5from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Object_Select_Mode
6from efl.ecore.enums cimport Ecore_Pos_Map
6 7
7cdef extern from "Elementary.h": 8cdef extern from "Elementary.h":
8 ctypedef char *(*GengridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part) 9 ctypedef char *(*GengridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part)
@@ -46,6 +47,8 @@ cdef extern from "Elementary.h":
46 void elm_gengrid_align_get(const Evas_Object *obj, double *align_x, double *align_y) 47 void elm_gengrid_align_get(const Evas_Object *obj, double *align_x, double *align_y)
47 void elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode) 48 void elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode)
48 Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj) 49 Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj)
50 void elm_gengrid_reorder_mode_start(Evas_Object *obj, Ecore_Pos_Map tween_mode)
51 void elm_gengrid_reorder_mode_stop(Evas_Object *obj)
49 void elm_gengrid_page_show(Evas_Object *obj, int h_pagenum, int v_pagenum) 52 void elm_gengrid_page_show(Evas_Object *obj, int h_pagenum, int v_pagenum)
50 void elm_gengrid_filled_set(Evas_Object *obj, Eina_Bool fill) 53 void elm_gengrid_filled_set(Evas_Object *obj, Eina_Bool fill)
51 Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj) 54 Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj)
diff --git a/efl/elementary/gengrid.pyx b/efl/elementary/gengrid.pyx
index 5481e19..70284cc 100644
--- a/efl/elementary/gengrid.pyx
+++ b/efl/elementary/gengrid.pyx
@@ -250,6 +250,11 @@ Smart events that you can add callbacks for are:
250- ``unfocused`` - When the gengrid has lost focus. (since 1.8) 250- ``unfocused`` - When the gengrid has lost focus. (since 1.8)
251- ``item,focused`` - When the gengrid item has received focus. (since 1.10) 251- ``item,focused`` - When the gengrid item has received focus. (since 1.10)
252- ``item,unfocused`` - When the gengrid item has lost focus. (since 1.10) 252- ``item,unfocused`` - When the gengrid item has lost focus. (since 1.10)
253- ``item,reorder,anim,start`` - This is called when a gengrid item movement
254 has just started by keys in reorder mode. The parameter is the item that
255 is going to move. (since 1.10)
256- ``item,reorder,anim,stop`` - This is called when a gengrid item movement just
257 stopped in reorder mode. The parameter is the item that was moved. (since 1.10)
253 258
254Enumerations 259Enumerations
255------------ 260------------
diff --git a/efl/elementary/gengrid_widget.pxi b/efl/elementary/gengrid_widget.pxi
index 3dc333a..9c7c6a2 100644
--- a/efl/elementary/gengrid_widget.pxi
+++ b/efl/elementary/gengrid_widget.pxi
@@ -355,6 +355,26 @@ cdef class Gengrid(Object):
355 def reorder_mode_get(self, mode): 355 def reorder_mode_get(self, mode):
356 return bool(elm_gengrid_reorder_mode_get(self.obj)) 356 return bool(elm_gengrid_reorder_mode_get(self.obj))
357 357
358 def reorder_mode_start(self, tween_mode):
359 """Enable the gengrid widget mode reordered with keys.
360
361 :param tween_mode: Position mappings for animation
362 :type tween_mode: `efl.ecore.Ecore_Pos_Map`
363
364 .. versionadded:: 1.10
365
366 """
367 elm_gengrid_reorder_mode_start(self.obj, tween_mode)
368
369 def reorder_mode_stop(self):
370 """Stop the gengrid widget mode reorder.
371
372 .. versionadded:: 1.10
373
374 """
375 elm_gengrid_reorder_mode_stop(self.obj)
376
377
358 property filled: 378 property filled:
359 """The fill state of the whole grid of items of a gengrid 379 """The fill state of the whole grid of items of a gengrid
360 within its given viewport. By default, this value is False, meaning 380 within its given viewport. By default, this value is False, meaning
@@ -849,6 +869,28 @@ cdef class Gengrid(Object):
849 def callback_item_unfocused_del(self, func): 869 def callback_item_unfocused_del(self, func):
850 self._callback_del_full("item,unfocused", _cb_object_item_conv, func) 870 self._callback_del_full("item,unfocused", _cb_object_item_conv, func)
851 871
872 def callback_item_reorder_anim_start_add(self, func, *args, **kwargs):
873 """When a gengrid item movement has just started by keys.
874
875 .. versionadded:: 1.10
876
877 """
878 self._callback_add_full("item,reorder,anim,start", _cb_object_item_conv, func, *args, **kwargs)
879
880 def callback_item_reorder_anim_start_del(self, func):
881 self._callback_del_full("item,reorder,anim,start", _cb_object_item_conv, func)
882
883 def callback_item_reorder_anim_stop_add(self, func, *args, **kwargs):
884 """When a gengrid item movement just stopped in reorder mode.
885
886 .. versionadded:: 1.10
887
888 """
889 self._callback_add_full("item,reorder,anim,stop", _cb_object_item_conv, func, *args, **kwargs)
890
891 def callback_item_reorder_anim_stop_del(self, func):
892 self._callback_del_full("item,reorder,anim,stop", _cb_object_item_conv, func)
893
852 property scroller_policy: 894 property scroller_policy:
853 """ 895 """
854 896