Elementary: Add more missing signals/functions.

This commit is contained in:
Kai Huuhko 2013-09-24 01:02:01 +03:00
parent e3509d4dd8
commit f40afed56a
25 changed files with 699 additions and 29 deletions

View File

@ -355,6 +355,11 @@ cdef extern from "Elementary.h":
ELM_SCROLLER_SINGLE_DIRECTION_HARD
ELM_SCROLLER_SINGLE_DIRECTION_LAST
ctypedef enum Elm_Scroller_Movement_Block:
ELM_SCROLLER_MOVEMENT_NO_BLOCK # Do not block movements
ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL # Block vertical movements
ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL # Block horizontal movements
ctypedef enum Elm_Sel_Format:
ELM_SEL_FORMAT_TARGETS
ELM_SEL_FORMAT_NONE

View File

@ -56,6 +56,8 @@ This widget emits the following signals, besides the ones sent from
- ``"level,down"`` - when the user moves a finger from the second
level to the first level
- ``"language,changed"`` - the program's language changed
- ``focused`` - When the index has received focus. (since 1.8)
- ``unfocused`` - When the index has lost focus. (since 1.8)
The ``"delay,changed"`` event is so that it'll wait a small time
before actually reporting those events and, moreover, just the
@ -608,5 +610,24 @@ cdef class Index(LayoutClass):
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the index has received focus.
:since: 1.8
"""
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 index has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_index", Index)

View File

@ -47,7 +47,8 @@ they like.
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout.Layout`:
- *"language,changed"*: The program's language changed.
- ``language,changed`` - The program's language changed.
- ``slide,end`` - The slide is end.
Enumerations
@ -264,5 +265,11 @@ cdef class Label(LayoutClass):
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
def callback_slide_end_add(self, func, *args, **kwargs):
"""A slide effect has ended."""
self._callback_add("slide,end", func, *args, **kwargs)
def callback_slide_end_del(self, func):
self._callback_del("slide,end", func)
_object_mapping_register("elm_label", Label)

View File

@ -131,7 +131,8 @@ These are available predefined theme layouts. All of them have class =
This widget emits the following signals:
- "theme,changed": The theme was changed.
- ``theme,changed`` - The theme was changed.
- ``language,changed`` - the program's language changed
"""

View File

@ -796,3 +796,10 @@ cdef class LayoutClass(Object):
def callback_theme_changed_del(self, func):
self._callback_del("theme,changed", func)
def callback_language_changed_add(self,func,*args, **kwargs):
"""the program's language changed"""
self._callback_add("language,changed", func, *args, **kwargs)
def callback_language_changed_del(self, func):
self._callback_del("language,changed")

View File

@ -33,19 +33,29 @@ lists, :py:class:`genlist.Genlist` should probably be used.
Smart callbacks one can listen to:
- ``"activated"`` - The user has double-clicked or pressed
- ``activated`` - The user has double-clicked or pressed
(enter|return|spacebar) on an item. The ``event_info`` parameter
is the item that was activated.
- ``"clicked,double"`` - The user has double-clicked an item.
- ``clicked,double`` - The user has double-clicked an item.
The ``event_info`` parameter is the item that was double-clicked.
- "selected" - when the user selected an item
- "unselected" - when the user unselected an item
- "longpressed" - an item in the list is long-pressed
- "edge,top" - the list is scrolled until the top edge
- "edge,bottom" - the list is scrolled until the bottom edge
- "edge,left" - the list is scrolled until the left edge
- "edge,right" - the list is scrolled until the right edge
- "language,changed" - the program's language changed
- ``selected`` - when the user selected an item
- ``unselected`` - when the user unselected an item
- ``longpressed`` - an item in the list is long-pressed
- ``edge,top`` - the list is scrolled until the top edge
- ``edge,bottom`` - the list is scrolled until the bottom edge
- ``edge,left`` - the list is scrolled until the left edge
- ``edge,right`` - the list is scrolled until the right edge
- ``highlighted`` - an item in the list is highlighted. This is called when
the user presses an item or keyboard selection is done so the item is
physically highlighted. The %c event_info parameter is the item that was
highlighted.
- ``unhighlighted`` - an item in the list is unhighlighted. This is called
when the user releases an item or keyboard selection is moved so the item
is physically unhighlighted. The %c event_info parameter is the item that
was unhighlighted.
- ``language,changed`` - the program's language changed
- ``focused`` - When the list has received focus. (since 1.8)
- ``unfocused`` - When the list has lost focus. (since 1.8)
Available styles for it:
@ -921,5 +931,52 @@ cdef class List(Object):
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
def callback_highlighted_add(self, func, *args, **kwargs):
"""an item in the list is highlighted. This is called when
the user presses an item or keyboard selection is done so the item is
physically highlighted. The %c event_info parameter is the item that was
highlighted."""
self._callback_add("highlighted", func, *args, **kwargs)
def callback_highlighted_del(self, func):
self._callback_del("highlighted", func)
def callback_unhighlighted_add(self, func, *args, **kwargs):
"""an item in the list is unhighlighted. This is called
when the user releases an item or keyboard selection is moved so the item
is physically unhighlighted. The %c event_info parameter is the item that
was unhighlighted."""
self._callback_add("unhighlighted", func, *args, **kwargs)
def callback_unhighlighted_del(self, func):
self._callback_del("unhighlighted", func)
def callback_language_changed_add(self, func, *args, **kwargs):
"""the program's language 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 list has received focus.
:since: 1.8
"""
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 list has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_list", List)

View File

@ -67,6 +67,8 @@ Signals you can listen to
- "overlay,clicked" - A overlay is clicked.
- "loaded" - when a map is finally loaded.
- "language,changed" - the program's language changed
- ``focused`` - When the map has received focus. (since 1.8)
- ``unfocused`` - When the map has lost focus. (since 1.8)
Enumerations
@ -1809,5 +1811,24 @@ cdef public class Map(Object)[object PyElementaryMap, type PyElementaryMap_Type]
""" Delete a previuosly attached callback """
self._callback_del("language,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the map has received focus.
:since: 1.8
"""
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 map has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_map", Map)

View File

@ -31,7 +31,8 @@ event, in a toolbar, anywhere.
Signals that you can add callbacks for are:
- "clicked" - the user clicked the empty space in the menu to dismiss.
- ``clicked`` - the user clicked the empty space in the menu to dismiss.
- ``dismissed`` - the user clicked the empty space in the menu to dismiss (since 1.8)
Default content parts of the menu items that you can use for are:
@ -417,5 +418,15 @@ cdef class Menu(Object):
def callback_clicked_del(self, func):
self._callback_del("clicked", func)
def callback_dismissed_add(self, func, *args, **kwargs):
"""the user clicked the empty space in the menu to dismiss
:since: 1.8
"""
self._callback_add("dismissed", func, *args, **kwargs)
def callback_dismissed_del(self, func):
self._callback_del("dismissed", func)
_object_mapping_register("elm_menu", Menu)

View File

@ -33,6 +33,25 @@ Typical use case of multibuttonentry is, composing emails/messages to a
group of addresses, each of which is an item that can be clicked for
further actions.
This widget emits the following signals, besides the ones sent from
:py:class:`LayoutClass<efl.elementary.layout_class.LayoutClass>`:
- ``item,selected`` - this is called when an item is selected by
api, user interaction, and etc. this is also called when a
user press back space while cursor is on the first field of
entry.
- ``item,added`` - when a new multi-button entry item is added.
- ``item,deleted`` - when a multi-button entry item is deleted.
- ``item,clicked`` - this is called when an item is clicked by user
interaction. Both "item,selected" and "item,clicked" are needed.
- ``clicked`` - when multi-button entry is clicked.
- ``focused`` - when multi-button entry is focused.
- ``unfocused`` - when multi-button entry is unfocused.
- ``expanded`` - when multi-button entry is expanded.
- ``contracted`` - when multi-button entry is contracted.
- ``expand,state,changed`` - when shrink mode state of
multi-button entry is changed.
Default text parts of the multibuttonentry widget that you can use for are:
- "default" - A label of the multibuttonentry

View File

@ -74,9 +74,11 @@ them are supported:
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout_class.LayoutClass`:
- ``"transition,finished"`` - When the transition is finished in
- ``transition,finished`` - When the transition is finished in
changing the item
- ``"title,clicked"`` - User clicked title area
- ``title,clicked`` - User clicked title area
- ``focused`` - When the naviframe has received focus. (since 1.8)
- ``unfocused`` - When the naviframe has lost focus. (since 1.8)
All the parts, for content and text, described here will also be
reachable by naviframe **items** direct calls:
@ -515,5 +517,24 @@ cdef class Naviframe(LayoutClass):
def callback_title_clicked_del(self, func):
self._callback_del("title,clicked", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the naviframe has received focus.
:since: 1.8
"""
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 naviframe has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_naviframe", Naviframe)

View File

@ -32,6 +32,12 @@ Orientations are as follows:
- ELM_PANEL_ORIENT_TOP
- ELM_PANEL_ORIENT_LEFT
- ELM_PANEL_ORIENT_RIGHT
- ELM_PANEL_ORIENT_BOTTOM
This widget emits the following signals, besides the ones sent from
:py:class:`LayoutClass<efl.elementary.layout_class.LayoutClass>`:
- ``focused`` - When the panel has received focus. (since 1.8)
- ``unfocused`` - When the panel has lost focus. (since 1.8)
Default content parts of the panel widget that you can use for are:
@ -124,5 +130,24 @@ cdef class Panel(Object):
Toggle the hidden state of the panel from code."""
elm_panel_toggle(self.obj)
def callback_focused_add(self, func, *args, **kwargs):
"""When the panel has received focus.
:since: 1.8
"""
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 panel has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_panel", Panel)

View File

@ -54,6 +54,8 @@ Signals that you can add callbacks for are:
- "download,progress" - url download in progress
- "download,end" - remote url download has finished
- "download,error" - remote url download has finished with errors
- ``focused`` - When the photocam has received focus. (since 1.8)
- ``unfocused`` - When the photocam has lost focus. (since 1.8)
Enumerations
@ -526,5 +528,24 @@ cdef class Photocam(Object):
def callback_download_error_del(self, func):
self._callback_add_full("download,error", _photocam_download_error_conv, func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the photocam has received focus.
:since: 1.8
"""
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 photocam has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_photocam", Photocam)

View File

@ -16,6 +16,30 @@
# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
#
"""
An object that allows one to show an image which other process created.
It can be used anywhere like any other elementary widget.
This widget emits the following signals:
- ``clicked`` - the user clicked the image (press/release).
- ``image,deleted`` - the server side was deleted.
- ``image,resized`` - the server side was resized. The ``event_info`` parameter of
the callback will be ``Evas_Coord_Size`` (two integers).
.. note::
the event "image,resized" will be sent whenever the server
resized its image and this **always** happen on the first
time. Then it can be used to track when the server-side image
is fully known (client connected to server, retrieved its
image buffer through shared memory and resized the evas
object).
"""
include "widget_header.pxi"
from object cimport Object
@ -75,4 +99,28 @@ cdef class Plug(Object):
return img
def callback_clicked_add(self, func, *args, **kwargs):
"""the user clicked the image (press/release)."""
self._callback_add("clicked", func, *args, **kwargs)
def callback_clicked_del(self, func):
self._callback_del("clicked", func)
def callback_image_deleted_add(self, func, *args, **kwargs):
"""the server side was deleted."""
self._callback_add("image,deleted", func, *args, **kwargs)
def callback_image_deleted_del(self, func):
self._callback_del("image,deleted", func)
# TODO: Conv function
# def callback_image_resized_add(self, func, *args, **kwargs):
# """the server side was resized. The ``event_info`` parameter of
# the callback will be ``Evas_Coord_Size`` (two integers)."""
# self._callback_add("image,resized", func, *args, **kwargs)
# def callback_image_resized_del(self, func):
# self._callback_del("image,resized", func)
_object_mapping_register("elm_plug", Plug)

View File

@ -23,7 +23,7 @@
Widget description
------------------
This widget is an enhancement of :py:class:`Notify`.
This widget is an enhancement of :py:class:`Notify<efl.elementary.notify.Notify>`.
In addition to Content area, there are two optional sections namely Title
area and Action area.
@ -79,8 +79,11 @@ based on the number of buttons currently set to popup.
Signals that you can add callbacks for are:
- "timeout" - when ever popup is closed as a result of timeout.
- "block,clicked" - when ever user taps on Blocked Event area.
- ``timeout`` - when ever popup is closed as a result of timeout.
- ``block,clicked`` - when ever user taps on Blocked Event area.
- ``focused`` - When the popup has received focus. (since 1.8)
- ``unfocused`` - When the popup has lost focus. (since 1.8)
- ``language,changed`` - the program's language changed (since 1.8)
Styles available for Popup
@ -369,5 +372,35 @@ cdef class Popup(Object):
def callback_block_clicked_del(self, func):
self._callback_del("block,clicked", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the popup has received focus.
:since: 1.8
"""
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 popup has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
def callback_language_changed_add(self, func, *args, **kwargs):
"""the program's language changed
since: 1.8
"""
self._callback_add("language,changed", func, *args, **kwargs)
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
_object_mapping_register("elm_popup", Popup)

View File

@ -48,7 +48,9 @@ query the progress bar for its value with :py:attr:`value`.
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout.Layout`:
- ``"changed"`` - when the value is changed
- ``changed`` - when the value is changed
- ``focused`` - When the progressbar has received focus. (since 1.8)
- ``unfocused`` - When the progressbar has lost focus. (since 1.8)
This widget has the following styles:
@ -290,5 +292,24 @@ cdef class Progressbar(LayoutClass):
def callback_changed_del(self, func):
self._callback_del("changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the progressbar has received focus.
:since: 1.8
"""
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 progressbar has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_progressbar", Progressbar)

View File

@ -51,8 +51,10 @@ memory for as long as the radio objects exist.
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout_class.LayoutClass`:
- changed - This is called whenever the user changes the state of one of
- ``changed`` - This is called whenever the user changes the state of one of
the radio objects within the group of radio objects that work together.
- ``focused`` - When the radio has received focus. (since 1.8)
- ``unfocused`` - When the radio has lost focus. (since 1.8)
Default text parts of the radio widget that you can use for are:
@ -174,5 +176,24 @@ cdef class Radio(LayoutClass):
def callback_changed_del(self, func):
self._callback_del("changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the radio has received focus.
:since: 1.8
"""
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 radio has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_radio", Radio)

View File

@ -1,5 +1,6 @@
from efl.evas cimport Eina_Bool, Evas_Object, Evas_Coord, const_Evas_Object
from enums cimport Elm_Scroller_Policy, Elm_Scroller_Single_Direction
from enums cimport Elm_Scroller_Policy, Elm_Scroller_Single_Direction, \
Elm_Scroller_Movement_Block
from libc.string cimport const_char
from object cimport Object
@ -10,10 +11,12 @@ cdef extern from "Elementary.h":
void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
void elm_scroller_policy_get(Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
void elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir)
void elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir)
Elm_Scroller_Single_Direction elm_scroller_single_direction_get(const_Evas_Object *obj)
void elm_scroller_region_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
void elm_scroller_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
void elm_scroller_page_snap_set(Evas_Object *obj, Eina_Bool page_h_snap, Eina_Bool page_v_snap)
void elm_scroller_page_snap_get(const_Evas_Object *obj, Eina_Bool *page_h_snap, Eina_Bool *page_v_snap)
void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
void elm_scroller_bounce_get(Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel)
@ -31,6 +34,8 @@ cdef extern from "Elementary.h":
Eina_Bool elm_scroller_propagate_events_get(Evas_Object *obj)
void elm_scroller_gravity_set(Evas_Object *obj, double x, double y)
void elm_scroller_gravity_get(Evas_Object *obj, double *x, double *y)
void elm_scroller_movement_block_set(Evas_Object *obj, Elm_Scroller_Movement_Block block)
Elm_Scroller_Movement_Block elm_scroller_movement_block_get(const_Evas_Object *obj)
cdef class ScrollableInterface(Object):
cpdef single_direction_set(self, Elm_Scroller_Single_Direction single_dir)

View File

@ -56,6 +56,9 @@ This widget emits the following signals, besides the ones sent from
- "hbar,drag" - the horizontal scroll bar has been dragged
- "hbar,press" - the horizontal scroll bar has been pressed
- "hbar,unpress" - the horizontal scroll bar has been unpressed
- ``scroll,page,changed`` - the visible page has changed
- ``focused`` - When the scroller has received focus. (since 1.8)
- ``unfocused`` - When the scroller has lost focus. (since 1.8)
Default content parts of the scroller widget that you can use for are:
@ -112,6 +115,29 @@ Type that controls how the content is scrolled.
Scroll only single direction
.. _Elm_Scroller_Movement_Block:
Movement block
==============
Type that blocks the scroll movement in one or more direction.
:since: 1.8
.. data:: ELM_SCROLLER_MOVEMENT_NO_BLOCK
Do not block movements
.. data:: ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL
Block vertical movements
.. data:: ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL
Block horizontal movements
"""
include "widget_header.pxi"
@ -130,6 +156,10 @@ ELM_SCROLLER_SINGLE_DIRECTION_NONE = enums.ELM_SCROLLER_SINGLE_DIRECTION_NONE
ELM_SCROLLER_SINGLE_DIRECTION_SOFT = enums.ELM_SCROLLER_SINGLE_DIRECTION_SOFT
ELM_SCROLLER_SINGLE_DIRECTION_HARD = enums.ELM_SCROLLER_SINGLE_DIRECTION_HARD
ELM_SCROLLER_MOVEMENT_NO_BLOCK = enums.ELM_SCROLLER_MOVEMENT_NO_BLOCK
ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = enums.ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL
ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = enums.ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL
cdef class ScrollableInterface(Object):
"""
@ -289,6 +319,38 @@ cdef class ScrollableInterface(Object):
elm_scroller_child_size_get(self.obj, &w, &h)
return (w, h)
property page_snap:
"""
Page snapping behavior of a scroller
When scrolling, if a scroller is paged (see
elm_scroller_page_size_set() and elm_scroller_page_relative_set()),
the scroller may snap to pages when being scrolled, i.e., even if
it had momentum to scroll further, it will stop at the next page
boundaries. This is **disabled**, by default, for both axis. This
function will set if it that is enabled or not, for each axis.
.. note::
If the object is not set to have pages, nothing will happen after
this call.
:type: (bool **page_h_snap**, bool **page_v_snap**)
:since: 1.8
"""
def __set__(self, value):
page_h_snap, page_v_snap = value
elm_scroller_page_snap_set(self.obj, page_h_snap, page_v_snap)
def __get__(self):
cdef Eina_Bool page_h_snap, page_v_snap
elm_scroller_page_snap_get(self.obj, &page_h_snap, &page_v_snap)
return page_h_snap, page_v_snap
property bounce:
"""The bouncing behavior
@ -585,6 +647,35 @@ cdef class ScrollableInterface(Object):
elm_scroller_gravity_get(self.obj, &x, &y)
return (x, y)
property movement_block:
"""
Blocking of scrolling (per axis) on a given scroller
This function will block scrolling movement (by input of a user) in
a given direction. One can disable movements in the X axis, the Y
axis or both. The default value is @c ELM_SCROLLER_MOVEMENT_NO_BLOCK,
where movements are allowed in both directions.
What makes this function different from
elm_object_scroll_freeze_push(), elm_object_scroll_hold_push() and
elm_object_scroll_lock_x_set() (or elm_object_scroll_lock_y_set())
is that it **doesn't** propagate its effects to any parent or child
widget of the object. Only the target scrollable widget will be locked
with regard to scrolling.
:type: :ref:`Elm_Scroller_Movement_Block`
:since: 1.8
"""
def __set__(self, Elm_Scroller_Movement_Block block):
elm_scroller_movement_block_set(self.obj, block)
def __get__(self):
return elm_scroller_movement_block_get(self.obj)
def callback_edge_left_add(self, func, *args, **kwargs):
"""The left edge of the content has been reached."""
self._callback_add("edge,left", func, *args, **kwargs)
@ -719,6 +810,33 @@ cdef class ScrollableInterface(Object):
def callback_hbar_unpress_del(self, func):
self._callback_del("hbar,unpress", func)
def callback_scroll_page_changed_add(self, func, *args, **kwargs):
"""the visible page has changed"""
self._callback_add("scroll,page,changed", func, *args, **kwargs)
def callback_scroll_page_changed_del(self, func):
self._callback_del("scroll,page,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the scroller has received focus.
:since: 1.8
"""
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 scroller has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
cdef class ScrollerWidget(LayoutClass):
def __init__(self, evasObject parent):

View File

@ -46,15 +46,17 @@ slider for its value with :py:attr:`Slider.value`.
This widget emits the following signals, besides the ones sent from
:py:class:`LayoutClass <efl.elementary.layout_class.LayoutClass>`:
- ``"changed"`` - Whenever the slider value is changed by the user.
- ``"slider,drag,start"`` - dragging the slider indicator around has
- ``changed`` - Whenever the slider value is changed by the user.
- ``slider,drag,start`` - dragging the slider indicator around has
started.
- ``"slider,drag,stop"`` - dragging the slider indicator around has
- ``slider,drag,stop`` - dragging the slider indicator around has
stopped.
- ``"delay,changed"`` - A short time after the value is changed by
- ``delay,changed`` - A short time after the value is changed by
the user. This will be called only when the user stops dragging
for a very short period or when they release their finger/mouse,
so it avoids possibly expensive reactions to the value change.
- ``focused`` - When the slider has received focus. (since 1.8)
- ``unfocused`` - When the slider has lost focus. (since 1.8)
Available styles for it:
@ -375,5 +377,24 @@ cdef class Slider(LayoutClass):
def callback_delay_changed_del(self, func):
self._callback_del("delay,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the slider has received focus.
:since: 1.8
"""
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 slider has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_slider", Slider)

View File

@ -73,6 +73,8 @@ This widget emits the following signals, besides the ones sent from
event_info parameter in callback contains the current visible item
- ``"transition,end"`` - when a slide transition ends. event_info
parameter in callback contains the current visible item
- ``focused`` - When the slideshow has received focus. (since 1.8)
- ``unfocused`` - When the slideshow has lost focus. (since 1.8)
"""
@ -713,5 +715,24 @@ cdef class Slideshow(LayoutClass):
def callback_transition_end_del(self, func):
self._callback_del_full("transition,end", _cb_object_item_conv, func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the slideshow has received focus.
:since: 1.8
"""
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 slideshow has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_slideshow", Slideshow)

View File

@ -44,6 +44,9 @@ This widget emits the following signals, besides the ones sent from
the user. This will be called only when the user stops dragging
for a very short period or when they release their finger/mouse,
so it avoids possibly expensive reactions to the value change.
- ``language,changed`` - the program's language changed
- ``focused`` - When the spinner has received focus. (since 1.8)
- ``unfocused`` - When the spinner has lost focus. (since 1.8)
Available styles for it:
@ -366,5 +369,31 @@ cdef class Spinner(LayoutClass):
def callback_delay_changed_del(self, func):
self._callback_del("delay,changed", func)
def callback_language_changed_add(self, func, *args, **kwargs):
"""the program's language 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 spinner has received focus.
:since: 1.8
"""
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 spinner has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_spinner", Spinner)

View File

@ -36,6 +36,8 @@ Smart callbacks one can listen to:
- "clicked" - when the user clicks on a toolbar item and becomes selected.
- "longpressed" - when the toolbar is pressed for a certain amount of time.
- "language,changed" - when the program language changes.
- ``focused`` - When the toolbar has received focus. (since 1.8)
- ``unfocused`` - When the toolbar has lost focus. (since 1.8)
Available styles for it:
@ -1073,5 +1075,24 @@ cdef class Toolbar(Object):
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the toolbar has received focus.
:since: 1.8
"""
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 toolbar has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_toolbar", Toolbar)

View File

@ -27,6 +27,12 @@ It embeds the video inside an Edje object, so you can do some
animation depending on the video state change. It also implements a
resource management policy to remove this burden from the application.
These widgets emit the following signals, besides the ones sent from
:py:class:`efl.elementary.layout_class.LayoutClass`:
- ``focused`` - When the widget has received focus. (since 1.8)
- ``unfocused`` - When the widget has lost focus. (since 1.8)
"""
include "widget_header.pxi"
@ -221,9 +227,29 @@ cdef class Video(LayoutClass):
def title_get(self):
return _ctouni(elm_video_title_get(self.obj))
def callback_focused_add(self, func, *args, **kwargs):
"""When the video has received focus.
:since: 1.8
"""
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 video has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_video", Video)
cdef class Player(LayoutClass):
"""
@ -312,5 +338,24 @@ cdef class Player(LayoutClass):
def callback_stop_clicked_del(self, func):
self._callback_del_full("stop,clicked", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the player has received focus.
:since: 1.8
"""
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 player has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_player", Player)

View File

@ -7,6 +7,10 @@ cdef extern from "Ecore_X.h":
ctypedef unsigned int Ecore_X_ID
ctypedef Ecore_X_ID Ecore_X_Window
# TODO:
# cdef extern from "Ecore_Evas_Types.h":
# ctypedef struct Ecore_Wl_Window
cdef extern from "Elementary.h":
Evas_Object *elm_win_add(Evas_Object *parent, const_char *name, Elm_Win_Type type)
Evas_Object *elm_win_util_standard_add(const_char *name, const_char *title)
@ -91,12 +95,14 @@ cdef extern from "Elementary.h":
void elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain)
Eina_Bool elm_win_screen_constrain_get(Evas_Object *obj)
void elm_win_screen_size_get(Evas_Object *obj, int *x, int *y, int *w, int *h)
void elm_win_screen_dpi_get(const_Evas_Object *obj, int *xdpi, int *ydpi)
void elm_win_screen_dpi_get(const_Evas_Object *obj, int *xdpi, int *ydpi)
void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_win_focus_highlight_enabled_get(Evas_Object *obj)
void elm_win_focus_highlight_style_set(Evas_Object *obj, const_char *style)
const_char * elm_win_focus_highlight_style_get(Evas_Object *obj)
void elm_win_focus_highlight_animate_set(Evas_Object *obj, Eina_Bool enabled)
Eina_Bool elm_win_focus_highlight_animate_get(const_Evas_Object *obj)
void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(Evas_Object *obj)
@ -113,6 +119,9 @@ cdef extern from "Elementary.h":
# X specific call - wont't work on non-x engines (return 0)
Ecore_X_Window elm_win_xwindow_get(Evas_Object *obj)
# TODO: Ecore_Wl_Window *elm_win_wl_window_get(const_Evas_Object *obj)
void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
Eina_Bool elm_win_floating_mode_get(const_Evas_Object *obj)
void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
Eina_Bool elm_win_floating_mode_get(const_Evas_Object *obj)
# TODO: Ecore_Window elm_win_window_id_get(const_Evas_Object *obj)

View File

@ -103,6 +103,8 @@ Signals that you can add callbacks for are:
- "indicator,prop,changed": an indicator's property has been changed
- "rotation,changed": window rotation has been changed
- "profile,changed": profile of the window has been changed
- ``focused`` - When the window has received focus. (since 1.8)
- ``unfocused`` - When the window has lost focus. (since 1.8)
Enumerations
@ -1382,6 +1384,22 @@ cdef class Window(Object):
cpdef focus_highlight_style_get(self):
return _ctouni(elm_win_focus_highlight_style_get(self.obj))
property focus_highlight_animate:
"""
The animate status for the focus highlight for this window.
This will enable or disable the animation of focus highlight only
for the given window, regardless of the global setting for it
:type: bool
"""
def __set__(self, bint enabled):
elm_win_focus_highlight_animate_set(self.obj, enabled)
def __get__(self):
return bool(elm_win_focus_highlight_animate_get(self.obj))
property keyboard_mode:
"""The keyboard mode of the window.
@ -1513,10 +1531,20 @@ cdef class Window(Object):
xwin = elm_win_xwindow_get(self.obj)
return xwin
# TODO:
# property wl_window:
# """Get the Ecore_Wl_Window of an Evas_Object
# :type: Ecore_Wl_Window
# """
# Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj)
property floating:
"""Floating mode of a window.
:type: bool
:since: 1.8
"""
def __set__(self, floating):
@ -1530,6 +1558,21 @@ cdef class Window(Object):
def floating_get(self):
return bool(elm_win_floating_mode_get(self.obj))
# TODO:
# property window_id:
# """
# Get the Ecore_Window of an Evas_Object
# When Elementary is using a Wayland engine, this function will return the surface id of the elm window's surface.
# :type: Ecore_Window
# :since: 1.8
# """
# def __get__(self):
# return Ecore_Window elm_win_window_id_get(self.obj)
def callback_delete_request_add(self, func, *args, **kwargs):
"""The user requested to close the window. See :py:attr:`autodel`."""
self._callback_add("delete,request", func, *args, **kwargs)
@ -1649,6 +1692,25 @@ cdef class Window(Object):
def callback_profile_changed_del(self, func):
self._callback_del("profile,changed")
def callback_focused_add(self, func, *args, **kwargs):
"""When the window has received focus.
:since: 1.8
"""
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 window has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
_object_mapping_register("elm_win", Window)