Compare commits

...

21 Commits

Author SHA1 Message Date
Kai Huuhko be81cc12af Elementary.thumb: Add missing enums. 2014-03-27 11:38:14 +02:00
Davide Andreoli a54bd1a126 Python-EFL: fix Fileselector.mime_types_filter_append() to work with py3 2014-02-26 21:46:31 +01:00
Kai Huuhko e7a5e594a4 utils.deprecated: Handle docstring indentation when modifying it. 2014-01-25 03:53:38 +02:00
Kai Huuhko a2c5090e29 Silence warnings in Cython 0.20 2014-01-24 22:49:18 +02:00
Kai Huuhko 1d16ec2590 Bump versions/years for release. 2014-01-18 14:24:01 +02:00
Davide Andreoli 763a591361 fix imports in elm tooltip example 2014-01-06 14:37:16 +01:00
Davide Andreoli 1ee169d918 Try to fix evas SmartObject
* implemented a test for smart obj
* remove comments from factories methods
* install the metaclass also for the Clipped one

Smart object implementation is still broken :(
Every object segfault on delete, the reason is
the eo del callback called BEFORE the smart
delete function. need to investigate better.
2014-01-06 12:45:50 +01:00
Kai Huuhko 0fb28e75a9 Update TODO 2013-12-30 14:08:48 +02:00
Kai Huuhko 33b6053987 Edje: Re-enable edje-edit. 2013-12-30 14:08:39 +02:00
Kai Huuhko a6864075af Tests: Removed expected failure from a test that now works 2013-12-30 14:08:13 +02:00
Kai Huuhko 6fb611e522 Add Python 2.6 compatibility, disabled one API method in evas.Image
Image.image_data_memoryview_get was disabled.

This method can be added back once we figure out how to do conditional
compilation using Python version.

Using an evas.Image instance as a memoryview object should do the same
thing as the disabled method.
2013-12-28 18:44:19 +02:00
Davide Andreoli bb84e1dcfb unbroke the emotion example
* copy the theme edj in source, instead of searching for an installed
one from the c example, that is not installed by default enymore.
* fix usage/import of enums
* add the 'p' key to toggle pause state
2013-12-23 21:37:48 +01:00
Kai Huuhko bd208f2233 Elementary: Add missing smart callbacks. 2013-12-22 10:30:36 +02:00
Kai Huuhko 4da99fd7ce Documentation: Add missed versionadded entries, fix formatting. 2013-12-22 10:25:40 +02:00
Kai Huuhko db5854dc07 setup.py: os.environ.has_key -> os.getenv
For some reason the former fails on the build bot
2013-12-19 22:50:58 +02:00
Kai Huuhko 70fead80f8 Force default visibility in CFLAGS.
Fixes T504
2013-12-19 19:23:58 +02:00
Kai Huuhko f9b7f0d96a Tests: Simple beginnings for Elm unit tests, enabled Eo tests. 2013-12-18 20:07:29 +02:00
Kai Huuhko ea9496e2e8 Tests: Decrease verbosity and buffer the output when running full suite. 2013-12-18 16:49:07 +02:00
Davide Andreoli e45f41b936 Python-EFL: 5 new tests about Focus.
Also add some missed values to Elm_Object_Focus_Direction enum.
2013-12-16 21:46:26 +01:00
Kai Huuhko 87bc96db44 Use uintptr_t instead of long or unsigned long for handling pointers. 2013-12-15 15:09:44 +02:00
Kai Huuhko a86d6cdab8 Elementary.web: updates to work with the new webkit-efl snapshot.
Commented out tab_propagate which doesn't seem to be implemented in
ewebkit2, and uncommented load finished signal.
2013-12-12 21:33:58 +02:00
113 changed files with 2619 additions and 1034 deletions

View File

@ -2,8 +2,8 @@
1. REQUIREMENTS:
----------------
* Python 2.7 or higher (http://www.python.org/)
- Tested with Python 2.7 / 3.2
* Python 2.6 or higher (http://www.python.org/)
- Tested with Python 2.6 / 2.7 / 3.2 / 3.3
* Cython 0.17.0 or higher (http://cython.org/)
- Tested with Cython 0.17.1
@ -89,6 +89,8 @@
tests or use the 00_run_all_tests.py in each folder or even in the tests/ base
dir to run all the tests at once.
Python 2.7 is required for running the tests.
The scripts in examples/ folder must be run by the user as they require
user interaction.

4
README
View File

@ -1,6 +1,6 @@
----------------
PYTHON-EFL 1.8.0
PYTHON-EFL 1.8.1
----------------
EFL is a collection of libraries for handling many common tasks a
@ -16,6 +16,8 @@ For installation instruction see the INSTALL file.
CHANGES FROM 1.7 to 1.8
=======================
See also changes.html.
* added efl container package
* ecore.file.Download => efl.ecore.FileDownload
* edje.edit.EdjeEdit => efl.edje_edit.EdjeEdit

11
TODO
View File

@ -1,16 +1,17 @@
BUGS
====
* EdjeEdit: PartState API does not work (edje edit is disabled for now)
* Edje.External: The unit test fails (marked as known failure in unittest)
* EdjeEdit: PartState API does not work
* Elm.Map: overlays_show segfaults, scrollers in examples are jumpy
* Bad binaries produced when build environment is invalid (T504)
Failing unit tests
------------------
* tests.edje.test_04_edit: testPartEffect (marked as known failure)
* tests.edje.test_04_edit: testGroupDel (skipped, segfault)
* tests.edje.test_04_edit: testExternal (skipped, TODO)
TODO (after 1.8)
================
* update links and text on:
http://www.freedesktop.org/wiki/Software/DBusBindings
(requires fd.org shell account?)

View File

@ -77,7 +77,7 @@ master_doc = 'index'
# General information about the project.
project = u'Python Bindings for Enlightenment Foundation Libraries'
copyright = u'2008-2013, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko'
copyright = u'2008-2014, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -86,7 +86,7 @@ copyright = u'2008-2013, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim,
# The short X.Y version.
version = '1.8'
# The full version, including alpha/beta/rc tags.
release = '1.8.0'
release = '1.8.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -313,7 +313,7 @@ texinfo_documents = [
epub_title = u'Python Bindings for EFL'
epub_author = u'Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko'
epub_publisher = u'Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko'
epub_copyright = u'2008-2013, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko'
epub_copyright = u'2008-2014, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko'
# The language of the text. It defaults to the language option
# or en if the language is not set.

View File

@ -4,3 +4,4 @@
==============================
.. autoclass:: efl.edje.Edje

View File

@ -0,0 +1,7 @@
.. currentmodule:: efl.edje_edit
:class:`efl.edje_edit.EdjeEdit` Class
=======================================
.. autoclass:: efl.edje_edit.EdjeEdit
:undoc-members:

View File

@ -72,6 +72,7 @@ Reference
:maxdepth: 4
class-edje
class-edje_edit
Inheritance diagram

View File

@ -200,6 +200,7 @@ File monitor events
"""
from libc.stdint cimport uintptr_t
import traceback
from efl.eo cimport Eo, PY_REFCOUNT
from efl.utils.conversions cimport _ctouni

View File

@ -90,9 +90,9 @@ cdef class EventHandler(object):
def __repr__(self):
return ("%s(%#x, type=%d, func=%s, args=%s, kargs=%s, event_cls=%s, "
"Ecore_Event_Handler=%#x, refcount=%d)") % \
(self.__class__.__name__, <unsigned long><void *>self,
(self.__class__.__name__, <uintptr_t><void *>self,
self.type, self.func, self.args, self.kargs, self.event_cls,
<unsigned long>self.obj, PY_REFCOUNT(self))
<uintptr_t>self.obj, PY_REFCOUNT(self))
def __dealloc__(self):
if self.obj != NULL:

View File

@ -330,7 +330,7 @@ cdef class Exe(object):
Py_INCREF(self)
self.exe = exe
ecore_exe_callback_pre_free_set(exe, _ecore_exe_pre_free_cb)
_ecore_exe_event_mapping[<long><void *>exe] = self
_ecore_exe_event_mapping[<uintptr_t><void *>exe] = self
return 1
cdef int _unset_obj(self) except 0:
@ -339,7 +339,7 @@ cdef class Exe(object):
filter.delete()
self.__callbacks = None
_ecore_exe_event_mapping.pop(<long><void *>self.exe)
_ecore_exe_event_mapping.pop(<uintptr_t><void *>self.exe)
self.exe = NULL
Py_DECREF(self)
return 1
@ -357,8 +357,8 @@ cdef class Exe(object):
data = None
return ("<%s(%#x, Ecore_Exe=%#x, refcount=%d, pid=%s, cmd=%r, "
"flags=[%s], data=%r)>") % \
(self.__class__.__name__, <unsigned long><void *>self,
<unsigned long>self.exe, PY_REFCOUNT(self),
(self.__class__.__name__, <uintptr_t><void *>self,
<uintptr_t>self.exe, PY_REFCOUNT(self),
pid, cmd, flags, data)
def delete(self):
@ -779,7 +779,7 @@ cdef class EventExeAdd(Event):
cdef int _set_obj(self, void *o) except 0:
cdef Ecore_Exe_Event_Add *obj
obj = <Ecore_Exe_Event_Add*>o
self.exe = _ecore_exe_event_mapping.get(<long>obj.exe)
self.exe = _ecore_exe_event_mapping.get(<uintptr_t>obj.exe)
if self.exe is None:
return -1
return 1
@ -801,7 +801,7 @@ cdef class EventExeDel(Event):
cdef int _set_obj(self, void *o) except 0:
cdef Ecore_Exe_Event_Del *obj
obj = <Ecore_Exe_Event_Del*>o
self.exe = _ecore_exe_event_mapping.get(<long>obj.exe)
self.exe = _ecore_exe_event_mapping.get(<uintptr_t>obj.exe)
if self.exe is None:
return -1
self.pid = obj.pid
@ -841,7 +841,7 @@ cdef class EventExeData(Event):
cdef Ecore_Exe_Event_Data *obj
cdef int i
obj = <Ecore_Exe_Event_Data*>o
self.exe = _ecore_exe_event_mapping.get(<long>obj.exe)
self.exe = _ecore_exe_event_mapping.get(<uintptr_t>obj.exe)
if self.exe is None:
return -1
self.data = PyUnicode_FromStringAndSize(<char*>obj.data, obj.size)

View File

@ -124,9 +124,9 @@ cdef class FdHandler(object):
flags = flags2str(self.active_get(7))
return ("%s(%#x, func=%s, args=%s, kargs=%s, fd=%s, flags=[%s], "
"Ecore_Fd_Handler=%#x, refcount=%d)") % \
(self.__class__.__name__, <unsigned long><void *>self,
(self.__class__.__name__, <uintptr_t><void *>self,
self.func, self.args, self.kargs, fd, flags,
<unsigned long>self.obj, PY_REFCOUNT(self))
<uintptr_t>self.obj, PY_REFCOUNT(self))
def __dealloc__(self):
if self.obj != NULL:

View File

@ -109,9 +109,9 @@ cdef class FileDownload(object):
def __repr__(self):
return ("%s(%#x, completion_cb=%s, progress_cb=%s, args=%s, kargs=%s, "
"Ecore_File_Download_Job=%#x, refcount=%d)") % \
(self.__class__.__name__, <unsigned long><void *>self,
(self.__class__.__name__, <uintptr_t><void *>self,
self.completion_cb, self.progress_cb, self.args, self.kargs,
<unsigned long>self.job, PY_REFCOUNT(self))
<uintptr_t>self.job, PY_REFCOUNT(self))
def __dealloc__(self):
if self.job != NULL:

View File

@ -95,7 +95,7 @@ cdef class FileMonitor(object):
def __repr__(self):
return ("%s(%#x, monitor_cb=%s, args=%s, kargs=%s, refcount=%d)") % \
(self.__class__.__name__, <unsigned long><void *>self,
(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):

View File

@ -20,6 +20,7 @@ import warnings
from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String
cimport libc.stdlib
from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register, object_from_instance, \
_register_decorated_callbacks
@ -259,7 +260,9 @@ def color_class_del(color_class):
def color_class_list():
cdef Eina_List *lst, *itr
cdef:
Eina_List *lst
Eina_List *itr
ret = []
lst = edje_color_class_list()
itr = lst
@ -289,7 +292,9 @@ def text_class_del(text_class):
def text_class_list():
cdef Eina_List *lst, *itr
cdef:
Eina_List *lst
Eina_List *itr
ret = []
lst = edje_text_class_list()
itr = lst

View File

@ -17,6 +17,7 @@
from efl.utils.conversions cimport _touni, _ctouni, \
eina_list_strings_to_python_list
from efl.eo cimport _register_decorated_callbacks
from efl.edje cimport Edje_Part_Type
from efl.edje import EDJE_PART_TYPE_EXTERNAL
@ -30,9 +31,20 @@ EDJE_EDIT_IMAGE_COMP_LOSSY = 3
cdef class EdjeEdit(Edje):
def __init__(self, Canvas canvas not None, **kargs):
def __init__(self, Canvas canvas not None, file=None, group=None, size=None,
geometry=None, **kwargs):
self._set_obj(edje_edit_object_add(canvas.obj))
self._set_common_params(**kargs)
_register_decorated_callbacks(self)
if file:
self.file_set(file, group)
self._set_properties_from_keyword_args(kwargs)
if not size and not geometry:
w, h = self.size_min_get()
self.size_set(w, h)
# General
def compiler_get(self):

View File

@ -64,7 +64,10 @@ cdef class State:
self.value))
"""
def rel1_to_get(self):
cdef const_char *tx, *ty
cdef:
const_char *tx
const_char *ty
tx = edje_edit_state_rel1_to_x_get(self.edje.obj, self.part, self.name,
self.value)
ty = edje_edit_state_rel1_to_y_get(self.edje.obj, self.part, self.name,
@ -525,7 +528,7 @@ cdef class State:
lst = edje_edit_state_external_params_list_get(self.edje.obj, self.part,
self.name, self.value)
while lst:
p = c_edje._ExternalParam_from_ptr(<long>lst.data)
p = c_edje._ExternalParam_from_ptr(<uintptr_t>lst.data)
if p is not None:
ret.append(p)
lst = lst.next

View File

@ -78,7 +78,7 @@ cdef ExternalParam ExternalParam_from_ptr(Edje_External_Param *param):
# XXX: this should be C-only, but it would require edje_edit
# XXX: being able to use it.
def _ExternalParam_from_ptr(long ptr):
def _ExternalParam_from_ptr(uintptr_t ptr):
return ExternalParam_from_ptr(<Edje_External_Param *>ptr)

View File

@ -213,7 +213,9 @@ cdef class Edje(Object):
:rtype: tuple of str
"""
cdef const_char *file, *group
cdef:
const_char *file
const_char *group
edje_object_file_get(self.obj, &file, &group)
return (_ctouni(file), _ctouni(group))

View File

@ -42,19 +42,19 @@ When the indicator is released, it will move to its nearest "enabled and
magnetized" position.
This widget emits the following signals, besides the ones sent from
:py:class:`efl.elementary.layout_class.LayoutClass`:
:py:class:`~efl.elementary.layout_class.LayoutClass`:
- **selected** - when user selects an enabled position (the label is
- ``selected`` - when user selects an enabled position (the label is
passed as event info)".
- **pos_changed** - when the indicator reaches any of the
- ``pos_changed`` - when the indicator reaches any of the
positions("left", "right" or "center").
Default text parts of the actionslider widget that you can use for are:
- **indicator** - An indicator label of the actionslider
- **left** - A left label of the actionslider
- **right** - A right label of the actionslider
- **center** - A center label of the actionslider
- ``indicator`` - An indicator label of the actionslider
- ``left`` - A left label of the actionslider
- ``right`` - A right label of the actionslider
- ``center`` - A center label of the actionslider
Enumerations
@ -88,6 +88,7 @@ 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
from efl.utils.conversions cimport _ctouni
@ -102,7 +103,7 @@ ELM_ACTIONSLIDER_CENTER = enums.ELM_ACTIONSLIDER_CENTER
ELM_ACTIONSLIDER_RIGHT = enums.ELM_ACTIONSLIDER_RIGHT
ELM_ACTIONSLIDER_ALL = enums.ELM_ACTIONSLIDER_ALL
def _cb_string_conv(long addr):
def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr
return _ctouni(s) if s is not NULL else None

View File

@ -34,7 +34,7 @@ background, like setting it to tiled, centered, scaled or stretched.
Default content parts of the bg widget that you can use for are:
- **overlay** - overlay of the bg
- ``overlay`` - overlay of the bg
Enumerations
@ -115,7 +115,10 @@ cdef class Background(LayoutClass):
"""
def __get__(self):
cdef const_char *filename, *group
cdef:
const_char *filename
const_char *group
elm_bg_file_get(self.obj, &filename, &group)
return (_ctouni(filename), _ctouni(group))
@ -141,7 +144,10 @@ cdef class Background(LayoutClass):
<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, *group
cdef:
const_char *filename
const_char *group
elm_bg_file_get(self.obj, &filename, &group)
return (_ctouni(filename), _ctouni(group))

View File

@ -40,13 +40,13 @@ The bubble widget contains 5 important visual elements:
The position of the arrow, icon, label and info depends on which corner is
selected. The four available corners are:
- **top_left** - Default
- **top_right**
- **bottom_left**
- **bottom_right**
- ``top_left`` - Default
- ``top_right``
- ``bottom_left``
- ``bottom_right``
This widget emits the following signals, besides the ones sent from
:py:class:`efl.elementary.layout_class.LayoutClass`:
:py:class:`~efl.elementary.layout_class.LayoutClass`:
- ``clicked`` - This is called when a user has clicked the bubble.
- ``focused`` - When the bubble has received focus. (since 1.8)
@ -54,13 +54,13 @@ This widget emits the following signals, besides the ones sent from
Default content parts of the bubble that you can use for are:
- **default** - A content of the bubble
- **icon** - An icon of the bubble
- ``default`` - A content of the bubble
- ``icon`` - An icon of the bubble
Default text parts of the button widget that you can use for are:
- **default** - Label of the bubble
- **info** - info of the bubble
- ``default`` - Label of the bubble
- ``info`` - info of the bubble
Enumerations

View File

@ -39,27 +39,27 @@ This widget emits the following signals, besides the ones sent from
Also, defined in the default theme, the button has the following styles
available:
- default: a normal button.
- anchor: Like default, but the button fades away when the mouse is not
- ``default``: a normal button.
- ``anchor``: Like default, but the button fades away when the mouse is not
over it, leaving only the text or icon.
- hoversel_vertical: Internally used by
- ``hoversel_vertical``: Internally used by
:py:class:`~efl.elementary.hoversel.Hoversel` to give a continuous look
across its options.
- hoversel_vertical_entry: Another internal for
- ``hoversel_vertical_entry``: Another internal for
:py:class:`~efl.elementary.hoversel.Hoversel`.
- naviframe: Internally used by
- ``naviframe``: Internally used by
:py:class:`~efl.elementary.naviframe.Naviframe` for its back button.
- colorselector: Internally used by
- ``colorselector``: Internally used by
:py:class:`~efl.elementary.colorselector.Colorselector` for its left and
right buttons.
Default content parts of the button widget that you can use for are:
- "icon" - An icon of the button
- ``icon`` - An icon of the button
Default text parts of the button widget that you can use for are:
- "default" - Label of the button
- ``default`` - Label of the button
"""

View File

@ -37,7 +37,7 @@ The API of this widget lets the applications perform other functions, like:
- setting the year and month format.
This widget emits the following signals, besides the ones sent from
:py:class:`efl.elementary.layout_class.LayoutClass`:
:py:class:`~efl.elementary.layout_class.LayoutClass`:
- ``changed`` - emitted when the date in the calendar is changed.
- ``display,changed`` - emitted when the current month displayed in the

View File

@ -40,13 +40,13 @@ This widget emits the following signals, besides the ones sent from
Default content parts of the check widget that you can use for are:
- "icon" - An icon of the check
- ``icon`` - An icon of the check
Default text parts of the check widget that you can use for are:
- "default" - A label of the check
- "on" - On state label of the check
- "off" - Off state label of the check
- ``default`` - A label of the check
- ``on`` - On state label of the check
- ``off`` - Off state label of the check
"""

View File

@ -18,11 +18,12 @@
"""
.. image:: /images/colorselector-preview.png
Widget description
------------------
.. image:: /images/colorselector-preview.png
:align: left
A Colorselector is a color selection widget.
It allows application to set a series of colors. It also allows to
@ -68,6 +69,7 @@ Colorselector modes
"""
from cpython cimport PyUnicode_AsUTF8String, Py_DECREF
from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register
from efl.utils.conversions cimport _ctouni
@ -81,7 +83,7 @@ ELM_COLORSELECTOR_PALETTE = enums.ELM_COLORSELECTOR_PALETTE
ELM_COLORSELECTOR_COMPONENTS = enums.ELM_COLORSELECTOR_COMPONENTS
ELM_COLORSELECTOR_BOTH = enums.ELM_COLORSELECTOR_BOTH
def _cb_object_item_conv(long addr):
def _cb_object_item_conv(uintptr_t addr):
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
return _object_item_to_python(it)

View File

@ -590,9 +590,12 @@ cdef class Configuration(object):
"""
def __get__(self):
cdef Eina_List *lst
cdef Elm_Text_Class *data
cdef const_char *name, *desc
cdef:
Eina_List *lst
Elm_Text_Class *data
const_char *name
const_char *desc
ret = []
lst = elm_config_text_classes_list_get()
while lst:
@ -617,10 +620,13 @@ cdef class Configuration(object):
"""
def __get__(self):
cdef const_Eina_List *lst
cdef Elm_Font_Overlay *data
cdef const_char *text_class, *font
cdef Evas_Font_Size size
cdef:
const_Eina_List *lst
Elm_Font_Overlay *data
const_char *text_class
const_char *font
Evas_Font_Size size
ret = []
lst = elm_config_font_overlay_list_get()
while lst:

View File

@ -31,20 +31,20 @@ space required for such stuff, and when they popup, as a keyboard
shows when an entry is selected, conformant content won't change.
This widget emits the following signals, besides the ones sent from
:py:class:`efl.elementary.layout_class.LayoutClass`:
:py:class:`~efl.elementary.layout_class.LayoutClass`:
- "virtualkeypad,state,on": if virtualkeypad state is switched to "on".
- "virtualkeypad,state,off": if virtualkeypad state is switched to "off".
- "clipboard,state,on": if clipboard state is switched to "on".
- "clipboard,state,off": if clipboard state is switched to "off".
- ``virtualkeypad,state,on``: if virtualkeypad state is switched to ``on``.
- ``virtualkeypad,state,off``: if virtualkeypad state is switched to ``off``.
- ``clipboard,state,on``: if clipboard state is switched to ``on``.
- ``clipboard,state,off``: if clipboard state is switched to ``off``.
In all cases, the ``event`` parameter of the callback will be None.
Available styles for it:
- ``"default"``
- ``default``
Default content parts of the conformant widget that you can use for are:
- "default" - A content of the conformant
- ``default`` - A content of the conformant
"""

View File

@ -44,15 +44,15 @@ Signals that you can add callbacks for are:
Default content parts of the ctxpopup widget that you can use for are:
- "default" - A content of the ctxpopup
- ``default`` - A content of the ctxpopup
Default content parts of the ctxpopup items that you can use for are:
- "icon" - An icon in the title area
- ``icon`` - An icon in the title area
Default text parts of the ctxpopup items that you can use for are:
- "default" - Title label in the title area
- ``default`` - Title label in the title area
.. note::

View File

@ -62,12 +62,12 @@ the different check styles for individual days.
This widget emits the following signals, besides the ones sent from
:py:class:`~efl.elementary.layout_class.LayoutClass`:
- ``"dayselector,changed"`` - when the user changes the state of a day.
- ``"language,changed"`` - the program's language changed
- ``dayselector,changed`` - when the user changes the state of a day.
- ``language,changed`` - the program's language changed
Available styles for dayselector are:
- default
- ``default``
Enumerations

View File

@ -42,17 +42,17 @@ Smart callbacks one can listen to:
Available styles for it:
- ``"default"``
- ``default``
Default content parts of the diskselector items that you can use for are:
- "icon" - An icon in the diskselector item
- ``icon`` - An icon in the diskselector item
Default text parts of the diskselector items that you can use for are:
- "default" - Label of the diskselector item
- ``default`` - Label of the diskselector item
.. note:: The "scroll,anim,*" and "scroll,drag,*" signals are only emitted
.. note:: The ``scroll,anim,*`` and ``scroll,drag,*`` signals are only emitted
by user intervention.
Scrollable Interface
@ -72,6 +72,7 @@ using multiple inheritance, for example::
"""
from cpython cimport PyUnicode_AsUTF8String, Py_DECREF
from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register
from efl.utils.conversions cimport _ctouni
@ -84,7 +85,7 @@ from efl.utils.deprecated cimport DEPRECATED
from scroller cimport elm_scroller_policy_get, elm_scroller_policy_set, \
elm_scroller_bounce_get, elm_scroller_bounce_set, Elm_Scroller_Policy
def _cb_object_item_conv(long addr):
def _cb_object_item_conv(uintptr_t addr):
cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
return _object_item_to_python(it)

View File

@ -214,51 +214,52 @@ Emitted signals
This widget emits the following signals:
- "changed": The text within the entry was changed.
- "changed,user": The text within the entry was changed because of user
- ``changed``: The text within the entry was changed.
- ``changed,user``: The text within the entry was changed because of user
interaction.
- "activated": The enter key was pressed on a single line entry.
- "aborted": The escape key was pressed on a single line entry. (since 1.7)
- "press": A mouse button has been pressed on the entry.
- "longpressed": A mouse button has been pressed and held for a couple
- ``activated``: The enter key was pressed on a single line entry.
- ``aborted``: The escape key was pressed on a single line entry. (since 1.7)
- ``press``: A mouse button has been pressed on the entry.
- ``longpressed``: A mouse button has been pressed and held for a couple
seconds.
- "clicked": The entry has been clicked (mouse press and release).
- "clicked,double": The entry has been double clicked.
- "clicked,triple": The entry has been triple clicked.
- "focused": The entry has received focus.
- "unfocused": The entry has lost focus.
- "selection,paste": A paste of the clipboard contents was requested.
- "selection,copy": A copy of the selected text into the clipboard was
- ``clicked``: The entry has been clicked (mouse press and release).
- ``clicked,double``: The entry has been double clicked.
- ``clicked,triple``: The entry has been triple clicked.
- ``focused``: The entry has received focus.
- ``unfocused``: The entry has lost focus.
- ``selection,paste``: A paste of the clipboard contents was requested.
- ``selection,copy``: A copy of the selected text into the clipboard was
requested.
- "selection,cut": A cut of the selected text into the clipboard was
- ``selection,cut``: A cut of the selected text into the clipboard was
requested.
- "selection,start": A selection has begun and no previous selection
- ``selection,start``: A selection has begun and no previous selection
existed.
- "selection,changed": The current selection has changed.
- "selection,cleared": The current selection has been cleared.
- "cursor,changed": The cursor has changed position.
- "anchor,clicked": An anchor has been clicked. The event_info
- ``selection,changed``: The current selection has changed.
- ``selection,cleared``: The current selection has been cleared.
- ``cursor,changed``: The cursor has changed position.
- ``anchor,clicked``: An anchor has been clicked. The event_info
parameter for the callback will be an :py:class:`EntryAnchorInfo`.
- "anchor,in": Mouse cursor has moved into an anchor. The event_info
- ``anchor,in``: Mouse cursor has moved into an anchor. The event_info
parameter for the callback will be an :py:class:`EntryAnchorInfo`.
- "anchor,out": Mouse cursor has moved out of an anchor. The event_info
- ``anchor,out``: Mouse cursor has moved out of an anchor. The event_info
parameter for the callback will be an :py:class:`EntryAnchorInfo`.
- "anchor,up": Mouse button has been unpressed on an anchor. The event_info
- ``anchor,up``: Mouse button has been unpressed on an anchor. The event_info
parameter for the callback will be an :py:class:`EntryAnchorInfo`.
- "anchor,down": Mouse button has been pressed on an anchor. The event_info
- ``anchor,down``: Mouse button has been pressed on an anchor. The event_info
parameter for the callback will be an :py:class:`EntryAnchorInfo`.
- "preedit,changed": The preedit string has changed.
- "language,changed": Program language changed.
- "text,set,done": Whole text has been set to the entry.
- ``preedit,changed``: The preedit string has changed.
- ``language,changed``: Program language changed.
- ``text,set,done``: Whole text has been set to the entry.
Default content parts of the entry items that you can use for are:
- "icon" - An icon in the entry
- "end" - A content in the end of the entry
- ``icon`` - An icon in the entry
- ``end`` - A content in the end of the entry
Default text parts of the entry that you can use for are:
- "default" - text of the entry
- ``default`` - text of the entry
- ``guide`` - placeholder of the entry
Enumerations
@ -468,6 +469,7 @@ Icon types
from libc.string cimport strdup
from libc.stdlib cimport free
from libc.stdint cimport uintptr_t
from cpython cimport PyUnicode_AsUTF8String, Py_INCREF
from efl.eo cimport _object_mapping_register, object_from_instance
@ -602,7 +604,8 @@ cdef class EntryContextMenuItem(object):
"""
def __get__(self):
cdef:
const_char *icon_file, *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,
@ -753,7 +756,7 @@ class EntryAnchorHoverInfo(object):
self.hover_top = False
self.hover_bottom = False
def _entryanchor_conv(long addr):
def _entryanchor_conv(uintptr_t addr):
cdef Elm_Entry_Anchor_Info *ei = <Elm_Entry_Anchor_Info *>addr
eai = EntryAnchorInfo()
eai.name = _ctouni(ei.name)
@ -764,10 +767,10 @@ def _entryanchor_conv(long addr):
eai.h = ei.h
return eai
def _entryanchorhover_conv(long addr):
def _entryanchorhover_conv(uintptr_t addr):
cdef Elm_Entry_Anchor_Hover_Info *ehi = <Elm_Entry_Anchor_Hover_Info *>addr
eahi = EntryAnchorHoverInfo()
eahi.anchor_info = _entryanchor_conv(<long><void *>ehi.anchor_info)
eahi.anchor_info = _entryanchor_conv(<uintptr_t><void *>ehi.anchor_info)
eahi.hover = object_from_instance(ehi.hover)
eahi.hover_parent = (ehi.hover_parent.x, ehi.hover_parent.y,
ehi.hover_parent.w, ehi.hover_parent.h)

View File

@ -145,6 +145,10 @@ cdef extern from "Elementary.h":
ctypedef enum Elm_Focus_Direction:
ELM_FOCUS_PREVIOUS
ELM_FOCUS_NEXT
ELM_FOCUS_UP
ELM_FOCUS_DOWN
ELM_FOCUS_RIGHT
ELM_FOCUS_LEFT
ctypedef enum Elm_Genlist_Item_Type:
ELM_GENLIST_ITEM_NONE

View File

@ -85,6 +85,7 @@ Fileselector modes
"""
from cpython cimport PyUnicode_AsUTF8String
from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register
from efl.utils.conversions cimport _ctouni, eina_list_strings_to_python_list
@ -96,7 +97,7 @@ cimport enums
ELM_FILESELECTOR_LIST = enums.ELM_FILESELECTOR_LIST
ELM_FILESELECTOR_GRID = enums.ELM_FILESELECTOR_GRID
def _cb_string_conv(long addr):
def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr
return _ctouni(s) if s is not NULL else None
@ -347,7 +348,7 @@ cdef class Fileselector(LayoutClass):
"""
mime_types_s = ",".join(mime_types)
if isinstance(mime_types_s, unicode): mime_types_s = PyUnicode_AsUTF8String(mime_types)
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):

View File

@ -36,31 +36,33 @@ would have instantiating one directly.
The following styles are available for this button:
- ``"default"``
- ``"anchor"``
- ``"hoversel_vertical"``
- ``"hoversel_vertical_entry"``
- ``default``
- ``anchor``
- ``hoversel_vertical``
- ``hoversel_vertical_entry``
This widget emits the following signals, besides the ones sent from
:py:class:`~efl.elementary.button.Button`:
- ``"file,chosen"`` - the user has selected a path which comes as the
- ``file,chosen`` - the user has selected a path which comes as the
``event_info`` data
- ``language,changed`` - the program's language changed
Default text parts of the fileselector_button widget that you can use for
are:
- "default" - Label of the fileselector_button
- ``default`` - Label of the fileselector_button
Default content parts of the fileselector_button widget that you can use
for are:
- "icon" - Icon of the fileselector_button
- ``icon`` - Icon of the fileselector_button
"""
from cpython cimport PyUnicode_AsUTF8String
from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register
from efl.utils.conversions cimport _ctouni
@ -68,7 +70,7 @@ from efl.evas cimport Object as evasObject
cimport enums
def _cb_string_conv(long addr):
def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr
return _ctouni(s) if s is not NULL else None
@ -269,5 +271,15 @@ cdef class FileselectorButton(Button):
def callback_file_chosen_del(self, func):
self._callback_del_full("file,chosen", _cb_string_conv, func)
def callback_language_changed_add(self, func, *args, **kwargs):
"""The program's language changed.
.. versionadded:: 1.8.1
"""
self._callback_add("language,changed", func, *args, **kwargs)
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
_object_mapping_register("Elm_Fileselector_Button", FileselectorButton)

View File

@ -43,40 +43,42 @@ selector than that one would have instantiating one directly.
Smart callbacks one can register to:
- ``"changed"`` - The text within the entry was changed
- ``"activated"`` - The entry has had editing finished and
- ``changed`` - The text within the entry was changed
- ``activated`` - The entry has had editing finished and
changes are to be "committed"
- ``"press"`` - The entry has been clicked
- ``"longpressed"`` - The entry has been clicked (and held) for a
- ``press`` - The entry has been clicked
- ``longpressed`` - The entry has been clicked (and held) for a
couple seconds
- ``"clicked"`` - The entry has been clicked
- ``"clicked,double"`` - The entry has been double clicked
- ``"focused"`` - The entry has received focus
- ``"unfocused"`` - The entry has lost focus
- ``"selection,paste"`` - A paste action has occurred on the
- ``clicked`` - The entry has been clicked
- ``clicked,double`` - The entry has been double clicked
- ``focused`` - The entry has received focus
- ``unfocused`` - The entry has lost focus
- ``selection,paste`` - A paste action has occurred on the
entry
- ``"selection,copy"`` - A copy action has occurred on the entry
- ``"selection,cut"`` - A cut action has occurred on the entry
- ``"unpressed"`` - The file selector entry's button was released
- ``selection,copy`` - A copy action has occurred on the entry
- ``selection,cut`` - A cut action has occurred on the entry
- ``unpressed`` - The file selector entry's button was released
after being pressed.
- ``"file,chosen"`` - The user has selected a path via the file
- ``file,chosen`` - The user has selected a path via the file
selector entry's internal file selector, whose string
comes as the ``event_info`` data.
- ``language,changed`` - the program's language changed
Default text parts of the fileselector_button widget that you can use for
are:
- "default" - Label of the fileselector_button
- ``default`` - Label of the fileselector_button
Default content parts of the fileselector_entry widget that you can use for
are:
- "button icon" - Button icon of the fileselector_entry
- ``button icon`` - Button icon of the fileselector_entry
"""
from cpython cimport PyUnicode_AsUTF8String
from libc.stdint cimport uintptr_t
from efl.eo cimport _object_mapping_register
from efl.utils.conversions cimport _ctouni
@ -85,7 +87,7 @@ from layout_class cimport LayoutClass
cimport enums
def _cb_string_conv(long addr):
def _cb_string_conv(uintptr_t addr):
cdef const_char *s = <const_char *>addr
return _ctouni(s) if s is not NULL else None
@ -403,5 +405,15 @@ cdef class FileselectorEntry(LayoutClass):
def callback_file_chosen_del(self, func):
self._callback_del_full("file,chosen", _cb_string_conv, func)
def callback_language_changed_add(self, func, *args, **kwargs):
"""The program's language changed.
.. versionadded:: 1.8.1
"""
self._callback_add("language,changed", func, *args, **kwargs)
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
_object_mapping_register("Elm_Fileselector_Entry", FileselectorEntry)

View File

@ -35,13 +35,13 @@ For a list of supported animations see :py:meth:`Flip.go`.
Signals that you can add callbacks for are:
- "animate,begin" - when a flip animation was started
- "animate,done" - when a flip animation is finished
- ``animate,begin`` - when a flip animation was started
- ``animate,done`` - when a flip animation is finished
Default content parts of the flip widget that you can use for are:
- "front" - A front content of the flip
- "back" - A back content of the flip
- ``front`` - A front content of the flip
- ``back`` - A back content of the flip
Enumerations

View File

@ -38,25 +38,26 @@ the current selection.
This widget emits the following signals, besides the ones sent from
:py:class:`~efl.elementary.layout_class.LayoutClass`:
- ``"selected"`` - when the widget's selected text item is changed
- ``"overflowed"`` - when the widget's current selection is changed
- ``selected`` - when the widget's selected text item is changed
- ``overflowed`` - when the widget's current selection is changed
from the first item in its list to the last
- ``"underflowed"`` - when the widget's current selection is changed
- ``underflowed`` - when the widget's current selection is changed
from the last item in its list to the first
- ``focused`` - When the flipselector has received focus. (since 1.8)
- ``unfocused`` - When the flipselector has lost focus. (since 1.8)
Available styles for it:
- ``"default"``
- ``default``