2013-02-24 02:30:58 -08:00
|
|
|
# Copyright (C) 2007-2013 various contributors (see AUTHORS)
|
2013-02-17 11:35:20 -08:00
|
|
|
#
|
2013-02-24 02:30:58 -08:00
|
|
|
# This file is part of Python-EFL.
|
2013-02-17 11:35:20 -08:00
|
|
|
#
|
2013-02-24 02:30:58 -08:00
|
|
|
# Python-EFL is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2013-02-17 11:35:20 -08:00
|
|
|
#
|
2013-02-24 02:30:58 -08:00
|
|
|
# Python-EFL is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
2013-02-17 11:35:20 -08:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
2013-02-24 02:30:58 -08:00
|
|
|
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
from cpython cimport PyObject, Py_INCREF, Py_DECREF
|
|
|
|
from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List
|
|
|
|
from efl.evas cimport Evas_Object, Evas_Callback_Type, Evas_Smart_Cb
|
|
|
|
from efl.evas cimport Object as evasObject
|
|
|
|
from efl.evas cimport Canvas as evasCanvas
|
|
|
|
from enums cimport Elm_Focus_Direction
|
2013-02-24 02:30:58 -08:00
|
|
|
from libc.string cimport const_char
|
|
|
|
from libc.stdlib cimport const_void
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
cdef extern from "Edje.h":
|
2013-02-24 02:30:58 -08:00
|
|
|
ctypedef void (*Edje_Signal_Cb)(void *data, Evas_Object *obj, const_char *emission, const_char *source)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
cdef extern from "Elementary.h":
|
|
|
|
|
|
|
|
ctypedef struct Elm_Theme
|
|
|
|
|
|
|
|
ctypedef Eina_Bool (*Elm_Event_Cb) (void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type t, void *event_info)
|
|
|
|
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)
|
|
|
|
|
|
|
|
# Object handling (py3: DONE)
|
2013-02-24 02:30:58 -08:00
|
|
|
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_content_get(Evas_Object *obj)
|
|
|
|
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_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)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Cursors (elm_cursor.h) (py3: DONE)
|
2013-02-24 02:30:58 -08:00
|
|
|
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_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search)
|
|
|
|
Eina_Bool elm_object_cursor_theme_search_enabled_get(Evas_Object *obj)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Focus (elm_focus.h)
|
2013-02-24 02:30:58 -08:00
|
|
|
Eina_Bool elm_object_focus_get(Evas_Object *obj)
|
|
|
|
void elm_object_focus_set(Evas_Object *obj, Eina_Bool focus)
|
|
|
|
void elm_object_focus_allow_set(Evas_Object *obj, Eina_Bool enable)
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
void elm_object_tree_focus_allow_set(Evas_Object *obj, Eina_Bool focusable)
|
|
|
|
Eina_Bool elm_object_tree_focus_allow_get(Evas_Object *obj)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Mirroring (elm_mirroring.h)
|
2013-02-24 02:30:58 -08:00
|
|
|
Eina_Bool elm_object_mirrored_get(Evas_Object *obj)
|
|
|
|
void elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
|
|
|
|
Eina_Bool elm_object_mirrored_automatic_get(Evas_Object *obj)
|
|
|
|
void elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Scaling (elm_scale.h)
|
2013-02-24 02:30:58 -08:00
|
|
|
void elm_object_scale_set(Evas_Object *obj, double scale)
|
|
|
|
double elm_object_scale_get(Evas_Object *obj)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Scrollhints (elm_scroll.h)
|
2013-02-24 02:30:58 -08:00
|
|
|
void elm_object_scroll_hold_push(Evas_Object *obj)
|
|
|
|
void elm_object_scroll_hold_pop(Evas_Object *obj)
|
|
|
|
void elm_object_scroll_freeze_push(Evas_Object *obj)
|
|
|
|
void elm_object_scroll_freeze_pop(Evas_Object *obj)
|
|
|
|
void elm_object_scroll_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)
|
|
|
|
Eina_Bool elm_object_scroll_lock_y_get(Evas_Object *obj)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Theme (elm_theme.h)
|
2013-02-24 02:30:58 -08:00
|
|
|
void elm_object_theme_set(Evas_Object *obj, Elm_Theme *th)
|
|
|
|
Elm_Theme * elm_object_theme_get(Evas_Object *obj)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Tooltips (elm_tooltip.h) (py3: DONE)
|
2013-02-24 02:30:58 -08:00
|
|
|
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_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)
|
|
|
|
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)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
# Object - Translatable text (elm_general.h) (py3: DONE)
|
2013-02-24 02:30:58 -08:00
|
|
|
void elm_object_domain_translatable_text_part_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)
|
|
|
|
const_char * elm_object_translatable_text_part_get(Evas_Object *obj, const_char *part)
|
|
|
|
const_char * elm_object_translatable_text_get(Evas_Object *obj)
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
cdef class Canvas(evasCanvas):
|
|
|
|
pass
|
|
|
|
|
|
|
|
cdef class Object(evasObject):
|
|
|
|
cdef object _elmcallbacks
|
|
|
|
cdef object _elm_event_cbs
|
2013-04-02 16:24:35 -07:00
|
|
|
|
|
|
|
cpdef text_set(self, text)
|
|
|
|
cpdef text_get(self)
|
|
|
|
cpdef style_set(self, style)
|
|
|
|
cpdef style_get(self)
|
|
|
|
cpdef cursor_set(self, cursor)
|
|
|
|
cpdef cursor_get(self)
|
|
|
|
cpdef cursor_unset(self)
|
|
|
|
cpdef cursor_style_set(self, style=*)
|
|
|
|
cpdef cursor_style_get(self)
|
|
|
|
cpdef tooltip_style_set(self, style=*)
|
|
|
|
cpdef tooltip_style_get(self)
|