aboutsummaryrefslogtreecommitdiffstats
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
parentDEV_README updated (diff)
downloadeo_bindings-7eedd55a8522c04638e6f0918d681a568dc33f4b.tar.gz
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 @@
Yakov Goldberg <yakov.g@samsung.com>
EO introspection is set of tools to generate high-level
-language bindings for C libraries based on Eo(E Object) library,
+language bindings for C libraries based on Eo (E Object) library,
Usual workflow:
- parsing C-sources and generating XML
- generating source files, makefiles
@@ -10,11 +10,11 @@ language bindings for C libraries based on Eo(E Object) library,
- compile module
This document describes current development issues,
- and supposes, that reader has some knowledge
+ and supposes that reader has some knowledge
about Eo, Elementary, Python and JS bindings
-Generating function names
+* Generating function names
Issues:
Names of funcs to be generated, name clashes.
@@ -36,14 +36,14 @@ Generating function names
There shouldn't be function overloading at all, that's all done
in library itself, in bindings I call only for most base func.
- Contflict should be resolved in library itself. If we want single
+ Conflict should be resolved in library itself. If we want single
'color_set()' for all classes, they need to be overloaded
in proper way.
At the moment full names like some_class_color_set() and
another_class_color_set() will be generated.
-Properties names parsing
+* Properties names parsing
If func name ends with '_set'/'_get'
parameters are checked on direction 'in' for 'set' prop
and on 'out' for 'get' prop.
@@ -53,9 +53,9 @@ Properties names parsing
-Parameter's Types;
+* Parameter's Types;
Basic types can be detected;
- also "types" file can be provided which says how to cas to basic types:
+ also "types" file can be provided which says how to cast to basic types:
<type from="Evas_Font_Size" to="int"/>
<type from="Eo_Callback_Priority" to="short"/>
<type from="Evas_Smart" to="Eo"/>
@@ -63,11 +63,11 @@ Parameter's Types;
if some type wasn't found, function will not be generated.
Issues:
- Types like Eina_List, arrays, structs?
+ Types like Eina_List, arrays, structs need wrapping to Python types
can be done by providing descriptions(comments), but requires work.
Returning existing Object or new one.
- Need to check returning instance with eo_base_data_get();
+ Need to check returning instance with eo_base_data_get("Python instance");
if o != NULL:
return o
else: ( need to create one:)
@@ -78,7 +78,7 @@ Parameter's Types;
Requires work.
-Constructing object:
+* Constructing object:
Now objects are constructed with default constuctor.
Some classes provide custom constructors and some ONLY custom constructors.
@@ -107,71 +107,71 @@ Constructing object:
and provide the way to parse argv[] in __init__ func?
-Callbacks in Python.
- Issues:
- Pass data to callback.
- Add callback to Evas_Object
-
- Description:
- All callbacks are added to Eo object on registered event in this/parent class.
- To add callback EoBase.event_callback_priority_add() is used.
- Callback can be added for introspected events.
-
- Adding callback:
-
- func(obj, data)
-
- cb_obj = (func, data)
- py_obj.event_callback_priority_add(class.EVENT_ID, 0, cb_obj)
- py_obj.event_callback_del(class.EVENT_ID, cb_obj)
-
- it's also possible to add callback like this:
-
- py_obj.event_callback_priority_add(class.EVENT_ID, 0, (func, data))
-
- reference of (func, data) object is incremented,
- so callback will be called properly.
- But it won't be possible to delete it.
+* Callbacks in Python.
+ Issues:
+ Pass data to callback.
+ Add callback to Evas_Object
+
+ Description:
+ All callbacks are added to Eo object on registered event in this/parent class.
+ To add callback EoBase.event_callback_priority_add() is used.
+ Callback can be added for introspected events.
+
+ Adding callback:
+
+ func(obj, data)
+
+ cb_obj = (func, data)
+ py_obj.event_callback_priority_add(class.EVENT_ID, 0, cb_obj)
+ py_obj.event_callback_del(class.EVENT_ID, cb_obj)
+
+ it's also possible to add callback like this:
+
+ py_obj.event_callback_priority_add(class.EVENT_ID, 0, (func, data))
+
+ reference of (func, data) object is incremented,
+ so callback will be called properly.
+ But it won't be possible to delete it.
+
+ What's going on inside:
+ Proxy _callback() function(eo signature) is added to real C
+ object for desired event; Py cb_obj is set as data.
+ When event occurs, _callback() is called with data; Py func and data are fetched
+ and Py cb is called.
+
+ Maybe it's not the best idea to add data like this, but the idea
+ is to give Eo as much work as possible.
+ So no internal lists are managed to pass and keep
+ callback data as (*args **kwargs).
+
+
+ Adding callbacks to Evas_Object:
+ In C, callbacks are added with evas_object_event_callback_add(),
+ which is not in eo indrospection at all.
+ Evas Events are also not in introspection scope,
+ because they are not added to Eo objects.
- What's going on inside:
- Proxy _callback() function(eo signature) is added to real C
- object for desired event; Py cb_obj is set as data.
- When event occurs, _callback() is called with data; Py func and data are fetched
- and Py cb is called.
-
- Maybe it's not the best idea to add data like this, but the idea
- is to give Eo as much work as possible.
- So no internal lists are managed to pass and keep
- callback data as (*args **kwargs).
-
-
- Adding callbacks to Evas_Object:
- In C callbacks are added with evas_object_event_callback_add(),
- which is not in eo indrospection at all.
- Evas Events are also not in introspection scope,
- because they are not added to Eo objects.
-
- Issue:
- What to do with Evas events?
- It's possible to add stuff manually:
- - define extern evas_object_event_callback_add()
- - define extern event's enum
- - define public event_add/del funcs for class
+ Issue:
+ What to do with Evas events?
+ It's possible to add stuff manually:
+ - define extern evas_object_event_callback_add()
+ - define extern event's enum
+ - define public event_add/del funcs for class
-Callbacks in JS:
+* Callbacks in JS:
In elev8 one callback per event was implemented, without adding cb data.
There are some ideas how to put several callbacks and data if needed, but it must be checked.
-Adding elm_init() and other additional funcs
+* Adding elm_init() and other additional funcs
Sometimes some additional functions like elm_init(), elm_run()
are needed. These functions are not introspectable,
they must be added manually.
Example for python:
- To do this user must provide definitions in *.pxd, *.pxi files,
+ To do this, the user must provide definitions in *.pxd, *.pxi files,
include *.pxi into generated 'module_name.pyx' file and compile.
Usual workflow:
@@ -181,10 +181,10 @@ Adding elm_init() and other additional funcs
- compile module
-Enums from headers.
- Need to provide descriptions(comments), to understand how to fetch it
+* Enums from headers.
+ Need to provide descriptions(comments), to understand how to fetch it
-Issues about elementary:
+* Issues about elementary:
After parsing sources, found headers are included
into generated files.