summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2015-05-04 03:35:50 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2015-05-04 03:36:54 +0300
commitbc0f40e54c4790bd106b904eb0842fc46b42ee15 (patch)
treef914786783bdffed98136a1b5ffdf64fa631418a
parent532bc85acd69d4cc605ee015fe3e60ecd8e54b0b (diff)
Add automated init/shutdown to rest of the modules
-rw-r--r--efl/ecore_x/efl.ecore_x.pyx5
-rw-r--r--efl/edje/efl.edje.pyx8
-rw-r--r--efl/emotion/efl.emotion.pyx3
-rw-r--r--efl/ethumb/efl.ethumb.pyx3
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 @@
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/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)