diff options
author | Kai Huuhko <kai.huuhko@gmail.com> | 2015-05-04 03:35:50 +0300 |
---|---|---|
committer | Kai Huuhko <kai.huuhko@gmail.com> | 2015-05-04 03:36:54 +0300 |
commit | bc0f40e54c4790bd106b904eb0842fc46b42ee15 (patch) | |
tree | f914786783bdffed98136a1b5ffdf64fa631418a | |
parent | 532bc85acd69d4cc605ee015fe3e60ecd8e54b0b (diff) |
Add automated init/shutdown to rest of the modules
-rw-r--r-- | efl/ecore_x/efl.ecore_x.pyx | 5 | ||||
-rw-r--r-- | efl/edje/efl.edje.pyx | 8 | ||||
-rw-r--r-- | efl/emotion/efl.emotion.pyx | 3 | ||||
-rw-r--r-- | efl/ethumb/efl.ethumb.pyx | 3 |
4 files changed, 15 insertions, 4 deletions
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 @@ | |||
19 | from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String | 19 | from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String |
20 | from efl.utils.deprecated cimport DEPRECATED | 20 | from efl.utils.deprecated cimport DEPRECATED |
21 | 21 | ||
22 | import atexit | ||
23 | |||
22 | 24 | ||
23 | def init(name=None): | 25 | def 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 | ||
323 | include "efl.ecore_x_window.pxi" | 325 | include "efl.ecore_x_window.pxi" |
324 | include "efl.ecore_x_events.pxi" | 326 | include "efl.ecore_x_events.pxi" |
327 | |||
328 | init() | ||
329 | atexit.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 | |||
34 | import traceback | ||
35 | import warnings | ||
36 | |||
37 | from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String | 33 | from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String |
38 | cimport libc.stdlib | 34 | cimport libc.stdlib |
39 | from libc.stdint cimport uintptr_t | 35 | from libc.stdint cimport uintptr_t |
@@ -45,6 +41,9 @@ from efl.eo cimport _object_mapping_register, object_from_instance, \ | |||
45 | from efl.utils.conversions cimport _ctouni, _touni, \ | 41 | from efl.utils.conversions cimport _ctouni, _touni, \ |
46 | eina_list_strings_to_python_list | 42 | eina_list_strings_to_python_list |
47 | 43 | ||
44 | import traceback | ||
45 | import warnings | ||
46 | import atexit | ||
48 | 47 | ||
49 | 48 | ||
50 | def init(): | 49 | def init(): |
@@ -288,3 +287,4 @@ include "efl.edje_object.pxi" | |||
288 | 287 | ||
289 | 288 | ||
290 | init() | 289 | init() |
290 | atexit.register(shutdown) | ||
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 | |||
41 | from efl.evas cimport Canvas, evas_object_smart_callback_add, \ | 41 | from efl.evas cimport Canvas, evas_object_smart_callback_add, \ |
42 | evas_object_smart_callback_del | 42 | evas_object_smart_callback_del |
43 | 43 | ||
44 | import atexit | ||
45 | |||
44 | 46 | ||
45 | cdef void _emotion_callback(void *data, Evas_Object *o, void *ei) with gil: | 47 | cdef 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 | ||
1287 | init() | 1289 | init() |
1290 | atexit.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 | ||
18 | import atexit | ||
19 | |||
18 | def init(): | 20 | def init(): |
19 | return ethumb_init() | 21 | return ethumb_init() |
20 | 22 | ||
@@ -28,3 +30,4 @@ cdef class PyEthumb: | |||
28 | 30 | ||
29 | 31 | ||
30 | init() | 32 | init() |
33 | atexit.register(shutdown) | ||