summaryrefslogtreecommitdiff
path: root/efl/ecore
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2013-02-14 20:54:53 +0000
committerDavide Andreoli <dave@gurumeditation.it>2013-02-14 20:54:53 +0000
commit744fab5c922c26fa96e386f073a7879d5f89d307 (patch)
tree10de3e9a23dff2b06422bee67ada4a31bc173ea8 /efl/ecore
parent69832134e77b1d8b1f1d47a1eb499c73f542ad42 (diff)
New line chars from CR/LF to LF
SVN revision: 83924
Diffstat (limited to 'efl/ecore')
-rw-r--r--efl/ecore/efl.ecore.pyx278
1 files changed, 139 insertions, 139 deletions
diff --git a/efl/ecore/efl.ecore.pyx b/efl/ecore/efl.ecore.pyx
index 3e75e77..7198f0b 100644
--- a/efl/ecore/efl.ecore.pyx
+++ b/efl/ecore/efl.ecore.pyx
@@ -1,139 +1,139 @@
1# Copyright (C) 2007-2013 various contributors (see AUTHORS) 1# Copyright (C) 2007-2013 various contributors (see AUTHORS)
2# 2#
3# This file is part of Python-EFL. 3# This file is part of Python-EFL.
4# 4#
5# Python-EFL is free software; you can redistribute it and/or 5# Python-EFL is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public 6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either 7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version. 8# version 2.1 of the License, or (at your option) any later version.
9# 9#
10# Python-EFL is distributed in the hope that it will be useful, 10# Python-EFL is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details. 13# Lesser General Public License for more details.
14# 14#
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 traceback 18import traceback
19from efl.eo cimport Eo 19from efl.eo cimport Eo
20from efl.eo cimport _fruni, _cfruni 20from efl.eo cimport _fruni, _cfruni
21from efl.eo cimport PY_REFCOUNT 21from efl.eo cimport PY_REFCOUNT
22from cpython cimport Py_INCREF, Py_DECREF 22from cpython cimport Py_INCREF, Py_DECREF
23 23
24 24
25ECORE_CALLBACK_CANCEL = 0 25ECORE_CALLBACK_CANCEL = 0
26ECORE_CALLBACK_RENEW = 1 26ECORE_CALLBACK_RENEW = 1
27 27
28# Ecore_Fd_Handler_Flags: 28# Ecore_Fd_Handler_Flags:
29ECORE_FD_READ = 1 29ECORE_FD_READ = 1
30ECORE_FD_WRITE = 2 30ECORE_FD_WRITE = 2
31ECORE_FD_ERROR = 4 31ECORE_FD_ERROR = 4
32ECORE_FD_ALL = 7 32ECORE_FD_ALL = 7
33 33
34 34
35# Ecore_Exe_Flags: 35# Ecore_Exe_Flags:
36ECORE_EXE_PIPE_READ = 1 36ECORE_EXE_PIPE_READ = 1
37ECORE_EXE_PIPE_WRITE = 2 37ECORE_EXE_PIPE_WRITE = 2
38ECORE_EXE_PIPE_ERROR = 4 38ECORE_EXE_PIPE_ERROR = 4
39ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8 39ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8
40ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16 40ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16
41ECORE_EXE_PIPE_AUTO = 32 41ECORE_EXE_PIPE_AUTO = 32
42ECORE_EXE_RESPAWN = 64 42ECORE_EXE_RESPAWN = 64
43ECORE_EXE_USE_SH = 128 43ECORE_EXE_USE_SH = 128
44ECORE_EXE_NOT_LEADER = 256 44ECORE_EXE_NOT_LEADER = 256
45ECORE_EXE_TERM_WITH_PARENT = 512 45ECORE_EXE_TERM_WITH_PARENT = 512
46 46
47ECORE_EXE_PRIORITY_INHERIT = 9999 47ECORE_EXE_PRIORITY_INHERIT = 9999
48 48
49 49
50# Ecore_File_Progress_Return: 50# Ecore_File_Progress_Return:
51ECORE_FILE_PROGRESS_CONTINUE = 0 51ECORE_FILE_PROGRESS_CONTINUE = 0
52ECORE_FILE_PROGRESS_ABORT = 1 52ECORE_FILE_PROGRESS_ABORT = 1
53 53
54 54
55cdef Eina_Bool _ecore_task_cb(void *data) with gil: 55cdef Eina_Bool _ecore_task_cb(void *data) with gil:
56 cdef Eo obj = <Eo>data 56 cdef Eo obj = <Eo>data
57 cdef Eina_Bool ret 57 cdef Eina_Bool ret
58 58
59 try: 59 try:
60 ret = bool(obj._task_exec()) 60 ret = bool(obj._task_exec())
61 except Exception, e: 61 except Exception, e:
62 traceback.print_exc() 62 traceback.print_exc()
63 ret = 0 63 ret = 0
64 64
65 if not ret: 65 if not ret:
66 obj.delete() 66 obj.delete()
67 67
68 return ret 68 return ret
69 69
70 70
71cdef int _ecore_events_registered = 0 71cdef int _ecore_events_registered = 0
72 72
73 73
74def init(): 74def init():
75 global _ecore_events_registered 75 global _ecore_events_registered
76 76
77 r = ecore_init() 77 r = ecore_init()
78 78
79 if r > 0 and _ecore_events_registered == 0: 79 if r > 0 and _ecore_events_registered == 0:
80 _ecore_events_registered = 1 80 _ecore_events_registered = 1
81 81
82 global _event_type_mapping 82 global _event_type_mapping
83 _event_type_mapping = { 83 _event_type_mapping = {
84 ECORE_EVENT_SIGNAL_USER: EventSignalUser, 84 ECORE_EVENT_SIGNAL_USER: EventSignalUser,
85 ECORE_EVENT_SIGNAL_HUP: EventSignalHup, 85 ECORE_EVENT_SIGNAL_HUP: EventSignalHup,
86 ECORE_EVENT_SIGNAL_EXIT: EventSignalExit, 86 ECORE_EVENT_SIGNAL_EXIT: EventSignalExit,
87 ECORE_EVENT_SIGNAL_POWER: EventSignalPower, 87 ECORE_EVENT_SIGNAL_POWER: EventSignalPower,
88 ECORE_EVENT_SIGNAL_REALTIME: EventSignalRealtime, 88 ECORE_EVENT_SIGNAL_REALTIME: EventSignalRealtime,
89 ECORE_EXE_EVENT_ADD: EventExeAdd, 89 ECORE_EXE_EVENT_ADD: EventExeAdd,
90 ECORE_EXE_EVENT_DEL: EventExeDel, 90 ECORE_EXE_EVENT_DEL: EventExeDel,
91 ECORE_EXE_EVENT_DATA: EventExeData, 91 ECORE_EXE_EVENT_DATA: EventExeData,
92 ECORE_EXE_EVENT_ERROR: EventExeData, 92 ECORE_EXE_EVENT_ERROR: EventExeData,
93 } 93 }
94 94
95 ecore_file_init() 95 ecore_file_init()
96 return r 96 return r
97 97
98 98
99def shutdown(): 99def shutdown():
100 ecore_file_shutdown() 100 ecore_file_shutdown()
101 return ecore_shutdown() 101 return ecore_shutdown()
102 102
103 103
104def main_loop_quit(): 104def main_loop_quit():
105 ecore_main_loop_quit() 105 ecore_main_loop_quit()
106 106
107 107
108def main_loop_begin(): 108def main_loop_begin():
109 with nogil: 109 with nogil:
110 ecore_main_loop_begin() 110 ecore_main_loop_begin()
111 111
112 112
113def main_loop_iterate(): 113def main_loop_iterate():
114 with nogil: 114 with nogil:
115 ecore_main_loop_iterate() 115 ecore_main_loop_iterate()
116 116
117 117
118def main_loop_glib_integrate(): 118def main_loop_glib_integrate():
119 if not ecore_main_loop_glib_integrate(): 119 if not ecore_main_loop_glib_integrate():
120 raise SystemError("failed to integrate GLib main loop into ecore.") 120 raise SystemError("failed to integrate GLib main loop into ecore.")
121 121
122 122
123def time_get(): 123def time_get():
124 return ecore_time_get() 124 return ecore_time_get()
125 125
126 126
127def loop_time_get(): 127def loop_time_get():
128 return ecore_loop_time_get() 128 return ecore_loop_time_get()
129 129
130 130
131include "efl.ecore_animator.pxi" 131include "efl.ecore_animator.pxi"
132include "efl.ecore_timer.pxi" 132include "efl.ecore_timer.pxi"
133include "efl.ecore_idler.pxi" 133include "efl.ecore_idler.pxi"
134include "efl.ecore_fd_handler.pxi" 134include "efl.ecore_fd_handler.pxi"
135include "efl.ecore_events.pxi" 135include "efl.ecore_events.pxi"
136include "efl.ecore_exe.pxi" 136include "efl.ecore_exe.pxi"
137include "efl.ecore_file_download.pxi" 137include "efl.ecore_file_download.pxi"
138 138
139init() 139init()