summaryrefslogtreecommitdiff
path: root/include/efl.c_eo.pxd
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2013-02-11 22:32:50 +0000
committerDavide Andreoli <dave@gurumeditation.it>2013-02-11 22:32:50 +0000
commit8b8639886059814a36f57164d5572e97bcb00a47 (patch)
tree1c5a170de002793c1402d6afcc16c63115d81caa /include/efl.c_eo.pxd
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything that now is in the python folder. Atm this include evas, ecore, edje, elementary and emotion (emotion still commented in the build couse it need some more testing). Eo is used as a base for all the objects that inherit from it in C, but in real nothing is used from Eo, it is used more like a container to share code between the libs. All the docs has been stripped out because we want to use the new sphinx style docs that Kay has done in his git repo. (Kay: please wait a little bit to include it, as working on the libs without docs is much more easy) The new wrappers include a new container module called efl and thus you can live with both the old and the new installation. This also means that you need to import the new modules as: "from efl import evas" (instead of the old "import evas") The idea here is that you can make your code works with both version doing something like: try: import evas except: from efl import evas ...like is done in the gtk bindings Some stuff has been leaved out on purpose, because was old stuff (like the hacked evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX modules). See the TODO.txt file for more info. Probably some stuff is out just because I missed them, let me know if you miss something. Improvements from the old version: - Py3 compatible (still some work to be done, but really only TODO, no problems to resolv) - Should also works on other platforms, like windoz (but not tested) - Unittests greatly improved, you can also run ALL tests at once - much more simpler :) I will contine the works in the next weeks and hope someone will help too. NOTE: I switched back to setup.py instead of autotools, because that is the right way to compile python stuff. So to build just use: python setup.py install or python3 setup.py install Enjoy davemds SVN revision: 83831
Diffstat (limited to 'include/efl.c_eo.pxd')
-rw-r--r--include/efl.c_eo.pxd89
1 files changed, 89 insertions, 0 deletions
diff --git a/include/efl.c_eo.pxd b/include/efl.c_eo.pxd
new file mode 100644
index 0000000..0454489
--- /dev/null
+++ b/include/efl.c_eo.pxd
@@ -0,0 +1,89 @@
1######################################################################
2# Python Open Dynamics Engine Wrapper
3# Copyright (C) 2004 PyODE developers (see file AUTHORS)
4# All rights reserved.
5#
6# This library is free software; you can redistribute it and/or
7# modify it under the terms of EITHER:
8# (1) The GNU Lesser General Public License as published by the Free
9# Software Foundation; either version 2.1 of the License, or (at
10# your option) any later version. The text of the GNU Lesser
11# General Public License is included with this library in the
12# file LICENSE.
13# (2) The BSD-style license that is included with this library in
14# the file LICENSE-BSD.
15#
16# This library is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
19# LICENSE and LICENSE-BSD for more details.
20######################################################################
21
22from efl cimport *
23
24cdef extern from "Eo.h":
25 ####################################################################
26 # Basic Types
27 #
28
29
30 ####################################################################
31 # Enumerations
32 #
33
34
35 ####################################################################
36 # Structures
37 #
38 ctypedef struct Eo
39 ctypedef Eo const_Eo "const Eo"
40
41 ctypedef struct Eo_Class
42 ctypedef Eo_Class const_Eo_Class "const Eo_Class"
43
44 ctypedef struct Eo_Event_Description:
45 const_char_ptr name
46 const_char_ptr doc
47
48 ctypedef Eo_Event_Description const_Eo_Event_Description "const Eo_Event_Description"
49
50 ####################################################################
51 # Eo Events
52 #
53 cdef const_Eo_Event_Description *EO_EV_DEL
54
55 ####################################################################
56 # Other typedefs
57 #
58 ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, Eo *obj, const_Eo_Event_Description *desc, void *event_info)
59
60 ctypedef void (*eo_base_data_free_func)(void *)
61
62
63 ####################################################################
64 # Functions
65 #
66 int eo_init()
67 int eo_shutdown()
68
69 Eo *eo_add(const_Eo_Class *klass, Eo *parent, ...)
70 Eo *eo_ref(const_Eo *obj)
71 void eo_unref(const_Eo *obj)
72 int eo_ref_get(const_Eo *obj)
73 void eo_del(const_Eo *obj)
74
75 void eo_wref_add(Eo *obj)
76
77 Eina_Bool eo_do(Eo *obj, ...)
78 void eo_base_data_set(const_char_ptr key, const_void *data, eo_base_data_free_func free_func)
79 void eo_base_data_get(const_char_ptr key, void **data)
80 void eo_base_data_del(const_char_ptr key)
81
82 const_Eo_Class *eo_class_get(const_Eo *obj)
83 const_char_ptr eo_class_name_get(const_Eo_Class *klass)
84
85 Eo *eo_parent_get(const_Eo *obj)
86
87 void eo_event_callback_add(const_Eo_Event_Description *desc, Eo_Event_Cb cb, const_void *data)
88 void eo_event_callback_del(const_Eo_Event_Description *desc, Eo_Event_Cb cb, const_void *data)
89