kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=6587b5be679e659337f3f2219186eb4f9afc44d0
commit 6587b5be679e659337f3f2219186eb4f9afc44d0 Author: Kai Huuhko <kai.huu...@gmail.com> Date: Mon Sep 30 07:26:35 2013 +0300 Rename efl.pxd to efl.eina.pxd --- efl/edje/efl.edje_object.pxi | 10 +++++----- efl/elementary/multibuttonentry.pyx | 2 +- efl/eo/efl.eo.pyx | 2 +- efl/evas/efl.evas.pyx | 2 +- include/efl.c_eo.pxd | 2 +- include/efl.ecore.pxd | 4 ++-- include/efl.edje.pxd | 10 +++++----- include/efl.edje_edit.pxd | 2 +- include/{efl.pxd => efl.eina.pxd} | 18 ++---------------- include/efl.emotion.pxd | 4 ++-- include/efl.eo.pxd | 6 ++++-- include/efl.evas.pxd | 19 +++++++++---------- 12 files changed, 34 insertions(+), 47 deletions(-) diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi index 9f189b6..953f750 100644 --- a/efl/edje/efl.edje_object.pxi +++ b/efl/edje/efl.edje_object.pxi @@ -46,7 +46,7 @@ cdef void message_handler_cb(void *data, cdef void signal_cb(void *data, Evas_Object *obj, - const_char *emission, const_char_ptr source) with gil: + const_char *emission, const_char *source) with gil: cdef Edje self self = object_from_instance(obj) lst = tuple(<object>data) @@ -368,7 +368,7 @@ cdef class Edje(Object): def __get__(self): return edje_object_scale_get(self.obj) - cpdef scale_set(self, double scale): + cpdef scale_set(self, double scale): edje_object_scale_set(self.obj, scale) cpdef scale_get(self): return edje_object_scale_get(self.obj) @@ -385,7 +385,7 @@ cdef class Edje(Object): edje_object_mirrored_set(self.obj, rtl) def mirrored_get(self): return bool(edje_object_mirrored_get(self.obj)) - + def size_min_get(self): ":rtype: tuple of int" cdef int w, h @@ -423,11 +423,11 @@ cdef class Edje(Object): width and height. The user might choose to *impose* those minimum sizes, making the resulting calculation to get values equal or bigger than minw and minh, for width and height, respectively. - + :note: At the end of this call, the object won't be automatically resized to new dimensions, but just return the calculated sizes. The caller is the one up to change its geometry or not. - + :warning: Be advised that invisible parts in the object obj will be taken into account in this calculation. diff --git a/efl/elementary/multibuttonentry.pyx b/efl/elementary/multibuttonentry.pyx index 346a963..4f086f8 100644 --- a/efl/elementary/multibuttonentry.pyx +++ b/efl/elementary/multibuttonentry.pyx @@ -64,7 +64,7 @@ include "widget_header.pxi" from libc.stdlib cimport free from libc.string cimport strdup -from efl cimport Eina_Stringshare, eina_stringshare_add, eina_stringshare_del, \ +from efl.eina cimport Eina_Stringshare, eina_stringshare_add, eina_stringshare_del, \ eina_stringshare_replace from object cimport Object import traceback diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx index a2c7332..06bf163 100644 --- a/efl/eo/efl.eo.pyx +++ b/efl/eo/efl.eo.pyx @@ -18,7 +18,7 @@ from cpython cimport PyObject, Py_INCREF, Py_DECREF, PyUnicode_AsUTF8String from libc.stdlib cimport malloc, free from libc.string cimport memcpy, strdup -from efl cimport Eina_Bool, const_Eina_List, eina_list_append, const_void, \ +from efl.eina cimport Eina_Bool, const_Eina_List, eina_list_append, const_void, \ Eina_Hash, eina_hash_string_superfast_new, eina_hash_add, eina_hash_del, \ eina_hash_find from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, eo_del, eo_do, \ diff --git a/efl/evas/efl.evas.pyx b/efl/evas/efl.evas.pyx index 082a94d..5edb85c 100644 --- a/efl/evas/efl.evas.pyx +++ b/efl/evas/efl.evas.pyx @@ -17,7 +17,7 @@ import traceback from cpython cimport PyUnicode_AsUTF8String -from efl cimport * +from efl.eina cimport * from efl.eo cimport Eo, object_from_instance, _object_mapping_register from efl.eo cimport _ctouni, _touni cimport efl.evas.enums as enums diff --git a/include/efl.c_eo.pxd b/include/efl.c_eo.pxd index 91a5328..ae554fd 100644 --- a/include/efl.c_eo.pxd +++ b/include/efl.c_eo.pxd @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl cimport * +from efl.eina cimport * cdef extern from "Eo.h": #################################################################### diff --git a/include/efl.ecore.pxd b/include/efl.ecore.pxd index 5ce8ea8..0cacd4c 100644 --- a/include/efl.ecore.pxd +++ b/include/efl.ecore.pxd @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl cimport * +from efl.eina cimport * from efl.c_eo cimport Eo as cEo from efl.eo cimport Eo from efl.ecore.enums cimport Ecore_Fd_Handler_Flags, Ecore_Exe_Flags, \ @@ -184,7 +184,7 @@ cdef extern from "Ecore_File.h": void ecore_file_download_abort(Ecore_File_Download_Job *job) void ecore_file_download_abort_all() Eina_Bool ecore_file_download_protocol_available(const_char *protocol) - Eina_Bool ecore_file_download(const_char *url, const_char_ptr dst, + Eina_Bool ecore_file_download(const_char *url, const_char *dst, Ecore_File_Download_Completion_Cb completion_cb, Ecore_File_Download_Progress_Cb progress_cb, void *data, diff --git a/include/efl.edje.pxd b/include/efl.edje.pxd index 9c170fd..6dc6113 100644 --- a/include/efl.edje.pxd +++ b/include/efl.edje.pxd @@ -15,9 +15,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl cimport * -from efl.evas cimport Object, Canvas -from efl.evas cimport Evas_Object, Evas, Evas_Font_Size, Evas_Coord +from efl.eina cimport * +from efl.evas cimport Object, Canvas, \ + Evas_Object, Evas, Evas_Font_Size, Evas_Coord cdef extern from "Edje.h": @@ -153,7 +153,7 @@ cdef extern from "Edje.h": ctypedef Edje_External_Type const_Edje_External_Type "const Edje_External_Type" - ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const_char *emission, const_char_ptr source) + ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const_char *emission, const_char *source) #################################################################### # Engine @@ -194,7 +194,7 @@ cdef extern from "Edje.h": void edje_password_show_last_set(Eina_Bool password_show_last) void edje_password_show_last_timeout_set(double password_show_last_timeout) - + void edje_extern_object_min_size_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh) void edje_extern_object_max_size_set(Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh) void edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah) diff --git a/include/efl.edje_edit.pxd b/include/efl.edje_edit.pxd index 4d741a0..e9a655e 100644 --- a/include/efl.edje_edit.pxd +++ b/include/efl.edje_edit.pxd @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl cimport * +from efl.eina cimport * from efl.evas cimport Canvas, Evas_Event_Flags from efl.evas cimport Evas_Object, Evas from efl.edje cimport Edje, Edje_Part_Type, Edje_Text_Effect, Edje_Tween_Mode, \ diff --git a/include/efl.pxd b/include/efl.eina.pxd similarity index 94% rename from include/efl.pxd rename to include/efl.eina.pxd index bcf63da..1da12ce 100644 --- a/include/efl.pxd +++ b/include/efl.eina.pxd @@ -15,22 +15,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. - -cdef extern from *: - ctypedef char* const_char_ptr "const char *" - ctypedef char const_char "const char" - ctypedef void const_void "const void" - -cdef extern from "stdlib.h": - void *malloc(long) - void free(void*) - -# cdef extern from "stdio.h": -# int printf(char*) - -cdef extern from "string.h": - void *memcpy(void *dst, void *src, int n) - char *strdup(char *str) +from libc.stdlib cimport const_void, malloc, free +from libc.string cimport const_char, memcpy, strdup cdef extern from "time.h": struct tm: diff --git a/include/efl.emotion.pxd b/include/efl.emotion.pxd index ff2f6ab..6e66e84 100644 --- a/include/efl.emotion.pxd +++ b/include/efl.emotion.pxd @@ -15,8 +15,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl cimport Eina_Bool, Eina_List, const_Eina_List -from efl.evas cimport Evas, Evas_Object, const_Evas_Object, const_char_ptr +from efl.eina cimport Eina_Bool, Eina_List, const_Eina_List +from efl.evas cimport Evas, Evas_Object, const_Evas_Object from efl.evas cimport Object as evasObject from libc.string cimport const_char diff --git a/include/efl.eo.pxd b/include/efl.eo.pxd index 542023f..a9020dd 100644 --- a/include/efl.eo.pxd +++ b/include/efl.eo.pxd @@ -15,10 +15,12 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl.c_eo cimport Eo as cEo -from efl cimport Eina_List, const_Eina_List from libc.string cimport const_char +from efl.c_eo cimport Eo as cEo + +from efl.eina cimport Eina_List, const_Eina_List + cdef class Eo(object): cdef cEo *obj cdef readonly dict data diff --git a/include/efl.evas.pxd b/include/efl.evas.pxd index 436374d..0832e5c 100644 --- a/include/efl.evas.pxd +++ b/include/efl.evas.pxd @@ -15,10 +15,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. -from efl cimport * +from efl.eina cimport * from efl.eo cimport Eo -from efl.c_eo cimport Eo as cEo -from efl.c_eo cimport const_Eo_Class +from efl.c_eo cimport Eo as cEo, const_Eo_Class from efl.evas.enums cimport Evas_Event_Flags, Evas_Button_Flags, \ Evas_Font_Hinting_Flags, Evas_Aspect_Control, Evas_Render_Op, \ Evas_Callback_Type, Evas_Object_Pointer_Mode, Evas_Colorspace, \ @@ -352,8 +351,8 @@ cdef extern from "Evas.h": void evas_event_feed_multi_down(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const_void *data) void evas_event_feed_multi_up(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const_void *data) void evas_event_feed_multi_move(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const_void *data) - void evas_event_feed_key_down(Evas *e, const_char *keyname, const_char_ptr key, const_char_ptr string, const_char_ptr compose, unsigned int timestamp, const_void *data) - void evas_event_feed_key_up(Evas *e, const_char *keyname, const_char_ptr key, const_char_ptr string, const_char_ptr compose, unsigned int timestamp, const_void *data) + void evas_event_feed_key_down(Evas *e, const_char *keyname, const_char *key, const_char *string, const_char *compose, unsigned int timestamp, const_void *data) + void evas_event_feed_key_up(Evas *e, const_char *keyname, const_char *key, const_char *string, const_char *compose, unsigned int timestamp, const_void *data) void evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const_void *data) void evas_font_path_clear(Evas *e) @@ -541,8 +540,8 @@ cdef extern from "Evas.h": # TODO: Use this?: Evas_Object *evas_object_image_filled_add(Evas *e) # TODO: void evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) # FIXME: Is this needed?: const_Eo_Class *evas_object_image_class_get() - void evas_object_image_file_set(Evas_Object *obj, const_char *file, const_char_ptr key) - void evas_object_image_file_get(const_Evas_Object *obj, const_char **file, const_char_ptr *key) + void evas_object_image_file_set(Evas_Object *obj, const_char *file, const_char *key) + void evas_object_image_file_get(const_Evas_Object *obj, const_char **file, const_char **key) void evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) void evas_object_image_border_get(const_Evas_Object *obj, int *l, int *r, int *t, int *b) void evas_object_image_border_center_fill_set(Evas_Object *obj, Eina_Bool fill) @@ -570,7 +569,7 @@ cdef extern from "Evas.h": Eina_Bool evas_object_image_smooth_scale_get(const_Evas_Object *obj) void evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) void evas_object_image_reload(Evas_Object *obj) - Eina_Bool evas_object_image_save(const_Evas_Object *obj, const_char *file, const_char_ptr key, const_char_ptr flags) + Eina_Bool evas_object_image_save(const_Evas_Object *obj, const_char *file, const_char *key, const_char *flags) # TODO: Eina_Bool evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels) # TODO: void evas_object_image_pixels_get_callback_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *o), void *data) void evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty) @@ -669,8 +668,8 @@ cdef extern from "Evas.h": Evas_Textblock_Style *evas_object_textblock_style_get(const_Evas_Object *obj) void evas_object_textblock_replace_char_set(Evas_Object *obj, const_char *ch) const_char *evas_object_textblock_replace_char_get(const_Evas_Object *obj) - const_char *evas_textblock_escape_string_get(const_char_ptr escape) - const_char *evas_textblock_string_escape_get(const_char_ptr string, int *len_ret) + const_char *evas_textblock_escape_string_get(const_char *escape) + const_char *evas_textblock_string_escape_get(const_char *string, int *len_ret) void evas_object_textblock_text_markup_set(Evas_Object *obj, const_char *text) void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const_char *text) const_char *evas_object_textblock_text_markup_get(const_Evas_Object *obj) --