summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog74
-rw-r--r--TODO1
-rwxr-xr-xapi_coverage.py4
-rw-r--r--efl/__init__.py4
-rw-r--r--efl/ecore_x/efl.ecore_x.pyx5
-rw-r--r--efl/edje/efl.edje.pyx8
-rw-r--r--efl/elementary/slideshow.pxi108
-rw-r--r--efl/emotion/efl.emotion.pyx3
-rw-r--r--efl/ethumb/efl.ethumb.pyx3
-rw-r--r--efl/evas/efl.evas_object_textgrid.pxi74
-rwxr-xr-xexamples/dbus/test_dbus_spy.py59
-rw-r--r--examples/ecore/x/mplayer_embed.py7
-rw-r--r--examples/ecore/x/window_creation.py3
-rwxr-xr-xexamples/elementary/test.py2
-rw-r--r--examples/elementary/test_3d.py2
-rw-r--r--examples/elementary/test_access.py2
-rw-r--r--examples/elementary/test_actionslider.py2
-rw-r--r--examples/elementary/test_bg.py2
-rw-r--r--examples/elementary/test_box.py2
-rw-r--r--examples/elementary/test_bubble.py2
-rw-r--r--examples/elementary/test_button.py2
-rw-r--r--examples/elementary/test_calendar.py2
-rw-r--r--examples/elementary/test_check.py2
-rw-r--r--examples/elementary/test_clock.py2
-rw-r--r--examples/elementary/test_cnp.py2
-rw-r--r--examples/elementary/test_colorselector.py2
-rw-r--r--examples/elementary/test_config.py2
-rw-r--r--examples/elementary/test_conform.py2
-rw-r--r--examples/elementary/test_core_ecore_events_in_elm.py2
-rw-r--r--examples/elementary/test_core_evas_canvas_callbacks.py2
-rw-r--r--examples/elementary/test_core_evas_object_callbacks.py2
-rw-r--r--examples/elementary/test_core_evas_objects.py2
-rw-r--r--examples/elementary/test_core_evas_smart.py2
-rw-r--r--examples/elementary/test_ctxpopup.py2
-rw-r--r--examples/elementary/test_cursor.py2
-rw-r--r--examples/elementary/test_datetime.py2
-rw-r--r--examples/elementary/test_dayselector.py2
-rw-r--r--examples/elementary/test_diskselector.py2
-rw-r--r--examples/elementary/test_dnd.py2
-rw-r--r--examples/elementary/test_entry.py2
-rw-r--r--examples/elementary/test_evas_textgrid.py49
-rw-r--r--examples/elementary/test_external.py2
-rw-r--r--examples/elementary/test_fileselector.py2
-rw-r--r--examples/elementary/test_fileselector_button.py2
-rw-r--r--examples/elementary/test_fileselector_entry.py2
-rw-r--r--examples/elementary/test_flip.py2
-rw-r--r--examples/elementary/test_flipselector.py2
-rw-r--r--examples/elementary/test_floating.py2
-rw-r--r--examples/elementary/test_focus.py2
-rw-r--r--examples/elementary/test_frame.py2
-rw-r--r--examples/elementary/test_gengrid.py2
-rw-r--r--examples/elementary/test_genlist.py2
-rw-r--r--examples/elementary/test_gesture_layer.py2
-rw-r--r--examples/elementary/test_grid.py2
-rw-r--r--examples/elementary/test_hover.py2
-rw-r--r--examples/elementary/test_hoversel.py2
-rw-r--r--examples/elementary/test_icon.py2
-rw-r--r--examples/elementary/test_image.py2
-rw-r--r--examples/elementary/test_index.py2
-rw-r--r--examples/elementary/test_input_events.py2
-rw-r--r--examples/elementary/test_inwin.py2
-rw-r--r--examples/elementary/test_label.py2
-rw-r--r--examples/elementary/test_layout.py2
-rw-r--r--examples/elementary/test_list.py2
-rw-r--r--examples/elementary/test_main_menu.py2
-rw-r--r--examples/elementary/test_map.py2
-rw-r--r--examples/elementary/test_mapbuf.py2
-rw-r--r--examples/elementary/test_menu.py2
-rw-r--r--examples/elementary/test_multibuttonentry.py2
-rw-r--r--examples/elementary/test_naviframe.py2
-rw-r--r--examples/elementary/test_notify.py2
-rw-r--r--examples/elementary/test_panel.py2
-rw-r--r--examples/elementary/test_panel_scroll.py2
-rw-r--r--examples/elementary/test_panes.py2
-rw-r--r--examples/elementary/test_photo.py2
-rw-r--r--examples/elementary/test_photocam.py2
-rw-r--r--examples/elementary/test_popup.py2
-rw-r--r--examples/elementary/test_progressbar.py2
-rw-r--r--examples/elementary/test_radio.py2
-rw-r--r--examples/elementary/test_scroller.py2
-rw-r--r--examples/elementary/test_segment_control.py2
-rw-r--r--examples/elementary/test_separator.py2
-rw-r--r--examples/elementary/test_slider.py2
-rw-r--r--examples/elementary/test_slideshow.py47
-rw-r--r--examples/elementary/test_spinner.py2
-rw-r--r--examples/elementary/test_store.py2
-rw-r--r--examples/elementary/test_sys_notify.py2
-rw-r--r--examples/elementary/test_table.py2
-rw-r--r--examples/elementary/test_theme.py2
-rw-r--r--examples/elementary/test_thumb.py2
-rw-r--r--examples/elementary/test_toolbar.py5
-rw-r--r--examples/elementary/test_tooltip.py2
-rw-r--r--examples/elementary/test_transit.py2
-rw-r--r--examples/elementary/test_transit_bezier.py2
-rw-r--r--examples/elementary/test_video.py2
-rw-r--r--examples/elementary/test_web.py3
-rw-r--r--examples/elementary/test_win.py2
-rw-r--r--examples/elementary/test_win_dialog.py2
-rwxr-xr-xexamples/emotion/test_emotion.py10
-rw-r--r--tests/dbus/test_01_basics.py1
-rw-r--r--tests/ecore/test_01_timer.py3
-rw-r--r--tests/ecore/test_02_animator.py1
-rw-r--r--tests/ecore/test_03_poller.py3
-rw-r--r--tests/ecore/test_04_idler.py7
-rw-r--r--tests/ecore/test_05_idle_enterer.py1
-rw-r--r--tests/ecore/test_06_idle_exiter.py3
-rw-r--r--tests/ecore/test_07_fd_handler.py1
-rw-r--r--tests/ecore/test_08_exe.py2
-rw-r--r--tests/ecore/test_09_file_download.py5
-rw-r--r--tests/ecore/test_10_file_monitor.py1
-rw-r--r--tests/edje/TODO-edit/01-edje.py3
-rw-r--r--tests/edje/TODO-edit/02-group.py2
-rw-r--r--tests/edje/TODO-edit/03-parts.py2
-rw-r--r--tests/edje/TODO-edit/04-states.py2
-rw-r--r--tests/edje/test_01_basics.py1
-rw-r--r--tests/edje/test_02_object.py3
-rw-r--r--tests/edje/test_03_external.py6
-rw-r--r--tests/edje/test_04_edit.py6
-rw-r--r--tests/edje/test_05_decorators.py3
-rw-r--r--tests/elementary/test_01_basics.py2
-rw-r--r--tests/elementary/test_02_image_icon.py2
-rw-r--r--tests/elementary/test_03_entry.py2
-rw-r--r--tests/eo/test_01_basics.py1
-rw-r--r--tests/evas/test_01_rect.py1
-rw-r--r--tests/evas/test_02_canvas.py8
-rw-r--r--tests/evas/test_03_object.py1
-rw-r--r--tests/evas/test_04_object_box.py1
-rw-r--r--tests/evas/test_05_object_image.py1
-rw-r--r--tests/evas/test_06_object_smart.py1
-rw-r--r--tests/evas/test_07_object_line.py1
-rw-r--r--tests/evas/test_08_object_polygon.py1
-rw-r--r--tests/evas/test_09_object_text.py1
-rw-r--r--tests/evas/test_10_object_textblock.py1
-rw-r--r--tests/evas/test_11_object_textgrid.py1
134 files changed, 306 insertions, 404 deletions
diff --git a/ChangeLog b/ChangeLog
index 8328fbb..7e48b13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,74 @@
1===================
22015-08-03 v1.15.0
3===================
4
5Fixes:
6
7Improvements:
8
9Changes:
10
11Additions:
12
13Deprecation:
14
15
16===================
172015-05-07 v1.14.0
18===================
19
20Fixes:
21
22 * Fixed evas.Textgrid to not leak on cellrow_set()
23
24
25Improvements:
26
27 * Re-added evas.SmartObject (with incompatible API compared to the earlier
28 incarnation) and made elm.Object inherit from it.
29 * Better init/shutdown management in all modules, no more need to
30 manually call those functions (no harm in doing it though).
31
32
33Changes:
34
35 * elm.List.callback_highlighted_add: Added item param to func
36 * elm.List.callback_unhighlighted_add: Added item param to func
37 * elm.Toolbar.callback_clicked_add: Added item param to func
38 * elm.Toolbar.callback_longpressed_add: Added item param to func
39 * elm.Slideshow: item_data are now a single value, instead of args/kargs,
40 like is implemented in Gengrid/Genlist
41
42
43Additions:
44
45 * evas.Smart
46 * evas.Image.orient
47 * edje.Edje.text_class_get
48 * edje.text_class_get
49 * elm.systray
50 * elm.Configuration.window_auto_focus_animate
51 * elm.Configuration.window_auto_focus_enable
52 * elm.Image.memfile_set
53 * elm.MultiButtonEntry.callback_item_longpressed_add
54 * elm.MultiButtonEntry.callback_item_longpressed_del
55 * elm.NaviframeItem.pop_cb_set
56 * elm.Photocam.image_orient
57 * elm.Scrollable.loop
58 * elm.Slider.indicator_visible_mode
59 * elm.Transit.go_in
60 * elm.on_config_all_changed
61 * elm.on_ethumb_connect
62 * elm.on_policy_changed
63 * elm.on_process_background
64 * elm.LayoutClass.file is now also readable
65 * elm.Video.file is now also readable
66
67
68Deprecation:
69
70 * evas.Rect.intercepts: Use intersects() instead
71
1 72
2=================== 73===================
32015-02-09 v1.13.0 742015-02-09 v1.13.0
@@ -51,7 +122,8 @@ Deprecation:
51 122
52 * elm.Configuration.engine 123 * elm.Configuration.engine
53 * elm.Configuration.preferred_engine 124 * elm.Configuration.preferred_engine
54 125
126
55=================== 127===================
562014-11-23 v1.12.0 1282014-11-23 v1.12.0
57=================== 129===================
diff --git a/TODO b/TODO
index 799a0b4..516d3c5 100644
--- a/TODO
+++ b/TODO
@@ -43,4 +43,3 @@ Elm
43 - video 43 - video
44 - web 44 - web
45 - window ? 45 - window ?
46* How are the ecore events managed? for example: ELM_EVENT_PROCESS_FOREGROUND
diff --git a/api_coverage.py b/api_coverage.py
index e51624f..f08a783 100755
--- a/api_coverage.py
+++ b/api_coverage.py
@@ -55,8 +55,6 @@ params = {
55 "elementary": ("efl/elementary", "Elementary", "elm"), 55 "elementary": ("efl/elementary", "Elementary", "elm"),
56} 56}
57 57
58EFL_MIN_VERSION = "1.9.99"
59
60parser = argparse.ArgumentParser( 58parser = argparse.ArgumentParser(
61 description="Reports EFL vs. Python-EFL API functions coverage" 59 description="Reports EFL vs. Python-EFL API functions coverage"
62 ) 60 )
@@ -205,7 +203,7 @@ print("")
205 203
206for lib in args.libs: 204for lib in args.libs:
207 205
208 inc_paths = pkg_config(lib, EFL_MIN_VERSION) 206 inc_paths = pkg_config(lib)
209 inc_path = None 207 inc_path = None
210 for p in inc_paths: 208 for p in inc_paths:
211 if lib in p: 209 if lib in p:
diff --git a/efl/__init__.py b/efl/__init__.py
index 87a9116..480cbbe 100644
--- a/efl/__init__.py
+++ b/efl/__init__.py
@@ -20,5 +20,5 @@
20# pre-release: "1.13.0-beta1" ( 1, 13, 0 ) 20# pre-release: "1.13.0-beta1" ( 1, 13, 0 )
21# release: "1.13.0" ( 1, 13, 0 ) 21# release: "1.13.0" ( 1, 13, 0 )
22 22
23__version__ = "1.13.99" 23__version__ = "1.14.99"
24__version_info__ = ( 1, 13, 99 ) 24__version_info__ = ( 1, 14, 99 )
diff --git a/efl/ecore_x/efl.ecore_x.pyx b/efl/ecore_x/efl.ecore_x.pyx
index 4baf32b..cf0e90e 100644
--- a/efl/ecore_x/efl.ecore_x.pyx
+++ b/efl/ecore_x/efl.ecore_x.pyx
@@ -19,6 +19,8 @@
19from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String 19from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String
20from efl.utils.deprecated cimport DEPRECATED 20from efl.utils.deprecated cimport DEPRECATED
21 21
22import atexit
23
22 24
23def init(name=None): 25def init(name=None):
24 """Initialize the X display connection to the given display. 26 """Initialize the X display connection to the given display.
@@ -322,3 +324,6 @@ def cursor_free(Ecore_X_Cursor c):
322 324
323include "efl.ecore_x_window.pxi" 325include "efl.ecore_x_window.pxi"
324include "efl.ecore_x_events.pxi" 326include "efl.ecore_x_events.pxi"
327
328init()
329atexit.register(shutdown)
diff --git a/efl/edje/efl.edje.pyx b/efl/edje/efl.edje.pyx
index b9201c6..dad8ff4 100644
--- a/efl/edje/efl.edje.pyx
+++ b/efl/edje/efl.edje.pyx
@@ -30,10 +30,6 @@ Classes
30 30
31""" 31"""
32 32
33
34import traceback
35import warnings
36
37from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String 33from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String
38cimport libc.stdlib 34cimport libc.stdlib
39from libc.stdint cimport uintptr_t 35from libc.stdint cimport uintptr_t
@@ -45,6 +41,9 @@ from efl.eo cimport _object_mapping_register, object_from_instance, \
45from efl.utils.conversions cimport _ctouni, _touni, \ 41from efl.utils.conversions cimport _ctouni, _touni, \
46 eina_list_strings_to_python_list 42 eina_list_strings_to_python_list
47 43
44import traceback
45import warnings
46import atexit
48 47
49 48
50def init(): 49def init():
@@ -288,3 +287,4 @@ include "efl.edje_object.pxi"
288 287
289 288
290init() 289init()
290atexit.register(shutdown)
diff --git a/efl/elementary/slideshow.pxi b/efl/elementary/slideshow.pxi
index b94caab..65a7892 100644
--- a/efl/elementary/slideshow.pxi
+++ b/efl/elementary/slideshow.pxi
@@ -19,9 +19,10 @@
19include "slideshow_cdef.pxi" 19include "slideshow_cdef.pxi"
20 20
21cdef Evas_Object *_py_elm_slideshow_item_get(void *data, Evas_Object *obj) with gil: 21cdef Evas_Object *_py_elm_slideshow_item_get(void *data, Evas_Object *obj) with gil:
22 cdef SlideshowItem item = <object>data 22 cdef:
23 cdef evasObject icon 23 SlideshowItem item = <SlideshowItem>data
24 cdef SlideshowItemClass itc = item.cls 24 SlideshowItemClass itc = item.item_class
25 evasObject icon
25 26
26 func = itc._get_func 27 func = itc._get_func
27 if func is None: 28 if func is None:
@@ -29,37 +30,39 @@ cdef Evas_Object *_py_elm_slideshow_item_get(void *data, Evas_Object *obj) with
29 30
30 try: 31 try:
31 o = object_from_instance(obj) 32 o = object_from_instance(obj)
32 ret = func(o, *item.args, **item.kwargs) 33 icon = func(o, item.item_data)
33 except Exception: 34 except Exception:
34 traceback.print_exc() 35 traceback.print_exc()
35 return NULL 36 return NULL
36 37
37 if ret is None: 38 if icon is not None:
39 return icon.obj
40 else:
38 return NULL 41 return NULL
39 42
40 icon = ret
41 return icon.obj
42 43
43cdef void _py_elm_slideshow_item_del(void *data, Evas_Object *obj) with gil: 44cdef void _py_elm_slideshow_item_del(void *data, Evas_Object *obj) with gil:
44 cdef SlideshowItem item = <object>data 45 cdef:
45 cdef SlideshowItemClass itc = item.cls 46 SlideshowItem item = <SlideshowItem>data
47 SlideshowItemClass itc = item.item_class
46 48
47 func = itc._del_func 49 func = itc._del_func
48 if func is not None: 50 if func is not None:
49 try: 51 try:
50 o = object_from_instance(obj) 52 o = object_from_instance(obj)
51 func(o, *item.args, **item.kwargs) 53 func(o, item.item_data)
52 except Exception: 54 except Exception:
53 traceback.print_exc() 55 traceback.print_exc()
54 56
55 # XXX: SlideShow item handling is weird 57 # XXX: SlideShow item handling is weird
56 #item._unset_obj() 58 # item._unset_obj()
57 #Py_DECREF(item) 59 #Py_DECREF(item)
58 60
59cdef int _py_elm_slideshow_compare_func(const void *data1, const void *data2) with gil: 61cdef int _py_elm_slideshow_compare_func(const void *data1, const void *data2) with gil:
60 cdef SlideshowItem item1 = <object>data1 62 cdef:
61 cdef SlideshowItem item2 = <object>data2 63 SlideshowItem item1 = <SlideshowItem>data1
62 cdef object func = item1.compare_func 64 SlideshowItem item2 = <SlideshowItem>data2
65 object func = item1.compare_func
63 66
64 if func is None: 67 if func is None:
65 return 0 68 return 0
@@ -101,17 +104,17 @@ cdef class SlideshowItemClass (object):
101 ``func(obj, item_data)`` 104 ``func(obj, item_data)``
102 105
103 .. note:: In all these signatures, 'obj' means Slideshow and 106 .. note:: In all these signatures, 'obj' means Slideshow and
104 'item_data' is the value given to Slideshow item append/prepend 107 'item_data' is the value given to Slideshow item add/sorted_insert
105 methods, it should represent your item model as you want. 108 methods, it should represent your item model as you want.
106 109
107 """ 110 """
108 cdef Elm_Slideshow_Item_Class obj 111 cdef Elm_Slideshow_Item_Class cls
109 cdef readonly object _get_func 112 cdef readonly object _get_func
110 cdef readonly object _del_func 113 cdef readonly object _del_func
111 114
112 def __cinit__(self, *a, **ka): 115 def __cinit__(self):
113 self.obj.func.get = _py_elm_slideshow_item_get 116 self.cls.func.get = _py_elm_slideshow_item_get
114 self.obj.func.del_ = _py_elm_slideshow_item_del 117 self.cls.func.del_ = _py_elm_slideshow_item_del
115 118
116 def __init__(self, get_func=None, del_func=None): 119 def __init__(self, get_func=None, del_func=None):
117 if get_func and not callable(get_func): 120 if get_func and not callable(get_func):
@@ -137,7 +140,7 @@ cdef class SlideshowItemClass (object):
137 (type(self).__name__, 140 (type(self).__name__,
138 <uintptr_t><void *>self, 141 <uintptr_t><void *>self,
139 PY_REFCOUNT(self), 142 PY_REFCOUNT(self),
140 <uintptr_t>&self.obj, 143 <uintptr_t>&self.cls,
141 self._get_func, 144 self._get_func,
142 self._del_func) 145 self._del_func)
143 146
@@ -145,7 +148,7 @@ cdef class SlideshowItemClass (object):
145 """To be called by Slideshow for each item to get its icon. 148 """To be called by Slideshow for each item to get its icon.
146 149
147 :param obj: the Slideshow instance 150 :param obj: the Slideshow instance
148 :param item_data: the value given to slideshow append/prepend. 151 :param item_data: the value given to slideshow item_add func.
149 152
150 :return: icon object to be used and swallowed. 153 :return: icon object to be used and swallowed.
151 :rtype: evas Object or None 154 :rtype: evas Object or None
@@ -160,8 +163,8 @@ cdef class SlideshowItem(ObjectItem):
160 """ 163 """
161 164
162 cdef: 165 cdef:
163 SlideshowItemClass cls 166 readonly SlideshowItemClass item_class
164 object compare_func 167 object item_data, compare_func
165 168
166 cdef int _set_obj(self, Elm_Object_Item *item) except 0: 169 cdef int _set_obj(self, Elm_Object_Item *item) except 0:
167 assert self.item == NULL, "Object must be clean" 170 assert self.item == NULL, "Object must be clean"
@@ -173,8 +176,10 @@ cdef class SlideshowItem(ObjectItem):
173 assert self.item != NULL, "Object must wrap something" 176 assert self.item != NULL, "Object must wrap something"
174 self.item = NULL 177 self.item = NULL
175 178
176 def __init__(self, SlideshowItemClass item_class not None, *args, **kwargs): 179 def __init__(self, SlideshowItemClass item_class not None,
177 self.cls = item_class 180 item_data=None, *args, **kwargs):
181 self.item_class = item_class
182 self.item_data = item_data
178 self.args = args 183 self.args = args
179 self.kwargs = kwargs 184 self.kwargs = kwargs
180 185
@@ -184,9 +189,25 @@ cdef class SlideshowItem(ObjectItem):
184 (type(self).__name__, 189 (type(self).__name__,
185 <uintptr_t><void*>self, 190 <uintptr_t><void*>self,
186 PY_REFCOUNT(self), 191 PY_REFCOUNT(self),
187 <uintptr_t>self.obj, 192 <uintptr_t>self.item,
188 type(self.cls).__name__, 193 type(self.item_class).__name__,
189 self.args) 194 self.item_data)
195
196 property data:
197 """ The data (model) associated with this item.
198
199 This is the data that has been passed to the add/sorted_insert
200 functions, and the same that you get in the ItemClass get and delete
201 functions.
202
203 .. versionadded:: 1.14
204
205 """
206 def __get__(self):
207 return self.item_data
208
209 def data_get(self):
210 return self.item_data
190 211
191 def add_to(self, Slideshow slideshow not None): 212 def add_to(self, Slideshow slideshow not None):
192 """Add (append) a new item in a given slideshow widget. 213 """Add (append) a new item in a given slideshow widget.
@@ -212,7 +233,8 @@ cdef class SlideshowItem(ObjectItem):
212 """ 233 """
213 cdef Elm_Object_Item *item 234 cdef Elm_Object_Item *item
214 235
215 item = elm_slideshow_item_add(slideshow.obj, &self.cls.obj, <void*>self) 236 item = elm_slideshow_item_add(slideshow.obj, &self.item_class.cls,
237 <void*>self)
216 238
217 if item == NULL: 239 if item == NULL:
218 raise RuntimeError("The item could not be added to the widget.") 240 raise RuntimeError("The item could not be added to the widget.")
@@ -256,8 +278,8 @@ cdef class SlideshowItem(ObjectItem):
256 self.compare_func = func 278 self.compare_func = func
257 compare = _py_elm_slideshow_compare_func 279 compare = _py_elm_slideshow_compare_func
258 280
259 item = elm_slideshow_item_sorted_insert(slideshow.obj, &self.cls.obj, \ 281 item = elm_slideshow_item_sorted_insert(slideshow.obj,
260 <void*>self, compare) 282 &self.item_class.cls, <void*>self, compare)
261 283
262 if item == NULL: 284 if item == NULL:
263 raise RuntimeError("The item could not be added to the widget.") 285 raise RuntimeError("The item could not be added to the widget.")
@@ -316,7 +338,7 @@ cdef class Slideshow(LayoutClass):
316 self._set_obj(elm_slideshow_add(parent.obj)) 338 self._set_obj(elm_slideshow_add(parent.obj))
317 self._set_properties_from_keyword_args(kwargs) 339 self._set_properties_from_keyword_args(kwargs)
318 340
319 def item_add(self, SlideshowItemClass item_class not None, *args, **kwargs): 341 def item_add(self, SlideshowItemClass item_class not None, item_data):
320 """Add (append) a new item in a given slideshow widget. 342 """Add (append) a new item in a given slideshow widget.
321 343
322 Add a new item to ``obj's`` internal list of items, appending it. 344 Add a new item to ``obj's`` internal list of items, appending it.
@@ -334,14 +356,19 @@ cdef class Slideshow(LayoutClass):
334 :param item_class: The item class for the item 356 :param item_class: The item class for the item
335 :type item_class: :py:class:`SlideshowItemClass` 357 :type item_class: :py:class:`SlideshowItemClass`
336 358
359 :param item_data: The data (model) associated with this item
360
337 :return: A handle to the item added or ``None``, on errors 361 :return: A handle to the item added or ``None``, on errors
338 :rtype: :py:class:`SlideshowItem` 362 :rtype: :py:class:`SlideshowItem`
339 363
364 .. versionchanged:: 1.14
365 use item_data param instead or args/kargs
366
340 """ 367 """
341 return SlideshowItem(item_class, *args, **kwargs).add_to(self) 368 return SlideshowItem(item_class, item_data).add_to(self)
342 369
343 def item_sorted_insert(self, SlideshowItemClass item_class not None, 370 def item_sorted_insert(self, SlideshowItemClass item_class not None,
344 func not None, *args, **kwargs): 371 func not None, item_data):
345 """Insert a new item into the given slideshow widget, using the ``func`` 372 """Insert a new item into the given slideshow widget, using the ``func``
346 function to sort items (by item handles). 373 function to sort items (by item handles).
347 374
@@ -363,11 +390,18 @@ cdef class Slideshow(LayoutClass):
363 :param itc: The item class for the item 390 :param itc: The item class for the item
364 :param func: The comparing function to be used to sort slideshow 391 :param func: The comparing function to be used to sort slideshow
365 items **by SlideshowItemClass item handles** 392 items **by SlideshowItemClass item handles**
366 :return: Returns The slideshow item handle, on success, or 393
367 ``None``, on errors 394 :param item_data: The data (model) associated with this item
395
396 :return: A handle to the item added or ``None``, on errors
397 :rtype: :py:class:`SlideshowItem`
398
399 .. versionchanged:: 1.14
400 use item_data param instead or args/kargs
401
368 402
369 """ 403 """
370 return SlideshowItem(item_class, *args, **kwargs).sorted_insert(self, func) 404 return SlideshowItem(item_class, item_data).sorted_insert(self, func)
371 405
372 def next(self): 406 def next(self):
373 """Slide to the **next** item, in a given slideshow widget 407 """Slide to the **next** item, in a given slideshow widget
diff --git a/efl/emotion/efl.emotion.pyx b/efl/emotion/efl.emotion.pyx
index 809d250..ffe1318 100644
--- a/efl/emotion/efl.emotion.pyx
+++ b/efl/emotion/efl.emotion.pyx
@@ -41,6 +41,8 @@ from efl.utils.conversions cimport _ctouni
41from efl.evas cimport Canvas, evas_object_smart_callback_add, \ 41from efl.evas cimport Canvas, evas_object_smart_callback_add, \
42 evas_object_smart_callback_del 42 evas_object_smart_callback_del
43 43
44import atexit
45
44 46
45cdef void _emotion_callback(void *data, Evas_Object *o, void *ei) with gil: 47cdef void _emotion_callback(void *data, Evas_Object *o, void *ei) with gil:
46 cdef Emotion obj 48 cdef Emotion obj
@@ -1285,3 +1287,4 @@ _object_mapping_register("Emotion_Object", Emotion)
1285 1287
1286 1288
1287init() 1289init()
1290atexit.register(shutdown)
diff --git a/efl/ethumb/efl.ethumb.pyx b/efl/ethumb/efl.ethumb.pyx
index 9f6f831..573f811 100644
--- a/efl/ethumb/efl.ethumb.pyx
+++ b/efl/ethumb/efl.ethumb.pyx
@@ -15,6 +15,8 @@
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
18import atexit
19
18def init(): 20def init():
19 return ethumb_init() 21 return ethumb_init()
20 22
@@ -28,3 +30,4 @@ cdef class PyEthumb:
28 30
29 31
30init() 32init()
33atexit.register(shutdown)
diff --git a/efl/evas/efl.evas_object_textgrid.pxi b/efl/evas/efl.evas_object_textgrid.pxi
index 9b93cc4..68e579d 100644
--- a/efl/evas/efl.evas_object_textgrid.pxi
+++ b/efl/evas/efl.evas_object_textgrid.pxi
@@ -42,6 +42,14 @@ cdef class TextgridCell(object):
42 self.fg_extended, self.bg_extended, 42 self.fg_extended, self.bg_extended,
43 self.double_width) 43 self.double_width)
44 44
45 @staticmethod
46 cdef TextgridCell create(Evas_Textgrid_Cell *cell):
47 if cell == NULL:
48 raise ValueError("Invalid pointer for evas textgrid cell!")
49 cdef TextgridCell ret = TextgridCell.__new__(TextgridCell)
50 ret.cell = cell
51 return ret
52
45 property codepoint: 53 property codepoint:
46 """the UNICODE value of the character 54 """the UNICODE value of the character
47 55
@@ -167,6 +175,35 @@ cdef class TextgridCell(object):
167 def __get__(self): 175 def __get__(self):
168 return <bint>self.cell.double_width 176 return <bint>self.cell.double_width
169 177
178
179cdef class TextgridCellRow:
180
181 cdef:
182 Evas_Textgrid_Cell *row
183 unsigned int rowsize
184
185 @staticmethod
186 cdef TextgridCellRow create(Evas_Textgrid_Cell *row, unsigned int rowsize):
187 if row == NULL:
188 raise ValueError("Invalid pointer for evas textgrid cell row!")
189 cdef TextgridCellRow ret = TextgridCellRow.__new__(TextgridCellRow)
190 ret.row = row
191 ret.rowsize = rowsize
192 return ret
193
194 def __len__(self):
195 return self.rowsize
196
197 def __getitem__(self, x):
198 if x > self.rowsize - 1:
199 raise IndexError
200 if x < 0:
201 x = self.rowsize - x
202 if x < 0:
203 raise IndexError
204 return TextgridCell.create(&self.row[x])
205
206
170cdef class Textgrid(Object): 207cdef class Textgrid(Object):
171 """ 208 """
172 209
@@ -343,13 +380,13 @@ cdef class Textgrid(Object):
343 def __get__(self): 380 def __get__(self):
344 return evas_object_textgrid_supported_font_styles_get(self.obj) 381 return evas_object_textgrid_supported_font_styles_get(self.obj)
345 382
346 def cellrow_set(self, int y, list row not None): 383 def cellrow_set(self, int y, TextgridCellRow row not None):
347 """Set the string at the given row. 384 """Set the string at the given row.
348 385
349 :param y: The row index of the grid. 386 :param y: The row index of the grid.
350 :type y: int 387 :type y: int
351 :param row: The string as a sequence of :class:`TextgridCell`. 388 :param row: The string as a sequence of :class:`TextgridCell`.
352 :type row: list 389 :type row: :class:`TextgridCellRow`
353 390
354 This method allows returning cells to the textgrid, retrieved with 391 This method allows returning cells to the textgrid, retrieved with
355 :py:meth:`cellrow_get`. 392 :py:meth:`cellrow_get`.
@@ -361,26 +398,14 @@ cdef class Textgrid(Object):
361 :py:meth:`update_add` 398 :py:meth:`update_add`
362 399
363 """ 400 """
364 cdef: 401 evas_object_textgrid_cellrow_set(self.obj, y, row.row)
365 TextgridCell cell
366 Evas_Textgrid_Cell **crow
367 int rlen = len(row)
368 int i
369
370 crow = <Evas_Textgrid_Cell **>malloc(rlen * sizeof(Evas_Textgrid_Cell *))
371
372 for i in range(rlen):
373 cell = row[i]
374 crow[i] = cell.cell
375
376 evas_object_textgrid_cellrow_set(self.obj, y, crow[0])
377 402
378 def cellrow_get(self, int y): 403 def cellrow_get(self, int y):
379 """Get the string at the given row. 404 """Get the string at the given row.
380 405
381 :param int y: The row index of the grid. 406 :param int y: The row index of the grid.
382 :return: A list of :class:`TextgridCell` 407 :return: A list of :class:`TextgridCell`
383 :rtype: list 408 :rtype: :class:`TextgridCellRow`
384 409
385 This method returns a list of cells in the line **y** of 410 This method returns a list of cells in the line **y** of
386 the textgrid object. If **y** is not between 0 and the number 411 the textgrid object. If **y** is not between 0 and the number
@@ -393,21 +418,8 @@ cdef class Textgrid(Object):
393 :py:meth:`update_add` 418 :py:meth:`update_add`
394 419
395 """ 420 """
396 cdef: 421 return TextgridCellRow.create(
397 Evas_Textgrid_Cell *row = evas_object_textgrid_cellrow_get(self.obj, y) 422 evas_object_textgrid_cellrow_get(self.obj, y), self.size[0])
398 int i
399 list ret = []
400 TextgridCell cell
401
402 if row == NULL:
403 return None
404
405 for i in range(self.size[0]):
406 cell = TextgridCell.__new__(TextgridCell)
407 cell.cell = &row[i]
408 ret.append(cell)
409
410 return ret
411 423
412 def update_add(self, int x, int y, int w, int h): 424 def update_add(self, int x, int y, int w, int h):
413 """Indicate for evas that part of a textgrid region (cells) has been updated. 425 """Indicate for evas that part of a textgrid region (cells) has been updated.
diff --git a/examples/dbus/test_dbus_spy.py b/examples/dbus/test_dbus_spy.py
index 65b8fb8..f89b7b8 100755
--- a/examples/dbus/test_dbus_spy.py
+++ b/examples/dbus/test_dbus_spy.py
@@ -20,7 +20,9 @@ from efl.elementary.label import Label
20from efl.elementary.panes import Panes 20from efl.elementary.panes import Panes
21from efl.elementary.popup import Popup 21from efl.elementary.popup import Popup
22from efl.elementary.separator import Separator 22from efl.elementary.separator import Separator
23from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass 23from efl.elementary.genlist import Genlist, GenlistItemClass, \
24 ELM_GENLIST_ITEM_GROUP, ELM_GENLIST_ITEM_TREE, \
25 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
24from efl.dbus_mainloop import DBusEcoreMainLoop 26from efl.dbus_mainloop import DBusEcoreMainLoop
25 27
26 28
@@ -48,7 +50,7 @@ class DBusNode(object):
48 @property 50 @property
49 def name(self): 51 def name(self):
50 return self._name 52 return self._name
51 53
52 @property 54 @property
53 def parent(self): 55 def parent(self):
54 return self._parent 56 return self._parent
@@ -72,17 +74,17 @@ class DBusInterface(DBusNode):
72 self._properties = [] 74 self._properties = []
73 self._methods = [] 75 self._methods = []
74 self._signals = [] 76 self._signals = []
75 77
76 parent_obj.interfaces.append(self) 78 parent_obj.interfaces.append(self)
77 79
78 @property 80 @property
79 def properties(self): 81 def properties(self):
80 return self._properties 82 return self._properties
81 83
82 @property 84 @property
83 def methods(self): 85 def methods(self):
84 return self._methods 86 return self._methods
85 87
86 @property 88 @property
87 def signals(self): 89 def signals(self):
88 return self._signals 90 return self._signals
@@ -184,7 +186,7 @@ def recursive_introspect(bus, named_service, object_path, ret_data=None):
184 # found a new object 186 # found a new object
185 obj = DBusObject(object_path, named_service) 187 obj = DBusObject(object_path, named_service)
186 ret_data.append(obj) 188 ret_data.append(obj)
187 189
188 for xml_node in xml_root: 190 for xml_node in xml_root:
189 # found an interface 191 # found an interface
190 if xml_node.tag == 'interface': 192 if xml_node.tag == 'interface':
@@ -253,12 +255,12 @@ class NamesList(Genlist):
253 255
254 # add private & public group items 256 # add private & public group items
255 self.public_group = self.item_append(self.itc_g, "Public Services", 257 self.public_group = self.item_append(self.itc_g, "Public Services",
256 flags=elm.ELM_GENLIST_ITEM_GROUP) 258 flags=ELM_GENLIST_ITEM_GROUP)
257 self.public_group.select_mode_set(elm.ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 259 self.public_group.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
258 260
259 self.private_group = self.item_append(self.itc_g, "Private Services", 261 self.private_group = self.item_append(self.itc_g, "Private Services",
260 flags=elm.ELM_GENLIST_ITEM_GROUP) 262 flags=ELM_GENLIST_ITEM_GROUP)
261 self.private_group.select_mode_set(elm.ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 263 self.private_group.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
262 264
263 # populate the genlist 265 # populate the genlist
264 self.populate() 266 self.populate()
@@ -269,11 +271,11 @@ class NamesList(Genlist):
269 271
270 # keep the list updated when a name changes 272 # keep the list updated when a name changes
271 if self.sig1: self.sig1.remove() 273 if self.sig1: self.sig1.remove()
272 self.sig1 = bus.add_signal_receiver(self.name_owner_changed_cb, 274 self.sig1 = bus.add_signal_receiver(self.name_owner_changed_cb,
273 "NameOwnerChanged") 275 "NameOwnerChanged")
274 # bus.add_signal_receiver(self.name_acquired_cb, "NameAcquired") 276 # bus.add_signal_receiver(self.name_acquired_cb, "NameAcquired")
275 # bus.add_signal_receiver(self.name_lost_cb, "NameLost") 277 # bus.add_signal_receiver(self.name_lost_cb, "NameLost")
276 278
277 def clear(self): 279 def clear(self):
278 self.public_group.subitems_clear() 280 self.public_group.subitems_clear()
279 self.private_group.subitems_clear() 281 self.private_group.subitems_clear()
@@ -281,10 +283,10 @@ class NamesList(Genlist):
281 def item_selected_cb(self, gl, item): 283 def item_selected_cb(self, gl, item):
282 name = item.data 284 name = item.data
283 self.win.detail_list.populate(name) 285 self.win.detail_list.populate(name)
284 286
285 def sort_cb(self, it1, it2): 287 def sort_cb(self, it1, it2):
286 return 1 if it1.data.lower() < it2.data.lower() else -1 288 return 1 if it1.data.lower() < it2.data.lower() else -1
287 289
288 290
289 def service_add(self, name): 291 def service_add(self, name):
290 print("service_add('%s')" % name) 292 print("service_add('%s')" % name)
@@ -302,7 +304,7 @@ class NamesList(Genlist):
302 item.delete() 304 item.delete()
303 return 305 return
304 item = item.next 306 item = item.next
305 307
306 def name_owner_changed_cb(self, name, old_owner, new_owner): 308 def name_owner_changed_cb(self, name, old_owner, new_owner):
307 print("NameOwnerChanged(name='%s', old_owner='%s', new_owner='%s')" % 309 print("NameOwnerChanged(name='%s', old_owner='%s', new_owner='%s')" %
308 (name, old_owner, new_owner)) 310 (name, old_owner, new_owner))
@@ -352,8 +354,8 @@ class DetailList(Genlist):
352 self.callback_contract_request_add(self.contract_request_cb) 354 self.callback_contract_request_add(self.contract_request_cb)
353 self.callback_contracted_add(self.contracted_cb) 355 self.callback_contracted_add(self.contracted_cb)
354 self.callback_clicked_double_add(self.double_click_cb) 356 self.callback_clicked_double_add(self.double_click_cb)
355 357
356 358
357 def populate(self, name): 359 def populate(self, name):
358 print("populate: %s" % name) 360 print("populate: %s" % name)
359 self.clear() 361 self.clear()
@@ -361,9 +363,9 @@ class DetailList(Genlist):
361 # objects 363 # objects
362 for obj in recursive_introspect(bus, name, '/'): 364 for obj in recursive_introspect(bus, name, '/'):
363 obj_item = self.item_append(self.itc_g, obj, 365 obj_item = self.item_append(self.itc_g, obj,
364 flags=elm.ELM_GENLIST_ITEM_GROUP) 366 flags=ELM_GENLIST_ITEM_GROUP)
365 obj_item.select_mode_set(elm.ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 367 obj_item.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
366 368
367 # interfaces 369 # interfaces
368 for iface in obj.interfaces: 370 for iface in obj.interfaces:
369 if options.hide_introspect_stuff and \ 371 if options.hide_introspect_stuff and \
@@ -371,7 +373,7 @@ class DetailList(Genlist):
371 continue 373 continue
372 iface_item = self.item_append(self.itc, iface, 374 iface_item = self.item_append(self.itc, iface,
373 parent_item=obj_item, 375 parent_item=obj_item,
374 flags=elm.ELM_GENLIST_ITEM_TREE) 376 flags=ELM_GENLIST_ITEM_TREE)
375 377
376 def sort_cb(self, it1, it2): 378 def sort_cb(self, it1, it2):
377 pri1 = pri2 = 0 379 pri1 = pri2 = 0
@@ -392,7 +394,7 @@ class DetailList(Genlist):
392 iface = item.data 394 iface = item.data
393 for obj in iface.properties + iface.methods + iface.signals: 395 for obj in iface.properties + iface.methods + iface.signals:
394 self.item_sorted_insert(self.itc, obj, self.sort_cb, parent_item=item) 396 self.item_sorted_insert(self.itc, obj, self.sort_cb, parent_item=item)
395 397
396 def contract_request_cb(self, genlist, item): 398 def contract_request_cb(self, genlist, item):
397 item.expanded = False 399 item.expanded = False
398 400
@@ -447,7 +449,7 @@ class MethodRunner(Popup):
447 sp.horizontal = True 449 sp.horizontal = True
448 sp.show() 450 sp.show()
449 vbox.pack_end(sp) 451 vbox.pack_end(sp)
450 452
451 # returns label + entry 453 # returns label + entry
452 label = Label(parent) 454 label = Label(parent)
453 label.size_hint_align = 0.0, 0.5 455 label.size_hint_align = 0.0, 0.5
@@ -558,13 +560,13 @@ class MyWin(StandardWindow):
558 self.resize_object_add(box) 560 self.resize_object_add(box)
559 box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) 561 box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
560 box.show() 562 box.show()
561 563
562 flip = FlipSelector(self) 564 flip = FlipSelector(self)
563 flip.item_append("Session Bus", self.flip_selected_cb, session_bus) 565 flip.item_append("Session Bus", self.flip_selected_cb, session_bus)
564 flip.item_append("System Bus", self.flip_selected_cb, system_bus) 566 flip.item_append("System Bus", self.flip_selected_cb, system_bus)
565 box.pack_end(flip) 567 box.pack_end(flip)
566 flip.show() 568 flip.show()
567 569
568 panes = Panes(self) 570 panes = Panes(self)
569 panes.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) 571 panes.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
570 panes.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) 572 panes.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -594,8 +596,5 @@ class MyWin(StandardWindow):
594 596
595 597
596if __name__ == "__main__": 598if __name__ == "__main__":
597 elm.init()
598 win = MyWin() 599 win = MyWin()
599 elm.run() 600 elm.run()
600 elm.shutdown()
601
diff --git a/examples/ecore/x/mplayer_embed.py b/examples/ecore/x/mplayer_embed.py
index 079ded0..6586ad1 100644
--- a/examples/ecore/x/mplayer_embed.py
+++ b/examples/ecore/x/mplayer_embed.py
@@ -2,14 +2,13 @@
2 2
3import sys 3import sys
4import efl.ecore 4import efl.ecore
5from efl.ecore.x import init, Window, on_window_configure_add 5from efl.ecore_x import Window, on_window_configure_add
6from subprocess import Popen, PIPE 6from subprocess import Popen, PIPE
7 7
8init()
9 8
10try: 9try:
11 filename = sys.argv[1] 10 filename = sys.argv[1]
12except IndexError, e: 11except IndexError:
13 raise SystemExit("Usage: %s <filename>" % sys.argv[0]) 12 raise SystemExit("Usage: %s <filename>" % sys.argv[0])
14 13
15main_window = Window(w=800, h=600) 14main_window = Window(w=800, h=600)
@@ -40,5 +39,5 @@ def on_configure(event, main_window, sub_window):
40on_window_configure_add(on_configure, main_window, sub_window) 39on_window_configure_add(on_configure, main_window, sub_window)
41 40
42efl.ecore.fd_handler_add( 41efl.ecore.fd_handler_add(
43 p.stdout, efl.ecore.ECORE_FD_ALL, handle_read, p.stdout) 42 p.stdout, efl.ecore_x.ECORE_FD_ALL, handle_read, p.stdout)
44efl.ecore.main_loop_begin() 43efl.ecore.main_loop_begin()
diff --git a/examples/ecore/x/window_creation.py b/examples/ecore/x/window_creation.py
index 61c455a..5dc2268 100644
--- a/examples/ecore/x/window_creation.py
+++ b/examples/ecore/x/window_creation.py
@@ -1,9 +1,8 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3import efl.ecore 3import efl.ecore
4from efl.ecore.x import init, Window, on_window_configure_add 4from efl.ecore_x import Window, on_window_configure_add
5 5
6init()
7 6
8# method 1 7# method 1
9main_window = Window(w=800, h=600) 8main_window = Window(w=800, h=600)
diff --git a/examples/elementary/test.py b/examples/elementary/test.py
index e306cc0..0878178 100755
--- a/examples/elementary/test.py
+++ b/examples/elementary/test.py
@@ -309,7 +309,6 @@ def cb_filter(en, win):
309 menu_create(en.text_get(), win) 309 menu_create(en.text_get(), win)
310 310
311if __name__ == "__main__": 311if __name__ == "__main__":
312 elementary.init()
313 win = StandardWindow("test", "Python EFL test application") 312 win = StandardWindow("test", "Python EFL test application")
314 win.callback_delete_request_add(destroy, "test1", "test2", 313 win.callback_delete_request_add(destroy, "test1", "test2",
315 str3="test3", str4="test4") 314 str3="test3", str4="test4")
@@ -364,4 +363,3 @@ if __name__ == "__main__":
364 win.resize(480, 480) 363 win.resize(480, 480)
365 win.show() 364 win.show()
366 elementary.run() 365 elementary.run()
367 elementary.shutdown()
diff --git a/examples/elementary/test_3d.py b/examples/elementary/test_3d.py
index 2e7b303..1ab4b34 100644
--- a/examples/elementary/test_3d.py
+++ b/examples/elementary/test_3d.py
@@ -224,10 +224,8 @@ def evas3d_clicked(obj, item=None):
224 224
225 225
226if __name__ == "__main__": 226if __name__ == "__main__":
227 elementary.init()
228 227
229 evas3d_clicked(None) 228 evas3d_clicked(None)
230 229
231 elementary.run() 230 elementary.run()
232 elementary.shutdown()
233 231
diff --git a/examples/elementary/test_access.py b/examples/elementary/test_access.py
index 88b3e90..b514972 100644
--- a/examples/elementary/test_access.py
+++ b/examples/elementary/test_access.py
@@ -284,7 +284,6 @@ def access_clicked(obj, item=None):
284# evas_object_show(win) 284# evas_object_show(win)
285 285
286if __name__ == "__main__": 286if __name__ == "__main__":
287 elementary.init()
288 win = StandardWindow("test", "python-elementary test application", 287 win = StandardWindow("test", "python-elementary test application",
289 size=(320,520)) 288 size=(320,520))
290 win.callback_delete_request_add(lambda o: elementary.exit()) 289 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -320,4 +319,3 @@ if __name__ == "__main__":
320 319
321 win.show() 320 win.show()
322 elementary.run() 321 elementary.run()
323 elementary.shutdown()
diff --git a/examples/elementary/test_actionslider.py b/examples/elementary/test_actionslider.py
index 5a9a0cf..e43fb69 100644
--- a/examples/elementary/test_actionslider.py
+++ b/examples/elementary/test_actionslider.py
@@ -143,9 +143,7 @@ def actionslider_clicked(obj):
143 win.show() 143 win.show()
144 144
145if __name__ == "__main__": 145if __name__ == "__main__":
146 elementary.init()
147 146
148 actionslider_clicked(None) 147 actionslider_clicked(None)
149 148
150 elementary.run() 149 elementary.run()
151 elementary.shutdown()
diff --git a/examples/elementary/test_bg.py b/examples/elementary/test_bg.py
index 35e5962..a593420 100644
--- a/examples/elementary/test_bg.py
+++ b/examples/elementary/test_bg.py
@@ -44,7 +44,6 @@ def bg_image_clicked(obj, item=None):
44 44
45 45
46if __name__ == "__main__": 46if __name__ == "__main__":
47 elementary.init()
48 win = StandardWindow("test", "python-elementary test application", size=(320,520)) 47 win = StandardWindow("test", "python-elementary test application", size=(320,520))
49 win.callback_delete_request_add(lambda x: elementary.exit()) 48 win.callback_delete_request_add(lambda x: elementary.exit())
50 49
@@ -76,5 +75,4 @@ if __name__ == "__main__":
76 75
77 win.show() 76 win.show()
78 elementary.run() 77 elementary.run()
79 elementary.shutdown()
80 78
diff --git a/examples/elementary/test_box.py b/examples/elementary/test_box.py
index dfc9048..14d4cd2 100644
--- a/examples/elementary/test_box.py
+++ b/examples/elementary/test_box.py
@@ -167,7 +167,6 @@ def box_transition_clicked(obj, item=None):
167 167
168 168
169if __name__ == "__main__": 169if __name__ == "__main__":
170 elementary.init()
171 win = StandardWindow("test", "python-elementary test application", 170 win = StandardWindow("test", "python-elementary test application",
172 size=(320,520)) 171 size=(320,520))
173 win.callback_delete_request_add(lambda x: elementary.exit()) 172 win.callback_delete_request_add(lambda x: elementary.exit())
@@ -203,5 +202,4 @@ if __name__ == "__main__":
203 202
204 win.show() 203 win.show()
205 elementary.run() 204 elementary.run()
206 elementary.shutdown()
207 205
diff --git a/examples/elementary/test_bubble.py b/examples/elementary/test_bubble.py
index 35c5b0a..c0ff0f4 100644
--- a/examples/elementary/test_bubble.py
+++ b/examples/elementary/test_bubble.py
@@ -83,7 +83,6 @@ def bubble_clicked(obj, item=None):
83 83
84 84
85if __name__ == "__main__": 85if __name__ == "__main__":
86 elementary.init()
87 win = StandardWindow("test", "python-elementary test application", 86 win = StandardWindow("test", "python-elementary test application",
88 size=(320,520)) 87 size=(320,520))
89 win.callback_delete_request_add(lambda x: elementary.exit()) 88 win.callback_delete_request_add(lambda x: elementary.exit())
@@ -116,4 +115,3 @@ if __name__ == "__main__":
116 115
117 win.show() 116 win.show()
118 elementary.run() 117 elementary.run()
119 elementary.shutdown()
diff --git a/examples/elementary/test_button.py b/examples/elementary/test_button.py
index c2c0536..d973055 100644
--- a/examples/elementary/test_button.py
+++ b/examples/elementary/test_button.py
@@ -52,10 +52,8 @@ def buttons_clicked(obj):
52 52
53 53
54if __name__ == "__main__": 54if __name__ == "__main__":
55 elementary.init()
56 55
57 buttons_clicked(None) 56 buttons_clicked(None)
58 57
59 elementary.run() 58 elementary.run()
60 elementary.shutdown()
61 59
diff --git a/examples/elementary/test_calendar.py b/examples/elementary/test_calendar.py
index 6727b79..089fbbe 100644
--- a/examples/elementary/test_calendar.py
+++ b/examples/elementary/test_calendar.py
@@ -231,7 +231,6 @@ def calendar3_clicked(obj, item=None):
231 win.show() 231 win.show()
232 232
233if __name__ == "__main__": 233if __name__ == "__main__":
234 elementary.init()
235 win = StandardWindow("test", "python-elementary test application", 234 win = StandardWindow("test", "python-elementary test application",
236 size=(320,520)) 235 size=(320,520))
237 win.callback_delete_request_add(lambda o: elementary.exit()) 236 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -267,4 +266,3 @@ if __name__ == "__main__":
267 266
268 win.show() 267 win.show()
269 elementary.run() 268 elementary.run()
270 elementary.shutdown()
diff --git a/examples/elementary/test_check.py b/examples/elementary/test_check.py
index 5b54b7e..e32adb4 100644
--- a/examples/elementary/test_check.py
+++ b/examples/elementary/test_check.py
@@ -82,10 +82,8 @@ def check_clicked(obj):
82 82
83 83
84if __name__ == "__main__": 84if __name__ == "__main__":
85 elementary.init()
86 85
87 check_clicked(None) 86 check_clicked(None)
88 87
89 elementary.run() 88 elementary.run()
90 elementary.shutdown()
91 89
diff --git a/examples/elementary/test_clock.py b/examples/elementary/test_clock.py
index 7361ffa..111d0fd 100644
--- a/examples/elementary/test_clock.py
+++ b/examples/elementary/test_clock.py
@@ -77,10 +77,8 @@ def clock_clicked(obj):
77 77
78 78
79if __name__ == "__main__": 79if __name__ == "__main__":
80 elementary.init()
81 80
82 clock_clicked(None) 81 clock_clicked(None)
83 82
84 elementary.run() 83 elementary.run()
85 elementary.shutdown()
86 84
diff --git a/examples/elementary/test_cnp.py b/examples/elementary/test_cnp.py
index 01ee024..975a30f 100644
--- a/examples/elementary/test_cnp.py
+++ b/examples/elementary/test_cnp.py
@@ -78,9 +78,7 @@ def cnp_clicked(obj):
78 win.show() 78 win.show()
79 79
80if __name__ == "__main__": 80if __name__ == "__main__":
81 elementary.init()
82 81
83 cnp_clicked(None) 82 cnp_clicked(None)
84 83
85 elementary.run() 84 elementary.run()
86 elementary.shutdown()
diff --git a/examples/elementary/test_colorselector.py b/examples/elementary/test_colorselector.py
index ef03bf9..6877a7c 100644
--- a/examples/elementary/test_colorselector.py
+++ b/examples/elementary/test_colorselector.py
@@ -139,10 +139,8 @@ def colorselector_clicked(obj):
139 139
140 140
141if __name__ == "__main__": 141if __name__ == "__main__":
142 elementary.init()
143 142
144 colorselector_clicked(None) 143 colorselector_clicked(None)
145 144
146 elementary.run() 145 elementary.run()
147 elementary.shutdown()
148 146
diff --git a/examples/elementary/test_config.py b/examples/elementary/test_config.py
index 40df48e..fb7f972 100644
--- a/examples/elementary/test_config.py
+++ b/examples/elementary/test_config.py
@@ -356,9 +356,7 @@ def config_clicked(obj, data=None):
356 win.show() 356 win.show()
357 357
358if __name__ == "__main__": 358if __name__ == "__main__":
359 elementary.init()
360 359
361 config_clicked(None) 360 config_clicked(None)
362 361
363 elementary.run() 362 elementary.run()
364 elementary.shutdown()
diff --git a/examples/elementary/test_conform.py b/examples/elementary/test_conform.py
index bd1f7ad..41f896e 100644
--- a/examples/elementary/test_conform.py
+++ b/examples/elementary/test_conform.py
@@ -152,7 +152,6 @@ def conformant2_clicked(obj, item=None):
152 win.show() 152 win.show()
153 153
154if __name__ == "__main__": 154if __name__ == "__main__":
155 elementary.init()
156 win = StandardWindow("test", "python-elementary test application", 155 win = StandardWindow("test", "python-elementary test application",
157 size=(320,520)) 156 size=(320,520))
158 win.callback_delete_request_add(lambda o: elementary.exit()) 157 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -187,4 +186,3 @@ if __name__ == "__main__":
187 186
188 win.show() 187 win.show()
189 elementary.run() 188 elementary.run()
190 elementary.shutdown()
diff --git a/examples/elementary/test_core_ecore_events_in_elm.py b/examples/elementary/test_core_ecore_events_in_elm.py
index 10a90a0..0e52bec 100644
--- a/examples/elementary/test_core_ecore_events_in_elm.py
+++ b/examples/elementary/test_core_ecore_events_in_elm.py
@@ -77,9 +77,7 @@ def core_ecore_events_in_elm_clicked(obj, item=None):
77 77
78 78
79if __name__ == "__main__": 79if __name__ == "__main__":
80 elementary.init()
81 80
82 core_ecore_events_in_elm_clicked(None) 81 core_ecore_events_in_elm_clicked(None)
83 82
84 elementary.run() 83 elementary.run()
85 elementary.shutdown()
diff --git a/examples/elementary/test_core_evas_canvas_callbacks.py b/examples/elementary/test_core_evas_canvas_callbacks.py
index bf78f80..add53ae 100644
--- a/examples/elementary/test_core_evas_canvas_callbacks.py
+++ b/examples/elementary/test_core_evas_canvas_callbacks.py
@@ -87,10 +87,8 @@ def core_evas_canvas_callbacks_clicked(obj, item=None):
87 87
88 88
89if __name__ == "__main__": 89if __name__ == "__main__":
90 elementary.init()
91 90
92 core_evas_canvas_callbacks_clicked(None) 91 core_evas_canvas_callbacks_clicked(None)
93 92
94 elementary.run() 93 elementary.run()
95 elementary.shutdown()
96 94
diff --git a/examples/elementary/test_core_evas_object_callbacks.py b/examples/elementary/test_core_evas_object_callbacks.py
index 9961500..a86f887 100644
--- a/examples/elementary/test_core_evas_object_callbacks.py
+++ b/examples/elementary/test_core_evas_object_callbacks.py
@@ -151,9 +151,7 @@ def core_evas_object_callbacks_clicked(obj, item=None):
151 151
152 152
153if __name__ == "__main__": 153if __name__ == "__main__":
154 elementary.init()
155 154
156 core_evas_object_callbacks_clicked(None) 155 core_evas_object_callbacks_clicked(None)
157 156
158 elementary.run() 157 elementary.run()
159 elementary.shutdown()
diff --git a/examples/elementary/test_core_evas_objects.py b/examples/elementary/test_core_evas_objects.py
index 5172170..1d98242 100644
--- a/examples/elementary/test_core_evas_objects.py
+++ b/examples/elementary/test_core_evas_objects.py
@@ -47,10 +47,8 @@ def core_evas_objects_clicked(obj, item=None):
47 47
48 48
49if __name__ == "__main__": 49if __name__ == "__main__":
50 elementary.init()
51 50
52 core_evas_objects_clicked(None) 51 core_evas_objects_clicked(None)
53 52
54 elementary.run() 53 elementary.run()
55 elementary.shutdown()
56 54
diff --git a/examples/elementary/test_core_evas_smart.py b/examples/elementary/test_core_evas_smart.py
index adb73fc..a5422ad 100644
--- a/examples/elementary/test_core_evas_smart.py
+++ b/examples/elementary/test_core_evas_smart.py
@@ -203,7 +203,5 @@ if __name__ == "__main__":
203 efl_log_handler = logging.StreamHandler() 203 efl_log_handler = logging.StreamHandler()
204 efl_log_handler.setFormatter(efl_log_form) 204 efl_log_handler.setFormatter(efl_log_form)
205 efl_log.addHandler(efl_log_handler) 205 efl_log.addHandler(efl_log_handler)
206 elementary.init()
207 core_evas_smart_clicked(None) 206 core_evas_smart_clicked(None)
208 elementary.run() 207 elementary.run()
209 elementary.shutdown()
diff --git a/examples/elementary/test_ctxpopup.py b/examples/elementary/test_ctxpopup.py
index a945651..fbe154a 100644
--- a/examples/elementary/test_ctxpopup.py
+++ b/examples/elementary/test_ctxpopup.py
@@ -187,10 +187,8 @@ def ctxpopup_clicked(obj):
187 187
188 188
189if __name__ == "__main__": 189if __name__ == "__main__":
190 elementary.init()
191 190
192 ctxpopup_clicked(None) 191 ctxpopup_clicked(None)
193 192
194 elementary.run() 193 elementary.run()
195 elementary.shutdown()
196 194
diff --git a/examples/elementary/test_cursor.py b/examples/elementary/test_cursor.py
index a079392..9f71758 100644
--- a/examples/elementary/test_cursor.py
+++ b/examples/elementary/test_cursor.py
@@ -164,7 +164,6 @@ def cursor3_clicked(obj, item=None):
164 164
165 165
166if __name__ == "__main__": 166if __name__ == "__main__":
167 elementary.init()
168 win = StandardWindow("test", "python-elementary test application", 167 win = StandardWindow("test", "python-elementary test application",
169 size=(320,520)) 168 size=(320,520))
170 win.callback_delete_request_add(lambda o: elementary.exit()) 169 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -198,4 +197,3 @@ if __name__ == "__main__":
198 197
199 win.show() 198 win.show()
200 elementary.run() 199 elementary.run()
201 elementary.shutdown()
diff --git a/examples/elementary/test_datetime.py b/examples/elementary/test_datetime.py
index ddaa6c3..9d218ec 100644
--- a/examples/elementary/test_datetime.py
+++ b/examples/elementary/test_datetime.py
@@ -60,9 +60,7 @@ def datetime_clicked(obj):
60 win.show() 60 win.show()
61 61
62if __name__ == "__main__": 62if __name__ == "__main__":
63 elementary.init()
64 63
65 datetime_clicked(None) 64 datetime_clicked(None)
66 65
67 elementary.run() 66 elementary.run()
68 elementary.shutdown()
diff --git a/examples/elementary/test_dayselector.py b/examples/elementary/test_dayselector.py
index 877d500..1d9d77c 100644
--- a/examples/elementary/test_dayselector.py
+++ b/examples/elementary/test_dayselector.py
@@ -68,10 +68,8 @@ def dayselector_clicked(obj):
68 68
69 69
70if __name__ == "__main__": 70if __name__ == "__main__":
71 elementary.init()
72 71
73 dayselector_clicked(None) 72 dayselector_clicked(None)
74 73
75 elementary.run() 74 elementary.run()
76 elementary.shutdown()
77 75
diff --git a/examples/elementary/test_diskselector.py b/examples/elementary/test_diskselector.py
index a2e4bea..4c30089 100644
--- a/examples/elementary/test_diskselector.py
+++ b/examples/elementary/test_diskselector.py
@@ -108,9 +108,7 @@ def diskselector_clicked(obj):
108 win.show() 108 win.show()
109 109
110if __name__ == "__main__": 110if __name__ == "__main__":
111 elementary.init()
112 111
113 diskselector_clicked(None) 112 diskselector_clicked(None)
114 113
115 elementary.run() 114 elementary.run()
116 elementary.shutdown()
diff --git a/examples/elementary/test_dnd.py b/examples/elementary/test_dnd.py
index 4c33e9c..c495be2 100644
--- a/examples/elementary/test_dnd.py
+++ b/examples/elementary/test_dnd.py
@@ -577,7 +577,6 @@ def dnd_genlist_gengrid_clicked(obj, item=None):
577 577
578 578
579if __name__ == "__main__": 579if __name__ == "__main__":
580 elementary.init()
581 win = StandardWindow("test", "python-elementary test application", 580 win = StandardWindow("test", "python-elementary test application",
582 size=(320,520)) 581 size=(320,520))
583 win.callback_delete_request_add(lambda o: elementary.exit()) 582 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -613,4 +612,3 @@ if __name__ == "__main__":
613 612
614 win.show() 613 win.show()
615 elementary.run() 614 elementary.run()
616 elementary.shutdown()
diff --git a/examples/elementary/test_entry.py b/examples/elementary/test_entry.py
index de896d7..637343d 100644
--- a/examples/elementary/test_entry.py
+++ b/examples/elementary/test_entry.py
@@ -448,7 +448,6 @@ def entry_notepad_clicked(obj, item=None):
448 win.show() 448 win.show()
449 449
450if __name__ == "__main__": 450if __name__ == "__main__":
451 elementary.init()
452 win = StandardWindow("test", "python-elementary test application", 451 win = StandardWindow("test", "python-elementary test application",
453 size=(320,520)) 452 size=(320,520))
454 win.callback_delete_request_add(lambda o: elementary.exit()) 453 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -484,4 +483,3 @@ if __name__ == "__main__":
484 483
485 win.show() 484 win.show()
486 elementary.run() 485 elementary.run()
487 elementary.shutdown()
diff --git a/examples/elementary/test_evas_textgrid.py b/examples/elementary/test_evas_textgrid.py
index 5fce834..c6a547d 100644
--- a/examples/elementary/test_evas_textgrid.py
+++ b/examples/elementary/test_evas_textgrid.py
@@ -5,45 +5,54 @@ from efl import evas
5from efl.evas import Textgrid, EVAS_TEXTGRID_PALETTE_STANDARD 5from efl.evas import Textgrid, EVAS_TEXTGRID_PALETTE_STANDARD
6from efl import elementary 6from efl import elementary
7from efl.elementary.window import StandardWindow 7from efl.elementary.window import StandardWindow
8from efl.elementary.background import Background 8
9if "unichr" not in dir(__builtins__):
10 unichr = chr
9 11
10 12
11def evas_textgrid_clicked(obj, item=None): 13def evas_textgrid_clicked(obj, item=None):
12 win = StandardWindow("evastextgrid", "Evas Textgrid Test", autodel=True, 14 win = StandardWindow(
13 size=(320, 320)) 15 "evastextgrid", "Evas Textgrid Test", autodel=True)
14 if obj is None: 16 if obj is None:
15 win.callback_delete_request_add(lambda o: elementary.exit()) 17 win.callback_delete_request_add(lambda o: elementary.exit())
16 18
17 tg = Textgrid(win.evas) 19 W = 80
18 tg.size = 15, 1 20 H = 26
19 tg.size_hint_weight_set(1.0, 1.0) 21
22 tg = Textgrid(
23 win.evas, size_hint_weight=(1.0, 1.0), size=(W, H),
24 font=("monospace", 14))
20 win.resize_object_add(tg) 25 win.resize_object_add(tg)
21 tg.font = "Courier", 20
22 tg.palette_set(EVAS_TEXTGRID_PALETTE_STANDARD, 0, 0, 0, 0, 255) 26 tg.palette_set(EVAS_TEXTGRID_PALETTE_STANDARD, 0, 0, 0, 0, 255)
23 tg.palette_set(EVAS_TEXTGRID_PALETTE_STANDARD, 1, 255, 255, 255, 255)
24 27
25 row = tg.cellrow_get(0) 28 win.size_step = tg.cell_size
26 for cell in row:
27 cell.codepoint="รถ"
28 cell.fg = 1
29 cell.bg = 0
30 tg.cellrow_set(0, row)
31 29
32 tg.show() 30 # XXX: Add 1 to size, else the last row/col won't fit. Unknown reason.
33 tg.update_add(0, 0, 10, 1) 31 win.size = (W * tg.cell_size[0] + 1, H * tg.cell_size[1] + 1)
34 32
35 rowback = tg.cellrow_get(0) 33 for i in range(H):
34 ci = i + 1
35 cv = ci * 9
36 tg.palette_set(
37 EVAS_TEXTGRID_PALETTE_STANDARD, ci, cv, cv, cv, 255)
38 row = tg.cellrow_get(i)
39 if row is not None:
40 for cell in row:
41 cell.codepoint = unichr(1000 + i)
42 cell.bg = 0
43 cell.fg = ci
44 tg.cellrow_set(i, row)
45
46 tg.show()
47 tg.update_add(0, 0, 80, 26)
36 48
37 win.show() 49 win.show()
38 50
39 51
40if __name__ == "__main__": 52if __name__ == "__main__":
41 evas.init() 53 evas.init()
42 elementary.init()
43 54
44 evas_textgrid_clicked(None) 55 evas_textgrid_clicked(None)
45 56
46 elementary.run() 57 elementary.run()
47 elementary.shutdown()
48 evas.shutdown() 58 evas.shutdown()
49
diff --git a/examples/elementary/test_external.py b/examples/elementary/test_external.py
index e575ed7..2fd08a8 100644
--- a/examples/elementary/test_external.py
+++ b/examples/elementary/test_external.py
@@ -130,7 +130,6 @@ def edje_external_video_clicked(obj, item=None):
130 130
131 131
132if __name__ == "__main__": 132if __name__ == "__main__":
133 elementary.init()
134 win = StandardWindow("test", "python-elementary test application", 133 win = StandardWindow("test", "python-elementary test application",
135 size=(320,520)) 134 size=(320,520))
136 win.callback_delete_request_add(lambda o: elementary.exit()) 135 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -166,4 +165,3 @@ if __name__ == "__main__":
166 165
167 win.show() 166 win.show()
168 elementary.run() 167 elementary.run()
169 elementary.shutdown()
diff --git a/examples/elementary/test_fileselector.py b/examples/elementary/test_fileselector.py
index 50840f6..0e1ebb2 100644
--- a/examples/elementary/test_fileselector.py
+++ b/examples/elementary/test_fileselector.py
@@ -260,9 +260,7 @@ def fileselector_clicked(obj, item=None):
260 260
261 261
262if __name__ == "__main__": 262if __name__ == "__main__":
263 elementary.init()
264 263
265 fileselector_clicked(None) 264 fileselector_clicked(None)
266 265
267 elementary.run() 266 elementary.run()
268 elementary.shutdown()
diff --git a/examples/elementary/test_fileselector_button.py b/examples/elementary/test_fileselector_button.py
index dd50db0..f6e32ee 100644
--- a/examples/elementary/test_fileselector_button.py
+++ b/examples/elementary/test_fileselector_button.py
@@ -85,7 +85,6 @@ def fileselector_button_clicked(obj, item=None):
85 85
86 86
87if __name__ == "__main__": 87if __name__ == "__main__":
88 elementary.init()
89 88
90 import logging 89 import logging
91 efl_log = logging.getLogger("efl") 90 efl_log = logging.getLogger("efl")
@@ -94,4 +93,3 @@ if __name__ == "__main__":
94 fileselector_button_clicked(None) 93 fileselector_button_clicked(None)
95 94
96 elementary.run() 95 elementary.run()
97 elementary.shutdown()
diff --git a/examples/elementary/test_fileselector_entry.py b/examples/elementary/test_fileselector_entry.py
index 8a09ae1..92ffd96 100644
--- a/examples/elementary/test_fileselector_entry.py
+++ b/examples/elementary/test_fileselector_entry.py
@@ -85,7 +85,6 @@ def fileselector_entry_clicked(obj, item=None):
85 85
86 86
87if __name__ == "__main__": 87if __name__ == "__main__":
88 elementary.init()
89 88
90 import logging 89 import logging
91 efl_log = logging.getLogger("efl") 90 efl_log = logging.getLogger("efl")
@@ -94,4 +93,3 @@ if __name__ == "__main__":
94 fileselector_entry_clicked(None) 93 fileselector_entry_clicked(None)
95 94
96 elementary.run() 95 elementary.run()
97 elementary.shutdown()
diff --git a/examples/elementary/test_flip.py b/examples/elementary/test_flip.py
index 6501b6a..9b9719c 100644
--- a/examples/elementary/test_flip.py
+++ b/examples/elementary/test_flip.py
@@ -212,7 +212,6 @@ def flip_interactive_clicked(obj, item=None):
212 212
213 213
214if __name__ == "__main__": 214if __name__ == "__main__":
215 elementary.init()
216 win = StandardWindow("test", "python-elementary test application", 215 win = StandardWindow("test", "python-elementary test application",
217 size=(320,520)) 216 size=(320,520))
218 win.callback_delete_request_add(lambda o: elementary.exit()) 217 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -246,4 +245,3 @@ if __name__ == "__main__":
246 245
247 win.show() 246 win.show()
248 elementary.run() 247 elementary.run()
249 elementary.shutdown()
diff --git a/examples/elementary/test_flipselector.py b/examples/elementary/test_flipselector.py
index 5c66e79..b34c417 100644
--- a/examples/elementary/test_flipselector.py
+++ b/examples/elementary/test_flipselector.py
@@ -118,9 +118,7 @@ def flipselector_clicked(obj):
118 118
119 119
120if __name__ == "__main__": 120if __name__ == "__main__":
121 elementary.init()
122 121
123 flipselector_clicked(None) 122 flipselector_clicked(None)
124 123
125 elementary.run() 124 elementary.run()
126 elementary.shutdown()
diff --git a/examples/elementary/test_floating.py b/examples/elementary/test_floating.py
index 1be0d64..bf442e4 100644
--- a/examples/elementary/test_floating.py
+++ b/examples/elementary/test_floating.py
@@ -59,9 +59,7 @@ def floating_clicked(obj):
59 win.callback_delete_request_add(lambda o: elementary.exit()) 59 win.callback_delete_request_add(lambda o: elementary.exit())
60 60
61if __name__ == "__main__": 61if __name__ == "__main__":
62 elementary.init()
63 62
64 floating_clicked(None) 63 floating_clicked(None)
65 64
66 elementary.run() 65 elementary.run()
67 elementary.shutdown()
diff --git a/examples/elementary/test_focus.py b/examples/elementary/test_focus.py
index ef26098..70d1616 100644
--- a/examples/elementary/test_focus.py
+++ b/examples/elementary/test_focus.py
@@ -554,7 +554,6 @@ def focus5_clicked(obj, item=None):
554 554
555 555
556if __name__ == "__main__": 556if __name__ == "__main__":
557 elementary.init()
558 win = StandardWindow("test", "python-elementary test application", 557 win = StandardWindow("test", "python-elementary test application",
559 size=(320,520)) 558 size=(320,520))
560 win.callback_delete_request_add(lambda o: elementary.exit()) 559 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -590,4 +589,3 @@ if __name__ == "__main__":
590 589
591 win.show() 590 win.show()
592 elementary.run() 591 elementary.run()
593 elementary.shutdown()
diff --git a/examples/elementary/test_frame.py b/examples/elementary/test_frame.py
index 5aa979d..9e72692 100644
--- a/examples/elementary/test_frame.py
+++ b/examples/elementary/test_frame.py
@@ -59,9 +59,7 @@ def frame_clicked(obj):
59 win.show() 59 win.show()
60 60
61if __name__ == "__main__": 61if __name__ == "__main__":
62 elementary.init()
63 62
64 frame_clicked(None) 63 frame_clicked(None)
65 64
66 elementary.run() 65 elementary.run()
67 elementary.shutdown()
diff --git a/examples/elementary/test_gengrid.py b/examples/elementary/test_gengrid.py
index c11bbec..4b2ee6d 100644
--- a/examples/elementary/test_gengrid.py
+++ b/examples/elementary/test_gengrid.py
@@ -380,9 +380,7 @@ def gengrid_clicked(obj):
380 380
381 381
382if __name__ == "__main__": 382if __name__ == "__main__":
383 elementary.init()
384 383
385 gengrid_clicked(None) 384 gengrid_clicked(None)
386 385
387 elementary.run() 386 elementary.run()
388 elementary.shutdown()
diff --git a/examples/elementary/test_genlist.py b/examples/elementary/test_genlist.py
index bc9c907..8d0e913 100644
--- a/examples/elementary/test_genlist.py
+++ b/examples/elementary/test_genlist.py
@@ -797,7 +797,6 @@ def genlist11_clicked(obj, item=None):
797 win.show() 797 win.show()
798 798
799if __name__ == "__main__": 799if __name__ == "__main__":
800 elementary.init()
801 win = StandardWindow("test", "python-elementary test application", 800 win = StandardWindow("test", "python-elementary test application",
802 size=(320,520)) 801 size=(320,520))
803 win.callback_delete_request_add(lambda o: elementary.exit()) 802 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -839,4 +838,3 @@ if __name__ == "__main__":
839 838
840 win.show() 839 win.show()
841 elementary.run() 840 elementary.run()
842 elementary.shutdown()
diff --git a/examples/elementary/test_gesture_layer.py b/examples/elementary/test_gesture_layer.py
index 15fd6e3..8c78d83 100644
--- a/examples/elementary/test_gesture_layer.py
+++ b/examples/elementary/test_gesture_layer.py
@@ -327,9 +327,7 @@ def gesture_layer_clicked(obj):
327 win.show() 327 win.show()
328 328
329if __name__ == "__main__": 329if __name__ == "__main__":
330 elementary.init()
331 330
332 gesture_layer_clicked(None) 331 gesture_layer_clicked(None)
333 332
334 elementary.run() 333 elementary.run()
335 elementary.shutdown()
diff --git a/examples/elementary/test_grid.py b/examples/elementary/test_grid.py
index ac007d7..c3d5bce 100644
--- a/examples/elementary/test_grid.py
+++ b/examples/elementary/test_grid.py
@@ -77,9 +77,7 @@ def grid_clicked(obj):
77 77
78 78
79if __name__ == "__main__": 79if __name__ == "__main__":
80 elementary.init()
81 80
82 grid_clicked(None) 81 grid_clicked(None)
83 82
84 elementary.run() 83 elementary.run()
85 elementary.shutdown()
diff --git a/examples/elementary/test_hover.py b/examples/elementary/test_hover.py
index 007cd6d..d4db83a 100644
--- a/examples/elementary/test_hover.py
+++ b/examples/elementary/test_hover.py
@@ -121,7 +121,6 @@ def hover2_clicked(obj, item=None):
121 121
122 122
123if __name__ == "__main__": 123if __name__ == "__main__":
124 elementary.init()
125 win = StandardWindow("test", "python-elementary test application", 124 win = StandardWindow("test", "python-elementary test application",
126 size=(320,520)) 125 size=(320,520))
127 win.callback_delete_request_add(lambda o: elementary.exit()) 126 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -154,4 +153,3 @@ if __name__ == "__main__":
154 153
155 win.show() 154 win.show()
156 elementary.run() 155 elementary.run()
157 elementary.shutdown()
diff --git a/examples/elementary/test_hoversel.py b/examples/elementary/test_hoversel.py
index 45a6739..9672c54 100644
--- a/examples/elementary/test_hoversel.py
+++ b/examples/elementary/test_hoversel.py
@@ -94,9 +94,7 @@ def hoversel_clicked(obj):
94 94
95 95
96if __name__ == "__main__": 96if __name__ == "__main__":
97 elementary.init()
98 97
99 hoversel_clicked(None) 98 hoversel_clicked(None)
100 99
101 elementary.run() 100 elementary.run()
102 elementary.shutdown()
diff --git a/examples/elementary/test_icon.py b/examples/elementary/test_icon.py
index 3beed57..8503706 100644
--- a/examples/elementary/test_icon.py
+++ b/examples/elementary/test_icon.py
@@ -168,7 +168,6 @@ def icon_standard_clicked(obj, item=None):
168 168
169 169
170if __name__ == "__main__": 170if __name__ == "__main__":
171 elementary.init()
172 win = StandardWindow("test", "python-elementary test application", 171 win = StandardWindow("test", "python-elementary test application",
173 size=(320,520)) 172 size=(320,520))
174 win.callback_delete_request_add(lambda o: elementary.exit()) 173 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -202,4 +201,3 @@ if __name__ == "__main__":
202 201
203 win.show() 202 win.show()
204 elementary.run() 203 elementary.run()
205 elementary.shutdown()
diff --git a/examples/elementary/test_image.py b/examples/elementary/test_image.py
index ece1949..afdcce8 100644
--- a/examples/elementary/test_image.py
+++ b/examples/elementary/test_image.py
@@ -130,7 +130,6 @@ def image2_clicked(obj, it=None):
130 130
131 131
132if __name__ == "__main__": 132if __name__ == "__main__":
133 elementary.init()
134 win = StandardWindow("test", "python-elementary test application", 133 win = StandardWindow("test", "python-elementary test application",
135 size=(320, 520)) 134 size=(320, 520))
136 win.callback_delete_request_add(lambda o: elementary.exit()) 135 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -163,4 +162,3 @@ if __name__ == "__main__":
163 162
164 win.show() 163 win.show()
165 elementary.run() 164 elementary.run()
166 elementary.shutdown()
diff --git a/examples/elementary/test_index.py b/examples/elementary/test_index.py
index 076d525..9607bd4 100644
--- a/examples/elementary/test_index.py
+++ b/examples/elementary/test_index.py
@@ -93,9 +93,7 @@ def index_clicked(obj):
93 93
94 94
95if __name__ == "__main__": 95if __name__ == "__main__":
96 elementary.init()
97 96
98 index_clicked(None) 97 index_clicked(None)
99 98
100 elementary.run() 99 elementary.run()
101 elementary.shutdown()
diff --git a/examples/elementary/test_input_events.py b/examples/elementary/test_input_events.py
index e9b46e8..1b8df2a 100644
--- a/examples/elementary/test_input_events.py
+++ b/examples/elementary/test_input_events.py
@@ -91,10 +91,8 @@ def elm_input_events_clicked(obj, item=None):
91 91
92 92
93if __name__ == "__main__": 93if __name__ == "__main__":
94 elementary.init()
95 94
96 elm_input_events_clicked(None) 95 elm_input_events_clicked(None)
97 96
98 elementary.run() 97 elementary.run()
99 elementary.shutdown()
100 98
diff --git a/examples/elementary/test_inwin.py b/examples/elementary/test_inwin.py
index 97ff71a..3d9f899 100644
--- a/examples/elementary/test_inwin.py
+++ b/examples/elementary/test_inwin.py
@@ -29,9 +29,7 @@ def inner_window_clicked(obj):
29 29
30 30
31if __name__ == "__main__": 31if __name__ == "__main__":
32 elementary.init()
33 32
34 inner_window_clicked(None) 33 inner_window_clicked(None)
35 34
36 elementary.run() 35 elementary.run()
37 elementary.shutdown()
diff --git a/examples/elementary/test_label.py b/examples/elementary/test_label.py
index 58e6c7c..b6d950b 100644
--- a/examples/elementary/test_label.py
+++ b/examples/elementary/test_label.py
@@ -148,9 +148,7 @@ def label_clicked(obj):
148 148
149 149
150if __name__ == "__main__": 150if __name__ == "__main__":
151 elementary.init()
152 151
153 label_clicked(None) 152 label_clicked(None)
154 153
155 elementary.run() 154 elementary.run()
156 elementary.shutdown()
diff --git a/examples/elementary/test_layout.py b/examples/elementary/test_layout.py
index 2540c9d..84faa45 100644
--- a/examples/elementary/test_layout.py
+++ b/examples/elementary/test_layout.py
@@ -49,9 +49,7 @@ def layout_clicked(obj):
49 49
50 50
51if __name__ == "__main__": 51if __name__ == "__main__":
52 elementary.init()
53 52
54 layout_clicked(None) 53 layout_clicked(None)
55 54
56 elementary.run() 55 elementary.run()
57 elementary.shutdown()
diff --git a/examples/elementary/test_list.py b/examples/elementary/test_list.py
index 4a089d3..3f0c89e 100644
--- a/examples/elementary/test_list.py
+++ b/examples/elementary/test_list.py
@@ -260,7 +260,6 @@ def list3_clicked(obj, item=None):
260 win.show() 260 win.show()
261 261
262if __name__ == "__main__": 262if __name__ == "__main__":
263 elementary.init()
264 win = StandardWindow("test", "python-elementary test application", 263 win = StandardWindow("test", "python-elementary test application",
265 size=(320,520)) 264 size=(320,520))
266 win.callback_delete_request_add(lambda o: elementary.exit()) 265 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -294,4 +293,3 @@ if __name__ == "__main__":
294 293
295 win.show() 294 win.show()
296 elementary.run() 295 elementary.run()
297 elementary.shutdown()
diff --git a/examples/elementary/test_main_menu.py b/examples/elementary/test_main_menu.py
index 01628f5..f9893ae 100644
--- a/examples/elementary/test_main_menu.py
+++ b/examples/elementary/test_main_menu.py
@@ -47,10 +47,8 @@ def main_menu_clicked(obj):
47 47
48 48
49if __name__ == "__main__": 49if __name__ == "__main__":
50 elementary.init()
51 50
52 main_menu_clicked(None) 51 main_menu_clicked(None)
53 52
54 elementary.run() 53 elementary.run()
55 elementary.shutdown()
56 54
diff --git a/examples/elementary/test_map.py b/examples/elementary/test_map.py
index f64e7e1..6c4ffa5 100644
--- a/examples/elementary/test_map.py
+++ b/examples/elementary/test_map.py
@@ -438,9 +438,7 @@ def map_clicked(obj):
438 438
439 439
440if __name__ == "__main__": 440if __name__ == "__main__":
441 elementary.init()
442 441
443 map_clicked(None) 442 map_clicked(None)
444 443
445 elementary.run() 444 elementary.run()
446 elementary.shutdown()
diff --git a/examples/elementary/test_mapbuf.py b/examples/elementary/test_mapbuf.py
index bce97ff..e0c1712 100644
--- a/examples/elementary/test_mapbuf.py
+++ b/examples/elementary/test_mapbuf.py
@@ -169,9 +169,7 @@ def mapbuf_clicked(obj, item=None):
169 169
170 170
171if __name__ == "__main__": 171if __name__ == "__main__":
172 elementary.init()
173 172
174 mapbuf_clicked(None) 173 mapbuf_clicked(None)
175 174
176 elementary.run() 175 elementary.run()
177 elementary.shutdown()
diff --git a/examples/elementary/test_menu.py b/examples/elementary/test_menu.py
index 94f43e6..f2b1a78 100644
--- a/examples/elementary/test_menu.py
+++ b/examples/elementary/test_menu.py
@@ -85,9 +85,7 @@ def menu_clicked(obj):
85 85
86 86
87if __name__ == "__main__": 87if __name__ == "__main__":
88 elementary.init()
89 88
90 menu_clicked(None) 89 menu_clicked(None)
91 90
92 elementary.run() 91 elementary.run()
93 elementary.shutdown()
diff --git a/examples/elementary/test_multibuttonentry.py b/examples/elementary/test_multibuttonentry.py
index e57a6cd..b8ad5b6 100644
--- a/examples/elementary/test_multibuttonentry.py
+++ b/examples/elementary/test_multibuttonentry.py
@@ -180,10 +180,8 @@ def multibuttonentry_clicked(obj, item=None):
180 180
181 181
182if __name__ == "__main__": 182if __name__ == "__main__":
183 elementary.init()
184 183
185 multibuttonentry_clicked(None) 184 multibuttonentry_clicked(None)
186 185
187 elementary.run() 186 elementary.run()
188 elementary.shutdown()
189 187
diff --git a/examples/elementary/test_naviframe.py b/examples/elementary/test_naviframe.py
index 644f5af..9cfa75a 100644
--- a/examples/elementary/test_naviframe.py
+++ b/examples/elementary/test_naviframe.py
@@ -129,9 +129,7 @@ def naviframe_clicked(obj):
129 129
130 130
131if __name__ == "__main__": 131if __name__ == "__main__":
132 elementary.init()
133 132
134 naviframe_clicked(None) 133 naviframe_clicked(None)
135 134
136 elementary.run() 135 elementary.run()
137 elementary.shutdown()
diff --git a/examples/elementary/test_notify.py b/examples/elementary/test_notify.py
index a62c2e2..a711324 100644
--- a/examples/elementary/test_notify.py
+++ b/examples/elementary/test_notify.py
@@ -320,9 +320,7 @@ def notify_clicked(obj=None):
320 320
321 321
322if __name__ == "__main__": 322if __name__ == "__main__":
323 elementary.init()
324 323
325 notify_clicked(None) 324 notify_clicked(None)
326 325
327 elementary.run() 326 elementary.run()
328 elementary.shutdown()
diff --git a/examples/elementary/test_panel.py b/examples/elementary/test_panel.py
index fa11896..ee5e656 100644
--- a/examples/elementary/test_panel.py
+++ b/examples/elementary/test_panel.py
@@ -94,10 +94,8 @@ def panel_clicked(obj):
94 94
95 95
96if __name__ == "__main__": 96if __name__ == "__main__":
97 elementary.init()
98 97
99 panel_clicked(None) 98 panel_clicked(None)
100 99
101 elementary.run() 100 elementary.run()
102 elementary.shutdown()
103 101
diff --git a/examples/elementary/test_panel_scroll.py b/examples/elementary/test_panel_scroll.py
index 016e9a7..c4d0a79 100644
--- a/examples/elementary/test_panel_scroll.py
+++ b/examples/elementary/test_panel_scroll.py
@@ -60,10 +60,8 @@ def panel_scroll_clicked(obj):
60 60
61 61
62if __name__ == "__main__": 62if __name__ == "__main__":
63 elementary.init()
64 63
65 panel_scroll_clicked(None) 64 panel_scroll_clicked(None)
66 65
67 elementary.run() 66 elementary.run()
68 elementary.shutdown()
69 67
diff --git a/examples/elementary/test_panes.py b/examples/elementary/test_panes.py
index b28dfc7..6df91e5 100644
--- a/examples/elementary/test_panes.py
+++ b/examples/elementary/test_panes.py
@@ -47,9 +47,7 @@ def panes_clicked(obj):
47 47
48 48
49if __name__ == "__main__": 49if __name__ == "__main__":
50 elementary.init()
51 50
52 panes_clicked(None) 51 panes_clicked(None)
53 52
54 elementary.run() 53 elementary.run()
55 elementary.shutdown()
diff --git a/examples/elementary/test_photo.py b/examples/elementary/test_photo.py
index 790bbb2..553b23a 100644
--- a/examples/elementary/test_photo.py
+++ b/examples/elementary/test_photo.py
@@ -62,9 +62,7 @@ def photo_clicked(obj):
62 62
63 63
64if __name__ == "__main__": 64if __name__ == "__main__":
65 elementary.init()
66 65
67 photo_clicked(None) 66 photo_clicked(None)
68 67
69 elementary.run() 68 elementary.run()
70 elementary.shutdown()
diff --git a/examples/elementary/test_photocam.py b/examples/elementary/test_photocam.py
index 1eac672..7903e75 100644
--- a/examples/elementary/test_photocam.py
+++ b/examples/elementary/test_photocam.py
@@ -152,9 +152,7 @@ def photocam_clicked(obj):
152 152
153 153
154if __name__ == "__main__": 154if __name__ == "__main__":
155 elementary.init()
156 155
157 photocam_clicked(None) 156 photocam_clicked(None)
158 157
159 elementary.run() 158 elementary.run()
160 elementary.shutdown()
diff --git a/examples/elementary/test_popup.py b/examples/elementary/test_popup.py
index f495e55..a00e5f4 100644
--- a/examples/elementary/test_popup.py
+++ b/examples/elementary/test_popup.py
@@ -203,9 +203,7 @@ def popup_clicked(obj):
203 203
204 204
205if __name__ == "__main__": 205if __name__ == "__main__":
206 elementary.init()
207 206
208 popup_clicked(None) 207 popup_clicked(None)
209 208
210 elementary.run() 209 elementary.run()
211 elementary.shutdown()
diff --git a/examples/elementary/test_progressbar.py b/examples/elementary/test_progressbar.py
index f41a1de..cee68e8 100644
--- a/examples/elementary/test_progressbar.py
+++ b/examples/elementary/test_progressbar.py
@@ -151,9 +151,7 @@ def progressbar_clicked(obj):
151 151
152 152
153if __name__ == "__main__": 153if __name__ == "__main__":
154 elementary.init()
155 154
156 progressbar_clicked(None) 155 progressbar_clicked(None)
157 156
158 elementary.run() 157 elementary.run()
159 elementary.shutdown()
diff --git a/examples/elementary/test_radio.py b/examples/elementary/test_radio.py
index ebf07eb..5c93025 100644
--- a/examples/elementary/test_radio.py
+++ b/examples/elementary/test_radio.py
@@ -73,9 +73,7 @@ def radio_clicked(obj):
73 73
74 74
75if __name__ == "__main__": 75if __name__ == "__main__":
76 elementary.init()
77 76
78 radio_clicked(None) 77 radio_clicked(None)
79 78
80 elementary.run() 79 elementary.run()
81 elementary.shutdown()
diff --git a/examples/elementary/test_scroller.py b/examples/elementary/test_scroller.py
index 1b01763..6178a79 100644
--- a/examples/elementary/test_scroller.py
+++ b/examples/elementary/test_scroller.py
@@ -183,9 +183,7 @@ def scroller_clicked(obj):
183 183
184 184
185if __name__ == "__main__": 185if __name__ == "__main__":
186 elementary.init()
187 186
188 scroller_clicked(None) 187 scroller_clicked(None)
189 188
190 elementary.run() 189 elementary.run()
191 elementary.shutdown()
diff --git a/examples/elementary/test_segment_control.py b/examples/elementary/test_segment_control.py
index 97adb61..95b86ea 100644
--- a/examples/elementary/test_segment_control.py
+++ b/examples/elementary/test_segment_control.py
@@ -94,9 +94,7 @@ def segment_control_clicked(obj):
94 94
95 95
96if __name__ == "__main__": 96if __name__ == "__main__":
97 elementary.init()
98 97
99 segment_control_clicked(None) 98 segment_control_clicked(None)
100 99
101 elementary.run() 100 elementary.run()
102 elementary.shutdown()
diff --git a/examples/elementary/test_separator.py b/examples/elementary/test_separator.py
index 9871b82..cf52e67 100644
--- a/examples/elementary/test_separator.py
+++ b/examples/elementary/test_separator.py
@@ -58,9 +58,7 @@ def separator_clicked(obj):
58 58
59 59
60if __name__ == "__main__": 60if __name__ == "__main__":
61 elementary.init()
62 61
63 separator_clicked(None) 62 separator_clicked(None)
64 63
65 elementary.run() 64 elementary.run()
66 elementary.shutdown()
diff --git a/examples/elementary/test_slider.py b/examples/elementary/test_slider.py
index c69e44d..a3d159a 100644
--- a/examples/elementary/test_slider.py
+++ b/examples/elementary/test_slider.py
@@ -245,10 +245,8 @@ def slider_clicked(obj):
245 rd.show() 245 rd.show()
246 246
247if __name__ == "__main__": 247if __name__ == "__main__":
248 elementary.init()
249 248
250 slider_clicked(None) 249 slider_clicked(None)
251 250
252 elementary.run() 251 elementary.run()
253 elementary.shutdown()
254 252
diff --git a/examples/elementary/test_slideshow.py b/examples/elementary/test_slideshow.py
index a3c6a44..3f06bd6 100644
--- a/examples/elementary/test_slideshow.py
+++ b/examples/elementary/test_slideshow.py
@@ -74,40 +74,45 @@ def spin(sp, ss):
74 if (ss.timeout > 0): 74 if (ss.timeout > 0):
75 ss.timeout = sp.value 75 ss.timeout = sp.value
76 76
77def slide_transition(ss, slide_it, slide_last_it): 77
78 if (slide_last_it == slide_it): 78def ss_changed_cb(ss, item):
79 print("CHANGED", item)
80
81def ss_transition_end_cb(ss, item, last_item):
82 print("TRANSITION END", item)
83 if item == last_item:
79 print("Reaches to End of slides\n") 84 print("Reaches to End of slides\n")
80 85
81class ssClass(SlideshowItemClass): 86class ssClass(SlideshowItemClass):
82 def get(self, obj, *args, **kwargs): 87 def get(self, obj, item_data):
83 photo = Photo(obj, file=args[0], fill_inside=True, style="shadow") 88 print("Class get", item_data)
89 photo = Photo(obj, file=item_data, fill_inside=True, style="shadow")
84 return photo 90 return photo
85 91
92 def delete(self, obj, item_data):
93 print("Class delete", item_data)
94
86def slideshow_clicked(obj): 95def slideshow_clicked(obj):
87 win = StandardWindow("slideshow", "Slideshow", autodel=True, 96 win = StandardWindow("slideshow", "Slideshow",
88 size=(500, 400)) 97 autodel=True, size=(500, 400))
89 98
90 ss = Slideshow(win, loop=True, size_hint_weight=EXPAND_BOTH) 99 ss = Slideshow(win, loop=True, size_hint_weight=EXPAND_BOTH)
91 win.resize_object_add(ss) 100 win.resize_object_add(ss)
92 ss.show() 101 ss.show()
93 102
94 ssc = ssClass() 103 ssc = ssClass()
95 ss.item_add(ssc, os.path.join(img_path, images[0])) 104 for i in range(len(images)):
96 ss.item_add(ssc, os.path.join(img_path, images[1])) 105 print("ADD", images[i])
97 ss.item_add(ssc, os.path.join(img_path, images[2])) 106 slide_last_it = ss.item_add(ssc, os.path.join(img_path, images[i]))
98 ss.item_add(ssc, os.path.join(img_path, images[3])) 107
99 ss.item_add(ssc, os.path.join(img_path, images[8])) 108 ss.callback_changed_add(ss_changed_cb)
100 ss.item_add(ssc, os.path.join(img_path, images[4])) 109 ss.callback_transition_end_add(ss_transition_end_cb, slide_last_it)
101 ss.item_add(ssc, os.path.join(img_path, images[5]))
102 ss.item_add(ssc, os.path.join(img_path, images[6]))
103 slide_last_it = ss.item_add(ssc, os.path.join(img_path, images[7]))
104 ss.callback_transition_end_add(slide_transition, slide_last_it)
105 110
106 bx = Box(win, horizontal=True) 111 bx = Box(win, horizontal=True)
107 bx.show() 112 bx.show()
108 113
109 no = Notify(win, align=(0.5, 1.0), 114 no = Notify(win, align=(0.5, 1.0), timeout=3.0, content=bx,
110 size_hint_weight=EXPAND_BOTH, timeout=3.0, content=bx) 115 size_hint_weight=EXPAND_BOTH)
111 win.resize_object_add(no) 116 win.resize_object_add(no)
112 117
113 bx.event_callback_add(EVAS_CALLBACK_MOUSE_IN, mouse_in, no) 118 bx.event_callback_add(EVAS_CALLBACK_MOUSE_IN, mouse_in, no)
@@ -136,8 +141,8 @@ def slideshow_clicked(obj):
136 hv.item_add(layout, None, 0, layout_select, ss, layout) 141 hv.item_add(layout, None, 0, layout_select, ss, layout)
137 hv.show() 142 hv.show()
138 143
139 sp = Spinner(win, label_format="%2.0f secs.", step=1, min_max=(1, 30), 144 sp = Spinner(win, label_format="%2.0f secs.",
140 value=3) 145 step=1, min_max=(1, 30), value=3)
141 sp.callback_changed_add(spin, ss) 146 sp.callback_changed_add(spin, ss)
142 bx.pack_end(sp) 147 bx.pack_end(sp)
143 sp.show() 148 sp.show()
@@ -160,9 +165,7 @@ def slideshow_clicked(obj):
160 165
161 166
162if __name__ == "__main__": 167if __name__ == "__main__":
163 elementary.init()
164 168
165 slideshow_clicked(None) 169 slideshow_clicked(None)
166 170
167 elementary.run() 171 elementary.run()
168 elementary.shutdown()
diff --git a/examples/elementary/test_spinner.py b/examples/elementary/test_spinner.py
index e1ca38f..6b9457a 100644
--- a/examples/elementary/test_spinner.py
+++ b/examples/elementary/test_spinner.py
@@ -72,9 +72,7 @@ def spinner_clicked(obj):
72 win.show() 72 win.show()
73 73
74if __name__ == "__main__": 74if __name__ == "__main__":
75 elementary.init()
76 75
77 spinner_clicked(None) 76 spinner_clicked(None)
78 77
79 elementary.run() 78 elementary.run()
80 elementary.shutdown()
diff --git a/examples/elementary/test_store.py b/examples/elementary/test_store.py
index 303d1bb..4a2f8d4 100644
--- a/examples/elementary/test_store.py
+++ b/examples/elementary/test_store.py
@@ -126,9 +126,7 @@ def store_clicked(obj):
126 win.show() 126 win.show()
127 127
128if __name__ == "__main__": 128if __name__ == "__main__":
129 elementary.init()
130 129
131 store_clicked(None) 130 store_clicked(None)
132 131
133 elementary.run() 132 elementary.run()
134 elementary.shutdown()
diff --git a/examples/elementary/test_sys_notify.py b/examples/elementary/test_sys_notify.py
index 86fd005..4a8672b 100644
--- a/examples/elementary/test_sys_notify.py
+++ b/examples/elementary/test_sys_notify.py
@@ -80,9 +80,7 @@ def sys_notify_clicked(obj):
80 win.show() 80 win.show()
81 81
82if __name__ == "__main__": 82if __name__ == "__main__":
83 elementary.init()
84 83
85 sys_notify_clicked(None) 84 sys_notify_clicked(None)
86 85
87 elementary.run() 86 elementary.run()
88 elementary.shutdown()
diff --git a/examples/elementary/test_table.py b/examples/elementary/test_table.py
index b4a8e67..8ffa551 100644
--- a/examples/elementary/test_table.py
+++ b/examples/elementary/test_table.py
@@ -291,7 +291,6 @@ def table7_clicked(obj, item=None):
291 291
292 292
293if __name__ == "__main__": 293if __name__ == "__main__":
294 elementary.init()
295 win = StandardWindow("test", "python-elementary test application", 294 win = StandardWindow("test", "python-elementary test application",
296 size=(320,520)) 295 size=(320,520))
297 win.callback_delete_request_add(lambda o: elementary.exit()) 296 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -331,4 +330,3 @@ if __name__ == "__main__":
331 330
332 win.show() 331 win.show()
333 elementary.run() 332 elementary.run()
334 elementary.shutdown()
diff --git a/examples/elementary/test_theme.py b/examples/elementary/test_theme.py
index b21e4c7..d35754d 100644
--- a/examples/elementary/test_theme.py
+++ b/examples/elementary/test_theme.py
@@ -88,10 +88,8 @@ def theme_clicked(obj, data=None):
88 88
89 89
90if __name__ == "__main__": 90if __name__ == "__main__":
91 elementary.init()
92 91
93 theme_clicked(None) 92 theme_clicked(None)
94 93
95 elementary.run() 94 elementary.run()
96 elementary.shutdown()
97 95
diff --git a/examples/elementary/test_thumb.py b/examples/elementary/test_thumb.py
index 74c74b9..3cf845e 100644
--- a/examples/elementary/test_thumb.py
+++ b/examples/elementary/test_thumb.py
@@ -59,9 +59,7 @@ def thumb_clicked(obj):
59 59
60 60
61if __name__ == "__main__": 61if __name__ == "__main__":
62 elementary.init()
63 62
64 thumb_clicked(None) 63 thumb_clicked(None)
65 64
66 elementary.run() 65 elementary.run()
67 elementary.shutdown()
diff --git a/examples/elementary/test_toolbar.py b/examples/elementary/test_toolbar.py
index d71d819..932d8ad 100644
--- a/examples/elementary/test_toolbar.py
+++ b/examples/elementary/test_toolbar.py
@@ -46,9 +46,10 @@ def tb_4a(obj, it, ph):
46def tb_5(obj, it, ph): 46def tb_5(obj, it, ph):
47 ph.file = None 47 ph.file = None
48 48
49def cb_clicked(tb): 49def cb_clicked(tb, it):
50 print("CLICKED") 50 print("CLICKED")
51 print(tb) 51 print(tb)
52 print(it)
52 53
53def cb_item_focused(tb, item): 54def cb_item_focused(tb, item):
54 print("ITEM FOCUSED") 55 print("ITEM FOCUSED")
@@ -205,7 +206,6 @@ def toolbar5_clicked(obj, item=None):
205 206
206 207
207if __name__ == "__main__": 208if __name__ == "__main__":
208 elementary.init()
209 win = StandardWindow("test", "python-elementary test application", 209 win = StandardWindow("test", "python-elementary test application",
210 size=(320,520)) 210 size=(320,520))
211 win.callback_delete_request_add(lambda o: elementary.exit()) 211 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -240,4 +240,3 @@ if __name__ == "__main__":
240 240
241 win.show() 241 win.show()
242 elementary.run() 242 elementary.run()
243 elementary.shutdown()
diff --git a/examples/elementary/test_tooltip.py b/examples/elementary/test_tooltip.py
index 4e38003..43e00ec 100644
--- a/examples/elementary/test_tooltip.py
+++ b/examples/elementary/test_tooltip.py
@@ -222,9 +222,7 @@ def tooltip_clicked(obj):
222 222
223 223
224if __name__ == "__main__": 224if __name__ == "__main__":
225 elementary.init()
226 225
227 tooltip_clicked(None) 226 tooltip_clicked(None)
228 227
229 elementary.run() 228 elementary.run()
230 elementary.shutdown()
diff --git a/examples/elementary/test_transit.py b/examples/elementary/test_transit.py
index 86709d7..18e4391 100644
--- a/examples/elementary/test_transit.py
+++ b/examples/elementary/test_transit.py
@@ -362,7 +362,6 @@ def transit9_clicked(obj, item=None):
362 362
363 363
364if __name__ == "__main__": 364if __name__ == "__main__":
365 elementary.init()
366 win = StandardWindow("test", "python-elementary test application", 365 win = StandardWindow("test", "python-elementary test application",
367 size=(320,520)) 366 size=(320,520))
368 win.callback_delete_request_add(lambda o: elementary.exit()) 367 win.callback_delete_request_add(lambda o: elementary.exit())
@@ -404,4 +403,3 @@ if __name__ == "__main__":
404 403
405 win.show() 404 win.show()
406 elementary.run() 405 elementary.run()
407 elementary.shutdown()
diff --git a/examples/elementary/test_transit_bezier.py b/examples/elementary/test_transit_bezier.py
index 4c37d04..b1cdf24 100644
--- a/examples/elementary/test_transit_bezier.py
+++ b/examples/elementary/test_transit_bezier.py
@@ -156,7 +156,5 @@ def transit_bezier_clicked(obj, item=None):
156 156
157 157
158if __name__ == "__main__": 158if __name__ == "__main__":
159 elementary.init()
160 transit_bezier_clicked(None) 159 transit_bezier_clicked(None)
161 elementary.run() 160 elementary.run()
162 elementary.shutdown()
diff --git a/examples/elementary/test_video.py b/examples/elementary/test_video.py
index 20bdab3..d84d617 100644
--- a/examples/elementary/test_video.py
+++ b/examples/elementary/test_video.py
@@ -43,9 +43,7 @@ def video_clicked(obj):
43 43
44 44
45if __name__ == "__main__": 45if __name__ == "__main__":
46 elementary.init()
47 46
48 video_clicked(None) 47 video_clicked(None)
49 48
50 elementary.run() 49 elementary.run()
51 elementary.shutdown()
diff --git a/examples/elementary/test_web.py b/examples/elementary/test_web.py
index 2c1bcff..ac848ac 100644
--- a/examples/elementary/test_web.py
+++ b/examples/elementary/test_web.py
@@ -146,9 +146,7 @@ def web_clicked(obj):
146 146
147 147
148if __name__ == "__main__": 148if __name__ == "__main__":
149 elementary.init()
150 if not elementary.need_web(): 149 if not elementary.need_web():
151 elementary.shutdown()
152 raise SystemExit("EFL-webkit not available!") 150 raise SystemExit("EFL-webkit not available!")
153 151
154 elementary.policy_set(elementary.ELM_POLICY_QUIT, 152 elementary.policy_set(elementary.ELM_POLICY_QUIT,
@@ -157,4 +155,3 @@ if __name__ == "__main__":
157 web_clicked(None) 155 web_clicked(None)
158 156
159 elementary.run() 157 elementary.run()
160 elementary.shutdown()
diff --git a/examples/elementary/test_win.py b/examples/elementary/test_win.py
index ad87b3c..89396f7 100644
--- a/examples/elementary/test_win.py
+++ b/examples/elementary/test_win.py
@@ -149,10 +149,8 @@ def window_states_clicked(obj):
149 149
150 150
151if __name__ == "__main__": 151if __name__ == "__main__":
152 elementary.init()
153 152
154 window_states_clicked(None) 153 window_states_clicked(None)
155 154
156 elementary.run() 155 elementary.run()
157 elementary.shutdown()
158 156
diff --git a/examples/elementary/test_win_dialog.py b/examples/elementary/test_win_dialog.py
index 42b4356..122bd18 100644
--- a/examples/elementary/test_win_dialog.py
+++ b/examples/elementary/test_win_dialog.py
@@ -39,10 +39,8 @@ def window_dialog_clicked(obj):
39 39
40 40
41if __name__ == "__main__": 41if __name__ == "__main__":
42 elementary.init()
43 42
44 window_dialog_clicked(None) 43 window_dialog_clicked(None)
45 44
46 elementary.run() 45 elementary.run()
47 elementary.shutdown()
48 46
diff --git a/examples/emotion/test_emotion.py b/examples/emotion/test_emotion.py
index 54d8cde..21ca635 100755
--- a/examples/emotion/test_emotion.py
+++ b/examples/emotion/test_emotion.py
@@ -48,7 +48,7 @@ class MovieWindow(edje.Edje):
48 self.part_text_set("video_alpha_txt", "alpha 255") 48 self.part_text_set("video_alpha_txt", "alpha 255")
49 self.part_drag_value_set("video_volume", 0.0, 0.5) 49 self.part_drag_value_set("video_volume", 0.0, 0.5)
50 self.part_text_set("video_volume_txt", "vol 0.50") 50 self.part_text_set("video_volume_txt", "vol 0.50")
51 51
52 self.part_swallow("video_swallow", self.vid) 52 self.part_swallow("video_swallow", self.vid)
53 self.data["moving"] = False 53 self.data["moving"] = False
54 self.data["resizing"] = False 54 self.data["resizing"] = False
@@ -365,8 +365,6 @@ def cmdline_parse():
365if __name__ == "__main__"or True: 365if __name__ == "__main__"or True:
366 options, args = cmdline_parse() 366 options, args = cmdline_parse()
367 367
368 elementary.init()
369
370 # elementary window 368 # elementary window
371 win = Window("test-emotion", ELM_WIN_BASIC) 369 win = Window("test-emotion", ELM_WIN_BASIC)
372 win.title_set("python-emotion test application") 370 win.title_set("python-emotion test application")
@@ -414,9 +412,3 @@ if __name__ == "__main__"or True:
414 del win.data["movie_windows"] 412 del win.data["movie_windows"]
415 win.delete() 413 win.delete()
416 del scene 414 del scene
417
418
419 elementary.shutdown()
420 emotion.shutdown()
421 edje.shutdown()
422 evas.shutdown()
diff --git a/tests/dbus/test_01_basics.py b/tests/dbus/test_01_basics.py
index 20e2944..183f5a9 100644
--- a/tests/dbus/test_01_basics.py
+++ b/tests/dbus/test_01_basics.py
@@ -40,4 +40,3 @@ class TestDBusBasics(unittest.TestCase):
40 40
41if __name__ == '__main__': 41if __name__ == '__main__':
42 unittest.main(verbosity=2) 42 unittest.main(verbosity=2)
43 ecore.shutdown()
diff --git a/tests/ecore/test_01_timer.py b/tests/ecore/test_01_timer.py
index 8d48a34..3a3609d 100644
--- a/tests/ecore/test_01_timer.py
+++ b/tests/ecore/test_01_timer.py
@@ -39,7 +39,7 @@ class TestTimer(unittest.TestCase):
39 39
40 self.assertEqual(before1, after1) 40 self.assertEqual(before1, after1)
41 self.assertEqual(before2, after2) 41 self.assertEqual(before2, after2)
42 self.assertNotEqual(before3, after3) # already deleted 42 self.assertNotEqual(before3, after3) # already deleted
43 self.assertNotEqual(before4, after4) # already deleted 43 self.assertNotEqual(before4, after4) # already deleted
44 44
45 self.assertEqual(t1.is_deleted(), False) 45 self.assertEqual(t1.is_deleted(), False)
@@ -57,4 +57,3 @@ class TestTimer(unittest.TestCase):
57 57
58if __name__ == '__main__': 58if __name__ == '__main__':
59 unittest.main(verbosity=2) 59 unittest.main(verbosity=2)
60 ecore.shutdown()
diff --git a/tests/ecore/test_02_animator.py b/tests/ecore/test_02_animator.py
index 102cffe..1542d04 100644
--- a/tests/ecore/test_02_animator.py
+++ b/tests/ecore/test_02_animator.py
@@ -52,4 +52,3 @@ class TestAnimator(unittest.TestCase):
52 52
53if __name__ == '__main__': 53if __name__ == '__main__':
54 unittest.main(verbosity=2) 54 unittest.main(verbosity=2)
55 ecore.shutdown()
diff --git a/tests/ecore/test_03_poller.py b/tests/ecore/test_03_poller.py
index 12a243b..91e5d50 100644
--- a/tests/ecore/test_03_poller.py
+++ b/tests/ecore/test_03_poller.py
@@ -22,7 +22,7 @@ def poller_cb2(one, two, three, test):
22 22
23class TestPoller(unittest.TestCase): 23class TestPoller(unittest.TestCase):
24 def testInit(self): 24 def testInit(self):
25 25
26 p1 = ecore.Poller(4, poller_cb) 26 p1 = ecore.Poller(4, poller_cb)
27 p2 = ecore.Poller(2, poller_cb2, ecore.ECORE_POLLER_CORE, 27 p2 = ecore.Poller(2, poller_cb2, ecore.ECORE_POLLER_CORE,
28 "uno", "due", three="tre", test=self) 28 "uno", "due", three="tre", test=self)
@@ -41,4 +41,3 @@ class TestPoller(unittest.TestCase):
41 41
42if __name__ == '__main__': 42if __name__ == '__main__':
43 unittest.main(verbosity=2) 43 unittest.main(verbosity=2)
44 ecore.shutdown()
diff --git a/tests/ecore/test_04_idler.py b/tests/ecore/test_04_idler.py
index 895516e..711cd52 100644
--- a/tests/ecore/test_04_idler.py
+++ b/tests/ecore/test_04_idler.py
@@ -20,7 +20,7 @@ class TestIdler(unittest.TestCase):
20 20
21 self.assertIsInstance(i1, ecore.Idler) 21 self.assertIsInstance(i1, ecore.Idler)
22 self.assertIsInstance(i2, ecore.Idler) 22 self.assertIsInstance(i2, ecore.Idler)
23 23
24 before1 = i1.__repr__() 24 before1 = i1.__repr__()
25 before2 = i2.__repr__() 25 before2 = i2.__repr__()
26 26
@@ -36,8 +36,8 @@ class TestIdler(unittest.TestCase):
36 self.assertEqual(t.is_deleted(), True) 36 self.assertEqual(t.is_deleted(), True)
37 self.assertEqual(i1.is_deleted(), False) 37 self.assertEqual(i1.is_deleted(), False)
38 self.assertEqual(i2.is_deleted(), True) 38 self.assertEqual(i2.is_deleted(), True)
39 39
40 40
41 i1.delete() 41 i1.delete()
42 del t 42 del t
43 del i1 43 del i1
@@ -46,4 +46,3 @@ class TestIdler(unittest.TestCase):
46 46
47if __name__ == '__main__': 47if __name__ == '__main__':
48 unittest.main(verbosity=2) 48 unittest.main(verbosity=2)
49 ecore.shutdown()
diff --git a/tests/ecore/test_05_idle_enterer.py b/tests/ecore/test_05_idle_enterer.py
index fce9624..0c0037a 100644
--- a/tests/ecore/test_05_idle_enterer.py
+++ b/tests/ecore/test_05_idle_enterer.py
@@ -63,4 +63,3 @@ class TestIdleEnterer(unittest.TestCase):
63 63
64if __name__ == '__main__': 64if __name__ == '__main__':
65 unittest.main(verbosity=2) 65 unittest.main(verbosity=2)
66 ecore.shutdown()
diff --git a/tests/ecore/test_06_idle_exiter.py b/tests/ecore/test_06_idle_exiter.py
index bab08fa..61ddfaa 100644
--- a/tests/ecore/test_06_idle_exiter.py
+++ b/tests/ecore/test_06_idle_exiter.py
@@ -51,7 +51,7 @@ class TestIdleExiter(unittest.TestCase):
51 self.assertEqual(t.is_deleted(), True) 51 self.assertEqual(t.is_deleted(), True)
52 self.assertEqual(i1.is_deleted(), False) 52 self.assertEqual(i1.is_deleted(), False)
53 self.assertEqual(i2.is_deleted(), True) 53 self.assertEqual(i2.is_deleted(), True)
54 54
55 i1.delete() 55 i1.delete()
56 del i1 56 del i1
57 del i2 # already deleted since returned false 57 del i2 # already deleted since returned false
@@ -62,4 +62,3 @@ class TestIdleExiter(unittest.TestCase):
62 62
63if __name__ == '__main__': 63if __name__ == '__main__':
64 unittest.main(verbosity=2) 64 unittest.main(verbosity=2)
65 ecore.shutdown()
diff --git a/tests/ecore/test_07_fd_handler.py b/tests/ecore/test_07_fd_handler.py
index 3159998..3d4b103 100644
--- a/tests/ecore/test_07_fd_handler.py
+++ b/tests/ecore/test_07_fd_handler.py
@@ -37,4 +37,3 @@ class TestFdHandler(unittest.TestCase):
37 37
38if __name__ == '__main__': 38if __name__ == '__main__':
39 unittest.main(verbosity=2) 39 unittest.main(verbosity=2)
40 ecore.shutdown()
diff --git a/tests/ecore/test_08_exe.py b/tests/ecore/test_08_exe.py
index 8aff8e8..bde2571 100644
--- a/tests/ecore/test_08_exe.py
+++ b/tests/ecore/test_08_exe.py
@@ -84,5 +84,3 @@ class TestExe(unittest.TestCase):
84 84
85if __name__ == '__main__': 85if __name__ == '__main__':
86 unittest.main(verbosity=2) 86 unittest.main(verbosity=2)
87 ecore.shutdown()
88
diff --git a/tests/ecore/test_09_file_download.py b/tests/ecore/test_09_file_download.py
index 65cec70..83c2927 100644
--- a/tests/ecore/test_09_file_download.py
+++ b/tests/ecore/test_09_file_download.py
@@ -26,11 +26,10 @@ class TestFileDownload(unittest.TestCase):
26 ecore.FileDownload("http://www.google.com", dst, 26 ecore.FileDownload("http://www.google.com", dst,
27 completion_cb = _completion_cb, 27 completion_cb = _completion_cb,
28 progress_cb = _progress_cb) 28 progress_cb = _progress_cb)
29 29
30 ecore.main_loop_begin() 30 ecore.main_loop_begin()
31 31
32 32
33 33
34if __name__ == '__main__': 34if __name__ == '__main__':
35 unittest.main(verbosity=2) 35 unittest.main(verbosity=2)
36 ecore.shutdown()
diff --git a/tests/ecore/test_10_file_monitor.py b/tests/ecore/test_10_file_monitor.py
index 9d3519e..162e322 100644
--- a/tests/ecore/test_10_file_monitor.py
+++ b/tests/ecore/test_10_file_monitor.py
@@ -82,4 +82,3 @@ class TestFileMonitor(unittest.TestCase):
82 82
83if __name__ == '__main__': 83if __name__ == '__main__':
84 unittest.main(verbosity=2) 84 unittest.main(verbosity=2)
85 ecore.shutdown()
diff --git a/tests/edje/TODO-edit/01-edje.py b/tests/edje/TODO-edit/01-edje.py
index 3b9bffd..6203c5e 100644
--- a/tests/edje/TODO-edit/01-edje.py
+++ b/tests/edje/TODO-edit/01-edje.py
@@ -239,6 +239,3 @@ class Basics(unittest.TestCase):
239edje.file_cache_set(0) 239edje.file_cache_set(0)
240suite = unittest.TestLoader().loadTestsFromTestCase(Basics) 240suite = unittest.TestLoader().loadTestsFromTestCase(Basics)
241unittest.TextTestRunner(verbosity=2).run(suite) 241unittest.TextTestRunner(verbosity=2).run(suite)
242edje.shutdown()
243ecore.evas.shutdown()
244
diff --git a/tests/edje/TODO-edit/02-group.py b/tests/edje/TODO-edit/02-group.py
index 5e7a0f8..c85a204 100644
--- a/tests/edje/TODO-edit/02-group.py
+++ b/tests/edje/TODO-edit/02-group.py
@@ -58,5 +58,3 @@ class Basics(unittest.TestCase):
58edje.file_cache_set(0) 58edje.file_cache_set(0)
59suite = unittest.TestLoader().loadTestsFromTestCase(Basics) 59suite = unittest.TestLoader().loadTestsFromTestCase(Basics)
60unittest.TextTestRunner(verbosity=2).run(suite) 60unittest.TextTestRunner(verbosity=2).run(suite)
61edje.shutdown()
62ecore.evas.shutdown()
diff --git a/tests/edje/TODO-edit/03-parts.py b/tests/edje/TODO-edit/03-parts.py
index 72d837e..cad0b81 100644
--- a/tests/edje/TODO-edit/03-parts.py
+++ b/tests/edje/TODO-edit/03-parts.py
@@ -91,5 +91,3 @@ class Basics(unittest.TestCase):
91edje.file_cache_set(0) 91edje.file_cache_set(0)
92suite = unittest.TestLoader().loadTestsFromTestCase(Basics) 92suite = unittest.TestLoader().loadTestsFromTestCase(Basics)
93unittest.TextTestRunner(verbosity=2).run(suite) 93unittest.TextTestRunner(verbosity=2).run(suite)
94edje.shutdown()
95ecore.evas.shutdown()
diff --git a/tests/edje/TODO-edit/04-states.py b/tests/edje/TODO-edit/04-states.py
index 270a598..ecae53e 100644
--- a/tests/edje/TODO-edit/04-states.py
+++ b/tests/edje/TODO-edit/04-states.py
@@ -68,5 +68,3 @@ class Basics(unittest.TestCase):
68edje.file_cache_set(0) 68edje.file_cache_set(0)
69suite = unittest.TestLoader().loadTestsFromTestCase(Basics) 69suite = unittest.TestLoader().loadTestsFromTestCase(Basics)
70unittest.TextTestRunner(verbosity=2).run(suite) 70unittest.TextTestRunner(verbosity=2).run(suite)
71edje.shutdown()
72ecore.evas.shutdown()
diff --git a/tests/edje/test_01_basics.py b/tests/edje/test_01_basics.py
index c639b0a..b015383 100644
--- a/tests/edje/test_01_basics.py
+++ b/tests/edje/test_01_basics.py
@@ -72,4 +72,3 @@ class TestBasics(unittest.TestCase):
72 72
73if __name__ == '__main__': 73if __name__ == '__main__':
74 unittest.main(verbosity=2) 74 unittest.main(verbosity=2)
75 edje.shutdown()
diff --git a/tests/edje/test_02_object.py b/tests/edje/test_02_object.py
index 98fe086..0650d84 100644
--- a/tests/edje/test_02_object.py
+++ b/tests/edje/test_02_object.py
@@ -124,6 +124,3 @@ class TestEdjeObject(unittest.TestCase):
124 124
125if __name__ == '__main__': 125if __name__ == '__main__':
126 unittest.main(verbosity=2) 126 unittest.main(verbosity=2)
127 edje.shutdown()
128 ecore.shutdown()
129 evas.shutdown()
diff --git a/tests/edje/test_03_external.py b/tests/edje/test_03_external.py
index ef164f5..ad52bb7 100644
--- a/tests/edje/test_03_external.py
+++ b/tests/edje/test_03_external.py
@@ -3,7 +3,6 @@
3import os, unittest 3import os, unittest
4 4
5from efl import evas 5from efl import evas
6from efl import ecore
7from efl import edje 6from efl import edje
8 7
9from efl.elementary.actionslider import Actionslider 8from efl.elementary.actionslider import Actionslider
@@ -370,8 +369,3 @@ class TestElementaryExternal(unittest.TestCase):
370 369
371if __name__ == '__main__': 370if __name__ == '__main__':
372 unittest.main(verbosity=2) 371 unittest.main(verbosity=2)
373
374 elementary.shutdown()
375 edje.shutdown()
376 ecore.shutdown()
377 evas.shutdown()
diff --git a/tests/edje/test_04_edit.py b/tests/edje/test_04_edit.py
index a558216..95e49bc 100644
--- a/tests/edje/test_04_edit.py
+++ b/tests/edje/test_04_edit.py
@@ -1,8 +1,6 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3from efl import evas 3from efl import evas
4from efl import ecore
5from efl import edje
6from efl.edje import EDJE_PART_TYPE_RECTANGLE 4from efl.edje import EDJE_PART_TYPE_RECTANGLE
7from efl.edje_edit import EdjeEdit, Text_Style, Text_Style_Tag, Color_Class, \ 5from efl.edje_edit import EdjeEdit, Text_Style, Text_Style_Tag, Color_Class, \
8 Part, Program 6 Part, Program
@@ -482,7 +480,3 @@ class TestEdjeEditPartStates(unittest.TestCase):
482 480
483if __name__ == '__main__': 481if __name__ == '__main__':
484 unittest.main(verbosity=2) 482 unittest.main(verbosity=2)
485 edje.shutdown()
486 ecore.shutdown()
487 evas.shutdown()
488
diff --git a/tests/edje/test_05_decorators.py b/tests/edje/test_05_decorators.py
index 1b7d8b3..ae27a10 100644
--- a/tests/edje/test_05_decorators.py
+++ b/tests/edje/test_05_decorators.py
@@ -80,6 +80,3 @@ class TestEdjeDecoratedCallbacks(unittest.TestCase):
80 80
81if __name__ == '__main__': 81if __name__ == '__main__':
82 unittest.main(verbosity=2) 82 unittest.main(verbosity=2)
83 edje.shutdown()
84 ecore.shutdown()
85 evas.shutdown()
diff --git a/tests/elementary/test_01_basics.py b/tests/elementary/test_01_basics.py
index a24c4fe..9ad3a6d 100644
--- a/tests/elementary/test_01_basics.py
+++ b/tests/elementary/test_01_basics.py
@@ -7,7 +7,6 @@ from efl import elementary
7from efl.elementary.window import Window, ELM_WIN_BASIC 7from efl.elementary.window import Window, ELM_WIN_BASIC
8from efl.elementary.button import Button 8from efl.elementary.button import Button
9 9
10elementary.init()
11 10
12def cb1(*args): 11def cb1(*args):
13 pass 12 pass
@@ -54,4 +53,3 @@ class TestElmBasics(unittest.TestCase):
54 53
55if __name__ == '__main__': 54if __name__ == '__main__':
56 unittest.main(verbosity=2) 55 unittest.main(verbosity=2)
57 elementary.shutdown()
diff --git a/tests/elementary/test_02_image_icon.py b/tests/elementary/test_02_image_icon.py
index 36d194c..dbb21b0 100644
--- a/tests/elementary/test_02_image_icon.py
+++ b/tests/elementary/test_02_image_icon.py
@@ -13,7 +13,6 @@ from efl.elementary.icon import Icon
13script_path = os.path.dirname(os.path.abspath(__file__)) 13script_path = os.path.dirname(os.path.abspath(__file__))
14img_path = os.path.join(script_path, "images") 14img_path = os.path.join(script_path, "images")
15 15
16elementary.init()
17 16
18class TestElmImage(unittest.TestCase): 17class TestElmImage(unittest.TestCase):
19 18
@@ -95,4 +94,3 @@ class TestElmIcon(unittest.TestCase):
95 94
96if __name__ == '__main__': 95if __name__ == '__main__':
97 unittest.main(verbosity=2) 96 unittest.main(verbosity=2)
98 elementary.shutdown()
diff --git a/tests/elementary/test_03_entry.py b/tests/elementary/test_03_entry.py
index 2b6bf1f..381e086 100644
--- a/tests/elementary/test_03_entry.py
+++ b/tests/elementary/test_03_entry.py
@@ -8,7 +8,6 @@ from efl import elementary
8from efl.elementary.window import Window, ELM_WIN_BASIC 8from efl.elementary.window import Window, ELM_WIN_BASIC
9from efl.elementary.entry import Entry 9from efl.elementary.entry import Entry
10 10
11elementary.init()
12 11
13class TestElmBasics(unittest.TestCase): 12class TestElmBasics(unittest.TestCase):
14 13
@@ -27,4 +26,3 @@ class TestElmBasics(unittest.TestCase):
27 26
28if __name__ == '__main__': 27if __name__ == '__main__':
29 unittest.main(verbosity=2) 28 unittest.main(verbosity=2)
30 elementary.shutdown()
diff --git a/tests/eo/test_01_basics.py b/tests/eo/test_01_basics.py
index a26ffe2..d45fe2c 100644
--- a/tests/eo/test_01_basics.py
+++ b/tests/eo/test_01_basics.py
@@ -23,4 +23,3 @@ class TestBasics(unittest.TestCase):
23 23
24if __name__ == '__main__': 24if __name__ == '__main__':
25 unittest.main(verbosity=2) 25 unittest.main(verbosity=2)
26 eo.shutdown()
diff --git a/tests/evas/test_01_rect.py b/tests/evas/test_01_rect.py
index 3e5d3c2..281a043 100644
--- a/tests/evas/test_01_rect.py
+++ b/tests/evas/test_01_rect.py
@@ -368,4 +368,3 @@ class TestRectClamp(unittest.TestCase):
368 368
369if __name__ == '__main__': 369if __name__ == '__main__':
370 unittest.main(verbosity=2) 370 unittest.main(verbosity=2)
371 evas.shutdown()
diff --git a/tests/evas/test_02_canvas.py b/tests/evas/test_02_canvas.py
index a9b236b..9c026bf 100644
--- a/tests/evas/test_02_canvas.py
+++ b/tests/evas/test_02_canvas.py
@@ -74,7 +74,7 @@ class TestCanvasProperties(unittest.TestCase):
74 74
75 75
76class TestCanvasDeletion(unittest.TestCase): 76class TestCanvasDeletion(unittest.TestCase):
77 def testEmptyCanvasDelete(self): 77 def testEmptyCanvasDelete(self):
78 canvas = _new_canvas() 78 canvas = _new_canvas()
79 canvas.delete() 79 canvas.delete()
80 80
@@ -100,12 +100,12 @@ class TestCanvasFactory(unittest.TestCase):
100 def tearDown(self): 100 def tearDown(self):
101 self.canvas.delete() 101 self.canvas.delete()
102 102
103 def testRectangle(self): 103 def testRectangle(self):
104 o = self.canvas.Rectangle() 104 o = self.canvas.Rectangle()
105 self.assertEqual(type(o), evas.Rectangle) 105 self.assertEqual(type(o), evas.Rectangle)
106 o.delete() 106 o.delete()
107 107
108 def testImage(self): 108 def testImage(self):
109 o = self.canvas.Image() 109 o = self.canvas.Image()
110 self.assertEqual(type(o), evas.Image) 110 self.assertEqual(type(o), evas.Image)
111 o.delete() 111 o.delete()
@@ -133,5 +133,3 @@ class TestCanvasFactory(unittest.TestCase):
133 133
134if __name__ == '__main__': 134if __name__ == '__main__':
135 unittest.main(verbosity=2) 135 unittest.main(verbosity=2)
136 evas.shutdown()
137
diff --git a/tests/evas/test_03_object.py b/tests/evas/test_03_object.py
index e350f4d..3a5c8d9 100644
--- a/tests/evas/test_03_object.py
+++ b/tests/evas/test_03_object.py
@@ -195,4 +195,3 @@ class TestObjectProperties(unittest.TestCase):
195 195
196if __name__ == '__main__': 196if __name__ == '__main__':
197 unittest.main(verbosity=2) 197 unittest.main(verbosity=2)
198 evas.shutdown()
diff --git a/tests/evas/test_04_object_box.py b/tests/evas/test_04_object_box.py
index c07e764..5062258 100644
--- a/tests/evas/test_04_object_box.py
+++ b/tests/evas/test_04_object_box.py
@@ -54,4 +54,3 @@ class TestBoxBasics(unittest.TestCase):
54 54
55if __name__ == '__main__': 55if __name__ == '__main__':
56 unittest.main(verbosity=2) 56 unittest.main(verbosity=2)
57 evas.shutdown()
diff --git a/tests/evas/test_05_object_image.py b/tests/evas/test_05_object_image.py
index 4a11d07..8f74ed8 100644
--- a/tests/evas/test_05_object_image.py
+++ b/tests/evas/test_05_object_image.py
@@ -27,4 +27,3 @@ class TestImageBasics(unittest.TestCase):
27 27
28if __name__ == '__main__': 28if __name__ == '__main__':
29 unittest.main(verbosity=2) 29 unittest.main(verbosity=2)
30 evas.shutdown()
diff --git a/tests/evas/test_06_object_smart.py b/tests/evas/test_06_object_smart.py
index 2a15ba8..8e13180 100644
--- a/tests/evas/test_06_object_smart.py
+++ b/tests/evas/test_06_object_smart.py
@@ -144,4 +144,3 @@ class SmartObjectTest(unittest.TestCase):
144 144
145if __name__ == '__main__': 145if __name__ == '__main__':
146 unittest.main(verbosity=2) 146 unittest.main(verbosity=2)
147 evas.shutdown()
diff --git a/tests/evas/test_07_object_line.py b/tests/evas/test_07_object_line.py
index ce960b4..b06988c 100644
--- a/tests/evas/test_07_object_line.py
+++ b/tests/evas/test_07_object_line.py
@@ -24,4 +24,3 @@ class TestLineBasics(unittest.TestCase):
24 24
25if __name__ == '__main__': 25if __name__ == '__main__':
26 unittest.main(verbosity=2) 26 unittest.main(verbosity=2)
27 evas.shutdown()
diff --git a/tests/evas/test_08_object_polygon.py b/tests/evas/test_08_object_polygon.py
index b38a913..b24e8e4 100644
--- a/tests/evas/test_08_object_polygon.py
+++ b/tests/evas/test_08_object_polygon.py
@@ -23,4 +23,3 @@ class TestPolygonBasics(unittest.TestCase):
23 23
24if __name__ == '__main__': 24if __name__ == '__main__':
25 unittest.main(verbosity=2) 25 unittest.main(verbosity=2)
26 evas.shutdown()
diff --git a/tests/evas/test_09_object_text.py b/tests/evas/test_09_object_text.py
index 824d20e..32d599f 100644
--- a/tests/evas/test_09_object_text.py
+++ b/tests/evas/test_09_object_text.py
@@ -23,4 +23,3 @@ class TestTextBasics(unittest.TestCase):
23 23
24if __name__ == '__main__': 24if __name__ == '__main__':
25 unittest.main(verbosity=2) 25 unittest.main(verbosity=2)
26 evas.shutdown()
diff --git a/tests/evas/test_10_object_textblock.py b/tests/evas/test_10_object_textblock.py
index 8e12f12..0469c9b 100644
--- a/tests/evas/test_10_object_textblock.py
+++ b/tests/evas/test_10_object_textblock.py
@@ -23,4 +23,3 @@ class TestTextblockBasics(unittest.TestCase):
23 23
24if __name__ == '__main__': 24if __name__ == '__main__':
25 unittest.main(verbosity=2) 25 unittest.main(verbosity=2)
26 evas.shutdown()
diff --git a/tests/evas/test_11_object_textgrid.py b/tests/evas/test_11_object_textgrid.py
index 9a9d6d8..b668639 100644
--- a/tests/evas/test_11_object_textgrid.py
+++ b/tests/evas/test_11_object_textgrid.py
@@ -38,4 +38,3 @@ class TestTextgridBasics(unittest.TestCase):
38 38
39if __name__ == '__main__': 39if __name__ == '__main__':
40 unittest.main(verbosity=2) 40 unittest.main(verbosity=2)
41 evas.shutdown()