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
|
|
|
|
# version 2.1 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
|
|
|
Enumerations
|
|
|
|
------------
|
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
.. _Elm_Web_Window_Feature:
|
|
|
|
|
|
|
|
Web window features
|
|
|
|
===================
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
.. data:: ELM_WEB_WINDOW_FEATURE_TOOLBAR
|
|
|
|
|
|
|
|
Toolbar
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_WINDOW_FEATURE_STATUSBAR
|
|
|
|
|
|
|
|
Status bar
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_WINDOW_FEATURE_SCROLLBARS
|
|
|
|
|
|
|
|
Scrollbars
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_WINDOW_FEATURE_MENUBAR
|
|
|
|
|
|
|
|
Menu bar
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_WINDOW_FEATURE_LOCATIONBAR
|
|
|
|
|
|
|
|
Location bar
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_WINDOW_FEATURE_FULLSCREEN
|
|
|
|
|
|
|
|
Fullscreen
|
|
|
|
|
|
|
|
|
2013-04-27 07:43:22 -07:00
|
|
|
.. _Elm_Web_Zoom_Mode:
|
|
|
|
|
|
|
|
Web zoom modes
|
|
|
|
==============
|
2013-02-17 11:35:20 -08:00
|
|
|
|
|
|
|
.. data:: ELM_WEB_ZOOM_MODE_MANUAL
|
|
|
|
|
|
|
|
Zoom controlled normally by :py:attr:`zoom`
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_ZOOM_MODE_AUTO_FIT
|
|
|
|
|
|
|
|
Zoom until content fits in web object.
|
|
|
|
|
|
|
|
.. data:: ELM_WEB_ZOOM_MODE_AUTO_FILL
|
2013-02-13 11:16:02 -08:00
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
Zoom until content fills web object.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2013-10-20 13:45:47 -07:00
|
|
|
from cpython cimport PyUnicode_AsUTF8String
|
2013-02-17 11:35:20 -08:00
|
|
|
|
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-02-17 11:35:20 -08:00
|
|
|
from object cimport Object
|
|
|
|
|
2013-02-22 04:00:26 -08:00
|
|
|
include "callback_conversions.pxi"
|
2013-02-17 11:35:20 -08:00
|
|
|
import traceback
|
|
|
|
|
|
|
|
cimport enums
|
|
|
|
|
|
|
|
ELM_WEB_WINDOW_FEATURE_TOOLBAR = enums.ELM_WEB_WINDOW_FEATURE_TOOLBAR
|
|
|
|
ELM_WEB_WINDOW_FEATURE_STATUSBAR = enums.ELM_WEB_WINDOW_FEATURE_STATUSBAR
|
|
|
|
ELM_WEB_WINDOW_FEATURE_SCROLLBARS = enums.ELM_WEB_WINDOW_FEATURE_SCROLLBARS
|
|
|
|
ELM_WEB_WINDOW_FEATURE_MENUBAR = enums.ELM_WEB_WINDOW_FEATURE_MENUBAR
|
|
|
|
ELM_WEB_WINDOW_FEATURE_LOCATIONBAR = enums.ELM_WEB_WINDOW_FEATURE_LOCATIONBAR
|
|
|
|
ELM_WEB_WINDOW_FEATURE_FULLSCREEN = enums.ELM_WEB_WINDOW_FEATURE_FULLSCREEN
|
|
|
|
|
|
|
|
ELM_WEB_ZOOM_MODE_MANUAL = enums.ELM_WEB_ZOOM_MODE_MANUAL
|
|
|
|
ELM_WEB_ZOOM_MODE_AUTO_FIT = enums.ELM_WEB_ZOOM_MODE_AUTO_FIT
|
|
|
|
ELM_WEB_ZOOM_MODE_AUTO_FILL = enums.ELM_WEB_ZOOM_MODE_AUTO_FILL
|
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 _web_double_conv(long addr):
|
|
|
|
cdef double *info = <double *>addr
|
|
|
|
if info == NULL:
|
|
|
|
return None
|
|
|
|
return info[0]
|
|
|
|
|
|
|
|
def _web_load_frame_error_conv(long addr):
|
|
|
|
cdef Elm_Web_Frame_Load_Error *err = <Elm_Web_Frame_Load_Error *>addr
|
|
|
|
if err == NULL:
|
|
|
|
return None
|
|
|
|
ret = {
|
|
|
|
"code": err.code,
|
|
|
|
"is_cancellation": bool(err.is_cancellation),
|
|
|
|
}
|
2013-02-17 11:35:20 -08:00
|
|
|
ret["domain"] = _ctouni(err.domain) if err.domain else None
|
|
|
|
ret["description"] = _ctouni(err.description) if err.description else None
|
|
|
|
ret["failing_url"] = _ctouni(err.failing_url) if err.failing_url else None
|
|
|
|
ret["frame"] = object_from_instance(err.frame) if err.frame else 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
|
|
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
|
|
|
|
def _web_link_hover_in_conv(long addr):
|
|
|
|
cdef char **info = <char **>addr
|
|
|
|
if info == NULL:
|
|
|
|
url = title = None
|
|
|
|
else:
|
2013-02-17 11:35:20 -08:00
|
|
|
url = None if info[0] == NULL else info[0]
|
|
|
|
title = None if info[1] == NULL else info[1]
|
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
|
|
|
return (url, title)
|
|
|
|
|
|
|
|
|
2013-02-17 11:35:20 -08:00
|
|
|
cdef void _web_console_message_hook(void *data, Evas_Object *obj, const_char *message, unsigned int line_number, const_char *source_id) with gil:
|
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 Web self = <Web>data
|
|
|
|
|
|
|
|
try:
|
2013-02-17 11:35:20 -08:00
|
|
|
self._console_message_hook(self, _ctouni(message), line_number, _ctouni(source_id))
|
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
|
|
|
except Exception, e:
|
|
|
|
traceback.print_exc()
|
|
|
|
|
|
|
|
|
|
|
|
cdef class Web(Object):
|
|
|
|
cdef object _console_message_hook
|
|
|
|
|
|
|
|
def __init__(self,evasObject parent):
|
|
|
|
self._set_obj(elm_web_add(parent.obj))
|
|
|
|
|
|
|
|
# XXX TODO: complete all callbacks from elm_web.h
|
|
|
|
def callback_uri_changed_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add_full("uri,changed", _cb_string_conv,
|
|
|
|
func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_uri_changed_del(self, func):
|
|
|
|
self._callback_del_full("uri,changed", _cb_string_conv, func)
|
|
|
|
|
|
|
|
def callback_title_changed_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add_full("title,changed", _cb_string_conv,
|
|
|
|
func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_title_changed_del(self, func):
|
|
|
|
self._callback_del_full("title,changed", _cb_string_conv, func)
|
|
|
|
|
|
|
|
def callback_link_hover_in_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add_full("link,hover,in", _web_link_hover_in_conv,
|
|
|
|
func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_link_hover_in_del(self, func):
|
|
|
|
self._callback_del_full("link,hover,in", _web_link_hover_in_conv, func)
|
|
|
|
|
|
|
|
def callback_link_hover_out_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add("link,hover,out", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_link_hover_out_del(self, func):
|
|
|
|
self._callback_del("link,hover,out", func)
|
|
|
|
|
|
|
|
def callback_load_error_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add_full("load,error", _web_load_frame_error_conv,
|
|
|
|
func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_load_error_del(self, func):
|
|
|
|
self._callback_del_full("load,error", _web_load_frame_error_conv, func)
|
|
|
|
|
|
|
|
def callback_load_finished_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add_full("load,finished", _web_load_frame_error_conv,
|
|
|
|
func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_load_finished_del(self, func):
|
|
|
|
self._callback_del_full("load,finished",
|
|
|
|
_web_load_frame_error_conv, func)
|
|
|
|
|
|
|
|
def callback_load_progress_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add_full("load,progress", _web_double_conv,
|
|
|
|
func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_load_progress_del(self, func):
|
|
|
|
self._callback_del_full("load,progress", _web_double_conv, func)
|
|
|
|
|
|
|
|
def callback_load_provisional_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add("load,provisional", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_load_provisional_del(self, func):
|
|
|
|
self._callback_del("load,provisional", func)
|
|
|
|
|
|
|
|
def callback_load_started_add(self, func, *args, **kwargs):
|
|
|
|
self._callback_add("load,started", func, *args, **kwargs)
|
|
|
|
|
|
|
|
def callback_load_started_del(self, func):
|
|
|
|
self._callback_del("load,started", func)
|
|
|
|
|
|
|
|
def history_enabled_get(self):
|
|
|
|
return bool(elm_web_history_enabled_get(self.obj))
|
|
|
|
|
|
|
|
def webkit_view_get(self):
|
|
|
|
cdef Evas_Object *obj = elm_web_webkit_view_get(self.obj)
|
|
|
|
return object_from_instance(obj)
|
|
|
|
|
|
|
|
def uri_set(self, uri):
|
|
|
|
return bool(elm_web_uri_set(self.obj, uri))
|
|
|
|
|
|
|
|
def uri_get(self):
|
2013-02-17 11:35:20 -08:00
|
|
|
return _ctouni(elm_web_uri_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
|
|
|
|
|
|
|
property uri:
|
|
|
|
def __get__(self):
|
|
|
|
return self.uri_get()
|
|
|
|
|
|
|
|
def __set__(self, value):
|
|
|
|
self.uri_set(value)
|
|
|
|
|
|
|
|
def useragent_get(self):
|
2013-02-17 11:35:20 -08:00
|
|
|
return _ctouni(elm_web_useragent_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 zoom_get(self):
|
|
|
|
return elm_web_zoom_get(self.obj)
|
|
|
|
|
|
|
|
def zoom_mode_get(self):
|
|
|
|
return elm_web_zoom_mode_get(self.obj)
|
|
|
|
|
|
|
|
def back(self):
|
|
|
|
return bool(elm_web_back(self.obj))
|
|
|
|
|
|
|
|
def console_message_hook_set(self, func):
|
|
|
|
self._console_message_hook = func
|
|
|
|
if func:
|
|
|
|
elm_web_console_message_hook_set(self.obj,
|
|
|
|
_web_console_message_hook,
|
|
|
|
<void *>self)
|
|
|
|
else:
|
|
|
|
elm_web_console_message_hook_set(self.obj, NULL, NULL)
|
|
|
|
|
|
|
|
|
|
|
|
_object_mapping_register("elm_web", Web)
|