summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-03-01 14:23:42 +0100
committerdavemds <dave@gurumeditation.it>2014-03-01 14:23:42 +0100
commit9f6cf51f80535bba89651ca8f54f6ecbd1a69c15 (patch)
tree5e4b7781fd117c11482e84986ba1569c23241f53 /efl
parent65f43c5bee3874d07a58a3cd73f83b492a9f3e69 (diff)
Python-EFL: new 1.9 API: Layout.content_swallow_list_get()
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/layout_class.pxd68
-rw-r--r--efl/elementary/layout_class.pyx24
2 files changed, 57 insertions, 35 deletions
diff --git a/efl/elementary/layout_class.pxd b/efl/elementary/layout_class.pxd
index 0659167..68f7fe9 100644
--- a/efl/elementary/layout_class.pxd
+++ b/efl/elementary/layout_class.pxd
@@ -15,7 +15,7 @@
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18from efl.evas cimport Evas_Object, const_Evas_Object, Eina_Bool 18from efl.evas cimport Evas_Object, const_Evas_Object, Eina_Bool, Eina_List
19from object cimport Object 19from object cimport Object
20from libc.string cimport const_char 20from libc.string cimport const_char
21 21
@@ -28,39 +28,39 @@ cdef extern from "Elementary.h":
28 Evas_Object * elm_layout_content_unset(Evas_Object *obj, const_char *swallow) 28 Evas_Object * elm_layout_content_unset(Evas_Object *obj, const_char *swallow)
29 Eina_Bool elm_layout_text_set(Evas_Object *obj, const_char *part, const_char *text) 29 Eina_Bool elm_layout_text_set(Evas_Object *obj, const_char *part, const_char *text)
30 const_char * elm_layout_text_get(Evas_Object *obj, const_char *part) 30 const_char * elm_layout_text_get(Evas_Object *obj, const_char *part)
31 Eina_Bool elm_layout_file_set(Evas_Object *obj, const_char *file, const_char *group) 31 Eina_Bool elm_layout_file_set(Evas_Object *obj, const_char *file, const_char *group)
32 int elm_layout_freeze(Evas_Object *obj) 32 int elm_layout_freeze(Evas_Object *obj)
33 int elm_layout_thaw(Evas_Object *obj) 33 int elm_layout_thaw(Evas_Object *obj)
34 Eina_Bool elm_layout_theme_set(Evas_Object *obj, const_char *clas, const_char *group, const_char *style) 34 Eina_Bool elm_layout_theme_set(Evas_Object *obj, const_char *clas, const_char *group, const_char *style)
35 void elm_layout_signal_emit(Evas_Object *obj, const_char *emission, const_char *source) 35 void elm_layout_signal_emit(Evas_Object *obj, const_char *emission, const_char *source)
36 void elm_layout_signal_callback_add(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func, void *data) 36 void elm_layout_signal_callback_add(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func, void *data)
37 void * elm_layout_signal_callback_del(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func) 37 void * elm_layout_signal_callback_del(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func)
38 Eina_Bool elm_layout_box_append(Evas_Object *obj, const_char *part, Evas_Object *child) 38 Eina_Bool elm_layout_box_append(Evas_Object *obj, const_char *part, Evas_Object *child)
39 Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const_char *part, Evas_Object *child) 39 Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const_char *part, Evas_Object *child)
40 Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const_char *part, Evas_Object *child, Evas_Object *reference) 40 Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const_char *part, Evas_Object *child, Evas_Object *reference)
41 Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const_char *part, Evas_Object *child, unsigned int pos) 41 Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const_char *part, Evas_Object *child, unsigned int pos)
42 Evas_Object * elm_layout_box_remove(Evas_Object *obj, const_char *part, Evas_Object *child) 42 Evas_Object * elm_layout_box_remove(Evas_Object *obj, const_char *part, Evas_Object *child)
43 Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const_char *part, Eina_Bool clear) 43 Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const_char *part, Eina_Bool clear)
44 Eina_Bool elm_layout_table_pack(Evas_Object *obj, const_char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) 44 Eina_Bool elm_layout_table_pack(Evas_Object *obj, const_char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
45 Evas_Object * elm_layout_table_unpack(Evas_Object *obj, const_char *part, Evas_Object *child_obj) 45 Evas_Object * elm_layout_table_unpack(Evas_Object *obj, const_char *part, Evas_Object *child_obj)
46 Eina_Bool elm_layout_table_clear(Evas_Object *obj, const_char *part, Eina_Bool clear) 46 Eina_Bool elm_layout_table_clear(Evas_Object *obj, const_char *part, Eina_Bool clear)
47 Evas_Object * elm_layout_edje_get(Evas_Object *obj) 47 Evas_Object * elm_layout_edje_get(Evas_Object *obj)
48 const_char * elm_layout_data_get(Evas_Object *obj, const_char *key) 48 const_char * elm_layout_data_get(Evas_Object *obj, const_char *key)
49 void elm_layout_sizing_eval(Evas_Object *obj) 49 void elm_layout_sizing_eval(Evas_Object *obj)
50 Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const_char *part_name, const_char *cursor) 50 Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const_char *part_name, const_char *cursor)
51 const_char * elm_layout_part_cursor_get(Evas_Object *obj, const_char *part_name) 51 const_char * elm_layout_part_cursor_get(Evas_Object *obj, const_char *part_name)
52 Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const_char *part_name) 52 Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const_char *part_name)
53 Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const_char *part_name, const_char *style) 53 Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const_char *part_name, const_char *style)
54 const_char * elm_layout_part_cursor_style_get(Evas_Object *obj, const_char *part_name) 54 const_char * elm_layout_part_cursor_style_get(Evas_Object *obj, const_char *part_name)
55 Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const_char *part_name, Eina_Bool engine_only) 55 Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const_char *part_name, Eina_Bool engine_only)
56 Eina_Bool elm_layout_part_cursor_engine_only_get(Evas_Object *obj, const_char *part_name) 56 Eina_Bool elm_layout_part_cursor_engine_only_get(Evas_Object *obj, const_char *part_name)
57 Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access) 57 Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access)
58 Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj) 58 Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj)
59 59 Eina_List * elm_layout_content_swallow_list_get(const_Evas_Object *obj)
60 void elm_layout_icon_set(Evas_Object *obj, Evas_Object *icon) 60 void elm_layout_icon_set(Evas_Object *obj, Evas_Object *icon)
61 Evas_Object * elm_layout_icon_get(Evas_Object *obj) 61 Evas_Object * elm_layout_icon_get(Evas_Object *obj)
62 void elm_layout_end_set(Evas_Object *obj, Evas_Object *end) 62 void elm_layout_end_set(Evas_Object *obj, Evas_Object *end)
63 Evas_Object * elm_layout_end_get(Evas_Object *obj) 63 Evas_Object * elm_layout_end_get(Evas_Object *obj)
64 64
65cdef class LayoutClass(Object): 65cdef class LayoutClass(Object):
66 cdef object _elm_layout_signal_cbs 66 cdef object _elm_layout_signal_cbs
diff --git a/efl/elementary/layout_class.pyx b/efl/elementary/layout_class.pyx
index 78116cb..5655acc 100644
--- a/efl/elementary/layout_class.pyx
+++ b/efl/elementary/layout_class.pyx
@@ -20,7 +20,7 @@ from cpython cimport PyUnicode_AsUTF8String
20 20
21from efl.eo cimport object_from_instance 21from efl.eo cimport object_from_instance
22from efl.utils.conversions cimport _ctouni 22from efl.utils.conversions cimport _ctouni
23from efl.evas cimport Object as evasObject 23from efl.evas cimport Object as evasObject, eina_list_free
24from object cimport Object 24from object cimport Object
25 25
26import traceback 26import traceback
@@ -925,6 +925,28 @@ cdef class LayoutClass(Object):
925 def edje_object_can_access_get(self): 925 def edje_object_can_access_get(self):
926 return bool(elm_layout_edje_object_can_access_get(self.obj)) 926 return bool(elm_layout_edje_object_can_access_get(self.obj))
927 927
928 def content_swallow_list_get(self):
929 """content_swallow_list_get() -> list
930
931 Get the list of objects swallowed into the layout.
932
933 :return: a list of swallowed objects.
934 :rtype: list of objects.
935
936 .. versionadded:: 1.9
937
938 """
939 cdef:
940 Eina_List *l = elm_layout_content_swallow_list_get(self.obj)
941 list ret = list()
942
943 while l:
944 ret.append(object_from_instance(<Evas_Object*>l.data))
945 l = l.next
946 eina_list_free(l)
947
948 return ret
949
928 property icon: 950 property icon:
929 """The icon object in a layout that follows the Elementary naming 951 """The icon object in a layout that follows the Elementary naming
930 convention for its parts. 952 convention for its parts.