summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2012-12-10 09:51:36 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2012-12-10 09:51:36 +0200
commit7eedd55a8522c04638e6f0918d681a568dc33f4b (patch)
treea65f05128a7309b3834faf3e5af4dcd241d3974a
parent88c4f720ba1813fa8a1680e46ba341870987767b (diff)
Typo
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>
-rw-r--r--DEV_README130
1 files changed, 65 insertions, 65 deletions
diff --git a/DEV_README b/DEV_README
index c6a2017..ccd06bb 100644
--- a/DEV_README
+++ b/DEV_README
@@ -2,7 +2,7 @@
2Yakov Goldberg <yakov.g@samsung.com> 2Yakov Goldberg <yakov.g@samsung.com>
3 3
4EO introspection is set of tools to generate high-level 4EO introspection is set of tools to generate high-level
5language bindings for C libraries based on Eo(E Object) library, 5language bindings for C libraries based on Eo (E Object) library,
6 Usual workflow: 6 Usual workflow:
7 - parsing C-sources and generating XML 7 - parsing C-sources and generating XML
8 - generating source files, makefiles 8 - generating source files, makefiles
@@ -10,11 +10,11 @@ language bindings for C libraries based on Eo(E Object) library,
10 - compile module 10 - compile module
11 11
12 This document describes current development issues, 12 This document describes current development issues,
13 and supposes, that reader has some knowledge 13 and supposes that reader has some knowledge
14 about Eo, Elementary, Python and JS bindings 14 about Eo, Elementary, Python and JS bindings
15 15
16 16
17Generating function names 17* Generating function names
18 18
19 Issues: 19 Issues:
20 Names of funcs to be generated, name clashes. 20 Names of funcs to be generated, name clashes.
@@ -36,14 +36,14 @@ Generating function names
36 There shouldn't be function overloading at all, that's all done 36 There shouldn't be function overloading at all, that's all done
37 in library itself, in bindings I call only for most base func. 37 in library itself, in bindings I call only for most base func.
38 38
39 Contflict should be resolved in library itself. If we want single 39 Conflict should be resolved in library itself. If we want single
40 'color_set()' for all classes, they need to be overloaded 40 'color_set()' for all classes, they need to be overloaded
41 in proper way. 41 in proper way.
42 42
43 At the moment full names like some_class_color_set() and 43 At the moment full names like some_class_color_set() and
44 another_class_color_set() will be generated. 44 another_class_color_set() will be generated.
45 45
46Properties names parsing 46* Properties names parsing
47 If func name ends with '_set'/'_get' 47 If func name ends with '_set'/'_get'
48 parameters are checked on direction 'in' for 'set' prop 48 parameters are checked on direction 'in' for 'set' prop
49 and on 'out' for 'get' prop. 49 and on 'out' for 'get' prop.
@@ -53,9 +53,9 @@ Properties names parsing
53 53
54 54
55 55
56Parameter's Types; 56* Parameter's Types;
57 Basic types can be detected; 57 Basic types can be detected;
58 also "types" file can be provided which says how to cas to basic types: 58 also "types" file can be provided which says how to cast to basic types:
59 <type from="Evas_Font_Size" to="int"/> 59 <type from="Evas_Font_Size" to="int"/>
60 <type from="Eo_Callback_Priority" to="short"/> 60 <type from="Eo_Callback_Priority" to="short"/>
61 <type from="Evas_Smart" to="Eo"/> 61 <type from="Evas_Smart" to="Eo"/>
@@ -63,11 +63,11 @@ Parameter's Types;
63 if some type wasn't found, function will not be generated. 63 if some type wasn't found, function will not be generated.
64 64
65 Issues: 65 Issues:
66 Types like Eina_List, arrays, structs? 66 Types like Eina_List, arrays, structs need wrapping to Python types
67 can be done by providing descriptions(comments), but requires work. 67 can be done by providing descriptions(comments), but requires work.
68 68
69 Returning existing Object or new one. 69 Returning existing Object or new one.
70 Need to check returning instance with eo_base_data_get(); 70 Need to check returning instance with eo_base_data_get("Python instance");
71 if o != NULL: 71 if o != NULL:
72 return o 72 return o
73 else: ( need to create one:) 73 else: ( need to create one:)
@@ -78,7 +78,7 @@ Parameter's Types;
78 Requires work. 78 Requires work.
79 79
80 80
81Constructing object: 81* Constructing object:
82 Now objects are constructed with default constuctor. 82 Now objects are constructed with default constuctor.
83 Some classes provide custom constructors and some ONLY custom constructors. 83 Some classes provide custom constructors and some ONLY custom constructors.
84 84
@@ -107,71 +107,71 @@ Constructing object:
107 and provide the way to parse argv[] in __init__ func? 107 and provide the way to parse argv[] in __init__ func?
108 108
109 109
110Callbacks in Python. 110* Callbacks in Python.
111 Issues: 111 Issues:
112 Pass data to callback. 112 Pass data to callback.
113 Add callback to Evas_Object 113 Add callback to Evas_Object
114 114
115 Description: 115 Description:
116 All callbacks are added to Eo object on registered event in this/parent class. 116 All callbacks are added to Eo object on registered event in this/parent class.
117 To add callback EoBase.event_callback_priority_add() is used. 117 To add callback EoBase.event_callback_priority_add() is used.
118 Callback can be added for introspected events. 118 Callback can be added for introspected events.
119 119
120 Adding callback: 120 Adding callback:
121 121
122 func(obj, data) 122 func(obj, data)
123 123
124 cb_obj = (func, data) 124 cb_obj = (func, data)
125 py_obj.event_callback_priority_add(class.EVENT_ID, 0, cb_obj) 125 py_obj.event_callback_priority_add(class.EVENT_ID, 0, cb_obj)
126 py_obj.event_callback_del(class.EVENT_ID, cb_obj) 126 py_obj.event_callback_del(class.EVENT_ID, cb_obj)
127 127
128 it's also possible to add callback like this: 128 it's also possible to add callback like this:
129 129
130 py_obj.event_callback_priority_add(class.EVENT_ID, 0, (func, data)) 130 py_obj.event_callback_priority_add(class.EVENT_ID, 0, (func, data))
131 131
132 reference of (func, data) object is incremented, 132 reference of (func, data) object is incremented,
133 so callback will be called properly. 133 so callback will be called properly.
134 But it won't be possible to delete it. 134 But it won't be possible to delete it.
135
136 What's going on inside:
137 Proxy _callback() function(eo signature) is added to real C
138 object for desired event; Py cb_obj is set as data.
139 When event occurs, _callback() is called with data; Py func and data are fetched
140 and Py cb is called.
141
142 Maybe it's not the best idea to add data like this, but the idea
143 is to give Eo as much work as possible.
144 So no internal lists are managed to pass and keep
145 callback data as (*args **kwargs).
146
147
148 Adding callbacks to Evas_Object:
149 In C, callbacks are added with evas_object_event_callback_add(),
150 which is not in eo indrospection at all.
151 Evas Events are also not in introspection scope,
152 because they are not added to Eo objects.
135 153
136 What's going on inside: 154 Issue:
137 Proxy _callback() function(eo signature) is added to real C 155 What to do with Evas events?
138 object for desired event; Py cb_obj is set as data. 156 It's possible to add stuff manually:
139 When event occurs, _callback() is called with data; Py func and data are fetched 157 - define extern evas_object_event_callback_add()
140 and Py cb is called. 158 - define extern event's enum
141 159 - define public event_add/del funcs for class
142 Maybe it's not the best idea to add data like this, but the idea
143 is to give Eo as much work as possible.
144 So no internal lists are managed to pass and keep
145 callback data as (*args **kwargs).
146
147
148 Adding callbacks to Evas_Object:
149 In C callbacks are added with evas_object_event_callback_add(),
150 which is not in eo indrospection at all.
151 Evas Events are also not in introspection scope,
152 because they are not added to Eo objects.
153
154 Issue:
155 What to do with Evas events?
156 It's possible to add stuff manually:
157 - define extern evas_object_event_callback_add()
158 - define extern event's enum
159 - define public event_add/del funcs for class
160 160
161Callbacks in JS: 161* Callbacks in JS:
162 In elev8 one callback per event was implemented, without adding cb data. 162 In elev8 one callback per event was implemented, without adding cb data.
163 163
164 There are some ideas how to put several callbacks and data if needed, but it must be checked. 164 There are some ideas how to put several callbacks and data if needed, but it must be checked.
165 165
166 166
167Adding elm_init() and other additional funcs 167* Adding elm_init() and other additional funcs
168 168
169 Sometimes some additional functions like elm_init(), elm_run() 169 Sometimes some additional functions like elm_init(), elm_run()
170 are needed. These functions are not introspectable, 170 are needed. These functions are not introspectable,
171 they must be added manually. 171 they must be added manually.
172 172
173 Example for python: 173 Example for python:
174 To do this user must provide definitions in *.pxd, *.pxi files, 174 To do this, the user must provide definitions in *.pxd, *.pxi files,
175 include *.pxi into generated 'module_name.pyx' file and compile. 175 include *.pxi into generated 'module_name.pyx' file and compile.
176 176
177 Usual workflow: 177 Usual workflow:
@@ -181,10 +181,10 @@ Adding elm_init() and other additional funcs
181 - compile module 181 - compile module
182 182
183 183
184Enums from headers. 184* Enums from headers.
185 Need to provide descriptions(comments), to understand how to fetch it 185 Need to provide descriptions(comments), to understand how to fetch it
186 186
187Issues about elementary: 187* Issues about elementary:
188 After parsing sources, found headers are included 188 After parsing sources, found headers are included
189 into generated files. 189 into generated files.
190 190