aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-03-15 19:41:17 +0100
committerDave Andreoli <dave@gurumeditation.it>2017-03-15 19:41:17 +0100
commitda9258f474be0fb35ca73f04ac4da2706bf59783 (patch)
tree816eb75b802364eb52ae25da33ece6dc3d6f1055
parentNew 1.19 API: elm.Naviframe "item,activated" cb (diff)
downloadpython-efl-da9258f474be0fb35ca73f04ac4da2706bf59783.tar.gz
New 1.19 API: elm.GengridItem.custom_size
-rw-r--r--efl/elementary/gengrid_cdef.pxi2
-rw-r--r--efl/elementary/gengrid_item.pxi28
2 files changed, 30 insertions, 0 deletions
diff --git a/efl/elementary/gengrid_cdef.pxi b/efl/elementary/gengrid_cdef.pxi
index ff2bc07..0484bf0 100644
--- a/efl/elementary/gengrid_cdef.pxi
+++ b/efl/elementary/gengrid_cdef.pxi
@@ -84,6 +84,8 @@ cdef extern from "Elementary.h":
void elm_gengrid_item_update(Elm_Object_Item *item)
void elm_gengrid_item_pos_get(const Elm_Object_Item *item, unsigned int *x, unsigned int *y)
void elm_gengrid_item_all_contents_unset(Elm_Object_Item *obj, Eina_List **l)
+ void elm_gengrid_item_custom_size_set(Elm_Object_Item *obj, Evas_Coord w, Evas_Coord h)
+ void elm_gengrid_item_custom_size_get(Elm_Object_Item *obj, Evas_Coord *w, Evas_Coord *h)
Elm_Object_Item * elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth)
Elm_Object_Item * elm_gengrid_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret)
diff --git a/efl/elementary/gengrid_item.pxi b/efl/elementary/gengrid_item.pxi
index 43419af..897374f 100644
--- a/efl/elementary/gengrid_item.pxi
+++ b/efl/elementary/gengrid_item.pxi
@@ -194,6 +194,34 @@ cdef class GengridItem(ObjectItem):
self._set_properties_from_keyword_args(self.kwargs)
return self
+ property custom_size:
+ """ Custom size mode for non-homogeneous gengrid.
+
+ In case of a horizontal grid, only the widths will be resized and
+ in case of vertical only the heights can be resized. Item size
+ should be set by elm_gengrid_item_size_set() beforehand.
+
+ :type: (int w, int h)
+
+ .. versionadded:: 1.19
+
+ """
+ def __get__(self):
+ cdef Evas_Coord w, h
+ elm_gengrid_item_custom_size_get(self.item, &w, &h)
+ return (w, h)
+
+ def __set__(self, value):
+ w, h = value
+ elm_gengrid_item_custom_size_set(self.item, w, h)
+
+ def custom_size_set(self, w, h):
+ elm_gengrid_item_custom_size_set(self.item, w, h)
+ def custom_size_get(self):
+ cdef Evas_Coord w, h
+ elm_gengrid_item_custom_size_get(self.item, &w, &h)
+ return (w, h)
+
property data:
"""User data for the item."""
def __get__(self):