Remove const hacks
They were a workaround for limitations in Cython <0.18
This commit is contained in:
parent
1149c6ed91
commit
adf70fa26f
|
@ -1,5 +1,4 @@
|
|||
from cpython cimport PyObject
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "dbus/dbus.h":
|
||||
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 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 *)
|
||||
int import_dbus_bindings(const_char *this_module_name)
|
||||
int import_dbus_bindings(const char *this_module_name)
|
||||
|
||||
cdef extern from "Ecore.h":
|
||||
int ecore_init()
|
||||
|
|
|
@ -153,7 +153,7 @@ cdef object _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
|
||||
try:
|
||||
if data == NULL:
|
||||
|
@ -411,7 +411,7 @@ cdef class Exe(object):
|
|||
"given size (%d) is larger than buffer size (%d)." %
|
||||
(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)
|
||||
return ret
|
||||
|
||||
|
@ -449,7 +449,7 @@ cdef class Exe(object):
|
|||
: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:
|
||||
return cmd
|
||||
return None
|
||||
|
@ -500,7 +500,7 @@ cdef class Exe(object):
|
|||
: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:
|
||||
return tag
|
||||
return None
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
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
|
||||
try:
|
||||
obj._exec_completion(file, status)
|
||||
except Exception, e:
|
||||
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:
|
||||
obj = <FileDownload>data
|
||||
try:
|
||||
|
@ -92,8 +92,8 @@ cdef class FileDownload(object):
|
|||
if isinstance(url, unicode): url = PyUnicode_AsUTF8String(url)
|
||||
if isinstance(dst, unicode): dst = PyUnicode_AsUTF8String(dst)
|
||||
if not ecore_file_download(
|
||||
<const_char *>url if url is not None else NULL,
|
||||
<const_char *>dst if dst 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,
|
||||
_completion_cb, _progress_cb,
|
||||
<void *>self, &job):
|
||||
raise SystemError("could not download '%s' to %s" % (url, dst))
|
||||
|
@ -122,11 +122,11 @@ cdef class FileDownload(object):
|
|||
self.args = 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:
|
||||
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):
|
||||
if self.progress_cb:
|
||||
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)
|
||||
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))
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
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
|
||||
try:
|
||||
obj._exec_monitor(event, path)
|
||||
|
@ -74,7 +74,7 @@ cdef class FileMonitor(object):
|
|||
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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)
|
||||
if not self.mon:
|
||||
raise SystemError("could not monitor '%s'" % (path))
|
||||
|
@ -98,7 +98,7 @@ cdef class FileMonitor(object):
|
|||
(self.__class__.__name__, <uintptr_t><void *>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:
|
||||
return self.monitor_cb(event, _ctouni(path), *self.args, **self.kargs)
|
||||
return 0
|
||||
|
|
|
@ -157,7 +157,7 @@ def thaw():
|
|||
|
||||
def fontset_append_set(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():
|
||||
|
@ -168,7 +168,7 @@ def file_collection_list(file):
|
|||
cdef Eina_List *lst
|
||||
if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
|
||||
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)
|
||||
edje_file_collection_list_free(lst)
|
||||
return ret
|
||||
|
@ -178,8 +178,8 @@ def file_group_exists(file, group):
|
|||
if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
return bool(edje_file_group_exists(
|
||||
<const_char *>file if file is not None else NULL,
|
||||
<const_char *>group if group 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))
|
||||
|
||||
|
||||
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(key, unicode): key = PyUnicode_AsUTF8String(key)
|
||||
s = edje_file_data_get(
|
||||
<const_char *>file if file is not None else NULL,
|
||||
<const_char *>key if key 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)
|
||||
ret = _touni(s)
|
||||
libc.stdlib.free(s)
|
||||
return ret
|
||||
|
@ -236,7 +236,7 @@ def color_class_set(color_class,
|
|||
if isinstance(color_class, unicode):
|
||||
color_class = PyUnicode_AsUTF8String(color_class)
|
||||
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)
|
||||
|
||||
|
||||
|
@ -247,7 +247,7 @@ def color_class_get(color_class):
|
|||
if isinstance(color_class, unicode):
|
||||
color_class = PyUnicode_AsUTF8String(color_class)
|
||||
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)
|
||||
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):
|
||||
color_class = PyUnicode_AsUTF8String(color_class)
|
||||
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():
|
||||
|
@ -280,15 +280,15 @@ def text_class_set(text_class, font, int size):
|
|||
if isinstance(font, unicode):
|
||||
font = PyUnicode_AsUTF8String(font)
|
||||
edje_text_class_set(
|
||||
<const_char *>text_class if text_class is not None else NULL,
|
||||
<const_char *>font if font 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,
|
||||
size)
|
||||
|
||||
|
||||
def text_class_del(text_class):
|
||||
if isinstance(text_class, unicode): text_class = PyUnicode_AsUTF8String(text_class)
|
||||
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():
|
||||
|
@ -323,7 +323,7 @@ def extern_object_aspect_set(Object obj, int aspect, int w, int h):
|
|||
|
||||
|
||||
def available_modules_get():
|
||||
cdef const_Eina_List *lst
|
||||
cdef const Eina_List *lst
|
||||
lst = edje_available_modules_get()
|
||||
ret = []
|
||||
while lst:
|
||||
|
@ -335,7 +335,7 @@ def available_modules_get():
|
|||
def module_load(name):
|
||||
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
|
||||
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"
|
||||
|
|
|
@ -48,7 +48,7 @@ cdef class EdjeEdit(Edje):
|
|||
|
||||
# General
|
||||
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)
|
||||
if s != NULL:
|
||||
edje_edit_string_free(s)
|
||||
|
@ -71,17 +71,17 @@ cdef class EdjeEdit(Edje):
|
|||
def group_add(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
property data:
|
||||
|
@ -96,8 +96,8 @@ cdef class EdjeEdit(Edje):
|
|||
|
||||
def data_get(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
cdef const_char *val = edje_edit_data_value_get(self.obj,
|
||||
<const_char *>name if name is not None else NULL)
|
||||
cdef const char *val = edje_edit_data_value_get(self.obj,
|
||||
<const char *>name if name is not None else NULL)
|
||||
r = _ctouni(val)
|
||||
edje_edit_string_free(val)
|
||||
return r
|
||||
|
@ -107,27 +107,27 @@ cdef class EdjeEdit(Edje):
|
|||
if isinstance(value, unicode): value = value.encode("UTF-8")
|
||||
|
||||
return bool(edje_edit_data_value_set(self.obj,
|
||||
<const_char *>name if name is not None else NULL,
|
||||
<const_char *>value if value 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))
|
||||
|
||||
def data_add(self, name, value):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
if isinstance(value, unicode): value = value.encode("UTF-8")
|
||||
return bool(edje_edit_data_add(self.obj,
|
||||
<const_char *>name if name is not None else NULL,
|
||||
<const_char *>value if value 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))
|
||||
|
||||
def data_rename(self, old, new):
|
||||
if isinstance(old, unicode): old = old.encode("UTF-8")
|
||||
if isinstance(new, unicode): new = new.encode("UTF-8")
|
||||
return bool(edje_edit_data_name_set(self.obj,
|
||||
<const_char *>old if old is not None else NULL,
|
||||
<const_char *>new if new 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))
|
||||
|
||||
def data_del(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
property group_data:
|
||||
|
@ -141,10 +141,10 @@ cdef class EdjeEdit(Edje):
|
|||
return ret
|
||||
|
||||
def group_data_get(self, name):
|
||||
cdef const_char *val
|
||||
cdef const char *val
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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)
|
||||
edje_edit_string_free(val)
|
||||
return r
|
||||
|
@ -153,27 +153,27 @@ cdef class EdjeEdit(Edje):
|
|||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
if isinstance(value, unicode): value = value.encode("UTF-8")
|
||||
return bool(edje_edit_group_data_value_set(self.obj,
|
||||
<const_char *>name if name is not None else NULL,
|
||||
<const_char *>value if value 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))
|
||||
|
||||
def group_data_add(self, name, value):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
if isinstance(value, unicode): value = value.encode("UTF-8")
|
||||
return bool(edje_edit_group_data_add(self.obj,
|
||||
<const_char *>name if name is not None else NULL,
|
||||
<const_char *>value if value 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))
|
||||
|
||||
def group_data_rename(self, old, new):
|
||||
if isinstance(old, unicode): old = old.encode("UTF-8")
|
||||
if isinstance(new, unicode): new = new.encode("UTF-8")
|
||||
return bool(edje_edit_group_data_name_set(self.obj,
|
||||
<const_char *>old if old is not None else NULL,
|
||||
<const_char *>new if new 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))
|
||||
|
||||
def group_data_del(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
property text_styles:
|
||||
|
@ -190,12 +190,12 @@ cdef class EdjeEdit(Edje):
|
|||
def text_style_add(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
|
||||
# Color Classes
|
||||
|
@ -213,12 +213,12 @@ cdef class EdjeEdit(Edje):
|
|||
def color_class_add(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
property externals:
|
||||
|
@ -232,12 +232,12 @@ cdef class EdjeEdit(Edje):
|
|||
def external_add(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
property fonts:
|
||||
|
@ -252,13 +252,13 @@ cdef class EdjeEdit(Edje):
|
|||
if isinstance(font, unicode): font = font.encode("UTF-8")
|
||||
if isinstance(alias, unicode): alias = alias.encode("UTF-8")
|
||||
return bool(edje_edit_font_add(self.obj,
|
||||
<const_char *>font if font is not None else NULL,
|
||||
<const_char *>alias if alias 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))
|
||||
|
||||
def font_del(self, alias):
|
||||
if isinstance(alias, unicode): alias = alias.encode("UTF-8")
|
||||
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
|
||||
property parts:
|
||||
|
@ -278,7 +278,7 @@ cdef class EdjeEdit(Edje):
|
|||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
if type != EDJE_PART_TYPE_EXTERNAL:
|
||||
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))
|
||||
else:
|
||||
return bool(edje_edit_part_external_add(self.obj, name, source))
|
||||
|
@ -286,12 +286,12 @@ cdef class EdjeEdit(Edje):
|
|||
def part_del(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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
|
||||
property images:
|
||||
|
@ -305,17 +305,17 @@ cdef class EdjeEdit(Edje):
|
|||
def image_id_get(self, image):
|
||||
if isinstance(image, unicode): image = image.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(path, unicode): path = path.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(image, unicode): image = image.encode("UTF-8")
|
||||
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
|
||||
property programs:
|
||||
|
@ -335,17 +335,17 @@ cdef class EdjeEdit(Edje):
|
|||
def program_add(self, name):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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:
|
||||
def __get__(self):
|
||||
|
@ -378,7 +378,7 @@ cdef class EdjeEdit(Edje):
|
|||
|
||||
property script_errors:
|
||||
def __get__(self):
|
||||
cdef const_Eina_List *lst
|
||||
cdef const Eina_List *lst
|
||||
cdef Edje_Edit_Script_Error *se
|
||||
ret = []
|
||||
lst = edje_edit_script_error_list_get(self.obj)
|
||||
|
@ -396,7 +396,7 @@ cdef class EdjeEdit(Edje):
|
|||
|
||||
cdef class Text_Style(object):
|
||||
cdef EdjeEdit edje
|
||||
cdef const_char *name
|
||||
cdef const char *name
|
||||
|
||||
def __init__(self, EdjeEdit e not None, name not None):
|
||||
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):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
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):
|
||||
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
|
||||
|
||||
|
||||
cdef class Text_Style_Tag(object):
|
||||
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):
|
||||
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")
|
||||
edje_edit_style_tag_name_set(self.text_style.edje.obj,
|
||||
self.text_style.name, self.name,
|
||||
<const_char *>newname)
|
||||
eina_stringshare_replace(&self.name, <const_char *>newname)
|
||||
<const char *>newname)
|
||||
eina_stringshare_replace(&self.name, <const char *>newname)
|
||||
return True
|
||||
|
||||
property value:
|
||||
def __get__(self):
|
||||
cdef const_char *val
|
||||
cdef const char *val
|
||||
val = edje_edit_style_tag_value_get(self.text_style.edje.obj,
|
||||
self.text_style.name, self.name)
|
||||
ret = _ctouni(val)
|
||||
|
@ -467,13 +467,13 @@ cdef class Text_Style_Tag(object):
|
|||
if isinstance(value, unicode): value = value.encode("UTF-8")
|
||||
edje_edit_style_tag_value_set(self.text_style.edje.obj,
|
||||
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 EdjeEdit edje
|
||||
cdef const_char *name
|
||||
cdef const char *name
|
||||
|
||||
def __init__(self, EdjeEdit e not None, name not None):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
|
@ -494,10 +494,10 @@ cdef class Color_Class(object):
|
|||
cdef Eina_Bool ret
|
||||
if isinstance(newname, unicode): newname = newname.encode("UTF-8")
|
||||
ret = edje_edit_color_class_name_set(self.edje.obj, self.name,
|
||||
<const_char *>newname)
|
||||
<const char *>newname)
|
||||
if ret == 0:
|
||||
return False
|
||||
eina_stringshare_replace(&self.name, <const_char *>newname)
|
||||
eina_stringshare_replace(&self.name, <const char *>newname)
|
||||
return True
|
||||
|
||||
def colors_get(self):
|
||||
|
|
|
@ -51,5 +51,5 @@ cdef class Group(object):
|
|||
|
||||
def rename(self, name not None):
|
||||
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))
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
cdef class Part(object):
|
||||
cdef EdjeEdit edje
|
||||
cdef const_char *name
|
||||
cdef const char *name
|
||||
|
||||
def __init__(self, EdjeEdit e not None, name not None):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
|
@ -38,15 +38,15 @@ cdef class Part(object):
|
|||
cdef Eina_Bool ret
|
||||
if isinstance(newname, unicode): newname = newname.encode("UTF-8")
|
||||
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:
|
||||
return False
|
||||
eina_stringshare_replace(&self.name, <const_char *>newname)
|
||||
eina_stringshare_replace(&self.name, <const char *>newname)
|
||||
return True
|
||||
|
||||
def above_get(self):
|
||||
cdef:
|
||||
const_char *part
|
||||
const char *part
|
||||
object ret
|
||||
part = edje_edit_part_above_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(part)
|
||||
|
@ -55,7 +55,7 @@ cdef class Part(object):
|
|||
|
||||
def below_get(self):
|
||||
cdef:
|
||||
const_char *part
|
||||
const char *part
|
||||
object ret
|
||||
part = edje_edit_part_below_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(part)
|
||||
|
@ -88,30 +88,30 @@ cdef class Part(object):
|
|||
def state_add(self, sname, double value=0.0):
|
||||
if isinstance(sname, unicode): sname = sname.encode("UTF-8")
|
||||
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))
|
||||
|
||||
def state_del(self, sname, double value=0.0):
|
||||
if isinstance(sname, unicode): sname = sname.encode("UTF-8")
|
||||
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))
|
||||
|
||||
def state_exist(self, sname, double value=0.0):
|
||||
if isinstance(sname, unicode): sname = sname.encode("UTF-8")
|
||||
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))
|
||||
|
||||
def state_copy(self, sfrom, double vfrom, sto, double vto):
|
||||
if isinstance(sfrom, unicode): sfrom = sfrom.encode("UTF-8")
|
||||
if isinstance(sto, unicode): sto = sto.encode("UTF-8")
|
||||
return bool(edje_edit_state_copy(self.edje.obj, self.name,
|
||||
<const_char *>sfrom if sfrom is not None else NULL, vfrom,
|
||||
<const_char *>sto if sto is not None else NULL, vto))
|
||||
<const char *>sfrom if sfrom is not None else NULL, vfrom,
|
||||
<const char *>sto if sto is not None else NULL, vto))
|
||||
|
||||
def state_selected_get(self):
|
||||
cdef const_char *sel
|
||||
cdef const char *sel
|
||||
cdef double val
|
||||
sel = edje_edit_part_selected_state_get(self.edje.obj, self.name, &val)
|
||||
if sel == NULL: return None
|
||||
|
@ -123,12 +123,12 @@ cdef class Part(object):
|
|||
def state_selected_set(self, state, double value=0.0):
|
||||
if isinstance(state, unicode): state = state.encode("UTF-8")
|
||||
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)
|
||||
|
||||
property clip_to:
|
||||
def __get__(self):
|
||||
cdef const_char *clipper
|
||||
cdef const char *clipper
|
||||
clipper = edje_edit_part_clip_to_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(clipper)
|
||||
edje_edit_string_free(clipper)
|
||||
|
@ -137,14 +137,14 @@ cdef class Part(object):
|
|||
def __set__(self, clipper):
|
||||
if isinstance(clipper, unicode): clipper = clipper.encode("UTF-8")
|
||||
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):
|
||||
edje_edit_part_clip_to_set(self.edje.obj, self.name, NULL)
|
||||
|
||||
property source:
|
||||
def __get__(self):
|
||||
cdef const_char *source
|
||||
cdef const char *source
|
||||
source = edje_edit_part_source_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(source)
|
||||
edje_edit_string_free(source)
|
||||
|
@ -153,7 +153,7 @@ cdef class Part(object):
|
|||
def __set__(self, source):
|
||||
if isinstance(source, unicode): source = source.encode("UTF-8")
|
||||
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):
|
||||
edje_edit_part_source_set(self.edje.obj, self.name, NULL)
|
||||
|
@ -234,7 +234,7 @@ cdef class Part(object):
|
|||
|
||||
property drag_confine:
|
||||
def __get__(self):
|
||||
cdef const_char *confine
|
||||
cdef const char *confine
|
||||
confine = edje_edit_part_drag_confine_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(confine)
|
||||
edje_edit_string_free(confine)
|
||||
|
@ -243,11 +243,11 @@ cdef class Part(object):
|
|||
def __set__(self, confine):
|
||||
if isinstance(confine, unicode): confine = confine.encode("UTF-8")
|
||||
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:
|
||||
def __get__(self):
|
||||
cdef const_char *event
|
||||
cdef const char *event
|
||||
event = edje_edit_part_drag_event_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(event)
|
||||
edje_edit_string_free(event)
|
||||
|
@ -256,13 +256,13 @@ cdef class Part(object):
|
|||
def __set__(self, event):
|
||||
if isinstance(event, unicode): event = event.encode("UTF-8")
|
||||
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:
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_char *name
|
||||
const_char *desc
|
||||
const char *name
|
||||
const char *desc
|
||||
name = edje_edit_part_api_name_get(self.edje.obj, self.name)
|
||||
desc = edje_edit_part_api_description_get(self.edje.obj, self.name)
|
||||
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(desc, unicode): desc = desc.encode("UTF-8")
|
||||
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,
|
||||
<const_char *>desc if desc is not None else NULL)
|
||||
<const char *>desc if desc is not None else NULL)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
cdef class State:
|
||||
cdef EdjeEdit edje
|
||||
cdef object part
|
||||
cdef const_char *name
|
||||
cdef const char *name
|
||||
cdef object part_obj
|
||||
cdef object value
|
||||
|
||||
|
@ -51,11 +51,11 @@ cdef class State:
|
|||
if isinstance(new_name, unicode): new_name = new_name.encode("UTF-8")
|
||||
ret = edje_edit_state_name_set(self.edje.obj, self.part,
|
||||
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)
|
||||
if ret == 0:
|
||||
return False
|
||||
eina_stringshare_replace(&self.name, <const_char *>new_name)
|
||||
eina_stringshare_replace(&self.name, <const char *>new_name)
|
||||
return True
|
||||
"""
|
||||
def copy_from(self, from_state, from_value=0.0):
|
||||
|
@ -65,8 +65,8 @@ cdef class State:
|
|||
"""
|
||||
def rel1_to_get(self):
|
||||
cdef:
|
||||
const_char *tx
|
||||
const_char *ty
|
||||
const char *tx
|
||||
const char *ty
|
||||
|
||||
tx = edje_edit_state_rel1_to_x_get(self.edje.obj, self.part, self.name,
|
||||
self.value)
|
||||
|
@ -188,7 +188,7 @@ cdef class State:
|
|||
self.value, y)
|
||||
|
||||
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,
|
||||
self.value)
|
||||
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)
|
||||
|
||||
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,
|
||||
self.name, self.value)
|
||||
if cc == NULL:
|
||||
|
@ -523,7 +523,7 @@ cdef class State:
|
|||
self.name, self.value, cc)
|
||||
|
||||
def external_params_get(self):
|
||||
cdef evas.c_evas.const_Eina_List *lst
|
||||
cdef evas.c_evas.const Eina_List *lst
|
||||
ret = []
|
||||
lst = edje_edit_state_external_params_list_get(self.edje.obj, self.part,
|
||||
self.name, self.value)
|
||||
|
@ -537,7 +537,7 @@ cdef class State:
|
|||
def external_param_get(self, param):
|
||||
cdef c_edje.Edje_External_Param_Type type
|
||||
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,
|
||||
self.name, self.value, param,
|
||||
|
@ -567,7 +567,7 @@ cdef class State:
|
|||
return None
|
||||
|
||||
def external_param_set(self, param, value):
|
||||
cdef const_char_ptr expected
|
||||
cdef const char_ptr expected
|
||||
|
||||
if isinstance(value, bool):
|
||||
return self.external_param_bool_set(param, value)
|
||||
|
@ -620,7 +620,7 @@ cdef class State:
|
|||
return value
|
||||
|
||||
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(
|
||||
self.edje.obj, self.part, self.name, self.value, param, &value):
|
||||
|
@ -629,7 +629,7 @@ cdef class State:
|
|||
return value
|
||||
|
||||
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(
|
||||
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))
|
||||
|
||||
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,
|
||||
self.value)
|
||||
if t == NULL:
|
||||
|
@ -684,7 +684,7 @@ cdef class State:
|
|||
self.text_set(text)
|
||||
|
||||
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,
|
||||
self.value)
|
||||
if f == NULL:
|
||||
|
@ -779,7 +779,7 @@ cdef class State:
|
|||
self.text_fit_set(*value)
|
||||
|
||||
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,
|
||||
self.value)
|
||||
if img == NULL:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
cdef class Program(object):
|
||||
cdef EdjeEdit edje
|
||||
cdef const_char *name
|
||||
cdef const char *name
|
||||
|
||||
def __init__(self, EdjeEdit e not None, name not None):
|
||||
if isinstance(name, unicode): name = name.encode("UTF-8")
|
||||
|
@ -38,10 +38,10 @@ cdef class Program(object):
|
|||
cdef Eina_Bool ret
|
||||
if isinstance(newname, unicode): newname = newname.encode("UTF-8")
|
||||
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:
|
||||
return False
|
||||
eina_stringshare_replace(&self.name, <const_char *>newname)
|
||||
eina_stringshare_replace(&self.name, <const char *>newname)
|
||||
return True
|
||||
|
||||
def edje_get(self):
|
||||
|
@ -53,7 +53,7 @@ cdef class Program(object):
|
|||
# XXX TODO: add (or better convert) all this to properties
|
||||
# like is done in Part()
|
||||
def source_get(self):
|
||||
cdef const_char *s
|
||||
cdef const char *s
|
||||
s = edje_edit_program_source_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(s)
|
||||
edje_edit_string_free(s)
|
||||
|
@ -62,10 +62,10 @@ cdef class Program(object):
|
|||
def source_set(self, source):
|
||||
if isinstance(source, unicode): source = source.encode("UTF-8")
|
||||
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):
|
||||
cdef const_char *s
|
||||
cdef const char *s
|
||||
s = edje_edit_program_signal_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(s)
|
||||
edje_edit_string_free(s)
|
||||
|
@ -74,7 +74,7 @@ cdef class Program(object):
|
|||
def signal_set(self, signal):
|
||||
if isinstance(signal, unicode): signal = signal.encode("UTF-8")
|
||||
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):
|
||||
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):
|
||||
if isinstance(target, unicode): target = target.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(target, unicode): target = target.encode("UTF-8")
|
||||
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):
|
||||
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):
|
||||
if isinstance(after, unicode): after = after.encode("UTF-8")
|
||||
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):
|
||||
if isinstance(after, unicode): after = after.encode("UTF-8")
|
||||
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):
|
||||
return bool(edje_edit_program_afters_clear(self.edje.obj, self.name))
|
||||
|
||||
def state_get(self):
|
||||
cdef const_char *s
|
||||
cdef const char *s
|
||||
s = edje_edit_program_state_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(s)
|
||||
edje_edit_string_free(s)
|
||||
|
@ -146,7 +146,7 @@ cdef class Program(object):
|
|||
def state_set(self, state):
|
||||
if isinstance(state, unicode): state = state.encode("UTF-8")
|
||||
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):
|
||||
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))
|
||||
|
||||
def state2_get(self):
|
||||
cdef const_char *s
|
||||
cdef const char *s
|
||||
s = edje_edit_program_state2_get(self.edje.obj, self.name)
|
||||
ret = _ctouni(s)
|
||||
edje_edit_string_free(s)
|
||||
|
@ -164,7 +164,7 @@ cdef class Program(object):
|
|||
def state2_set(self, state):
|
||||
if isinstance(state, unicode): state = state.encode("UTF-8")
|
||||
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):
|
||||
return edje_edit_program_value2_get(self.edje.obj, self.name)
|
||||
|
@ -187,8 +187,8 @@ cdef class Program(object):
|
|||
property api:
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_char *name
|
||||
const_char *desc
|
||||
const char *name
|
||||
const char *desc
|
||||
name = edje_edit_program_api_name_get(self.edje.obj, self.name)
|
||||
desc = edje_edit_program_api_description_get(self.edje.obj, self.name)
|
||||
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(desc, unicode): desc = desc.encode("UTF-8")
|
||||
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,
|
||||
<const_char *>desc if desc is not None else NULL)
|
||||
<const char *>desc if desc is not None else NULL)
|
||||
|
||||
property script:
|
||||
def __get__(self):
|
||||
|
@ -217,7 +217,7 @@ cdef class Program(object):
|
|||
def __set__(self, code):
|
||||
if isinstance(code, unicode): code = code.encode("UTF-8")
|
||||
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):
|
||||
edje_edit_script_program_set(self.edje.obj, self.name, NULL)
|
||||
|
|
|
@ -91,7 +91,7 @@ cdef class ExternalParamInfo:
|
|||
|
||||
property translated_name:
|
||||
def __get__(self):
|
||||
cdef const_char *t
|
||||
cdef const char *t
|
||||
if self._external_type_obj == NULL or \
|
||||
self._external_type_obj.translate == NULL:
|
||||
return self.name
|
||||
|
@ -195,7 +195,7 @@ cdef class ExternalParamInfoString(ExternalParamInfo):
|
|||
|
||||
property translated_default:
|
||||
def __get__(self):
|
||||
cdef const_char *t
|
||||
cdef const char *t
|
||||
if self._external_type_obj == NULL or \
|
||||
self._external_type_obj.translate == NULL:
|
||||
return self.default
|
||||
|
@ -231,7 +231,7 @@ cdef class ExternalParamInfoBool(ExternalParamInfo):
|
|||
|
||||
property translated_false_string:
|
||||
def __get__(self):
|
||||
cdef const_char *t
|
||||
cdef const char *t
|
||||
if self._external_type_obj == NULL or \
|
||||
self._external_type_obj.translate == NULL:
|
||||
return self.false_string
|
||||
|
@ -249,7 +249,7 @@ cdef class ExternalParamInfoBool(ExternalParamInfo):
|
|||
|
||||
property translated_true_string:
|
||||
def __get__(self):
|
||||
cdef const_char *t
|
||||
cdef const char *t
|
||||
if self._external_type_obj == NULL or \
|
||||
self._external_type_obj.translate == NULL:
|
||||
return self.true_string
|
||||
|
@ -269,7 +269,7 @@ cdef class ExternalParamInfoChoice(ExternalParamInfo):
|
|||
|
||||
property translated_default:
|
||||
def __get__(self):
|
||||
cdef const_char *t
|
||||
cdef const char *t
|
||||
if self._external_type_obj == NULL or \
|
||||
self._external_type_obj.translate == NULL:
|
||||
return self.default
|
||||
|
@ -295,7 +295,7 @@ cdef class ExternalParamInfoChoice(ExternalParamInfo):
|
|||
|
||||
property translated_choices:
|
||||
def __get__(self):
|
||||
cdef const_char *t
|
||||
cdef const char *t
|
||||
if self._external_type_obj == NULL or \
|
||||
self._external_type_obj.translate == NULL:
|
||||
return self.choices
|
||||
|
@ -331,7 +331,7 @@ cdef ExternalParamInfo ExternalParamInfo_from_ptr(type, Edje_External_Param_Info
|
|||
return p
|
||||
|
||||
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
|
||||
|
||||
warnings.warn("Use ExternalType.parameters_info_get() instead!",
|
||||
|
@ -365,7 +365,7 @@ cdef class ExternalType:
|
|||
return self._obj.module_name
|
||||
|
||||
def label_get(self):
|
||||
cdef const_char *l
|
||||
cdef const char *l
|
||||
if self._obj.label_get == NULL:
|
||||
return None
|
||||
l = self._obj.label_get(self._obj.data)
|
||||
|
@ -375,7 +375,7 @@ cdef class ExternalType:
|
|||
return ret
|
||||
|
||||
def description_get(self):
|
||||
cdef const_char *l
|
||||
cdef const char *l
|
||||
if self._obj.description_get == NULL:
|
||||
return None
|
||||
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
|
||||
is returned untranslated.
|
||||
"""
|
||||
cdef const_char *l
|
||||
cdef const char *l
|
||||
if self._obj.translate == NULL:
|
||||
return text
|
||||
l = self._obj.translate(self._obj.data, text)
|
||||
|
@ -460,12 +460,12 @@ cdef class ExternalIterator:
|
|||
return self
|
||||
|
||||
def __next__(self):
|
||||
cdef const_Eina_Hash_Tuple *tuple
|
||||
cdef const Eina_Hash_Tuple *tuple
|
||||
cdef ExternalType t
|
||||
if eina_iterator_next(self.obj, <void **>&tuple):
|
||||
t = ExternalType()
|
||||
t._name = <char*>tuple.key
|
||||
t._obj = <const_Edje_External_Type*>tuple.data
|
||||
t._obj = <const Edje_External_Type*>tuple.data
|
||||
return t
|
||||
else:
|
||||
raise StopIteration
|
||||
|
@ -476,7 +476,7 @@ cdef class ExternalIterator:
|
|||
|
||||
def external_type_get(char *type_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
|
||||
if obj == NULL:
|
||||
return None
|
||||
|
|
|
@ -19,7 +19,7 @@ from efl.evas cimport Object
|
|||
|
||||
cdef void text_change_cb(void *data,
|
||||
Evas_Object *obj,
|
||||
const_char *part) with gil:
|
||||
const char *part) with gil:
|
||||
cdef Edje self
|
||||
self = <Edje>data
|
||||
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,
|
||||
const_char *emission, const_char *source) with gil:
|
||||
const char *emission, const char *source) with gil:
|
||||
cdef Edje self
|
||||
self = object_from_instance(obj)
|
||||
lst = tuple(<object>data)
|
||||
|
@ -188,7 +188,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
|
||||
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):
|
||||
"""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(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if edje_object_file_set(self.obj,
|
||||
<const_char *>file if file is not None else NULL,
|
||||
<const_char *>group if group is not None else NULL) == 0:
|
||||
<const char *>file if file is not None else NULL,
|
||||
<const char *>group if group is not None else NULL) == 0:
|
||||
raise EdjeLoadError(edje_object_load_error_get(self.obj), file, group)
|
||||
|
||||
def file_get(self):
|
||||
|
@ -214,8 +214,8 @@ cdef class Edje(Object):
|
|||
|
||||
"""
|
||||
cdef:
|
||||
const_char *file
|
||||
const_char *group
|
||||
const char *file
|
||||
const char *group
|
||||
edje_object_file_get(self.obj, &file, &group)
|
||||
return (_ctouni(file), _ctouni(group))
|
||||
|
||||
|
@ -313,7 +313,7 @@ cdef class Edje(Object):
|
|||
if isinstance(color_class, unicode):
|
||||
color_class = PyUnicode_AsUTF8String(color_class)
|
||||
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)
|
||||
|
||||
def color_class_get(self, color_class):
|
||||
|
@ -330,7 +330,7 @@ cdef class Edje(Object):
|
|||
if isinstance(color_class, unicode):
|
||||
color_class = PyUnicode_AsUTF8String(color_class)
|
||||
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)
|
||||
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):
|
||||
color_class = PyUnicode_AsUTF8String(color_class)
|
||||
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):
|
||||
"""Set text class.
|
||||
|
@ -353,8 +353,8 @@ cdef class Edje(Object):
|
|||
if isinstance(font, unicode):
|
||||
font = PyUnicode_AsUTF8String(font)
|
||||
edje_object_text_class_set(self.obj,
|
||||
<const_char *>text_class if text_class is not None else NULL,
|
||||
<const_char *>font if font 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,
|
||||
size)
|
||||
|
||||
property scale:
|
||||
|
@ -492,7 +492,7 @@ cdef class Edje(Object):
|
|||
":rtype: bool"
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""
|
||||
|
@ -508,7 +508,7 @@ cdef class Edje(Object):
|
|||
cdef Evas_Object *obj
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
def part_geometry_get(self, part):
|
||||
|
@ -516,7 +516,7 @@ cdef class Edje(Object):
|
|||
cdef int x, y, w, h
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
return (x, y, w, h)
|
||||
|
||||
|
@ -525,7 +525,7 @@ cdef class Edje(Object):
|
|||
cdef int w, h
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
return (w, h)
|
||||
|
||||
|
@ -534,7 +534,7 @@ cdef class Edje(Object):
|
|||
cdef int x, y
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
return (x, y)
|
||||
|
||||
|
@ -567,8 +567,8 @@ cdef class Edje(Object):
|
|||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
edje_object_part_text_set(self.obj,
|
||||
<const_char *>part if part is not None else NULL,
|
||||
<const_char *>text if text 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)
|
||||
|
||||
def part_text_get(self, part):
|
||||
"""Get the text of a given part.
|
||||
|
@ -577,22 +577,22 @@ cdef class Edje(Object):
|
|||
:rtype: str
|
||||
|
||||
"""
|
||||
cdef const_char *s
|
||||
cdef const char *s
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"Select all the text of the given TEXT or TEXTBLOCK part"
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"Deselect all the text of the given TEXT or TEXTBLOCK part"
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""Automatically escapes text if using TEXTBLOCK.
|
||||
|
@ -608,8 +608,8 @@ cdef class Edje(Object):
|
|||
if isinstance(text_to_escape, unicode):
|
||||
text_to_escape = PyUnicode_AsUTF8String(text_to_escape)
|
||||
edje_object_part_text_unescaped_set(self.obj,
|
||||
<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 *>part if part 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):
|
||||
"""Automatically removes escape from text if using TEXTBLOCK.
|
||||
|
@ -623,7 +623,7 @@ cdef class Edje(Object):
|
|||
cdef char *s
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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:
|
||||
return None
|
||||
else:
|
||||
|
@ -649,7 +649,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"Unswallow the given object from the edje"
|
||||
|
@ -659,13 +659,13 @@ cdef class Edje(Object):
|
|||
":rtype: efl.evas.Object"
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
":rtype: efl.evas.Object"
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""Set a parameter of the external part.
|
||||
|
@ -677,8 +677,8 @@ cdef class Edje(Object):
|
|||
:rtype: bool
|
||||
"""
|
||||
cdef Edje_External_Param p
|
||||
cdef const_char *c_part
|
||||
cdef const_char *c_param
|
||||
cdef const char *c_part
|
||||
cdef const char *c_param
|
||||
|
||||
if isinstance(part, unicode):
|
||||
str1 = PyUnicode_AsUTF8String(part)
|
||||
|
@ -729,8 +729,8 @@ cdef class Edje(Object):
|
|||
:return: *None* for errors, other values depending on the parameter type.
|
||||
"""
|
||||
cdef Edje_External_Param p
|
||||
cdef const_char *c_part
|
||||
cdef const_char *c_param
|
||||
cdef const char *c_part
|
||||
cdef const char *c_param
|
||||
|
||||
if isinstance(part, unicode):
|
||||
str1 = PyUnicode_AsUTF8String(part)
|
||||
|
@ -780,7 +780,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""Prepend an item to a BOX part.
|
||||
|
@ -795,7 +795,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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,
|
||||
unsigned int pos):
|
||||
|
@ -808,7 +808,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""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)
|
||||
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))
|
||||
|
||||
def part_box_remove(self, part, Object obj):
|
||||
|
@ -837,7 +837,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""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)
|
||||
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):
|
||||
"""Removes all objects from a BOX part.
|
||||
|
@ -866,7 +866,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""Pack an object inside a TABLE part.
|
||||
|
@ -882,7 +882,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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))
|
||||
|
||||
def part_table_unpack(self, part, Object child):
|
||||
|
@ -895,7 +895,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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))
|
||||
|
||||
def part_table_col_row_size_get(self, part):
|
||||
|
@ -908,7 +908,7 @@ cdef class Edje(Object):
|
|||
cdef int c, r
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
def part_table_clear(self, part, int clear):
|
||||
|
@ -923,7 +923,7 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""Retrieve a child from a table.
|
||||
|
@ -937,22 +937,22 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
":rtype: (name, value)"
|
||||
cdef double sv
|
||||
cdef const_char *sn
|
||||
cdef const char *sn
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
def part_drag_dir_get(self, part):
|
||||
":rtype: int"
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""Set the drag value of part
|
||||
|
@ -961,14 +961,14 @@ cdef class Edje(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
":rtype: tuple of float"
|
||||
cdef double dx, dy
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
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)
|
||||
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):
|
||||
":rtype: tuple of float"
|
||||
cdef double dw, dh
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
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)
|
||||
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):
|
||||
":rtype: tuple of float"
|
||||
cdef double dx, dy
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
def part_drag_step(self, part, double dx, double dy):
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
":rtype: tuple of float"
|
||||
cdef double dx, dy
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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)
|
||||
|
||||
def part_drag_page(self, part, double dx, double dy):
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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 Edje_Message_Int m
|
||||
|
@ -1270,8 +1270,8 @@ cdef class Edje(Object):
|
|||
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
edje_object_signal_callback_add(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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,
|
||||
signal_cb, <void*>lst)
|
||||
lst.append((func, args, kargs))
|
||||
|
||||
|
@ -1303,8 +1303,8 @@ cdef class Edje(Object):
|
|||
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
edje_object_signal_callback_del(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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,
|
||||
signal_cb)
|
||||
|
||||
def signal_emit(self, emission, source):
|
||||
|
@ -1312,8 +1312,8 @@ cdef class Edje(Object):
|
|||
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
edje_object_signal_emit(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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)
|
||||
|
||||
|
||||
# decorators
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
from libc.string cimport const_char
|
||||
from libc.stdlib cimport const_void
|
||||
|
||||
from efl.evas cimport Evas_Object, const_Evas_Object
|
||||
from efl.evas cimport Evas_Object
|
||||
from object_item cimport Elm_Object_Item
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
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)
|
||||
void elm_access_info_set(Evas_Object *obj, int type, const char *text)
|
||||
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_activate_cb_set(Evas_Object *obj, Elm_Access_Activate_Cb func, void *data)
|
||||
void elm_access_highlight_set(Evas_Object* obj)
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ cdef class Accessible(Object):
|
|||
"""
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
"""Get text to give information for specific type.
|
||||
|
@ -114,7 +114,7 @@ cdef class Accessible(Object):
|
|||
# if not callable(func):
|
||||
# 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):
|
||||
# """Set activate callback to activate highlight object.
|
||||
|
|
|
@ -87,7 +87,6 @@ Actionslider positions
|
|||
"""
|
||||
|
||||
from cpython cimport PyUnicode_AsUTF8String
|
||||
from libc.string cimport const_char
|
||||
from libc.stdint cimport uintptr_t
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
cdef class Actionslider(LayoutClass):
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
|
||||
from enums cimport Elm_Bg_Option
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object *elm_bg_add(Evas_Object *parent)
|
||||
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)
|
||||
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_option_set(Evas_Object *obj, Elm_Bg_Option option)
|
||||
Elm_Bg_Option elm_bg_option_get(Evas_Object *obj)
|
||||
void elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
|
||||
|
|
|
@ -116,8 +116,8 @@ cdef class Background(LayoutClass):
|
|||
"""
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_char *filename
|
||||
const_char *group
|
||||
const char *filename
|
||||
const char *group
|
||||
|
||||
elm_bg_file_get(self.obj, &filename, &group)
|
||||
return (_ctouni(filename), _ctouni(group))
|
||||
|
@ -132,21 +132,21 @@ cdef class Background(LayoutClass):
|
|||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if not elm_bg_file_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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):
|
||||
raise RuntimeError("Could not set background file.")
|
||||
|
||||
def file_set(self, filename, group = None):
|
||||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if not elm_bg_file_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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):
|
||||
raise RuntimeError("Could not set background file.")
|
||||
def file_get(self):
|
||||
cdef:
|
||||
const_char *filename
|
||||
const_char *group
|
||||
const char *filename
|
||||
const char *group
|
||||
|
||||
elm_bg_file_get(self.obj, &filename, &group)
|
||||
return (_ctouni(filename), _ctouni(group))
|
||||
|
|
|
@ -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
|
||||
|
||||
cdef extern from "Ecore.h":
|
||||
|
|
|
@ -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, \
|
||||
Elm_Calendar_Selectable, Elm_Calendar_Weekday
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "string.h":
|
||||
void *memcpy(void *dst, void *src, int n)
|
||||
|
@ -20,7 +19,7 @@ cdef extern from "time.h":
|
|||
int tm_isdst
|
||||
|
||||
long int tm_gmtoff
|
||||
const_char *tm_zone
|
||||
const char *tm_zone
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
|
||||
|
@ -30,8 +29,8 @@ cdef extern from "Elementary.h":
|
|||
pass
|
||||
|
||||
Evas_Object * elm_calendar_add(Evas_Object *parent)
|
||||
const_char ** elm_calendar_weekdays_names_get(Evas_Object *obj)
|
||||
void elm_calendar_weekdays_names_set(Evas_Object *obj, const_char *weekdays[])
|
||||
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_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_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)
|
||||
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)
|
||||
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_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_interval_set(Evas_Object *obj, double interval)
|
||||
double elm_calendar_interval_get(Evas_Object *obj)
|
||||
|
|
|
@ -263,7 +263,7 @@ cdef class CalendarMark(object):
|
|||
time.tm_isdst = tmtup.tm_isdst
|
||||
if isinstance(mark_type, unicode): mark_type = PyUnicode_AsUTF8String(mark_type)
|
||||
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)
|
||||
|
||||
def delete(self):
|
||||
|
@ -448,7 +448,7 @@ cdef class Calendar(LayoutClass):
|
|||
def __get__(self):
|
||||
cdef:
|
||||
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()
|
||||
CalendarMark o
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ cdef extern from "Elementary.h":
|
|||
|
||||
struct _Elm_Drag_User_Info:
|
||||
Elm_Sel_Format format
|
||||
const_char *data
|
||||
const char *data
|
||||
Eina_List *icons
|
||||
Elm_Xdnd_Action action
|
||||
Elm_Drag_Icon_Create_Cb createicon
|
||||
|
@ -56,13 +56,13 @@ cdef extern from "Elementary.h":
|
|||
Elm_Drop_Item_Container_Cb dropcb, void *cbdata)
|
||||
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_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_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)
|
||||
|
||||
cdef class SelectionData(object):
|
||||
|
@ -89,7 +89,7 @@ cdef class SelectionData(object):
|
|||
property data:
|
||||
def __get__(self):
|
||||
# TODO: void *
|
||||
return <const_char *>self.sel_data.data
|
||||
return <const char *>self.sel_data.data
|
||||
|
||||
property len:
|
||||
""":type: size_t"""
|
||||
|
@ -385,7 +385,7 @@ cdef class DragUserInfo(object):
|
|||
public list icons
|
||||
public object createicon, createdata, dragpos, dragdata
|
||||
public object acceptcb, acceptdata, dragdone, donecbdata
|
||||
const_char *_data
|
||||
const char *_data
|
||||
|
||||
property data:
|
||||
def __get__(self):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from efl.evas cimport Evas_Object, const_Evas_Object, const_Eina_List, Eina_Bool
|
||||
from object_item cimport Elm_Object_Item, const_Elm_Object_Item
|
||||
from efl.evas cimport Evas_Object, Eina_List, Eina_Bool
|
||||
from object_item cimport Elm_Object_Item
|
||||
from enums cimport Elm_Colorselector_Mode
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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)
|
||||
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_name_set(Evas_Object *obj, const_char *palette_name)
|
||||
const_char * elm_colorselector_palette_name_get(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)
|
||||
void elm_colorselector_palette_name_set(Evas_Object *obj, const char *palette_name)
|
||||
const char * elm_colorselector_palette_name_get(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)
|
||||
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)
|
||||
|
|
|
@ -240,13 +240,13 @@ cdef class Colorselector(LayoutClass):
|
|||
s = palette_name
|
||||
if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
|
||||
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):
|
||||
s = palette_name
|
||||
if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
|
||||
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):
|
||||
return _ctouni(elm_colorselector_palette_name_get(self.obj))
|
||||
|
||||
|
@ -263,7 +263,7 @@ cdef class Colorselector(LayoutClass):
|
|||
"""
|
||||
cdef:
|
||||
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:
|
||||
ret.append(_object_item_to_python(<Elm_Object_Item *>lst.data))
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Coord, Evas_Object, Evas_Font_Size
|
||||
from libc.string cimport const_char
|
||||
from efl.evas cimport Eina_Bool, Eina_List, Evas_Coord, Evas_Object, \
|
||||
Evas_Font_Size
|
||||
from enums cimport Elm_Softcursor_Mode
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
ctypedef struct Elm_Font_Overlay:
|
||||
const_char *text_class
|
||||
const_char *font
|
||||
const char *text_class
|
||||
const char *font
|
||||
Evas_Font_Size size
|
||||
|
||||
ctypedef struct Elm_Text_Class:
|
||||
const_char *name
|
||||
const_char *desc
|
||||
const char *name
|
||||
const char *desc
|
||||
|
||||
Eina_Bool elm_config_save()
|
||||
void elm_config_reload()
|
||||
void elm_config_all_flush()
|
||||
|
||||
const_char * elm_config_profile_get()
|
||||
const_char * elm_config_profile_dir_get(const_char *profile, Eina_Bool is_user)
|
||||
void elm_config_profile_dir_free(const_char *p_dir)
|
||||
const char * elm_config_profile_get()
|
||||
const char * elm_config_profile_dir_get(const char *profile, Eina_Bool is_user)
|
||||
void elm_config_profile_dir_free(const char *p_dir)
|
||||
Eina_List * elm_config_profile_list_get()
|
||||
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()
|
||||
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()
|
||||
void elm_config_password_show_last_timeout_set(double password_show_last_timeout)
|
||||
|
||||
const_char * elm_config_engine_get()
|
||||
void elm_config_engine_set(const_char *engine)
|
||||
const_char * elm_config_preferred_engine_get()
|
||||
void elm_config_preferred_engine_set(const_char *engine)
|
||||
const char * elm_config_engine_get()
|
||||
void elm_config_engine_set(const char *engine)
|
||||
const char * elm_config_preferred_engine_get()
|
||||
void elm_config_preferred_engine_set(const char *engine)
|
||||
|
||||
Eina_List * elm_config_text_classes_list_get()
|
||||
void elm_config_text_classes_list_free(Eina_List *list)
|
||||
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: void elm_config_access_set(Eina_Bool is_access)
|
||||
Eina_Bool elm_config_selection_unfocused_clear_get()
|
||||
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()
|
||||
Evas_Coord elm_config_finger_size_get()
|
||||
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()
|
||||
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()
|
||||
void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout)
|
||||
|
|
|
@ -168,7 +168,7 @@ cdef class Configuration(object):
|
|||
return _ctouni(elm_config_profile_get())
|
||||
def __set__(self, 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):
|
||||
"""profile_dir_get(unicode profile, bool is_user)
|
||||
|
@ -188,7 +188,7 @@ cdef class Configuration(object):
|
|||
"""
|
||||
if isinstance(profile, unicode): profile = PyUnicode_AsUTF8String(profile)
|
||||
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))
|
||||
|
||||
property profile_list:
|
||||
|
@ -561,7 +561,7 @@ cdef class Configuration(object):
|
|||
def __set__(self, engine):
|
||||
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
|
||||
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:
|
||||
"""Get Elementary's preferred engine to use.
|
||||
|
@ -581,7 +581,7 @@ cdef class Configuration(object):
|
|||
def __set__(self, engine):
|
||||
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
|
||||
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:
|
||||
"""Get Elementary's list of supported text classes.
|
||||
|
@ -593,8 +593,8 @@ cdef class Configuration(object):
|
|||
cdef:
|
||||
Eina_List *lst
|
||||
Elm_Text_Class *data
|
||||
const_char *name
|
||||
const_char *desc
|
||||
const char *name
|
||||
const char *desc
|
||||
|
||||
ret = []
|
||||
lst = elm_config_text_classes_list_get()
|
||||
|
@ -621,10 +621,10 @@ cdef class Configuration(object):
|
|||
"""
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_Eina_List *lst
|
||||
const Eina_List *lst
|
||||
Elm_Font_Overlay *data
|
||||
const_char *text_class
|
||||
const_char *font
|
||||
const char *text_class
|
||||
const char *font
|
||||
Evas_Font_Size size
|
||||
|
||||
ret = []
|
||||
|
@ -667,8 +667,8 @@ cdef class Configuration(object):
|
|||
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
|
||||
if isinstance(a2, unicode): a2 = PyUnicode_AsUTF8String(a2)
|
||||
elm_config_font_overlay_set(
|
||||
<const_char *>a1 if a1 is not None else NULL,
|
||||
<const_char *>a2 if a2 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,
|
||||
size)
|
||||
|
||||
# TODO:
|
||||
|
@ -717,7 +717,7 @@ cdef class Configuration(object):
|
|||
a1 = text_class
|
||||
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
|
||||
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):
|
||||
"""font_overlay_apply()
|
||||
|
@ -955,14 +955,14 @@ def preferred_engine_get():
|
|||
def preferred_engine_set(engine):
|
||||
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
|
||||
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():
|
||||
return _ctouni(elm_config_engine_get())
|
||||
def engine_set(engine):
|
||||
if isinstance(engine, unicode): engine = PyUnicode_AsUTF8String(engine)
|
||||
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():
|
||||
return elm_config_scale_get()
|
||||
|
|
|
@ -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 enums cimport Elm_Ctxpopup_Direction
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
||||
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_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)
|
||||
void elm_ctxpopup_dismiss(Evas_Object *obj)
|
||||
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)
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ cdef class CtxpopupItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -249,7 +249,7 @@ cdef class Ctxpopup(LayoutClass):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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,
|
||||
cb, <void*>ret)
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
from efl.evas cimport Evas_Object, Eina_Bool
|
||||
from general cimport tm
|
||||
from enums cimport Elm_Datetime_Field_Type
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object * elm_datetime_add(Evas_Object *parent)
|
||||
const_char * elm_datetime_format_get(Evas_Object *obj)
|
||||
void elm_datetime_format_set(Evas_Object *obj, const_char *fmt)
|
||||
const char * elm_datetime_format_get(Evas_Object *obj)
|
||||
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_set(Evas_Object *obj, tm *maxtime)
|
||||
Eina_Bool elm_datetime_value_min_get(Evas_Object *obj, tm *mintime)
|
||||
|
|
|
@ -377,7 +377,7 @@ cdef class Datetime(Object):
|
|||
def __set__(self, fmt):
|
||||
if isinstance(fmt, unicode): fmt = PyUnicode_AsUTF8String(fmt)
|
||||
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:
|
||||
"""The upper boundary of a field.
|
||||
|
|
|
@ -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 libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object *elm_dayselector_add(Evas_Object *parent)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
unsigned int elm_dayselector_weekend_length_get(const_Evas_Object *obj)
|
||||
void elm_dayselector_weekdays_names_set(Evas_Object *obj, const_char *weekdays[])
|
||||
Eina_List *elm_dayselector_weekdays_names_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[])
|
||||
Eina_List *elm_dayselector_weekdays_names_get(const Evas_Object *obj)
|
||||
|
|
|
@ -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 enums cimport Elm_Scroller_Policy
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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)
|
||||
int elm_diskselector_display_item_num_get(Evas_Object *obj)
|
||||
void elm_diskselector_clear(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)
|
||||
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_selected_item_get(Evas_Object *obj)
|
||||
void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected)
|
||||
Eina_Bool elm_diskselector_item_selected_get(Elm_Object_Item *it)
|
||||
|
|
|
@ -166,7 +166,7 @@ cdef class DiskselectorItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -365,7 +365,7 @@ cdef class Diskselector(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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,
|
||||
cb, <void*>ret)
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
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, \
|
||||
Elm_Scroller_Policy, Elm_Input_Panel_Layout, Elm_Input_Panel_Lang, \
|
||||
Elm_Input_Panel_Lang, Elm_Input_Panel_Return_Key_Type, \
|
||||
Elm_Autocapital_Type, Elm_Icon_Type, Elm_Sel_Type, Elm_Sel_Format, \
|
||||
Elm_Xdnd_Action
|
||||
from libc.string cimport const_char
|
||||
from libc.stdlib cimport const_void
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
ctypedef struct Elm_Entry_Anchor_Info:
|
||||
|
@ -36,8 +34,6 @@ cdef extern from "Elementary.h":
|
|||
ctypedef struct Elm_Entry_Context_Menu_Item:
|
||||
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 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.
|
||||
ctypedef struct Elm_Entry_Filter_Accept_Set:
|
||||
const_char *accepted # Set of characters accepted in the entry.
|
||||
const_char *rejected # Set of characters rejected from the entry.
|
||||
const char *accepted # Set of characters accepted in the entry.
|
||||
const char *rejected # Set of characters rejected from the entry.
|
||||
|
||||
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)
|
||||
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)
|
||||
Eina_Bool elm_entry_single_line_get(Evas_Object *obj)
|
||||
void elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
|
||||
Eina_Bool elm_entry_password_get(Evas_Object *obj)
|
||||
void elm_entry_entry_set(Evas_Object *obj, const_char *entry)
|
||||
const_char * elm_entry_entry_get(Evas_Object *obj)
|
||||
void elm_entry_entry_append(Evas_Object *obj, const_char *text)
|
||||
void elm_entry_entry_set(Evas_Object *obj, const char *entry)
|
||||
const char * elm_entry_entry_get(Evas_Object *obj)
|
||||
void elm_entry_entry_append(Evas_Object *obj, const char *text)
|
||||
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)
|
||||
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)
|
||||
Elm_Wrap_Type elm_entry_line_wrap_get(Evas_Object *obj)
|
||||
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)
|
||||
Eina_Bool elm_entry_cursor_is_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)
|
||||
void elm_entry_cursor_pos_set(Evas_Object *obj, int pos)
|
||||
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_paste(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)
|
||||
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)
|
||||
|
@ -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_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)
|
||||
char * elm_entry_markup_to_utf8(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)
|
||||
void elm_entry_file_get(Evas_Object *obj, const_char **file, Elm_Text_Format *format)
|
||||
char * elm_entry_markup_to_utf8(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)
|
||||
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_autosave_set(Evas_Object *obj, Eina_Bool autosave)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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_hide(Evas_Object *obj)
|
||||
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)
|
||||
# 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_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)
|
||||
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)
|
||||
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)
|
||||
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_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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
||||
Eina_Bool elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata)
|
||||
|
|
|
@ -552,24 +552,24 @@ def Entry_markup_to_utf8(string):
|
|||
"""Entry_markup_to_utf8(string)"""
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
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.")
|
||||
def Entry_utf8_to_markup(string):
|
||||
"""Entry_utf8_to_markup(string)"""
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
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):
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
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):
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
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):
|
||||
"""
|
||||
|
@ -606,8 +606,8 @@ cdef class EntryContextMenuItem(object):
|
|||
"""
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_char *icon_file
|
||||
const_char *icon_group
|
||||
const char *icon_file
|
||||
const char *icon_group
|
||||
Elm_Icon_Type icon_type
|
||||
elm_entry_context_menu_item_icon_get(self.item,
|
||||
&icon_file,
|
||||
|
@ -822,7 +822,7 @@ cdef class Entry(LayoutClass):
|
|||
"""
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
"""text_style_user_pop()
|
||||
|
@ -909,12 +909,12 @@ cdef class Entry(LayoutClass):
|
|||
def __set__(self, entry):
|
||||
if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry)
|
||||
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):
|
||||
if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry)
|
||||
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):
|
||||
return _ctouni(elm_entry_entry_get(self.obj))
|
||||
|
||||
|
@ -935,7 +935,7 @@ cdef class Entry(LayoutClass):
|
|||
"""
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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:
|
||||
"""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
|
||||
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
|
||||
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
|
||||
|
@ -1035,7 +1035,7 @@ cdef class Entry(LayoutClass):
|
|||
"""
|
||||
if isinstance(entry, unicode): entry = PyUnicode_AsUTF8String(entry)
|
||||
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:
|
||||
"""The line wrap type to use on multi-line entries.
|
||||
|
@ -1245,7 +1245,7 @@ cdef class Entry(LayoutClass):
|
|||
|
||||
"""
|
||||
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)
|
||||
|
||||
free(<void *>text)
|
||||
|
@ -1358,8 +1358,8 @@ cdef class Entry(LayoutClass):
|
|||
if isinstance(icon_file, unicode): icon_file = PyUnicode_AsUTF8String(icon_file)
|
||||
|
||||
elm_entry_context_menu_item_add(self.obj,
|
||||
<const_char *>label if label is not None else NULL,
|
||||
<const_char *>icon_file if icon_file 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,
|
||||
icon_type,
|
||||
cb,
|
||||
<void *>data if func is not None else NULL)
|
||||
|
@ -1495,14 +1495,14 @@ cdef class Entry(LayoutClass):
|
|||
"""markup_to_utf8(string)"""
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
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.")
|
||||
def utf8_to_markup(self, string):
|
||||
"""utf8_to_markup(string)"""
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
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:
|
||||
"""The file for the text to display and then edit.
|
||||
|
@ -1523,7 +1523,7 @@ cdef class Entry(LayoutClass):
|
|||
|
||||
"""
|
||||
def __get__(self):
|
||||
cdef const_char *file
|
||||
cdef const char *file
|
||||
cdef Elm_Text_Format format
|
||||
elm_entry_file_get(self.obj, &file, &format)
|
||||
return (_ctouni(file), format)
|
||||
|
@ -1534,7 +1534,7 @@ cdef class Entry(LayoutClass):
|
|||
a2 = file_format
|
||||
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
|
||||
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):
|
||||
raise RuntimeError("Could not set file")
|
||||
|
||||
|
@ -1543,11 +1543,11 @@ cdef class Entry(LayoutClass):
|
|||
a2 = file_format
|
||||
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
|
||||
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):
|
||||
raise RuntimeError("Could not set file")
|
||||
def file_get(self):
|
||||
cdef const_char *file
|
||||
cdef const char *file
|
||||
cdef Elm_Text_Format format
|
||||
elm_entry_file_get(self.obj, &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
|
||||
|
||||
# """
|
||||
# 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:
|
||||
# def input_panel_imdata_get(self, data, length):
|
||||
|
@ -2012,12 +2012,12 @@ cdef class Entry(LayoutClass):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_entry_anchor_hover_style_get(self.obj))
|
||||
|
||||
|
|
|
@ -1,35 +1,34 @@
|
|||
from efl.eina cimport Eina_Bool, const_Eina_List
|
||||
from efl.evas cimport Evas_Object, const_Evas_Object, Evas_Coord
|
||||
from efl.eina cimport Eina_Bool, Eina_List
|
||||
from efl.evas cimport Evas_Object, Evas_Coord
|
||||
from enums cimport Elm_Fileselector_Mode, Elm_Fileselector_Sort
|
||||
from libc.string cimport const_char
|
||||
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
Eina_Bool elm_fileselector_expandable_get(const_Evas_Object *obj)
|
||||
void elm_fileselector_path_set(Evas_Object *obj, const_char *path)
|
||||
const_char * elm_fileselector_path_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)
|
||||
const char * elm_fileselector_path_get(const Evas_Object *obj)
|
||||
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)
|
||||
Eina_Bool elm_fileselector_multi_select_get(const_Evas_Object *obj)
|
||||
Eina_Bool elm_fileselector_selected_set(Evas_Object *obj, const_char *path)
|
||||
const_char * elm_fileselector_selected_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_custom_filter_append(Evas_Object *obj, Elm_Fileselector_Filter_Func func, void *data, const_char *filter_name)
|
||||
Eina_Bool elm_fileselector_multi_select_get(const Evas_Object *obj)
|
||||
Eina_Bool elm_fileselector_selected_set(Evas_Object *obj, const char *path)
|
||||
const char * elm_fileselector_selected_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_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_hidden_visible_set(Evas_Object *obj, Eina_Bool visible)
|
||||
Eina_Bool elm_fileselector_hidden_visible_get(const_Evas_Object *obj)
|
||||
Elm_Fileselector_Sort elm_fileselector_sort_method_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)
|
||||
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_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)
|
||||
|
|
|
@ -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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
try:
|
||||
return cb_func(_ctouni(path), is_dir, cb_data)
|
||||
|
@ -290,12 +290,12 @@ cdef class Fileselector(LayoutClass):
|
|||
def __set__(self, path):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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):
|
||||
return _ctouni(elm_fileselector_path_get(self.obj))
|
||||
|
||||
|
@ -385,13 +385,13 @@ cdef class Fileselector(LayoutClass):
|
|||
def __set__(self, path):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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")
|
||||
|
||||
def selected_set(self, path):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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")
|
||||
def selected_get(self):
|
||||
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(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name)
|
||||
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
|
||||
|
||||
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)
|
||||
elm_fileselector_custom_filter_append(self.obj,
|
||||
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):
|
||||
"""
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object * elm_fileselector_button_add(Evas_Object *parent)
|
||||
void elm_fileselector_button_window_title_set(Evas_Object *obj, const_char *title)
|
||||
const_char * elm_fileselector_button_window_title_get(Evas_Object *obj)
|
||||
void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title)
|
||||
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_get(Evas_Object *obj, Evas_Coord *width, Evas_Coord *height)
|
||||
void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value)
|
||||
|
|
|
@ -93,7 +93,7 @@ from fileselector cimport elm_fileselector_path_set, \
|
|||
cimport enums
|
||||
|
||||
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
|
||||
|
||||
cdef class FileselectorButton(Button):
|
||||
|
@ -123,12 +123,12 @@ cdef class FileselectorButton(Button):
|
|||
def __set__(self, title):
|
||||
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
|
||||
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):
|
||||
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
|
||||
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):
|
||||
return _ctouni(elm_fileselector_button_window_title_get(self.obj))
|
||||
|
||||
|
@ -203,7 +203,7 @@ cdef class FileselectorButton(Button):
|
|||
def path_set(self, path):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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")
|
||||
def path_get(self):
|
||||
return _ctouni(elm_fileselector_path_get(self.obj))
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object * elm_fileselector_entry_add(Evas_Object *parent)
|
||||
void elm_fileselector_entry_window_title_set(Evas_Object *obj, const_char *title)
|
||||
const_char * elm_fileselector_entry_window_title_get(Evas_Object *obj)
|
||||
void elm_fileselector_entry_window_title_set(Evas_Object *obj, const char *title)
|
||||
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_get(Evas_Object *obj, Evas_Coord *width, Evas_Coord *height)
|
||||
void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value)
|
||||
|
|
|
@ -109,7 +109,7 @@ from fileselector cimport elm_fileselector_path_set, \
|
|||
cimport enums
|
||||
|
||||
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
|
||||
|
||||
cdef class FileselectorEntry(LayoutClass):
|
||||
|
@ -144,12 +144,12 @@ cdef class FileselectorEntry(LayoutClass):
|
|||
def __set__(self, title):
|
||||
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
|
||||
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):
|
||||
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
|
||||
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):
|
||||
return _ctouni(elm_fileselector_entry_window_title_get(self.obj))
|
||||
|
||||
|
@ -224,7 +224,7 @@ cdef class FileselectorEntry(LayoutClass):
|
|||
def path_set(self, path):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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")
|
||||
def path_get(self):
|
||||
return _ctouni(elm_fileselector_path_get(self.obj))
|
||||
|
@ -310,12 +310,12 @@ cdef class FileselectorEntry(LayoutClass):
|
|||
def __set__(self, path):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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):
|
||||
if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path)
|
||||
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):
|
||||
return _ctouni(elm_fileselector_selected_get(self.obj))
|
||||
|
||||
|
|
|
@ -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 object_item cimport Elm_Object_Item, const_Elm_Object_Item, ObjectItem
|
||||
from libc.string cimport const_char
|
||||
from object_item cimport Elm_Object_Item, ObjectItem
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object *elm_flipselector_add(Evas_Object *parent)
|
||||
void elm_flipselector_flip_next(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_prepend(Evas_Object *obj, const_char *label, Evas_Smart_Cb func, void *data)
|
||||
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_last_item_get(const_Evas_Object *obj)
|
||||
Elm_Object_Item *elm_flipselector_selected_item_get(const_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_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data)
|
||||
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_last_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)
|
||||
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_next_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_next_get(const Elm_Object_Item *it)
|
||||
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)
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ cdef class FlipSelectorItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -166,7 +166,7 @@ cdef class FlipSelectorItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -282,7 +282,7 @@ cdef class FlipSelector(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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)
|
||||
|
||||
if item != NULL:
|
||||
|
@ -313,7 +313,7 @@ cdef class FlipSelector(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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)
|
||||
|
||||
if item != NULL:
|
||||
|
|
|
@ -16,15 +16,14 @@
|
|||
# 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 Evas_Object, const_Evas_Object, Evas_Smart_Cb, \
|
||||
Evas_Font_Size, Evas_Coord
|
||||
from efl.evas cimport Eina_List, Eina_Bool
|
||||
from efl.evas cimport Evas_Object, Evas_Smart_Cb, Evas_Font_Size, Evas_Coord
|
||||
from efl.evas.enums cimport Evas_Callback_Type
|
||||
#from efl.evas cimport Evas_Load_Error
|
||||
#from efl.evas cimport Evas_Event_Flags
|
||||
from enums cimport Elm_Policy, Elm_Policy_Quit
|
||||
from libc.string cimport const_char, memcpy, strdup
|
||||
from libc.stdlib cimport const_void, free
|
||||
from libc.string cimport memcpy, strdup
|
||||
from libc.stdlib cimport free
|
||||
|
||||
cdef extern from "time.h":
|
||||
struct tm:
|
||||
|
@ -39,13 +38,13 @@ cdef extern from "time.h":
|
|||
int tm_isdst
|
||||
|
||||
long int tm_gmtoff
|
||||
const_char *tm_zone
|
||||
const char *tm_zone
|
||||
|
||||
cdef extern from "Ecore.h":
|
||||
ctypedef void (*Ecore_Cb)(void *data)
|
||||
|
||||
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":
|
||||
#colors
|
||||
|
@ -56,7 +55,7 @@ cdef extern from "Elementary.h":
|
|||
unsigned int a
|
||||
|
||||
ctypedef struct _Elm_Custom_Palette:
|
||||
const_char *palette_name
|
||||
const char *palette_name
|
||||
Eina_List *color_list
|
||||
|
||||
#event
|
||||
|
@ -64,17 +63,17 @@ cdef extern from "Elementary.h":
|
|||
|
||||
#font
|
||||
ctypedef struct Elm_Font_Overlay:
|
||||
const_char *text_class
|
||||
const_char *font
|
||||
const char *text_class
|
||||
const char *font
|
||||
Evas_Font_Size size
|
||||
|
||||
#text
|
||||
ctypedef struct Elm_Text_Class:
|
||||
const_char *name
|
||||
const_char *desc
|
||||
const char *name
|
||||
const char *desc
|
||||
|
||||
ctypedef struct Elm_Font_Properties:
|
||||
const_char *name
|
||||
const char *name
|
||||
Eina_List *styles
|
||||
|
||||
#tooltip
|
||||
|
@ -104,7 +103,7 @@ cdef extern from "Elementary.h":
|
|||
int elm_policy_get(unsigned int policy)
|
||||
|
||||
# General - Language
|
||||
void elm_language_set(const_char *lang)
|
||||
void elm_language_set(const char *lang)
|
||||
|
||||
# Cache
|
||||
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)
|
||||
|
||||
# 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)
|
||||
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)
|
||||
# TODO: Eina_Hash * elm_font_available_hash_add(Eina_List *list)
|
||||
# TODO: void elm_font_available_hash_del(Eina_Hash *hash)
|
||||
|
||||
# Debug
|
||||
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_dump(const Evas_Object *top)
|
||||
void elm_object_tree_dot_dump(const Evas_Object *top, const char *file)
|
||||
|
||||
cdef int PY_EFL_ELM_LOG_DOMAIN
|
||||
|
|
|
@ -362,7 +362,7 @@ def language_set(lang not None):
|
|||
|
||||
"""
|
||||
if isinstance(lang, unicode): lang = PyUnicode_AsUTF8String(lang)
|
||||
elm_language_set(<const_char *>lang)
|
||||
elm_language_set(<const char *>lang)
|
||||
|
||||
def 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)
|
||||
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
|
||||
|
||||
|
@ -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(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
fc_name = elm_font_fontconfig_name_get(
|
||||
<const_char *>font_name,
|
||||
<const_char *>style if style is not None else NULL
|
||||
<const char *>font_name,
|
||||
<const char *>style if style is not None else NULL
|
||||
)
|
||||
|
||||
ret = _touni(fc_name)
|
||||
|
@ -494,4 +494,4 @@ def object_tree_dot_dump(evasObject top, 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)
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
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 general cimport Elm_Tooltip_Item_Content_Cb
|
||||
from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Scroller_Policy, \
|
||||
Elm_Object_Select_Mode
|
||||
from libc.string cimport const_char
|
||||
from libc.stdlib cimport const_void
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
ctypedef char *(*GengridItemLabelGetFunc) (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 char *(*GengridItemLabelGetFunc) (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 void (*GengridItemDelFunc) (void *data, Evas_Object *obj)
|
||||
|
||||
ctypedef struct Elm_Gengrid_Item_Class_Func:
|
||||
|
@ -22,7 +20,6 @@ cdef extern from "Elementary.h":
|
|||
ctypedef struct Elm_Gengrid_Item_Class:
|
||||
char *item_style
|
||||
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)
|
||||
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)
|
||||
void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool setting)
|
||||
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_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_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_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_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_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)
|
||||
Eina_List * elm_gengrid_selected_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_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_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_unset(Elm_Object_Item *item)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
void elm_gengrid_item_cursor_set(Elm_Object_Item *item, const_char *cursor)
|
||||
const_char * elm_gengrid_item_cursor_get(Elm_Object_Item *item)
|
||||
void elm_gengrid_item_cursor_set(Elm_Object_Item *item, const char *cursor)
|
||||
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_style_set(Elm_Object_Item *item, const_char *style)
|
||||
const_char * elm_gengrid_item_cursor_style_get(Elm_Object_Item *item)
|
||||
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)
|
||||
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)
|
||||
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_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)
|
||||
|
|
|
@ -307,7 +307,7 @@ def _cb_object_item_conv(uintptr_t addr):
|
|||
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
|
||||
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:
|
||||
GengridItem item = <GengridItem>data
|
||||
unicode u = _ctouni(part)
|
||||
|
@ -329,7 +329,7 @@ cdef char *_py_elm_gengrid_item_text_get(void *data, Evas_Object *obj, const_cha
|
|||
else:
|
||||
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:
|
||||
GengridItem item = <GengridItem>data
|
||||
unicode u = _ctouni(part)
|
||||
|
@ -352,7 +352,7 @@ cdef Evas_Object *_py_elm_gengrid_item_content_get(void *data, Evas_Object *obj,
|
|||
else:
|
||||
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:
|
||||
GengridItem item = <GengridItem>data
|
||||
unicode u = _ctouni(part)
|
||||
|
@ -401,7 +401,7 @@ cdef void _py_elm_gengrid_item_func(void *data, Evas_Object *obj, void *event_in
|
|||
except:
|
||||
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:
|
||||
Elm_Object_Item *citem1 = <Elm_Object_Item *>data1
|
||||
Elm_Object_Item *citem2 = <Elm_Object_Item *>data2
|
||||
|
|
|
@ -324,13 +324,13 @@ cdef class GengridItem(ObjectItem):
|
|||
def __set__(self, text):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
# TODO: document this
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
"""tooltip_content_cb_set(func, *args, **kargs)
|
||||
|
@ -393,12 +393,12 @@ cdef class GengridItem(ObjectItem):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_gengrid_item_tooltip_style_get(self.item))
|
||||
|
||||
|
@ -427,7 +427,7 @@ cdef class GengridItem(ObjectItem):
|
|||
def __set__(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
elm_gengrid_item_cursor_unset(self.item)
|
||||
|
@ -435,7 +435,7 @@ cdef class GengridItem(ObjectItem):
|
|||
def cursor_set(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
return _ctouni(elm_gengrid_item_cursor_get(self.item))
|
||||
def cursor_unset(self):
|
||||
|
@ -449,12 +449,12 @@ cdef class GengridItem(ObjectItem):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_gengrid_item_cursor_style_get(self.item))
|
||||
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Eina_Compare_Cb, \
|
||||
Evas_Object, const_Evas_Object, Evas_Smart_Cb, Evas_Coord
|
||||
from efl.evas cimport Eina_Bool, Eina_List, Eina_Compare_Cb, \
|
||||
Evas_Object, Evas_Smart_Cb, Evas_Coord
|
||||
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 enums cimport Elm_Scroller_Policy, Elm_List_Mode, Elm_Object_Select_Mode, \
|
||||
Elm_Genlist_Item_Type, Elm_Genlist_Item_Scrollto_Type, \
|
||||
Elm_Genlist_Item_Field_Type
|
||||
from libc.string cimport const_char
|
||||
from libc.stdlib cimport const_void
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
ctypedef char *(*GenlistItemLabelGetFunc) (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 char *(*GenlistItemLabelGetFunc) (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 void (*GenlistItemDelFunc) (void *data, Evas_Object *obj)
|
||||
|
||||
ctypedef struct Elm_Genlist_Item_Class_Func:
|
||||
|
@ -22,9 +20,9 @@ cdef extern from "Elementary.h":
|
|||
GenlistItemDelFunc del_ "del"
|
||||
|
||||
ctypedef struct Elm_Genlist_Item_Class:
|
||||
const_char *item_style
|
||||
const_char *decorate_item_style
|
||||
const_char *decorate_all_item_style
|
||||
const char *item_style
|
||||
const char *decorate_item_style
|
||||
const char *decorate_all_item_style
|
||||
Elm_Genlist_Item_Class_Func func
|
||||
|
||||
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_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_unset(Elm_Object_Item *item)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
void elm_genlist_item_cursor_set(Elm_Object_Item *item, const_char *cursor)
|
||||
const_char * elm_genlist_item_cursor_get(Elm_Object_Item *it)
|
||||
void elm_genlist_item_cursor_set(Elm_Object_Item *item, const char *cursor)
|
||||
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_style_set(Elm_Object_Item *item, const_char *style)
|
||||
const_char * elm_genlist_item_cursor_style_get(Elm_Object_Item *item)
|
||||
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)
|
||||
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)
|
||||
|
||||
|
@ -87,17 +85,17 @@ cdef extern from "Elementary.h":
|
|||
|
||||
Elm_Object_Item * elm_genlist_item_parent_get(Elm_Object_Item *it)
|
||||
void elm_genlist_item_subitems_clear(Elm_Object_Item *item)
|
||||
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)
|
||||
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)
|
||||
void elm_genlist_item_expanded_set(Elm_Object_Item *item, Eina_Bool expanded)
|
||||
Eina_Bool elm_genlist_item_expanded_get(Elm_Object_Item *item)
|
||||
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_promote(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_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)
|
||||
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)
|
||||
const char * elm_genlist_item_decorate_mode_get(Elm_Object_Item *it)
|
||||
|
||||
Elm_Object_Item * elm_genlist_decorated_item_get(Evas_Object *obj)
|
||||
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)
|
||||
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_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)
|
||||
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:
|
||||
|
|
|
@ -574,7 +574,7 @@ def _cb_object_item_conv(uintptr_t addr):
|
|||
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
|
||||
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:
|
||||
GenlistItem item = <GenlistItem>data
|
||||
unicode u = _ctouni(part)
|
||||
|
@ -596,7 +596,7 @@ cdef char *_py_elm_genlist_item_text_get(void *data, Evas_Object *obj, const_cha
|
|||
else:
|
||||
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:
|
||||
GenlistItem item = <GenlistItem>data
|
||||
unicode u = _ctouni(part)
|
||||
|
@ -619,7 +619,7 @@ cdef Evas_Object *_py_elm_genlist_item_content_get(void *data, Evas_Object *obj,
|
|||
else:
|
||||
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:
|
||||
GenlistItem item = <GenlistItem>data
|
||||
unicode u = _ctouni(part)
|
||||
|
@ -668,7 +668,7 @@ cdef void _py_elm_genlist_item_func(void *data, Evas_Object *obj, void *event_in
|
|||
except:
|
||||
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:
|
||||
Elm_Object_Item *citem1 = <Elm_Object_Item *>data1
|
||||
Elm_Object_Item *citem2 = <Elm_Object_Item *>data2
|
||||
|
|
|
@ -412,7 +412,7 @@ cdef class GenlistItem(ObjectItem):
|
|||
"""
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
"""tooltip_content_cb_set(func, *args, **kargs)
|
||||
|
@ -472,7 +472,7 @@ cdef class GenlistItem(ObjectItem):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_genlist_item_tooltip_style_get(self.item))
|
||||
|
||||
|
@ -517,7 +517,7 @@ cdef class GenlistItem(ObjectItem):
|
|||
def __set__(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
return _ctouni(elm_genlist_item_cursor_get(self.item))
|
||||
|
@ -528,7 +528,7 @@ cdef class GenlistItem(ObjectItem):
|
|||
def cursor_set(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
return _ctouni(elm_genlist_item_cursor_get(self.item))
|
||||
def cursor_unset(self):
|
||||
|
@ -546,7 +546,7 @@ cdef class GenlistItem(ObjectItem):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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)
|
||||
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)
|
||||
|
||||
property decorate_mode:
|
||||
|
@ -776,7 +776,7 @@ cdef class GenlistItem(ObjectItem):
|
|||
a1 = decorate_it_type
|
||||
if isinstance(a1, unicode): a1 = PyUnicode_AsUTF8String(a1)
|
||||
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)
|
||||
def decorate_mode_get(self):
|
||||
return _ctouni(elm_genlist_item_decorate_mode_get(self.item))
|
||||
|
|
|
@ -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
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
|
@ -52,28 +52,28 @@ cdef extern from "Elementary.h":
|
|||
Evas_Object *elm_gesture_layer_add(Evas_Object *parent)
|
||||
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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_del(Evas_Object *obj, Elm_Gesture_State state, Elm_Gesture_Event_Cb cb, void *data)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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, \
|
||||
Elm_GLView_Render_Policy
|
||||
|
||||
|
@ -9,12 +9,12 @@ cdef extern from "Elementary.h":
|
|||
ctypedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj)
|
||||
|
||||
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_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)
|
||||
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_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)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb
|
||||
from object_item cimport Elm_Object_Item
|
||||
from enums cimport Elm_Icon_Type
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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)
|
||||
void elm_hoversel_clear(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)
|
||||
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)
|
||||
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_get(Elm_Object_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type)
|
||||
|
|
|
@ -157,8 +157,8 @@ cdef class HoverselItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
item = elm_hoversel_item_add(hoversel.obj,
|
||||
<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.label if self.label is not None else NULL,
|
||||
<const char *>self.icon_file if self.icon_file is not None else NULL,
|
||||
self.icon_type,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -189,14 +189,14 @@ cdef class HoverselItem(ObjectItem):
|
|||
self.icon_type = a3
|
||||
else:
|
||||
elm_hoversel_item_icon_set(self.item,
|
||||
<const_char *>a1 if a1 is not None else NULL,
|
||||
<const_char *>a2 if a2 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,
|
||||
a3)
|
||||
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_char *icon_file
|
||||
const_char *icon_group
|
||||
const char *icon_file
|
||||
const char *icon_group
|
||||
Elm_Icon_Type icon_type
|
||||
|
||||
if self.item == NULL:
|
||||
|
@ -218,13 +218,13 @@ cdef class HoverselItem(ObjectItem):
|
|||
self.icon_type = a3
|
||||
else:
|
||||
elm_hoversel_item_icon_set(self.item,
|
||||
<const_char *>a1 if a1 is not None else NULL,
|
||||
<const_char *>a2 if a2 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,
|
||||
a3)
|
||||
def icon_get(self):
|
||||
cdef:
|
||||
const_char *icon_file
|
||||
const_char *icon_group
|
||||
const char *icon_file
|
||||
const char *icon_group
|
||||
Elm_Icon_Type icon_type
|
||||
|
||||
if self.item == NULL:
|
||||
|
@ -357,8 +357,8 @@ cdef class Hoversel(Button):
|
|||
if isinstance(icon_file, unicode): icon_file = PyUnicode_AsUTF8String(icon_file)
|
||||
|
||||
item = elm_hoversel_item_add(self.obj,
|
||||
<const_char *>label if label is not None else NULL,
|
||||
<const_char *>icon_file if icon_file 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,
|
||||
icon_type,
|
||||
cb, <void*>ret)
|
||||
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from image cimport Image
|
||||
from enums cimport Elm_Icon_Lookup_Order, Elm_Icon_Type
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
|
||||
# Icon (api:DONE cb:DONE test:DONE doc:DONE py3:DONE)
|
||||
Evas_Object * elm_icon_add(Evas_Object *parent)
|
||||
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)
|
||||
const_char * elm_icon_standard_get(Evas_Object *obj)
|
||||
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)
|
||||
const char * elm_icon_standard_get(Evas_Object *obj)
|
||||
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)
|
||||
|
||||
|
|
|
@ -188,15 +188,15 @@ cdef class Icon(Image):
|
|||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
elm_icon_thumb_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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)
|
||||
|
||||
def thumb_set(self, filename, group = None):
|
||||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
elm_icon_thumb_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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)
|
||||
|
||||
property standard:
|
||||
"""The icon standards name.
|
||||
|
@ -234,13 +234,13 @@ cdef class Icon(Image):
|
|||
def __set__(self, name):
|
||||
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
|
||||
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")
|
||||
|
||||
def standard_set(self, name):
|
||||
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
|
||||
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):
|
||||
return _ctouni(elm_icon_standard_get(self.obj))
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from object cimport Object
|
||||
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":
|
||||
ctypedef struct Elm_Image_Progress:
|
||||
|
@ -16,9 +12,9 @@ cdef extern from "Elementary.h":
|
|||
Eina_Bool open_error
|
||||
|
||||
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_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)
|
||||
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)
|
||||
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)
|
||||
Eina_Bool elm_image_smooth_get(Evas_Object *obj)
|
||||
void elm_image_object_size_get(Evas_Object *obj, int *w, int *h)
|
||||
|
|
|
@ -113,7 +113,7 @@ ELM_IMAGE_FLIP_TRANSPOSE = enums.ELM_IMAGE_FLIP_TRANSPOSE
|
|||
ELM_IMAGE_FLIP_TRANSVERSE = enums.ELM_IMAGE_FLIP_TRANSVERSE
|
||||
|
||||
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
|
||||
|
||||
class ImageProgressInfo(object):
|
||||
|
@ -201,14 +201,14 @@ cdef class Image(Object):
|
|||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if not elm_image_file_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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):
|
||||
raise RuntimeError("Could not set file.")
|
||||
|
||||
def __get__(self):
|
||||
cdef:
|
||||
const_char *filename
|
||||
const_char *group
|
||||
const char *filename
|
||||
const char *group
|
||||
|
||||
elm_image_file_get(self.obj, &filename, &group)
|
||||
return (_ctouni(filename), _ctouni(group))
|
||||
|
@ -217,13 +217,13 @@ cdef class Image(Object):
|
|||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if not elm_image_file_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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):
|
||||
raise RuntimeError("Could not set file.")
|
||||
def file_get(self):
|
||||
cdef:
|
||||
const_char *filename
|
||||
const_char *group
|
||||
const char *filename
|
||||
const char *group
|
||||
|
||||
elm_image_file_get(self.obj, &filename, &group)
|
||||
return (_ctouni(filename), _ctouni(group))
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
from efl.evas cimport Eina_Bool, Eina_Compare_Cb, Evas_Object, Evas_Smart_Cb, \
|
||||
const_Evas_Object
|
||||
from efl.evas cimport Eina_Bool, Eina_Compare_Cb, Evas_Object, Evas_Smart_Cb
|
||||
from object cimport Object
|
||||
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":
|
||||
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)
|
||||
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_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_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_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_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_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_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)
|
||||
void elm_index_item_clear(Evas_Object *obj)
|
||||
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)
|
||||
Eina_Bool elm_index_horizontal_get(Evas_Object *obj)
|
||||
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)
|
||||
Eina_Bool elm_index_omit_enabled_get(const_Evas_Object *obj)
|
||||
Eina_Bool elm_index_omit_enabled_get(const Evas_Object *obj)
|
||||
|
|
|
@ -82,7 +82,7 @@ def _cb_object_item_conv(uintptr_t addr):
|
|||
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
|
||||
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"""
|
||||
cdef:
|
||||
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:
|
||||
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"""
|
||||
cdef:
|
||||
IndexItem item1 = <object>data1
|
||||
|
@ -184,7 +184,7 @@ cdef class IndexItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -209,7 +209,7 @@ cdef class IndexItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -235,7 +235,7 @@ cdef class IndexItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -261,7 +261,7 @@ cdef class IndexItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -300,7 +300,7 @@ cdef class IndexItem(ObjectItem):
|
|||
self.compare_func = compare_func
|
||||
self.data_compare_func = data_compare_func
|
||||
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,
|
||||
_index_compare_func, _index_data_compare_func)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
|
@ -15,5 +15,5 @@ cdef extern from "Elementary.h":
|
|||
double elm_label_slide_speed_get(Evas_Object *obj)
|
||||
# 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)
|
||||
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)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from efl.evas cimport Evas_Object, Eina_Bool
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object * elm_layout_add(Evas_Object *parent)
|
||||
|
|
|
@ -15,48 +15,47 @@
|
|||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from efl.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 libc.string cimport const_char
|
||||
|
||||
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":
|
||||
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_unset(Evas_Object *obj, const_char *swallow)
|
||||
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)
|
||||
Eina_Bool elm_layout_file_set(Evas_Object *obj, const_char *file, const_char *group)
|
||||
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_unset(Evas_Object *obj, const char *swallow)
|
||||
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)
|
||||
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_thaw(Evas_Object *obj)
|
||||
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_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)
|
||||
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_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)
|
||||
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_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)
|
||||
Eina_Bool elm_layout_table_clear(Evas_Object *obj, const_char *part, Eina_Bool clear)
|
||||
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_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)
|
||||
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_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)
|
||||
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_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)
|
||||
Eina_Bool elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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_get(Evas_Object *obj, const_char *part_name)
|
||||
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)
|
||||
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)
|
||||
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_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_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)
|
||||
Evas_Object * elm_layout_icon_get(Evas_Object *obj)
|
||||
void elm_layout_end_set(Evas_Object *obj, Evas_Object *end)
|
||||
|
|
|
@ -26,7 +26,7 @@ from object cimport Object
|
|||
import traceback
|
||||
|
||||
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)
|
||||
lst = tuple(<object>data)
|
||||
for func, args, kargs in lst:
|
||||
|
@ -93,7 +93,7 @@ cdef class LayoutClass(Object):
|
|||
swallow = None
|
||||
if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow)
|
||||
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):
|
||||
raise RuntimeError
|
||||
|
||||
|
@ -110,7 +110,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow)
|
||||
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):
|
||||
"""content_unset(unicode swallow)
|
||||
|
@ -127,7 +127,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(swallow, unicode): swallow = PyUnicode_AsUTF8String(swallow)
|
||||
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):
|
||||
"""text_set(unicode part, unicode text)
|
||||
|
@ -151,8 +151,8 @@ cdef class LayoutClass(Object):
|
|||
text = part
|
||||
part = None
|
||||
if not elm_layout_text_set(self.obj,
|
||||
<const_char *>part if part is not None else NULL,
|
||||
<const_char *>text if text 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):
|
||||
raise RuntimeError
|
||||
|
||||
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
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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:
|
||||
"""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(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if not elm_layout_file_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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):
|
||||
raise RuntimeError("Could not set file.")
|
||||
|
||||
def file_set(self, filename, group = None):
|
||||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if not elm_layout_file_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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):
|
||||
raise RuntimeError("Could not set file.")
|
||||
|
||||
def freeze(self):
|
||||
|
@ -253,9 +253,9 @@ cdef class LayoutClass(Object):
|
|||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
if not elm_layout_theme_set(self.obj,
|
||||
<const_char *>clas if clas 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 *>clas if clas 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):
|
||||
raise RuntimeError("Could not set theme.")
|
||||
|
||||
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(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
if not elm_layout_theme_set(self.obj,
|
||||
<const_char *>clas if clas 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 *>clas if clas 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):
|
||||
raise RuntimeError("Could not set theme.")
|
||||
|
||||
def signal_emit(self, emission, source):
|
||||
|
@ -287,8 +287,8 @@ cdef class LayoutClass(Object):
|
|||
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
elm_layout_signal_emit(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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)
|
||||
|
||||
def signal_callback_add(self, emission, source, func, *args, **kwargs):
|
||||
"""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(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
elm_layout_signal_callback_add(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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,
|
||||
layout_signal_callback, <void*>lst)
|
||||
lst.append((func, args, kwargs))
|
||||
|
||||
|
@ -366,8 +366,8 @@ cdef class LayoutClass(Object):
|
|||
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
elm_layout_signal_callback_del(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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,
|
||||
layout_signal_callback)
|
||||
|
||||
def box_append(self, part, evasObject child):
|
||||
|
@ -399,7 +399,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
raise RuntimeError("Could not add to box")
|
||||
|
||||
|
@ -432,7 +432,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
raise RuntimeError("Could not add to box")
|
||||
|
||||
|
@ -467,7 +467,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
raise RuntimeError("Could not add to box")
|
||||
|
||||
|
@ -502,7 +502,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
raise RuntimeError("Could not add to box")
|
||||
|
||||
|
@ -530,7 +530,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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))
|
||||
|
||||
def box_remove_all(self, part, clear):
|
||||
|
@ -561,7 +561,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
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 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):
|
||||
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)
|
||||
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))
|
||||
|
||||
def table_clear(self, part, clear):
|
||||
|
@ -663,7 +663,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
raise RuntimeError("Could not clear the table")
|
||||
|
||||
|
@ -728,7 +728,7 @@ cdef class LayoutClass(Object):
|
|||
"""
|
||||
if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
|
||||
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):
|
||||
"""sizing_eval()
|
||||
|
@ -772,8 +772,8 @@ cdef class LayoutClass(Object):
|
|||
if isinstance(part_name, unicode): part_name = PyUnicode_AsUTF8String(part_name)
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
if not elm_layout_part_cursor_set(self.obj,
|
||||
<const_char *>part_name if part_name is not None else NULL,
|
||||
<const_char *>cursor if cursor 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):
|
||||
raise RuntimeError("Could not set cursor to part")
|
||||
|
||||
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)
|
||||
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):
|
||||
"""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 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")
|
||||
|
||||
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(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
if not elm_layout_part_cursor_style_set(self.obj,
|
||||
<const_char *>part_name if part_name is not None else NULL,
|
||||
<const_char *>style if style 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):
|
||||
raise RuntimeError("Could not set cursor style to part")
|
||||
|
||||
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)
|
||||
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):
|
||||
"""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 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):
|
||||
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)
|
||||
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:
|
||||
"""Set accessibility to all texblock(text) parts in the layout object
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
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 enums cimport Elm_List_Mode, Elm_Object_Select_Mode, Elm_Scroller_Policy
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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)
|
||||
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_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_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_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_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_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_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)
|
||||
Eina_List *elm_list_items_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_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)
|
||||
Eina_Bool elm_list_focus_on_selection_get(const_Evas_Object *obj)
|
||||
Eina_Bool elm_list_focus_on_selection_get(const Evas_Object *obj)
|
||||
|
|
|
@ -291,7 +291,7 @@ cdef class ListItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -327,7 +327,7 @@ cdef class ListItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -365,7 +365,7 @@ cdef class ListItem(ObjectItem):
|
|||
cdef List list = before.widget
|
||||
item = elm_list_item_insert_before( list.obj,
|
||||
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,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -403,7 +403,7 @@ cdef class ListItem(ObjectItem):
|
|||
cdef List list = after.widget
|
||||
item = elm_list_item_insert_after( list.obj,
|
||||
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,
|
||||
cb, <void*>self)
|
||||
|
||||
|
@ -443,7 +443,7 @@ cdef class ListItem(ObjectItem):
|
|||
# cdef Elm_Object_Item *item
|
||||
|
||||
# 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,
|
||||
# end_obj,
|
||||
# cb,
|
||||
|
@ -721,7 +721,7 @@ cdef class List(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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,
|
||||
end.obj if end is not None else NULL,
|
||||
cb, <void*>self)
|
||||
|
@ -751,7 +751,7 @@ cdef class List(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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,
|
||||
end.obj if end is not None else NULL,
|
||||
cb, <void*>self)
|
||||
|
@ -783,7 +783,7 @@ cdef class List(Object):
|
|||
|
||||
item = elm_list_item_insert_before(self.obj,
|
||||
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,
|
||||
end.obj if end is not None else NULL,
|
||||
cb, <void*>self)
|
||||
|
@ -815,7 +815,7 @@ cdef class List(Object):
|
|||
|
||||
item = elm_list_item_insert_after(self.obj,
|
||||
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,
|
||||
end.obj if end is not None else NULL,
|
||||
cb, <void*>self)
|
||||
|
|
|
@ -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, \
|
||||
Elm_Map_Route_Type, Elm_Map_Source_Type, Elm_Map_Zoom_Mode
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
ctypedef void *Elm_Map_Overlay
|
||||
|
@ -14,26 +13,26 @@ cdef extern from "Elementary.h":
|
|||
|
||||
Evas_Object *elm_map_add(Evas_Object *parent)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
int elm_map_zoom_max_get(const_Evas_Object *obj)
|
||||
void elm_map_region_get(const_Evas_Object *obj, double *lon, double *lat)
|
||||
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_bring_in(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_region_to_canvas_convert(const_Evas_Object *obj, double lon, double lat, Evas_Coord *x, Evas_Coord *y)
|
||||
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_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_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)
|
||||
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)
|
||||
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)
|
||||
Elm_Map_Overlay *elm_map_overlay_add(Evas_Object *obj, double lon, double lat)
|
||||
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_visible_get(Elm_Map_Overlay *overlay)
|
||||
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)
|
||||
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_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)
|
||||
|
@ -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_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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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_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)
|
||||
const char * elm_map_route_node_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)
|
||||
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)
|
||||
|
||||
|
|
|
@ -395,7 +395,7 @@ cdef class MapName(object):
|
|||
data = (self, func, args, kwargs)
|
||||
if isinstance(address, unicode): address = PyUnicode_AsUTF8String(address)
|
||||
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)
|
||||
Py_INCREF(data)
|
||||
# XXX: why incref self in __init__?
|
||||
|
@ -1228,13 +1228,13 @@ cdef class Map(Object):
|
|||
if isinstance(user_agent, unicode):
|
||||
user_agent = PyUnicode_AsUTF8String(user_agent)
|
||||
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):
|
||||
if isinstance(user_agent, unicode):
|
||||
user_agent = PyUnicode_AsUTF8String(user_agent)
|
||||
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):
|
||||
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`
|
||||
|
||||
"""
|
||||
cdef const_char **lst
|
||||
cdef const char **lst
|
||||
|
||||
i = 0
|
||||
ret = []
|
||||
|
@ -1536,7 +1536,7 @@ cdef class Map(Object):
|
|||
if isinstance(source_name, unicode):
|
||||
source_name = PyUnicode_AsUTF8String(source_name)
|
||||
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):
|
||||
""" Get the name of currently used source for a specific type.
|
||||
|
|
|
@ -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":
|
||||
Evas_Object *elm_mapbuf_add(Evas_Object *parent)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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_set(Evas_Object *obj, int idx, int r, int g, int b, int a)
|
||||
|
|
|
@ -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_item cimport Elm_Object_Item, ObjectItem
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object *elm_menu_add(Evas_Object *parent)
|
||||
|
@ -11,9 +11,9 @@ cdef extern from "Elementary.h":
|
|||
void elm_menu_close(Evas_Object *obj)
|
||||
Eina_List *elm_menu_items_get(Evas_Object *obj)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
|
|
@ -89,8 +89,8 @@ cdef class MenuItem(ObjectItem):
|
|||
|
||||
item = elm_menu_item_add(menu.obj,
|
||||
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.label if self.label 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,
|
||||
cb, <void*>self)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -128,12 +128,12 @@ cdef class MenuItem(ObjectItem):
|
|||
def __set__(self, icon):
|
||||
if isinstance(icon, unicode): icon = PyUnicode_AsUTF8String(icon)
|
||||
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):
|
||||
if isinstance(icon, unicode): icon = PyUnicode_AsUTF8String(icon)
|
||||
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):
|
||||
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,
|
||||
parent.item if parent 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 *>icon if icon is not None else NULL,
|
||||
<const char *>label if label is not None else NULL,
|
||||
cb, <void*>ret)
|
||||
|
||||
if item != NULL:
|
||||
|
|
|
@ -1,32 +1,31 @@
|
|||
from efl.evas cimport Eina_Bool, const_Eina_List, Evas_Object, const_Evas_Object, Evas_Smart_Cb
|
||||
from object_item cimport Elm_Object_Item, const_Elm_Object_Item, ObjectItem
|
||||
from libc.string cimport const_char, const_void
|
||||
from efl.evas cimport Eina_Bool, Eina_List, Evas_Object, Evas_Smart_Cb
|
||||
from object_item cimport Elm_Object_Item, ObjectItem
|
||||
|
||||
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)
|
||||
|
||||
Evas_Object *elm_multibuttonentry_add(Evas_Object *parent)
|
||||
Evas_Object *elm_multibuttonentry_entry_get(const_Evas_Object *obj)
|
||||
Eina_Bool elm_multibuttonentry_expanded_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)
|
||||
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_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_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)
|
||||
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_selected_item_get(const_Evas_Object *obj)
|
||||
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_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)
|
||||
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_last_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)
|
||||
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)
|
||||
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_prev_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_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)
|
||||
void elm_multibuttonentry_editable_set(Evas_Object *obj, Eina_Bool editable)
|
||||
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)
|
||||
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)
|
||||
|
|
|
@ -77,7 +77,7 @@ from object_item cimport _object_item_callback, _object_item_callback2, \
|
|||
_object_item_to_python, _object_item_list_to_python
|
||||
|
||||
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:
|
||||
MultiButtonEntry mbe = object_from_instance(obj)
|
||||
|
@ -142,7 +142,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -160,7 +160,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -180,7 +180,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
|
|||
|
||||
item = elm_multibuttonentry_item_insert_before(mbe.obj,
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -200,7 +200,7 @@ cdef class MultiButtonEntryItem(ObjectItem):
|
|||
|
||||
item = elm_multibuttonentry_item_insert_after(mbe.obj,
|
||||
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)
|
||||
|
||||
if item == NULL:
|
||||
|
@ -289,7 +289,7 @@ cdef class MultiButtonEntry(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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)
|
||||
|
||||
if item != NULL:
|
||||
|
@ -313,7 +313,7 @@ cdef class MultiButtonEntry(Object):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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)
|
||||
|
||||
if item != NULL:
|
||||
|
@ -338,7 +338,7 @@ cdef class MultiButtonEntry(Object):
|
|||
|
||||
item = elm_multibuttonentry_item_insert_before(self.obj,
|
||||
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)
|
||||
|
||||
if item != NULL:
|
||||
|
@ -363,7 +363,7 @@ cdef class MultiButtonEntry(Object):
|
|||
|
||||
item = elm_multibuttonentry_item_insert_after(self.obj,
|
||||
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)
|
||||
|
||||
if item != NULL:
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
from efl.evas cimport Evas_Object, Eina_Bool, Eina_List
|
||||
from object_item cimport Elm_Object_Item, ObjectItem
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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_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_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_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)
|
||||
void elm_naviframe_item_pop_to(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)
|
||||
Elm_Object_Item *elm_naviframe_top_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)
|
||||
const_char * elm_naviframe_item_style_get(Elm_Object_Item *it)
|
||||
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)
|
||||
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)
|
||||
void elm_naviframe_item_title_enabled_set(Elm_Object_Item *it, Eina_Bool enabled, Eina_Bool transition)
|
||||
|
|
|
@ -179,11 +179,11 @@ cdef class NaviframeItem(ObjectItem):
|
|||
"""
|
||||
cdef Elm_Object_Item *item = elm_naviframe_item_push(
|
||||
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.next_btn,
|
||||
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:
|
||||
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(
|
||||
naviframe.obj,
|
||||
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.next_btn,
|
||||
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:
|
||||
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(
|
||||
naviframe.obj,
|
||||
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.next_btn,
|
||||
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:
|
||||
raise RuntimeError("The item could not be added to the widget.")
|
||||
|
@ -317,12 +317,12 @@ cdef class NaviframeItem(ObjectItem):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_naviframe_item_style_get(self.item))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
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)
|
||||
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_get(const_Evas_Object *obj, double *horizontal, double *vertical)
|
||||
void elm_notify_align_get(const Evas_Object *obj, double *horizontal, double *vertical)
|
||||
|
||||
|
|
|
@ -16,18 +16,16 @@
|
|||
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from cpython cimport PyObject, Py_INCREF, Py_DECREF
|
||||
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, \
|
||||
Evas_Object, const_Evas_Object, Evas_Smart_Cb, Evas_Coord
|
||||
from efl.evas cimport Eina_Bool, Eina_List, \
|
||||
Evas_Object, Evas_Smart_Cb, Evas_Coord
|
||||
from efl.evas.enums cimport Evas_Callback_Type
|
||||
from efl.evas cimport Object as evasObject
|
||||
from efl.evas cimport Canvas as evasCanvas
|
||||
from enums cimport Elm_Focus_Direction, Elm_Sel_Format, Elm_Sel_Type, \
|
||||
Elm_Xdnd_Action
|
||||
from libc.string cimport const_char
|
||||
from libc.stdlib cimport const_void
|
||||
|
||||
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":
|
||||
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)
|
||||
|
||||
# Object handling (py3: DONE)
|
||||
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)
|
||||
const_char * elm_object_part_text_get(Evas_Object *obj, const_char *part)
|
||||
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_text_set(Evas_Object *obj, const char *part, 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_text_get(Evas_Object *obj)
|
||||
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)
|
||||
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_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)
|
||||
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)
|
||||
void elm_object_style_set(Evas_Object *obj, const_char *style)
|
||||
const_char * elm_object_style_get(Evas_Object *obj)
|
||||
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)
|
||||
void elm_object_style_set(Evas_Object *obj, const char *style)
|
||||
const char * elm_object_style_get(Evas_Object *obj)
|
||||
void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled)
|
||||
Eina_Bool elm_object_disabled_get(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_top_widget_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_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_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)
|
||||
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_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_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_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)
|
||||
void elm_object_cursor_set(Evas_Object *obj, const_char *cursor)
|
||||
const_char * elm_object_cursor_get(Evas_Object *obj)
|
||||
void elm_object_cursor_set(Evas_Object *obj, const char *cursor)
|
||||
const char * elm_object_cursor_get(Evas_Object *obj)
|
||||
void elm_object_cursor_unset(Evas_Object *obj)
|
||||
void elm_object_cursor_style_set(Evas_Object *obj, const_char *style)
|
||||
const_char * elm_object_cursor_style_get(Evas_Object *obj)
|
||||
void elm_object_cursor_style_set(Evas_Object *obj, const char *style)
|
||||
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)
|
||||
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)
|
||||
void elm_object_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs)
|
||||
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_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
const_char * elm_object_focus_highlight_style_get(const_Evas_Object *obj)
|
||||
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)
|
||||
|
||||
# Object - Mirroring (elm_mirroring.h)
|
||||
Eina_Bool elm_object_mirrored_get(Evas_Object *obj)
|
||||
|
@ -120,10 +118,10 @@ cdef extern from "Elementary.h":
|
|||
# Object - Scrollhints (elm_scroll.h)
|
||||
void elm_object_scroll_hold_push(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_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_y_set(Evas_Object *obj, Eina_Bool lock)
|
||||
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)
|
||||
void elm_object_tooltip_show(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_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_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_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_unset(Evas_Object *obj)
|
||||
void elm_object_tooltip_style_set(Evas_Object *obj, const_char *style)
|
||||
const_char * elm_object_tooltip_style_get(Evas_Object *obj)
|
||||
void elm_object_tooltip_style_set(Evas_Object *obj, const char *style)
|
||||
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_get(Evas_Object *obj)
|
||||
void elm_object_tooltip_move_freeze_push(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)
|
||||
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_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)
|
||||
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)
|
||||
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_domain_text_translatable_set(Evas_Object *obj, const_char *domain, Eina_Bool translatable)
|
||||
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_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)
|
||||
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)
|
||||
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_domain_text_translatable_set(Evas_Object *obj, const char *domain, Eina_Bool translatable)
|
||||
|
||||
# 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_object_unregister(Evas_Object *obj)
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ cdef Eina_Bool _event_callback(void *data, Evas_Object *o, \
|
|||
return ret
|
||||
|
||||
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)
|
||||
lst = tuple(<object>data)
|
||||
for func, args, kargs in lst:
|
||||
|
@ -391,8 +391,8 @@ cdef class Object(evasObject):
|
|||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_part_text_set(self.obj,
|
||||
<const_char *>part if part is not None else NULL,
|
||||
<const_char *>text if text 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)
|
||||
|
||||
def part_text_get(self, part):
|
||||
"""part_text_get(unicode part) -> unicode
|
||||
|
@ -409,7 +409,7 @@ cdef class Object(evasObject):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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:
|
||||
"""The main text for this object.
|
||||
|
@ -423,12 +423,12 @@ cdef class Object(evasObject):
|
|||
def __set__(self, text):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
return _ctouni(elm_object_text_get(self.obj))
|
||||
|
||||
|
@ -451,7 +451,7 @@ cdef class Object(evasObject):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""part_content_get(unicode part) -> evas.Object
|
||||
|
@ -468,7 +468,7 @@ cdef class Object(evasObject):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""part_content_unset(unicode part)
|
||||
|
@ -484,7 +484,7 @@ cdef class Object(evasObject):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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:
|
||||
"""Main content part for this object.
|
||||
|
@ -520,7 +520,7 @@ cdef class Object(evasObject):
|
|||
# """
|
||||
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
|
||||
# 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):
|
||||
"""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)
|
||||
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))
|
||||
|
||||
property style:
|
||||
|
@ -563,12 +563,12 @@ cdef class Object(evasObject):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_object_style_get(self.obj))
|
||||
|
||||
|
@ -679,8 +679,8 @@ cdef class Object(evasObject):
|
|||
emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
elm_object_signal_emit(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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)
|
||||
|
||||
def signal_callback_add(self, emission, 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):
|
||||
source = PyUnicode_AsUTF8String(source)
|
||||
elm_object_signal_callback_add(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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,
|
||||
signal_callback, <void*>lst)
|
||||
lst.append((func, args, kwargs))
|
||||
|
||||
|
@ -757,8 +757,8 @@ cdef class Object(evasObject):
|
|||
emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
elm_object_signal_callback_del(self.obj,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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,
|
||||
signal_callback)
|
||||
|
||||
#
|
||||
|
@ -899,7 +899,7 @@ cdef class Object(evasObject):
|
|||
if isinstance(cursor, unicode):
|
||||
cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
elm_object_cursor_unset(self.obj)
|
||||
|
@ -907,7 +907,7 @@ cdef class Object(evasObject):
|
|||
def cursor_set(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
return _ctouni(elm_object_cursor_get(self.obj))
|
||||
def cursor_unset(self):
|
||||
|
@ -925,12 +925,12 @@ cdef class Object(evasObject):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_object_cursor_style_get(self.obj))
|
||||
|
||||
|
@ -1164,14 +1164,14 @@ cdef class Object(evasObject):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return elm_object_focus_highlight_style_get(self.obj)
|
||||
|
||||
def focus_highlight_style_set(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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)
|
||||
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):
|
||||
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_tooltip_domain_translatable_text_set(self.obj,
|
||||
<const_char *>domain if domain is not None else NULL,
|
||||
<const_char *>text if text 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)
|
||||
|
||||
def tooltip_translatable_text_set(self, text):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
"""tooltip_content_cb_set(func, *args, **kargs)
|
||||
|
@ -1493,12 +1493,12 @@ cdef class Object(evasObject):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_domain_translatable_part_text_set(self.obj,
|
||||
<const_char *>part if part 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 *>part if part 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)
|
||||
|
||||
def domain_translatable_part_text_set(self, part = None, domain = None,
|
||||
text = None):
|
||||
|
@ -1590,9 +1590,9 @@ cdef class Object(evasObject):
|
|||
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_domain_translatable_part_text_set(self.obj,
|
||||
<const_char *>part if part 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 *>part if part 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)
|
||||
|
||||
|
||||
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(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_domain_translatable_text_set(self.obj,
|
||||
<const_char *>domain if domain is not None else NULL,
|
||||
<const_char *>text if text 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)
|
||||
|
||||
def translatable_part_text_set(self, 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(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_translatable_part_text_set(self.obj,
|
||||
<const_char *>part if part is not None else NULL,
|
||||
<const_char *>text if text 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)
|
||||
|
||||
@DEPRECATED("1.8", "Use :py:func:`translatable_part_text_get` instead.")
|
||||
def translatable_text_part_get(self, part):
|
||||
"""translatable_text_part_get(part) -> unicode"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
|
@ -1649,7 +1649,7 @@ cdef class Object(evasObject):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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,
|
||||
bint translatable):
|
||||
|
@ -1676,8 +1676,8 @@ cdef class Object(evasObject):
|
|||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
if isinstance(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
|
||||
elm_object_domain_part_text_translatable_set(self.obj,
|
||||
<const_char *>part,
|
||||
<const_char *>domain,
|
||||
<const char *>part,
|
||||
<const char *>domain,
|
||||
translatable)
|
||||
|
||||
def part_text_translatable_set(self, part, bint translatable):
|
||||
|
@ -1709,7 +1709,7 @@ cdef class Object(evasObject):
|
|||
def translatable_text_set(self, text):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
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 not lst:
|
||||
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)
|
||||
lst.append((event_conv, func, args, kargs))
|
||||
|
||||
|
@ -1800,7 +1800,7 @@ cdef class Object(evasObject):
|
|||
self._elmcallbacks.pop(event)
|
||||
if isinstance(event, unicode): event = PyUnicode_AsUTF8String(event)
|
||||
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)
|
||||
|
||||
def _callback_add(self, event, func, *args, **kargs):
|
||||
|
@ -1876,7 +1876,7 @@ cdef class Object(evasObject):
|
|||
)
|
||||
PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE)
|
||||
ret = elm_cnp_selection_set(self.obj, selection, format,
|
||||
<const_void *>view.buf, view.itemsize)
|
||||
<const void *>view.buf, view.itemsize)
|
||||
PyBuffer_Release(&view)
|
||||
return ret
|
||||
|
||||
|
@ -1944,7 +1944,7 @@ cdef class Object(evasObject):
|
|||
self.cnp_selection_loss_cb = func
|
||||
self.cnp_selection_loss_data = data
|
||||
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
|
||||
|
@ -2026,7 +2026,7 @@ cdef class Object(evasObject):
|
|||
|
||||
# """
|
||||
# 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_Pos dragpos, void *dragdata,
|
||||
# Elm_Drag_Accept acceptcb, void *acceptdata,
|
||||
|
|
|
@ -1,65 +1,62 @@
|
|||
from efl.evas cimport Eina_Bool, const_Eina_List, Evas_Object, Evas_Smart_Cb, \
|
||||
Eina_List, const_Eina_List
|
||||
from libc.string cimport const_char
|
||||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb, Eina_List
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
|
||||
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_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item)
|
||||
|
||||
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)
|
||||
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_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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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_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)
|
||||
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)
|
||||
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)
|
||||
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_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)
|
||||
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(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_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_unset(Elm_Object_Item *it)
|
||||
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)
|
||||
void elm_object_item_cursor_set(Elm_Object_Item *it, const_char *cursor)
|
||||
const_char * elm_object_item_cursor_get(Elm_Object_Item *it)
|
||||
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)
|
||||
void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor)
|
||||
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_style_set(Elm_Object_Item *it, const_char *style)
|
||||
const_char * elm_object_item_cursor_style_get(Elm_Object_Item *it)
|
||||
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)
|
||||
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)
|
||||
|
||||
#TODO: Evas_Object * elm_object_item_access_register(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: 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)
|
||||
|
||||
|
||||
|
||||
cdef _object_item_to_python(Elm_Object_Item *it)
|
||||
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_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
|
||||
|
|
|
@ -63,7 +63,7 @@ cdef _object_item_to_python(Elm_Object_Item *it):
|
|||
|
||||
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
|
||||
ret = []
|
||||
while lst:
|
||||
|
@ -204,7 +204,7 @@ cdef class ObjectItem(object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""part_content_get(unicode part) -> Object
|
||||
|
@ -222,7 +222,7 @@ cdef class ObjectItem(object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""part_content_unset(unicode part)
|
||||
|
@ -238,7 +238,7 @@ cdef class ObjectItem(object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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:
|
||||
"""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(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_item_part_text_set(self.item,
|
||||
<const_char *>part if part is not None else NULL,
|
||||
<const_char *>text if text 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)
|
||||
|
||||
def part_text_get(self, part):
|
||||
"""part_text_set(unicode part) -> unicode text
|
||||
|
@ -292,7 +292,7 @@ cdef class ObjectItem(object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""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(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
elm_object_item_domain_translatable_part_text_set(self.item,
|
||||
<const_char *>part if part 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 *>part if part 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)
|
||||
|
||||
def translatable_part_text_get(self, part = None):
|
||||
"""translatable_part_text_get(part = None)
|
||||
|
@ -344,7 +344,7 @@ cdef class ObjectItem(object):
|
|||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
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):
|
||||
"""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(domain, unicode): domain = PyUnicode_AsUTF8String(domain)
|
||||
elm_object_item_domain_part_text_translatable_set(self.item,
|
||||
<const_char *>part,
|
||||
<const_char *>domain,
|
||||
<const char *>part,
|
||||
<const char *>domain,
|
||||
translatable)
|
||||
|
||||
property text:
|
||||
|
@ -388,12 +388,12 @@ cdef class ObjectItem(object):
|
|||
def __set__(self, text):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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):
|
||||
return _ctouni(elm_object_item_text_get(self.item))
|
||||
|
||||
|
@ -407,12 +407,12 @@ cdef class ObjectItem(object):
|
|||
# def __set__(self, txt):
|
||||
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
|
||||
# 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):
|
||||
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
|
||||
# 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):
|
||||
"""signal_emit(unicode emission, unicode source)
|
||||
|
@ -432,8 +432,8 @@ cdef class ObjectItem(object):
|
|||
if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
|
||||
if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
|
||||
elm_object_item_signal_emit(self.item,
|
||||
<const_char *>emission if emission is not None else NULL,
|
||||
<const_char *>source if source 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)
|
||||
|
||||
property disabled:
|
||||
"""The disabled state of an widget item.
|
||||
|
@ -484,7 +484,7 @@ cdef class ObjectItem(object):
|
|||
"""
|
||||
if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
|
||||
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:
|
||||
# TODO: document this
|
||||
|
@ -555,7 +555,7 @@ cdef class ObjectItem(object):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_object_item_tooltip_style_get(self.item))
|
||||
|
||||
|
@ -579,7 +579,7 @@ cdef class ObjectItem(object):
|
|||
def __set__(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
return _ctouni(elm_object_item_cursor_get(self.item))
|
||||
|
@ -590,7 +590,7 @@ cdef class ObjectItem(object):
|
|||
def cursor_set(self, cursor):
|
||||
if isinstance(cursor, unicode): cursor = PyUnicode_AsUTF8String(cursor)
|
||||
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):
|
||||
return _ctouni(elm_object_item_cursor_get(self.item))
|
||||
def cursor_unset(self):
|
||||
|
@ -606,7 +606,7 @@ cdef class ObjectItem(object):
|
|||
def __set__(self, style):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
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):
|
||||
if isinstance(style, unicode): style = PyUnicode_AsUTF8String(style)
|
||||
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):
|
||||
return _ctouni(elm_object_item_cursor_style_get(self.item))
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object *elm_photo_add(Evas_Object *parent)
|
||||
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)
|
||||
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_size_set(Evas_Object *obj, int size)
|
||||
void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill)
|
||||
void elm_photo_editable_set(Evas_Object *obj, Eina_Bool editable)
|
||||
|
|
|
@ -69,13 +69,13 @@ cdef class Photo(Object):
|
|||
def __set__(self, filename):
|
||||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
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.")
|
||||
|
||||
def file_set(self, filename):
|
||||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
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.")
|
||||
|
||||
property thumb:
|
||||
|
@ -93,15 +93,15 @@ cdef class Photo(Object):
|
|||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
elm_photo_thumb_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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)
|
||||
|
||||
def thumb_set(self, filename, group = None):
|
||||
if isinstance(filename, unicode): filename = PyUnicode_AsUTF8String(filename)
|
||||
if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
|
||||
elm_photo_thumb_set(self.obj,
|
||||
<const_char *>filename if filename is not None else NULL,
|
||||
<const_char *>group if group 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)
|
||||
|
||||
property size:
|
||||
"""Set the size that will be used on the photo.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from efl.evas.enums cimport Evas_Load_Error
|
||||
from enums cimport Elm_Photocam_Zoom_Mode
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
ctypedef struct Elm_Photocam_Progress:
|
||||
|
@ -13,8 +12,8 @@ cdef extern from "Elementary.h":
|
|||
Eina_Bool open_error
|
||||
|
||||
Evas_Object *elm_photocam_add(Evas_Object *parent)
|
||||
Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const_char *file)
|
||||
const_char * elm_photocam_file_get(Evas_Object *obj)
|
||||
Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file)
|
||||
const char * elm_photocam_file_get(Evas_Object *obj)
|
||||
void elm_photocam_zoom_set(Evas_Object *obj, double zoom)
|
||||
double elm_photocam_zoom_get(Evas_Object *obj)
|
||||
void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode)
|
||||
|
|
|
@ -194,7 +194,7 @@ cdef class Photocam(Object):
|
|||
if isinstance(filename, unicode):
|
||||
filename = PyUnicode_AsUTF8String(filename)
|
||||
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")
|
||||
|
||||
def __get__(self):
|
||||
|
@ -205,7 +205,7 @@ cdef class Photocam(Object):
|
|||
if isinstance(filename, unicode):
|
||||
filename = PyUnicode_AsUTF8String(filename)
|
||||
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")
|
||||
def file_get(self):
|
||||
return _ctouni(elm_photocam_file_get(self.obj))
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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)
|
||||
|
|
|
@ -82,7 +82,7 @@ cdef class Plug(Object):
|
|||
"""
|
||||
if isinstance(svcname, unicode): svcname = PyUnicode_AsUTF8String(svcname)
|
||||
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):
|
||||
raise RuntimeError
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Smart_Cb
|
||||
from object_item cimport Elm_Object_Item, ObjectItem
|
||||
from enums cimport Elm_Wrap_Type, Elm_Popup_Orient
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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)
|
||||
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)
|
||||
|
|
|
@ -249,7 +249,7 @@ cdef class PopupItem(ObjectItem):
|
|||
cb = _object_item_callback2
|
||||
|
||||
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,
|
||||
cb, <void *>self)
|
||||
|
||||
|
@ -318,7 +318,7 @@ cdef class Popup(LayoutClass):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
|
||||
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,
|
||||
cb, <void*>ret)
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Evas_Coord
|
||||
from libc.string cimport const_char
|
||||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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_value_set(Evas_Object *obj, double val)
|
||||
double elm_progressbar_value_get(Evas_Object *obj)
|
||||
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)
|
||||
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)
|
||||
void elm_progressbar_span_size_set(Evas_Object *obj, Evas_Coord size)
|
||||
Evas_Coord elm_progressbar_span_size_get(Evas_Object *obj)
|
||||
void elm_progressbar_unit_format_set(Evas_Object *obj, const_char *format)
|
||||
const_char * elm_progressbar_unit_format_get(Evas_Object *obj)
|
||||
void elm_progressbar_unit_format_set(Evas_Object *obj, const char *format)
|
||||
const char * elm_progressbar_unit_format_get(Evas_Object *obj)
|
||||
void elm_progressbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
||||
Eina_Bool elm_progressbar_horizontal_get(Evas_Object *obj)
|
||||
void elm_progressbar_inverted_set(Evas_Object *obj, Eina_Bool inverted)
|
||||
|
|
|
@ -167,7 +167,7 @@ cdef class Progressbar(LayoutClass):
|
|||
|
||||
"""
|
||||
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):
|
||||
"""part_value_set(part, int value)
|
||||
|
@ -180,7 +180,7 @@ cdef class Progressbar(LayoutClass):
|
|||
|
||||
"""
|
||||
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:
|
||||
"""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):
|
||||
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
|
||||
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):
|
||||
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
|
||||
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):
|
||||
return _ctouni(elm_progressbar_unit_format_get(self.obj))
|
||||
|
||||
|
|
|
@ -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, \
|
||||
Elm_Scroller_Movement_Block
|
||||
from libc.string cimport const_char
|
||||
from object cimport Object
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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_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_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)
|
||||
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_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_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_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_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_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_get(const_Evas_Object *obj, Evas_Coord *page_limit_h, Evas_Coord *page_limit_v)
|
||||
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_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_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)
|
||||
|
@ -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_get(Evas_Object *obj, double *x, double *y)
|
||||
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):
|
||||
pass
|
||||
|
|
|
@ -142,8 +142,7 @@ Type that blocks the scroll movement in one or more direction.
|
|||
|
||||
from cpython cimport PyUnicode_AsUTF8String
|
||||
|
||||
from efl.evas cimport Evas_Object, const_Evas_Object, \
|
||||
Object as evasObject
|
||||
from efl.evas cimport Evas_Object, Object as evasObject
|
||||
from efl.eo cimport object_from_instance, _object_mapping_register
|
||||
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(base, unicode): base = PyUnicode_AsUTF8String(base)
|
||||
elm_scroller_custom_widget_base_theme_set(self.obj,
|
||||
<const_char *>widget if widget is not None else NULL,
|
||||
<const_char *>base if base 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)
|
||||
|
||||
def content_min_limit(self, w, h):
|
||||
"""content_min_limit(bool w, bool h)
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from object_item cimport Elm_Object_Item, ObjectItem
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
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_insert_at(Evas_Object *obj, Evas_Object *icon, const_char *label, int index)
|
||||
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)
|
||||
void elm_segment_control_item_del_at(Evas_Object *obj, int index)
|
||||
int elm_segment_control_item_count_get(Evas_Object *obj)
|
||||
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)
|
||||
int elm_segment_control_item_index_get(Elm_Object_Item *it)
|
||||
Evas_Object *elm_segment_control_item_object_get(Elm_Object_Item *it)
|
||||
|
|
|
@ -126,7 +126,7 @@ cdef class SegmentControlItem(ObjectItem):
|
|||
|
||||
item = elm_segment_control_item_add(sc.obj,
|
||||
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:
|
||||
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,
|
||||
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:
|
||||
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)
|
||||
item = elm_segment_control_item_add(self.obj,
|
||||
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:
|
||||
ret._set_obj(item)
|
||||
return ret
|
||||
|
@ -326,7 +326,7 @@ cdef class SegmentControl(LayoutClass):
|
|||
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
||||
item = elm_segment_control_item_insert_at(self.obj,
|
||||
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:
|
||||
ret._set_obj(item)
|
||||
return ret
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Evas_Coord
|
||||
from libc.string cimport const_char
|
||||
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object * elm_slider_add(Evas_Object *parent)
|
||||
void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size)
|
||||
Evas_Coord elm_slider_span_size_get(const_Evas_Object *obj)
|
||||
void elm_slider_unit_format_set(Evas_Object *obj, const_char *format)
|
||||
const_char * elm_slider_unit_format_get(const_Evas_Object *obj)
|
||||
void elm_slider_indicator_format_set(Evas_Object *obj, const_char *indicator)
|
||||
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_units_format_function_set(Evas_Object *obj, const_char *(*func)(double val), void (*free_func)(const_char *str))
|
||||
Evas_Coord elm_slider_span_size_get(const Evas_Object *obj)
|
||||
void elm_slider_unit_format_set(Evas_Object *obj, const char *format)
|
||||
const char * elm_slider_unit_format_get(const Evas_Object *obj)
|
||||
void elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator)
|
||||
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_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)
|
||||
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_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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
double elm_slider_step_get(const_Evas_Object *obj)
|
||||
double elm_slider_step_get(const Evas_Object *obj)
|
||||
|
|
|
@ -141,12 +141,12 @@ cdef class Slider(LayoutClass):
|
|||
def __set__(self, unit_format):
|
||||
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
|
||||
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):
|
||||
if isinstance(unit_format, unicode): unit_format = PyUnicode_AsUTF8String(unit_format)
|
||||
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):
|
||||
return _ctouni(elm_slider_unit_format_get(self.obj))
|
||||
|
||||
|
@ -176,12 +176,12 @@ cdef class Slider(LayoutClass):
|
|||
def __set__(self, ind_format):
|
||||
if isinstance(ind_format, unicode): ind_format = PyUnicode_AsUTF8String(ind_format)
|
||||
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):
|
||||
if isinstance(ind_format, unicode): ind_format = PyUnicode_AsUTF8String(ind_format)
|
||||
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):
|
||||
return _ctouni(elm_slider_indicator_format_get(self.obj))
|
||||
|
||||
|
|
|
@ -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 libc.string cimport const_char
|
||||
|
||||
cdef extern from *:
|
||||
ctypedef void const_void "const void"
|
||||
|
||||
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_next(Evas_Object *obj)
|
||||
void elm_slideshow_previous(Evas_Object *obj)
|
||||
const_Eina_List *elm_slideshow_transitions_get(Evas_Object *obj)
|
||||
void elm_slideshow_transition_set(Evas_Object *obj, const_char *transition)
|
||||
const_char * elm_slideshow_transition_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)
|
||||
const char * elm_slideshow_transition_get(Evas_Object *obj)
|
||||
void elm_slideshow_timeout_set(Evas_Object *obj, double timeout)
|
||||
double elm_slideshow_timeout_get(Evas_Object *obj)
|
||||
void elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop)
|
||||
Eina_Bool elm_slideshow_loop_get(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)
|
||||
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)
|
||||
void elm_slideshow_layout_set(Evas_Object *obj, const_char *layout)
|
||||
const_char * elm_slideshow_layout_get(Evas_Object *obj)
|
||||
const_Eina_List *elm_slideshow_layouts_get(Evas_Object *obj)
|
||||
void elm_slideshow_layout_set(Evas_Object *obj, const char *layout)
|
||||
const char * elm_slideshow_layout_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)
|
||||
int elm_slideshow_cache_before_get(Evas_Object *obj)
|
||||
void elm_slideshow_cache_after_set(Evas_Object *obj, int count)
|
||||
|
|
|
@ -133,7 +133,7 @@ cdef void _py_elm_slideshow_item_del(void *data, Evas_Object *obj) with gil:
|
|||
#item._unset_obj()
|
||||
#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 item2 = <object>data2
|
||||
cdef object func = item1.compare_func
|
||||
|
@ -514,7 +514,7 @@ cdef class Slideshow(LayoutClass):
|
|||
def __set__(self, transition):
|
||||
if isinstance(transition, unicode): transition = PyUnicode_AsUTF8String(transition)
|
||||
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):
|
||||
return _ctouni(elm_slideshow_transition_get(self.obj))
|
||||
|
||||
|
@ -632,7 +632,7 @@ cdef class Slideshow(LayoutClass):
|
|||
def __set__(self, layout):
|
||||
if isinstance(layout, unicode): layout = PyUnicode_AsUTF8String(layout)
|
||||
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):
|
||||
return _ctouni(elm_slideshow_layout_get(self.obj))
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from libc.string cimport const_char
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
Evas_Object *elm_spinner_add(Evas_Object *parent)
|
||||
void elm_spinner_label_format_set(Evas_Object *obj, const_char *format)
|
||||
const_char * elm_spinner_label_format_get(Evas_Object *obj)
|
||||
void elm_spinner_label_format_set(Evas_Object *obj, const char *format)
|
||||
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_get(Evas_Object *obj, double *min, double *max)
|
||||
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)
|
||||
void elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable)
|
||||
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)
|
||||
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)
|
||||
double elm_spinner_interval_get(Evas_Object *obj)
|
||||
void elm_spinner_base_set(Evas_Object *obj, double base)
|
||||
|
|
|
@ -92,12 +92,12 @@ cdef class Spinner(LayoutClass):
|
|||
def __set__(self, label_format):
|
||||
if isinstance(label_format, unicode): label_format = PyUnicode_AsUTF8String(label_format)
|
||||
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):
|
||||
if isinstance(label_format, unicode): label_format = PyUnicode_AsUTF8String(label_format)
|
||||
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):
|
||||
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)
|
||||
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):
|
||||
"""special_value_del(float value)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue