Remove const hacks

They were a workaround for limitations in Cython <0.18
This commit is contained in:
Kai Huuhko 2014-04-05 03:13:15 +03:00
parent 1149c6ed91
commit adf70fa26f
136 changed files with 1708 additions and 1810 deletions

View File

@ -1,5 +1,4 @@
from cpython cimport PyObject from cpython cimport PyObject
from libc.string cimport const_char
cdef extern from "dbus/dbus.h": cdef extern from "dbus/dbus.h":
ctypedef int dbus_bool_t ctypedef int dbus_bool_t
@ -11,7 +10,7 @@ cdef extern from "dbus/dbus-python.h":
ctypedef dbus_bool_t (*_dbus_py_srv_setup_func)(DBusServer *, void *) ctypedef dbus_bool_t (*_dbus_py_srv_setup_func)(DBusServer *, void *)
ctypedef void (*_dbus_py_free_func)(void *) ctypedef void (*_dbus_py_free_func)(void *)
PyObject *DBusPyNativeMainLoop_New4(_dbus_py_conn_setup_func conn_func, _dbus_py_srv_setup_func srv_func, _dbus_py_free_func free_func, void *) PyObject *DBusPyNativeMainLoop_New4(_dbus_py_conn_setup_func conn_func, _dbus_py_srv_setup_func srv_func, _dbus_py_free_func free_func, void *)
int import_dbus_bindings(const_char *this_module_name) int import_dbus_bindings(const char *this_module_name)
cdef extern from "Ecore.h": cdef extern from "Ecore.h":
int ecore_init() int ecore_init()

View File

@ -153,7 +153,7 @@ cdef object _ecore_exe_event_mapping
_ecore_exe_event_mapping = {} _ecore_exe_event_mapping = {}
cdef void _ecore_exe_pre_free_cb(void *data, const_Ecore_Exe *exe) with gil: cdef void _ecore_exe_pre_free_cb(void *data, const Ecore_Exe *exe) with gil:
cdef Exe obj cdef Exe obj
try: try:
if data == NULL: if data == NULL:
@ -411,7 +411,7 @@ cdef class Exe(object):
"given size (%d) is larger than buffer size (%d)." % "given size (%d) is larger than buffer size (%d)." %
(size, buf_view.len)) (size, buf_view.len))
ret = ecore_exe_send(self.exe, <const_void *>buf_view.buf, buf_view.len) ret = ecore_exe_send(self.exe, <const void *>buf_view.buf, buf_view.len)
PyBuffer_Release(&buf_view) PyBuffer_Release(&buf_view)
return ret return ret
@ -449,7 +449,7 @@ cdef class Exe(object):
:rtype: str or None :rtype: str or None
""" """
cdef const_char *cmd = ecore_exe_cmd_get(self.exe) cdef const char *cmd = ecore_exe_cmd_get(self.exe)
if cmd != NULL: if cmd != NULL:
return cmd return cmd
return None return None
@ -500,7 +500,7 @@ cdef class Exe(object):
:rtype: str or None :rtype: str or None
""" """
cdef const_char *tag = ecore_exe_tag_get(self.exe) cdef const char *tag = ecore_exe_tag_get(self.exe)
if tag != NULL: if tag != NULL:
return tag return tag
return None return None

View File

@ -17,14 +17,14 @@
from cpython cimport PyUnicode_AsUTF8String from cpython cimport PyUnicode_AsUTF8String
cdef void _completion_cb(void *data, const_char *file, int status) with gil: cdef void _completion_cb(void *data, const char *file, int status) with gil:
obj = <FileDownload>data obj = <FileDownload>data
try: try:
obj._exec_completion(file, status) obj._exec_completion(file, status)
except Exception, e: except Exception, e:
traceback.print_exc() traceback.print_exc()
cdef int _progress_cb(void *data, const_char *file, long int dltotal, cdef int _progress_cb(void *data, const char *file, long int dltotal,
long int dlnow, long int ultotal, long int ulnow) with gil: long int dlnow, long int ultotal, long int ulnow) with gil:
obj = <FileDownload>data obj = <FileDownload>data
try: try:
@ -92,8 +92,8 @@ cdef class FileDownload(object):
if isinstance(url, unicode): url = PyUnicode_AsUTF8String(url) if isinstance(url, unicode): url = PyUnicode_AsUTF8String(url)
if isinstance(dst, unicode): dst = PyUnicode_AsUTF8String(dst) if isinstance(dst, unicode): dst = PyUnicode_AsUTF8String(dst)
if not ecore_file_download( if not ecore_file_download(
<const_char *>url if url is not None else NULL, <const char *>url if url is not None else NULL,
<const_char *>dst if dst is not None else NULL, <const char *>dst if dst is not None else NULL,
_completion_cb, _progress_cb, _completion_cb, _progress_cb,
<void *>self, &job): <void *>self, &job):
raise SystemError("could not download '%s' to %s" % (url, dst)) raise SystemError("could not download '%s' to %s" % (url, dst))
@ -122,11 +122,11 @@ cdef class FileDownload(object):
self.args = None self.args = None
self.kargs = None self.kargs = None
cdef object _exec_completion(self, const_char *file, int status): cdef object _exec_completion(self, const char *file, int status):
if self.completion_cb: if self.completion_cb:
self.completion_cb(_ctouni(file), status, *self.args, **self.kargs) self.completion_cb(_ctouni(file), status, *self.args, **self.kargs)
cdef object _exec_progress(self, const_char *file, long int dltotal, cdef object _exec_progress(self, const char *file, long int dltotal,
long int dlnow, long int ultotal, long int ulnow): long int dlnow, long int ultotal, long int ulnow):
if self.progress_cb: if self.progress_cb:
return self.progress_cb(_ctouni(file), dltotal, dlnow, ultotal, ulnow, return self.progress_cb(_ctouni(file), dltotal, dlnow, ultotal, ulnow,
@ -185,4 +185,4 @@ def file_download_protocol_available(protocol):
""" """
if isinstance(protocol, unicode): protocol = PyUnicode_AsUTF8String(protocol) if isinstance(protocol, unicode): protocol = PyUnicode_AsUTF8String(protocol)
return bool(ecore_file_download_protocol_available( return bool(ecore_file_download_protocol_available(
<const_char *>protocol if protocol is not None else NULL)) <const char *>protocol if protocol is not None else NULL))

View File

@ -18,7 +18,7 @@
from cpython cimport PyUnicode_AsUTF8String from cpython cimport PyUnicode_AsUTF8String
cdef void _file_monitor_cb(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const_char *path) with gil: cdef void _file_monitor_cb(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path) with gil:
obj = <FileMonitor>data obj = <FileMonitor>data
try: try:
obj._exec_monitor(event, path) obj._exec_monitor(event, path)
@ -74,7 +74,7 @@ cdef class FileMonitor(object):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
self.mon = ecore_file_monitor_add( self.mon = ecore_file_monitor_add(
<const_char *>path if path is not None else NULL, <const char *>path if path is not None else NULL,
_file_monitor_cb, <void *>self) _file_monitor_cb, <void *>self)
if not self.mon: if not self.mon:
raise SystemError("could not monitor '%s'" % (path)) raise SystemError("could not monitor '%s'" % (path))
@ -98,7 +98,7 @@ cdef class FileMonitor(object):
(self.__class__.__name__, <uintptr_t><void *>self, (self.__class__.__name__, <uintptr_t><void *>self,
self.monitor_cb, self.args, self.kargs, PY_REFCOUNT(self)) self.monitor_cb, self.args, self.kargs, PY_REFCOUNT(self))
cdef object _exec_monitor(self, Ecore_File_Event event, const_char *path): cdef object _exec_monitor(self, Ecore_File_Event event, const char *path):
if self.monitor_cb: if self.monitor_cb:
return self.monitor_cb(event, _ctouni(path), *self.args, **self.kargs) return self.monitor_cb(event, _ctouni(path), *self.args, **self.kargs)
return 0 return 0

View File

@ -157,7 +157,7 @@ def thaw():
def fontset_append_set(fonts): def fontset_append_set(fonts):
if isinstance(fonts, unicode): fonts = PyUnicode_AsUTF8String(fonts) if isinstance(fonts, unicode): fonts = PyUnicode_AsUTF8String(fonts)
edje_fontset_append_set(<const_char *>fonts if fonts is not None else NULL) edje_fontset_append_set(<const char *>fonts if fonts is not None else NULL)
def fontset_append_get(): def fontset_append_get():
@ -168,7 +168,7 @@ def file_collection_list(file):
cdef Eina_List *lst cdef Eina_List *lst
if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file) if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
lst = edje_file_collection_list( lst = edje_file_collection_list(
<const_char *>file if file is not None else NULL) <const char *>file if file is not None else NULL)
ret = eina_list_strings_to_python_list(lst) ret = eina_list_strings_to_python_list(lst)
edje_file_collection_list_free(lst) edje_file_collection_list_free(lst)
return ret return ret
@ -178,8 +178,8 @@ def file_group_exists(file, group):
if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file) if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
return bool(edje_file_group_exists( return bool(edje_file_group_exists(
<const_char *>file if file is not None else NULL, <const char *>file if file is not None else NULL,
<const_char *>group if group is not None else NULL)) <const char *>group if group is not None else NULL))
def file_data_get(file, key): def file_data_get(file, key):
@ -187,8 +187,8 @@ def file_data_get(file, key):
if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file) if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
s = edje_file_data_get( s = edje_file_data_get(
<const_char *>file if file is not None else NULL, <const char *>file if file is not None else NULL,
<const_char *>key if key is not None else NULL) <const char *>key if key is not None else NULL)
ret = _touni(s) ret = _touni(s)
libc.stdlib.free(s) libc.stdlib.free(s)
return ret return ret
@ -236,7 +236,7 @@ def color_class_set(color_class,
if isinstance(color_class, unicode): if isinstance(color_class, unicode):
color_class = PyUnicode_AsUTF8String(color_class) color_class = PyUnicode_AsUTF8String(color_class)
edje_color_class_set( edje_color_class_set(
<const_char *>color_class if color_class is not None else NULL, <const char *>color_class if color_class is not None else NULL,
r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3)
@ -247,7 +247,7 @@ def color_class_get(color_class):
if isinstance(color_class, unicode): if isinstance(color_class, unicode):
color_class = PyUnicode_AsUTF8String(color_class) color_class = PyUnicode_AsUTF8String(color_class)
edje_color_class_get( edje_color_class_get(
<const_char *>color_class if color_class is not None else NULL, <const char *>color_class if color_class is not None else NULL,
&r, &g, &b, &a, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3) &r, &g, &b, &a, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3)
return (r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) return (r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3)
@ -256,7 +256,7 @@ def color_class_del(color_class):
if isinstance(color_class, unicode): if isinstance(color_class, unicode):
color_class = PyUnicode_AsUTF8String(color_class) color_class = PyUnicode_AsUTF8String(color_class)
edje_color_class_del( edje_color_class_del(
<const_char *>color_class if color_class is not None else NULL) <const char *>color_class if color_class is not None else NULL)
def color_class_list(): def color_class_list():
@ -280,15 +280,15 @@ def text_class_set(text_class, font, int size):
if isinstance(font, unicode): if isinstance(font, unicode):
font = PyUnicode_AsUTF8String(font) font = PyUnicode_AsUTF8String(font)
edje_text_class_set( edje_text_class_set(
<const_char *>text_class if text_class is not None else NULL, <const char *>text_class if text_class is not None else NULL,
<const_char *>font if font is not None else NULL, <const char *>font if font is not None else NULL,
size) size)
def text_class_del(text_class): def text_class_del(text_class):
if isinstance(text_class, unicode): text_class = PyUnicode_AsUTF8String(text_class) if isinstance(text_class, unicode): text_class = PyUnicode_AsUTF8String(text_class)
edje_text_class_del( edje_text_class_del(
<const_char *>text_class if text_class is not None else NULL) <const char *>text_class if text_class is not None else NULL)
def text_class_list(): def text_class_list():
@ -323,7 +323,7 @@ def extern_object_aspect_set(Object obj, int aspect, int w, int h):
def available_modules_get(): def available_modules_get():
cdef const_Eina_List *lst cdef const Eina_List *lst
lst = edje_available_modules_get() lst = edje_available_modules_get()
ret = [] ret = []
while lst: while lst:
@ -335,7 +335,7 @@ def available_modules_get():
def module_load(name): def module_load(name):
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
return bool(edje_module_load( return bool(edje_module_load(
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
include "efl.edje_message.pxi" include "efl.edje_message.pxi"

View File

@ -48,7 +48,7 @@ cdef class EdjeEdit(Edje):
# General # General
def compiler_get(self): def compiler_get(self):
cdef const_char *s = edje_edit_compiler_get(self.obj) cdef const char *s = edje_edit_compiler_get(self.obj)
r = _ctouni(s) r = _ctouni(s)
if s != NULL: if s != NULL:
edje_edit_string_free(s) edje_edit_string_free(s)
@ -71,17 +71,17 @@ cdef class EdjeEdit(Edje):
def group_add(self, name): def group_add(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_group_add(self.obj, return bool(edje_edit_group_add(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def group_del(self, name): def group_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_group_del(self.obj, return bool(edje_edit_group_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def group_exist(self, name): def group_exist(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_group_exist(self.obj, return bool(edje_edit_group_exist(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
# Data # Data
property data: property data:
@ -96,8 +96,8 @@ cdef class EdjeEdit(Edje):
def data_get(self, name): def data_get(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
cdef const_char *val = edje_edit_data_value_get(self.obj, cdef const char *val = edje_edit_data_value_get(self.obj,
<const_char *>name if name is not None else NULL) <const char *>name if name is not None else NULL)
r = _ctouni(val) r = _ctouni(val)
edje_edit_string_free(val) edje_edit_string_free(val)
return r return r
@ -107,27 +107,27 @@ cdef class EdjeEdit(Edje):
if isinstance(value, unicode): value = value.encode("UTF-8") if isinstance(value, unicode): value = value.encode("UTF-8")
return bool(edje_edit_data_value_set(self.obj, return bool(edje_edit_data_value_set(self.obj,
<const_char *>name if name is not None else NULL, <const char *>name if name is not None else NULL,
<const_char *>value if value is not None else NULL)) <const char *>value if value is not None else NULL))
def data_add(self, name, value): def data_add(self, name, value):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
if isinstance(value, unicode): value = value.encode("UTF-8") if isinstance(value, unicode): value = value.encode("UTF-8")
return bool(edje_edit_data_add(self.obj, return bool(edje_edit_data_add(self.obj,
<const_char *>name if name is not None else NULL, <const char *>name if name is not None else NULL,
<const_char *>value if value is not None else NULL)) <const char *>value if value is not None else NULL))
def data_rename(self, old, new): def data_rename(self, old, new):
if isinstance(old, unicode): old = old.encode("UTF-8") if isinstance(old, unicode): old = old.encode("UTF-8")
if isinstance(new, unicode): new = new.encode("UTF-8") if isinstance(new, unicode): new = new.encode("UTF-8")
return bool(edje_edit_data_name_set(self.obj, return bool(edje_edit_data_name_set(self.obj,
<const_char *>old if old is not None else NULL, <const char *>old if old is not None else NULL,
<const_char *>new if new is not None else NULL)) <const char *>new if new is not None else NULL))
def data_del(self, name): def data_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_data_del(self.obj, return bool(edje_edit_data_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
# Group Data # Group Data
property group_data: property group_data:
@ -141,10 +141,10 @@ cdef class EdjeEdit(Edje):
return ret return ret
def group_data_get(self, name): def group_data_get(self, name):
cdef const_char *val cdef const char *val
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
val = edje_edit_group_data_value_get(self.obj, val = edje_edit_group_data_value_get(self.obj,
<const_char *>name if name is not None else NULL) <const char *>name if name is not None else NULL)
r = _ctouni(val) r = _ctouni(val)
edje_edit_string_free(val) edje_edit_string_free(val)
return r return r
@ -153,27 +153,27 @@ cdef class EdjeEdit(Edje):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
if isinstance(value, unicode): value = value.encode("UTF-8") if isinstance(value, unicode): value = value.encode("UTF-8")
return bool(edje_edit_group_data_value_set(self.obj, return bool(edje_edit_group_data_value_set(self.obj,
<const_char *>name if name is not None else NULL, <const char *>name if name is not None else NULL,
<const_char *>value if value is not None else NULL)) <const char *>value if value is not None else NULL))
def group_data_add(self, name, value): def group_data_add(self, name, value):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
if isinstance(value, unicode): value = value.encode("UTF-8") if isinstance(value, unicode): value = value.encode("UTF-8")
return bool(edje_edit_group_data_add(self.obj, return bool(edje_edit_group_data_add(self.obj,
<const_char *>name if name is not None else NULL, <const char *>name if name is not None else NULL,
<const_char *>value if value is not None else NULL)) <const char *>value if value is not None else NULL))
def group_data_rename(self, old, new): def group_data_rename(self, old, new):
if isinstance(old, unicode): old = old.encode("UTF-8") if isinstance(old, unicode): old = old.encode("UTF-8")
if isinstance(new, unicode): new = new.encode("UTF-8") if isinstance(new, unicode): new = new.encode("UTF-8")
return bool(edje_edit_group_data_name_set(self.obj, return bool(edje_edit_group_data_name_set(self.obj,
<const_char *>old if old is not None else NULL, <const char *>old if old is not None else NULL,
<const_char *>new if new is not None else NULL)) <const char *>new if new is not None else NULL))
def group_data_del(self, name): def group_data_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_group_data_del(self.obj, return bool(edje_edit_group_data_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
# Text Style # Text Style
property text_styles: property text_styles:
@ -190,12 +190,12 @@ cdef class EdjeEdit(Edje):
def text_style_add(self, name): def text_style_add(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_style_add(self.obj, return bool(edje_edit_style_add(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def text_style_del(self, name): def text_style_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
edje_edit_style_del(self.obj, edje_edit_style_del(self.obj,
<const_char *>name if name is not None else NULL) <const char *>name if name is not None else NULL)
return True return True
# Color Classes # Color Classes
@ -213,12 +213,12 @@ cdef class EdjeEdit(Edje):
def color_class_add(self, name): def color_class_add(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_color_class_add(self.obj, return bool(edje_edit_color_class_add(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def color_class_del(self, name): def color_class_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_color_class_del(self.obj, return bool(edje_edit_color_class_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
# Externals # Externals
property externals: property externals:
@ -232,12 +232,12 @@ cdef class EdjeEdit(Edje):
def external_add(self, name): def external_add(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_external_add(self.obj, return bool(edje_edit_external_add(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def external_del(self, name): def external_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_external_del(self.obj, return bool(edje_edit_external_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
# Fonts # Fonts
property fonts: property fonts:
@ -252,13 +252,13 @@ cdef class EdjeEdit(Edje):
if isinstance(font, unicode): font = font.encode("UTF-8") if isinstance(font, unicode): font = font.encode("UTF-8")
if isinstance(alias, unicode): alias = alias.encode("UTF-8") if isinstance(alias, unicode): alias = alias.encode("UTF-8")
return bool(edje_edit_font_add(self.obj, return bool(edje_edit_font_add(self.obj,
<const_char *>font if font is not None else NULL, <const char *>font if font is not None else NULL,
<const_char *>alias if alias is not None else NULL)) <const char *>alias if alias is not None else NULL))
def font_del(self, alias): def font_del(self, alias):
if isinstance(alias, unicode): alias = alias.encode("UTF-8") if isinstance(alias, unicode): alias = alias.encode("UTF-8")
return bool(edje_edit_font_del(self.obj, return bool(edje_edit_font_del(self.obj,
<const_char *>alias if alias is not None else NULL)) <const char *>alias if alias is not None else NULL))
# Parts # Parts
property parts: property parts:
@ -278,7 +278,7 @@ cdef class EdjeEdit(Edje):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
if type != EDJE_PART_TYPE_EXTERNAL: if type != EDJE_PART_TYPE_EXTERNAL:
return bool(edje_edit_part_add(self.obj, return bool(edje_edit_part_add(self.obj,
<const_char *>name if name is not None else NULL, <const char *>name if name is not None else NULL,
<Edje_Part_Type>type)) <Edje_Part_Type>type))
else: else:
return bool(edje_edit_part_external_add(self.obj, name, source)) return bool(edje_edit_part_external_add(self.obj, name, source))
@ -286,12 +286,12 @@ cdef class EdjeEdit(Edje):
def part_del(self, name): def part_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_part_del(self.obj, return bool(edje_edit_part_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def part_exist(self, name): def part_exist(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_part_exist(self.obj, return bool(edje_edit_part_exist(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
# Images # Images
property images: property images:
@ -305,17 +305,17 @@ cdef class EdjeEdit(Edje):
def image_id_get(self, image): def image_id_get(self, image):
if isinstance(image, unicode): image = image.encode("UTF-8") if isinstance(image, unicode): image = image.encode("UTF-8")
return edje_edit_image_id_get(self.obj, return edje_edit_image_id_get(self.obj,
<const_char *>image if image is not None else NULL) <const char *>image if image is not None else NULL)
def image_add(self, path): def image_add(self, path):
if isinstance(path, unicode): path = path.encode("UTF-8") if isinstance(path, unicode): path = path.encode("UTF-8")
return bool(edje_edit_image_add(self.obj, return bool(edje_edit_image_add(self.obj,
<const_char *>path if path is not None else NULL)) <const char *>path if path is not None else NULL))
def image_del(self, image): def image_del(self, image):
if isinstance(image, unicode): image = image.encode("UTF-8") if isinstance(image, unicode): image = image.encode("UTF-8")
return bool(edje_edit_image_del(self.obj, return bool(edje_edit_image_del(self.obj,
<const_char *>image if image is not None else NULL)) <const char *>image if image is not None else NULL))
# Programs # Programs
property programs: property programs:
@ -335,17 +335,17 @@ cdef class EdjeEdit(Edje):
def program_add(self, name): def program_add(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_program_add(self.obj, return bool(edje_edit_program_add(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def program_del(self, name): def program_del(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_program_del(self.obj, return bool(edje_edit_program_del(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
def program_exist(self, name): def program_exist(self, name):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_program_exist(self.obj, return bool(edje_edit_program_exist(self.obj,
<const_char *>name if name is not None else NULL)) <const char *>name if name is not None else NULL))
""" """
property error: property error:
def __get__(self): def __get__(self):
@ -378,7 +378,7 @@ cdef class EdjeEdit(Edje):
property script_errors: property script_errors:
def __get__(self): def __get__(self):
cdef const_Eina_List *lst cdef const Eina_List *lst
cdef Edje_Edit_Script_Error *se cdef Edje_Edit_Script_Error *se
ret = [] ret = []
lst = edje_edit_script_error_list_get(self.obj) lst = edje_edit_script_error_list_get(self.obj)
@ -396,7 +396,7 @@ cdef class EdjeEdit(Edje):
cdef class Text_Style(object): cdef class Text_Style(object):
cdef EdjeEdit edje cdef EdjeEdit edje
cdef const_char *name cdef const char *name
def __init__(self, EdjeEdit e not None, name not None): def __init__(self, EdjeEdit e not None, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
@ -420,17 +420,17 @@ cdef class Text_Style(object):
def tag_add(self, name not None): def tag_add(self, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_style_tag_add(self.edje.obj, self.name, return bool(edje_edit_style_tag_add(self.edje.obj, self.name,
<const_char *>name)) <const char *>name))
def tag_del(self, name not None): def tag_del(self, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
edje_edit_style_tag_del(self.edje.obj, self.name, <const_char *>name) edje_edit_style_tag_del(self.edje.obj, self.name, <const char *>name)
return True return True
cdef class Text_Style_Tag(object): cdef class Text_Style_Tag(object):
cdef Text_Style text_style cdef Text_Style text_style
cdef const_char *name cdef const char *name
def __init__(self, Text_Style text_style not None, name not None): def __init__(self, Text_Style text_style not None, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
@ -451,13 +451,13 @@ cdef class Text_Style_Tag(object):
if isinstance(newname, unicode): newname = newname.encode("UTF-8") if isinstance(newname, unicode): newname = newname.encode("UTF-8")
edje_edit_style_tag_name_set(self.text_style.edje.obj, edje_edit_style_tag_name_set(self.text_style.edje.obj,
self.text_style.name, self.name, self.text_style.name, self.name,
<const_char *>newname) <const char *>newname)
eina_stringshare_replace(&self.name, <const_char *>newname) eina_stringshare_replace(&self.name, <const char *>newname)
return True return True
property value: property value:
def __get__(self): def __get__(self):
cdef const_char *val cdef const char *val
val = edje_edit_style_tag_value_get(self.text_style.edje.obj, val = edje_edit_style_tag_value_get(self.text_style.edje.obj,
self.text_style.name, self.name) self.text_style.name, self.name)
ret = _ctouni(val) ret = _ctouni(val)
@ -467,13 +467,13 @@ cdef class Text_Style_Tag(object):
if isinstance(value, unicode): value = value.encode("UTF-8") if isinstance(value, unicode): value = value.encode("UTF-8")
edje_edit_style_tag_value_set(self.text_style.edje.obj, edje_edit_style_tag_value_set(self.text_style.edje.obj,
self.text_style.name, self.name, self.text_style.name, self.name,
<const_char *>value if value is not None else NULL) <const char *>value if value is not None else NULL)
cdef class Color_Class(object): cdef class Color_Class(object):
cdef EdjeEdit edje cdef EdjeEdit edje
cdef const_char *name cdef const char *name
def __init__(self, EdjeEdit e not None, name not None): def __init__(self, EdjeEdit e not None, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
@ -494,10 +494,10 @@ cdef class Color_Class(object):
cdef Eina_Bool ret cdef Eina_Bool ret
if isinstance(newname, unicode): newname = newname.encode("UTF-8") if isinstance(newname, unicode): newname = newname.encode("UTF-8")
ret = edje_edit_color_class_name_set(self.edje.obj, self.name, ret = edje_edit_color_class_name_set(self.edje.obj, self.name,
<const_char *>newname) <const char *>newname)
if ret == 0: if ret == 0:
return False return False
eina_stringshare_replace(&self.name, <const_char *>newname) eina_stringshare_replace(&self.name, <const char *>newname)
return True return True
def colors_get(self): def colors_get(self):

View File

@ -51,5 +51,5 @@ cdef class Group(object):
def rename(self, name not None): def rename(self, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
return bool(edje_edit_group_name_set(self.edje.obj, <const_char *>name)) return bool(edje_edit_group_name_set(self.edje.obj, <const char *>name))

View File

@ -18,7 +18,7 @@
cdef class Part(object): cdef class Part(object):
cdef EdjeEdit edje cdef EdjeEdit edje
cdef const_char *name cdef const char *name
def __init__(self, EdjeEdit e not None, name not None): def __init__(self, EdjeEdit e not None, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
@ -38,15 +38,15 @@ cdef class Part(object):
cdef Eina_Bool ret cdef Eina_Bool ret
if isinstance(newname, unicode): newname = newname.encode("UTF-8") if isinstance(newname, unicode): newname = newname.encode("UTF-8")
ret = edje_edit_part_name_set(self.edje.obj, self.name, ret = edje_edit_part_name_set(self.edje.obj, self.name,
<const_char *>newname if newname is not None else NULL) <const char *>newname if newname is not None else NULL)
if ret == 0: if ret == 0:
return False return False
eina_stringshare_replace(&self.name, <const_char *>newname) eina_stringshare_replace(&self.name, <const char *>newname)
return True return True
def above_get(self): def above_get(self):
cdef: cdef:
const_char *part const char *part
object ret object ret
part = edje_edit_part_above_get(self.edje.obj, self.name) part = edje_edit_part_above_get(self.edje.obj, self.name)
ret = _ctouni(part) ret = _ctouni(part)
@ -55,7 +55,7 @@ cdef class Part(object):
def below_get(self): def below_get(self):
cdef: cdef:
const_char *part const char *part
object ret object ret
part = edje_edit_part_below_get(self.edje.obj, self.name) part = edje_edit_part_below_get(self.edje.obj, self.name)
ret = _ctouni(part) ret = _ctouni(part)
@ -88,30 +88,30 @@ cdef class Part(object):
def state_add(self, sname, double value=0.0): def state_add(self, sname, double value=0.0):
if isinstance(sname, unicode): sname = sname.encode("UTF-8") if isinstance(sname, unicode): sname = sname.encode("UTF-8")
return bool(edje_edit_state_add(self.edje.obj, self.name, return bool(edje_edit_state_add(self.edje.obj, self.name,
<const_char *>sname if sname is not None else NULL, <const char *>sname if sname is not None else NULL,
value)) value))
def state_del(self, sname, double value=0.0): def state_del(self, sname, double value=0.0):
if isinstance(sname, unicode): sname = sname.encode("UTF-8") if isinstance(sname, unicode): sname = sname.encode("UTF-8")
return bool(edje_edit_state_del(self.edje.obj, self.name, return bool(edje_edit_state_del(self.edje.obj, self.name,
<const_char *>sname if sname is not None else NULL, <const char *>sname if sname is not None else NULL,
value)) value))
def state_exist(self, sname, double value=0.0): def state_exist(self, sname, double value=0.0):
if isinstance(sname, unicode): sname = sname.encode("UTF-8") if isinstance(sname, unicode): sname = sname.encode("UTF-8")
return bool(edje_edit_state_exist(self.edje.obj, self.name, return bool(edje_edit_state_exist(self.edje.obj, self.name,
<const_char *>sname if sname is not None else NULL, <const char *>sname if sname is not None else NULL,
value)) value))
def state_copy(self, sfrom, double vfrom, sto, double vto): def state_copy(self, sfrom, double vfrom, sto, double vto):
if isinstance(sfrom, unicode): sfrom = sfrom.encode("UTF-8") if isinstance(sfrom, unicode): sfrom = sfrom.encode("UTF-8")
if isinstance(sto, unicode): sto = sto.encode("UTF-8") if isinstance(sto, unicode): sto = sto.encode("UTF-8")
return bool(edje_edit_state_copy(self.edje.obj, self.name, return bool(edje_edit_state_copy(self.edje.obj, self.name,
<const_char *>sfrom if sfrom is not None else NULL, vfrom, <const char *>sfrom if sfrom is not None else NULL, vfrom,
<const_char *>sto if sto is not None else NULL, vto)) <const char *>sto if sto is not None else NULL, vto))
def state_selected_get(self): def state_selected_get(self):
cdef const_char *sel cdef const char *sel
cdef double val cdef double val
sel = edje_edit_part_selected_state_get(self.edje.obj, self.name, &val) sel = edje_edit_part_selected_state_get(self.edje.obj, self.name, &val)
if sel == NULL: return None if sel == NULL: return None
@ -123,12 +123,12 @@ cdef class Part(object):
def state_selected_set(self, state, double value=0.0): def state_selected_set(self, state, double value=0.0):
if isinstance(state, unicode): state = state.encode("UTF-8") if isinstance(state, unicode): state = state.encode("UTF-8")
edje_edit_part_selected_state_set(self.edje.obj, self.name, edje_edit_part_selected_state_set(self.edje.obj, self.name,
<const_char *>state if state is not None else NULL, <const char *>state if state is not None else NULL,
value) value)
property clip_to: property clip_to:
def __get__(self): def __get__(self):
cdef const_char *clipper cdef const char *clipper
clipper = edje_edit_part_clip_to_get(self.edje.obj, self.name) clipper = edje_edit_part_clip_to_get(self.edje.obj, self.name)
ret = _ctouni(clipper) ret = _ctouni(clipper)
edje_edit_string_free(clipper) edje_edit_string_free(clipper)
@ -137,14 +137,14 @@ cdef class Part(object):
def __set__(self, clipper): def __set__(self, clipper):
if isinstance(clipper, unicode): clipper = clipper.encode("UTF-8") if isinstance(clipper, unicode): clipper = clipper.encode("UTF-8")
edje_edit_part_clip_to_set(self.edje.obj, self.name, edje_edit_part_clip_to_set(self.edje.obj, self.name,
<const_char *>clipper if clipper is not None else NULL) <const char *>clipper if clipper is not None else NULL)
def __del__(self): def __del__(self):
edje_edit_part_clip_to_set(self.edje.obj, self.name, NULL) edje_edit_part_clip_to_set(self.edje.obj, self.name, NULL)
property source: property source:
def __get__(self): def __get__(self):
cdef const_char *source cdef const char *source
source = edje_edit_part_source_get(self.edje.obj, self.name) source = edje_edit_part_source_get(self.edje.obj, self.name)
ret = _ctouni(source) ret = _ctouni(source)
edje_edit_string_free(source) edje_edit_string_free(source)
@ -153,7 +153,7 @@ cdef class Part(object):
def __set__(self, source): def __set__(self, source):
if isinstance(source, unicode): source = source.encode("UTF-8") if isinstance(source, unicode): source = source.encode("UTF-8")
edje_edit_part_source_set(self.edje.obj, self.name, edje_edit_part_source_set(self.edje.obj, self.name,
<const_char *>source if source is not None else NULL) <const char *>source if source is not None else NULL)
def __del__(self): def __del__(self):
edje_edit_part_source_set(self.edje.obj, self.name, NULL) edje_edit_part_source_set(self.edje.obj, self.name, NULL)
@ -234,7 +234,7 @@ cdef class Part(object):
property drag_confine: property drag_confine:
def __get__(self): def __get__(self):
cdef const_char *confine cdef const char *confine
confine = edje_edit_part_drag_confine_get(self.edje.obj, self.name) confine = edje_edit_part_drag_confine_get(self.edje.obj, self.name)
ret = _ctouni(confine) ret = _ctouni(confine)
edje_edit_string_free(confine) edje_edit_string_free(confine)
@ -243,11 +243,11 @@ cdef class Part(object):
def __set__(self, confine): def __set__(self, confine):
if isinstance(confine, unicode): confine = confine.encode("UTF-8") if isinstance(confine, unicode): confine = confine.encode("UTF-8")
edje_edit_part_drag_confine_set(self.edje.obj, self.name, edje_edit_part_drag_confine_set(self.edje.obj, self.name,
<const_char *>confine if confine is not None else NULL) <const char *>confine if confine is not None else NULL)
property drag_event: property drag_event:
def __get__(self): def __get__(self):
cdef const_char *event cdef const char *event
event = edje_edit_part_drag_event_get(self.edje.obj, self.name) event = edje_edit_part_drag_event_get(self.edje.obj, self.name)
ret = _ctouni(event) ret = _ctouni(event)
edje_edit_string_free(event) edje_edit_string_free(event)
@ -256,13 +256,13 @@ cdef class Part(object):
def __set__(self, event): def __set__(self, event):
if isinstance(event, unicode): event = event.encode("UTF-8") if isinstance(event, unicode): event = event.encode("UTF-8")
edje_edit_part_drag_event_set(self.edje.obj, self.name, edje_edit_part_drag_event_set(self.edje.obj, self.name,
<const_char *>event if event is not None else NULL) <const char *>event if event is not None else NULL)
property api: property api:
def __get__(self): def __get__(self):
cdef: cdef:
const_char *name const char *name
const_char *desc const char *desc
name = edje_edit_part_api_name_get(self.edje.obj, self.name) name = edje_edit_part_api_name_get(self.edje.obj, self.name)
desc = edje_edit_part_api_description_get(self.edje.obj, self.name) desc = edje_edit_part_api_description_get(self.edje.obj, self.name)
n, d = _ctouni(name), _ctouni(desc) n, d = _ctouni(name), _ctouni(desc)
@ -276,6 +276,6 @@ cdef class Part(object):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
if isinstance(desc, unicode): desc = desc.encode("UTF-8") if isinstance(desc, unicode): desc = desc.encode("UTF-8")
edje_edit_part_api_name_set(self.edje.obj, self.name, edje_edit_part_api_name_set(self.edje.obj, self.name,
<const_char *>name if name is not None else NULL) <const char *>name if name is not None else NULL)
edje_edit_part_api_description_set(self.edje.obj, self.name, edje_edit_part_api_description_set(self.edje.obj, self.name,
<const_char *>desc if desc is not None else NULL) <const char *>desc if desc is not None else NULL)

View File

@ -19,7 +19,7 @@
cdef class State: cdef class State:
cdef EdjeEdit edje cdef EdjeEdit edje
cdef object part cdef object part
cdef const_char *name cdef const char *name
cdef object part_obj cdef object part_obj
cdef object value cdef object value
@ -51,11 +51,11 @@ cdef class State:
if isinstance(new_name, unicode): new_name = new_name.encode("UTF-8") if isinstance(new_name, unicode): new_name = new_name.encode("UTF-8")
ret = edje_edit_state_name_set(self.edje.obj, self.part, ret = edje_edit_state_name_set(self.edje.obj, self.part,
self.name, self.value, self.name, self.value,
<const_char *>new_name if new_name is not None else NULL, <const char *>new_name if new_name is not None else NULL,
new_value if new_value is not None else self.value) new_value if new_value is not None else self.value)
if ret == 0: if ret == 0:
return False return False
eina_stringshare_replace(&self.name, <const_char *>new_name) eina_stringshare_replace(&self.name, <const char *>new_name)
return True return True
""" """
def copy_from(self, from_state, from_value=0.0): def copy_from(self, from_state, from_value=0.0):
@ -65,8 +65,8 @@ cdef class State:
""" """
def rel1_to_get(self): def rel1_to_get(self):
cdef: cdef:
const_char *tx const char *tx
const_char *ty const char *ty
tx = edje_edit_state_rel1_to_x_get(self.edje.obj, self.part, self.name, tx = edje_edit_state_rel1_to_x_get(self.edje.obj, self.part, self.name,
self.value) self.value)
@ -188,7 +188,7 @@ cdef class State:
self.value, y) self.value, y)
def rel2_to_get(self): def rel2_to_get(self):
cdef const_char_ptr tx, ty cdef const char_ptr tx, ty
tx = edje_edit_state_rel2_to_x_get(self.edje.obj, self.part, self.name, tx = edje_edit_state_rel2_to_x_get(self.edje.obj, self.part, self.name,
self.value) self.value)
ty = edje_edit_state_rel2_to_y_get(self.edje.obj, self.part, self.name, ty = edje_edit_state_rel2_to_y_get(self.edje.obj, self.part, self.name,
@ -505,7 +505,7 @@ cdef class State:
edje_edit_state_visible_set(self.edje.obj, self.part, self.name, self.value, 0) edje_edit_state_visible_set(self.edje.obj, self.part, self.name, self.value, 0)
def color_class_get(self): def color_class_get(self):
cdef const_char_ptr cc cdef const char_ptr cc
cc = edje_edit_state_color_class_get(self.edje.obj, self.part, cc = edje_edit_state_color_class_get(self.edje.obj, self.part,
self.name, self.value) self.name, self.value)
if cc == NULL: if cc == NULL:
@ -523,7 +523,7 @@ cdef class State:
self.name, self.value, cc) self.name, self.value, cc)
def external_params_get(self): def external_params_get(self):
cdef evas.c_evas.const_Eina_List *lst cdef evas.c_evas.const Eina_List *lst
ret = [] ret = []
lst = edje_edit_state_external_params_list_get(self.edje.obj, self.part, lst = edje_edit_state_external_params_list_get(self.edje.obj, self.part,
self.name, self.value) self.name, self.value)
@ -537,7 +537,7 @@ cdef class State:
def external_param_get(self, param): def external_param_get(self, param):
cdef c_edje.Edje_External_Param_Type type cdef c_edje.Edje_External_Param_Type type
cdef void *value cdef void *value
cdef const_char_ptr s cdef const char_ptr s
if not edje_edit_state_external_param_get(self.edje.obj, self.part, if not edje_edit_state_external_param_get(self.edje.obj, self.part,
self.name, self.value, param, self.name, self.value, param,
@ -567,7 +567,7 @@ cdef class State:
return None return None
def external_param_set(self, param, value): def external_param_set(self, param, value):
cdef const_char_ptr expected cdef const char_ptr expected
if isinstance(value, bool): if isinstance(value, bool):
return self.external_param_bool_set(param, value) return self.external_param_bool_set(param, value)
@ -620,7 +620,7 @@ cdef class State:
return value return value
def external_param_string_get(self, param): def external_param_string_get(self, param):
cdef const_char_ptr value cdef const char_ptr value
if not edje_edit_state_external_param_string_get( if not edje_edit_state_external_param_string_get(
self.edje.obj, self.part, self.name, self.value, param, &value): self.edje.obj, self.part, self.name, self.value, param, &value):
@ -629,7 +629,7 @@ cdef class State:
return value return value
def external_param_choice_get(self, param): def external_param_choice_get(self, param):
cdef const_char_ptr value cdef const char_ptr value
if not edje_edit_state_external_param_choice_get( if not edje_edit_state_external_param_choice_get(
self.edje.obj, self.part, self.name, self.value, param, &value): self.edje.obj, self.part, self.name, self.value, param, &value):
@ -664,7 +664,7 @@ cdef class State:
self.edje.obj, self.part, self.name, self.value, param, value)) self.edje.obj, self.part, self.name, self.value, param, value))
def text_get(self): def text_get(self):
cdef const_char_ptr t cdef const char_ptr t
t = edje_edit_state_text_get(self.edje.obj, self.part, self.name, t = edje_edit_state_text_get(self.edje.obj, self.part, self.name,
self.value) self.value)
if t == NULL: if t == NULL:
@ -684,7 +684,7 @@ cdef class State:
self.text_set(text) self.text_set(text)
def font_get(self): def font_get(self):
cdef const_char_ptr f cdef const char_ptr f
f = edje_edit_state_font_get(self.edje.obj, self.part, self.name, f = edje_edit_state_font_get(self.edje.obj, self.part, self.name,
self.value) self.value)
if f == NULL: if f == NULL:
@ -779,7 +779,7 @@ cdef class State:
self.text_fit_set(*value) self.text_fit_set(*value)
def image_get(self): def image_get(self):
cdef const_char_ptr img cdef const char_ptr img
img = edje_edit_state_image_get(self.edje.obj, self.part, self.name, img = edje_edit_state_image_get(self.edje.obj, self.part, self.name,
self.value) self.value)
if img == NULL: if img == NULL:

View File

@ -18,7 +18,7 @@
cdef class Program(object): cdef class Program(object):
cdef EdjeEdit edje cdef EdjeEdit edje
cdef const_char *name cdef const char *name
def __init__(self, EdjeEdit e not None, name not None): def __init__(self, EdjeEdit e not None, name not None):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
@ -38,10 +38,10 @@ cdef class Program(object):
cdef Eina_Bool ret cdef Eina_Bool ret
if isinstance(newname, unicode): newname = newname.encode("UTF-8") if isinstance(newname, unicode): newname = newname.encode("UTF-8")
ret = edje_edit_program_name_set(self.edje.obj, self.name, ret = edje_edit_program_name_set(self.edje.obj, self.name,
<const_char *>newname if newname is not None else NULL) <const char *>newname if newname is not None else NULL)
if ret == 0: if ret == 0:
return False return False
eina_stringshare_replace(&self.name, <const_char *>newname) eina_stringshare_replace(&self.name, <const char *>newname)
return True return True
def edje_get(self): def edje_get(self):
@ -53,7 +53,7 @@ cdef class Program(object):
# XXX TODO: add (or better convert) all this to properties # XXX TODO: add (or better convert) all this to properties
# like is done in Part() # like is done in Part()
def source_get(self): def source_get(self):
cdef const_char *s cdef const char *s
s = edje_edit_program_source_get(self.edje.obj, self.name) s = edje_edit_program_source_get(self.edje.obj, self.name)
ret = _ctouni(s) ret = _ctouni(s)
edje_edit_string_free(s) edje_edit_string_free(s)
@ -62,10 +62,10 @@ cdef class Program(object):
def source_set(self, source): def source_set(self, source):
if isinstance(source, unicode): source = source.encode("UTF-8") if isinstance(source, unicode): source = source.encode("UTF-8")
return bool(edje_edit_program_source_set(self.edje.obj, self.name, return bool(edje_edit_program_source_set(self.edje.obj, self.name,
<const_char *>source if source is not None else NULL)) <const char *>source if source is not None else NULL))
def signal_get(self): def signal_get(self):
cdef const_char *s cdef const char *s
s = edje_edit_program_signal_get(self.edje.obj, self.name) s = edje_edit_program_signal_get(self.edje.obj, self.name)
ret = _ctouni(s) ret = _ctouni(s)
edje_edit_string_free(s) edje_edit_string_free(s)
@ -74,7 +74,7 @@ cdef class Program(object):
def signal_set(self, signal): def signal_set(self, signal):
if isinstance(signal, unicode): signal = signal.encode("UTF-8") if isinstance(signal, unicode): signal = signal.encode("UTF-8")
return bool(edje_edit_program_signal_set(self.edje.obj, self.name, return bool(edje_edit_program_signal_set(self.edje.obj, self.name,
<const_char *>signal if signal is not None else NULL)) <const char *>signal if signal is not None else NULL))
def in_from_get(self): def in_from_get(self):
return edje_edit_program_in_from_get(self.edje.obj, self.name) return edje_edit_program_in_from_get(self.edje.obj, self.name)
@ -106,12 +106,12 @@ cdef class Program(object):
def target_add(self, target): def target_add(self, target):
if isinstance(target, unicode): target = target.encode("UTF-8") if isinstance(target, unicode): target = target.encode("UTF-8")
return bool(edje_edit_program_target_add(self.edje.obj, self.name, return bool(edje_edit_program_target_add(self.edje.obj, self.name,
<const_char *>target if target is not None else NULL)) <const char *>target if target is not None else NULL))
def target_del(self, target): def target_del(self, target):
if isinstance(target, unicode): target = target.encode("UTF-8") if isinstance(target, unicode): target = target.encode("UTF-8")
return bool(edje_edit_program_target_del(self.edje.obj, self.name, return bool(edje_edit_program_target_del(self.edje.obj, self.name,
<const_char *>target if target is not None else NULL)) <const char *>target if target is not None else NULL))
def targets_clear(self): def targets_clear(self):
return bool(edje_edit_program_targets_clear(self.edje.obj, self.name)) return bool(edje_edit_program_targets_clear(self.edje.obj, self.name))
@ -126,18 +126,18 @@ cdef class Program(object):
def after_add(self, after): def after_add(self, after):
if isinstance(after, unicode): after = after.encode("UTF-8") if isinstance(after, unicode): after = after.encode("UTF-8")
return bool(edje_edit_program_after_add(self.edje.obj, self.name, return bool(edje_edit_program_after_add(self.edje.obj, self.name,
<const_char *>after if after is not None else NULL)) <const char *>after if after is not None else NULL))
def after_del(self, after): def after_del(self, after):
if isinstance(after, unicode): after = after.encode("UTF-8") if isinstance(after, unicode): after = after.encode("UTF-8")
return bool(edje_edit_program_after_del(self.edje.obj, self.name, return bool(edje_edit_program_after_del(self.edje.obj, self.name,
<const_char *>after if after is not None else NULL)) <const char *>after if after is not None else NULL))
def afters_clear(self): def afters_clear(self):
return bool(edje_edit_program_afters_clear(self.edje.obj, self.name)) return bool(edje_edit_program_afters_clear(self.edje.obj, self.name))
def state_get(self): def state_get(self):
cdef const_char *s cdef const char *s
s = edje_edit_program_state_get(self.edje.obj, self.name) s = edje_edit_program_state_get(self.edje.obj, self.name)
ret = _ctouni(s) ret = _ctouni(s)
edje_edit_string_free(s) edje_edit_string_free(s)
@ -146,7 +146,7 @@ cdef class Program(object):
def state_set(self, state): def state_set(self, state):
if isinstance(state, unicode): state = state.encode("UTF-8") if isinstance(state, unicode): state = state.encode("UTF-8")
return bool(edje_edit_program_state_set(self.edje.obj, self.name, return bool(edje_edit_program_state_set(self.edje.obj, self.name,
<const_char *>state if state is not None else NULL)) <const char *>state if state is not None else NULL))
def value_get(self): def value_get(self):
return edje_edit_program_value_get(self.edje.obj, self.name) return edje_edit_program_value_get(self.edje.obj, self.name)
@ -155,7 +155,7 @@ cdef class Program(object):
return bool(edje_edit_program_value_set(self.edje.obj, self.name, v)) return bool(edje_edit_program_value_set(self.edje.obj, self.name, v))
def state2_get(self): def state2_get(self):
cdef const_char *s cdef const char *s
s = edje_edit_program_state2_get(self.edje.obj, self.name) s = edje_edit_program_state2_get(self.edje.obj, self.name)
ret = _ctouni(s) ret = _ctouni(s)
edje_edit_string_free(s) edje_edit_string_free(s)
@ -164,7 +164,7 @@ cdef class Program(object):
def state2_set(self, state): def state2_set(self, state):
if isinstance(state, unicode): state = state.encode("UTF-8") if isinstance(state, unicode): state = state.encode("UTF-8")
return bool(edje_edit_program_state2_set(self.edje.obj, self.name, return bool(edje_edit_program_state2_set(self.edje.obj, self.name,
<const_char *>state if state is not None else NULL)) <const char *>state if state is not None else NULL))
def value2_get(self): def value2_get(self):
return edje_edit_program_value2_get(self.edje.obj, self.name) return edje_edit_program_value2_get(self.edje.obj, self.name)
@ -187,8 +187,8 @@ cdef class Program(object):
property api: property api:
def __get__(self): def __get__(self):
cdef: cdef:
const_char *name const char *name
const_char *desc const char *desc
name = edje_edit_program_api_name_get(self.edje.obj, self.name) name = edje_edit_program_api_name_get(self.edje.obj, self.name)
desc = edje_edit_program_api_description_get(self.edje.obj, self.name) desc = edje_edit_program_api_description_get(self.edje.obj, self.name)
n, d = _ctouni(name), _ctouni(desc) n, d = _ctouni(name), _ctouni(desc)
@ -202,9 +202,9 @@ cdef class Program(object):
if isinstance(name, unicode): name = name.encode("UTF-8") if isinstance(name, unicode): name = name.encode("UTF-8")
if isinstance(desc, unicode): desc = desc.encode("UTF-8") if isinstance(desc, unicode): desc = desc.encode("UTF-8")
edje_edit_program_api_name_set(self.edje.obj, self.name, edje_edit_program_api_name_set(self.edje.obj, self.name,
<const_char *>name if name is not None else NULL) <const char *>name if name is not None else NULL)
edje_edit_program_api_description_set(self.edje.obj, self.name, edje_edit_program_api_description_set(self.edje.obj, self.name,
<const_char *>desc if desc is not None else NULL) <const char *>desc if desc is not None else NULL)
property script: property script:
def __get__(self): def __get__(self):
@ -217,7 +217,7 @@ cdef class Program(object):
def __set__(self, code): def __set__(self, code):
if isinstance(code, unicode): code = code.encode("UTF-8") if isinstance(code, unicode): code = code.encode("UTF-8")
edje_edit_script_program_set(self.edje.obj, self.name, edje_edit_script_program_set(self.edje.obj, self.name,
<const_char *>code if code is not None else NULL) <const char *>code if code is not None else NULL)
def __del__(self): def __del__(self):
edje_edit_script_program_set(self.edje.obj, self.name, NULL) edje_edit_script_program_set(self.edje.obj, self.name, NULL)

View File

@ -91,7 +91,7 @@ cdef class ExternalParamInfo:
property translated_name: property translated_name:
def __get__(self): def __get__(self):
cdef const_char *t cdef const char *t
if self._external_type_obj == NULL or \ if self._external_type_obj == NULL or \
self._external_type_obj.translate == NULL: self._external_type_obj.translate == NULL:
return self.name return self.name
@ -195,7 +195,7 @@ cdef class ExternalParamInfoString(ExternalParamInfo):
property translated_default: property translated_default:
def __get__(self): def __get__(self):
cdef const_char *t cdef const char *t
if self._external_type_obj == NULL or \ if self._external_type_obj == NULL or \
self._external_type_obj.translate == NULL: self._external_type_obj.translate == NULL:
return self.default return self.default
@ -231,7 +231,7 @@ cdef class ExternalParamInfoBool(ExternalParamInfo):
property translated_false_string: property translated_false_string:
def __get__(self): def __get__(self):
cdef const_char *t cdef const char *t
if self._external_type_obj == NULL or \ if self._external_type_obj == NULL or \
self._external_type_obj.translate == NULL: self._external_type_obj.translate == NULL:
return self.false_string return self.false_string
@ -249,7 +249,7 @@ cdef class ExternalParamInfoBool(ExternalParamInfo):
property translated_true_string: property translated_true_string:
def __get__(self): def __get__(self):
cdef const_char *t cdef const char *t
if self._external_type_obj == NULL or \ if self._external_type_obj == NULL or \
self._external_type_obj.translate == NULL: self._external_type_obj.translate == NULL:
return self.true_string return self.true_string
@ -269,7 +269,7 @@ cdef class ExternalParamInfoChoice(ExternalParamInfo):
property translated_default: property translated_default:
def __get__(self): def __get__(self):
cdef const_char *t cdef const char *t
if self._external_type_obj == NULL or \ if self._external_type_obj == NULL or \
self._external_type_obj.translate == NULL: self._external_type_obj.translate == NULL:
return self.default return self.default
@ -295,7 +295,7 @@ cdef class ExternalParamInfoChoice(ExternalParamInfo):
property translated_choices: property translated_choices:
def __get__(self): def __get__(self):
cdef const_char *t cdef const char *t
if self._external_type_obj == NULL or \ if self._external_type_obj == NULL or \
self._external_type_obj.translate == NULL: self._external_type_obj.translate == NULL:
return self.choices return self.choices
@ -331,7 +331,7 @@ cdef ExternalParamInfo ExternalParamInfo_from_ptr(type, Edje_External_Param_Info
return p return p
def external_param_info_get(char *type_name): def external_param_info_get(char *type_name):
cdef const_Edje_External_Type *ext_type cdef const Edje_External_Type *ext_type
cdef ExternalType t cdef ExternalType t
warnings.warn("Use ExternalType.parameters_info_get() instead!", warnings.warn("Use ExternalType.parameters_info_get() instead!",
@ -365,7 +365,7 @@ cdef class ExternalType:
return self._obj.module_name return self._obj.module_name
def label_get(self): def label_get(self):
cdef const_char *l cdef const char *l
if self._obj.label_get == NULL: if self._obj.label_get == NULL:
return None return None
l = self._obj.label_get(self._obj.data) l = self._obj.label_get(self._obj.data)
@ -375,7 +375,7 @@ cdef class ExternalType:
return ret return ret
def description_get(self): def description_get(self):
cdef const_char *l cdef const char *l
if self._obj.description_get == NULL: if self._obj.description_get == NULL:
return None return None
l = self._obj.description_get(self._obj.data) l = self._obj.description_get(self._obj.data)
@ -395,7 +395,7 @@ cdef class ExternalType:
It will always return a string, on errors the parameter text It will always return a string, on errors the parameter text
is returned untranslated. is returned untranslated.
""" """
cdef const_char *l cdef const char *l
if self._obj.translate == NULL: if self._obj.translate == NULL:
return text return text
l = self._obj.translate(self._obj.data, text) l = self._obj.translate(self._obj.data, text)
@ -460,12 +460,12 @@ cdef class ExternalIterator:
return self return self
def __next__(self): def __next__(self):
cdef const_Eina_Hash_Tuple *tuple cdef const Eina_Hash_Tuple *tuple
cdef ExternalType t cdef ExternalType t
if eina_iterator_next(self.obj, <void **>&tuple): if eina_iterator_next(self.obj, <void **>&tuple):
t = ExternalType() t = ExternalType()
t._name = <char*>tuple.key t._name = <char*>tuple.key
t._obj = <const_Edje_External_Type*>tuple.data t._obj = <const Edje_External_Type*>tuple.data
return t return t
else: else:
raise StopIteration raise StopIteration
@ -476,7 +476,7 @@ cdef class ExternalIterator:
def external_type_get(char *type_name): def external_type_get(char *type_name):
"Gets the instance that represents an ExternalType of the given name." "Gets the instance that represents an ExternalType of the given name."
cdef const_Edje_External_Type *obj = edje_external_type_get(type_name) cdef const Edje_External_Type *obj = edje_external_type_get(type_name)
cdef ExternalType ret cdef ExternalType ret
if obj == NULL: if obj == NULL:
return None return None

View File

@ -19,7 +19,7 @@ from efl.evas cimport Object
cdef void text_change_cb(void *data, cdef void text_change_cb(void *data,
Evas_Object *obj, Evas_Object *obj,
const_char *part) with gil: const char *part) with gil:
cdef Edje self cdef Edje self
self = <Edje>data self = <Edje>data
if self._text_change_cb is None: if self._text_change_cb is None:
@ -47,7 +47,7 @@ cdef void message_handler_cb(void *data,
cdef void signal_cb(void *data, Evas_Object *obj, cdef void signal_cb(void *data, Evas_Object *obj,
const_char *emission, const_char *source) with gil: const char *emission, const char *source) with gil:
cdef Edje self cdef Edje self
self = object_from_instance(obj) self = object_from_instance(obj)
lst = tuple(<object>data) lst = tuple(<object>data)
@ -188,7 +188,7 @@ cdef class Edje(Object):
""" """
if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
return _ctouni(edje_object_data_get(self.obj, return _ctouni(edje_object_data_get(self.obj,
<const_char *>key if key is not None else NULL)) <const char *>key if key is not None else NULL))
def file_set(self, file, group): def file_set(self, file, group):
"""Set the file (.edj) and the group to load the Edje object from. """Set the file (.edj) and the group to load the Edje object from.
@ -202,8 +202,8 @@ cdef class Edje(Object):
if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file) if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if edje_object_file_set(self.obj, if edje_object_file_set(self.obj,
<const_char *>file if file is not None else NULL, <const char *>file if file is not None else NULL,
<const_char *>group if group is not None else NULL) == 0: <const char *>group if group is not None else NULL) == 0:
raise EdjeLoadError(edje_object_load_error_get(self.obj), file, group) raise EdjeLoadError(edje_object_load_error_get(self.obj), file, group)
def file_get(self): def file_get(self):
@ -214,8 +214,8 @@ cdef class Edje(Object):
""" """
cdef: cdef:
const_char *file const char *file
const_char *group const char *group
edje_object_file_get(self.obj, &file, &group) edje_object_file_get(self.obj, &file, &group)
return (_ctouni(file), _ctouni(group)) return (_ctouni(file), _ctouni(group))
@ -313,7 +313,7 @@ cdef class Edje(Object):
if isinstance(color_class, unicode): if isinstance(color_class, unicode):
color_class = PyUnicode_AsUTF8String(color_class) color_class = PyUnicode_AsUTF8String(color_class)
edje_object_color_class_set(self.obj, edje_object_color_class_set(self.obj,
<const_char *>color_class if color_class is not None else NULL, <const char *>color_class if color_class is not None else NULL,
r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3)
def color_class_get(self, color_class): def color_class_get(self, color_class):
@ -330,7 +330,7 @@ cdef class Edje(Object):
if isinstance(color_class, unicode): if isinstance(color_class, unicode):
color_class = PyUnicode_AsUTF8String(color_class) color_class = PyUnicode_AsUTF8String(color_class)
edje_object_color_class_get(self.obj, edje_object_color_class_get(self.obj,
<const_char *>color_class if color_class is not None else NULL, <const char *>color_class if color_class is not None else NULL,
&r, &g, &b, &a, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3) &r, &g, &b, &a, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3)
return (r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) return (r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3)
@ -339,7 +339,7 @@ cdef class Edje(Object):
if isinstance(color_class, unicode): if isinstance(color_class, unicode):
color_class = PyUnicode_AsUTF8String(color_class) color_class = PyUnicode_AsUTF8String(color_class)
edje_object_color_class_del(self.obj, edje_object_color_class_del(self.obj,
<const_char *>color_class if color_class is not None else NULL) <const char *>color_class if color_class is not None else NULL)
def text_class_set(self, text_class, font, int size): def text_class_set(self, text_class, font, int size):
"""Set text class. """Set text class.
@ -353,8 +353,8 @@ cdef class Edje(Object):
if isinstance(font, unicode): if isinstance(font, unicode):
font = PyUnicode_AsUTF8String(font) font = PyUnicode_AsUTF8String(font)
edje_object_text_class_set(self.obj, edje_object_text_class_set(self.obj,
<const_char *>text_class if text_class is not None else NULL, <const char *>text_class if text_class is not None else NULL,
<const_char *>font if font is not None else NULL, <const char *>font if font is not None else NULL,
size) size)
property scale: property scale:
@ -492,7 +492,7 @@ cdef class Edje(Object):
":rtype: bool" ":rtype: bool"
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_exists(self.obj, return bool(edje_object_part_exists(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def part_object_get(self, part): def part_object_get(self, part):
""" """
@ -508,7 +508,7 @@ cdef class Edje(Object):
cdef Evas_Object *obj cdef Evas_Object *obj
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
obj = <Evas_Object*>edje_object_part_object_get(self.obj, obj = <Evas_Object*>edje_object_part_object_get(self.obj,
<const_char *>part if part is not None else NULL) <const char *>part if part is not None else NULL)
return object_from_instance(obj) return object_from_instance(obj)
def part_geometry_get(self, part): def part_geometry_get(self, part):
@ -516,7 +516,7 @@ cdef class Edje(Object):
cdef int x, y, w, h cdef int x, y, w, h
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_geometry_get(self.obj, edje_object_part_geometry_get(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
&x, &y, &w, &h) &x, &y, &w, &h)
return (x, y, w, h) return (x, y, w, h)
@ -525,7 +525,7 @@ cdef class Edje(Object):
cdef int w, h cdef int w, h
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_geometry_get(self.obj, edje_object_part_geometry_get(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
NULL, NULL, &w, &h) NULL, NULL, &w, &h)
return (w, h) return (w, h)
@ -534,7 +534,7 @@ cdef class Edje(Object):
cdef int x, y cdef int x, y
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_geometry_get(self.obj, edje_object_part_geometry_get(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
&x, &y, NULL, NULL) &x, &y, NULL, NULL)
return (x, y) return (x, y)
@ -567,8 +567,8 @@ cdef class Edje(Object):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
edje_object_part_text_set(self.obj, edje_object_part_text_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def part_text_get(self, part): def part_text_get(self, part):
"""Get the text of a given part. """Get the text of a given part.
@ -577,22 +577,22 @@ cdef class Edje(Object):
:rtype: str :rtype: str
""" """
cdef const_char *s cdef const char *s
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(edje_object_part_text_get(self.obj, return _ctouni(edje_object_part_text_get(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def part_text_select_all(self, part): def part_text_select_all(self, part):
"Select all the text of the given TEXT or TEXTBLOCK part" "Select all the text of the given TEXT or TEXTBLOCK part"
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_text_select_all(self.obj, edje_object_part_text_select_all(self.obj,
<const_char *>part if part is not None else NULL) <const char *>part if part is not None else NULL)
def part_text_select_none(self, part): def part_text_select_none(self, part):
"Deselect all the text of the given TEXT or TEXTBLOCK part" "Deselect all the text of the given TEXT or TEXTBLOCK part"
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_text_select_none(self.obj, edje_object_part_text_select_none(self.obj,
<const_char *>part if part is not None else NULL) <const char *>part if part is not None else NULL)
def part_text_unescaped_set(self, part, text_to_escape): def part_text_unescaped_set(self, part, text_to_escape):
"""Automatically escapes text if using TEXTBLOCK. """Automatically escapes text if using TEXTBLOCK.
@ -608,8 +608,8 @@ cdef class Edje(Object):
if isinstance(text_to_escape, unicode): if isinstance(text_to_escape, unicode):
text_to_escape = PyUnicode_AsUTF8String(text_to_escape) text_to_escape = PyUnicode_AsUTF8String(text_to_escape)
edje_object_part_text_unescaped_set(self.obj, edje_object_part_text_unescaped_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>text_to_escape if text_to_escape is not None else NULL) <const char *>text_to_escape if text_to_escape is not None else NULL)
def part_text_unescaped_get(self, part): def part_text_unescaped_get(self, part):
"""Automatically removes escape from text if using TEXTBLOCK. """Automatically removes escape from text if using TEXTBLOCK.
@ -623,7 +623,7 @@ cdef class Edje(Object):
cdef char *s cdef char *s
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
s = edje_object_part_text_unescaped_get(self.obj, s = edje_object_part_text_unescaped_get(self.obj,
<const_char *>part if part is not None else NULL) <const char *>part if part is not None else NULL)
if s == NULL: if s == NULL:
return None return None
else: else:
@ -649,7 +649,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_swallow(self.obj, edje_object_part_swallow(self.obj,
<const_char *>part if part is not None else NULL, obj.obj) <const char *>part if part is not None else NULL, obj.obj)
def part_unswallow(self, Object obj): def part_unswallow(self, Object obj):
"Unswallow the given object from the edje" "Unswallow the given object from the edje"
@ -659,13 +659,13 @@ cdef class Edje(Object):
":rtype: efl.evas.Object" ":rtype: efl.evas.Object"
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(edje_object_part_swallow_get( return object_from_instance(edje_object_part_swallow_get(
self.obj, <const_char *>part if part is not None else NULL)) self.obj, <const char *>part if part is not None else NULL))
def part_external_object_get(self, part): def part_external_object_get(self, part):
":rtype: efl.evas.Object" ":rtype: efl.evas.Object"
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(edje_object_part_external_object_get( return object_from_instance(edje_object_part_external_object_get(
self.obj, <const_char *>part if part is not None else NULL)) self.obj, <const char *>part if part is not None else NULL))
def part_external_param_set(self, part, param, value): def part_external_param_set(self, part, param, value):
"""Set a parameter of the external part. """Set a parameter of the external part.
@ -677,8 +677,8 @@ cdef class Edje(Object):
:rtype: bool :rtype: bool
""" """
cdef Edje_External_Param p cdef Edje_External_Param p
cdef const_char *c_part cdef const char *c_part
cdef const_char *c_param cdef const char *c_param
if isinstance(part, unicode): if isinstance(part, unicode):
str1 = PyUnicode_AsUTF8String(part) str1 = PyUnicode_AsUTF8String(part)
@ -729,8 +729,8 @@ cdef class Edje(Object):
:return: *None* for errors, other values depending on the parameter type. :return: *None* for errors, other values depending on the parameter type.
""" """
cdef Edje_External_Param p cdef Edje_External_Param p
cdef const_char *c_part cdef const char *c_part
cdef const_char *c_param cdef const char *c_param
if isinstance(part, unicode): if isinstance(part, unicode):
str1 = PyUnicode_AsUTF8String(part) str1 = PyUnicode_AsUTF8String(part)
@ -780,7 +780,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_box_append(self.obj, return bool(edje_object_part_box_append(self.obj,
<const_char *>part if part is not None else NULL, obj.obj)) <const char *>part if part is not None else NULL, obj.obj))
def part_box_prepend(self, part, Object obj): def part_box_prepend(self, part, Object obj):
"""Prepend an item to a BOX part. """Prepend an item to a BOX part.
@ -795,7 +795,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_box_prepend(self.obj, return bool(edje_object_part_box_prepend(self.obj,
<const_char *>part if part is not None else NULL, obj.obj)) <const char *>part if part is not None else NULL, obj.obj))
def part_box_insert_at(self, part, Object obj, def part_box_insert_at(self, part, Object obj,
unsigned int pos): unsigned int pos):
@ -808,7 +808,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_box_insert_at(self.obj, return bool(edje_object_part_box_insert_at(self.obj,
<const_char *>part if part is not None else NULL, obj.obj, pos)) <const char *>part if part is not None else NULL, obj.obj, pos))
def part_box_insert_before(self, part, Object obj, Object reference): def part_box_insert_before(self, part, Object obj, Object reference):
"""Inserts an item in a BOX part before the reference object. """Inserts an item in a BOX part before the reference object.
@ -820,7 +820,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_box_insert_before(self.obj, return bool(edje_object_part_box_insert_before(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
obj.obj, reference.obj)) obj.obj, reference.obj))
def part_box_remove(self, part, Object obj): def part_box_remove(self, part, Object obj):
@ -837,7 +837,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(edje_object_part_box_remove(self.obj, return object_from_instance(edje_object_part_box_remove(self.obj,
<const_char *>part if part is not None else NULL, obj.obj)) <const char *>part if part is not None else NULL, obj.obj))
def part_box_remove_at(self, part, unsigned int pos): def part_box_remove_at(self, part, unsigned int pos):
"""Removes the object at the given position in a BOX part. """Removes the object at the given position in a BOX part.
@ -852,7 +852,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(edje_object_part_box_remove_at(self.obj, return object_from_instance(edje_object_part_box_remove_at(self.obj,
<const_char *>part if part is not None else NULL, pos)) <const char *>part if part is not None else NULL, pos))
def part_box_remove_all(self, part, int clear): def part_box_remove_all(self, part, int clear):
"""Removes all objects from a BOX part. """Removes all objects from a BOX part.
@ -866,7 +866,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_box_remove_all(self.obj, return bool(edje_object_part_box_remove_all(self.obj,
<const_char *>part if part is not None else NULL, clear)) <const char *>part if part is not None else NULL, clear))
def part_table_pack(self, part, Object child, short col, short row, short colspan, short rowspan): def part_table_pack(self, part, Object child, short col, short row, short colspan, short rowspan):
"""Pack an object inside a TABLE part. """Pack an object inside a TABLE part.
@ -882,7 +882,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_table_pack(self.obj, return bool(edje_object_part_table_pack(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj, col, row, colspan, rowspan)) child.obj, col, row, colspan, rowspan))
def part_table_unpack(self, part, Object child): def part_table_unpack(self, part, Object child):
@ -895,7 +895,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_table_unpack(self.obj, return bool(edje_object_part_table_unpack(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj)) child.obj))
def part_table_col_row_size_get(self, part): def part_table_col_row_size_get(self, part):
@ -908,7 +908,7 @@ cdef class Edje(Object):
cdef int c, r cdef int c, r
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_table_col_row_size_get(self.obj, edje_object_part_table_col_row_size_get(self.obj,
<const_char *>part if part is not None else NULL, &c, &r) <const char *>part if part is not None else NULL, &c, &r)
return (c, r) return (c, r)
def part_table_clear(self, part, int clear): def part_table_clear(self, part, int clear):
@ -923,7 +923,7 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return bool(edje_object_part_table_clear(self.obj, return bool(edje_object_part_table_clear(self.obj,
<const_char *>part if part is not None else NULL, clear)) <const char *>part if part is not None else NULL, clear))
def part_table_child_get(self, part, int row, int column): def part_table_child_get(self, part, int row, int column):
"""Retrieve a child from a table. """Retrieve a child from a table.
@ -937,22 +937,22 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(edje_object_part_table_child_get(self.obj, return object_from_instance(edje_object_part_table_child_get(self.obj,
<const_char *>part if part is not None else NULL, row, column)) <const char *>part if part is not None else NULL, row, column))
def part_state_get(self, part): def part_state_get(self, part):
":rtype: (name, value)" ":rtype: (name, value)"
cdef double sv cdef double sv
cdef const_char *sn cdef const char *sn
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
sn = edje_object_part_state_get(self.obj, sn = edje_object_part_state_get(self.obj,
<const_char *>part if part is not None else NULL, &sv) <const char *>part if part is not None else NULL, &sv)
return (_ctouni(sn), sv) return (_ctouni(sn), sv)
def part_drag_dir_get(self, part): def part_drag_dir_get(self, part):
":rtype: int" ":rtype: int"
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return edje_object_part_drag_dir_get(self.obj, return edje_object_part_drag_dir_get(self.obj,
<const_char *>part if part is not None else NULL) <const char *>part if part is not None else NULL)
def part_drag_value_set(self, part, double dx, double dy): def part_drag_value_set(self, part, double dx, double dy):
"""Set the drag value of part """Set the drag value of part
@ -961,14 +961,14 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_value_set(self.obj, edje_object_part_drag_value_set(self.obj,
<const_char *>part if part is not None else NULL, dx, dy) <const char *>part if part is not None else NULL, dx, dy)
def part_drag_value_get(self, part): def part_drag_value_get(self, part):
":rtype: tuple of float" ":rtype: tuple of float"
cdef double dx, dy cdef double dx, dy
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_value_get(self.obj, edje_object_part_drag_value_get(self.obj,
<const_char *>part if part is not None else NULL, &dx, &dy) <const char *>part if part is not None else NULL, &dx, &dy)
return (dx, dy) return (dx, dy)
def part_drag_size_set(self, part, double dw, double dh): def part_drag_size_set(self, part, double dw, double dh):
@ -978,14 +978,14 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_size_set(self.obj, edje_object_part_drag_size_set(self.obj,
<const_char *>part if part is not None else NULL, dw, dh) <const char *>part if part is not None else NULL, dw, dh)
def part_drag_size_get(self, part): def part_drag_size_get(self, part):
":rtype: tuple of float" ":rtype: tuple of float"
cdef double dw, dh cdef double dw, dh
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_size_get(self.obj, edje_object_part_drag_size_get(self.obj,
<const_char *>part if part is not None else NULL, &dw, &dh) <const char *>part if part is not None else NULL, &dw, &dh)
return (dw, dh) return (dw, dh)
def part_drag_step_set(self, part, double dx, double dy): def part_drag_step_set(self, part, double dx, double dy):
@ -995,38 +995,38 @@ cdef class Edje(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_step_set(self.obj, edje_object_part_drag_step_set(self.obj,
<const_char *>part if part is not None else NULL, dx, dy) <const char *>part if part is not None else NULL, dx, dy)
def part_drag_step_get(self, part): def part_drag_step_get(self, part):
":rtype: tuple of float" ":rtype: tuple of float"
cdef double dx, dy cdef double dx, dy
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_step_get(self.obj, edje_object_part_drag_step_get(self.obj,
<const_char *>part if part is not None else NULL, &dx, &dy) <const char *>part if part is not None else NULL, &dx, &dy)
return (dx, dy) return (dx, dy)
def part_drag_step(self, part, double dx, double dy): def part_drag_step(self, part, double dx, double dy):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_step(self.obj, edje_object_part_drag_step(self.obj,
<const_char *>part if part is not None else NULL, dx, dy) <const char *>part if part is not None else NULL, dx, dy)
def part_drag_page_set(self, part, double dx, double dy): def part_drag_page_set(self, part, double dx, double dy):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_page_set(self.obj, edje_object_part_drag_page_set(self.obj,
<const_char *>part if part is not None else NULL, dx, dy) <const char *>part if part is not None else NULL, dx, dy)
def part_drag_page_get(self, part): def part_drag_page_get(self, part):
":rtype: tuple of float" ":rtype: tuple of float"
cdef double dx, dy cdef double dx, dy
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_page_get(self.obj, edje_object_part_drag_page_get(self.obj,
<const_char *>part if part is not None else NULL, &dx, &dy) <const char *>part if part is not None else NULL, &dx, &dy)
return (dx, dy) return (dx, dy)
def part_drag_page(self, part, double dx, double dy): def part_drag_page(self, part, double dx, double dy):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
edje_object_part_drag_page(self.obj, edje_object_part_drag_page(self.obj,
<const_char *>part if part is not None else NULL, dx, dy) <const char *>part if part is not None else NULL, dx, dy)
cdef void message_send_int(self, int id, int data): cdef void message_send_int(self, int id, int data):
cdef Edje_Message_Int m cdef Edje_Message_Int m
@ -1270,8 +1270,8 @@ cdef class Edje(Object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
edje_object_signal_callback_add(self.obj, edje_object_signal_callback_add(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL, <const char *>source if source is not None else NULL,
signal_cb, <void*>lst) signal_cb, <void*>lst)
lst.append((func, args, kargs)) lst.append((func, args, kargs))
@ -1303,8 +1303,8 @@ cdef class Edje(Object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
edje_object_signal_callback_del(self.obj, edje_object_signal_callback_del(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL, <const char *>source if source is not None else NULL,
signal_cb) signal_cb)
def signal_emit(self, emission, source): def signal_emit(self, emission, source):
@ -1312,8 +1312,8 @@ cdef class Edje(Object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
edje_object_signal_emit(self.obj, edje_object_signal_emit(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL) <const char *>source if source is not None else NULL)
# decorators # decorators

View File

@ -1,7 +1,4 @@
from libc.string cimport const_char from efl.evas cimport Evas_Object
from libc.stdlib cimport const_void
from efl.evas cimport Evas_Object, const_Evas_Object
from object_item cimport Elm_Object_Item from object_item cimport Elm_Object_Item
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
@ -9,9 +6,9 @@ cdef extern from "Elementary.h":
ctypedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item) ctypedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item)
Evas_Object * elm_access_object_register(Evas_Object *obj, Evas_Object *parent) Evas_Object * elm_access_object_register(Evas_Object *obj, Evas_Object *parent)
void elm_access_info_set(Evas_Object *obj, int type, const_char *text) void elm_access_info_set(Evas_Object *obj, int type, const char *text)
char * elm_access_info_get(const_Evas_Object *obj, int type) char * elm_access_info_get(const Evas_Object *obj, int type)
# TODO: void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const_void *data) # TODO: void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const void *data)
# TODO: void elm_access_activate_cb_set(Evas_Object *obj, Elm_Access_Activate_Cb func, void *data) # TODO: void elm_access_activate_cb_set(Evas_Object *obj, Elm_Access_Activate_Cb func, void *data)
void elm_access_highlight_set(Evas_Object* obj) void elm_access_highlight_set(Evas_Object* obj)

View File

@ -79,7 +79,7 @@ cdef class Accessible(Object):
""" """
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_access_info_set(self.obj, type, elm_access_info_set(self.obj, type,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def info_get(self, int type): def info_get(self, int type):
"""Get text to give information for specific type. """Get text to give information for specific type.
@ -114,7 +114,7 @@ cdef class Accessible(Object):
# if not callable(func): # if not callable(func):
# raise TypeError("func is not callable.") # raise TypeError("func is not callable.")
# elm_access_info_cb_set(self.obj, type, access_info_cb, <const_void *>self) # elm_access_info_cb_set(self.obj, type, access_info_cb, <const void *>self)
# def activate_cb_set(self, func, *args, **kwargs): # def activate_cb_set(self, func, *args, **kwargs):
# """Set activate callback to activate highlight object. # """Set activate callback to activate highlight object.

View File

@ -87,7 +87,6 @@ Actionslider positions
""" """
from cpython cimport PyUnicode_AsUTF8String from cpython cimport PyUnicode_AsUTF8String
from libc.string cimport const_char
from libc.stdint cimport uintptr_t from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register from efl.eo cimport _object_mapping_register
@ -104,7 +103,7 @@ ELM_ACTIONSLIDER_RIGHT = enums.ELM_ACTIONSLIDER_RIGHT
ELM_ACTIONSLIDER_ALL = enums.ELM_ACTIONSLIDER_ALL ELM_ACTIONSLIDER_ALL = enums.ELM_ACTIONSLIDER_ALL
def _cb_string_conv(uintptr_t addr): def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr cdef const char *s = <const char *>addr
return _ctouni(s) if s is not NULL else None return _ctouni(s) if s is not NULL else None
cdef class Actionslider(LayoutClass): cdef class Actionslider(LayoutClass):

View File

@ -1,11 +1,10 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from enums cimport Elm_Bg_Option from enums cimport Elm_Bg_Option
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_bg_add(Evas_Object *parent) Evas_Object *elm_bg_add(Evas_Object *parent)
Eina_Bool elm_bg_file_set(Evas_Object *obj, const_char *file, const_char *group) Eina_Bool elm_bg_file_set(Evas_Object *obj, const char *file, const char *group)
void elm_bg_file_get(Evas_Object *obj, const_char **file, const_char **group) void elm_bg_file_get(Evas_Object *obj, const char **file, const char **group)
void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option) void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
Elm_Bg_Option elm_bg_option_get(Evas_Object *obj) Elm_Bg_Option elm_bg_option_get(Evas_Object *obj)
void elm_bg_color_set(Evas_Object *obj, int r, int g, int b) void elm_bg_color_set(Evas_Object *obj, int r, int g, int b)

View File

@ -116,8 +116,8 @@ cdef class Background(LayoutClass):
""" """
def __get__(self): def __get__(self):
cdef: cdef:
const_char *filename const char *filename
const_char *group const char *group
elm_bg_file_get(self.obj, &filename, &group) elm_bg_file_get(self.obj, &filename, &group)
return (_ctouni(filename), _ctouni(group)) return (_ctouni(filename), _ctouni(group))
@ -132,21 +132,21 @@ cdef class Background(LayoutClass):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if not elm_bg_file_set(self.obj, if not elm_bg_file_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL): <const char *>group if group is not None else NULL):
raise RuntimeError("Could not set background file.") raise RuntimeError("Could not set background file.")
def file_set(self, filename, group = None): def file_set(self, filename, group = None):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if not elm_bg_file_set(self.obj, if not elm_bg_file_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL): <const char *>group if group is not None else NULL):
raise RuntimeError("Could not set background file.") raise RuntimeError("Could not set background file.")
def file_get(self): def file_get(self):
cdef: cdef:
const_char *filename const char *filename
const_char *group const char *group
elm_bg_file_get(self.obj, &filename, &group) elm_bg_file_get(self.obj, &filename, &group)
return (_ctouni(filename), _ctouni(group)) return (_ctouni(filename), _ctouni(group))

View File

@ -1,4 +1,4 @@
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Coord
from enums cimport Elm_Box_CLayout from enums cimport Elm_Box_CLayout
cdef extern from "Ecore.h": cdef extern from "Ecore.h":

View File

@ -1,7 +1,6 @@
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Object from efl.evas cimport Eina_Bool, Eina_List, Evas_Object
from enums cimport Elm_Calendar_Mark_Repeat_Type, Elm_Calendar_Select_Mode, \ from enums cimport Elm_Calendar_Mark_Repeat_Type, Elm_Calendar_Select_Mode, \
Elm_Calendar_Selectable, Elm_Calendar_Weekday Elm_Calendar_Selectable, Elm_Calendar_Weekday
from libc.string cimport const_char
cdef extern from "string.h": cdef extern from "string.h":
void *memcpy(void *dst, void *src, int n) void *memcpy(void *dst, void *src, int n)
@ -20,7 +19,7 @@ cdef extern from "time.h":
int tm_isdst int tm_isdst
long int tm_gmtoff long int tm_gmtoff
const_char *tm_zone const char *tm_zone
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
@ -30,8 +29,8 @@ cdef extern from "Elementary.h":
pass pass
Evas_Object * elm_calendar_add(Evas_Object *parent) Evas_Object * elm_calendar_add(Evas_Object *parent)
const_char ** elm_calendar_weekdays_names_get(Evas_Object *obj) const char ** elm_calendar_weekdays_names_get(Evas_Object *obj)
void elm_calendar_weekdays_names_set(Evas_Object *obj, const_char *weekdays[]) void elm_calendar_weekdays_names_set(Evas_Object *obj, const char *weekdays[])
void elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max) void elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max)
void elm_calendar_min_max_year_get(Evas_Object *obj, int *min, int *max) void elm_calendar_min_max_year_get(Evas_Object *obj, int *min, int *max)
void elm_calendar_select_mode_set(Evas_Object *obj, Elm_Calendar_Select_Mode mode) void elm_calendar_select_mode_set(Evas_Object *obj, Elm_Calendar_Select_Mode mode)
@ -39,10 +38,10 @@ cdef extern from "Elementary.h":
void elm_calendar_selected_time_set(Evas_Object *obj, tm *selected_time) void elm_calendar_selected_time_set(Evas_Object *obj, tm *selected_time)
Eina_Bool elm_calendar_selected_time_get(Evas_Object *obj, tm *selected_time) Eina_Bool elm_calendar_selected_time_get(Evas_Object *obj, tm *selected_time)
#TODO: void elm_calendar_format_function_set(Evas_Object *obj, Elm_Calendar_Format_Cb format_func) #TODO: void elm_calendar_format_function_set(Evas_Object *obj, Elm_Calendar_Format_Cb format_func)
Elm_Calendar_Mark * elm_calendar_mark_add(Evas_Object *obj, const_char *mark_type, tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat) Elm_Calendar_Mark * elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat)
void elm_calendar_mark_del(Elm_Calendar_Mark *mark) void elm_calendar_mark_del(Elm_Calendar_Mark *mark)
void elm_calendar_marks_clear(Evas_Object *obj) void elm_calendar_marks_clear(Evas_Object *obj)
const_Eina_List * elm_calendar_marks_get(Evas_Object *obj) const Eina_List * elm_calendar_marks_get(Evas_Object *obj)
void elm_calendar_marks_draw(Evas_Object *obj) void elm_calendar_marks_draw(Evas_Object *obj)
void elm_calendar_interval_set(Evas_Object *obj, double interval) void elm_calendar_interval_set(Evas_Object *obj, double interval)
double elm_calendar_interval_get(Evas_Object *obj) double elm_calendar_interval_get(Evas_Object *obj)

View File

@ -263,7 +263,7 @@ cdef class CalendarMark(object):
time.tm_isdst = tmtup.tm_isdst time.tm_isdst = tmtup.tm_isdst
if isinstance(mark_type, unicode): mark_type = PyUnicode_AsUTF8String(mark_type) if isinstance(mark_type, unicode): mark_type = PyUnicode_AsUTF8String(mark_type)
self.obj = elm_calendar_mark_add(cal.obj, self.obj = elm_calendar_mark_add(cal.obj,
<const_char *>mark_type if mark_type is not None else NULL, <const char *>mark_type if mark_type is not None else NULL,
&time, repeat) &time, repeat)
def delete(self): def delete(self):
@ -448,7 +448,7 @@ cdef class Calendar(LayoutClass):
def __get__(self): def __get__(self):
cdef: cdef:
Elm_Calendar_Mark *obj Elm_Calendar_Mark *obj
const_Eina_List *lst = elm_calendar_marks_get(self.obj) const Eina_List *lst = elm_calendar_marks_get(self.obj)
list ret = list() list ret = list()
CalendarMark o CalendarMark o

View File

@ -26,7 +26,7 @@ cdef extern from "Elementary.h":
struct _Elm_Drag_User_Info: struct _Elm_Drag_User_Info:
Elm_Sel_Format format Elm_Sel_Format format
const_char *data const char *data
Eina_List *icons Eina_List *icons
Elm_Xdnd_Action action Elm_Xdnd_Action action
Elm_Drag_Icon_Create_Cb createicon Elm_Drag_Icon_Create_Cb createicon
@ -56,13 +56,13 @@ cdef extern from "Elementary.h":
Elm_Drop_Item_Container_Cb dropcb, void *cbdata) Elm_Drop_Item_Container_Cb dropcb, void *cbdata)
Eina_Bool elm_drop_item_container_del(Evas_Object *obj) Eina_Bool elm_drop_item_container_del(Evas_Object *obj)
Eina_Bool elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, const_void *buf, size_t buflen) Eina_Bool elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, const void *buf, size_t buflen)
Eina_Bool elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata) Eina_Bool elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata)
Eina_Bool elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection) Eina_Bool elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection)
void elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const_void *data) void elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const void *data)
# Eina_Bool elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State entercb, void *enterdata, Elm_Drag_State leavecb, void *leavedata, Elm_Drag_Pos poscb, void *posdata, Elm_Drop_Cb dropcb, void *cbdata) # Eina_Bool elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State entercb, void *enterdata, Elm_Drag_State leavecb, void *leavedata, Elm_Drag_Pos poscb, void *posdata, Elm_Drop_Cb dropcb, void *cbdata)
# Eina_Bool elm_drop_target_del(Evas_Object *obj) # Eina_Bool elm_drop_target_del(Evas_Object *obj)
# Eina_Bool elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const_char *data, Elm_Xdnd_Action action, Elm_Drag_Icon_Create_Cb createicon, void *createdata, Elm_Drag_Pos dragpos, void *dragdata, Elm_Drag_Accept acceptcb, void *acceptdata, Elm_Drag_State dragdone, void *donecbdata) # Eina_Bool elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data, Elm_Xdnd_Action action, Elm_Drag_Icon_Create_Cb createicon, void *createdata, Elm_Drag_Pos dragpos, void *dragdata, Elm_Drag_Accept acceptcb, void *acceptdata, Elm_Drag_State dragdone, void *donecbdata)
# Eina_Bool elm_drag_action_set(Evas_Object *obj, Elm_Xdnd_Action action) # Eina_Bool elm_drag_action_set(Evas_Object *obj, Elm_Xdnd_Action action)
cdef class SelectionData(object): cdef class SelectionData(object):
@ -89,7 +89,7 @@ cdef class SelectionData(object):
property data: property data:
def __get__(self): def __get__(self):
# TODO: void * # TODO: void *
return <const_char *>self.sel_data.data return <const char *>self.sel_data.data
property len: property len:
""":type: size_t""" """:type: size_t"""
@ -385,7 +385,7 @@ cdef class DragUserInfo(object):
public list icons public list icons
public object createicon, createdata, dragpos, dragdata public object createicon, createdata, dragpos, dragdata
public object acceptcb, acceptdata, dragdone, donecbdata public object acceptcb, acceptdata, dragdone, donecbdata
const_char *_data const char *_data
property data: property data:
def __get__(self): def __get__(self):

View File

@ -1,7 +1,6 @@
from efl.evas cimport Evas_Object, const_Evas_Object, const_Eina_List, Eina_Bool from efl.evas cimport Evas_Object, Eina_List, Eina_Bool
from object_item cimport Elm_Object_Item, const_Elm_Object_Item from object_item cimport Elm_Object_Item
from enums cimport Elm_Colorselector_Mode from enums cimport Elm_Colorselector_Mode
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object * elm_colorselector_add(Evas_Object *parent) Evas_Object * elm_colorselector_add(Evas_Object *parent)
@ -13,9 +12,9 @@ cdef extern from "Elementary.h":
void elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a) void elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a)
Elm_Object_Item * elm_colorselector_palette_color_add(Evas_Object *obj, int r, int g, int b, int a) Elm_Object_Item * elm_colorselector_palette_color_add(Evas_Object *obj, int r, int g, int b, int a)
void elm_colorselector_palette_clear(Evas_Object *obj) void elm_colorselector_palette_clear(Evas_Object *obj)
void elm_colorselector_palette_name_set(Evas_Object *obj, const_char *palette_name) void elm_colorselector_palette_name_set(Evas_Object *obj, const char *palette_name)
const_char * elm_colorselector_palette_name_get(Evas_Object *obj) const char * elm_colorselector_palette_name_get(Evas_Object *obj)
const_Eina_List * elm_colorselector_palette_items_get(const_Evas_Object *obj) const Eina_List * elm_colorselector_palette_items_get(const Evas_Object *obj)
Eina_Bool elm_colorselector_palette_item_selected_get(const_Elm_Object_Item *it) Eina_Bool elm_colorselector_palette_item_selected_get(const Elm_Object_Item *it)
void elm_colorselector_palette_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) void elm_colorselector_palette_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
Elm_Object_Item * elm_colorselector_palette_selected_item_get(const_Evas_Object *obj) Elm_Object_Item * elm_colorselector_palette_selected_item_get(const Evas_Object *obj)

View File

@ -240,13 +240,13 @@ cdef class Colorselector(LayoutClass):
s = palette_name s = palette_name
if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s) if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
elm_colorselector_palette_name_set(self.obj, elm_colorselector_palette_name_set(self.obj,
<const_char *>s if s is not None else NULL) <const char *>s if s is not None else NULL)
def palette_name_set(self, palette_name): def palette_name_set(self, palette_name):
s = palette_name s = palette_name
if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s) if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
elm_colorselector_palette_name_set(self.obj, elm_colorselector_palette_name_set(self.obj,
<const_char *>s if s is not None else NULL) <const char *>s if s is not None else NULL)
def palette_name_get(self): def palette_name_get(self):
return _ctouni(elm_colorselector_palette_name_get(self.obj)) return _ctouni(elm_colorselector_palette_name_get(self.obj))
@ -263,7 +263,7 @@ cdef class Colorselector(LayoutClass):
""" """
cdef: cdef:
list ret = list() list ret = list()
const_Eina_List *lst = elm_colorselector_palette_items_get(self.obj) const Eina_List *lst = elm_colorselector_palette_items_get(self.obj)
while lst: while lst:
ret.append(_object_item_to_python(<Elm_Object_Item *>lst.data)) ret.append(_object_item_to_python(<Elm_Object_Item *>lst.data))

View File

@ -1,27 +1,27 @@
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Coord, Evas_Object, Evas_Font_Size from efl.evas cimport Eina_Bool, Eina_List, Evas_Coord, Evas_Object, \
from libc.string cimport const_char Evas_Font_Size
from enums cimport Elm_Softcursor_Mode from enums cimport Elm_Softcursor_Mode
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef struct Elm_Font_Overlay: ctypedef struct Elm_Font_Overlay:
const_char *text_class const char *text_class
const_char *font const char *font
Evas_Font_Size size Evas_Font_Size size
ctypedef struct Elm_Text_Class: ctypedef struct Elm_Text_Class:
const_char *name const char *name
const_char *desc const char *desc
Eina_Bool elm_config_save() Eina_Bool elm_config_save()
void elm_config_reload() void elm_config_reload()
void elm_config_all_flush() void elm_config_all_flush()
const_char * elm_config_profile_get() const char * elm_config_profile_get()
const_char * elm_config_profile_dir_get(const_char *profile, Eina_Bool is_user) const char * elm_config_profile_dir_get(const char *profile, Eina_Bool is_user)
void elm_config_profile_dir_free(const_char *p_dir) void elm_config_profile_dir_free(const char *p_dir)
Eina_List * elm_config_profile_list_get() Eina_List * elm_config_profile_list_get()
void elm_config_profile_list_free(Eina_List *l) void elm_config_profile_list_free(Eina_List *l)
void elm_config_profile_set(const_char *profile) void elm_config_profile_set(const char *profile)
Eina_Bool elm_config_scroll_bounce_enabled_get() Eina_Bool elm_config_scroll_bounce_enabled_get()
void elm_config_scroll_bounce_enabled_set(Eina_Bool enabled) void elm_config_scroll_bounce_enabled_set(Eina_Bool enabled)
@ -77,20 +77,20 @@ cdef extern from "Elementary.h":
double elm_config_password_show_last_timeout_get() double elm_config_password_show_last_timeout_get()
void elm_config_password_show_last_timeout_set(double password_show_last_timeout) void elm_config_password_show_last_timeout_set(double password_show_last_timeout)
const_char * elm_config_engine_get() const char * elm_config_engine_get()
void elm_config_engine_set(const_char *engine) void elm_config_engine_set(const char *engine)
const_char * elm_config_preferred_engine_get() const char * elm_config_preferred_engine_get()
void elm_config_preferred_engine_set(const_char *engine) void elm_config_preferred_engine_set(const char *engine)
Eina_List * elm_config_text_classes_list_get() Eina_List * elm_config_text_classes_list_get()
void elm_config_text_classes_list_free(Eina_List *list) void elm_config_text_classes_list_free(Eina_List *list)
Eina_List * elm_config_font_overlay_list_get() Eina_List * elm_config_font_overlay_list_get()
void elm_config_font_overlay_set(const_char *text_class, const_char *font, Evas_Font_Size size) void elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size)
#TODO: Eina_Bool elm_config_access_get() #TODO: Eina_Bool elm_config_access_get()
#TODO: void elm_config_access_set(Eina_Bool is_access) #TODO: void elm_config_access_set(Eina_Bool is_access)
Eina_Bool elm_config_selection_unfocused_clear_get() Eina_Bool elm_config_selection_unfocused_clear_get()
void elm_config_selection_unfocused_clear_set(Eina_Bool enabled) void elm_config_selection_unfocused_clear_set(Eina_Bool enabled)
void elm_config_font_overlay_unset(const_char *text_class) void elm_config_font_overlay_unset(const char *text_class)
void elm_config_font_overlay_apply() void elm_config_font_overlay_apply()
Evas_Coord elm_config_finger_size_get() Evas_Coord elm_config_finger_size_get()
void elm_config_finger_size_set(Evas_Coord size) void elm_config_finger_size_set(Evas_Coord size)
@ -118,7 +118,7 @@ cdef extern from "Elementary.h":
Eina_Bool elm_config_clouseau_enabled_get() Eina_Bool elm_config_clouseau_enabled_get()
void elm_config_clouseau_enabled_set(Eina_Bool enabled) void elm_config_clouseau_enabled_set(Eina_Bool enabled)
const_char * elm_config_indicator_service_get(int rotation) const char * elm_config_indicator_service_get(int rotation)
double elm_config_glayer_long_tap_start_timeout_get() double elm_config_glayer_long_tap_start_timeout_get()
void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout) void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout)

View File

@ -168,7 +168,7 @@ cdef class Configuration(object):
return _ctouni(elm_config_profile_get()) return _ctouni(elm_config_profile_get())
def __set__(self, profile): def __set__(self, profile):
if isinstance(profile, unicode): profile = PyUnicode_AsUTF8String(profile) if isinstance(profile, unicode): profile = PyUnicode_AsUTF8String(profile)
elm_config_profile_set(<const_char *>profile if profile is not None else NULL) elm_config_profile_set(<const char *>profile if profile is not None else NULL)
def profile_dir_get(self, profile, bint is_user): def profile_dir_get(self, profile, bint is_user):
"""profile_dir_get(unicode profile, bool is_user) """profile_dir_get(unicode profile, bool is_user)
@ -188,7 +188,7 @@ cdef class Configuration(object):
""" """
if isinstance(profile, unicode): profile = PyUnicode_AsUTF8String(profile) if isinstance(profile, unicode): profile = PyUnicode_AsUTF8String(profile)
return _ctouni(elm_config_profile_dir_get( return _ctouni(elm_config_profile_dir_get(
<const_char *>profile if profile is not None else NULL, <const char *>profile if profile is not None else NULL,
is_user)) is_user))
property profile_list: property profile_list:
@ -561,7 +561,7 @@ cdef class Configuration(object):
def __set__(self, engine): def __set__(self, engine):
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine) if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
elm_config_engine_set( elm_config_engine_set(
<const_char *>engine if engine is not None else NULL) <const char *>engine if engine is not None else NULL)
property preferred_engine: property preferred_engine:
"""Get Elementary's preferred engine to use. """Get Elementary's preferred engine to use.
@ -581,7 +581,7 @@ cdef class Configuration(object):
def __set__(self, engine): def __set__(self, engine):
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine) if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
elm_config_preferred_engine_set( elm_config_preferred_engine_set(
<const_char *>engine if engine is not None else NULL) <const char *>engine if engine is not None else NULL)
property text_classes_list: property text_classes_list:
"""Get Elementary's list of supported text classes. """Get Elementary's list of supported text classes.
@ -593,8 +593,8 @@ cdef class Configuration(object):
cdef: cdef:
Eina_List *lst Eina_List *lst
Elm_Text_Class *data Elm_Text_Class *data
const_char *name const char *name
const_char *desc const char *desc
ret = [] ret = []
lst = elm_config_text_classes_list_get() lst = elm_config_text_classes_list_get()
@ -621,10 +621,10 @@ cdef class Configuration(object):
""" """
def __get__(self): def __get__(self):
cdef: cdef:
const_Eina_List *lst const Eina_List *lst
Elm_Font_Overlay *data Elm_Font_Overlay *data
const_char *text_class const char *text_class
const_char *font const char *font
Evas_Font_Size size Evas_Font_Size size
ret = [] ret = []
@ -667,8 +667,8 @@ cdef class Configuration(object):
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1) if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
if isinstance(a2, unicode): a2 = PyUnicode_AsUTF8String(a2) if isinstance(a2, unicode): a2 = PyUnicode_AsUTF8String(a2)
elm_config_font_overlay_set( elm_config_font_overlay_set(
<const_char *>a1 if a1 is not None else NULL, <const char *>a1 if a1 is not None else NULL,
<const_char *>a2 if a2 is not None else NULL, <const char *>a2 if a2 is not None else NULL,
size) size)
# TODO: # TODO:
@ -717,7 +717,7 @@ cdef class Configuration(object):
a1 = text_class a1 = text_class
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1) if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
elm_config_font_overlay_unset( elm_config_font_overlay_unset(
<const_char *>a1 if a1 is not None else NULL) <const char *>a1 if a1 is not None else NULL)
def font_overlay_apply(self): def font_overlay_apply(self):
"""font_overlay_apply() """font_overlay_apply()
@ -955,14 +955,14 @@ def preferred_engine_get():
def preferred_engine_set(engine): def preferred_engine_set(engine):
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine) if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
elm_config_preferred_engine_set( elm_config_preferred_engine_set(
<const_char *>engine if engine is not None else NULL) <const char *>engine if engine is not None else NULL)
def engine_get(): def engine_get():
return _ctouni(elm_config_engine_get()) return _ctouni(elm_config_engine_get())
def engine_set(engine): def engine_set(engine):
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine) if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
elm_config_engine_set( elm_config_engine_set(
<const_char *>engine if engine is not None else NULL) <const char *>engine if engine is not None else NULL)
def scale_get(): def scale_get():
return elm_config_scale_get() return elm_config_scale_get()

View File

@ -1,7 +1,6 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Evas_Smart_Cb from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb
from object_item cimport Elm_Object_Item from object_item cimport Elm_Object_Item
from enums cimport Elm_Ctxpopup_Direction from enums cimport Elm_Ctxpopup_Direction
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_ctxpopup_add(Evas_Object *parent) Evas_Object *elm_ctxpopup_add(Evas_Object *parent)
@ -10,11 +9,11 @@ cdef extern from "Elementary.h":
void elm_ctxpopup_clear(Evas_Object *obj) void elm_ctxpopup_clear(Evas_Object *obj)
void elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) void elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
Eina_Bool elm_ctxpopup_horizontal_get(Evas_Object *obj) Eina_Bool elm_ctxpopup_horizontal_get(Evas_Object *obj)
Elm_Object_Item *elm_ctxpopup_item_append(Evas_Object *obj, const_char *label, Evas_Object *icon, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_ctxpopup_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, void *data)
void elm_ctxpopup_direction_priority_set(Evas_Object *obj, Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second, Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth) void elm_ctxpopup_direction_priority_set(Evas_Object *obj, Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second, Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth)
void elm_ctxpopup_direction_priority_get(Evas_Object *obj, Elm_Ctxpopup_Direction *first, Elm_Ctxpopup_Direction *second, Elm_Ctxpopup_Direction *third, Elm_Ctxpopup_Direction *fourth) void elm_ctxpopup_direction_priority_get(Evas_Object *obj, Elm_Ctxpopup_Direction *first, Elm_Ctxpopup_Direction *second, Elm_Ctxpopup_Direction *third, Elm_Ctxpopup_Direction *fourth)
Elm_Ctxpopup_Direction elm_ctxpopup_direction_get(Evas_Object *obj) Elm_Ctxpopup_Direction elm_ctxpopup_direction_get(Evas_Object *obj)
void elm_ctxpopup_dismiss(Evas_Object *obj) void elm_ctxpopup_dismiss(Evas_Object *obj)
void elm_ctxpopup_auto_hide_disabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_ctxpopup_auto_hide_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_ctxpopup_auto_hide_disabled_get(const_Evas_Object *obj) Eina_Bool elm_ctxpopup_auto_hide_disabled_get(const Evas_Object *obj)

View File

@ -167,7 +167,7 @@ cdef class CtxpopupItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_ctxpopup_item_append(ctxpopup.obj, item = elm_ctxpopup_item_append(ctxpopup.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.icon.obj if self.icon is not None else NULL, self.icon.obj if self.icon is not None else NULL,
cb, <void*>self) cb, <void*>self)
@ -249,7 +249,7 @@ cdef class Ctxpopup(LayoutClass):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_ctxpopup_item_append(self.obj, item = elm_ctxpopup_item_append(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
cb, <void*>ret) cb, <void*>ret)

View File

@ -1,12 +1,11 @@
from efl.evas cimport Evas_Object, Eina_Bool from efl.evas cimport Evas_Object, Eina_Bool
from general cimport tm from general cimport tm
from enums cimport Elm_Datetime_Field_Type from enums cimport Elm_Datetime_Field_Type
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object * elm_datetime_add(Evas_Object *parent) Evas_Object * elm_datetime_add(Evas_Object *parent)
const_char * elm_datetime_format_get(Evas_Object *obj) const char * elm_datetime_format_get(Evas_Object *obj)
void elm_datetime_format_set(Evas_Object *obj, const_char *fmt) void elm_datetime_format_set(Evas_Object *obj, const char *fmt)
Eina_Bool elm_datetime_value_max_get(Evas_Object *obj, tm *maxtime) Eina_Bool elm_datetime_value_max_get(Evas_Object *obj, tm *maxtime)
Eina_Bool elm_datetime_value_max_set(Evas_Object *obj, tm *maxtime) Eina_Bool elm_datetime_value_max_set(Evas_Object *obj, tm *maxtime)
Eina_Bool elm_datetime_value_min_get(Evas_Object *obj, tm *mintime) Eina_Bool elm_datetime_value_min_get(Evas_Object *obj, tm *mintime)

View File

@ -377,7 +377,7 @@ cdef class Datetime(Object):
def __set__(self, fmt): def __set__(self, fmt):
if isinstance(fmt, unicode): fmt = PyUnicode_AsUTF8String(fmt) if isinstance(fmt, unicode): fmt = PyUnicode_AsUTF8String(fmt)
elm_datetime_format_set(self.obj, elm_datetime_format_set(self.obj,
<const_char *>fmt if fmt is not None else NULL) <const char *>fmt if fmt is not None else NULL)
property value_max: property value_max:
"""The upper boundary of a field. """The upper boundary of a field.

View File

@ -1,16 +1,15 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Eina_List from efl.evas cimport Eina_Bool, Evas_Object, Eina_List
from enums cimport Elm_Dayselector_Day from enums cimport Elm_Dayselector_Day
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_dayselector_add(Evas_Object *parent) Evas_Object *elm_dayselector_add(Evas_Object *parent)
void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected) void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected)
Eina_Bool elm_dayselector_day_selected_get(const_Evas_Object *obj, Elm_Dayselector_Day day) Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day)
void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day) void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day)
Elm_Dayselector_Day elm_dayselector_week_start_get(const_Evas_Object *obj) Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj)
void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day) void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day)
Elm_Dayselector_Day elm_dayselector_weekend_start_get(const_Evas_Object *obj) Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj)
void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length) void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length)
unsigned int elm_dayselector_weekend_length_get(const_Evas_Object *obj) unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj)
void elm_dayselector_weekdays_names_set(Evas_Object *obj, const_char *weekdays[]) void elm_dayselector_weekdays_names_set(Evas_Object *obj, const char *weekdays[])
Eina_List *elm_dayselector_weekdays_names_get(const_Evas_Object *obj) Eina_List *elm_dayselector_weekdays_names_get(const Evas_Object *obj)

View File

@ -1,7 +1,7 @@
from efl.evas cimport Eina_Bool, const_Eina_List, Evas_Object, Evas_Smart_Cb from efl.eina cimport Eina_List
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from enums cimport Elm_Scroller_Policy from enums cimport Elm_Scroller_Policy
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_diskselector_add(Evas_Object *parent) Evas_Object *elm_diskselector_add(Evas_Object *parent)
@ -12,8 +12,8 @@ cdef extern from "Elementary.h":
void elm_diskselector_display_item_num_set(Evas_Object *obj, int num) void elm_diskselector_display_item_num_set(Evas_Object *obj, int num)
int elm_diskselector_display_item_num_get(Evas_Object *obj) int elm_diskselector_display_item_num_get(Evas_Object *obj)
void elm_diskselector_clear(Evas_Object *obj) void elm_diskselector_clear(Evas_Object *obj)
const_Eina_List *elm_diskselector_items_get(Evas_Object *obj) const Eina_List *elm_diskselector_items_get(Evas_Object *obj)
Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const_char *label, Evas_Object *icon, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_diskselector_selected_item_get(Evas_Object *obj) Elm_Object_Item *elm_diskselector_selected_item_get(Evas_Object *obj)
void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
Eina_Bool elm_diskselector_item_selected_get(Elm_Object_Item *it) Eina_Bool elm_diskselector_item_selected_get(Elm_Object_Item *it)

View File

@ -166,7 +166,7 @@ cdef class DiskselectorItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_diskselector_item_append(diskselector.obj, item = elm_diskselector_item_append(diskselector.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.icon.obj if self.icon is not None else NULL, self.icon.obj if self.icon is not None else NULL,
cb, <void*>self) cb, <void*>self)
@ -365,7 +365,7 @@ cdef class Diskselector(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_diskselector_item_append(self.obj, item = elm_diskselector_item_append(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
cb, <void*>ret) cb, <void*>ret)

View File

@ -1,12 +1,10 @@
from efl.evas cimport Eina_Bool, Eina_Rectangle, Evas_Object, \ from efl.evas cimport Eina_Bool, Eina_Rectangle, Evas_Object, \
const_Evas_Object, Evas_Coord, Evas_Smart_Cb Evas_Coord, Evas_Smart_Cb
from enums cimport Elm_Wrap_Type, Elm_Text_Format, Elm_Cnp_Mode, \ from enums cimport Elm_Wrap_Type, Elm_Text_Format, Elm_Cnp_Mode, \
Elm_Scroller_Policy, Elm_Input_Panel_Layout, Elm_Input_Panel_Lang, \ Elm_Scroller_Policy, Elm_Input_Panel_Layout, Elm_Input_Panel_Lang, \
Elm_Input_Panel_Lang, Elm_Input_Panel_Return_Key_Type, \ Elm_Input_Panel_Lang, Elm_Input_Panel_Return_Key_Type, \
Elm_Autocapital_Type, Elm_Icon_Type, Elm_Sel_Type, Elm_Sel_Format, \ Elm_Autocapital_Type, Elm_Icon_Type, Elm_Sel_Type, Elm_Sel_Format, \
Elm_Xdnd_Action Elm_Xdnd_Action
from libc.string cimport const_char
from libc.stdlib cimport const_void
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef struct Elm_Entry_Anchor_Info: ctypedef struct Elm_Entry_Anchor_Info:
@ -36,8 +34,6 @@ cdef extern from "Elementary.h":
ctypedef struct Elm_Entry_Context_Menu_Item: ctypedef struct Elm_Entry_Context_Menu_Item:
pass pass
ctypedef Elm_Entry_Context_Menu_Item const_Elm_Entry_Context_Menu_Item "const Elm_Entry_Context_Menu_Item"
ctypedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text) ctypedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text)
ctypedef Eina_Bool (*Elm_Drop_Cb) (void *data, Evas_Object *obj, Elm_Selection_Data *ev) ctypedef Eina_Bool (*Elm_Drop_Cb) (void *data, Evas_Object *obj, Elm_Selection_Data *ev)
@ -49,25 +45,25 @@ cdef extern from "Elementary.h":
# Data for the elm_entry_filter_accept_set() entry filter. # Data for the elm_entry_filter_accept_set() entry filter.
ctypedef struct Elm_Entry_Filter_Accept_Set: ctypedef struct Elm_Entry_Filter_Accept_Set:
const_char *accepted # Set of characters accepted in the entry. const char *accepted # Set of characters accepted in the entry.
const_char *rejected # Set of characters rejected from the entry. const char *rejected # Set of characters rejected from the entry.
Evas_Object * elm_entry_add(Evas_Object *parent) Evas_Object * elm_entry_add(Evas_Object *parent)
void elm_entry_text_style_user_push(Evas_Object *obj, const_char *style) void elm_entry_text_style_user_push(Evas_Object *obj, const char *style)
void elm_entry_text_style_user_pop(Evas_Object *obj) void elm_entry_text_style_user_pop(Evas_Object *obj)
const_char* elm_entry_text_style_user_peek(const_Evas_Object *obj) const char* elm_entry_text_style_user_peek(const Evas_Object *obj)
void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
Eina_Bool elm_entry_single_line_get(Evas_Object *obj) Eina_Bool elm_entry_single_line_get(Evas_Object *obj)
void elm_entry_password_set(Evas_Object *obj, Eina_Bool password) void elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
Eina_Bool elm_entry_password_get(Evas_Object *obj) Eina_Bool elm_entry_password_get(Evas_Object *obj)
void elm_entry_entry_set(Evas_Object *obj, const_char *entry) void elm_entry_entry_set(Evas_Object *obj, const char *entry)
const_char * elm_entry_entry_get(Evas_Object *obj) const char * elm_entry_entry_get(Evas_Object *obj)
void elm_entry_entry_append(Evas_Object *obj, const_char *text) void elm_entry_entry_append(Evas_Object *obj, const char *text)
Eina_Bool elm_entry_is_empty(Evas_Object *obj) Eina_Bool elm_entry_is_empty(Evas_Object *obj)
const_char * elm_entry_selection_get(Evas_Object *obj) const char * elm_entry_selection_get(Evas_Object *obj)
Evas_Object * elm_entry_textblock_get(Evas_Object *obj) Evas_Object * elm_entry_textblock_get(Evas_Object *obj)
void elm_entry_calc_force(Evas_Object *obj) void elm_entry_calc_force(Evas_Object *obj)
void elm_entry_entry_insert(Evas_Object *obj, const_char *entry) void elm_entry_entry_insert(Evas_Object *obj, const char *entry)
void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap)
Elm_Wrap_Type elm_entry_line_wrap_get(Evas_Object *obj) Elm_Wrap_Type elm_entry_line_wrap_get(Evas_Object *obj)
void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable) void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
@ -87,7 +83,7 @@ cdef extern from "Elementary.h":
void elm_entry_cursor_selection_end(Evas_Object *obj) void elm_entry_cursor_selection_end(Evas_Object *obj)
Eina_Bool elm_entry_cursor_is_format_get(Evas_Object *obj) Eina_Bool elm_entry_cursor_is_format_get(Evas_Object *obj)
Eina_Bool elm_entry_cursor_is_visible_format_get(Evas_Object *obj) Eina_Bool elm_entry_cursor_is_visible_format_get(Evas_Object *obj)
const_char * elm_entry_cursor_content_get(Evas_Object *obj) const char * elm_entry_cursor_content_get(Evas_Object *obj)
Eina_Bool elm_entry_cursor_geometry_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) Eina_Bool elm_entry_cursor_geometry_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
void elm_entry_cursor_pos_set(Evas_Object *obj, int pos) void elm_entry_cursor_pos_set(Evas_Object *obj, int pos)
int elm_entry_cursor_pos_get(Evas_Object *obj) int elm_entry_cursor_pos_get(Evas_Object *obj)
@ -95,7 +91,7 @@ cdef extern from "Elementary.h":
void elm_entry_selection_copy(Evas_Object *obj) void elm_entry_selection_copy(Evas_Object *obj)
void elm_entry_selection_paste(Evas_Object *obj) void elm_entry_selection_paste(Evas_Object *obj)
void elm_entry_context_menu_clear(Evas_Object *obj) void elm_entry_context_menu_clear(Evas_Object *obj)
void elm_entry_context_menu_item_add(Evas_Object *obj, const_char *label, const_char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const_void *data) void elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data)
void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_entry_context_menu_disabled_get(Evas_Object *obj) Eina_Bool elm_entry_context_menu_disabled_get(Evas_Object *obj)
# TODO: void elm_entry_item_provider_append(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data) # TODO: void elm_entry_item_provider_append(Evas_Object *obj, Elm_Entry_Item_Provider_Cb func, void *data)
@ -104,10 +100,10 @@ cdef extern from "Elementary.h":
void elm_entry_markup_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) void elm_entry_markup_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data)
void elm_entry_markup_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) void elm_entry_markup_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data)
void elm_entry_markup_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) void elm_entry_markup_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data)
char * elm_entry_markup_to_utf8(const_char *s) char * elm_entry_markup_to_utf8(const char *s)
char * elm_entry_utf8_to_markup(const_char *s) char * elm_entry_utf8_to_markup(const char *s)
Eina_Bool elm_entry_file_set(Evas_Object *obj, const_char *file, Elm_Text_Format format) Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
void elm_entry_file_get(Evas_Object *obj, const_char **file, Elm_Text_Format *format) void elm_entry_file_get(Evas_Object *obj, const char **file, Elm_Text_Format *format)
void elm_entry_file_save(Evas_Object *obj) void elm_entry_file_save(Evas_Object *obj)
void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave)
Eina_Bool elm_entry_autosave_get(Evas_Object *obj) Eina_Bool elm_entry_autosave_get(Evas_Object *obj)
@ -118,23 +114,23 @@ cdef extern from "Elementary.h":
void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout) void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout)
Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj) Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj)
void elm_entry_input_panel_layout_variation_set(Evas_Object *obj, int variation) void elm_entry_input_panel_layout_variation_set(Evas_Object *obj, int variation)
int elm_entry_input_panel_layout_variation_get(const_Evas_Object *obj) int elm_entry_input_panel_layout_variation_get(const Evas_Object *obj)
void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type) void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type)
Elm_Autocapital_Type elm_entry_autocapital_type_get(const_Evas_Object *obj) Elm_Autocapital_Type elm_entry_autocapital_type_get(const Evas_Object *obj)
void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled) void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_entry_input_panel_enabled_get(Evas_Object *obj) Eina_Bool elm_entry_input_panel_enabled_get(Evas_Object *obj)
void elm_entry_input_panel_show(Evas_Object *obj) void elm_entry_input_panel_show(Evas_Object *obj)
void elm_entry_input_panel_hide(Evas_Object *obj) void elm_entry_input_panel_hide(Evas_Object *obj)
void elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang) void elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang)
Elm_Input_Panel_Lang elm_entry_input_panel_language_get(Evas_Object *obj) Elm_Input_Panel_Lang elm_entry_input_panel_language_get(Evas_Object *obj)
# TODO: void elm_entry_input_panel_imdata_set(Evas_Object *obj, const_void *data, int len) # TODO: void elm_entry_input_panel_imdata_set(Evas_Object *obj, const void *data, int len)
# TODO: void elm_entry_input_panel_imdata_get(const_Evas_Object *obj, void *data, int *len) # TODO: void elm_entry_input_panel_imdata_get(const Evas_Object *obj, void *data, int *len)
void elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type) void elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type)
Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(Evas_Object *obj) Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(Evas_Object *obj)
void elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_entry_input_panel_return_key_disabled_get(Evas_Object *obj) Eina_Bool elm_entry_input_panel_return_key_disabled_get(Evas_Object *obj)
void elm_entry_input_panel_return_key_autoenabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_entry_input_panel_return_key_autoenabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_entry_input_panel_show_on_demand_get(const_Evas_Object *obj) Eina_Bool elm_entry_input_panel_show_on_demand_get(const Evas_Object *obj)
void elm_entry_input_panel_show_on_demand_set(Evas_Object *obj, Eina_Bool ondemand) void elm_entry_input_panel_show_on_demand_set(Evas_Object *obj, Eina_Bool ondemand)
void elm_entry_imf_context_reset(Evas_Object *obj) void elm_entry_imf_context_reset(Evas_Object *obj)
@ -147,11 +143,11 @@ cdef extern from "Elementary.h":
Elm_Cnp_Mode elm_entry_cnp_mode_get(Evas_Object *obj) Elm_Cnp_Mode elm_entry_cnp_mode_get(Evas_Object *obj)
void elm_entry_anchor_hover_parent_set(Evas_Object *obj, Evas_Object *anchor_hover_parent) void elm_entry_anchor_hover_parent_set(Evas_Object *obj, Evas_Object *anchor_hover_parent)
Evas_Object * elm_entry_anchor_hover_parent_get(Evas_Object *obj) Evas_Object * elm_entry_anchor_hover_parent_get(Evas_Object *obj)
void elm_entry_anchor_hover_style_set(Evas_Object *obj, const_char *anchor_hover_style) void elm_entry_anchor_hover_style_set(Evas_Object *obj, const char *anchor_hover_style)
const_char * elm_entry_anchor_hover_style_get(Evas_Object *obj) const char * elm_entry_anchor_hover_style_get(Evas_Object *obj)
void elm_entry_anchor_hover_end(Evas_Object *obj) void elm_entry_anchor_hover_end(Evas_Object *obj)
const_char * elm_entry_context_menu_item_label_get(const_Elm_Entry_Context_Menu_Item *item) const char * elm_entry_context_menu_item_label_get(const Elm_Entry_Context_Menu_Item *item)
void elm_entry_context_menu_item_icon_get(const_Elm_Entry_Context_Menu_Item *item, const_char **icon_file, const_char **icon_group, Elm_Icon_Type *icon_type) void elm_entry_context_menu_item_icon_get(const Elm_Entry_Context_Menu_Item *item, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type)
Eina_Bool elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata) Eina_Bool elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata)

View File

@ -552,24 +552,24 @@ def Entry_markup_to_utf8(string):
"""Entry_markup_to_utf8(string)""" """Entry_markup_to_utf8(string)"""
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
return _touni(elm_entry_markup_to_utf8( return _touni(elm_entry_markup_to_utf8(
<const_char *>string if string is not None else NULL)) <const char *>string if string is not None else NULL))
@DEPRECATED("1.8", "Use utf8_to_markup() instead.") @DEPRECATED("1.8", "Use utf8_to_markup() instead.")
def Entry_utf8_to_markup(string): def Entry_utf8_to_markup(string):
"""Entry_utf8_to_markup(string)""" """Entry_utf8_to_markup(string)"""
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
return _touni(elm_entry_utf8_to_markup( return _touni(elm_entry_utf8_to_markup(
<const_char *>string if string is not None else NULL)) <const char *>string if string is not None else NULL))
def markup_to_utf8(string): def markup_to_utf8(string):
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
return _touni(elm_entry_markup_to_utf8( return _touni(elm_entry_markup_to_utf8(
<const_char *>string if string is not None else NULL)) <const char *>string if string is not None else NULL))
def utf8_to_markup(string): def utf8_to_markup(string):
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
return _touni(elm_entry_utf8_to_markup( return _touni(elm_entry_utf8_to_markup(
<const_char *>string if string is not None else NULL)) <const char *>string if string is not None else NULL))
cdef class EntryContextMenuItem(object): cdef class EntryContextMenuItem(object):
""" """
@ -606,8 +606,8 @@ cdef class EntryContextMenuItem(object):
""" """
def __get__(self): def __get__(self):
cdef: cdef:
const_char *icon_file const char *icon_file
const_char *icon_group const char *icon_group
Elm_Icon_Type icon_type Elm_Icon_Type icon_type
elm_entry_context_menu_item_icon_get(self.item, elm_entry_context_menu_item_icon_get(self.item,
&icon_file, &icon_file,
@ -822,7 +822,7 @@ cdef class Entry(LayoutClass):
""" """
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_entry_text_style_user_push(self.obj, elm_entry_text_style_user_push(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def text_style_user_pop(self): def text_style_user_pop(self):
"""text_style_user_pop() """text_style_user_pop()
@ -909,12 +909,12 @@ cdef class Entry(LayoutClass):
def __set__(self, entry): def __set__(self, entry):
if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry) if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry)
elm_entry_entry_set(self.obj, elm_entry_entry_set(self.obj,
<const_char *>entry if entry is not None else NULL) <const char *>entry if entry is not None else NULL)
def entry_set(self, entry): def entry_set(self, entry):
if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry) if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry)
elm_entry_entry_set(self.obj, elm_entry_entry_set(self.obj,
<const_char *>entry if entry is not None else NULL) <const char *>entry if entry is not None else NULL)
def entry_get(self): def entry_get(self):
return _ctouni(elm_entry_entry_get(self.obj)) return _ctouni(elm_entry_entry_get(self.obj))
@ -935,7 +935,7 @@ cdef class Entry(LayoutClass):
""" """
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_entry_entry_append(self.obj, elm_entry_entry_append(self.obj,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
property is_empty: property is_empty:
"""Gets whether the entry is empty. """Gets whether the entry is empty.
@ -978,7 +978,7 @@ cdef class Entry(LayoutClass):
done to the textblock returned by this function should be followed by done to the textblock returned by this function should be followed by
a call to :py:func:`calc_force()`. a call to :py:func:`calc_force()`.
The return value is marked as const_as an additional warning. The return value is marked as const as an additional warning.
One should not use the returned object with any of the generic evas One should not use the returned object with any of the generic evas
functions (geometry_get/resize/move and etc), but only with the textblock functions (geometry_get/resize/move and etc), but only with the textblock
functions; The former will either not work at all, or break the correct functions; The former will either not work at all, or break the correct
@ -1035,7 +1035,7 @@ cdef class Entry(LayoutClass):
""" """
if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry) if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry)
elm_entry_entry_insert(self.obj, elm_entry_entry_insert(self.obj,
<const_char *>entry if entry is not None else NULL) <const char *>entry if entry is not None else NULL)
property line_wrap: property line_wrap:
"""The line wrap type to use on multi-line entries. """The line wrap type to use on multi-line entries.
@ -1245,7 +1245,7 @@ cdef class Entry(LayoutClass):
""" """
cdef: cdef:
const_char *text = elm_entry_cursor_content_get(self.obj) const char *text = elm_entry_cursor_content_get(self.obj)
unicode ret = _ctouni(text) unicode ret = _ctouni(text)
free(<void *>text) free(<void *>text)
@ -1358,8 +1358,8 @@ cdef class Entry(LayoutClass):
if isinstance(icon_file, unicode): icon_file = PyUnicode_AsUTF8String(icon_file) if isinstance(icon_file, unicode): icon_file = PyUnicode_AsUTF8String(icon_file)
elm_entry_context_menu_item_add(self.obj, elm_entry_context_menu_item_add(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
<const_char *>icon_file if icon_file is not None else NULL, <const char *>icon_file if icon_file is not None else NULL,
icon_type, icon_type,
cb, cb,
<void *>data if func is not None else NULL) <void *>data if func is not None else NULL)
@ -1495,14 +1495,14 @@ cdef class Entry(LayoutClass):
"""markup_to_utf8(string)""" """markup_to_utf8(string)"""
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
return _touni(elm_entry_markup_to_utf8( return _touni(elm_entry_markup_to_utf8(
<const_char *>string if string is not None else NULL)) <const char *>string if string is not None else NULL))
@DEPRECATED("1.8", "Use the module level utf8_to_markup() method instead.") @DEPRECATED("1.8", "Use the module level utf8_to_markup() method instead.")
def utf8_to_markup(self, string): def utf8_to_markup(self, string):
"""utf8_to_markup(string)""" """utf8_to_markup(string)"""
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string) if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
return _touni(elm_entry_utf8_to_markup( return _touni(elm_entry_utf8_to_markup(
<const_char *>string if string is not None else NULL)) <const char *>string if string is not None else NULL))
property file: property file:
"""The file for the text to display and then edit. """The file for the text to display and then edit.
@ -1523,7 +1523,7 @@ cdef class Entry(LayoutClass):
""" """
def __get__(self): def __get__(self):
cdef const_char *file cdef const char *file
cdef Elm_Text_Format format cdef Elm_Text_Format format
elm_entry_file_get(self.obj, &file, &format) elm_entry_file_get(self.obj, &file, &format)
return (_ctouni(file), format) return (_ctouni(file), format)
@ -1534,7 +1534,7 @@ cdef class Entry(LayoutClass):
a2 = file_format a2 = file_format
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1) if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
if not elm_entry_file_set(self.obj, if not elm_entry_file_set(self.obj,
<const_char *>a1 if a1 is not None else NULL, <const char *>a1 if a1 is not None else NULL,
a2 if a2 is not None else enums.ELM_TEXT_FORMAT_PLAIN_UTF8): a2 if a2 is not None else enums.ELM_TEXT_FORMAT_PLAIN_UTF8):
raise RuntimeError("Could not set file") raise RuntimeError("Could not set file")
@ -1543,11 +1543,11 @@ cdef class Entry(LayoutClass):
a2 = file_format a2 = file_format
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1) if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
if not elm_entry_file_set(self.obj, if not elm_entry_file_set(self.obj,
<const_char *>a1 if a1 is not None else NULL, <const char *>a1 if a1 is not None else NULL,
a2 if a2 is not None else enums.ELM_TEXT_FORMAT_PLAIN_UTF8): a2 if a2 is not None else enums.ELM_TEXT_FORMAT_PLAIN_UTF8):
raise RuntimeError("Could not set file") raise RuntimeError("Could not set file")
def file_get(self): def file_get(self):
cdef const_char *file cdef const char *file
cdef Elm_Text_Format format cdef Elm_Text_Format format
elm_entry_file_get(self.obj, &file, &format) elm_entry_file_get(self.obj, &file, &format)
return (_ctouni(file), format) return (_ctouni(file), format)
@ -1779,7 +1779,7 @@ cdef class Entry(LayoutClass):
# :param len: the length of data, in bytes, to send to the input panel # :param len: the length of data, in bytes, to send to the input panel
# """ # """
# elm_entry_input_panel_imdata_set(self.obj, const_void *data, int len) # elm_entry_input_panel_imdata_set(self.obj, const void *data, int len)
# TODO: # TODO:
# def input_panel_imdata_get(self, data, length): # def input_panel_imdata_get(self, data, length):
@ -2012,12 +2012,12 @@ cdef class Entry(LayoutClass):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_entry_anchor_hover_style_set(self.obj, elm_entry_anchor_hover_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def anchor_hover_style_set(self, style): def anchor_hover_style_set(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_entry_anchor_hover_style_set(self.obj, elm_entry_anchor_hover_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def anchor_hover_style_get(self): def anchor_hover_style_get(self):
return _ctouni(elm_entry_anchor_hover_style_get(self.obj)) return _ctouni(elm_entry_anchor_hover_style_get(self.obj))

View File

@ -1,35 +1,34 @@
from efl.eina cimport Eina_Bool, const_Eina_List from efl.eina cimport Eina_Bool, Eina_List
from efl.evas cimport Evas_Object, const_Evas_Object, Evas_Coord from efl.evas cimport Evas_Object, Evas_Coord
from enums cimport Elm_Fileselector_Mode, Elm_Fileselector_Sort from enums cimport Elm_Fileselector_Mode, Elm_Fileselector_Sort
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef Eina_Bool (*Elm_Fileselector_Filter_Func)(const_char *path, Eina_Bool dir, void *data) ctypedef Eina_Bool (*Elm_Fileselector_Filter_Func)(const char *path, Eina_Bool dir, void *data)
Evas_Object * elm_fileselector_add(Evas_Object *parent) Evas_Object * elm_fileselector_add(Evas_Object *parent)
void elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save) void elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save)
Eina_Bool elm_fileselector_is_save_get(const_Evas_Object *obj) Eina_Bool elm_fileselector_is_save_get(const Evas_Object *obj)
void elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool value) void elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool value)
Eina_Bool elm_fileselector_folder_only_get(const_Evas_Object *obj) Eina_Bool elm_fileselector_folder_only_get(const Evas_Object *obj)
void elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool value) void elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool value)
Eina_Bool elm_fileselector_buttons_ok_cancel_get(const_Evas_Object *obj) Eina_Bool elm_fileselector_buttons_ok_cancel_get(const Evas_Object *obj)
void elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool value) void elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool value)
Eina_Bool elm_fileselector_expandable_get(const_Evas_Object *obj) Eina_Bool elm_fileselector_expandable_get(const Evas_Object *obj)
void elm_fileselector_path_set(Evas_Object *obj, const_char *path) void elm_fileselector_path_set(Evas_Object *obj, const char *path)
const_char * elm_fileselector_path_get(const_Evas_Object *obj) const char * elm_fileselector_path_get(const Evas_Object *obj)
void elm_fileselector_mode_set(Evas_Object *obj, Elm_Fileselector_Mode mode) void elm_fileselector_mode_set(Evas_Object *obj, Elm_Fileselector_Mode mode)
Elm_Fileselector_Mode elm_fileselector_mode_get(const_Evas_Object *obj) Elm_Fileselector_Mode elm_fileselector_mode_get(const Evas_Object *obj)
void elm_fileselector_multi_select_set(Evas_Object *obj, Eina_Bool multi) void elm_fileselector_multi_select_set(Evas_Object *obj, Eina_Bool multi)
Eina_Bool elm_fileselector_multi_select_get(const_Evas_Object *obj) Eina_Bool elm_fileselector_multi_select_get(const Evas_Object *obj)
Eina_Bool elm_fileselector_selected_set(Evas_Object *obj, const_char *path) Eina_Bool elm_fileselector_selected_set(Evas_Object *obj, const char *path)
const_char * elm_fileselector_selected_get(const_Evas_Object *obj) const char * elm_fileselector_selected_get(const Evas_Object *obj)
const_Eina_List * elm_fileselector_selected_paths_get(const_Evas_Object *obj) const Eina_List * elm_fileselector_selected_paths_get(const Evas_Object *obj)
Eina_Bool elm_fileselector_mime_types_filter_append(Evas_Object *obj, const_char *mime_types, const_char *filter_name) Eina_Bool elm_fileselector_mime_types_filter_append(Evas_Object *obj, const char *mime_types, const char *filter_name)
Eina_Bool elm_fileselector_custom_filter_append(Evas_Object *obj, Elm_Fileselector_Filter_Func func, void *data, const_char *filter_name) Eina_Bool elm_fileselector_custom_filter_append(Evas_Object *obj, Elm_Fileselector_Filter_Func func, void *data, const char *filter_name)
void elm_fileselector_filters_clear(Evas_Object *obj) void elm_fileselector_filters_clear(Evas_Object *obj)
void elm_fileselector_hidden_visible_set(Evas_Object *obj, Eina_Bool visible) void elm_fileselector_hidden_visible_set(Evas_Object *obj, Eina_Bool visible)
Eina_Bool elm_fileselector_hidden_visible_get(const_Evas_Object *obj) Eina_Bool elm_fileselector_hidden_visible_get(const Evas_Object *obj)
Elm_Fileselector_Sort elm_fileselector_sort_method_get(const_Evas_Object *obj) Elm_Fileselector_Sort elm_fileselector_sort_method_get(const Evas_Object *obj)
void elm_fileselector_sort_method_set(Evas_Object *obj, Elm_Fileselector_Sort method) void elm_fileselector_sort_method_set(Evas_Object *obj, Elm_Fileselector_Sort method)
void elm_fileselector_thumbnail_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) void elm_fileselector_thumbnail_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
void elm_fileselector_thumbnail_size_get(const_Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) void elm_fileselector_thumbnail_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)

View File

@ -164,10 +164,10 @@ ELM_FILESELECTOR_SORT_BY_MODIFIED_DESC = enums.ELM_FILESELECTOR_SORT_BY_MODIFIED
ELM_FILESELECTOR_SORT_LAST = enums.ELM_FILESELECTOR_SORT_LAST ELM_FILESELECTOR_SORT_LAST = enums.ELM_FILESELECTOR_SORT_LAST
def _cb_string_conv(uintptr_t addr): def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr cdef const char *s = <const char *>addr
return _ctouni(s) if s is not NULL else None return _ctouni(s) if s is not NULL else None
cdef Eina_Bool py_elm_fileselector_custom_filter_cb(const_char *path, Eina_Bool is_dir, void *data) with gil: cdef Eina_Bool py_elm_fileselector_custom_filter_cb(const char *path, Eina_Bool is_dir, void *data) with gil:
cb_func, cb_data = <object>data cb_func, cb_data = <object>data
try: try:
return cb_func(_ctouni(path), is_dir, cb_data) return cb_func(_ctouni(path), is_dir, cb_data)
@ -290,12 +290,12 @@ cdef class Fileselector(LayoutClass):
def __set__(self, path): def __set__(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_fileselector_path_set(self.obj, elm_fileselector_path_set(self.obj,
<const_char *>path if path is not None else NULL) <const char *>path if path is not None else NULL)
def path_set(self, path): def path_set(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_fileselector_path_set(self.obj, elm_fileselector_path_set(self.obj,
<const_char *>path if path is not None else NULL) <const char *>path if path is not None else NULL)
def path_get(self): def path_get(self):
return _ctouni(elm_fileselector_path_get(self.obj)) return _ctouni(elm_fileselector_path_get(self.obj))
@ -385,13 +385,13 @@ cdef class Fileselector(LayoutClass):
def __set__(self, path): def __set__(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
if not elm_fileselector_selected_set(self.obj, if not elm_fileselector_selected_set(self.obj,
<const_char *>path if path is not None else NULL): <const char *>path if path is not None else NULL):
raise RuntimeError("Setting the selected path failed") raise RuntimeError("Setting the selected path failed")
def selected_set(self, path): def selected_set(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
if not elm_fileselector_selected_set(self.obj, if not elm_fileselector_selected_set(self.obj,
<const_char *>path if path is not None else NULL): <const char *>path if path is not None else NULL):
raise RuntimeError("Setting the selected path failed") raise RuntimeError("Setting the selected path failed")
def selected_get(self): def selected_get(self):
return _ctouni(elm_fileselector_selected_get(self.obj)) return _ctouni(elm_fileselector_selected_get(self.obj))
@ -446,7 +446,7 @@ cdef class Fileselector(LayoutClass):
if isinstance(mime_types_s, unicode): mime_types_s = PyUnicode_AsUTF8String(mime_types_s) if isinstance(mime_types_s, unicode): mime_types_s = PyUnicode_AsUTF8String(mime_types_s)
if isinstance(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name) if isinstance(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name)
if not elm_fileselector_mime_types_filter_append(self.obj, mime_types_s, if not elm_fileselector_mime_types_filter_append(self.obj, mime_types_s,
<const_char *>filter_name if filter_name is not None else NULL): <const char *>filter_name if filter_name is not None else NULL):
raise RuntimeWarning raise RuntimeWarning
def custom_filter_append(self, func, data=None, filter_name=None): def custom_filter_append(self, func, data=None, filter_name=None):
@ -477,7 +477,7 @@ cdef class Fileselector(LayoutClass):
if isinstance(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name) if isinstance(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name)
elm_fileselector_custom_filter_append(self.obj, elm_fileselector_custom_filter_append(self.obj,
py_elm_fileselector_custom_filter_cb, <void *>cb_data, py_elm_fileselector_custom_filter_cb, <void *>cb_data,
<const_char *>filter_name if filter_name is not None else NULL) <const char *>filter_name if filter_name is not None else NULL)
def filters_clear(self): def filters_clear(self):
""" """

View File

@ -1,10 +1,9 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object * elm_fileselector_button_add(Evas_Object *parent) Evas_Object * elm_fileselector_button_add(Evas_Object *parent)
void elm_fileselector_button_window_title_set(Evas_Object *obj, const_char *title) void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title)
const_char * elm_fileselector_button_window_title_get(Evas_Object *obj) const char * elm_fileselector_button_window_title_get(Evas_Object *obj)
void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height)
void elm_fileselector_button_window_size_get(Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) void elm_fileselector_button_window_size_get(Evas_Object *obj, Evas_Coord *width, Evas_Coord *height)
void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value) void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value)

View File

@ -93,7 +93,7 @@ from fileselector cimport elm_fileselector_path_set, \
cimport enums cimport enums
def _cb_string_conv(uintptr_t addr): def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr cdef const char *s = <const char *>addr
return _ctouni(s) if s is not NULL else None return _ctouni(s) if s is not NULL else None
cdef class FileselectorButton(Button): cdef class FileselectorButton(Button):
@ -123,12 +123,12 @@ cdef class FileselectorButton(Button):
def __set__(self, title): def __set__(self, title):
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title) if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
elm_fileselector_button_window_title_set(self.obj, elm_fileselector_button_window_title_set(self.obj,
<const_char *>title if title is not None else NULL) <const char *>title if title is not None else NULL)
def window_title_set(self, title): def window_title_set(self, title):
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title) if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
elm_fileselector_button_window_title_set(self.obj, elm_fileselector_button_window_title_set(self.obj,
<const_char *>title if title is not None else NULL) <const char *>title if title is not None else NULL)
def window_title_get(self): def window_title_get(self):
return _ctouni(elm_fileselector_button_window_title_get(self.obj)) return _ctouni(elm_fileselector_button_window_title_get(self.obj))
@ -203,7 +203,7 @@ cdef class FileselectorButton(Button):
def path_set(self, path): def path_set(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_fileselector_path_set(self.obj, elm_fileselector_path_set(self.obj,
<const_char *>path if path is not None else NULL) <const char *>path if path is not None else NULL)
@DEPRECATED("1.9", "Combine with Fileselector class instead") @DEPRECATED("1.9", "Combine with Fileselector class instead")
def path_get(self): def path_get(self):
return _ctouni(elm_fileselector_path_get(self.obj)) return _ctouni(elm_fileselector_path_get(self.obj))

View File

@ -1,10 +1,9 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object * elm_fileselector_entry_add(Evas_Object *parent) Evas_Object * elm_fileselector_entry_add(Evas_Object *parent)
void elm_fileselector_entry_window_title_set(Evas_Object *obj, const_char *title) void elm_fileselector_entry_window_title_set(Evas_Object *obj, const char *title)
const_char * elm_fileselector_entry_window_title_get(Evas_Object *obj) const char * elm_fileselector_entry_window_title_get(Evas_Object *obj)
void elm_fileselector_entry_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) void elm_fileselector_entry_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height)
void elm_fileselector_entry_window_size_get(Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) void elm_fileselector_entry_window_size_get(Evas_Object *obj, Evas_Coord *width, Evas_Coord *height)
void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value) void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value)

View File

@ -109,7 +109,7 @@ from fileselector cimport elm_fileselector_path_set, \
cimport enums cimport enums
def _cb_string_conv(uintptr_t addr): def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr cdef const char *s = <const char *>addr
return _ctouni(s) if s is not NULL else None return _ctouni(s) if s is not NULL else None
cdef class FileselectorEntry(LayoutClass): cdef class FileselectorEntry(LayoutClass):
@ -144,12 +144,12 @@ cdef class FileselectorEntry(LayoutClass):
def __set__(self, title): def __set__(self, title):
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title) if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
elm_fileselector_entry_window_title_set(self.obj, elm_fileselector_entry_window_title_set(self.obj,
<const_char *>title if title is not None else NULL) <const char *>title if title is not None else NULL)
def window_title_set(self, title): def window_title_set(self, title):
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title) if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
elm_fileselector_entry_window_title_set(self.obj, elm_fileselector_entry_window_title_set(self.obj,
<const_char *>title if title is not None else NULL) <const char *>title if title is not None else NULL)
def window_title_get(self): def window_title_get(self):
return _ctouni(elm_fileselector_entry_window_title_get(self.obj)) return _ctouni(elm_fileselector_entry_window_title_get(self.obj))
@ -224,7 +224,7 @@ cdef class FileselectorEntry(LayoutClass):
def path_set(self, path): def path_set(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_fileselector_path_set(self.obj, elm_fileselector_path_set(self.obj,
<const_char *>path if path is not None else NULL) <const char *>path if path is not None else NULL)
@DEPRECATED("1.9", "Combine with Fileselector class instead") @DEPRECATED("1.9", "Combine with Fileselector class instead")
def path_get(self): def path_get(self):
return _ctouni(elm_fileselector_path_get(self.obj)) return _ctouni(elm_fileselector_path_get(self.obj))
@ -310,12 +310,12 @@ cdef class FileselectorEntry(LayoutClass):
def __set__(self, path): def __set__(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_fileselector_selected_set(self.obj, elm_fileselector_selected_set(self.obj,
<const_char *>path if path is not None else NULL) <const char *>path if path is not None else NULL)
def selected_set(self, path): def selected_set(self, path):
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_fileselector_selected_set(self.obj, elm_fileselector_selected_set(self.obj,
<const_char *>path if path is not None else NULL) <const char *>path if path is not None else NULL)
def selected_get(self): def selected_get(self):
return _ctouni(elm_fileselector_selected_get(self.obj)) return _ctouni(elm_fileselector_selected_get(self.obj))

View File

@ -1,22 +1,21 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord, Eina_List, const_Evas_Object, const_Eina_List from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord, Eina_List
from efl.evas cimport Evas_Smart_Cb from efl.evas cimport Evas_Smart_Cb
from object_item cimport Elm_Object_Item, const_Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_flipselector_add(Evas_Object *parent) Evas_Object *elm_flipselector_add(Evas_Object *parent)
void elm_flipselector_flip_next(Evas_Object *obj) void elm_flipselector_flip_next(Evas_Object *obj)
void elm_flipselector_flip_prev(Evas_Object *obj) void elm_flipselector_flip_prev(Evas_Object *obj)
Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data)
const_Eina_List *elm_flipselector_items_get(const_Evas_Object *obj) const Eina_List *elm_flipselector_items_get(const Evas_Object *obj)
Elm_Object_Item *elm_flipselector_first_item_get(const_Evas_Object *obj) Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj)
Elm_Object_Item *elm_flipselector_last_item_get(const_Evas_Object *obj) Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj)
Elm_Object_Item *elm_flipselector_selected_item_get(const_Evas_Object *obj) Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj)
void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
Eina_Bool elm_flipselector_item_selected_get(const_Elm_Object_Item *it) Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it)
Elm_Object_Item *elm_flipselector_item_prev_get(const_Elm_Object_Item *it) Elm_Object_Item *elm_flipselector_item_prev_get(const Elm_Object_Item *it)
Elm_Object_Item *elm_flipselector_item_next_get(const_Elm_Object_Item *it) Elm_Object_Item *elm_flipselector_item_next_get(const Elm_Object_Item *it)
void elm_flipselector_first_interval_set(Evas_Object *obj, double interval) void elm_flipselector_first_interval_set(Evas_Object *obj, double interval)
double elm_flipselector_first_interval_get(const_Evas_Object *obj) double elm_flipselector_first_interval_get(const Evas_Object *obj)

View File

@ -137,7 +137,7 @@ cdef class FlipSelectorItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_flipselector_item_append(flipselector.obj, item = elm_flipselector_item_append(flipselector.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void *>self) cb, <void *>self)
if item == NULL: if item == NULL:
@ -166,7 +166,7 @@ cdef class FlipSelectorItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_flipselector_item_prepend(flipselector.obj, item = elm_flipselector_item_prepend(flipselector.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void *>self) cb, <void *>self)
if item == NULL: if item == NULL:
@ -282,7 +282,7 @@ cdef class FlipSelector(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_flipselector_item_append(self.obj, item = elm_flipselector_item_append(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:
@ -313,7 +313,7 @@ cdef class FlipSelector(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_flipselector_item_prepend(self.obj, item = elm_flipselector_item_prepend(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:

View File

@ -16,15 +16,14 @@
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
# #
from efl.evas cimport Eina_List, Eina_Bool, const_Eina_List from efl.evas cimport Eina_List, Eina_Bool
from efl.evas cimport Evas_Object, const_Evas_Object, Evas_Smart_Cb, \ from efl.evas cimport Evas_Object, Evas_Smart_Cb, Evas_Font_Size, Evas_Coord
Evas_Font_Size, Evas_Coord
from efl.evas.enums cimport Evas_Callback_Type from efl.evas.enums cimport Evas_Callback_Type
#from efl.evas cimport Evas_Load_Error #from efl.evas cimport Evas_Load_Error
#from efl.evas cimport Evas_Event_Flags #from efl.evas cimport Evas_Event_Flags
from enums cimport Elm_Policy, Elm_Policy_Quit from enums cimport Elm_Policy, Elm_Policy_Quit
from libc.string cimport const_char, memcpy, strdup from libc.string cimport memcpy, strdup
from libc.stdlib cimport const_void, free from libc.stdlib cimport free
cdef extern from "time.h": cdef extern from "time.h":
struct tm: struct tm:
@ -39,13 +38,13 @@ cdef extern from "time.h":
int tm_isdst int tm_isdst
long int tm_gmtoff long int tm_gmtoff
const_char *tm_zone const char *tm_zone
cdef extern from "Ecore.h": cdef extern from "Ecore.h":
ctypedef void (*Ecore_Cb)(void *data) ctypedef void (*Ecore_Cb)(void *data)
cdef extern from "Edje.h": cdef extern from "Edje.h":
ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const_char *emission, const_char *source) ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const char *emission, const char *source)
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
#colors #colors
@ -56,7 +55,7 @@ cdef extern from "Elementary.h":
unsigned int a unsigned int a
ctypedef struct _Elm_Custom_Palette: ctypedef struct _Elm_Custom_Palette:
const_char *palette_name const char *palette_name
Eina_List *color_list Eina_List *color_list
#event #event
@ -64,17 +63,17 @@ cdef extern from "Elementary.h":
#font #font
ctypedef struct Elm_Font_Overlay: ctypedef struct Elm_Font_Overlay:
const_char *text_class const char *text_class
const_char *font const char *font
Evas_Font_Size size Evas_Font_Size size
#text #text
ctypedef struct Elm_Text_Class: ctypedef struct Elm_Text_Class:
const_char *name const char *name
const_char *desc const char *desc
ctypedef struct Elm_Font_Properties: ctypedef struct Elm_Font_Properties:
const_char *name const char *name
Eina_List *styles Eina_List *styles
#tooltip #tooltip
@ -104,7 +103,7 @@ cdef extern from "Elementary.h":
int elm_policy_get(unsigned int policy) int elm_policy_get(unsigned int policy)
# General - Language # General - Language
void elm_language_set(const_char *lang) void elm_language_set(const char *lang)
# Cache # Cache
void elm_cache_all_flush() void elm_cache_all_flush()
@ -113,15 +112,15 @@ cdef extern from "Elementary.h":
void elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h) void elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h)
# Font (elm_font.h) # Font (elm_font.h)
Elm_Font_Properties * elm_font_properties_get(const_char *font) Elm_Font_Properties * elm_font_properties_get(const char *font)
void elm_font_properties_free(Elm_Font_Properties *efp) void elm_font_properties_free(Elm_Font_Properties *efp)
char * elm_font_fontconfig_name_get(const_char *name, const_char *style) char * elm_font_fontconfig_name_get(const char *name, const char *style)
void elm_font_fontconfig_name_free(char *name) void elm_font_fontconfig_name_free(char *name)
# TODO: Eina_Hash * elm_font_available_hash_add(Eina_List *list) # TODO: Eina_Hash * elm_font_available_hash_add(Eina_List *list)
# TODO: void elm_font_available_hash_del(Eina_Hash *hash) # TODO: void elm_font_available_hash_del(Eina_Hash *hash)
# Debug # Debug
void elm_object_tree_dump(const_Evas_Object *top) void elm_object_tree_dump(const Evas_Object *top)
void elm_object_tree_dot_dump(const_Evas_Object *top, const_char *file) void elm_object_tree_dot_dump(const Evas_Object *top, const char *file)
cdef int PY_EFL_ELM_LOG_DOMAIN cdef int PY_EFL_ELM_LOG_DOMAIN

View File

@ -362,7 +362,7 @@ def language_set(lang not None):
""" """
if isinstance(lang, unicode): lang = PyUnicode_AsUTF8String(lang) if isinstance(lang, unicode): lang = PyUnicode_AsUTF8String(lang)
elm_language_set(<const_char *>lang) elm_language_set(<const char *>lang)
def cache_all_flush(): def cache_all_flush():
"""cache_all_flush() """cache_all_flush()
@ -396,7 +396,7 @@ def font_properties_get(font not None):
if isinstance(font, unicode): font = PyUnicode_AsUTF8String(font) if isinstance(font, unicode): font = PyUnicode_AsUTF8String(font)
cdef FontProperties ret = FontProperties.__new__() cdef FontProperties ret = FontProperties.__new__()
ret.efp = elm_font_properties_get(<const_char *>font) ret.efp = elm_font_properties_get(<const char *>font)
return ret return ret
@ -435,8 +435,8 @@ def font_fontconfig_name_get(font_name, style = None):
if isinstance(font_name, unicode): font_name = PyUnicode_AsUTF8String(font_name) if isinstance(font_name, unicode): font_name = PyUnicode_AsUTF8String(font_name)
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
fc_name = elm_font_fontconfig_name_get( fc_name = elm_font_fontconfig_name_get(
<const_char *>font_name, <const char *>font_name,
<const_char *>style if style is not None else NULL <const char *>style if style is not None else NULL
) )
ret = _touni(fc_name) ret = _touni(fc_name)
@ -494,4 +494,4 @@ def object_tree_dot_dump(evasObject top, path):
""" """
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
elm_object_tree_dot_dump(top.obj, <const_char *>path) elm_object_tree_dot_dump(top.obj, <const char *>path)

View File

@ -1,16 +1,14 @@
from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb, \ from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb, \
Evas_Coord, Eina_Compare_Cb, const_Evas_Object Evas_Coord, Eina_Compare_Cb
from object_item cimport Elm_Object_Item from object_item cimport Elm_Object_Item
from general cimport Elm_Tooltip_Item_Content_Cb from general cimport Elm_Tooltip_Item_Content_Cb
from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Scroller_Policy, \ from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Scroller_Policy, \
Elm_Object_Select_Mode Elm_Object_Select_Mode
from libc.string cimport const_char
from libc.stdlib cimport const_void
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef char *(*GengridItemLabelGetFunc) (void *data, Evas_Object *obj, const_char *part) ctypedef char *(*GengridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part)
ctypedef Evas_Object *(*GengridItemIconGetFunc) (void *data, Evas_Object *obj, const_char *part) ctypedef Evas_Object *(*GengridItemIconGetFunc) (void *data, Evas_Object *obj, const char *part)
ctypedef Eina_Bool (*GengridItemStateGetFunc) (void *data, Evas_Object *obj, const_char *part) ctypedef Eina_Bool (*GengridItemStateGetFunc) (void *data, Evas_Object *obj, const char *part)
ctypedef void (*GengridItemDelFunc) (void *data, Evas_Object *obj) ctypedef void (*GengridItemDelFunc) (void *data, Evas_Object *obj)
ctypedef struct Elm_Gengrid_Item_Class_Func: ctypedef struct Elm_Gengrid_Item_Class_Func:
@ -22,7 +20,6 @@ cdef extern from "Elementary.h":
ctypedef struct Elm_Gengrid_Item_Class: ctypedef struct Elm_Gengrid_Item_Class:
char *item_style char *item_style
Elm_Gengrid_Item_Class_Func func Elm_Gengrid_Item_Class_Func func
ctypedef Elm_Gengrid_Item_Class const_Elm_Gengrid_Item_Class "const Elm_Gengrid_Item_Class"
Evas_Object * elm_gengrid_add(Evas_Object *parent) Evas_Object * elm_gengrid_add(Evas_Object *parent)
void elm_gengrid_clear(Evas_Object *obj) void elm_gengrid_clear(Evas_Object *obj)
@ -30,11 +27,11 @@ cdef extern from "Elementary.h":
Eina_Bool elm_gengrid_multi_select_get(Evas_Object *obj) Eina_Bool elm_gengrid_multi_select_get(Evas_Object *obj)
void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool setting) void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool setting)
Eina_Bool elm_gengrid_horizontal_get(Evas_Object *obj) Eina_Bool elm_gengrid_horizontal_get(Evas_Object *obj)
Elm_Object_Item * elm_gengrid_item_append(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const_void *data, Evas_Smart_Cb func, const_void *func_data) Elm_Object_Item * elm_gengrid_item_append(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
Elm_Object_Item * elm_gengrid_item_prepend(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const_void *data, Evas_Smart_Cb func, const_void *func_data) Elm_Object_Item * elm_gengrid_item_prepend(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
Elm_Object_Item * elm_gengrid_item_insert_before(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const_void *data, Elm_Object_Item *before, Evas_Smart_Cb func, const_void *func_data) Elm_Object_Item * elm_gengrid_item_insert_before(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const void *data, Elm_Object_Item *before, Evas_Smart_Cb func, const void *func_data)
Elm_Object_Item * elm_gengrid_item_insert_after(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const_void *data, Elm_Object_Item *after, Evas_Smart_Cb func, const_void *func_data) Elm_Object_Item * elm_gengrid_item_insert_after(Evas_Object *obj, Elm_Gengrid_Item_Class *itc, const void *data, Elm_Object_Item *after, Evas_Smart_Cb func, const void *func_data)
Elm_Object_Item * elm_gengrid_item_sorted_insert(Evas_Object *obj, const_Elm_Gengrid_Item_Class *gic, const_void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const_void *func_data) Elm_Object_Item * elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data)
Elm_Object_Item * elm_gengrid_selected_item_get(Evas_Object *obj) Elm_Object_Item * elm_gengrid_selected_item_get(Evas_Object *obj)
Eina_List * elm_gengrid_selected_items_get(Evas_Object *obj) Eina_List * elm_gengrid_selected_items_get(Evas_Object *obj)
Eina_List * elm_gengrid_realized_items_get(Evas_Object *obj) Eina_List * elm_gengrid_realized_items_get(Evas_Object *obj)
@ -77,19 +74,19 @@ cdef extern from "Elementary.h":
void elm_gengrid_item_bring_in(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type scrollto_type) void elm_gengrid_item_bring_in(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type scrollto_type)
void elm_gengrid_item_update(Elm_Object_Item *item) void elm_gengrid_item_update(Elm_Object_Item *item)
void elm_gengrid_item_pos_get(Elm_Object_Item *item, unsigned int *x, unsigned int *y) void elm_gengrid_item_pos_get(Elm_Object_Item *item, unsigned int *x, unsigned int *y)
void elm_gengrid_item_tooltip_text_set(Elm_Object_Item *item, const_char *text) void elm_gengrid_item_tooltip_text_set(Elm_Object_Item *item, const char *text)
void elm_gengrid_item_tooltip_content_cb_set(Elm_Object_Item *item, Elm_Tooltip_Item_Content_Cb func, void *data, Evas_Smart_Cb del_cb) void elm_gengrid_item_tooltip_content_cb_set(Elm_Object_Item *item, Elm_Tooltip_Item_Content_Cb func, void *data, Evas_Smart_Cb del_cb)
void elm_gengrid_item_tooltip_unset(Elm_Object_Item *item) void elm_gengrid_item_tooltip_unset(Elm_Object_Item *item)
void elm_gengrid_item_tooltip_style_set(Elm_Object_Item *item, const_char *style) void elm_gengrid_item_tooltip_style_set(Elm_Object_Item *item, const char *style)
const_char * elm_gengrid_item_tooltip_style_get(Elm_Object_Item *item) const char * elm_gengrid_item_tooltip_style_get(Elm_Object_Item *item)
Eina_Bool elm_gengrid_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable) Eina_Bool elm_gengrid_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable)
Eina_Bool elm_gengrid_item_tooltip_window_mode_get(Elm_Object_Item *it) Eina_Bool elm_gengrid_item_tooltip_window_mode_get(Elm_Object_Item *it)
void elm_gengrid_item_cursor_set(Elm_Object_Item *item, const_char *cursor) void elm_gengrid_item_cursor_set(Elm_Object_Item *item, const char *cursor)
const_char * elm_gengrid_item_cursor_get(Elm_Object_Item *item) const char * elm_gengrid_item_cursor_get(Elm_Object_Item *item)
void elm_gengrid_item_cursor_unset(Elm_Object_Item *item) void elm_gengrid_item_cursor_unset(Elm_Object_Item *item)
void elm_gengrid_item_cursor_style_set(Elm_Object_Item *item, const_char *style) void elm_gengrid_item_cursor_style_set(Elm_Object_Item *item, const char *style)
const_char * elm_gengrid_item_cursor_style_get(Elm_Object_Item *item) const char * elm_gengrid_item_cursor_style_get(Elm_Object_Item *item)
void elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *item, Eina_Bool engine_only) void elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *item, Eina_Bool engine_only)
Eina_Bool elm_gengrid_item_cursor_engine_only_get(Elm_Object_Item *item) Eina_Bool elm_gengrid_item_cursor_engine_only_get(Elm_Object_Item *item)
Elm_Object_Item * elm_gengrid_nth_item_get(const_Evas_Object *obj, unsigned int nth) Elm_Object_Item * elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth)
Elm_Object_Item * elm_gengrid_at_xy_item_get(const_Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret) Elm_Object_Item * elm_gengrid_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret)

View File

@ -307,7 +307,7 @@ def _cb_object_item_conv(uintptr_t addr):
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
return _object_item_to_python(it) return _object_item_to_python(it)
cdef char *_py_elm_gengrid_item_text_get(void *data, Evas_Object *obj, const_char *part) with gil: cdef char *_py_elm_gengrid_item_text_get(void *data, Evas_Object *obj, const char *part) with gil:
cdef: cdef:
GengridItem item = <GengridItem>data GengridItem item = <GengridItem>data
unicode u = _ctouni(part) unicode u = _ctouni(part)
@ -329,7 +329,7 @@ cdef char *_py_elm_gengrid_item_text_get(void *data, Evas_Object *obj, const_cha
else: else:
return NULL return NULL
cdef Evas_Object *_py_elm_gengrid_item_content_get(void *data, Evas_Object *obj, const_char *part) with gil: cdef Evas_Object *_py_elm_gengrid_item_content_get(void *data, Evas_Object *obj, const char *part) with gil:
cdef: cdef:
GengridItem item = <GengridItem>data GengridItem item = <GengridItem>data
unicode u = _ctouni(part) unicode u = _ctouni(part)
@ -352,7 +352,7 @@ cdef Evas_Object *_py_elm_gengrid_item_content_get(void *data, Evas_Object *obj,
else: else:
return NULL return NULL
cdef Eina_Bool _py_elm_gengrid_item_state_get(void *data, Evas_Object *obj, const_char *part) with gil: cdef Eina_Bool _py_elm_gengrid_item_state_get(void *data, Evas_Object *obj, const char *part) with gil:
cdef: cdef:
GengridItem item = <GengridItem>data GengridItem item = <GengridItem>data
unicode u = _ctouni(part) unicode u = _ctouni(part)
@ -401,7 +401,7 @@ cdef void _py_elm_gengrid_item_func(void *data, Evas_Object *obj, void *event_in
except: except:
traceback.print_exc() traceback.print_exc()
cdef int _gengrid_compare_cb(const_void *data1, const_void *data2) with gil: cdef int _gengrid_compare_cb(const void *data1, const void *data2) with gil:
cdef: cdef:
Elm_Object_Item *citem1 = <Elm_Object_Item *>data1 Elm_Object_Item *citem1 = <Elm_Object_Item *>data1
Elm_Object_Item *citem2 = <Elm_Object_Item *>data2 Elm_Object_Item *citem2 = <Elm_Object_Item *>data2

View File

@ -324,13 +324,13 @@ cdef class GengridItem(ObjectItem):
def __set__(self, text): def __set__(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_gengrid_item_tooltip_text_set(self.item, elm_gengrid_item_tooltip_text_set(self.item,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def tooltip_text_set(self, text): def tooltip_text_set(self, text):
# TODO: document this # TODO: document this
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_gengrid_item_tooltip_text_set(self.item, elm_gengrid_item_tooltip_text_set(self.item,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def tooltip_content_cb_set(self, func, *args, **kargs): def tooltip_content_cb_set(self, func, *args, **kargs):
"""tooltip_content_cb_set(func, *args, **kargs) """tooltip_content_cb_set(func, *args, **kargs)
@ -393,12 +393,12 @@ cdef class GengridItem(ObjectItem):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_gengrid_item_tooltip_style_set(self.item, elm_gengrid_item_tooltip_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def tooltip_style_set(self, style=None): def tooltip_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_gengrid_item_tooltip_style_set(self.item, elm_gengrid_item_tooltip_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def tooltip_style_get(self): def tooltip_style_get(self):
return _ctouni(elm_gengrid_item_tooltip_style_get(self.item)) return _ctouni(elm_gengrid_item_tooltip_style_get(self.item))
@ -427,7 +427,7 @@ cdef class GengridItem(ObjectItem):
def __set__(self, cursor): def __set__(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_gengrid_item_cursor_set(self.item, elm_gengrid_item_cursor_set(self.item,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def __del__(self): def __del__(self):
elm_gengrid_item_cursor_unset(self.item) elm_gengrid_item_cursor_unset(self.item)
@ -435,7 +435,7 @@ cdef class GengridItem(ObjectItem):
def cursor_set(self, cursor): def cursor_set(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_gengrid_item_cursor_set(self.item, elm_gengrid_item_cursor_set(self.item,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def cursor_get(self): def cursor_get(self):
return _ctouni(elm_gengrid_item_cursor_get(self.item)) return _ctouni(elm_gengrid_item_cursor_get(self.item))
def cursor_unset(self): def cursor_unset(self):
@ -449,12 +449,12 @@ cdef class GengridItem(ObjectItem):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_gengrid_item_cursor_style_set(self.item, elm_gengrid_item_cursor_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def cursor_style_set(self, style=None): def cursor_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_gengrid_item_cursor_style_set(self.item, elm_gengrid_item_cursor_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def cursor_style_get(self): def cursor_style_get(self):
return _ctouni(elm_gengrid_item_cursor_style_get(self.item)) return _ctouni(elm_gengrid_item_cursor_style_get(self.item))

View File

@ -1,18 +1,16 @@
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Eina_Compare_Cb, \ from efl.evas cimport Eina_Bool, Eina_List, Eina_Compare_Cb, \
Evas_Object, const_Evas_Object, Evas_Smart_Cb, Evas_Coord Evas_Object, Evas_Smart_Cb, Evas_Coord
from object cimport Object from object cimport Object
from object_item cimport Elm_Object_Item, const_Elm_Object_Item from object_item cimport Elm_Object_Item
from general cimport Elm_Tooltip_Item_Content_Cb from general cimport Elm_Tooltip_Item_Content_Cb
from enums cimport Elm_Scroller_Policy, Elm_List_Mode, Elm_Object_Select_Mode, \ from enums cimport Elm_Scroller_Policy, Elm_List_Mode, Elm_Object_Select_Mode, \
Elm_Genlist_Item_Type, Elm_Genlist_Item_Scrollto_Type, \ Elm_Genlist_Item_Type, Elm_Genlist_Item_Scrollto_Type, \
Elm_Genlist_Item_Field_Type Elm_Genlist_Item_Field_Type
from libc.string cimport const_char
from libc.stdlib cimport const_void
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef char *(*GenlistItemLabelGetFunc) (void *data, Evas_Object *obj, const_char *part) ctypedef char *(*GenlistItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part)
ctypedef Evas_Object *(*GenlistItemIconGetFunc) (void *data, Evas_Object *obj, const_char *part) ctypedef Evas_Object *(*GenlistItemIconGetFunc) (void *data, Evas_Object *obj, const char *part)
ctypedef Eina_Bool (*GenlistItemStateGetFunc) (void *data, Evas_Object *obj, const_char *part) ctypedef Eina_Bool (*GenlistItemStateGetFunc) (void *data, Evas_Object *obj, const char *part)
ctypedef void (*GenlistItemDelFunc) (void *data, Evas_Object *obj) ctypedef void (*GenlistItemDelFunc) (void *data, Evas_Object *obj)
ctypedef struct Elm_Genlist_Item_Class_Func: ctypedef struct Elm_Genlist_Item_Class_Func:
@ -22,9 +20,9 @@ cdef extern from "Elementary.h":
GenlistItemDelFunc del_ "del" GenlistItemDelFunc del_ "del"
ctypedef struct Elm_Genlist_Item_Class: ctypedef struct Elm_Genlist_Item_Class:
const_char *item_style const char *item_style
const_char *decorate_item_style const char *decorate_item_style
const_char *decorate_all_item_style const char *decorate_all_item_style
Elm_Genlist_Item_Class_Func func Elm_Genlist_Item_Class_Func func
Evas_Object * elm_genlist_add(Evas_Object *parent) Evas_Object * elm_genlist_add(Evas_Object *parent)
@ -62,18 +60,18 @@ cdef extern from "Elementary.h":
void elm_genlist_item_class_ref(Elm_Genlist_Item_Class *itc) void elm_genlist_item_class_ref(Elm_Genlist_Item_Class *itc)
void elm_genlist_item_class_unref(Elm_Genlist_Item_Class *itc) void elm_genlist_item_class_unref(Elm_Genlist_Item_Class *itc)
void elm_genlist_item_tooltip_text_set(Elm_Object_Item *item, const_char *text) void elm_genlist_item_tooltip_text_set(Elm_Object_Item *item, const char *text)
void elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *item, Elm_Tooltip_Item_Content_Cb func, void *data, Evas_Smart_Cb del_cb) void elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *item, Elm_Tooltip_Item_Content_Cb func, void *data, Evas_Smart_Cb del_cb)
void elm_genlist_item_tooltip_unset(Elm_Object_Item *item) void elm_genlist_item_tooltip_unset(Elm_Object_Item *item)
void elm_genlist_item_tooltip_style_set(Elm_Object_Item *item, const_char *style) void elm_genlist_item_tooltip_style_set(Elm_Object_Item *item, const char *style)
const_char * elm_genlist_item_tooltip_style_get(Elm_Object_Item *item) const char * elm_genlist_item_tooltip_style_get(Elm_Object_Item *item)
Eina_Bool elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable) Eina_Bool elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable)
Eina_Bool elm_genlist_item_tooltip_window_mode_get(Elm_Object_Item *it) Eina_Bool elm_genlist_item_tooltip_window_mode_get(Elm_Object_Item *it)
void elm_genlist_item_cursor_set(Elm_Object_Item *item, const_char *cursor) void elm_genlist_item_cursor_set(Elm_Object_Item *item, const char *cursor)
const_char * elm_genlist_item_cursor_get(Elm_Object_Item *it) const char * elm_genlist_item_cursor_get(Elm_Object_Item *it)
void elm_genlist_item_cursor_unset(Elm_Object_Item *item) void elm_genlist_item_cursor_unset(Elm_Object_Item *item)
void elm_genlist_item_cursor_style_set(Elm_Object_Item *item, const_char *style) void elm_genlist_item_cursor_style_set(Elm_Object_Item *item, const char *style)
const_char * elm_genlist_item_cursor_style_get(Elm_Object_Item *item) const char * elm_genlist_item_cursor_style_get(Elm_Object_Item *item)
void elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *item, Eina_Bool engine_only) void elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *item, Eina_Bool engine_only)
Eina_Bool elm_genlist_item_cursor_engine_only_get(Elm_Object_Item *item) Eina_Bool elm_genlist_item_cursor_engine_only_get(Elm_Object_Item *item)
@ -87,17 +85,17 @@ cdef extern from "Elementary.h":
Elm_Object_Item * elm_genlist_item_parent_get(Elm_Object_Item *it) Elm_Object_Item * elm_genlist_item_parent_get(Elm_Object_Item *it)
void elm_genlist_item_subitems_clear(Elm_Object_Item *item) void elm_genlist_item_subitems_clear(Elm_Object_Item *item)
unsigned int elm_genlist_item_subitems_count(const_Elm_Object_Item *it) unsigned int elm_genlist_item_subitems_count(const Elm_Object_Item *it)
const_Eina_List * elm_genlist_item_subitems_get(const_Elm_Object_Item *it) const Eina_List * elm_genlist_item_subitems_get(const Elm_Object_Item *it)
void elm_genlist_item_expanded_set(Elm_Object_Item *item, Eina_Bool expanded) void elm_genlist_item_expanded_set(Elm_Object_Item *item, Eina_Bool expanded)
Eina_Bool elm_genlist_item_expanded_get(Elm_Object_Item *item) Eina_Bool elm_genlist_item_expanded_get(Elm_Object_Item *item)
int elm_genlist_item_expanded_depth_get(Elm_Object_Item *it) int elm_genlist_item_expanded_depth_get(Elm_Object_Item *it)
void elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l) void elm_genlist_item_all_contents_unset(Elm_Object_Item *it, Eina_List **l)
void elm_genlist_item_promote(Elm_Object_Item *it) void elm_genlist_item_promote(Elm_Object_Item *it)
void elm_genlist_item_demote(Elm_Object_Item *it) void elm_genlist_item_demote(Elm_Object_Item *it)
void elm_genlist_item_fields_update(Elm_Object_Item *item, const_char *parts, Elm_Genlist_Item_Field_Type itf) void elm_genlist_item_fields_update(Elm_Object_Item *item, const char *parts, Elm_Genlist_Item_Field_Type itf)
void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const_char *decorate_it_type, Eina_Bool decorate_it_set) void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *decorate_it_type, Eina_Bool decorate_it_set)
const_char * elm_genlist_item_decorate_mode_get(Elm_Object_Item *it) const char * elm_genlist_item_decorate_mode_get(Elm_Object_Item *it)
Elm_Object_Item * elm_genlist_decorated_item_get(Evas_Object *obj) Elm_Object_Item * elm_genlist_decorated_item_get(Evas_Object *obj)
void elm_genlist_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode) void elm_genlist_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode)
@ -115,9 +113,9 @@ cdef extern from "Elementary.h":
Eina_Bool elm_genlist_highlight_mode_get(Evas_Object *obj) Eina_Bool elm_genlist_highlight_mode_get(Evas_Object *obj)
void elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode) void elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode)
Elm_Object_Select_Mode elm_genlist_select_mode_get(Evas_Object *obj) Elm_Object_Select_Mode elm_genlist_select_mode_get(Evas_Object *obj)
Elm_Object_Item * elm_genlist_nth_item_get(const_Evas_Object *obj, unsigned int nth) Elm_Object_Item * elm_genlist_nth_item_get(const Evas_Object *obj, unsigned int nth)
void elm_genlist_focus_on_selection_set(Evas_Object *obj, Eina_Bool enabled) void elm_genlist_focus_on_selection_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_genlist_focus_on_selection_get(const_Evas_Object *obj) Eina_Bool elm_genlist_focus_on_selection_get(const Evas_Object *obj)
cdef class GenlistItemClass(object): cdef class GenlistItemClass(object):
cdef: cdef:

View File

@ -574,7 +574,7 @@ def _cb_object_item_conv(uintptr_t addr):
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
return _object_item_to_python(it) return _object_item_to_python(it)
cdef char *_py_elm_genlist_item_text_get(void *data, Evas_Object *obj, const_char *part) with gil: cdef char *_py_elm_genlist_item_text_get(void *data, Evas_Object *obj, const char *part) with gil:
cdef: cdef:
GenlistItem item = <GenlistItem>data GenlistItem item = <GenlistItem>data
unicode u = _ctouni(part) unicode u = _ctouni(part)
@ -596,7 +596,7 @@ cdef char *_py_elm_genlist_item_text_get(void *data, Evas_Object *obj, const_cha
else: else:
return NULL return NULL
cdef Evas_Object *_py_elm_genlist_item_content_get(void *data, Evas_Object *obj, const_char *part) with gil: cdef Evas_Object *_py_elm_genlist_item_content_get(void *data, Evas_Object *obj, const char *part) with gil:
cdef: cdef:
GenlistItem item = <GenlistItem>data GenlistItem item = <GenlistItem>data
unicode u = _ctouni(part) unicode u = _ctouni(part)
@ -619,7 +619,7 @@ cdef Evas_Object *_py_elm_genlist_item_content_get(void *data, Evas_Object *obj,
else: else:
return NULL return NULL
cdef Eina_Bool _py_elm_genlist_item_state_get(void *data, Evas_Object *obj, const_char *part) with gil: cdef Eina_Bool _py_elm_genlist_item_state_get(void *data, Evas_Object *obj, const char *part) with gil:
cdef: cdef:
GenlistItem item = <GenlistItem>data GenlistItem item = <GenlistItem>data
unicode u = _ctouni(part) unicode u = _ctouni(part)
@ -668,7 +668,7 @@ cdef void _py_elm_genlist_item_func(void *data, Evas_Object *obj, void *event_in
except: except:
traceback.print_exc() traceback.print_exc()
cdef int _py_elm_genlist_compare_func(const_void *data1, const_void *data2) with gil: cdef int _py_elm_genlist_compare_func(const void *data1, const void *data2) with gil:
cdef: cdef:
Elm_Object_Item *citem1 = <Elm_Object_Item *>data1 Elm_Object_Item *citem1 = <Elm_Object_Item *>data1
Elm_Object_Item *citem2 = <Elm_Object_Item *>data2 Elm_Object_Item *citem2 = <Elm_Object_Item *>data2

View File

@ -412,7 +412,7 @@ cdef class GenlistItem(ObjectItem):
""" """
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_genlist_item_tooltip_text_set(self.item, elm_genlist_item_tooltip_text_set(self.item,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def tooltip_content_cb_set(self, func, *args, **kargs): def tooltip_content_cb_set(self, func, *args, **kargs):
"""tooltip_content_cb_set(func, *args, **kargs) """tooltip_content_cb_set(func, *args, **kargs)
@ -472,7 +472,7 @@ cdef class GenlistItem(ObjectItem):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_genlist_item_tooltip_style_set(self.item, elm_genlist_item_tooltip_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_genlist_item_tooltip_style_get(self.item)) return _ctouni(elm_genlist_item_tooltip_style_get(self.item))
@ -480,7 +480,7 @@ cdef class GenlistItem(ObjectItem):
def tooltip_style_set(self, style=None): def tooltip_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_genlist_item_tooltip_style_set(self.item, elm_genlist_item_tooltip_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def tooltip_style_get(self): def tooltip_style_get(self):
return _ctouni(elm_genlist_item_tooltip_style_get(self.item)) return _ctouni(elm_genlist_item_tooltip_style_get(self.item))
@ -517,7 +517,7 @@ cdef class GenlistItem(ObjectItem):
def __set__(self, cursor): def __set__(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_genlist_item_cursor_set(self.item, elm_genlist_item_cursor_set(self.item,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_genlist_item_cursor_get(self.item)) return _ctouni(elm_genlist_item_cursor_get(self.item))
@ -528,7 +528,7 @@ cdef class GenlistItem(ObjectItem):
def cursor_set(self, cursor): def cursor_set(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_genlist_item_cursor_set(self.item, elm_genlist_item_cursor_set(self.item,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def cursor_get(self): def cursor_get(self):
return _ctouni(elm_genlist_item_cursor_get(self.item)) return _ctouni(elm_genlist_item_cursor_get(self.item))
def cursor_unset(self): def cursor_unset(self):
@ -546,7 +546,7 @@ cdef class GenlistItem(ObjectItem):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_genlist_item_cursor_style_set(self.item, elm_genlist_item_cursor_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_genlist_item_cursor_style_get(self.item)) return _ctouni(elm_genlist_item_cursor_style_get(self.item))
@ -554,7 +554,7 @@ cdef class GenlistItem(ObjectItem):
def cursor_style_set(self, style=None): def cursor_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_genlist_item_cursor_style_set(self.item, elm_genlist_item_cursor_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def cursor_style_get(self): def cursor_style_get(self):
return _ctouni(elm_genlist_item_cursor_style_get(self.item)) return _ctouni(elm_genlist_item_cursor_style_get(self.item))
@ -726,7 +726,7 @@ cdef class GenlistItem(ObjectItem):
""" """
if isinstance(parts, unicode): parts = PyUnicode_AsUTF8String(parts) if isinstance(parts, unicode): parts = PyUnicode_AsUTF8String(parts)
elm_genlist_item_fields_update(self.item, elm_genlist_item_fields_update(self.item,
<const_char *>parts if parts is not None else NULL, <const char *>parts if parts is not None else NULL,
itf) itf)
property decorate_mode: property decorate_mode:
@ -776,7 +776,7 @@ cdef class GenlistItem(ObjectItem):
a1 = decorate_it_type a1 = decorate_it_type
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1) if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
elm_genlist_item_decorate_mode_set(self.item, elm_genlist_item_decorate_mode_set(self.item,
<const_char *>a1 if a1 is not None else NULL, <const char *>a1 if a1 is not None else NULL,
decorate_it_set) decorate_it_set)
def decorate_mode_get(self): def decorate_mode_get(self):
return _ctouni(elm_genlist_item_decorate_mode_get(self.item)) return _ctouni(elm_genlist_item_decorate_mode_get(self.item))

View File

@ -1,4 +1,4 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Evas_Coord, Evas_Event_Flags from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord, Evas_Event_Flags
from enums cimport Elm_Gesture_State, Elm_Gesture_Type from enums cimport Elm_Gesture_State, Elm_Gesture_Type
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
@ -52,28 +52,28 @@ cdef extern from "Elementary.h":
Evas_Object *elm_gesture_layer_add(Evas_Object *parent) Evas_Object *elm_gesture_layer_add(Evas_Object *parent)
void elm_gesture_layer_line_min_length_set(Evas_Object *obj, int line_min_length) void elm_gesture_layer_line_min_length_set(Evas_Object *obj, int line_min_length)
int elm_gesture_layer_line_min_length_get(const_Evas_Object *obj) int elm_gesture_layer_line_min_length_get(const Evas_Object *obj)
void elm_gesture_layer_zoom_distance_tolerance_set(Evas_Object *obj, Evas_Coord zoom_distance_tolerance) void elm_gesture_layer_zoom_distance_tolerance_set(Evas_Object *obj, Evas_Coord zoom_distance_tolerance)
Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const_Evas_Object *obj) Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const Evas_Object *obj)
void elm_gesture_layer_line_distance_tolerance_set(Evas_Object *obj, Evas_Coord line_distance_tolerance) void elm_gesture_layer_line_distance_tolerance_set(Evas_Object *obj, Evas_Coord line_distance_tolerance)
Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const_Evas_Object *obj) Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const Evas_Object *obj)
void elm_gesture_layer_line_angular_tolerance_set(Evas_Object *obj, double line_angular_tolerance) void elm_gesture_layer_line_angular_tolerance_set(Evas_Object *obj, double line_angular_tolerance)
double elm_gesture_layer_line_angular_tolerance_get(const_Evas_Object *obj) double elm_gesture_layer_line_angular_tolerance_get(const Evas_Object *obj)
void elm_gesture_layer_zoom_wheel_factor_set(Evas_Object *obj, double zoom_wheel_factor) void elm_gesture_layer_zoom_wheel_factor_set(Evas_Object *obj, double zoom_wheel_factor)
double elm_gesture_layer_zoom_wheel_factor_get(const_Evas_Object *obj) double elm_gesture_layer_zoom_wheel_factor_get(const Evas_Object *obj)
void elm_gesture_layer_zoom_finger_factor_set(Evas_Object *obj, double zoom_finger_factor) void elm_gesture_layer_zoom_finger_factor_set(Evas_Object *obj, double zoom_finger_factor)
double elm_gesture_layer_zoom_finger_factor_get(const_Evas_Object *obj) double elm_gesture_layer_zoom_finger_factor_get(const Evas_Object *obj)
void elm_gesture_layer_rotate_angular_tolerance_set(Evas_Object *obj, double rotate_angular_tolerance) void elm_gesture_layer_rotate_angular_tolerance_set(Evas_Object *obj, double rotate_angular_tolerance)
double elm_gesture_layer_rotate_angular_tolerance_get(const_Evas_Object *obj) double elm_gesture_layer_rotate_angular_tolerance_get(const Evas_Object *obj)
void elm_gesture_layer_flick_time_limit_ms_set(Evas_Object *obj, unsigned int flick_time_limit_ms) void elm_gesture_layer_flick_time_limit_ms_set(Evas_Object *obj, unsigned int flick_time_limit_ms)
unsigned int elm_gesture_layer_flick_time_limit_ms_get(const_Evas_Object *obj) unsigned int elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *obj)
void elm_gesture_layer_long_tap_start_timeout_set(Evas_Object *obj, double long_tap_start_timeout) void elm_gesture_layer_long_tap_start_timeout_set(Evas_Object *obj, double long_tap_start_timeout)
double elm_gesture_layer_long_tap_start_timeout_get(const_Evas_Object *obj) double elm_gesture_layer_long_tap_start_timeout_get(const Evas_Object *obj)
void elm_gesture_layer_continues_enable_set(Evas_Object *obj, Eina_Bool continues_enable) void elm_gesture_layer_continues_enable_set(Evas_Object *obj, Eina_Bool continues_enable)
Eina_Bool elm_gesture_layer_continues_enable_get(const_Evas_Object *obj) Eina_Bool elm_gesture_layer_continues_enable_get(const Evas_Object *obj)
void elm_gesture_layer_double_tap_timeout_set(Evas_Object *obj, double double_tap_timeout) void elm_gesture_layer_double_tap_timeout_set(Evas_Object *obj, double double_tap_timeout)
double elm_gesture_layer_double_tap_timeout_get(const_Evas_Object *obj) double elm_gesture_layer_double_tap_timeout_get(const Evas_Object *obj)
void elm_gesture_layer_tap_finger_size_set(Evas_Object *obj, Evas_Coord sz) void elm_gesture_layer_tap_finger_size_set(Evas_Object *obj, Evas_Coord sz)
Evas_Coord elm_gesture_layer_tap_finger_size_get(const_Evas_Object *obj) Evas_Coord elm_gesture_layer_tap_finger_size_get(const Evas_Object *obj)
# TODO: void elm_gesture_layer_tap_longpress_cb_add(Evas_Object *obj, Elm_Gesture_State state, Elm_Gesture_Event_Cb cb, void *data) # TODO: void elm_gesture_layer_tap_longpress_cb_add(Evas_Object *obj, Elm_Gesture_State state, Elm_Gesture_Event_Cb cb, void *data)
# TODO: void elm_gesture_layer_tap_longpress_cb_del(Evas_Object *obj, Elm_Gesture_State state, Elm_Gesture_Event_Cb cb, void *data) # TODO: void elm_gesture_layer_tap_longpress_cb_del(Evas_Object *obj, Elm_Gesture_State state, Elm_Gesture_Event_Cb cb, void *data)

View File

@ -1,5 +1,5 @@
from efl.eina cimport Eina_Bool from efl.eina cimport Eina_Bool
from efl.evas cimport Evas_Object, const_Evas_Object, Evas_Coord from efl.evas cimport Evas_Object, Evas_Coord
from enums cimport Elm_GLView_Mode, Elm_GLView_Resize_Policy, \ from enums cimport Elm_GLView_Mode, Elm_GLView_Resize_Policy, \
Elm_GLView_Render_Policy Elm_GLView_Render_Policy
@ -9,12 +9,12 @@ cdef extern from "Elementary.h":
ctypedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj) ctypedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj)
Evas_Object *elm_glview_add(Evas_Object *parent) Evas_Object *elm_glview_add(Evas_Object *parent)
Evas_GL_API *elm_glview_gl_api_get(const_Evas_Object *obj) Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj)
Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode) Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode)
Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy)
Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy) Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy)
void elm_glview_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) void elm_glview_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
void elm_glview_size_get(const_Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func)
void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func)
void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func)

View File

@ -1,7 +1,6 @@
from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb
from object_item cimport Elm_Object_Item from object_item cimport Elm_Object_Item
from enums cimport Elm_Icon_Type from enums cimport Elm_Icon_Type
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_hoversel_add(Evas_Object *parent) Evas_Object *elm_hoversel_add(Evas_Object *parent)
@ -14,6 +13,6 @@ cdef extern from "Elementary.h":
Eina_Bool elm_hoversel_expanded_get(Evas_Object *obj) Eina_Bool elm_hoversel_expanded_get(Evas_Object *obj)
void elm_hoversel_clear(Evas_Object *obj) void elm_hoversel_clear(Evas_Object *obj)
Eina_List *elm_hoversel_items_get(Evas_Object *obj) Eina_List *elm_hoversel_items_get(Evas_Object *obj)
Elm_Object_Item *elm_hoversel_item_add(Evas_Object *obj, const_char *label, const_char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, void *data)
void elm_hoversel_item_icon_set(Elm_Object_Item *it, const_char *icon_file, const_char *icon_group, Elm_Icon_Type icon_type) void elm_hoversel_item_icon_set(Elm_Object_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type)
void elm_hoversel_item_icon_get(Elm_Object_Item *it, const_char **icon_file, const_char **icon_group, Elm_Icon_Type *icon_type) void elm_hoversel_item_icon_get(Elm_Object_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type)

View File

@ -157,8 +157,8 @@ cdef class HoverselItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_hoversel_item_add(hoversel.obj, item = elm_hoversel_item_add(hoversel.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
<const_char *>self.icon_file if self.icon_file is not None else NULL, <const char *>self.icon_file if self.icon_file is not None else NULL,
self.icon_type, self.icon_type,
cb, <void*>self) cb, <void*>self)
@ -189,14 +189,14 @@ cdef class HoverselItem(ObjectItem):
self.icon_type = a3 self.icon_type = a3
else: else:
elm_hoversel_item_icon_set(self.item, elm_hoversel_item_icon_set(self.item,
<const_char *>a1 if a1 is not None else NULL, <const char *>a1 if a1 is not None else NULL,
<const_char *>a2 if a2 is not None else NULL, <const char *>a2 if a2 is not None else NULL,
a3) a3)
def __get__(self): def __get__(self):
cdef: cdef:
const_char *icon_file const char *icon_file
const_char *icon_group const char *icon_group
Elm_Icon_Type icon_type Elm_Icon_Type icon_type
if self.item == NULL: if self.item == NULL:
@ -218,13 +218,13 @@ cdef class HoverselItem(ObjectItem):
self.icon_type = a3 self.icon_type = a3
else: else:
elm_hoversel_item_icon_set(self.item, elm_hoversel_item_icon_set(self.item,
<const_char *>a1 if a1 is not None else NULL, <const char *>a1 if a1 is not None else NULL,
<const_char *>a2 if a2 is not None else NULL, <const char *>a2 if a2 is not None else NULL,
a3) a3)
def icon_get(self): def icon_get(self):
cdef: cdef:
const_char *icon_file const char *icon_file
const_char *icon_group const char *icon_group
Elm_Icon_Type icon_type Elm_Icon_Type icon_type
if self.item == NULL: if self.item == NULL:
@ -357,8 +357,8 @@ cdef class Hoversel(Button):
if isinstance(icon_file, unicode): icon_file = PyUnicode_AsUTF8String(icon_file) if isinstance(icon_file, unicode): icon_file = PyUnicode_AsUTF8String(icon_file)
item = elm_hoversel_item_add(self.obj, item = elm_hoversel_item_add(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
<const_char *>icon_file if icon_file is not None else NULL, <const char *>icon_file if icon_file is not None else NULL,
icon_type, icon_type,
cb, <void*>ret) cb, <void*>ret)

View File

@ -1,15 +1,12 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from image cimport Image from image cimport Image
from enums cimport Elm_Icon_Lookup_Order, Elm_Icon_Type from enums cimport Elm_Icon_Lookup_Order, Elm_Icon_Type
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
# Icon (api:DONE cb:DONE test:DONE doc:DONE py3:DONE)
Evas_Object * elm_icon_add(Evas_Object *parent) Evas_Object * elm_icon_add(Evas_Object *parent)
void elm_icon_thumb_set(Evas_Object *obj, const_char *file, const_char *group) void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group)
Eina_Bool elm_icon_standard_set(Evas_Object *obj, const_char *name) Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name)
const_char * elm_icon_standard_get(Evas_Object *obj) const char * elm_icon_standard_get(Evas_Object *obj)
void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order)
Elm_Icon_Lookup_Order elm_icon_order_lookup_get(Evas_Object *obj) Elm_Icon_Lookup_Order elm_icon_order_lookup_get(Evas_Object *obj)

View File

@ -188,15 +188,15 @@ cdef class Icon(Image):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
elm_icon_thumb_set(self.obj, elm_icon_thumb_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL) <const char *>group if group is not None else NULL)
def thumb_set(self, filename, group = None): def thumb_set(self, filename, group = None):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
elm_icon_thumb_set(self.obj, elm_icon_thumb_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL) <const char *>group if group is not None else NULL)
property standard: property standard:
"""The icon standards name. """The icon standards name.
@ -234,13 +234,13 @@ cdef class Icon(Image):
def __set__(self, name): def __set__(self, name):
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
if not elm_icon_standard_set(self.obj, if not elm_icon_standard_set(self.obj,
<const_char *>name if name is not None else NULL): <const char *>name if name is not None else NULL):
raise RuntimeWarning("Setting standard icon failed") raise RuntimeWarning("Setting standard icon failed")
def standard_set(self, name): def standard_set(self, name):
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
return elm_icon_standard_set(self.obj, return elm_icon_standard_set(self.obj,
<const_char *>name if name is not None else NULL) <const char *>name if name is not None else NULL)
def standard_get(self): def standard_get(self):
return _ctouni(elm_icon_standard_get(self.obj)) return _ctouni(elm_icon_standard_get(self.obj))

View File

@ -1,10 +1,6 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from object cimport Object from object cimport Object
from enums cimport Elm_Image_Orient from enums cimport Elm_Image_Orient
from libc.string cimport const_char
cdef extern from *:
ctypedef void const_void "const void"
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef struct Elm_Image_Progress: ctypedef struct Elm_Image_Progress:
@ -16,9 +12,9 @@ cdef extern from "Elementary.h":
Eina_Bool open_error Eina_Bool open_error
Evas_Object *elm_image_add(Evas_Object *parent) Evas_Object *elm_image_add(Evas_Object *parent)
Eina_Bool elm_image_memfile_set(Evas_Object *obj, const_void *img, size_t size, const_char *format, const_char *key) Eina_Bool elm_image_memfile_set(Evas_Object *obj, const void *img, size_t size, const char *format, const char *key)
Eina_Bool elm_image_file_set(Evas_Object *obj, const_char *file, const_char *group) Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
void elm_image_file_get(Evas_Object *obj, const_char **file, const_char **group) void elm_image_file_get(Evas_Object *obj, const char **file, const char **group)
void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth)
Eina_Bool elm_image_smooth_get(Evas_Object *obj) Eina_Bool elm_image_smooth_get(Evas_Object *obj)
void elm_image_object_size_get(Evas_Object *obj, int *w, int *h) void elm_image_object_size_get(Evas_Object *obj, int *w, int *h)

View File

@ -113,7 +113,7 @@ ELM_IMAGE_FLIP_TRANSPOSE = enums.ELM_IMAGE_FLIP_TRANSPOSE
ELM_IMAGE_FLIP_TRANSVERSE = enums.ELM_IMAGE_FLIP_TRANSVERSE ELM_IMAGE_FLIP_TRANSVERSE = enums.ELM_IMAGE_FLIP_TRANSVERSE
def _cb_string_conv(uintptr_t addr): def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr cdef const char *s = <const char *>addr
return _ctouni(s) if s is not NULL else None return _ctouni(s) if s is not NULL else None
class ImageProgressInfo(object): class ImageProgressInfo(object):
@ -201,14 +201,14 @@ cdef class Image(Object):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if not elm_image_file_set(self.obj, if not elm_image_file_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL): <const char *>group if group is not None else NULL):
raise RuntimeError("Could not set file.") raise RuntimeError("Could not set file.")
def __get__(self): def __get__(self):
cdef: cdef:
const_char *filename const char *filename
const_char *group const char *group
elm_image_file_get(self.obj, &filename, &group) elm_image_file_get(self.obj, &filename, &group)
return (_ctouni(filename), _ctouni(group)) return (_ctouni(filename), _ctouni(group))
@ -217,13 +217,13 @@ cdef class Image(Object):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if not elm_image_file_set(self.obj, if not elm_image_file_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL): <const char *>group if group is not None else NULL):
raise RuntimeError("Could not set file.") raise RuntimeError("Could not set file.")
def file_get(self): def file_get(self):
cdef: cdef:
const_char *filename const char *filename
const_char *group const char *group
elm_image_file_get(self.obj, &filename, &group) elm_image_file_get(self.obj, &filename, &group)
return (_ctouni(filename), _ctouni(group)) return (_ctouni(filename), _ctouni(group))

View File

@ -1,11 +1,6 @@
from efl.evas cimport Eina_Bool, Eina_Compare_Cb, Evas_Object, Evas_Smart_Cb, \ from efl.evas cimport Eina_Bool, Eina_Compare_Cb, Evas_Object, Evas_Smart_Cb
const_Evas_Object
from object cimport Object from object cimport Object
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char
cdef extern from *:
ctypedef void const_void "const void"
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_index_add(Evas_Object *parent) Evas_Object *elm_index_add(Evas_Object *parent)
@ -15,11 +10,11 @@ cdef extern from "Elementary.h":
int elm_index_item_level_get(Evas_Object *obj) int elm_index_item_level_get(Evas_Object *obj)
void elm_index_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) void elm_index_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
Elm_Object_Item *elm_index_selected_item_get(Evas_Object *obj, int level) Elm_Object_Item *elm_index_selected_item_get(Evas_Object *obj, int level)
Elm_Object_Item *elm_index_item_append(Evas_Object *obj, const_char *letter, Evas_Smart_Cb func, const_void *data) Elm_Object_Item *elm_index_item_append(Evas_Object *obj, const char *letter, Evas_Smart_Cb func, const void *data)
Elm_Object_Item *elm_index_item_prepend(Evas_Object *obj, const_char *letter, Evas_Smart_Cb func, const_void *data) Elm_Object_Item *elm_index_item_prepend(Evas_Object *obj, const char *letter, Evas_Smart_Cb func, const void *data)
Elm_Object_Item *elm_index_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const_char *letter, Evas_Smart_Cb func, const_void *data) Elm_Object_Item *elm_index_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *letter, Evas_Smart_Cb func, const void *data)
Elm_Object_Item *elm_index_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const_char *letter, Evas_Smart_Cb func, const_void *data) Elm_Object_Item *elm_index_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *letter, Evas_Smart_Cb func, const void *data)
Elm_Object_Item *elm_index_item_sorted_insert(Evas_Object *obj, const_char *letter, Evas_Smart_Cb func, const_void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func) Elm_Object_Item *elm_index_item_sorted_insert(Evas_Object *obj, const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func)
Elm_Object_Item *elm_index_item_find(Evas_Object *obj, void *data) Elm_Object_Item *elm_index_item_find(Evas_Object *obj, void *data)
void elm_index_item_clear(Evas_Object *obj) void elm_index_item_clear(Evas_Object *obj)
void elm_index_level_go(Evas_Object *obj, int level) void elm_index_level_go(Evas_Object *obj, int level)
@ -29,6 +24,6 @@ cdef extern from "Elementary.h":
void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
Eina_Bool elm_index_horizontal_get(Evas_Object *obj) Eina_Bool elm_index_horizontal_get(Evas_Object *obj)
void elm_index_delay_change_time_set(Evas_Object *obj, double delay_change_time) void elm_index_delay_change_time_set(Evas_Object *obj, double delay_change_time)
double elm_index_delay_change_time_get(const_Evas_Object *obj) double elm_index_delay_change_time_get(const Evas_Object *obj)
void elm_index_omit_enabled_set(Evas_Object *obj, Eina_Bool enabled) void elm_index_omit_enabled_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_index_omit_enabled_get(const_Evas_Object *obj) Eina_Bool elm_index_omit_enabled_get(const Evas_Object *obj)

View File

@ -82,7 +82,7 @@ def _cb_object_item_conv(uintptr_t addr):
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
return _object_item_to_python(it) return _object_item_to_python(it)
cdef int _index_compare_func(const_void *data1, const_void *data2) with gil: cdef int _index_compare_func(const void *data1, const void *data2) with gil:
"""Comparison by IndexItem objects""" """Comparison by IndexItem objects"""
cdef: cdef:
Elm_Object_Item *citem1 = <Elm_Object_Item *>data1 Elm_Object_Item *citem1 = <Elm_Object_Item *>data1
@ -108,7 +108,7 @@ cdef int _index_compare_func(const_void *data1, const_void *data2) with gil:
else: else:
return 0 return 0
cdef int _index_data_compare_func(const_void *data1, const_void *data2) with gil: cdef int _index_data_compare_func(const void *data1, const void *data2) with gil:
"""Comparison by IndexItem data""" """Comparison by IndexItem data"""
cdef: cdef:
IndexItem item1 = <object>data1 IndexItem item1 = <object>data1
@ -184,7 +184,7 @@ cdef class IndexItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_index_item_append(index.obj, item = elm_index_item_append(index.obj,
<const_char *>self.letter if self.letter is not None else NULL, <const char *>self.letter if self.letter is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -209,7 +209,7 @@ cdef class IndexItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_index_item_prepend(index.obj, item = elm_index_item_prepend(index.obj,
<const_char *>self.letter if self.letter is not None else NULL, <const char *>self.letter if self.letter is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -235,7 +235,7 @@ cdef class IndexItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_index_item_insert_after(index.obj, after.item, item = elm_index_item_insert_after(index.obj, after.item,
<const_char *>self.letter if self.letter is not None else NULL, <const char *>self.letter if self.letter is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -261,7 +261,7 @@ cdef class IndexItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_index_item_insert_before(index.obj, before.item, item = elm_index_item_insert_before(index.obj, before.item,
<const_char *>self.letter if self.letter is not None else NULL, <const char *>self.letter if self.letter is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -300,7 +300,7 @@ cdef class IndexItem(ObjectItem):
self.compare_func = compare_func self.compare_func = compare_func
self.data_compare_func = data_compare_func self.data_compare_func = data_compare_func
item = elm_index_item_sorted_insert(index.obj, item = elm_index_item_sorted_insert(index.obj,
<const_char *>self.letter if self.letter is not None else NULL, <const char *>self.letter if self.letter is not None else NULL,
cb, <void*>self, cb, <void*>self,
_index_compare_func, _index_data_compare_func) _index_compare_func, _index_data_compare_func)

View File

@ -1,4 +1,4 @@
from efl.evas cimport Eina_Bool, const_Evas_Object, Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from enums cimport Elm_Wrap_Type, Elm_Label_Slide_Mode from enums cimport Elm_Wrap_Type, Elm_Label_Slide_Mode
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
@ -15,5 +15,5 @@ cdef extern from "Elementary.h":
double elm_label_slide_speed_get(Evas_Object *obj) double elm_label_slide_speed_get(Evas_Object *obj)
# TODO: void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit) # TODO: void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit)
void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode) void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode)
Elm_Label_Slide_Mode elm_label_slide_mode_get(const_Evas_Object *obj) Elm_Label_Slide_Mode elm_label_slide_mode_get(const Evas_Object *obj)
void elm_label_slide_go(Evas_Object *obj) void elm_label_slide_go(Evas_Object *obj)

View File

@ -1,5 +1,4 @@
from efl.evas cimport Evas_Object, Eina_Bool from efl.evas cimport Evas_Object, Eina_Bool
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object * elm_layout_add(Evas_Object *parent) Evas_Object * elm_layout_add(Evas_Object *parent)

View File

@ -15,48 +15,47 @@
# You should have received a copy of the GNU Lesser General Public License # 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/>. # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
from efl.evas cimport Evas_Object, const_Evas_Object, Eina_Bool, Eina_List from efl.evas cimport Evas_Object, Eina_Bool, Eina_List
from object cimport Object from object cimport Object
from libc.string cimport const_char
cdef extern from "Edje.h": cdef extern from "Edje.h":
ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const_char *emission, const_char *source) ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const char *emission, const char *source)
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Eina_Bool elm_layout_content_set(Evas_Object *obj, const_char *swallow, Evas_Object *content) Eina_Bool elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
Evas_Object * elm_layout_content_get(Evas_Object *obj, const_char *swallow) Evas_Object * elm_layout_content_get(Evas_Object *obj, const char *swallow)
Evas_Object * elm_layout_content_unset(Evas_Object *obj, const_char *swallow) Evas_Object * elm_layout_content_unset(Evas_Object *obj, const char *swallow)
Eina_Bool elm_layout_text_set(Evas_Object *obj, const_char *part, const_char *text) Eina_Bool elm_layout_text_set(Evas_Object *obj, const char *part, const char *text)
const_char * elm_layout_text_get(Evas_Object *obj, const_char *part) const char * elm_layout_text_get(Evas_Object *obj, const char *part)
Eina_Bool elm_layout_file_set(Evas_Object *obj, const_char *file, const_char *group) Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group)
int elm_layout_freeze(Evas_Object *obj) int elm_layout_freeze(Evas_Object *obj)
int elm_layout_thaw(Evas_Object *obj) int elm_layout_thaw(Evas_Object *obj)
Eina_Bool elm_layout_theme_set(Evas_Object *obj, const_char *clas, const_char *group, const_char *style) Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style)
void elm_layout_signal_emit(Evas_Object *obj, const_char *emission, const_char *source) void elm_layout_signal_emit(Evas_Object *obj, const char *emission, const char *source)
void elm_layout_signal_callback_add(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func, void *data) void elm_layout_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
void * elm_layout_signal_callback_del(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func) void * elm_layout_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func)
Eina_Bool elm_layout_box_append(Evas_Object *obj, const_char *part, Evas_Object *child) Eina_Bool elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child)
Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const_char *part, Evas_Object *child) Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child)
Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const_char *part, Evas_Object *child, Evas_Object *reference) Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, Evas_Object *reference)
Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const_char *part, Evas_Object *child, unsigned int pos) Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos)
Evas_Object * elm_layout_box_remove(Evas_Object *obj, const_char *part, Evas_Object *child) Evas_Object * elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child)
Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const_char *part, Eina_Bool clear) Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear)
Eina_Bool elm_layout_table_pack(Evas_Object *obj, const_char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) Eina_Bool elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
Evas_Object * elm_layout_table_unpack(Evas_Object *obj, const_char *part, Evas_Object *child_obj) Evas_Object * elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj)
Eina_Bool elm_layout_table_clear(Evas_Object *obj, const_char *part, Eina_Bool clear) Eina_Bool elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear)
Evas_Object * elm_layout_edje_get(Evas_Object *obj) Evas_Object * elm_layout_edje_get(Evas_Object *obj)
const_char * elm_layout_data_get(Evas_Object *obj, const_char *key) const char * elm_layout_data_get(Evas_Object *obj, const char *key)
void elm_layout_sizing_eval(Evas_Object *obj) void elm_layout_sizing_eval(Evas_Object *obj)
Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const_char *part_name, const_char *cursor) Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor)
const_char * elm_layout_part_cursor_get(Evas_Object *obj, const_char *part_name) const char * elm_layout_part_cursor_get(Evas_Object *obj, const char *part_name)
Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const_char *part_name) Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name)
Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const_char *part_name, const_char *style) Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style)
const_char * elm_layout_part_cursor_style_get(Evas_Object *obj, const_char *part_name) const char * elm_layout_part_cursor_style_get(Evas_Object *obj, const char *part_name)
Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const_char *part_name, Eina_Bool engine_only) Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only)
Eina_Bool elm_layout_part_cursor_engine_only_get(Evas_Object *obj, const_char *part_name) Eina_Bool elm_layout_part_cursor_engine_only_get(Evas_Object *obj, const char *part_name)
Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access) Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access)
Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj) Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj)
Eina_List * elm_layout_content_swallow_list_get(const_Evas_Object *obj) Eina_List * elm_layout_content_swallow_list_get(const Evas_Object *obj)
void elm_layout_icon_set(Evas_Object *obj, Evas_Object *icon) void elm_layout_icon_set(Evas_Object *obj, Evas_Object *icon)
Evas_Object * elm_layout_icon_get(Evas_Object *obj) Evas_Object * elm_layout_icon_get(Evas_Object *obj)
void elm_layout_end_set(Evas_Object *obj, Evas_Object *end) void elm_layout_end_set(Evas_Object *obj, Evas_Object *end)

View File

@ -26,7 +26,7 @@ from object cimport Object
import traceback import traceback
cdef void layout_signal_callback(void *data, Evas_Object *obj, cdef void layout_signal_callback(void *data, Evas_Object *obj,
const_char *emission, const_char *source) with gil: const char *emission, const char *source) with gil:
cdef Object self = object_from_instance(obj) cdef Object self = object_from_instance(obj)
lst = tuple(<object>data) lst = tuple(<object>data)
for func, args, kargs in lst: for func, args, kargs in lst:
@ -93,7 +93,7 @@ cdef class LayoutClass(Object):
swallow = None swallow = None
if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow) if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow)
if not elm_layout_content_set(self.obj, if not elm_layout_content_set(self.obj,
<const_char *>swallow if swallow is not None else NULL, <const char *>swallow if swallow is not None else NULL,
content.obj if content is not None else NULL): content.obj if content is not None else NULL):
raise RuntimeError raise RuntimeError
@ -110,7 +110,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow) if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow)
return object_from_instance(elm_layout_content_get(self.obj, return object_from_instance(elm_layout_content_get(self.obj,
<const_char *>swallow if swallow is not None else NULL)) <const char *>swallow if swallow is not None else NULL))
def content_unset(self, swallow=None): def content_unset(self, swallow=None):
"""content_unset(unicode swallow) """content_unset(unicode swallow)
@ -127,7 +127,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow) if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow)
return object_from_instance(elm_layout_content_unset(self.obj, return object_from_instance(elm_layout_content_unset(self.obj,
<const_char *>swallow if swallow is not None else NULL)) <const char *>swallow if swallow is not None else NULL))
def text_set(self, part=None, text=None): def text_set(self, part=None, text=None):
"""text_set(unicode part, unicode text) """text_set(unicode part, unicode text)
@ -151,8 +151,8 @@ cdef class LayoutClass(Object):
text = part text = part
part = None part = None
if not elm_layout_text_set(self.obj, if not elm_layout_text_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>text if text is not None else NULL): <const char *>text if text is not None else NULL):
raise RuntimeError raise RuntimeError
def text_get(self, part=None): def text_get(self, part=None):
@ -170,7 +170,7 @@ cdef class LayoutClass(Object):
# With part=None it should do the same as elm_object_text_get # With part=None it should do the same as elm_object_text_get
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(elm_layout_text_get(self.obj, return _ctouni(elm_layout_text_get(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
property file: property file:
"""Set the file path and group of the edje file that will be used as """Set the file path and group of the edje file that will be used as
@ -188,16 +188,16 @@ cdef class LayoutClass(Object):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if not elm_layout_file_set(self.obj, if not elm_layout_file_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL): <const char *>group if group is not None else NULL):
raise RuntimeError("Could not set file.") raise RuntimeError("Could not set file.")
def file_set(self, filename, group = None): def file_set(self, filename, group = None):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if not elm_layout_file_set(self.obj, if not elm_layout_file_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL): <const char *>group if group is not None else NULL):
raise RuntimeError("Could not set file.") raise RuntimeError("Could not set file.")
def freeze(self): def freeze(self):
@ -253,9 +253,9 @@ cdef class LayoutClass(Object):
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
if not elm_layout_theme_set(self.obj, if not elm_layout_theme_set(self.obj,
<const_char *>clas if clas is not None else NULL, <const char *>clas if clas is not None else NULL,
<const_char *>group if group is not None else NULL, <const char *>group if group is not None else NULL,
<const_char *>style if style is not None else NULL): <const char *>style if style is not None else NULL):
raise RuntimeError("Could not set theme.") raise RuntimeError("Could not set theme.")
def theme_set(self, clas, group, style): def theme_set(self, clas, group, style):
@ -263,9 +263,9 @@ cdef class LayoutClass(Object):
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
if not elm_layout_theme_set(self.obj, if not elm_layout_theme_set(self.obj,
<const_char *>clas if clas is not None else NULL, <const char *>clas if clas is not None else NULL,
<const_char *>group if group is not None else NULL, <const char *>group if group is not None else NULL,
<const_char *>style if style is not None else NULL): <const char *>style if style is not None else NULL):
raise RuntimeError("Could not set theme.") raise RuntimeError("Could not set theme.")
def signal_emit(self, emission, source): def signal_emit(self, emission, source):
@ -287,8 +287,8 @@ cdef class LayoutClass(Object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
elm_layout_signal_emit(self.obj, elm_layout_signal_emit(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL) <const char *>source if source is not None else NULL)
def signal_callback_add(self, emission, source, func, *args, **kwargs): def signal_callback_add(self, emission, source, func, *args, **kwargs):
"""Add a callback for a (Edje) signal emitted by a layout widget's """Add a callback for a (Edje) signal emitted by a layout widget's
@ -317,8 +317,8 @@ cdef class LayoutClass(Object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
elm_layout_signal_callback_add(self.obj, elm_layout_signal_callback_add(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL, <const char *>source if source is not None else NULL,
layout_signal_callback, <void*>lst) layout_signal_callback, <void*>lst)
lst.append((func, args, kwargs)) lst.append((func, args, kwargs))
@ -366,8 +366,8 @@ cdef class LayoutClass(Object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
elm_layout_signal_callback_del(self.obj, elm_layout_signal_callback_del(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL, <const char *>source if source is not None else NULL,
layout_signal_callback) layout_signal_callback)
def box_append(self, part, evasObject child): def box_append(self, part, evasObject child):
@ -399,7 +399,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_box_append(self.obj, if not elm_layout_box_append(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj): child.obj):
raise RuntimeError("Could not add to box") raise RuntimeError("Could not add to box")
@ -432,7 +432,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_box_prepend(self.obj, if not elm_layout_box_prepend(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj): child.obj):
raise RuntimeError("Could not add to box") raise RuntimeError("Could not add to box")
@ -467,7 +467,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_box_insert_before(self.obj, if not elm_layout_box_insert_before(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj, reference.obj): child.obj, reference.obj):
raise RuntimeError("Could not add to box") raise RuntimeError("Could not add to box")
@ -502,7 +502,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_box_insert_at(self.obj, if not elm_layout_box_insert_at(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj, pos): child.obj, pos):
raise RuntimeError("Could not add to box") raise RuntimeError("Could not add to box")
@ -530,7 +530,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(elm_layout_box_remove(self.obj, return object_from_instance(elm_layout_box_remove(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child.obj)) child.obj))
def box_remove_all(self, part, clear): def box_remove_all(self, part, clear):
@ -561,7 +561,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_box_remove_all(self.obj, if not elm_layout_box_remove_all(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
clear): clear):
raise RuntimeError("Could not remove all items from box") raise RuntimeError("Could not remove all items from box")
@ -604,7 +604,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_table_pack(self.obj, if not elm_layout_table_pack(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child_obj.obj, col, row, colspan, rowspan): child_obj.obj, col, row, colspan, rowspan):
raise RuntimeError("Could not pack an item to the table") raise RuntimeError("Could not pack an item to the table")
@ -632,7 +632,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(elm_layout_table_unpack(self.obj, return object_from_instance(elm_layout_table_unpack(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
child_obj.obj)) child_obj.obj))
def table_clear(self, part, clear): def table_clear(self, part, clear):
@ -663,7 +663,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if not elm_layout_table_clear(self.obj, if not elm_layout_table_clear(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
clear): clear):
raise RuntimeError("Could not clear the table") raise RuntimeError("Could not clear the table")
@ -728,7 +728,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
return _ctouni(elm_layout_data_get(self.obj, return _ctouni(elm_layout_data_get(self.obj,
<const_char *>key if key is not None else NULL)) <const char *>key if key is not None else NULL))
def sizing_eval(self): def sizing_eval(self):
"""sizing_eval() """sizing_eval()
@ -772,8 +772,8 @@ cdef class LayoutClass(Object):
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
if not elm_layout_part_cursor_set(self.obj, if not elm_layout_part_cursor_set(self.obj,
<const_char *>part_name if part_name is not None else NULL, <const char *>part_name if part_name is not None else NULL,
<const_char *>cursor if cursor is not None else NULL): <const char *>cursor if cursor is not None else NULL):
raise RuntimeError("Could not set cursor to part") raise RuntimeError("Could not set cursor to part")
def part_cursor_get(self, part_name): def part_cursor_get(self, part_name):
@ -789,7 +789,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
return _ctouni(elm_layout_part_cursor_get(self.obj, return _ctouni(elm_layout_part_cursor_get(self.obj,
<const_char *>part_name if part_name is not None else NULL)) <const char *>part_name if part_name is not None else NULL))
def part_cursor_unset(self, part_name): def part_cursor_unset(self, part_name):
"""part_cursor_unset(unicode part_name) -> bool """part_cursor_unset(unicode part_name) -> bool
@ -808,7 +808,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
if not elm_layout_part_cursor_unset(self.obj, if not elm_layout_part_cursor_unset(self.obj,
<const_char *>part_name if part_name is not None else NULL): <const char *>part_name if part_name is not None else NULL):
raise RuntimeError("Could not unset part cursor") raise RuntimeError("Could not unset part cursor")
def part_cursor_style_set(self, part_name, style): def part_cursor_style_set(self, part_name, style):
@ -830,8 +830,8 @@ cdef class LayoutClass(Object):
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
if not elm_layout_part_cursor_style_set(self.obj, if not elm_layout_part_cursor_style_set(self.obj,
<const_char *>part_name if part_name is not None else NULL, <const char *>part_name if part_name is not None else NULL,
<const_char *>style if style is not None else NULL): <const char *>style if style is not None else NULL):
raise RuntimeError("Could not set cursor style to part") raise RuntimeError("Could not set cursor style to part")
def part_cursor_style_get(self, part_name): def part_cursor_style_get(self, part_name):
@ -849,7 +849,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
return _ctouni(elm_layout_part_cursor_style_get(self.obj, return _ctouni(elm_layout_part_cursor_style_get(self.obj,
<const_char *>part_name if part_name is not None else NULL)) <const char *>part_name if part_name is not None else NULL))
def part_cursor_engine_only_set(self, part_name, engine_only): def part_cursor_engine_only_set(self, part_name, engine_only):
"""part_cursor_engine_only_set(unicode part_name, bool engine_only) -> bool """part_cursor_engine_only_set(unicode part_name, bool engine_only) -> bool
@ -880,7 +880,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
if not elm_layout_part_cursor_engine_only_set(self.obj, if not elm_layout_part_cursor_engine_only_set(self.obj,
<const_char *>part_name if part_name is not None else NULL, <const char *>part_name if part_name is not None else NULL,
engine_only): engine_only):
raise RuntimeError("Could not set cursor engine_only to part") raise RuntimeError("Could not set cursor engine_only to part")
@ -898,7 +898,7 @@ cdef class LayoutClass(Object):
""" """
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name) if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
return bool(elm_layout_part_cursor_engine_only_get(self.obj, return bool(elm_layout_part_cursor_engine_only_get(self.obj,
<const_char *>part_name if part_name is not None else NULL)) <const char *>part_name if part_name is not None else NULL))
property edje_object_can_access: property edje_object_can_access:
"""Set accessibility to all texblock(text) parts in the layout object """Set accessibility to all texblock(text) parts in the layout object

View File

@ -1,8 +1,7 @@
from efl.evas cimport Eina_Bool, Eina_List, Eina_Compare_Cb, \ from efl.evas cimport Eina_Bool, Eina_List, Eina_Compare_Cb, \
Evas_Object, const_Evas_Object, Evas_Smart_Cb, Evas_Coord Evas_Object, Evas_Smart_Cb, Evas_Coord
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from enums cimport Elm_List_Mode, Elm_Object_Select_Mode, Elm_Scroller_Policy from enums cimport Elm_List_Mode, Elm_Object_Select_Mode, Elm_Scroller_Policy
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_list_add(Evas_Object *parent) Evas_Object *elm_list_add(Evas_Object *parent)
@ -15,11 +14,11 @@ cdef extern from "Elementary.h":
Eina_Bool elm_list_horizontal_get(Evas_Object *obj) Eina_Bool elm_list_horizontal_get(Evas_Object *obj)
void elm_list_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode) void elm_list_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode)
Elm_Object_Select_Mode elm_list_select_mode_get(Evas_Object *obj) Elm_Object_Select_Mode elm_list_select_mode_get(Evas_Object *obj)
Elm_Object_Item *elm_list_item_append(Evas_Object *obj, const_char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_list_item_prepend(Evas_Object *obj, const_char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const_char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const_char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_list_item_sorted_insert(Evas_Object *obj, const_char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data, Eina_Compare_Cb cmp_func) Elm_Object_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, void *data, Eina_Compare_Cb cmp_func)
void elm_list_clear(Evas_Object *obj) void elm_list_clear(Evas_Object *obj)
Eina_List *elm_list_items_get(Evas_Object *obj) Eina_List *elm_list_items_get(Evas_Object *obj)
Elm_Object_Item *elm_list_selected_item_get(Evas_Object *obj) Elm_Object_Item *elm_list_selected_item_get(Evas_Object *obj)
@ -36,6 +35,6 @@ cdef extern from "Elementary.h":
Elm_Object_Item *elm_list_first_item_get(Evas_Object *obj) Elm_Object_Item *elm_list_first_item_get(Evas_Object *obj)
Elm_Object_Item *elm_list_last_item_get(Evas_Object *obj) Elm_Object_Item *elm_list_last_item_get(Evas_Object *obj)
Elm_Object_Item *elm_list_at_xy_item_get(const_Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret) Elm_Object_Item *elm_list_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret)
void elm_list_focus_on_selection_set(Evas_Object *obj, Eina_Bool enabled) void elm_list_focus_on_selection_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_list_focus_on_selection_get(const_Evas_Object *obj) Eina_Bool elm_list_focus_on_selection_get(const Evas_Object *obj)

View File

@ -291,7 +291,7 @@ cdef class ListItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_list_item_append(list.obj, item = elm_list_item_append(list.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.icon_obj, self.end_obj, self.icon_obj, self.end_obj,
cb, <void*>self) cb, <void*>self)
@ -327,7 +327,7 @@ cdef class ListItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_list_item_prepend( list.obj, item = elm_list_item_prepend( list.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.icon_obj, self.end_obj, self.icon_obj, self.end_obj,
cb, <void*>self) cb, <void*>self)
@ -365,7 +365,7 @@ cdef class ListItem(ObjectItem):
cdef List list = before.widget cdef List list = before.widget
item = elm_list_item_insert_before( list.obj, item = elm_list_item_insert_before( list.obj,
before.item, before.item,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.icon_obj, self.end_obj, self.icon_obj, self.end_obj,
cb, <void*>self) cb, <void*>self)
@ -403,7 +403,7 @@ cdef class ListItem(ObjectItem):
cdef List list = after.widget cdef List list = after.widget
item = elm_list_item_insert_after( list.obj, item = elm_list_item_insert_after( list.obj,
after.item, after.item,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.icon_obj, self.end_obj, self.icon_obj, self.end_obj,
cb, <void*>self) cb, <void*>self)
@ -443,7 +443,7 @@ cdef class ListItem(ObjectItem):
# cdef Elm_Object_Item *item # cdef Elm_Object_Item *item
# item = elm_list_item_sorted_insert(list.obj, # item = elm_list_item_sorted_insert(list.obj,
# <const_char *>self.label if self.label is not None else NULL, # <const char *>self.label if self.label is not None else NULL,
# icon_obj, # icon_obj,
# end_obj, # end_obj,
# cb, # cb,
@ -721,7 +721,7 @@ cdef class List(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_list_item_append(self.obj, item = elm_list_item_append(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
end.obj if end is not None else NULL, end.obj if end is not None else NULL,
cb, <void*>self) cb, <void*>self)
@ -751,7 +751,7 @@ cdef class List(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_list_item_prepend(self.obj, item = elm_list_item_prepend(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
end.obj if end is not None else NULL, end.obj if end is not None else NULL,
cb, <void*>self) cb, <void*>self)
@ -783,7 +783,7 @@ cdef class List(Object):
item = elm_list_item_insert_before(self.obj, item = elm_list_item_insert_before(self.obj,
before.item, before.item,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
end.obj if end is not None else NULL, end.obj if end is not None else NULL,
cb, <void*>self) cb, <void*>self)
@ -815,7 +815,7 @@ cdef class List(Object):
item = elm_list_item_insert_after(self.obj, item = elm_list_item_insert_after(self.obj,
after.item, after.item,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
end.obj if end is not None else NULL, end.obj if end is not None else NULL,
cb, <void*>self) cb, <void*>self)

View File

@ -1,7 +1,6 @@
from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, const_Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Coord
from enums cimport Elm_Map_Overlay_Type, Elm_Map_Route_Method, \ from enums cimport Elm_Map_Overlay_Type, Elm_Map_Route_Method, \
Elm_Map_Route_Type, Elm_Map_Source_Type, Elm_Map_Zoom_Mode Elm_Map_Route_Type, Elm_Map_Source_Type, Elm_Map_Zoom_Mode
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef void *Elm_Map_Overlay ctypedef void *Elm_Map_Overlay
@ -14,26 +13,26 @@ cdef extern from "Elementary.h":
Evas_Object *elm_map_add(Evas_Object *parent) Evas_Object *elm_map_add(Evas_Object *parent)
void elm_map_zoom_set(Evas_Object *obj, int zoom) void elm_map_zoom_set(Evas_Object *obj, int zoom)
int elm_map_zoom_get(const_Evas_Object *obj) int elm_map_zoom_get(const Evas_Object *obj)
void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode)
Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const_Evas_Object *obj) Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj)
void elm_map_zoom_min_set(Evas_Object *obj, int zoom) void elm_map_zoom_min_set(Evas_Object *obj, int zoom)
int elm_map_zoom_min_get(const_Evas_Object *obj) int elm_map_zoom_min_get(const Evas_Object *obj)
void elm_map_zoom_max_set(Evas_Object *obj, int zoom) void elm_map_zoom_max_set(Evas_Object *obj, int zoom)
int elm_map_zoom_max_get(const_Evas_Object *obj) int elm_map_zoom_max_get(const Evas_Object *obj)
void elm_map_region_get(const_Evas_Object *obj, double *lon, double *lat) void elm_map_region_get(const Evas_Object *obj, double *lon, double *lat)
void elm_map_region_bring_in(Evas_Object *obj, double lon, double lat) void elm_map_region_bring_in(Evas_Object *obj, double lon, double lat)
void elm_map_region_show(Evas_Object *obj, double lon, double lat) void elm_map_region_show(Evas_Object *obj, double lon, double lat)
void elm_map_canvas_to_region_convert(const_Evas_Object *obj, Evas_Coord x, Evas_Coord y, double *lon, double *lat) void elm_map_canvas_to_region_convert(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, double *lon, double *lat)
void elm_map_region_to_canvas_convert(const_Evas_Object *obj, double lon, double lat, Evas_Coord *x, Evas_Coord *y) void elm_map_region_to_canvas_convert(const Evas_Object *obj, double lon, double lat, Evas_Coord *x, Evas_Coord *y)
void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused)
Eina_Bool elm_map_paused_get(const_Evas_Object *obj) Eina_Bool elm_map_paused_get(const Evas_Object *obj)
void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy) void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy)
void elm_map_rotate_get(const_Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy) void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy)
void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_map_wheel_disabled_get(const_Evas_Object *obj) Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj)
void elm_map_user_agent_set(Evas_Object *obj, char *user_agent) void elm_map_user_agent_set(Evas_Object *obj, char *user_agent)
char *elm_map_user_agent_get(const_Evas_Object *obj) char *elm_map_user_agent_get(const Evas_Object *obj)
Eina_List *elm_map_overlays_get(Evas_Object *obj) Eina_List *elm_map_overlays_get(Evas_Object *obj)
Elm_Map_Overlay *elm_map_overlay_add(Evas_Object *obj, double lon, double lat) Elm_Map_Overlay *elm_map_overlay_add(Evas_Object *obj, double lon, double lat)
void elm_map_overlay_del(Elm_Map_Overlay *overlay) void elm_map_overlay_del(Elm_Map_Overlay *overlay)
@ -48,9 +47,9 @@ cdef extern from "Elementary.h":
Eina_Bool elm_map_overlay_paused_get(Elm_Map_Overlay *overlay) Eina_Bool elm_map_overlay_paused_get(Elm_Map_Overlay *overlay)
Eina_Bool elm_map_overlay_visible_get(Elm_Map_Overlay *overlay) Eina_Bool elm_map_overlay_visible_get(Elm_Map_Overlay *overlay)
void elm_map_overlay_content_set(Elm_Map_Overlay *overlay, Evas_Object *obj) void elm_map_overlay_content_set(Elm_Map_Overlay *overlay, Evas_Object *obj)
const_Evas_Object *elm_map_overlay_content_get(Elm_Map_Overlay *overlay) const Evas_Object *elm_map_overlay_content_get(Elm_Map_Overlay *overlay)
void elm_map_overlay_icon_set(Elm_Map_Overlay *overlay, Evas_Object *icon) void elm_map_overlay_icon_set(Elm_Map_Overlay *overlay, Evas_Object *icon)
const_Evas_Object *elm_map_overlay_icon_get(Elm_Map_Overlay *overlay) const Evas_Object *elm_map_overlay_icon_get(Elm_Map_Overlay *overlay)
void elm_map_overlay_region_set(Elm_Map_Overlay *overlay, double lon, double lat) void elm_map_overlay_region_set(Elm_Map_Overlay *overlay, double lon, double lat)
void elm_map_overlay_region_get(Elm_Map_Overlay *overlay, double *lon, double *lat) void elm_map_overlay_region_get(Elm_Map_Overlay *overlay, double *lon, double *lat)
void elm_map_overlay_color_set(Elm_Map_Overlay *overlay, int r, int g, int b, int a) void elm_map_overlay_color_set(Elm_Map_Overlay *overlay, int r, int g, int b, int a)
@ -75,17 +74,17 @@ cdef extern from "Elementary.h":
Elm_Map_Overlay *elm_map_overlay_circle_add(Evas_Object *obj, double lon, double lat, double radius) Elm_Map_Overlay *elm_map_overlay_circle_add(Evas_Object *obj, double lon, double lat, double radius)
Elm_Map_Overlay *elm_map_overlay_scale_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y) Elm_Map_Overlay *elm_map_overlay_scale_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
Elm_Map_Overlay *elm_map_overlay_route_add(Evas_Object *obj, Elm_Map_Route *route) Elm_Map_Overlay *elm_map_overlay_route_add(Evas_Object *obj, Elm_Map_Route *route)
void elm_map_tile_load_status_get(const_Evas_Object *obj, int *try_num, int *finish_num) void elm_map_tile_load_status_get(const Evas_Object *obj, int *try_num, int *finish_num)
const_char * *elm_map_sources_get(const_Evas_Object *obj, Elm_Map_Source_Type type) const char * *elm_map_sources_get(const Evas_Object *obj, Elm_Map_Source_Type type)
void elm_map_source_set(Evas_Object *obj, Elm_Map_Source_Type type, const_char *source_name) void elm_map_source_set(Evas_Object *obj, Elm_Map_Source_Type type, const char *source_name)
const_char * elm_map_source_get(const_Evas_Object *obj, Elm_Map_Source_Type type) const char * elm_map_source_get(const Evas_Object *obj, Elm_Map_Source_Type type)
Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, Elm_Map_Route_Cb route_cb, void *data) Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, Elm_Map_Route_Cb route_cb, void *data)
void elm_map_route_del(Elm_Map_Route *route) void elm_map_route_del(Elm_Map_Route *route)
double elm_map_route_distance_get(Elm_Map_Route *route) double elm_map_route_distance_get(Elm_Map_Route *route)
const_char * elm_map_route_node_get(Elm_Map_Route *route) const char * elm_map_route_node_get(Elm_Map_Route *route)
const_char * elm_map_route_waypoint_get(Elm_Map_Route *route) const char * elm_map_route_waypoint_get(Elm_Map_Route *route)
Elm_Map_Name *elm_map_name_add(const_Evas_Object *obj, const_char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data) Elm_Map_Name *elm_map_name_add(const Evas_Object *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data)
void elm_map_name_del(Elm_Map_Name *name) void elm_map_name_del(Elm_Map_Name *name)
const_char * elm_map_name_address_get(Elm_Map_Name *name) const char * elm_map_name_address_get(Elm_Map_Name *name)
void elm_map_name_region_get(Elm_Map_Name *name, double *lon, double *lat) void elm_map_name_region_get(Elm_Map_Name *name, double *lon, double *lat)

View File

@ -395,7 +395,7 @@ cdef class MapName(object):
data = (self, func, args, kwargs) data = (self, func, args, kwargs)
if isinstance(address, unicode): address = PyUnicode_AsUTF8String(address) if isinstance(address, unicode): address = PyUnicode_AsUTF8String(address)
self.name = elm_map_name_add(map.obj, self.name = elm_map_name_add(map.obj,
<const_char *>address if address is not None else NULL, <const char *>address if address is not None else NULL,
lon, lat, _map_name_callback, <void *>data) lon, lat, _map_name_callback, <void *>data)
Py_INCREF(data) Py_INCREF(data)
# XXX: why incref self in __init__? # XXX: why incref self in __init__?
@ -1228,13 +1228,13 @@ cdef class Map(Object):
if isinstance(user_agent, unicode): if isinstance(user_agent, unicode):
user_agent = PyUnicode_AsUTF8String(user_agent) user_agent = PyUnicode_AsUTF8String(user_agent)
elm_map_user_agent_set(self.obj, elm_map_user_agent_set(self.obj,
<const_char *>user_agent if user_agent is not None else NULL) <const char *>user_agent if user_agent is not None else NULL)
def user_agent_set(self, user_agent): def user_agent_set(self, user_agent):
if isinstance(user_agent, unicode): if isinstance(user_agent, unicode):
user_agent = PyUnicode_AsUTF8String(user_agent) user_agent = PyUnicode_AsUTF8String(user_agent)
elm_map_user_agent_set(self.obj, elm_map_user_agent_set(self.obj,
<const_char *>user_agent if user_agent is not None else NULL) <const char *>user_agent if user_agent is not None else NULL)
def user_agent_get(self): def user_agent_get(self):
return _ctouni(elm_map_user_agent_get(self.obj)) return _ctouni(elm_map_user_agent_get(self.obj))
@ -1493,7 +1493,7 @@ cdef class Map(Object):
.. seealso:: :py:func:`source_set`, :py:func:`source_get` .. seealso:: :py:func:`source_set`, :py:func:`source_get`
""" """
cdef const_char **lst cdef const char **lst
i = 0 i = 0
ret = [] ret = []
@ -1536,7 +1536,7 @@ cdef class Map(Object):
if isinstance(source_name, unicode): if isinstance(source_name, unicode):
source_name = PyUnicode_AsUTF8String(source_name) source_name = PyUnicode_AsUTF8String(source_name)
elm_map_source_set(self.obj, source_type, elm_map_source_set(self.obj, source_type,
<const_char *>source_name if source_name is not None else NULL) <const char *>source_name if source_name is not None else NULL)
def source_get(self, source_type): def source_get(self, source_type):
""" Get the name of currently used source for a specific type. """ Get the name of currently used source for a specific type.

View File

@ -1,14 +1,14 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_mapbuf_add(Evas_Object *parent) Evas_Object *elm_mapbuf_add(Evas_Object *parent)
void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled) void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_mapbuf_enabled_get(const_Evas_Object *obj) Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj)
void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth) void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth)
Eina_Bool elm_mapbuf_smooth_get(const_Evas_Object *obj) Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj)
void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha) void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha)
Eina_Bool elm_mapbuf_alpha_get(const_Evas_Object *obj) Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj)
void elm_mapbuf_auto_set(Evas_Object *obj, Eina_Bool on) void elm_mapbuf_auto_set(Evas_Object *obj, Eina_Bool on)
Eina_Bool elm_mapbuf_auto_get(const_Evas_Object *obj) Eina_Bool elm_mapbuf_auto_get(const Evas_Object *obj)
void elm_mapbuf_point_color_get(Evas_Object *obj, int idx, int *r, int *g, int *b, int *a) void elm_mapbuf_point_color_get(Evas_Object *obj, int idx, int *r, int *g, int *b, int *a)
void elm_mapbuf_point_color_set(Evas_Object *obj, int idx, int r, int g, int b, int a) void elm_mapbuf_point_color_set(Evas_Object *obj, int idx, int r, int g, int b, int a)

View File

@ -1,7 +1,7 @@
from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Coord, Evas_Smart_Cb from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Coord, \
Evas_Smart_Cb
from object cimport Object from object cimport Object
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_menu_add(Evas_Object *parent) Evas_Object *elm_menu_add(Evas_Object *parent)
@ -11,9 +11,9 @@ cdef extern from "Elementary.h":
void elm_menu_close(Evas_Object *obj) void elm_menu_close(Evas_Object *obj)
Eina_List *elm_menu_items_get(Evas_Object *obj) Eina_List *elm_menu_items_get(Evas_Object *obj)
Evas_Object *elm_menu_item_object_get(Elm_Object_Item *it) Evas_Object *elm_menu_item_object_get(Elm_Object_Item *it)
Elm_Object_Item *elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const_char *icon, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, void *data)
void elm_menu_item_icon_name_set(Elm_Object_Item *it, const_char *icon) void elm_menu_item_icon_name_set(Elm_Object_Item *it, const char *icon)
const_char * elm_menu_item_icon_name_get(Elm_Object_Item *it) const char * elm_menu_item_icon_name_get(Elm_Object_Item *it)
void elm_menu_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) void elm_menu_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
Eina_Bool elm_menu_item_selected_get(Elm_Object_Item *it) Eina_Bool elm_menu_item_selected_get(Elm_Object_Item *it)
Elm_Object_Item *elm_menu_item_separator_add(Evas_Object *obj, Elm_Object_Item *parent) Elm_Object_Item *elm_menu_item_separator_add(Evas_Object *obj, Elm_Object_Item *parent)

View File

@ -89,8 +89,8 @@ cdef class MenuItem(ObjectItem):
item = elm_menu_item_add(menu.obj, item = elm_menu_item_add(menu.obj,
self.parent.item if self.parent is not None else NULL, self.parent.item if self.parent is not None else NULL,
<const_char *>self.icon if self.icon is not None else NULL, <const char *>self.icon if self.icon is not None else NULL,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -128,12 +128,12 @@ cdef class MenuItem(ObjectItem):
def __set__(self, icon): def __set__(self, icon):
if isinstance(icon, unicode): icon = PyUnicode_AsUTF8String(icon) if isinstance(icon, unicode): icon = PyUnicode_AsUTF8String(icon)
elm_menu_item_icon_name_set(self.item, elm_menu_item_icon_name_set(self.item,
<const_char *>icon if icon is not None else NULL) <const char *>icon if icon is not None else NULL)
def icon_name_set(self, icon): def icon_name_set(self, icon):
if isinstance(icon, unicode): icon = PyUnicode_AsUTF8String(icon) if isinstance(icon, unicode): icon = PyUnicode_AsUTF8String(icon)
elm_menu_item_icon_name_set(self.item, elm_menu_item_icon_name_set(self.item,
<const_char *>icon if icon is not None else NULL) <const char *>icon if icon is not None else NULL)
def icon_name_get(self): def icon_name_get(self):
return _ctouni(elm_menu_item_icon_name_get(self.item)) return _ctouni(elm_menu_item_icon_name_get(self.item))
@ -391,8 +391,8 @@ cdef class Menu(Object):
item = elm_menu_item_add(self.obj, item = elm_menu_item_add(self.obj,
parent.item if parent is not None else NULL, parent.item if parent is not None else NULL,
<const_char *>icon if icon is not None else NULL, <const char *>icon if icon is not None else NULL,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:

View File

@ -1,32 +1,31 @@
from efl.evas cimport Eina_Bool, const_Eina_List, Evas_Object, const_Evas_Object, Evas_Smart_Cb from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb
from object_item cimport Elm_Object_Item, const_Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char, const_void
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_Object *obj, const_char *item_label, void *item_data, void *data) ctypedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_Object *obj, const char *item_label, void *item_data, void *data)
ctypedef char * (*Elm_Multibuttonentry_Format_Cb)(int count, void *data) ctypedef char * (*Elm_Multibuttonentry_Format_Cb)(int count, void *data)
Evas_Object *elm_multibuttonentry_add(Evas_Object *parent) Evas_Object *elm_multibuttonentry_add(Evas_Object *parent)
Evas_Object *elm_multibuttonentry_entry_get(const_Evas_Object *obj) Evas_Object *elm_multibuttonentry_entry_get(const Evas_Object *obj)
Eina_Bool elm_multibuttonentry_expanded_get(const_Evas_Object *obj) Eina_Bool elm_multibuttonentry_expanded_get(const Evas_Object *obj)
void elm_multibuttonentry_expanded_set(Evas_Object *obj, Eina_Bool expanded) void elm_multibuttonentry_expanded_set(Evas_Object *obj, Eina_Bool expanded)
Elm_Object_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Smart_Cb func, void *data)
Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const_char *label, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Smart_Cb func, void *data)
const_Eina_List *elm_multibuttonentry_items_get(const_Evas_Object *obj) const Eina_List *elm_multibuttonentry_items_get(const Evas_Object *obj)
Elm_Object_Item *elm_multibuttonentry_first_item_get(const_Evas_Object *obj) Elm_Object_Item *elm_multibuttonentry_first_item_get(const Evas_Object *obj)
Elm_Object_Item *elm_multibuttonentry_last_item_get(const_Evas_Object *obj) Elm_Object_Item *elm_multibuttonentry_last_item_get(const Evas_Object *obj)
Elm_Object_Item *elm_multibuttonentry_selected_item_get(const_Evas_Object *obj) Elm_Object_Item *elm_multibuttonentry_selected_item_get(const Evas_Object *obj)
void elm_multibuttonentry_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) void elm_multibuttonentry_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
Eina_Bool elm_multibuttonentry_item_selected_get(const_Elm_Object_Item *it) Eina_Bool elm_multibuttonentry_item_selected_get(const Elm_Object_Item *it)
void elm_multibuttonentry_clear(Evas_Object *obj) void elm_multibuttonentry_clear(Evas_Object *obj)
Elm_Object_Item *elm_multibuttonentry_item_prev_get(const_Elm_Object_Item *it) Elm_Object_Item *elm_multibuttonentry_item_prev_get(const Elm_Object_Item *it)
Elm_Object_Item *elm_multibuttonentry_item_next_get(const_Elm_Object_Item *it) Elm_Object_Item *elm_multibuttonentry_item_next_get(const Elm_Object_Item *it)
void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
# TODO: void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) # TODO: void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
void elm_multibuttonentry_editable_set(Evas_Object *obj, Eina_Bool editable) void elm_multibuttonentry_editable_set(Evas_Object *obj, Eina_Bool editable)
Eina_Bool elm_multibuttonentry_editable_get(const_Evas_Object *obj) Eina_Bool elm_multibuttonentry_editable_get(const Evas_Object *obj)
void elm_multibuttonentry_format_function_set(Evas_Object *obj, Elm_Multibuttonentry_Format_Cb f_func, const_void *data) void elm_multibuttonentry_format_function_set(Evas_Object *obj, Elm_Multibuttonentry_Format_Cb f_func, const void *data)

View File

@ -77,7 +77,7 @@ from object_item cimport _object_item_callback, _object_item_callback2, \
_object_item_to_python, _object_item_list_to_python _object_item_to_python, _object_item_list_to_python
cdef Eina_Bool _multibuttonentry_filter_callback(Evas_Object *obj, \ cdef Eina_Bool _multibuttonentry_filter_callback(Evas_Object *obj, \
const_char *item_label, void *item_data, void *data) with gil: const char *item_label, void *item_data, void *data) with gil:
cdef: cdef:
MultiButtonEntry mbe = object_from_instance(obj) MultiButtonEntry mbe = object_from_instance(obj)
@ -142,7 +142,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_multibuttonentry_item_append(mbe.obj, item = elm_multibuttonentry_item_append(mbe.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -160,7 +160,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_multibuttonentry_item_prepend(mbe.obj, item = elm_multibuttonentry_item_prepend(mbe.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -180,7 +180,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
item = elm_multibuttonentry_item_insert_before(mbe.obj, item = elm_multibuttonentry_item_insert_before(mbe.obj,
before.item, before.item,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -200,7 +200,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
item = elm_multibuttonentry_item_insert_after(mbe.obj, item = elm_multibuttonentry_item_insert_after(mbe.obj,
after.item, after.item,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
cb, <void*>self) cb, <void*>self)
if item == NULL: if item == NULL:
@ -289,7 +289,7 @@ cdef class MultiButtonEntry(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_multibuttonentry_item_prepend(self.obj, item = elm_multibuttonentry_item_prepend(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:
@ -313,7 +313,7 @@ cdef class MultiButtonEntry(Object):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_multibuttonentry_item_append(self.obj, item = elm_multibuttonentry_item_append(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:
@ -338,7 +338,7 @@ cdef class MultiButtonEntry(Object):
item = elm_multibuttonentry_item_insert_before(self.obj, item = elm_multibuttonentry_item_insert_before(self.obj,
before.item if before is not None else NULL, before.item if before is not None else NULL,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:
@ -363,7 +363,7 @@ cdef class MultiButtonEntry(Object):
item = elm_multibuttonentry_item_insert_after(self.obj, item = elm_multibuttonentry_item_insert_after(self.obj,
after.item if after is not None else NULL, after.item if after is not None else NULL,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
cb, <void*>ret) cb, <void*>ret)
if item != NULL: if item != NULL:

View File

@ -1,12 +1,11 @@
from efl.evas cimport Evas_Object, Eina_Bool, Eina_List from efl.evas cimport Evas_Object, Eina_Bool, Eina_List
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_naviframe_add(Evas_Object *parent) Evas_Object *elm_naviframe_add(Evas_Object *parent)
Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const_char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const_char *item_style) Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
Elm_Object_Item *elm_naviframe_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const_char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const_char *item_style) Elm_Object_Item *elm_naviframe_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
Elm_Object_Item *elm_naviframe_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const_char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const_char *item_style) Elm_Object_Item *elm_naviframe_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
Evas_Object *elm_naviframe_item_pop(Evas_Object *obj) Evas_Object *elm_naviframe_item_pop(Evas_Object *obj)
void elm_naviframe_item_pop_to(Elm_Object_Item *it) void elm_naviframe_item_pop_to(Elm_Object_Item *it)
void elm_naviframe_item_promote(Elm_Object_Item *it) void elm_naviframe_item_promote(Elm_Object_Item *it)
@ -14,8 +13,8 @@ cdef extern from "Elementary.h":
Eina_Bool elm_naviframe_content_preserve_on_pop_get(Evas_Object *obj) Eina_Bool elm_naviframe_content_preserve_on_pop_get(Evas_Object *obj)
Elm_Object_Item *elm_naviframe_top_item_get(Evas_Object *obj) Elm_Object_Item *elm_naviframe_top_item_get(Evas_Object *obj)
Elm_Object_Item *elm_naviframe_bottom_item_get(Evas_Object *obj) Elm_Object_Item *elm_naviframe_bottom_item_get(Evas_Object *obj)
void elm_naviframe_item_style_set(Elm_Object_Item *it, const_char *item_style) void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style)
const_char * elm_naviframe_item_style_get(Elm_Object_Item *it) const char * elm_naviframe_item_style_get(Elm_Object_Item *it)
void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible) void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible)
Eina_Bool elm_naviframe_item_title_visible_get(Elm_Object_Item *it) Eina_Bool elm_naviframe_item_title_visible_get(Elm_Object_Item *it)
void elm_naviframe_item_title_enabled_set(Elm_Object_Item *it, Eina_Bool enabled, Eina_Bool transition) void elm_naviframe_item_title_enabled_set(Elm_Object_Item *it, Eina_Bool enabled, Eina_Bool transition)

View File

@ -179,11 +179,11 @@ cdef class NaviframeItem(ObjectItem):
""" """
cdef Elm_Object_Item *item = elm_naviframe_item_push( cdef Elm_Object_Item *item = elm_naviframe_item_push(
naviframe.obj, naviframe.obj,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.prev_btn, self.prev_btn,
self.next_btn, self.next_btn,
self.item_content, self.item_content,
<const_char *>self.item_style if self.item_style is not None else NULL) <const char *>self.item_style if self.item_style is not None else NULL)
if item == NULL: if item == NULL:
raise RuntimeError("The item could not be added to the widget.") raise RuntimeError("The item could not be added to the widget.")
@ -218,11 +218,11 @@ cdef class NaviframeItem(ObjectItem):
item = elm_naviframe_item_insert_before( item = elm_naviframe_item_insert_before(
naviframe.obj, naviframe.obj,
before.item, before.item,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.prev_btn, self.prev_btn,
self.next_btn, self.next_btn,
self.item_content, self.item_content,
<const_char *>self.item_style if self.item_style is not None else NULL) <const char *>self.item_style if self.item_style is not None else NULL)
if item == NULL: if item == NULL:
raise RuntimeError("The item could not be added to the widget.") raise RuntimeError("The item could not be added to the widget.")
@ -257,11 +257,11 @@ cdef class NaviframeItem(ObjectItem):
item = elm_naviframe_item_insert_after( item = elm_naviframe_item_insert_after(
naviframe.obj, naviframe.obj,
after.item, after.item,
<const_char *>self.label if self.label is not None else NULL, <const char *>self.label if self.label is not None else NULL,
self.prev_btn, self.prev_btn,
self.next_btn, self.next_btn,
self.item_content, self.item_content,
<const_char *>self.item_style if self.item_style is not None else NULL) <const char *>self.item_style if self.item_style is not None else NULL)
if item == NULL: if item == NULL:
raise RuntimeError("The item could not be added to the widget.") raise RuntimeError("The item could not be added to the widget.")
@ -317,12 +317,12 @@ cdef class NaviframeItem(ObjectItem):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_naviframe_item_style_set(self.item, elm_naviframe_item_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def style_set(self, style): def style_set(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_naviframe_item_style_set(self.item, elm_naviframe_item_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def style_get(self): def style_get(self):
return _ctouni(elm_naviframe_item_style_get(self.item)) return _ctouni(elm_naviframe_item_style_get(self.item))

View File

@ -1,4 +1,4 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from enums cimport Elm_Notify_Orient from enums cimport Elm_Notify_Orient
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
@ -12,5 +12,5 @@ cdef extern from "Elementary.h":
void elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool repeat) void elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool repeat)
Eina_Bool elm_notify_allow_events_get(Evas_Object *obj) Eina_Bool elm_notify_allow_events_get(Evas_Object *obj)
void elm_notify_align_set(Evas_Object *obj, double horizontal, double vertical) void elm_notify_align_set(Evas_Object *obj, double horizontal, double vertical)
void elm_notify_align_get(const_Evas_Object *obj, double *horizontal, double *vertical) void elm_notify_align_get(const Evas_Object *obj, double *horizontal, double *vertical)

View File

@ -16,18 +16,16 @@
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
from cpython cimport PyObject, Py_INCREF, Py_DECREF from cpython cimport PyObject, Py_INCREF, Py_DECREF
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, \ from efl.evas cimport Eina_Bool, Eina_List, \
Evas_Object, const_Evas_Object, Evas_Smart_Cb, Evas_Coord Evas_Object, Evas_Smart_Cb, Evas_Coord
from efl.evas.enums cimport Evas_Callback_Type from efl.evas.enums cimport Evas_Callback_Type
from efl.evas cimport Object as evasObject from efl.evas cimport Object as evasObject
from efl.evas cimport Canvas as evasCanvas from efl.evas cimport Canvas as evasCanvas
from enums cimport Elm_Focus_Direction, Elm_Sel_Format, Elm_Sel_Type, \ from enums cimport Elm_Focus_Direction, Elm_Sel_Format, Elm_Sel_Type, \
Elm_Xdnd_Action Elm_Xdnd_Action
from libc.string cimport const_char
from libc.stdlib cimport const_void
cdef extern from "Edje.h": cdef extern from "Edje.h":
ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const_char *emission, const_char *source) ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const char *emission, const char *source)
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef struct Elm_Theme ctypedef struct Elm_Theme
@ -51,40 +49,40 @@ cdef extern from "Elementary.h":
ctypedef void (*Elm_Drag_Pos) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action) ctypedef void (*Elm_Drag_Pos) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action)
# Object handling (py3: DONE) # Object handling (py3: DONE)
void elm_object_part_text_set(Evas_Object *obj, const_char *part, const_char *label) void elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label)
void elm_object_text_set(Evas_Object *obj, const_char *label) void elm_object_text_set(Evas_Object *obj, const char *label)
const_char * elm_object_part_text_get(Evas_Object *obj, const_char *part) const char * elm_object_part_text_get(Evas_Object *obj, const char *part)
const_char * elm_object_text_get(Evas_Object *obj) const char * elm_object_text_get(Evas_Object *obj)
void elm_object_part_content_set(Evas_Object *obj, const_char *part, Evas_Object *icon) void elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *icon)
void elm_object_content_set(Evas_Object *obj, Evas_Object *icon) void elm_object_content_set(Evas_Object *obj, Evas_Object *icon)
Evas_Object *elm_object_part_content_get(Evas_Object *obj, const_char *part) Evas_Object *elm_object_part_content_get(Evas_Object *obj, const char *part)
Evas_Object *elm_object_content_get(Evas_Object *obj) Evas_Object *elm_object_content_get(Evas_Object *obj)
Evas_Object *elm_object_part_content_unset(Evas_Object *obj, const_char *part) Evas_Object *elm_object_part_content_unset(Evas_Object *obj, const char *part)
Evas_Object *elm_object_content_unset(Evas_Object *obj) Evas_Object *elm_object_content_unset(Evas_Object *obj)
void elm_object_access_info_set(Evas_Object *obj, const_char *txt) void elm_object_access_info_set(Evas_Object *obj, const char *txt)
Evas_Object *elm_object_name_find(Evas_Object *obj, const_char *name, int recurse) Evas_Object *elm_object_name_find(Evas_Object *obj, const char *name, int recurse)
void elm_object_style_set(Evas_Object *obj, const_char *style) void elm_object_style_set(Evas_Object *obj, const char *style)
const_char * elm_object_style_get(Evas_Object *obj) const char * elm_object_style_get(Evas_Object *obj)
void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_object_disabled_get(Evas_Object *obj) Eina_Bool elm_object_disabled_get(Evas_Object *obj)
Eina_Bool elm_object_widget_check(Evas_Object *obj) Eina_Bool elm_object_widget_check(Evas_Object *obj)
Evas_Object *elm_object_parent_widget_get(Evas_Object *obj) Evas_Object *elm_object_parent_widget_get(Evas_Object *obj)
Evas_Object *elm_object_top_widget_get(Evas_Object *obj) Evas_Object *elm_object_top_widget_get(Evas_Object *obj)
const_char * elm_object_widget_type_get(Evas_Object *obj) const char * elm_object_widget_type_get(Evas_Object *obj)
void elm_object_signal_emit(Evas_Object *obj, const_char *emission, const_char *source) void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source)
void elm_object_signal_callback_add(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func, void *data) void elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
void * elm_object_signal_callback_del(Evas_Object *obj, const_char *emission, const_char *source, Edje_Signal_Cb func) void * elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func)
void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const_void *data) void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data)
void * elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const_void *data) void * elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data)
void elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled) void elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Eina_Bool elm_object_orientation_mode_disabled_get(const_Evas_Object *obj) Eina_Bool elm_object_orientation_mode_disabled_get(const Evas_Object *obj)
# Object - Cursors (elm_cursor.h) (py3: DONE) # Object - Cursors (elm_cursor.h) (py3: DONE)
void elm_object_cursor_set(Evas_Object *obj, const_char *cursor) void elm_object_cursor_set(Evas_Object *obj, const char *cursor)
const_char * elm_object_cursor_get(Evas_Object *obj) const char * elm_object_cursor_get(Evas_Object *obj)
void elm_object_cursor_unset(Evas_Object *obj) void elm_object_cursor_unset(Evas_Object *obj)
void elm_object_cursor_style_set(Evas_Object *obj, const_char *style) void elm_object_cursor_style_set(Evas_Object *obj, const char *style)
const_char * elm_object_cursor_style_get(Evas_Object *obj) const char * elm_object_cursor_style_get(Evas_Object *obj)
void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search) void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search)
Eina_Bool elm_object_cursor_theme_search_enabled_get(Evas_Object *obj) Eina_Bool elm_object_cursor_theme_search_enabled_get(Evas_Object *obj)
@ -95,17 +93,17 @@ cdef extern from "Elementary.h":
Eina_Bool elm_object_focus_allow_get(Evas_Object *obj) Eina_Bool elm_object_focus_allow_get(Evas_Object *obj)
void elm_object_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs) void elm_object_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs)
void elm_object_focus_custom_chain_unset(Evas_Object *obj) void elm_object_focus_custom_chain_unset(Evas_Object *obj)
const_Eina_List * elm_object_focus_custom_chain_get(Evas_Object *obj) const Eina_List * elm_object_focus_custom_chain_get(Evas_Object *obj)
void elm_object_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) void elm_object_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child)
void elm_object_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) void elm_object_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child)
void elm_object_focus_next(Evas_Object *obj, Elm_Focus_Direction direction) void elm_object_focus_next(Evas_Object *obj, Elm_Focus_Direction direction)
Evas_Object * elm_object_focus_next_object_get(const_Evas_Object *obj, Elm_Focus_Direction dir) Evas_Object * elm_object_focus_next_object_get(const Evas_Object *obj, Elm_Focus_Direction dir)
void elm_object_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir) void elm_object_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir)
Evas_Object * elm_object_focused_object_get(const_Evas_Object *obj) Evas_Object * elm_object_focused_object_get(const Evas_Object *obj)
void elm_object_tree_focus_allow_set(Evas_Object *obj, Eina_Bool focusable) void elm_object_tree_focus_allow_set(Evas_Object *obj, Eina_Bool focusable)
Eina_Bool elm_object_tree_focus_allow_get(Evas_Object *obj) Eina_Bool elm_object_tree_focus_allow_get(Evas_Object *obj)
Eina_Bool elm_object_focus_highlight_style_set(Evas_Object *obj, const_char *style) Eina_Bool elm_object_focus_highlight_style_set(Evas_Object *obj, const char *style)
const_char * elm_object_focus_highlight_style_get(const_Evas_Object *obj) const char * elm_object_focus_highlight_style_get(const Evas_Object *obj)
# Object - Mirroring (elm_mirroring.h) # Object - Mirroring (elm_mirroring.h)
Eina_Bool elm_object_mirrored_get(Evas_Object *obj) Eina_Bool elm_object_mirrored_get(Evas_Object *obj)
@ -120,10 +118,10 @@ cdef extern from "Elementary.h":
# Object - Scrollhints (elm_scroll.h) # Object - Scrollhints (elm_scroll.h)
void elm_object_scroll_hold_push(Evas_Object *obj) void elm_object_scroll_hold_push(Evas_Object *obj)
void elm_object_scroll_hold_pop(Evas_Object *obj) void elm_object_scroll_hold_pop(Evas_Object *obj)
int elm_object_scroll_hold_get(const_Evas_Object *obj) int elm_object_scroll_hold_get(const Evas_Object *obj)
void elm_object_scroll_freeze_push(Evas_Object *obj) void elm_object_scroll_freeze_push(Evas_Object *obj)
void elm_object_scroll_freeze_pop(Evas_Object *obj) void elm_object_scroll_freeze_pop(Evas_Object *obj)
int elm_object_scroll_freeze_get(const_Evas_Object *obj) int elm_object_scroll_freeze_get(const Evas_Object *obj)
void elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock) void elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock)
void elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock) void elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock)
Eina_Bool elm_object_scroll_lock_x_get(Evas_Object *obj) Eina_Bool elm_object_scroll_lock_x_get(Evas_Object *obj)
@ -136,32 +134,32 @@ cdef extern from "Elementary.h":
# Object - Tooltips (elm_tooltip.h) (py3: DONE) # Object - Tooltips (elm_tooltip.h) (py3: DONE)
void elm_object_tooltip_show(Evas_Object *obj) void elm_object_tooltip_show(Evas_Object *obj)
void elm_object_tooltip_hide(Evas_Object *obj) void elm_object_tooltip_hide(Evas_Object *obj)
void elm_object_tooltip_text_set(Evas_Object *obj, const_char *text) void elm_object_tooltip_text_set(Evas_Object *obj, const char *text)
void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const_char *domain, const_char *text) void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text)
void elm_object_tooltip_translatable_text_set(Evas_Object *obj, const_char *text) void elm_object_tooltip_translatable_text_set(Evas_Object *obj, const char *text)
void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, void *data, Evas_Smart_Cb del_cb) void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, void *data, Evas_Smart_Cb del_cb)
void elm_object_tooltip_unset(Evas_Object *obj) void elm_object_tooltip_unset(Evas_Object *obj)
void elm_object_tooltip_style_set(Evas_Object *obj, const_char *style) void elm_object_tooltip_style_set(Evas_Object *obj, const char *style)
const_char * elm_object_tooltip_style_get(Evas_Object *obj) const char * elm_object_tooltip_style_get(Evas_Object *obj)
Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable) Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable)
Eina_Bool elm_object_tooltip_window_mode_get(Evas_Object *obj) Eina_Bool elm_object_tooltip_window_mode_get(Evas_Object *obj)
void elm_object_tooltip_move_freeze_push(Evas_Object *obj) void elm_object_tooltip_move_freeze_push(Evas_Object *obj)
void elm_object_tooltip_move_freeze_pop(Evas_Object *obj) void elm_object_tooltip_move_freeze_pop(Evas_Object *obj)
int elm_object_tooltip_move_freeze_get(const_Evas_Object *obj) int elm_object_tooltip_move_freeze_get(const Evas_Object *obj)
# Object - Translatable text (elm_general.h) (py3: DONE) # Object - Translatable text (elm_general.h) (py3: DONE)
void elm_object_domain_translatable_part_text_set(Evas_Object *obj, const_char *part, const_char *domain, const_char *text) void elm_object_domain_translatable_part_text_set(Evas_Object *obj, const char *part, const char *domain, const char *text)
void elm_object_domain_translatable_text_set(Evas_Object *obj, const_char *domain, const_char *text) void elm_object_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text)
void elm_object_translatable_text_set(Evas_Object *obj, const_char *text) void elm_object_translatable_text_set(Evas_Object *obj, const char *text)
void elm_object_translatable_part_text_set(Evas_Object *obj, const_char *part, const_char *text) void elm_object_translatable_part_text_set(Evas_Object *obj, const char *part, const char *text)
const_char * elm_object_translatable_part_text_get(const_Evas_Object *obj, const_char *part) const char * elm_object_translatable_part_text_get(const Evas_Object *obj, const char *part)
const_char * elm_object_translatable_text_get(Evas_Object *obj) const char * elm_object_translatable_text_get(Evas_Object *obj)
void elm_object_domain_part_text_translatable_set(Evas_Object *obj, const_char *part, const_char *domain, Eina_Bool translatable) void elm_object_domain_part_text_translatable_set(Evas_Object *obj, const char *part, const char *domain, Eina_Bool translatable)
void elm_object_part_text_translatable_set(Evas_Object *obj, const_char *part, Eina_Bool translatable) void elm_object_part_text_translatable_set(Evas_Object *obj, const char *part, Eina_Bool translatable)
void elm_object_domain_text_translatable_set(Evas_Object *obj, const_char *domain, Eina_Bool translatable) void elm_object_domain_text_translatable_set(Evas_Object *obj, const char *domain, Eina_Bool translatable)
# Access (elm_access.h) # Access (elm_access.h)
#TODO: Evas_Object * elm_access_object_get(const_Evas_Object *obj) #TODO: Evas_Object * elm_access_object_get(const Evas_Object *obj)
#TODO: void elm_access_highlight_set(Evas_Object* obj) #TODO: void elm_access_highlight_set(Evas_Object* obj)
#TODO: void elm_access_object_unregister(Evas_Object *obj) #TODO: void elm_access_object_unregister(Evas_Object *obj)

View File

@ -340,7 +340,7 @@ cdef Eina_Bool _event_callback(void *data, Evas_Object *o, \
return ret return ret
cdef void signal_callback(void *data, Evas_Object *obj, cdef void signal_callback(void *data, Evas_Object *obj,
const_char *emission, const_char *source) with gil: const char *emission, const char *source) with gil:
cdef Object self = object_from_instance(obj) cdef Object self = object_from_instance(obj)
lst = tuple(<object>data) lst = tuple(<object>data)
for func, args, kargs in lst: for func, args, kargs in lst:
@ -391,8 +391,8 @@ cdef class Object(evasObject):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_part_text_set(self.obj, elm_object_part_text_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def part_text_get(self, part): def part_text_get(self, part):
"""part_text_get(unicode part) -> unicode """part_text_get(unicode part) -> unicode
@ -409,7 +409,7 @@ cdef class Object(evasObject):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(elm_object_part_text_get(self.obj, return _ctouni(elm_object_part_text_get(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
property text: property text:
"""The main text for this object. """The main text for this object.
@ -423,12 +423,12 @@ cdef class Object(evasObject):
def __set__(self, text): def __set__(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_text_set(self.obj, elm_object_text_set(self.obj,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def text_set(self, text): def text_set(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_text_set(self.obj, elm_object_text_set(self.obj,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def text_get(self): def text_get(self):
return _ctouni(elm_object_text_get(self.obj)) return _ctouni(elm_object_text_get(self.obj))
@ -451,7 +451,7 @@ cdef class Object(evasObject):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
elm_object_part_content_set(self.obj, elm_object_part_content_set(self.obj,
<const_char *>part if part is not None else NULL, content.obj) <const char *>part if part is not None else NULL, content.obj)
def part_content_get(self, part): def part_content_get(self, part):
"""part_content_get(unicode part) -> evas.Object """part_content_get(unicode part) -> evas.Object
@ -468,7 +468,7 @@ cdef class Object(evasObject):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(elm_object_part_content_get(self.obj, return object_from_instance(elm_object_part_content_get(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def part_content_unset(self, part): def part_content_unset(self, part):
"""part_content_unset(unicode part) """part_content_unset(unicode part)
@ -484,7 +484,7 @@ cdef class Object(evasObject):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(elm_object_part_content_unset(self.obj, return object_from_instance(elm_object_part_content_unset(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
property content: property content:
"""Main content part for this object. """Main content part for this object.
@ -520,7 +520,7 @@ cdef class Object(evasObject):
# """ # """
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt) # if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
# elm_object_access_info_set(self.obj, # elm_object_access_info_set(self.obj,
# <const_char *>txt if txt is not None else NULL) # <const char *>txt if txt is not None else NULL)
def name_find(self, name not None, int recurse = 0): def name_find(self, name not None, int recurse = 0):
"""name_find(unicode name, int recurse = 0) -> evas.Object """name_find(unicode name, int recurse = 0) -> evas.Object
@ -548,7 +548,7 @@ cdef class Object(evasObject):
""" """
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
return object_from_instance(elm_object_name_find(self.obj, return object_from_instance(elm_object_name_find(self.obj,
<const_char *>name if name is not None else NULL, <const char *>name if name is not None else NULL,
recurse)) recurse))
property style: property style:
@ -563,12 +563,12 @@ cdef class Object(evasObject):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_style_set(self.obj, elm_object_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def style_set(self, style): def style_set(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_style_set(self.obj, elm_object_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def style_get(self): def style_get(self):
return _ctouni(elm_object_style_get(self.obj)) return _ctouni(elm_object_style_get(self.obj))
@ -679,8 +679,8 @@ cdef class Object(evasObject):
emission = PyUnicode_AsUTF8String(emission) emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
elm_object_signal_emit(self.obj, elm_object_signal_emit(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL) <const char *>source if source is not None else NULL)
def signal_callback_add(self, emission, source, func, *args, **kwargs): def signal_callback_add(self, emission, source, func, *args, **kwargs):
"""signal_callback_add(unicode emission, unicode source, func, *args, **kwargs) """signal_callback_add(unicode emission, unicode source, func, *args, **kwargs)
@ -708,8 +708,8 @@ cdef class Object(evasObject):
if isinstance(source, unicode): if isinstance(source, unicode):
source = PyUnicode_AsUTF8String(source) source = PyUnicode_AsUTF8String(source)
elm_object_signal_callback_add(self.obj, elm_object_signal_callback_add(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL, <const char *>source if source is not None else NULL,
signal_callback, <void*>lst) signal_callback, <void*>lst)
lst.append((func, args, kwargs)) lst.append((func, args, kwargs))
@ -757,8 +757,8 @@ cdef class Object(evasObject):
emission = PyUnicode_AsUTF8String(emission) emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
elm_object_signal_callback_del(self.obj, elm_object_signal_callback_del(self.obj,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL, <const char *>source if source is not None else NULL,
signal_callback) signal_callback)
# #
@ -899,7 +899,7 @@ cdef class Object(evasObject):
if isinstance(cursor, unicode): if isinstance(cursor, unicode):
cursor = PyUnicode_AsUTF8String(cursor) cursor = PyUnicode_AsUTF8String(cursor)
elm_object_cursor_set(self.obj, elm_object_cursor_set(self.obj,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def __del__(self): def __del__(self):
elm_object_cursor_unset(self.obj) elm_object_cursor_unset(self.obj)
@ -907,7 +907,7 @@ cdef class Object(evasObject):
def cursor_set(self, cursor): def cursor_set(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_object_cursor_set(self.obj, elm_object_cursor_set(self.obj,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def cursor_get(self): def cursor_get(self):
return _ctouni(elm_object_cursor_get(self.obj)) return _ctouni(elm_object_cursor_get(self.obj))
def cursor_unset(self): def cursor_unset(self):
@ -925,12 +925,12 @@ cdef class Object(evasObject):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_cursor_style_set(self.obj, elm_object_cursor_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def cursor_style_set(self, style=None): def cursor_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_cursor_style_set(self.obj, elm_object_cursor_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def cursor_style_get(self): def cursor_style_get(self):
return _ctouni(elm_object_cursor_style_get(self.obj)) return _ctouni(elm_object_cursor_style_get(self.obj))
@ -1164,14 +1164,14 @@ cdef class Object(evasObject):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_focus_highlight_style_set(self.obj, elm_object_focus_highlight_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def __get__(self): def __get__(self):
return elm_object_focus_highlight_style_get(self.obj) return elm_object_focus_highlight_style_get(self.obj)
def focus_highlight_style_set(self, style): def focus_highlight_style_set(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_focus_highlight_style_set(self.obj, elm_object_focus_highlight_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def focus_highlight_style_get(self): def focus_highlight_style_get(self):
return elm_object_focus_highlight_style_get(self.obj) return elm_object_focus_highlight_style_get(self.obj)
@ -1428,19 +1428,19 @@ cdef class Object(evasObject):
""" """
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_tooltip_text_set(self.obj, elm_object_tooltip_text_set(self.obj,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def tooltip_domain_translatable_text_set(self, domain, text): def tooltip_domain_translatable_text_set(self, domain, text):
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_tooltip_domain_translatable_text_set(self.obj, elm_object_tooltip_domain_translatable_text_set(self.obj,
<const_char *>domain if domain is not None else NULL, <const char *>domain if domain is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def tooltip_translatable_text_set(self, text): def tooltip_translatable_text_set(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_tooltip_translatable_text_set(self.obj, elm_object_tooltip_translatable_text_set(self.obj,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def tooltip_content_cb_set(self, func, *args, **kargs): def tooltip_content_cb_set(self, func, *args, **kargs):
"""tooltip_content_cb_set(func, *args, **kargs) """tooltip_content_cb_set(func, *args, **kargs)
@ -1493,12 +1493,12 @@ cdef class Object(evasObject):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_tooltip_style_set(self.obj, elm_object_tooltip_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def tooltip_style_set(self, style=None): def tooltip_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_tooltip_style_set(self.obj, elm_object_tooltip_style_set(self.obj,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def tooltip_style_get(self): def tooltip_style_get(self):
return _ctouni(elm_object_tooltip_style_get(self.obj)) return _ctouni(elm_object_tooltip_style_get(self.obj))
@ -1555,9 +1555,9 @@ cdef class Object(evasObject):
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_domain_translatable_part_text_set(self.obj, elm_object_domain_translatable_part_text_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>domain if domain is not None else NULL, <const char *>domain if domain is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def domain_translatable_part_text_set(self, part = None, domain = None, def domain_translatable_part_text_set(self, part = None, domain = None,
text = None): text = None):
@ -1590,9 +1590,9 @@ cdef class Object(evasObject):
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_domain_translatable_part_text_set(self.obj, elm_object_domain_translatable_part_text_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>domain if domain is not None else NULL, <const char *>domain if domain is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def domain_translatable_text_set(self, domain, text): def domain_translatable_text_set(self, domain, text):
@ -1604,8 +1604,8 @@ cdef class Object(evasObject):
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_domain_translatable_text_set(self.obj, elm_object_domain_translatable_text_set(self.obj,
<const_char *>domain if domain is not None else NULL, <const char *>domain if domain is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def translatable_part_text_set(self, part, text): def translatable_part_text_set(self, part, text):
"""translatable_part_text_set(part, text) """translatable_part_text_set(part, text)
@ -1616,15 +1616,15 @@ cdef class Object(evasObject):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_translatable_part_text_set(self.obj, elm_object_translatable_part_text_set(self.obj,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
@DEPRECATED("1.8", "Use :py:func:`translatable_part_text_get` instead.") @DEPRECATED("1.8", "Use :py:func:`translatable_part_text_get` instead.")
def translatable_text_part_get(self, part): def translatable_text_part_get(self, part):
"""translatable_text_part_get(part) -> unicode""" """translatable_text_part_get(part) -> unicode"""
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(elm_object_translatable_part_text_get(self.obj, return _ctouni(elm_object_translatable_part_text_get(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def translatable_part_text_get(self, part = None): def translatable_part_text_get(self, part = None):
@ -1649,7 +1649,7 @@ cdef class Object(evasObject):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(elm_object_translatable_part_text_get(self.obj, return _ctouni(elm_object_translatable_part_text_get(self.obj,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def domain_part_text_translatable_set(self, part not None, domain not None, def domain_part_text_translatable_set(self, part not None, domain not None,
bint translatable): bint translatable):
@ -1676,8 +1676,8 @@ cdef class Object(evasObject):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
elm_object_domain_part_text_translatable_set(self.obj, elm_object_domain_part_text_translatable_set(self.obj,
<const_char *>part, <const char *>part,
<const_char *>domain, <const char *>domain,
translatable) translatable)
def part_text_translatable_set(self, part, bint translatable): def part_text_translatable_set(self, part, bint translatable):
@ -1709,7 +1709,7 @@ cdef class Object(evasObject):
def translatable_text_set(self, text): def translatable_text_set(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_translatable_text_set(self.obj, elm_object_translatable_text_set(self.obj,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def translatable_text_get(self): def translatable_text_get(self):
return _ctouni(elm_object_translatable_text_get(self.obj)) return _ctouni(elm_object_translatable_text_get(self.obj))
@ -1756,7 +1756,7 @@ cdef class Object(evasObject):
if isinstance(event, unicode): event = PyUnicode_AsUTF8String(event) if isinstance(event, unicode): event = PyUnicode_AsUTF8String(event)
if not lst: if not lst:
evas_object_smart_callback_add(self.obj, evas_object_smart_callback_add(self.obj,
<const_char *>event if event is not None else NULL, <const char *>event if event is not None else NULL,
_object_callback, <void *>e) _object_callback, <void *>e)
lst.append((event_conv, func, args, kargs)) lst.append((event_conv, func, args, kargs))
@ -1800,7 +1800,7 @@ cdef class Object(evasObject):
self._elmcallbacks.pop(event) self._elmcallbacks.pop(event)
if isinstance(event, unicode): event = PyUnicode_AsUTF8String(event) if isinstance(event, unicode): event = PyUnicode_AsUTF8String(event)
evas_object_smart_callback_del(self.obj, evas_object_smart_callback_del(self.obj,
<const_char *>event if event is not None else NULL, <const char *>event if event is not None else NULL,
_object_callback) _object_callback)
def _callback_add(self, event, func, *args, **kargs): def _callback_add(self, event, func, *args, **kargs):
@ -1876,7 +1876,7 @@ cdef class Object(evasObject):
) )
PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE)
ret = elm_cnp_selection_set(self.obj, selection, format, ret = elm_cnp_selection_set(self.obj, selection, format,
<const_void *>view.buf, view.itemsize) <const void *>view.buf, view.itemsize)
PyBuffer_Release(&view) PyBuffer_Release(&view)
return ret return ret
@ -1944,7 +1944,7 @@ cdef class Object(evasObject):
self.cnp_selection_loss_cb = func self.cnp_selection_loss_cb = func
self.cnp_selection_loss_data = data self.cnp_selection_loss_data = data
elm_cnp_selection_loss_callback_set( elm_cnp_selection_loss_callback_set(
self.obj, selection, py_elm_selection_loss_cb, <const_void *>data) self.obj, selection, py_elm_selection_loss_cb, <const void *>data)
# #
# Drag n Drop # Drag n Drop
@ -2026,7 +2026,7 @@ cdef class Object(evasObject):
# """ # """
# if not elm_drag_start(Evas_Object *obj, format, # if not elm_drag_start(Evas_Object *obj, format,
# <const_char *>data, action, # <const char *>data, action,
# Elm_Drag_Icon_Create_Cb createicon, void *createdata, # Elm_Drag_Icon_Create_Cb createicon, void *createdata,
# Elm_Drag_Pos dragpos, void *dragdata, # Elm_Drag_Pos dragpos, void *dragdata,
# Elm_Drag_Accept acceptcb, void *acceptdata, # Elm_Drag_Accept acceptcb, void *acceptdata,

View File

@ -1,65 +1,62 @@
from efl.evas cimport Eina_Bool, const_Eina_List, Evas_Object, Evas_Smart_Cb, \ from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb, Eina_List
Eina_List, const_Eina_List
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef struct Elm_Object_Item ctypedef struct Elm_Object_Item
ctypedef Elm_Object_Item const_Elm_Object_Item "const Elm_Object_Item"
ctypedef Evas_Object *(*Elm_Tooltip_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip) ctypedef Evas_Object *(*Elm_Tooltip_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip)
ctypedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item) ctypedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item)
Evas_Object * elm_object_item_widget_get(Elm_Object_Item *it) Evas_Object * elm_object_item_widget_get(Elm_Object_Item *it)
void elm_object_item_part_content_set(Elm_Object_Item *it, const_char *part, Evas_Object* content) void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object* content)
void elm_object_item_content_set(Elm_Object_Item *it, Evas_Object* content) void elm_object_item_content_set(Elm_Object_Item *it, Evas_Object* content)
Evas_Object * elm_object_item_part_content_get(Elm_Object_Item *it, const_char *part) Evas_Object * elm_object_item_part_content_get(Elm_Object_Item *it, const char *part)
Evas_Object * elm_object_item_content_get(Elm_Object_Item *it) Evas_Object * elm_object_item_content_get(Elm_Object_Item *it)
Evas_Object * elm_object_item_part_content_unset(Elm_Object_Item *it, const_char *part) Evas_Object * elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part)
Evas_Object * elm_object_item_content_unset(Elm_Object_Item *it) Evas_Object * elm_object_item_content_unset(Elm_Object_Item *it)
void elm_object_item_part_text_set(Elm_Object_Item *item, const_char *part, const_char *label) void elm_object_item_part_text_set(Elm_Object_Item *item, const char *part, const char *label)
void elm_object_item_text_set(Elm_Object_Item *item, const_char *label) void elm_object_item_text_set(Elm_Object_Item *item, const char *label)
const_char * elm_object_item_part_text_get(Elm_Object_Item *item, const_char *part) const char * elm_object_item_part_text_get(Elm_Object_Item *item, const char *part)
const_char * elm_object_item_text_get(Elm_Object_Item *item) const char * elm_object_item_text_get(Elm_Object_Item *item)
void elm_object_item_domain_translatable_part_text_set(Elm_Object_Item *it, const_char *part, const_char *domain, const_char *text) void elm_object_item_domain_translatable_part_text_set(Elm_Object_Item *it, const char *part, const char *domain, const char *text)
const_char * elm_object_item_translatable_part_text_get(const_Elm_Object_Item *it, const_char *part) const char * elm_object_item_translatable_part_text_get(const Elm_Object_Item *it, const char *part)
void elm_object_item_domain_part_text_translatable_set(Elm_Object_Item *it, const_char *part, const_char *domain, Eina_Bool translatable) void elm_object_item_domain_part_text_translatable_set(Elm_Object_Item *it, const char *part, const char *domain, Eina_Bool translatable)
#TODO: void elm_object_item_access_info_set(Elm_Object_Item *it, const_char *txt) #TODO: void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
void * elm_object_item_data_get(Elm_Object_Item *item) void * elm_object_item_data_get(Elm_Object_Item *item)
void elm_object_item_data_set(Elm_Object_Item *item, void *data) void elm_object_item_data_set(Elm_Object_Item *item, void *data)
void elm_object_item_signal_emit(Elm_Object_Item *it, const_char *emission, const_char *source) void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled)
Eina_Bool elm_object_item_disabled_get(Elm_Object_Item *it) Eina_Bool elm_object_item_disabled_get(Elm_Object_Item *it)
void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb) void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb)
void elm_object_item_del(Elm_Object_Item *item) void elm_object_item_del(Elm_Object_Item *item)
void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const_char *text) void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text)
Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable) Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable)
Eina_Bool elm_object_item_tooltip_window_mode_get(Elm_Object_Item *it) Eina_Bool elm_object_item_tooltip_window_mode_get(Elm_Object_Item *it)
void elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, void *data, Evas_Smart_Cb del_cb) void elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, void *data, Evas_Smart_Cb del_cb)
void elm_object_item_tooltip_unset(Elm_Object_Item *it) void elm_object_item_tooltip_unset(Elm_Object_Item *it)
void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const_char *style) void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style)
const_char * elm_object_item_tooltip_style_get(Elm_Object_Item *it) const char * elm_object_item_tooltip_style_get(Elm_Object_Item *it)
void elm_object_item_cursor_set(Elm_Object_Item *it, const_char *cursor) void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor)
const_char * elm_object_item_cursor_get(Elm_Object_Item *it) const char * elm_object_item_cursor_get(Elm_Object_Item *it)
void elm_object_item_cursor_unset(Elm_Object_Item *it) void elm_object_item_cursor_unset(Elm_Object_Item *it)
void elm_object_item_cursor_style_set(Elm_Object_Item *it, const_char *style) void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style)
const_char * elm_object_item_cursor_style_get(Elm_Object_Item *it) const char * elm_object_item_cursor_style_get(Elm_Object_Item *it)
void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only)
Eina_Bool elm_object_item_cursor_engine_only_get(Elm_Object_Item *it) Eina_Bool elm_object_item_cursor_engine_only_get(Elm_Object_Item *it)
#TODO: Evas_Object * elm_object_item_access_register(Elm_Object_Item *item) #TODO: Evas_Object * elm_object_item_access_register(Elm_Object_Item *item)
#TODO: void elm_object_item_access_unregister(Elm_Object_Item *item) #TODO: void elm_object_item_access_unregister(Elm_Object_Item *item)
#TODO: Evas_Object * elm_object_item_access_object_get(const_Elm_Object_Item *item) #TODO: Evas_Object * elm_object_item_access_object_get(const Elm_Object_Item *item)
#TODO: void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs) #TODO: void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs)
#TODO: const_Eina_List *elm_object_item_access_order_get(const_Elm_Object_Item *item) #TODO: const Eina_List *elm_object_item_access_order_get(const Elm_Object_Item *item)
#TODO: void elm_object_item_access_order_unset(Elm_Object_Item *item) #TODO: void elm_object_item_access_order_unset(Elm_Object_Item *item)
cdef _object_item_to_python(Elm_Object_Item *it) cdef _object_item_to_python(Elm_Object_Item *it)
cdef Elm_Object_Item * _object_item_from_python(ObjectItem item) except NULL cdef Elm_Object_Item * _object_item_from_python(ObjectItem item) except NULL
cdef _object_item_list_to_python(const_Eina_List *lst) cdef _object_item_list_to_python(const Eina_List *lst)
cdef void _object_item_del_cb(void *data, Evas_Object *o, void *event_info) with gil cdef void _object_item_del_cb(void *data, Evas_Object *o, void *event_info) with gil
cdef void _object_item_callback(void *data, Evas_Object *obj, void *event_info) with gil cdef void _object_item_callback(void *data, Evas_Object *obj, void *event_info) with gil
cdef void _object_item_callback2(void *data, Evas_Object *obj, void *event_info) with gil cdef void _object_item_callback2(void *data, Evas_Object *obj, void *event_info) with gil

View File

@ -63,7 +63,7 @@ cdef _object_item_to_python(Elm_Object_Item *it):
return item return item
cdef _object_item_list_to_python(const_Eina_List *lst): cdef _object_item_list_to_python(const Eina_List *lst):
cdef Elm_Object_Item *it cdef Elm_Object_Item *it
ret = [] ret = []
while lst: while lst:
@ -204,7 +204,7 @@ cdef class ObjectItem(object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
elm_object_item_part_content_set(self.item, elm_object_item_part_content_set(self.item,
<const_char *>part if part is not None else NULL, content.obj) <const char *>part if part is not None else NULL, content.obj)
def part_content_get(self, part): def part_content_get(self, part):
"""part_content_get(unicode part) -> Object """part_content_get(unicode part) -> Object
@ -222,7 +222,7 @@ cdef class ObjectItem(object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(elm_object_item_part_content_get(self.item, return object_from_instance(elm_object_item_part_content_get(self.item,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def part_content_unset(self, part): def part_content_unset(self, part):
"""part_content_unset(unicode part) """part_content_unset(unicode part)
@ -238,7 +238,7 @@ cdef class ObjectItem(object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return object_from_instance(elm_object_item_part_content_unset(self.item, return object_from_instance(elm_object_item_part_content_unset(self.item,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
property content: property content:
"""The default content part of this ObjectItem.""" """The default content part of this ObjectItem."""
@ -274,8 +274,8 @@ cdef class ObjectItem(object):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_item_part_text_set(self.item, elm_object_item_part_text_set(self.item,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def part_text_get(self, part): def part_text_get(self, part):
"""part_text_set(unicode part) -> unicode text """part_text_set(unicode part) -> unicode text
@ -292,7 +292,7 @@ cdef class ObjectItem(object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(elm_object_item_part_text_get(self.item, return _ctouni(elm_object_item_part_text_get(self.item,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def domain_translatable_part_text_set(self, part = None, domain = None, text = None): def domain_translatable_part_text_set(self, part = None, domain = None, text = None):
"""domain_translatable_part_text_set(part = None, domain = None, text = None) """domain_translatable_part_text_set(part = None, domain = None, text = None)
@ -322,9 +322,9 @@ cdef class ObjectItem(object):
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_item_domain_translatable_part_text_set(self.item, elm_object_item_domain_translatable_part_text_set(self.item,
<const_char *>part if part is not None else NULL, <const char *>part if part is not None else NULL,
<const_char *>domain if domain is not None else NULL, <const char *>domain if domain is not None else NULL,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def translatable_part_text_get(self, part = None): def translatable_part_text_get(self, part = None):
"""translatable_part_text_get(part = None) """translatable_part_text_get(part = None)
@ -344,7 +344,7 @@ cdef class ObjectItem(object):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return _ctouni(elm_object_item_translatable_part_text_get(self.item, return _ctouni(elm_object_item_translatable_part_text_get(self.item,
<const_char *>part if part is not None else NULL)) <const char *>part if part is not None else NULL))
def domain_part_text_translatable_set(self, part not None, domain not None, bint translatable): def domain_part_text_translatable_set(self, part not None, domain not None, bint translatable):
"""domain_part_text_translatable_set(self, part, domain, bool translatable) """domain_part_text_translatable_set(self, part, domain, bool translatable)
@ -372,8 +372,8 @@ cdef class ObjectItem(object):
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain) if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
elm_object_item_domain_part_text_translatable_set(self.item, elm_object_item_domain_part_text_translatable_set(self.item,
<const_char *>part, <const char *>part,
<const_char *>domain, <const char *>domain,
translatable) translatable)
property text: property text:
@ -388,12 +388,12 @@ cdef class ObjectItem(object):
def __set__(self, text): def __set__(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_item_text_set(self.item, elm_object_item_text_set(self.item,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def text_set(self, text): def text_set(self, text):
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_item_text_set(self.item, elm_object_item_text_set(self.item,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
def text_get(self): def text_get(self):
return _ctouni(elm_object_item_text_get(self.item)) return _ctouni(elm_object_item_text_get(self.item))
@ -407,12 +407,12 @@ cdef class ObjectItem(object):
# def __set__(self, txt): # def __set__(self, txt):
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt) # if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
# elm_object_item_access_info_set(self.item, # elm_object_item_access_info_set(self.item,
# <const_char *>txt if txt is not None else NULL) # <const char *>txt if txt is not None else NULL)
# def access_info_set(self, txt): # def access_info_set(self, txt):
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt) # if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
# elm_object_item_access_info_set(self.item, # elm_object_item_access_info_set(self.item,
# <const_char *>txt if txt is not None else NULL) # <const char *>txt if txt is not None else NULL)
def signal_emit(self, emission, source): def signal_emit(self, emission, source):
"""signal_emit(unicode emission, unicode source) """signal_emit(unicode emission, unicode source)
@ -432,8 +432,8 @@ cdef class ObjectItem(object):
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission) if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source) if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
elm_object_item_signal_emit(self.item, elm_object_item_signal_emit(self.item,
<const_char *>emission if emission is not None else NULL, <const char *>emission if emission is not None else NULL,
<const_char *>source if source is not None else NULL) <const char *>source if source is not None else NULL)
property disabled: property disabled:
"""The disabled state of an widget item. """The disabled state of an widget item.
@ -484,7 +484,7 @@ cdef class ObjectItem(object):
""" """
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text) if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
elm_object_item_tooltip_text_set(self.item, elm_object_item_tooltip_text_set(self.item,
<const_char *>text if text is not None else NULL) <const char *>text if text is not None else NULL)
property tooltip_window_mode: property tooltip_window_mode:
# TODO: document this # TODO: document this
@ -555,7 +555,7 @@ cdef class ObjectItem(object):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_item_tooltip_style_set(self.item, elm_object_item_tooltip_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_object_item_tooltip_style_get(self.item)) return _ctouni(elm_object_item_tooltip_style_get(self.item))
@ -566,7 +566,7 @@ cdef class ObjectItem(object):
def tooltip_style_set(self, style=None): def tooltip_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_item_tooltip_style_set(self.item, elm_object_item_tooltip_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def tooltip_style_get(self): def tooltip_style_get(self):
return _ctouni(elm_object_item_tooltip_style_get(self.item)) return _ctouni(elm_object_item_tooltip_style_get(self.item))
@ -579,7 +579,7 @@ cdef class ObjectItem(object):
def __set__(self, cursor): def __set__(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_object_item_cursor_set(self.item, elm_object_item_cursor_set(self.item,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_object_item_cursor_get(self.item)) return _ctouni(elm_object_item_cursor_get(self.item))
@ -590,7 +590,7 @@ cdef class ObjectItem(object):
def cursor_set(self, cursor): def cursor_set(self, cursor):
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor) if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
elm_object_item_cursor_set(self.item, elm_object_item_cursor_set(self.item,
<const_char *>cursor if cursor is not None else NULL) <const char *>cursor if cursor is not None else NULL)
def cursor_get(self): def cursor_get(self):
return _ctouni(elm_object_item_cursor_get(self.item)) return _ctouni(elm_object_item_cursor_get(self.item))
def cursor_unset(self): def cursor_unset(self):
@ -606,7 +606,7 @@ cdef class ObjectItem(object):
def __set__(self, style): def __set__(self, style):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_item_cursor_style_set(self.item, elm_object_item_cursor_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_object_item_cursor_style_get(self.item)) return _ctouni(elm_object_item_cursor_style_get(self.item))
@ -617,7 +617,7 @@ cdef class ObjectItem(object):
def cursor_style_set(self, style=None): def cursor_style_set(self, style=None):
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style) if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
elm_object_item_cursor_style_set(self.item, elm_object_item_cursor_style_set(self.item,
<const_char *>style if style is not None else NULL) <const char *>style if style is not None else NULL)
def cursor_style_get(self): def cursor_style_get(self):
return _ctouni(elm_object_item_cursor_style_get(self.item)) return _ctouni(elm_object_item_cursor_style_get(self.item))

View File

@ -1,10 +1,9 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_photo_add(Evas_Object *parent) Evas_Object *elm_photo_add(Evas_Object *parent)
Eina_Bool elm_photo_file_set(Evas_Object *obj, const_char *file) Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file)
void elm_photo_thumb_set(Evas_Object *obj, const_char *file, const_char *group) void elm_photo_thumb_set(Evas_Object *obj, const char *file, const char *group)
void elm_photo_size_set(Evas_Object *obj, int size) void elm_photo_size_set(Evas_Object *obj, int size)
void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill) void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill)
void elm_photo_editable_set(Evas_Object *obj, Eina_Bool editable) void elm_photo_editable_set(Evas_Object *obj, Eina_Bool editable)

View File

@ -69,13 +69,13 @@ cdef class Photo(Object):
def __set__(self, filename): def __set__(self, filename):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if not elm_photo_file_set(self.obj, if not elm_photo_file_set(self.obj,
<const_char *>filename if filename is not None else NULL): <const char *>filename if filename is not None else NULL):
raise RuntimeError("Could not set file.") raise RuntimeError("Could not set file.")
def file_set(self, filename): def file_set(self, filename):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if not elm_photo_file_set(self.obj, if not elm_photo_file_set(self.obj,
<const_char *>filename if filename is not None else NULL): <const char *>filename if filename is not None else NULL):
raise RuntimeError("Could not set file.") raise RuntimeError("Could not set file.")
property thumb: property thumb:
@ -93,15 +93,15 @@ cdef class Photo(Object):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
elm_photo_thumb_set(self.obj, elm_photo_thumb_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL) <const char *>group if group is not None else NULL)
def thumb_set(self, filename, group = None): def thumb_set(self, filename, group = None):
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename) if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group) if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
elm_photo_thumb_set(self.obj, elm_photo_thumb_set(self.obj,
<const_char *>filename if filename is not None else NULL, <const char *>filename if filename is not None else NULL,
<const_char *>group if group is not None else NULL) <const char *>group if group is not None else NULL)
property size: property size:
"""Set the size that will be used on the photo. """Set the size that will be used on the photo.

View File

@ -1,7 +1,6 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from efl.evas.enums cimport Evas_Load_Error from efl.evas.enums cimport Evas_Load_Error
from enums cimport Elm_Photocam_Zoom_Mode from enums cimport Elm_Photocam_Zoom_Mode
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
ctypedef struct Elm_Photocam_Progress: ctypedef struct Elm_Photocam_Progress:
@ -13,8 +12,8 @@ cdef extern from "Elementary.h":
Eina_Bool open_error Eina_Bool open_error
Evas_Object *elm_photocam_add(Evas_Object *parent) Evas_Object *elm_photocam_add(Evas_Object *parent)
Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const_char *file) Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file)
const_char * elm_photocam_file_get(Evas_Object *obj) const char * elm_photocam_file_get(Evas_Object *obj)
void elm_photocam_zoom_set(Evas_Object *obj, double zoom) void elm_photocam_zoom_set(Evas_Object *obj, double zoom)
double elm_photocam_zoom_get(Evas_Object *obj) double elm_photocam_zoom_get(Evas_Object *obj)
void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode) void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode)

View File

@ -194,7 +194,7 @@ cdef class Photocam(Object):
if isinstance(filename, unicode): if isinstance(filename, unicode):
filename = PyUnicode_AsUTF8String(filename) filename = PyUnicode_AsUTF8String(filename)
if elm_photocam_file_set(self.obj, if elm_photocam_file_set(self.obj,
<const_char *>filename if filename is not None else NULL) != 0: <const char *>filename if filename is not None else NULL) != 0:
raise RuntimeError("Could not set file") raise RuntimeError("Could not set file")
def __get__(self): def __get__(self):
@ -205,7 +205,7 @@ cdef class Photocam(Object):
if isinstance(filename, unicode): if isinstance(filename, unicode):
filename = PyUnicode_AsUTF8String(filename) filename = PyUnicode_AsUTF8String(filename)
if elm_photocam_file_set(self.obj, if elm_photocam_file_set(self.obj,
<const_char *>filename if filename is not None else NULL) != 0: <const char *>filename if filename is not None else NULL) != 0:
raise RuntimeError("Could not set file") raise RuntimeError("Could not set file")
def file_get(self): def file_get(self):
return _ctouni(elm_photocam_file_get(self.obj)) return _ctouni(elm_photocam_file_get(self.obj))

View File

@ -1,7 +1,6 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_plug_add(Evas_Object *parent) Evas_Object *elm_plug_add(Evas_Object *parent)
Eina_Bool elm_plug_connect(Evas_Object *obj, const_char *svcname, int svcnum, Eina_Bool svcsys) Eina_Bool elm_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys)
Evas_Object *elm_plug_image_object_get(Evas_Object *obj) Evas_Object *elm_plug_image_object_get(Evas_Object *obj)

View File

@ -82,7 +82,7 @@ cdef class Plug(Object):
""" """
if isinstance(svcname, unicode): svcname = PyUnicode_AsUTF8String(svcname) if isinstance(svcname, unicode): svcname = PyUnicode_AsUTF8String(svcname)
if not elm_plug_connect(self.obj, if not elm_plug_connect(self.obj,
<const_char *>svcname if svcname is not None else NULL, <const char *>svcname if svcname is not None else NULL,
svcnum, svcsys): svcnum, svcsys):
raise RuntimeError raise RuntimeError

View File

@ -1,11 +1,10 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from enums cimport Elm_Wrap_Type, Elm_Popup_Orient from enums cimport Elm_Wrap_Type, Elm_Popup_Orient
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_popup_add(Evas_Object *parent) Evas_Object *elm_popup_add(Evas_Object *parent)
Elm_Object_Item *elm_popup_item_append(Evas_Object *obj, const_char *label, Evas_Object *icon, Evas_Smart_Cb func, void *data) Elm_Object_Item *elm_popup_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, void *data)
void elm_popup_content_text_wrap_type_set(Evas_Object *obj, Elm_Wrap_Type wrap) void elm_popup_content_text_wrap_type_set(Evas_Object *obj, Elm_Wrap_Type wrap)
Elm_Wrap_Type elm_popup_content_text_wrap_type_get(Evas_Object *obj) Elm_Wrap_Type elm_popup_content_text_wrap_type_get(Evas_Object *obj)
void elm_popup_orient_set(Evas_Object *obj, Elm_Popup_Orient orient) void elm_popup_orient_set(Evas_Object *obj, Elm_Popup_Orient orient)

View File

@ -249,7 +249,7 @@ cdef class PopupItem(ObjectItem):
cb = _object_item_callback2 cb = _object_item_callback2
item = elm_popup_item_append(popup.obj, item = elm_popup_item_append(popup.obj,
<const_char *>self.label if not None else NULL, <const char *>self.label if not None else NULL,
self.icon.obj if not None else NULL, self.icon.obj if not None else NULL,
cb, <void *>self) cb, <void *>self)
@ -318,7 +318,7 @@ cdef class Popup(LayoutClass):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_popup_item_append(self.obj, item = elm_popup_item_append(self.obj,
<const_char *>label if label is not None else NULL, <const char *>label if label is not None else NULL,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
cb, <void*>ret) cb, <void*>ret)

View File

@ -1,5 +1,4 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_progressbar_add(Evas_Object *parent) Evas_Object *elm_progressbar_add(Evas_Object *parent)
@ -8,12 +7,12 @@ cdef extern from "Elementary.h":
void elm_progressbar_pulse(Evas_Object *obj, Eina_Bool state) void elm_progressbar_pulse(Evas_Object *obj, Eina_Bool state)
void elm_progressbar_value_set(Evas_Object *obj, double val) void elm_progressbar_value_set(Evas_Object *obj, double val)
double elm_progressbar_value_get(Evas_Object *obj) double elm_progressbar_value_get(Evas_Object *obj)
void elm_progressbar_part_value_set(Evas_Object *obj, const_char *part, double val) void elm_progressbar_part_value_set(Evas_Object *obj, const char *part, double val)
double elm_progressbar_part_value_get(const_Evas_Object *obj, const_char *part) double elm_progressbar_part_value_get(const Evas_Object *obj, const char *part)
void elm_progressbar_span_size_set(Evas_Object *obj, Evas_Coord size) void elm_progressbar_span_size_set(Evas_Object *obj, Evas_Coord size)
Evas_Coord elm_progressbar_span_size_get(Evas_Object *obj) Evas_Coord elm_progressbar_span_size_get(Evas_Object *obj)
void elm_progressbar_unit_format_set(Evas_Object *obj, const_char *format) void elm_progressbar_unit_format_set(Evas_Object *obj, const char *format)
const_char * elm_progressbar_unit_format_get(Evas_Object *obj) const char * elm_progressbar_unit_format_get(Evas_Object *obj)
void elm_progressbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) void elm_progressbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
Eina_Bool elm_progressbar_horizontal_get(Evas_Object *obj) Eina_Bool elm_progressbar_horizontal_get(Evas_Object *obj)
void elm_progressbar_inverted_set(Evas_Object *obj, Eina_Bool inverted) void elm_progressbar_inverted_set(Evas_Object *obj, Eina_Bool inverted)

View File

@ -167,7 +167,7 @@ cdef class Progressbar(LayoutClass):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
return elm_progressbar_part_value_get(self.obj, <const_char *>part) return elm_progressbar_part_value_get(self.obj, <const char *>part)
def part_value_set(self, part not None, double value): def part_value_set(self, part not None, double value):
"""part_value_set(part, int value) """part_value_set(part, int value)
@ -180,7 +180,7 @@ cdef class Progressbar(LayoutClass):
""" """
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
elm_progressbar_part_value_set(self.obj, <const_char *>part, value) elm_progressbar_part_value_set(self.obj, <const char *>part, value)
property span_size: property span_size:
"""The (exact) length of the bar region of a given progress bar widget. """The (exact) length of the bar region of a given progress bar widget.
@ -231,12 +231,12 @@ cdef class Progressbar(LayoutClass):
def __set__(self, unit_format): def __set__(self, unit_format):
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format) if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
elm_progressbar_unit_format_set(self.obj, elm_progressbar_unit_format_set(self.obj,
<const_char *>unit_format if unit_format is not None else NULL) <const char *>unit_format if unit_format is not None else NULL)
def unit_format_set(self, unit_format): def unit_format_set(self, unit_format):
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format) if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
elm_progressbar_unit_format_set(self.obj, elm_progressbar_unit_format_set(self.obj,
<const_char *>unit_format if unit_format is not None else NULL) <const char *>unit_format if unit_format is not None else NULL)
def unit_format_get(self): def unit_format_get(self):
return _ctouni(elm_progressbar_unit_format_get(self.obj)) return _ctouni(elm_progressbar_unit_format_get(self.obj))

View File

@ -1,30 +1,29 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord, const_Evas_Object from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from enums cimport Elm_Scroller_Policy, Elm_Scroller_Single_Direction, \ from enums cimport Elm_Scroller_Policy, Elm_Scroller_Single_Direction, \
Elm_Scroller_Movement_Block Elm_Scroller_Movement_Block
from libc.string cimport const_char
from object cimport Object from object cimport Object
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_scroller_add(Evas_Object *parent) Evas_Object *elm_scroller_add(Evas_Object *parent)
void elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const_char *widget, const_char *base) void elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base)
void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h) void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h)
void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
void elm_scroller_policy_get(Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) void elm_scroller_policy_get(Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
void elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir) void elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir)
Elm_Scroller_Single_Direction elm_scroller_single_direction_get(const_Evas_Object *obj) Elm_Scroller_Single_Direction elm_scroller_single_direction_get(const Evas_Object *obj)
void elm_scroller_region_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) void elm_scroller_region_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
void elm_scroller_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) void elm_scroller_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
void elm_scroller_page_snap_set(Evas_Object *obj, Eina_Bool page_h_snap, Eina_Bool page_v_snap) void elm_scroller_page_snap_set(Evas_Object *obj, Eina_Bool page_h_snap, Eina_Bool page_v_snap)
void elm_scroller_page_snap_get(const_Evas_Object *obj, Eina_Bool *page_h_snap, Eina_Bool *page_v_snap) void elm_scroller_page_snap_get(const Evas_Object *obj, Eina_Bool *page_h_snap, Eina_Bool *page_v_snap)
void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
void elm_scroller_bounce_get(Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) void elm_scroller_bounce_get(Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel)
void elm_scroller_page_relative_get(Evas_Object *obj, double *h_pagerel, double *v_pagerel) void elm_scroller_page_relative_get(Evas_Object *obj, double *h_pagerel, double *v_pagerel)
void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize) void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
void elm_scroller_page_size_get(const_Evas_Object *obj, Evas_Coord *h_pagesize, Evas_Coord *v_pagesize) void elm_scroller_page_size_get(const Evas_Object *obj, Evas_Coord *h_pagesize, Evas_Coord *v_pagesize)
void elm_scroller_page_scroll_limit_set(const_Evas_Object *obj, Evas_Coord page_limit_h, Evas_Coord page_limit_v) void elm_scroller_page_scroll_limit_set(const Evas_Object *obj, Evas_Coord page_limit_h, Evas_Coord page_limit_v)
void elm_scroller_page_scroll_limit_get(const_Evas_Object *obj, Evas_Coord *page_limit_h, Evas_Coord *page_limit_v) void elm_scroller_page_scroll_limit_get(const Evas_Object *obj, Evas_Coord *page_limit_h, Evas_Coord *page_limit_v)
void elm_scroller_current_page_get(Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) void elm_scroller_current_page_get(Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
void elm_scroller_last_page_get(Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) void elm_scroller_last_page_get(Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber) void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber)
@ -35,7 +34,7 @@ cdef extern from "Elementary.h":
void elm_scroller_gravity_set(Evas_Object *obj, double x, double y) void elm_scroller_gravity_set(Evas_Object *obj, double x, double y)
void elm_scroller_gravity_get(Evas_Object *obj, double *x, double *y) void elm_scroller_gravity_get(Evas_Object *obj, double *x, double *y)
void elm_scroller_movement_block_set(Evas_Object *obj, Elm_Scroller_Movement_Block block) void elm_scroller_movement_block_set(Evas_Object *obj, Elm_Scroller_Movement_Block block)
Elm_Scroller_Movement_Block elm_scroller_movement_block_get(const_Evas_Object *obj) Elm_Scroller_Movement_Block elm_scroller_movement_block_get(const Evas_Object *obj)
cdef class Scrollable(Object): cdef class Scrollable(Object):
pass pass

View File

@ -142,8 +142,7 @@ Type that blocks the scroll movement in one or more direction.
from cpython cimport PyUnicode_AsUTF8String from cpython cimport PyUnicode_AsUTF8String
from efl.evas cimport Evas_Object, const_Evas_Object, \ from efl.evas cimport Evas_Object, Object as evasObject
Object as evasObject
from efl.eo cimport object_from_instance, _object_mapping_register from efl.eo cimport object_from_instance, _object_mapping_register
from efl.utils.conversions cimport _ctouni, _touni from efl.utils.conversions cimport _ctouni, _touni
@ -186,8 +185,8 @@ cdef class Scrollable(Object):
if isinstance(widget, unicode): widget = PyUnicode_AsUTF8String(widget) if isinstance(widget, unicode): widget = PyUnicode_AsUTF8String(widget)
if isinstance(base, unicode): base = PyUnicode_AsUTF8String(base) if isinstance(base, unicode): base = PyUnicode_AsUTF8String(base)
elm_scroller_custom_widget_base_theme_set(self.obj, elm_scroller_custom_widget_base_theme_set(self.obj,
<const_char *>widget if widget is not None else NULL, <const char *>widget if widget is not None else NULL,
<const_char *>base if base is not None else NULL) <const char *>base if base is not None else NULL)
def content_min_limit(self, w, h): def content_min_limit(self, w, h):
"""content_min_limit(bool w, bool h) """content_min_limit(bool w, bool h)

View File

@ -1,15 +1,14 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_segment_control_add(Evas_Object *parent) Evas_Object *elm_segment_control_add(Evas_Object *parent)
Elm_Object_Item *elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const_char *label) Elm_Object_Item *elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const char *label)
Elm_Object_Item *elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const_char *label, int index) Elm_Object_Item *elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const char *label, int index)
void elm_segment_control_item_del_at(Evas_Object *obj, int index) void elm_segment_control_item_del_at(Evas_Object *obj, int index)
int elm_segment_control_item_count_get(Evas_Object *obj) int elm_segment_control_item_count_get(Evas_Object *obj)
Elm_Object_Item *elm_segment_control_item_get(Evas_Object *obj, int index) Elm_Object_Item *elm_segment_control_item_get(Evas_Object *obj, int index)
const_char * elm_segment_control_item_label_get(Evas_Object *obj, int index) const char * elm_segment_control_item_label_get(Evas_Object *obj, int index)
Evas_Object *elm_segment_control_item_icon_get(Evas_Object *obj, int index) Evas_Object *elm_segment_control_item_icon_get(Evas_Object *obj, int index)
int elm_segment_control_item_index_get(Elm_Object_Item *it) int elm_segment_control_item_index_get(Elm_Object_Item *it)
Evas_Object *elm_segment_control_item_object_get(Elm_Object_Item *it) Evas_Object *elm_segment_control_item_object_get(Elm_Object_Item *it)

View File

@ -126,7 +126,7 @@ cdef class SegmentControlItem(ObjectItem):
item = elm_segment_control_item_add(sc.obj, item = elm_segment_control_item_add(sc.obj,
self.icon.obj if self.icon is not None else NULL, self.icon.obj if self.icon is not None else NULL,
<const_char *>self.label if self.label is not None else NULL) <const char *>self.label if self.label is not None else NULL)
if item == NULL: if item == NULL:
raise RuntimeError("The item could not be added to the widget.") raise RuntimeError("The item could not be added to the widget.")
@ -175,7 +175,7 @@ cdef class SegmentControlItem(ObjectItem):
item = elm_segment_control_item_insert_at(sc.obj, item = elm_segment_control_item_insert_at(sc.obj,
self.icon.obj if self.icon is not None else NULL, self.icon.obj if self.icon is not None else NULL,
<const_char *>self.label if self.label is not None else NULL, index) <const char *>self.label if self.label is not None else NULL, index)
if item == NULL: if item == NULL:
raise RuntimeError("The item could not be added to the widget.") raise RuntimeError("The item could not be added to the widget.")
@ -277,7 +277,7 @@ cdef class SegmentControl(LayoutClass):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_segment_control_item_add(self.obj, item = elm_segment_control_item_add(self.obj,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
<const_char *>label if label is not None else NULL) <const char *>label if label is not None else NULL)
if item != NULL: if item != NULL:
ret._set_obj(item) ret._set_obj(item)
return ret return ret
@ -326,7 +326,7 @@ cdef class SegmentControl(LayoutClass):
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
item = elm_segment_control_item_insert_at(self.obj, item = elm_segment_control_item_insert_at(self.obj,
icon.obj if icon is not None else NULL, icon.obj if icon is not None else NULL,
<const_char *>label if label is not None else NULL, index) <const char *>label if label is not None else NULL, index)
if item != NULL: if item != NULL:
ret._set_obj(item) ret._set_obj(item)
return ret return ret

View File

@ -1,25 +1,24 @@
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Evas_Coord from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object * elm_slider_add(Evas_Object *parent) Evas_Object * elm_slider_add(Evas_Object *parent)
void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size) void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size)
Evas_Coord elm_slider_span_size_get(const_Evas_Object *obj) Evas_Coord elm_slider_span_size_get(const Evas_Object *obj)
void elm_slider_unit_format_set(Evas_Object *obj, const_char *format) void elm_slider_unit_format_set(Evas_Object *obj, const char *format)
const_char * elm_slider_unit_format_get(const_Evas_Object *obj) const char * elm_slider_unit_format_get(const Evas_Object *obj)
void elm_slider_indicator_format_set(Evas_Object *obj, const_char *indicator) void elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator)
const_char * elm_slider_indicator_format_get(const_Evas_Object *obj) const char * elm_slider_indicator_format_get(const Evas_Object *obj)
# TODO: void elm_slider_indicator_format_function_set(Evas_Object *obj, const_char(*func)(double val), void (*free_func)(const_char *str)) # TODO: void elm_slider_indicator_format_function_set(Evas_Object *obj, const char(*func)(double val), void (*free_func)(const char *str))
# TODO: void elm_slider_units_format_function_set(Evas_Object *obj, const_char *(*func)(double val), void (*free_func)(const_char *str)) # TODO: void elm_slider_units_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str))
void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
Eina_Bool elm_slider_horizontal_get(const_Evas_Object *obj) Eina_Bool elm_slider_horizontal_get(const Evas_Object *obj)
void elm_slider_min_max_set(Evas_Object *obj, double min, double max) void elm_slider_min_max_set(Evas_Object *obj, double min, double max)
void elm_slider_min_max_get(const_Evas_Object *obj, double *min, double *max) void elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max)
void elm_slider_value_set(Evas_Object *obj, double val) void elm_slider_value_set(Evas_Object *obj, double val)
double elm_slider_value_get(const_Evas_Object *obj) double elm_slider_value_get(const Evas_Object *obj)
void elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted) void elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted)
Eina_Bool elm_slider_inverted_get(const_Evas_Object *obj) Eina_Bool elm_slider_inverted_get(const Evas_Object *obj)
void elm_slider_indicator_show_set(Evas_Object *obj, Eina_Bool show) void elm_slider_indicator_show_set(Evas_Object *obj, Eina_Bool show)
Eina_Bool elm_slider_indicator_show_get(const_Evas_Object *obj) Eina_Bool elm_slider_indicator_show_get(const Evas_Object *obj)
void elm_slider_step_set(Evas_Object *obj, double step) void elm_slider_step_set(Evas_Object *obj, double step)
double elm_slider_step_get(const_Evas_Object *obj) double elm_slider_step_get(const Evas_Object *obj)

View File

@ -141,12 +141,12 @@ cdef class Slider(LayoutClass):
def __set__(self, unit_format): def __set__(self, unit_format):
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format) if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
elm_slider_unit_format_set(self.obj, elm_slider_unit_format_set(self.obj,
<const_char *>unit_format if unit_format is not None else NULL) <const char *>unit_format if unit_format is not None else NULL)
def unit_format_set(self, unit_format): def unit_format_set(self, unit_format):
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format) if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
elm_slider_unit_format_set(self.obj, elm_slider_unit_format_set(self.obj,
<const_char *>unit_format if unit_format is not None else NULL) <const char *>unit_format if unit_format is not None else NULL)
def unit_format_get(self): def unit_format_get(self):
return _ctouni(elm_slider_unit_format_get(self.obj)) return _ctouni(elm_slider_unit_format_get(self.obj))
@ -176,12 +176,12 @@ cdef class Slider(LayoutClass):
def __set__(self, ind_format): def __set__(self, ind_format):
if isinstance(ind_format, unicode): ind_format = PyUnicode_AsUTF8String(ind_format) if isinstance(ind_format, unicode): ind_format = PyUnicode_AsUTF8String(ind_format)
elm_slider_indicator_format_set(self.obj, elm_slider_indicator_format_set(self.obj,
<const_char *>ind_format if ind_format is not None else NULL) <const char *>ind_format if ind_format is not None else NULL)
def indicator_format_set(self, ind_format): def indicator_format_set(self, ind_format):
if isinstance(ind_format, unicode): ind_format = PyUnicode_AsUTF8String(ind_format) if isinstance(ind_format, unicode): ind_format = PyUnicode_AsUTF8String(ind_format)
elm_slider_indicator_format_set(self.obj, elm_slider_indicator_format_set(self.obj,
<const_char *>ind_format if ind_format is not None else NULL) <const char *>ind_format if ind_format is not None else NULL)
def indicator_format_get(self): def indicator_format_get(self):
return _ctouni(elm_slider_indicator_format_get(self.obj)) return _ctouni(elm_slider_indicator_format_get(self.obj))

View File

@ -1,9 +1,5 @@
from efl.evas cimport Eina_Bool, Eina_Compare_Cb, const_Eina_List, Evas_Object from efl.evas cimport Eina_Bool, Eina_Compare_Cb, Eina_List, Evas_Object
from object_item cimport Elm_Object_Item, ObjectItem from object_item cimport Elm_Object_Item, ObjectItem
from libc.string cimport const_char
cdef extern from *:
ctypedef void const_void "const void"
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
@ -23,21 +19,21 @@ cdef extern from "Elementary.h":
void elm_slideshow_item_show(Elm_Object_Item *it) void elm_slideshow_item_show(Elm_Object_Item *it)
void elm_slideshow_next(Evas_Object *obj) void elm_slideshow_next(Evas_Object *obj)
void elm_slideshow_previous(Evas_Object *obj) void elm_slideshow_previous(Evas_Object *obj)
const_Eina_List *elm_slideshow_transitions_get(Evas_Object *obj) const Eina_List *elm_slideshow_transitions_get(Evas_Object *obj)
void elm_slideshow_transition_set(Evas_Object *obj, const_char *transition) void elm_slideshow_transition_set(Evas_Object *obj, const char *transition)
const_char * elm_slideshow_transition_get(Evas_Object *obj) const char * elm_slideshow_transition_get(Evas_Object *obj)
void elm_slideshow_timeout_set(Evas_Object *obj, double timeout) void elm_slideshow_timeout_set(Evas_Object *obj, double timeout)
double elm_slideshow_timeout_get(Evas_Object *obj) double elm_slideshow_timeout_get(Evas_Object *obj)
void elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop) void elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop)
Eina_Bool elm_slideshow_loop_get(Evas_Object *obj) Eina_Bool elm_slideshow_loop_get(Evas_Object *obj)
void elm_slideshow_clear(Evas_Object *obj) void elm_slideshow_clear(Evas_Object *obj)
const_Eina_List *elm_slideshow_items_get(Evas_Object *obj) const Eina_List *elm_slideshow_items_get(Evas_Object *obj)
Elm_Object_Item *elm_slideshow_item_current_get(Evas_Object *obj) Elm_Object_Item *elm_slideshow_item_current_get(Evas_Object *obj)
Evas_Object *elm_slideshow_item_object_get(Elm_Object_Item *it) Evas_Object *elm_slideshow_item_object_get(Elm_Object_Item *it)
Elm_Object_Item *elm_slideshow_item_nth_get(Evas_Object *obj, unsigned int nth) Elm_Object_Item *elm_slideshow_item_nth_get(Evas_Object *obj, unsigned int nth)
void elm_slideshow_layout_set(Evas_Object *obj, const_char *layout) void elm_slideshow_layout_set(Evas_Object *obj, const char *layout)
const_char * elm_slideshow_layout_get(Evas_Object *obj) const char * elm_slideshow_layout_get(Evas_Object *obj)
const_Eina_List *elm_slideshow_layouts_get(Evas_Object *obj) const Eina_List *elm_slideshow_layouts_get(Evas_Object *obj)
void elm_slideshow_cache_before_set(Evas_Object *obj, int count) void elm_slideshow_cache_before_set(Evas_Object *obj, int count)
int elm_slideshow_cache_before_get(Evas_Object *obj) int elm_slideshow_cache_before_get(Evas_Object *obj)
void elm_slideshow_cache_after_set(Evas_Object *obj, int count) void elm_slideshow_cache_after_set(Evas_Object *obj, int count)

View File

@ -133,7 +133,7 @@ cdef void _py_elm_slideshow_item_del(void *data, Evas_Object *obj) with gil:
#item._unset_obj() #item._unset_obj()
#Py_DECREF(item) #Py_DECREF(item)
cdef int _py_elm_slideshow_compare_func(const_void *data1, const_void *data2) with gil: cdef int _py_elm_slideshow_compare_func(const void *data1, const void *data2) with gil:
cdef SlideshowItem item1 = <object>data1 cdef SlideshowItem item1 = <object>data1
cdef SlideshowItem item2 = <object>data2 cdef SlideshowItem item2 = <object>data2
cdef object func = item1.compare_func cdef object func = item1.compare_func
@ -514,7 +514,7 @@ cdef class Slideshow(LayoutClass):
def __set__(self, transition): def __set__(self, transition):
if isinstance(transition, unicode): transition = PyUnicode_AsUTF8String(transition) if isinstance(transition, unicode): transition = PyUnicode_AsUTF8String(transition)
elm_slideshow_transition_set(self.obj, elm_slideshow_transition_set(self.obj,
<const_char *>transition if transition is not None else NULL) <const char *>transition if transition is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_slideshow_transition_get(self.obj)) return _ctouni(elm_slideshow_transition_get(self.obj))
@ -632,7 +632,7 @@ cdef class Slideshow(LayoutClass):
def __set__(self, layout): def __set__(self, layout):
if isinstance(layout, unicode): layout = PyUnicode_AsUTF8String(layout) if isinstance(layout, unicode): layout = PyUnicode_AsUTF8String(layout)
elm_slideshow_layout_set(self.obj, elm_slideshow_layout_set(self.obj,
<const_char *>layout if layout is not None else NULL) <const char *>layout if layout is not None else NULL)
def __get__(self): def __get__(self):
return _ctouni(elm_slideshow_layout_get(self.obj)) return _ctouni(elm_slideshow_layout_get(self.obj))

View File

@ -1,10 +1,9 @@
from efl.evas cimport Eina_Bool, Evas_Object from efl.evas cimport Eina_Bool, Evas_Object
from libc.string cimport const_char
cdef extern from "Elementary.h": cdef extern from "Elementary.h":
Evas_Object *elm_spinner_add(Evas_Object *parent) Evas_Object *elm_spinner_add(Evas_Object *parent)
void elm_spinner_label_format_set(Evas_Object *obj, const_char *format) void elm_spinner_label_format_set(Evas_Object *obj, const char *format)
const_char * elm_spinner_label_format_get(Evas_Object *obj) const char * elm_spinner_label_format_get(Evas_Object *obj)
void elm_spinner_min_max_set(Evas_Object *obj, double min, double max) void elm_spinner_min_max_set(Evas_Object *obj, double min, double max)
void elm_spinner_min_max_get(Evas_Object *obj, double *min, double *max) void elm_spinner_min_max_get(Evas_Object *obj, double *min, double *max)
void elm_spinner_step_set(Evas_Object *obj, double step) void elm_spinner_step_set(Evas_Object *obj, double step)
@ -15,9 +14,9 @@ cdef extern from "Elementary.h":
Eina_Bool elm_spinner_wrap_get(Evas_Object *obj) Eina_Bool elm_spinner_wrap_get(Evas_Object *obj)
void elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable) void elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable)
Eina_Bool elm_spinner_editable_get(Evas_Object *obj) Eina_Bool elm_spinner_editable_get(Evas_Object *obj)
void elm_spinner_special_value_add(Evas_Object *obj, double value, const_char *label) void elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label)
void elm_spinner_special_value_del(Evas_Object *obj, double value) void elm_spinner_special_value_del(Evas_Object *obj, double value)
const_char * elm_spinner_special_value_get(Evas_Object *obj, double value) const char * elm_spinner_special_value_get(Evas_Object *obj, double value)
void elm_spinner_interval_set(Evas_Object *obj, double interval) void elm_spinner_interval_set(Evas_Object *obj, double interval)
double elm_spinner_interval_get(Evas_Object *obj) double elm_spinner_interval_get(Evas_Object *obj)
void elm_spinner_base_set(Evas_Object *obj, double base) void elm_spinner_base_set(Evas_Object *obj, double base)

View File

@ -92,12 +92,12 @@ cdef class Spinner(LayoutClass):
def __set__(self, label_format): def __set__(self, label_format):
if isinstance(label_format, unicode): label_format = PyUnicode_AsUTF8String(label_format) if isinstance(label_format, unicode): label_format = PyUnicode_AsUTF8String(label_format)
elm_spinner_label_format_set(self.obj, elm_spinner_label_format_set(self.obj,
<const_char *>label_format if label_format is not None else NULL) <const char *>label_format if label_format is not None else NULL)
def label_format_set(self, label_format): def label_format_set(self, label_format):
if isinstance(label_format, unicode): label_format = PyUnicode_AsUTF8String(label_format) if isinstance(label_format, unicode): label_format = PyUnicode_AsUTF8String(label_format)
elm_spinner_label_format_set(self.obj, elm_spinner_label_format_set(self.obj,
<const_char *>label_format if label_format is not None else NULL) <const char *>label_format if label_format is not None else NULL)
def label_format_get(self): def label_format_get(self):
return _ctouni(elm_spinner_label_format_get(self.obj)) return _ctouni(elm_spinner_label_format_get(self.obj))
@ -268,7 +268,7 @@ cdef class Spinner(LayoutClass):
""" """
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label) if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
elm_spinner_special_value_add(self.obj, value, elm_spinner_special_value_add(self.obj, value,
<const_char *>label if label is not None else NULL) <const char *>label if label is not None else NULL)
def special_value_del(self, double value): def special_value_del(self, double value):
"""special_value_del(float value) """special_value_del(float value)

Some files were not shown because too many files have changed in this diff Show More