summaryrefslogtreecommitdiff
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
parent9c00cbb0fe13ad51ded206a54462841fe54508bc (diff)
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":
84 void elm_gengrid_item_update(Elm_Object_Item *item) 84 void elm_gengrid_item_update(Elm_Object_Item *item)
85 void elm_gengrid_item_pos_get(const Elm_Object_Item *item, unsigned int *x, unsigned int *y) 85 void elm_gengrid_item_pos_get(const Elm_Object_Item *item, unsigned int *x, unsigned int *y)
86 void elm_gengrid_item_all_contents_unset(Elm_Object_Item *obj, Eina_List **l) 86 void elm_gengrid_item_all_contents_unset(Elm_Object_Item *obj, Eina_List **l)
87 void elm_gengrid_item_custom_size_set(Elm_Object_Item *obj, Evas_Coord w, Evas_Coord h)
88 void elm_gengrid_item_custom_size_get(Elm_Object_Item *obj, Evas_Coord *w, Evas_Coord *h)
87 89
88 Elm_Object_Item * elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth) 90 Elm_Object_Item * elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth)
89 Elm_Object_Item * elm_gengrid_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret) 91 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):
194 self._set_properties_from_keyword_args(self.kwargs) 194 self._set_properties_from_keyword_args(self.kwargs)
195 return self 195 return self
196 196
197 property custom_size:
198 """ Custom size mode for non-homogeneous gengrid.
199
200 In case of a horizontal grid, only the widths will be resized and
201 in case of vertical only the heights can be resized. Item size
202 should be set by elm_gengrid_item_size_set() beforehand.
203
204 :type: (int w, int h)
205
206 .. versionadded:: 1.19
207
208 """
209 def __get__(self):
210 cdef Evas_Coord w, h
211 elm_gengrid_item_custom_size_get(self.item, &w, &h)
212 return (w, h)
213
214 def __set__(self, value):
215 w, h = value
216 elm_gengrid_item_custom_size_set(self.item, w, h)
217
218 def custom_size_set(self, w, h):
219 elm_gengrid_item_custom_size_set(self.item, w, h)
220 def custom_size_get(self):
221 cdef Evas_Coord w, h
222 elm_gengrid_item_custom_size_get(self.item, &w, &h)
223 return (w, h)
224
197 property data: 225 property data:
198 """User data for the item.""" 226 """User data for the item."""
199 def __get__(self): 227 def __get__(self):