2013-02-13 11:16:02 -08:00
|
|
|
# Copyright (C) 2007-2013 various contributors (see AUTHORS)
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
#
|
2013-02-13 11:16:02 -08:00
|
|
|
# This file is part of Python-EFL.
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
#
|
2013-02-13 11:16:02 -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
|
2013-12-07 08:54:58 -08:00
|
|
|
# version 3 of the License, or (at your option) any later version.
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
#
|
2013-02-13 11:16:02 -08:00
|
|
|
# Python-EFL is distributed in the hope that it will be useful,
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2013-02-13 11:16:02 -08:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
2013-02-13 11:16:02 -08:00
|
|
|
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
|
2013-02-17 11:35:20 -08:00
|
|
|
#
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2013-05-01 05:34:45 -07:00
|
|
|
Widget description
|
|
|
|
------------------
|
2013-04-04 08:00:45 -07:00
|
|
|
|
|
|
|
.. image:: /images/ctxpopup-preview.png
|
2013-04-27 13:01:53 -07:00
|
|
|
:align: left
|
2013-04-04 08:00:45 -07:00
|
|
|
|
|
|
|
A ctxpopup is a widget that, when shown, pops up a list of items. It
|
|
|
|
automatically chooses an area inside its parent object's view to
|
|
|
|
optimally fit into it. In the default theme, it will also point an arrow
|
|
|
|
to it's top left position at the time one shows it. Ctxpopup items have
|
|
|
|
a label and/or an icon. It is intended for a small number of items
|
|
|
|
(hence the use of list, not genlist).
|
|
|
|
|
|
|
|
Signals that you can add callbacks for are:
|
|
|
|
|
2013-09-22 11:16:31 -07:00
|
|
|
- ``dismissed`` - This is called when 1. the outside of ctxpopup was clicked
|
|
|
|
or 2. its parent area is changed or 3. the language is changed and also when
|
|
|
|
4. the parent object is resized due to the window rotation. Then ctxpopup is
|
|
|
|
dismissed.
|
|
|
|
- ``language,changed`` - This is called when the program's language is
|
|
|
|
changed.
|
|
|
|
- ``focused`` - When the ctxpopup has received focus. (since 1.8)
|
|
|
|
- ``unfocused`` - When the ctxpopup has lost focus. (since 1.8)
|
2013-04-04 08:00:45 -07:00
|
|
|
|
|
|
|
Default content parts of the ctxpopup widget that you can use for are:
|
|
|
|
|
2013-12-22 00:25:40 -08:00
|
|
|
- ``default`` - A content of the ctxpopup
|
2013-04-04 08:00:45 -07:00
|
|
|
|
|
|
|
Default content parts of the ctxpopup items that you can use for are:
|
|
|
|
|
2013-12-22 00:25:40 -08:00
|
|
|
- ``icon`` - An icon in the title area
|
2013-04-04 08:00:45 -07:00
|
|
|
|
|
|
|
Default text parts of the ctxpopup items that you can use for are:
|
|
|
|
|
2013-12-22 00:25:40 -08:00
|
|
|
- ``default`` - Title label in the title area
|
2013-04-04 08:00:45 -07:00
|
|
|
|
2013-12-03 11:56:47 -08:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
Ctxpopup is a specialization of :py:class:`~efl.elementary.hover.Hover`.
|
2013-04-04 08:00:45 -07:00
|
|
|
|
|
|
|
|
2013-05-01 05:34:45 -07:00
|
|
|
Enumerations
|
|
|
|
------------
|
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
.. _Elm_Ctxpopup_Direction:
|
|
|
|
|
|
|
|
Ctxpopup arrow directions
|
|
|
|
=========================
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
.. data:: ELM_CTXPOPUP_DIRECTION_DOWN
|
|
|
|
|
|
|
|
Arrow is pointing down
|
|
|
|
|
|
|
|
.. data:: ELM_CTXPOPUP_DIRECTION_RIGHT
|
|
|
|
|
|
|
|
Arrow is pointing right
|
|
|
|
|
|
|
|
.. data:: ELM_CTXPOPUP_DIRECTION_LEFT
|
|
|
|
|
|
|
|
Arrow is pointing left
|
|
|
|
|
|
|
|
.. data:: ELM_CTXPOPUP_DIRECTION_UP
|
|
|
|
|
|
|
|
Arrow is pointing up
|
2013-02-13 11:16:02 -08:00
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
.. data:: ELM_CTXPOPUP_DIRECTION_UNKNOWN
|
|
|
|
|
|
|
|
Arrow direction is unknown
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2013-10-06 01:52:36 -07:00
|
|
|
from cpython cimport PyUnicode_AsUTF8String, Py_DECREF
|
|
|
|
|
2013-10-20 13:45:47 -07:00
|
|
|
from efl.eo cimport _object_mapping_register, object_from_instance
|
|
|
|
from efl.utils.conversions cimport _ctouni
|
|
|
|
from efl.evas cimport Object as evasObject
|
2013-04-27 07:43:22 -07:00
|
|
|
from layout_class cimport LayoutClass
|
2013-11-14 02:31:41 -08:00
|
|
|
from object_item cimport ObjectItem, _object_item_callback, \
|
|
|
|
_object_item_callback2
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
cimport enums
|
|
|
|
|
|
|
|
ELM_CTXPOPUP_DIRECTION_DOWN = enums.ELM_CTXPOPUP_DIRECTION_DOWN
|
|
|
|
ELM_CTXPOPUP_DIRECTION_RIGHT = enums.ELM_CTXPOPUP_DIRECTION_RIGHT
|
|
|
|
ELM_CTXPOPUP_DIRECTION_LEFT = enums.ELM_CTXPOPUP_DIRECTION_LEFT
|
|
|
|
ELM_CTXPOPUP_DIRECTION_UP = enums.ELM_CTXPOPUP_DIRECTION_UP
|
|
|
|
ELM_CTXPOPUP_DIRECTION_UNKNOWN = enums.ELM_CTXPOPUP_DIRECTION_UNKNOWN
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
|
|
|
cdef class CtxpopupItem(ObjectItem):
|
|
|
|
|
2013-12-03 11:56:47 -08:00
|
|
|
"""An item for Ctxpopup widget."""
|
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
cdef:
|
|
|
|
bytes label
|
|
|
|
evasObject icon
|
|
|
|
|
2013-11-14 02:31:41 -08:00
|
|
|
def __init__(self, label = None, evasObject icon = None,
|
|
|
|
callback = None, cb_data = None, *args, **kargs):
|
2013-04-27 07:43:22 -07:00
|
|
|
"""
|
|
|
|
.. warning:: Ctxpopup can't hold both an item list and a content at the
|
|
|
|
same time. When an item is added, any previous content will be
|
|
|
|
removed.
|
|
|
|
|
|
|
|
:param icon: Icon to be set on new item
|
2013-12-04 22:29:55 -08:00
|
|
|
:type icon: :py:class:`~efl.evas.Object`
|
2013-04-27 07:43:22 -07:00
|
|
|
:param label: The Label of the new item
|
|
|
|
:type label: string
|
|
|
|
:param func: Convenience function called when item selected
|
|
|
|
:type func: function
|
|
|
|
:return: The item added or ``None``, on errors
|
|
|
|
:rtype: :py:class:`CtxpopupItem`
|
|
|
|
|
|
|
|
"""
|
|
|
|
if callback is not None:
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
if not callable(callback):
|
|
|
|
raise TypeError("callback is not callable")
|
|
|
|
|
2013-04-18 12:43:32 -07:00
|
|
|
if isinstance(label, unicode): label = PyUnicode_AsUTF8String(label)
|
2013-04-27 07:43:22 -07:00
|
|
|
self.label = label
|
|
|
|
self.icon = icon
|
|
|
|
self.cb_func = callback
|
2013-11-14 02:31:41 -08:00
|
|
|
self.cb_data = cb_data
|
2013-04-27 07:43:22 -07:00
|
|
|
self.args = args
|
|
|
|
self.kwargs = kargs
|
|
|
|
|
|
|
|
def append_to(self, evasObject ctxpopup):
|
2013-12-03 11:56:47 -08:00
|
|
|
"""append_to(Object ctxpopup) -> CtxpopupItem
|
2013-04-27 07:43:22 -07:00
|
|
|
|
|
|
|
Add a new item to a ctxpopup object.
|
|
|
|
|
|
|
|
.. warning:: Ctxpopup can't hold both an item list and a content at the
|
|
|
|
same time. When an item is added, any previous content will be
|
|
|
|
removed.
|
|
|
|
|
2013-12-03 11:56:47 -08:00
|
|
|
.. seealso:: :py:attr:`~efl.elementary.object.Object.content`
|
2013-04-27 07:43:22 -07:00
|
|
|
|
|
|
|
:param ctxpopup: The Ctxpopup widget this item is to be appended on
|
|
|
|
:type ctxpopup: :py:class:`Ctxpopup`
|
|
|
|
:return: The item added or ``None``, on errors
|
|
|
|
:rtype: :py:class:`CtxpopupItem`
|
|
|
|
|
|
|
|
"""
|
|
|
|
cdef Elm_Object_Item *item
|
|
|
|
cdef Evas_Smart_Cb cb = NULL
|
|
|
|
|
|
|
|
if self.cb_func is not None:
|
2013-11-14 02:31:41 -08:00
|
|
|
cb = _object_item_callback2
|
2013-04-27 07:43:22 -07:00
|
|
|
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
item = elm_ctxpopup_item_append(ctxpopup.obj,
|
2013-04-27 07:43:22 -07:00
|
|
|
<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)
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-12-05 20:42:53 -08:00
|
|
|
if item == NULL:
|
|
|
|
raise RuntimeError("The item could not be added to the widget.")
|
|
|
|
|
|
|
|
self._set_obj(item)
|
|
|
|
self._set_properties_from_keyword_args(self.kwargs)
|
|
|
|
return self
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
cdef class Ctxpopup(LayoutClass):
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-12-06 07:39:13 -08:00
|
|
|
"""This is the class that actually implements the widget.
|
|
|
|
|
|
|
|
.. versionchanged:: 1.8
|
|
|
|
Inherits from LayoutClass
|
|
|
|
|
|
|
|
"""
|
2013-02-17 11:35:20 -08:00
|
|
|
|
2013-10-25 07:38:01 -07:00
|
|
|
def __init__(self, evasObject parent, *args, **kwargs):
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
self._set_obj(elm_ctxpopup_add(parent.obj))
|
2013-10-25 07:38:01 -07:00
|
|
|
self._set_properties_from_keyword_args(kwargs)
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
property hover_parent:
|
|
|
|
"""Ctxpopup hover's parent
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-12-03 11:56:47 -08:00
|
|
|
:type: :py:class:`~efl.evas.Object`
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
"""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
def __get__(self):
|
|
|
|
return object_from_instance(elm_ctxpopup_hover_parent_get(self.obj))
|
|
|
|
|
|
|
|
def __set__(self, evasObject parent):
|
|
|
|
elm_ctxpopup_hover_parent_set(self.obj, parent.obj)
|
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
def hover_parent_set(self, evasObject parent):
|
|
|
|
elm_ctxpopup_hover_parent_set(self.obj, parent.obj)
|
|
|
|
def hover_parent_get(self):
|
|
|
|
return object_from_instance(elm_ctxpopup_hover_parent_get(self.obj))
|
|
|
|
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
def clear(self):
|
2013-02-17 11:35:20 -08:00
|
|
|
"""Clear all items in the given ctxpopup object."""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
elm_ctxpopup_clear(self.obj)
|
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
property horizontal:
|
|
|
|
"""Ctxpopup objects orientation.
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
:type: bool
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
"""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
def __get__(self):
|
|
|
|
return bool(elm_ctxpopup_horizontal_get(self.obj))
|
|
|
|
|
|
|
|
def __set__(self, horizontal):
|
|
|
|
elm_ctxpopup_horizontal_set(self.obj, horizontal)
|
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
def horizontal_set(self, horizontal):
|
|
|
|
elm_ctxpopup_horizontal_set(self.obj, horizontal)
|
|
|
|
def horizontal_get(self):
|
|
|
|
return bool(elm_ctxpopup_horizontal_get(self.obj))
|
|
|
|
|
2013-11-14 02:31:41 -08:00
|
|
|
def item_append(self, label, evasObject icon = None, func = None,
|
|
|
|
*args, **kwargs):
|
2013-02-17 11:35:20 -08:00
|
|
|
"""item_append(unicode label, evas.Object icon, func, *args, **kwargs) -> CtxpopupItem
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
A constructor for a :py:class:`CtxpopupItem`.
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
:see: :py:func:`CtxpopupItem.append_to`
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
"""
|
2013-11-14 02:31:41 -08:00
|
|
|
cdef:
|
|
|
|
Elm_Object_Item *item
|
|
|
|
Evas_Smart_Cb cb = NULL
|
|
|
|
CtxpopupItem ret = CtxpopupItem.__new__(CtxpopupItem)
|
|
|
|
|
|
|
|
if func is not None and callable(func):
|
|
|
|
cb = _object_item_callback
|
|
|
|
|
|
|
|
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,
|
|
|
|
icon.obj if icon is not None else NULL,
|
|
|
|
cb, <void*>ret)
|
|
|
|
|
|
|
|
if item != NULL:
|
|
|
|
ret._set_obj(item)
|
|
|
|
ret.cb_func = func
|
|
|
|
ret.args = args
|
|
|
|
ret.kwargs = kwargs
|
|
|
|
return ret
|
|
|
|
else:
|
|
|
|
return None
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
|
|
|
property direction_priority:
|
2013-02-17 11:35:20 -08:00
|
|
|
"""The direction priority order of a ctxpopup.
|
|
|
|
|
|
|
|
This functions gives a chance to user to set the priority of ctxpopup
|
|
|
|
showing direction. This doesn't guarantee the ctxpopup will appear
|
|
|
|
in the requested direction.
|
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
:type: (first, second, third, fourth) :ref:`Elm_Ctxpopup_Direction`
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
"""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
def __get__(self):
|
|
|
|
cdef Elm_Ctxpopup_Direction first, second, third, fourth
|
|
|
|
elm_ctxpopup_direction_priority_get(self.obj, &first, &second, &third, &fourth)
|
|
|
|
return (first, second, third, fourth)
|
|
|
|
|
|
|
|
def __set__(self, priority):
|
|
|
|
cdef Elm_Ctxpopup_Direction first, second, third, fourth
|
|
|
|
first, second, third, fourth = priority
|
|
|
|
elm_ctxpopup_direction_priority_set(self.obj, first, second, third, fourth)
|
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
def direction_priority_set(self, first, second, third, fourth):
|
|
|
|
elm_ctxpopup_direction_priority_set(self.obj, first, second, third, fourth)
|
|
|
|
def direction_priority_get(self):
|
|
|
|
cdef Elm_Ctxpopup_Direction first, second, third, fourth
|
|
|
|
elm_ctxpopup_direction_priority_get(self.obj, &first, &second, &third, &fourth)
|
|
|
|
return (first, second, third, fourth)
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
|
|
|
property direction:
|
2013-02-17 11:35:20 -08:00
|
|
|
"""Get the current direction of a ctxpopup.
|
|
|
|
|
|
|
|
.. warning:: Only once the ctxpopup is shown can the direction be
|
|
|
|
determined
|
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
:type: :ref:`Elm_Ctxpopup_Direction`
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
"""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
def __get__(self):
|
|
|
|
return elm_ctxpopup_direction_get(self.obj)
|
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
def direction_get(self):
|
|
|
|
return elm_ctxpopup_direction_get(self.obj)
|
|
|
|
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
def dismiss(self):
|
2013-02-17 11:35:20 -08:00
|
|
|
"""dismiss()
|
|
|
|
|
|
|
|
Dismiss a ctxpopup object
|
|
|
|
|
|
|
|
Use this function to simulate clicking outside the ctxpopup to
|
|
|
|
dismiss it. In this way, the ctxpopup will be hidden and the
|
|
|
|
"clicked" signal will be emitted.
|
|
|
|
|
|
|
|
"""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
elm_ctxpopup_dismiss(self.obj)
|
|
|
|
|
|
|
|
def callback_dismissed_add(self, func, *args, **kwargs):
|
2013-02-17 11:35:20 -08:00
|
|
|
"""the ctxpopup was dismissed"""
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
self._callback_add("dismissed", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_dismissed_del(self, func):
|
|
|
|
self._callback_del("dismissed", func)
|
|
|
|
|
2013-09-22 11:16:31 -07:00
|
|
|
def callback_language_changed_add(self, func, *args, **kwargs):
|
|
|
|
"""This is called when the program's language is changed."""
|
|
|
|
self._callback_add("language,changed", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_language_changed_del(self, func):
|
|
|
|
self._callback_del("language,changed", func)
|
|
|
|
|
|
|
|
def callback_focused_add(self, func, *args, **kwargs):
|
|
|
|
"""When the ctxpopup has received focus.
|
|
|
|
|
2013-12-06 07:39:13 -08:00
|
|
|
.. versionadded:: 1.8
|
2013-09-22 11:16:31 -07:00
|
|
|
"""
|
|
|
|
self._callback_add("focused", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_focused_del(self, func):
|
|
|
|
self._callback_del("focused", func)
|
|
|
|
|
|
|
|
def callback_unfocused_add(self, func, *args, **kwargs):
|
|
|
|
"""When the ctxpopup has lost focus.
|
|
|
|
|
2013-12-06 07:39:13 -08:00
|
|
|
.. versionadded:: 1.8
|
2013-09-22 11:16:31 -07:00
|
|
|
"""
|
|
|
|
self._callback_add("unfocused", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_unfocused_del(self, func):
|
|
|
|
self._callback_del("unfocused", func)
|
Put in a first, still wip, version of the python bindings in a merged tree.
This is meant to be the 1.8 version of the wrappers and will include everything
that now is in the python folder.
Atm this include evas, ecore, edje, elementary and emotion (emotion still commented
in the build couse it need some more testing). Eo is used as a base for all the
objects that inherit from it in C, but in real nothing is used from Eo, it is
used more like a container to share code between the libs.
All the docs has been stripped out because we want to use the new sphinx style
docs that Kay has done in his git repo. (Kay: please wait a little bit to include
it, as working on the libs without docs is much more easy)
The new wrappers include a new container module called efl and thus you can live
with both the old and the new installation. This also means that you need to import
the new modules as:
"from efl import evas" (instead of the old "import evas")
The idea here is that you can make your code works with both version doing
something like:
try:
import evas
except:
from efl import evas
...like is done in the gtk bindings
Some stuff has been leaved out on purpose, because was old stuff (like the hacked
evas rotation stuff) or because was not working as expected (like all the ecore.evas.XXX
modules). See the TODO.txt file for more info. Probably some stuff is out just because I
missed them, let me know if you miss something.
Improvements from the old version:
- Py3 compatible (still some work to be done, but really only TODO, no problems to resolv)
- Should also works on other platforms, like windoz (but not tested)
- Unittests greatly improved, you can also run ALL tests at once
- much more simpler :)
I will contine the works in the next weeks and hope someone will help too.
NOTE: I switched back to setup.py instead of autotools, because that is the right way to
compile python stuff. So to build just use:
python setup.py install
or
python3 setup.py install
Enjoy
davemds
SVN revision: 83831
2013-02-11 14:32:50 -08:00
|
|
|
|
2013-11-07 06:45:02 -08:00
|
|
|
_object_mapping_register("Elm_Ctxpopup", Ctxpopup)
|