Elementary: Add missing functions/signals

This commit is contained in:
Kai Huuhko 2013-09-22 21:16:31 +03:00
parent 48a59784fa
commit e3509d4dd8
20 changed files with 746 additions and 48 deletions

View File

@ -49,6 +49,8 @@ This widget emits the following signals, besides the ones sent from
:py:class:`efl.elementary.layout_class.LayoutClass`:
- ``clicked`` - This is called when a user has clicked the bubble.
- ``focused`` - When the bubble has received focus. (since 1.8)
- ``unfocused`` - When the bubble has lost focus. (since 1.8)
Default content parts of the bubble that you can use for are:
@ -133,5 +135,24 @@ cdef class Bubble(LayoutClass):
def callback_clicked_del(self, func):
self._callback_del("clicked", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the bubble 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 bubble 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_bubble", Bubble)

View File

@ -29,10 +29,12 @@ a simple label and icon object and it also has an autorepeat feature.
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout.Layout`:
- "clicked": the user clicked the button (press/release).
- "repeated": the user pressed the button without releasing it.
- "pressed": button was pressed.
- "unpressed": button was released after being pressed.
- ``clicked``: the user clicked the button (press/release).
- ``repeated``: the user pressed the button without releasing it.
- ``pressed``: button was pressed.
- ``unpressed``: button was released after being pressed.
- ``focused`` : When the button has received focus. (since 1.8)
- ``unfocused`` : When the button has lost focus. (since 1.8)
Also, defined in the default theme, the button has the following styles
available:
@ -170,5 +172,24 @@ cdef class Button(LayoutClass):
def callback_unpressed_del(self, func):
self._callback_del("unpressed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the button 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 button 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_button", Button)

View File

@ -42,6 +42,8 @@ This widget emits the following signals, besides the ones sent from
- ``changed`` - emitted when the date in the calendar is changed.
- ``display,changed`` - emitted when the current month displayed in the
calendar is changed.
- ``focused`` - When the calendar has received focus. (since 1.8)
- ``unfocused`` - When the calendar has lost focus. (since 1.8)
Enumerations
@ -557,4 +559,24 @@ cdef class Calendar(LayoutClass):
def callback_changed_del(self, func):
self._callback_del("display,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the calendar 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 calendar 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_calendar", Calendar)

View File

@ -36,6 +36,8 @@ This widget emits the following signals, besides the ones sent from
- ``changed`` - This is called whenever the user changes the state of
the check objects.
- ``focused`` - When the check has received focus. (since 1.8)
- ``unfocused`` - When the check has lost focus. (since 1.8)
Default content parts of the check widget that you can use for are:
@ -88,5 +90,24 @@ cdef class Check(LayoutClass):
def callback_changed_del(self, func):
self._callback_del("changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the check 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 check 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_check", Check)

View File

@ -53,6 +53,8 @@ This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout.Layout`:
- ``changed`` - the clock's user changed the time
- ``focused`` - When the clock has received focus. (since 1.8)
- ``unfocused`` - When the clock has lost focus. (since 1.8)
Enumerations
@ -283,5 +285,24 @@ cdef class Clock(LayoutClass):
def callback_changed_del(self, func):
self._callback_del("changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the clock 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 clock 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_clock", Clock)

View File

@ -41,6 +41,8 @@ This widget emits the following signals, besides the ones sent from
- ``"color,item,longpressed"`` - When user long presses on color item.
The event_info parameter of the callback will be the selected
color item.
- ``focused`` - When the colorselector has received focus. (since 1.8)
- ``unfocused`` - When the colorselector has lost focus. (since 1.8)
Enumerations
@ -234,5 +236,24 @@ cdef class Colorselector(LayoutClass):
self._callback_del_full("color,item,longpressed",
_cb_object_item_conv, func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the check 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 check 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_colorselector", Colorselector)

View File

@ -33,6 +33,7 @@ cdef extern from "Elementary.h":
void elm_config_scroll_bring_in_scroll_friction_set(double friction)
double elm_config_scroll_zoom_friction_get()
void elm_config_scroll_zoom_friction_set(double friction)
Eina_Bool elm_config_scroll_thumbscroll_enabled_get()
void elm_config_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
unsigned int elm_config_scroll_thumbscroll_threshold_get()
@ -41,8 +42,14 @@ cdef extern from "Elementary.h":
void elm_config_scroll_thumbscroll_hold_threshold_set(unsigned int threshold)
double elm_config_scroll_thumbscroll_momentum_threshold_get()
void elm_config_scroll_thumbscroll_momentum_threshold_set(double threshold)
unsigned int elm_config_scroll_thumbscroll_flick_distance_tolerance_get()
void elm_config_scroll_thumbscroll_flick_distance_tolerance_set(unsigned int distance)
double elm_config_scroll_thumbscroll_friction_get()
void elm_config_scroll_thumbscroll_friction_set(double friction)
double elm_config_scroll_thumbscroll_min_friction_get()
void elm_config_scroll_thumbscroll_min_friction_set(double friction)
double elm_config_scroll_thumbscroll_friction_standard_get()
void elm_config_scroll_thumbscroll_friction_standard_set(double standard)
double elm_config_scroll_thumbscroll_border_friction_get()
void elm_config_scroll_thumbscroll_border_friction_set(double friction)
double elm_config_scroll_thumbscroll_sensitivity_friction_get()
@ -108,4 +115,12 @@ cdef extern from "Elementary.h":
Eina_Bool elm_config_mirrored_get()
void elm_config_mirrored_set(Eina_Bool mirrored)
Eina_Bool elm_config_clouseau_enabled_get()
void elm_config_clouseau_enabled_set(Eina_Bool enabled)
const_char * elm_config_indicator_service_get(int rotation)
double elm_config_glayer_long_tap_start_timeout_get()
void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout)
double elm_config_glayer_double_tap_timeout_get()
void elm_config_glayer_double_tap_timeout_set(double double_tap_timeout)

View File

@ -317,6 +317,23 @@ cdef class Configuration(object):
def __set__(self, double threshold):
elm_config_scroll_thumbscroll_momentum_threshold_set(threshold)
property scroll_thumbscroll_flick_distance_tolerance:
"""
The number of pixels the maximum distance which can be flicked.
If it is flicked more than this,
the flick distance is same with maximum distance.
:type: int
:see: elm_config_thumbscroll_flick_distance_tolerance_get()
"""
def __get__(self):
return elm_config_scroll_thumbscroll_flick_distance_tolerance_get()
def __set__(self, unsigned int distance):
elm_config_scroll_thumbscroll_flick_distance_tolerance_set(distance)
property scroll_thumbscroll_friction:
"""The amount of inertia a scroller will impose at self scrolling
animations.
@ -329,6 +346,39 @@ cdef class Configuration(object):
def __set__(self, double friction):
elm_config_scroll_thumbscroll_friction_set(friction)
property scroll_thumbscroll_min_friction:
"""
The min amount of inertia a scroller will impose at self scrolling
animations.
:type: float
:see: elm_config_thumbscroll_min_friction_get()
"""
def __get__(self):
return elm_config_scroll_thumbscroll_min_friction_get()
def __set__(self, double friction):
elm_config_scroll_thumbscroll_min_friction_set(friction)
property scroll_thumbscroll_friction_standard:
"""
The standard velocity of the scroller. The scroll animation time is
same with thumbscroll friction, if the velocity is same with standard
velocity.
:type: float
:see: elm_config_thumbscroll_friction_standard_get()
"""
def __get__(self):
return elm_config_scroll_thumbscroll_friction_standard_get()
def __set__(self, double standard):
elm_config_scroll_thumbscroll_friction_standard_set(standard)
property scroll_thumbscroll_border_friction:
"""The amount of lag between your actual mouse cursor dragging
movement and a scroller's view movement itself, while pushing it
@ -369,7 +419,6 @@ cdef class Configuration(object):
"""
def __get__(self):
return elm_config_scroll_thumbscroll_acceleration_threshold_get()
def __set__(self, double threshold):
elm_config_scroll_thumbscroll_acceleration_threshold_set(threshold)
@ -381,7 +430,6 @@ cdef class Configuration(object):
"""
def __get__(self):
return elm_config_scroll_thumbscroll_acceleration_time_limit_get()
def __set__(self, double time_limit):
elm_config_scroll_thumbscroll_acceleration_time_limit_set(time_limit)
@ -393,7 +441,6 @@ cdef class Configuration(object):
"""
def __get__(self):
return elm_config_scroll_thumbscroll_acceleration_weight_get()
def __set__(self, double weight):
elm_config_scroll_thumbscroll_acceleration_weight_set(weight)
@ -421,7 +468,6 @@ cdef class Configuration(object):
"""
def __set__(self, Elm_Softcursor_Mode mode):
elm_config_softcursor_mode_set(mode)
def __get__(self):
return elm_config_softcursor_mode_get()
@ -805,6 +851,20 @@ cdef class Configuration(object):
def __set__(self, bint mirrored):
elm_config_mirrored_set(mirrored)
property clouseau_enabled:
"""
Clouseau state. True if clouseau was tried to be run.
:since: 1.8
:return: True if clouseau was tried to run, False otherwise
"""
def __get__(self):
return bool(elm_config_clouseau_enabled_get())
def __set__(self, bint enabled):
elm_config_clouseau_enabled_set(enabled)
def indicator_service_get(self, int rotation):
"""indicator_service_get(int rotation) -> unicode
@ -817,6 +877,31 @@ cdef class Configuration(object):
"""
return _ctouni(elm_config_indicator_service_get(rotation))
property glayer_long_tap_start_timeout:
"""
The duration for occurring long tap event of gesture layer.
:type: float
"""
def __get__(self):
return elm_config_glayer_long_tap_start_timeout_get()
def __set__(self, double long_tap_timeout):
elm_config_glayer_long_tap_start_timeout_set(long_tap_timeout)
property glayer_double_tap_timeout:
"""
Get the duration for occurring double tap event of gesture layer.
:return: Timeout for double tap event of gesture layer.
"""
def __get__(self):
return elm_config_glayer_double_tap_timeout_get()
def __set__(self, double double_tap_timeout):
elm_config_glayer_double_tap_timeout_set(double_tap_timeout)
#For compatibility
def config_finger_size_get():

View File

@ -33,7 +33,14 @@ a label and/or an icon. It is intended for a small number of items
Signals that you can add callbacks for are:
- "dismissed" - the ctxpopup was dismissed
- ``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)
Default content parts of the ctxpopup widget that you can use for are:
@ -275,5 +282,31 @@ cdef class Ctxpopup(LayoutClass):
def callback_dismissed_del(self, func):
self._callback_del("dismissed", func)
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.
: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 ctxpopup 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_ctxpopup", Ctxpopup)

View File

@ -207,10 +207,12 @@ To enable a module, set the ELM_MODULES environment variable as shown:
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout.Layout`:
- **"changed"** - whenever Datetime field value is changed, this
- ``changed`` - whenever Datetime field value is changed, this
signal is sent.
- **"language,changed"** - whenever system locale changes, this
- ``language,changed`` - whenever system locale changes, this
signal is sent.
- ``focused`` - When the datetime has received focus. (since 1.8)
- ``unfocused`` - When the datetime has lost focus. (since 1.8)
Enumerations
@ -582,5 +584,24 @@ cdef class Datetime(Object):
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the datetime 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 datetime 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_datetime", Datetime)

View File

@ -1,13 +1,16 @@
from efl.evas cimport Eina_Bool, Evas_Object
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object, Eina_List
from enums cimport Elm_Dayselector_Day
from libc.string cimport const_char
cdef extern from "Elementary.h":
Evas_Object *elm_dayselector_add(Evas_Object *parent)
void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected)
Eina_Bool elm_dayselector_day_selected_get(Evas_Object *obj, Elm_Dayselector_Day day)
Eina_Bool elm_dayselector_day_selected_get(const_Evas_Object *obj, Elm_Dayselector_Day day)
void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day)
Elm_Dayselector_Day elm_dayselector_week_start_get(Evas_Object *obj)
Elm_Dayselector_Day elm_dayselector_week_start_get(const_Evas_Object *obj)
void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day)
Elm_Dayselector_Day elm_dayselector_weekend_start_get(Evas_Object *obj)
Elm_Dayselector_Day elm_dayselector_weekend_start_get(const_Evas_Object *obj)
void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length)
unsigned int elm_dayselector_weekend_length_get(Evas_Object *obj)
unsigned int elm_dayselector_weekend_length_get(const_Evas_Object *obj)
void elm_dayselector_weekdays_names_set(Evas_Object *obj, const_char *weekdays[])
Eina_List *elm_dayselector_weekdays_names_get(const_Evas_Object *obj)

View File

@ -109,6 +109,8 @@ Dayselector days
include "widget_header.pxi"
from efl.eo cimport convert_python_list_strings_to_array_of_strings, \
convert_eina_list_strings_to_python_list
from layout_class cimport LayoutClass
cimport enums
@ -188,6 +190,41 @@ cdef class Dayselector(LayoutClass):
def __set__(self, length):
elm_dayselector_weekend_length_set(self.obj, length)
property weekdays_names:
"""
Set weekdays names to be displayed by the Dayselector.
:param weekdays: List of seven strings to be used as weekday names.
.. warning:: It must have 7 elements, or it will access invalid memory.
By default or if set to None, weekdays abbreviations get from system are displayed:
E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"
The first string should be related to Sunday, the second to Monday...
The usage should be like this::
dayselector.weekdays_names = ["Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"]
:see: elm_dayselector_weekdays_name_get()
:see: elm_dayselector_weekend_start_set()
:since: 1.8
"""
def __set__(self, list weekdays):
# TODO: Add checks for list validity (len == 7 etc.)
elm_dayselector_weekdays_names_set(self.obj,
convert_python_list_strings_to_array_of_strings(weekdays))
def __get__(self):
return convert_eina_list_strings_to_python_list(
elm_dayselector_weekdays_names_get(self.obj)
)
def callback_dayselector_changed_add(self, func, *args, **kwargs):
"""when the user changes the state of a day."""
self._callback_add("dayselector,changed", func, *args, **kwargs)

View File

@ -31,12 +31,14 @@ reduced for a defined length for side items.
Smart callbacks one can listen to:
- "selected" - when item is selected, i.e. scroller stops.
- "clicked" - This is called when a user clicks an item
- "scroll,anim,start" - scrolling animation has started
- "scroll,anim,stop" - scrolling animation has stopped
- "scroll,drag,start" - dragging the diskselector has started
- "scroll,drag,stop" - dragging the diskselector has stopped
- ``selected`` - when item is selected, i.e. scroller stops.
- ``clicked`` - This is called when a user clicks an item
- ``scroll,anim,start`` - scrolling animation has started
- ``scroll,anim,stop`` - scrolling animation has stopped
- ``scroll,drag,start`` - dragging the diskselector has started
- ``scroll,drag,stop`` - dragging the diskselector has stopped
- ``focused`` - When the diskselector has received focus. (since 1.8)
- ``unfocused`` - When the diskselector has lost focus. (since 1.8)
Available styles for it:
@ -459,5 +461,24 @@ cdef class Diskselector(Object):
def callback_scroll_drag_stop_del(self, func):
self._callback_del("scroll,drag,stop", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the diskselector 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 diskselector 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_diskselector", Diskselector)

View File

@ -235,6 +235,7 @@ This widget emits the following signals:
parameter for the callback will be an :py:class:`EntryAnchorInfo`.
- "preedit,changed": The preedit string has changed.
- "language,changed": Program language changed.
- "text,set,done": Whole text has been set to the entry.
Default content parts of the entry items that you can use for are:
@ -2153,5 +2154,11 @@ cdef class Entry(Object):
def callback_language_changed_del(self, func):
self._callback_del("language,changed", func)
def callback_text_set_done_add(self, func, *args, **kwargs):
"""Whole text has been set to the entry."""
self._callback_add("text,set,done", func, *args, **kwargs)
def callback_text_set_done_del(self, func):
self._callback_del("text,set,done", func)
_object_mapping_register("elm_entry", Entry)

View File

@ -51,11 +51,11 @@ it supports.
This widget emits the following signals, besides the ones sent from
:py:class:`elementary.layout.Layout`:
- ``"selected"`` - the user has clicked on a file (when not in
- ``selected`` - the user has clicked on a file (when not in
folders-only mode) or directory (when in folders-only mode)
- ``"directory,open"`` - the list has been populated with new
- ``directory,open`` - the list has been populated with new
content (*event_info* is the directory's path)
- ``"done"`` - the user has clicked on the "ok" or "cancel"
- ``done`` - the user has clicked on the "ok" or "cancel"
buttons (*event_info* is the selection's path)
@ -316,6 +316,16 @@ cdef class Fileselector(LayoutClass):
def callback_selected_del(self, func):
self._callback_del_full("selected", _cb_string_conv, func)
#
# FIXME: This seems to be a thing that the application should handle
#
#def callback_selected_invalid_add(self, func, *args, **kwargs):
#"""The user has tried to access a path which does not exist."""
#self._callback_add("selected,invalid", func, *args, **kwargs)
#def callback_selected_invalid_del(self, func):
#self._callback_del("selected,invalid", func)
def callback_directory_open_add(self, func, *args, **kwargs):
"""The list has been populated with new content (*event_info* is
the directory's path)."""

View File

@ -46,6 +46,8 @@ This widget emits the following signals, besides the ones sent from
from the first item in its list to the last
- ``"underflowed"`` - when the widget's current selection is changed
from the last item in its list to the first
- ``focused`` - When the flipselector has received focus. (since 1.8)
- ``unfocused`` - When the flipselector has lost focus. (since 1.8)
Available styles for it:
@ -381,5 +383,24 @@ cdef class FlipSelector(Object):
def callback_underflowed_del(self, func):
self._callback_del("underflowed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the flipselector 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 flipselector 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_flipselector", FlipSelector)

View File

@ -162,60 +162,78 @@ Gengrid smart events
Smart events that you can add callbacks for are:
- ``"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 gengrid 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 gengrid item that was double-clicked.
- ``"longpressed"`` - This is called when the item is pressed for a certain
- ``longpressed`` - This is called when the item is pressed for a certain
amount of time. By default it's 1 second.
- ``"selected"`` - The user has made an item selected. The
- ``selected`` - The user has made an item selected. The
``event_info`` parameter is the gengrid item that was selected.
- ``"unselected"`` - The user has made an item unselected. The
- ``unselected`` - The user has made an item unselected. The
``event_info`` parameter is the gengrid item that was unselected.
- ``"realized"`` - This is called when the item in the gengrid
- ``realized`` - This is called when the item in the gengrid
has its implementing Evas object instantiated, de facto.
``event_info`` is the gengrid item that was created. The object
may be deleted at any time, so it is highly advised to the
caller **not** to use the object pointer returned from
elm_gengrid_item_object_get(), because it may point to freed
objects.
- ``"unrealized"`` - This is called when the implementing Evas
- ``unrealized`` - This is called when the implementing Evas
object for this item is deleted. ``event_info`` is the gengrid
item that was deleted.
- ``"changed"`` - Called when an item is added, removed, resized
- ``changed`` - Called when an item is added, removed, resized
or moved and when the gengrid is resized or gets "horizontal"
property changes.
- ``"scroll,anim,start"`` - This is called when scrolling animation has
- ``scroll,anim,start`` - This is called when scrolling animation has
started.
- ``"scroll,anim,stop"`` - This is called when scrolling animation has
- ``scroll,anim,stop`` - This is called when scrolling animation has
stopped.
- ``"drag,start,up"`` - Called when the item in the gengrid has
- ``drag,start,up`` - Called when the item in the gengrid has
been dragged (not scrolled) up.
- ``"drag,start,down"`` - Called when the item in the gengrid has
- ``drag,start,down`` - Called when the item in the gengrid has
been dragged (not scrolled) down.
- ``"drag,start,left"`` - Called when the item in the gengrid has
- ``drag,start,left`` - Called when the item in the gengrid has
been dragged (not scrolled) left.
- ``"drag,start,right"`` - Called when the item in the gengrid has
- ``drag,start,right`` - Called when the item in the gengrid has
been dragged (not scrolled) right.
- ``"drag,stop"`` - Called when the item in the gengrid has
- ``drag,stop`` - Called when the item in the gengrid has
stopped being dragged.
- ``"drag"`` - Called when the item in the gengrid is being
- ``drag`` - Called when the item in the gengrid is being
dragged.
- ``"scroll"`` - called when the content has been scrolled
- ``scroll`` - called when the content has been scrolled
(moved).
- ``"scroll,drag,start"`` - called when dragging the content has
- ``scroll,drag,start`` - called when dragging the content has
started.
- ``"scroll,drag,stop"`` - called when dragging the content has
- ``scroll,drag,stop`` - called when dragging the content has
stopped.
- ``"edge,top"`` - This is called when the gengrid is scrolled until
- ``edge,top`` - This is called when the gengrid is scrolled until
the top edge.
- ``"edge,bottom"`` - This is called when the gengrid is scrolled
- ``edge,bottom`` - This is called when the gengrid is scrolled
until the bottom edge.
- ``"edge,left"`` - This is called when the gengrid is scrolled
- ``edge,left`` - This is called when the gengrid is scrolled
until the left edge.
- ``"edge,right"`` - This is called when the gengrid is scrolled
- ``edge,right`` - This is called when the gengrid is scrolled
until the right edge.
- ``moved`` - This is called when a gengrid item is moved by a user
interaction in a reorder mode. The %c event_info parameter is the item that
was moved.
- ``index,update`` - This is called when a gengrid item index is changed.
Note that this callback is called while each item is being realized.
- ``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`` - This is called when the program's language is
changed. Call the elm_gengrid_realized_items_update() if items text should
be translated.
- ``focused`` - When the gengrid has received focus. (since 1.8)
- ``unfocused`` - When the gengrid has lost focus. (since 1.8)
Enumerations
@ -1650,6 +1668,14 @@ cdef class Gengrid(Object):
def highlight_mode_get(self, fill):
return bool(elm_gengrid_highlight_mode_get(self.obj))
def callback_activated_add(self, func, *args, **kwargs):
self._callback_add_full("activated", _cb_object_item_conv,
func, *args, **kwargs)
def callback_activated_del(self, func):
self._callback_del_full("activated", _cb_object_item_conv, func)
def callback_clicked_double_add(self, func, *args, **kwargs):
self._callback_add_full("clicked,double", _cb_object_item_conv,
func, *args, **kwargs)
@ -1678,5 +1704,224 @@ cdef class Gengrid(Object):
def callback_unselected_del(self, func):
self._callback_del_full("unselected", _cb_object_item_conv, func)
def callback_realized_add(self, func, *args, **kwargs):
"""This is called when the item in the gengrid
has its implementing Evas object instantiated, de facto.
``event_info`` is the gengrid item that was created. The object
may be deleted at any time, so it is highly advised to the
caller **not** to use the object pointer returned from
elm_gengrid_item_object_get(), because it may point to freed
objects."""
self._callback_add_full("realized", _cb_object_item_conv,
func, *args, **kwargs)
def callback_realized_del(self, func):
self._callback_del_full("realized", _cb_object_item_conv, func)
def callback_unrealized_add(self, func, *args, **kwargs):
"""This is called when the implementing Evas
object for this item is deleted. ``event_info`` is the gengrid
item that was deleted."""
self._callback_add_full("unrealized", _cb_object_item_conv,
func, *args, **kwargs)
def callback_unrealized_del(self, func):
self._callback_del_full("unrealized", _cb_object_item_conv, func)
def callback_changed_add(self, func, *args, **kwargs):
"""Called when an item is added, removed, resized
or moved and when the gengrid is resized or gets "horizontal"
property changes."""
self._callback_add("changed", func, *args, **kwargs)
def callback_changed_del(self, func):
self._callback_del("changed", func)
def callback_scroll_anim_start_add(self, func, *args, **kwargs):
"""This is called when scrolling animation has
started."""
self._callback_add("scroll,anim,start", func, *args, **kwargs)
def callback_scroll_anim_start_del(self, func):
self._callback_del("scroll,anim,start", func)
def callback_scroll_anim_stop_add(self, func, *args, **kwargs):
"""This is called when scrolling animation has
stopped."""
self._callback_add("scroll,anim,stop", func, *args, **kwargs)
def callback_scroll_anim_stop_del(self, func):
self._callback_del("scroll,anim,stop", func)
def callback_drag_start_up_add(self, func, *args, **kwargs):
"""Called when the item in the gengrid has
been dragged (not scrolled) up."""
self._callback_add("drag,start,up", func, *args, **kwargs)
def callback_drag_start_up_del(self, func):
self._callback_del("drag,start,up", func)
def callback_drag_start_down_add(self, func, *args, **kwargs):
"""Called when the item in the gengrid has
been dragged (not scrolled) down."""
self._callback_add("drag,start,down", func, *args, **kwargs)
def callback_drag_start_down_del(self, func):
self._callback_del("drag,start,down", func)
def callback_drag_start_left_add(self, func, *args, **kwargs):
"""Called when the item in the gengrid has
been dragged (not scrolled) left."""
self._callback_add("drag,start,left", func, *args, **kwargs)
def callback_drag_start_left_del(self, func):
self._callback_del("drag,start,left", func)
def callback_drag_start_right_add(self, func, *args, **kwargs):
"""Called when the item in the gengrid has
been dragged (not scrolled) right."""
self._callback_add("drag,start,right", func, *args, **kwargs)
def callback_drag_start_right_del(self, func):
self._callback_del("drag,start,right", func)
def callback_drag_stop_add(self, func, *args, **kwargs):
"""Called when the item in the gengrid has
stopped being dragged."""
self._callback_add("drag,stop", func, *args, **kwargs)
def callback_drag_stop_del(self, func):
self._callback_del("drag,stop", func)
def callback_drag_add(self, func, *args, **kwargs):
"""Called when the item in the gengrid is being
dragged."""
self._callback_add("drag", func, *args, **kwargs)
def callback_drag_del(self, func):
self._callback_del("drag", func)
def callback_scroll_add(self, func, *args, **kwargs):
"""called when the content has been scrolled
(moved)."""
self._callback_add("scroll", func, *args, **kwargs)
def callback_scroll_del(self, func):
self._callback_del("scroll", func)
def callback_scroll_drag_start_add(self, func, *args, **kwargs):
"""called when dragging the content has
started."""
self._callback_add("scroll,drag,start", func, *args, **kwargs)
def callback_scroll_drag_start_del(self, func):
self._callback_del("scroll,drag,start", func)
def callback_scroll_drag_stop_add(self, func, *args, **kwargs):
"""called when dragging the content has
stopped."""
self._callback_add("scroll,drag,stop", func, *args, **kwargs)
def callback_scroll_drag_stop_del(self, func):
self._callback_del("scroll,drag,stop", func)
def callback_edge_top_add(self, func, *args, **kwargs):
"""This is called when the gengrid is scrolled until
the top edge."""
self._callback_add("edge,top", func, *args, **kwargs)
def callback_edge_top_del(self, func):
self._callback_del("edge,top", func)
def callback_edge_bottom_add(self, func, *args, **kwargs):
"""This is called when the gengrid is scrolled
until the bottom edge."""
self._callback_add("edge,bottom", func, *args, **kwargs)
def callback_edge_bottom_del(self, func):
self._callback_del("edge,bottom", func)
def callback_edge_left_add(self, func, *args, **kwargs):
"""This is called when the gengrid is scrolled
until the left edge."""
self._callback_add("edge,left", func, *args, **kwargs)
def callback_edge_left_del(self, func):
self._callback_del("edge,left", func)
def callback_edge_right_add(self, func, *args, **kwargs):
"""This is called when the gengrid is scrolled
until the right edge."""
self._callback_add("edge,right", func, *args, **kwargs)
def callback_edge_right_del(self, func):
self._callback_del("edge,right", func)
def callback_moved_add(self, func, *args, **kwargs):
"""This is called when a gengrid item is moved by a user
interaction in a reorder mode. The %c event_info parameter is the item that
was moved."""
self._callback_add_full("moved", _cb_object_item_conv,
func, *args, **kwargs)
def callback_moved_del(self, func):
self._callback_del_full("moved", _cb_object_item_conv, func)
def callback_index_update_add(self, func, *args, **kwargs):
"""This is called when a gengrid item index is changed.
Note that this callback is called while each item is being realized."""
self._callback_add("index,update", func, *args, **kwargs)
def callback_index_update_del(self, func):
self._callback_del("index,update", 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_full("highlighted", _cb_object_item_conv,
func, *args, **kwargs)
def callback_highlighted_del(self, func):
self._callback_del_full("highlighted", _cb_object_item_conv, 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_full("unhighlighted", _cb_object_item_conv,
func, *args, **kwargs)
def callback_unhighlighted_del(self, func):
self._callback_del_full("unhighlighted", _cb_object_item_conv, func)
def callback_language_changed_add(self, func, *args, **kwargs):
"""This is called when the program's language is
changed. Call the elm_gengrid_realized_items_update() if items text should
be translated."""
self.callback_add("language,changed", func, *args, **kwargs)
def callback_focused_add(self, func, *args, **kwargs):
"""When the gengrid 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 gengrid 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_gengrid", Gengrid)

View File

@ -347,6 +347,16 @@ Signals that you can add callbacks for are:
changed.
- ``"tree,effect,finished"`` - This is called when a genlist tree effect
is finished.
- ``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.
- ``focused`` - When the genlist has received focus. (since 1.8)
- ``unfocused`` - When the genlist has lost focus. (since 1.8)
Enumerations

View File

@ -819,3 +819,44 @@ cdef class GenlistWidget(Object):
def callback_tree_effect_finished_del(self, func):
self._callback_del("tree,effect,finished", 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_full("highlighted", _cb_object_item_conv,
func, *args, **kwargs)
def callback_highlighted_del(self, func):
self._callback_del_full("highlighted", _cb_object_item_conv, 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_full("unhighlighted", _cb_object_item_conv,
func, *args, **kwargs)
def callback_unhighlighted_del(self, func):
self._callback_del_full("unhighlighted", _cb_object_item_conv, func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the genlist 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 genlist has lost focus.
:since: 1.8
"""
self._callback_add("unfocused", func, *args, **kwargs)
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)

View File

@ -49,6 +49,8 @@ This widget emits the following signals, besides the ones sent from
dismiss
- ``"smart,changed"`` - a content object placed under the "smart"
policy was replaced to a new slot direction.
- ``focused`` - When the hover has received focus. (since 1.8)
- ``unfocused`` - When the hover has lost focus. (since 1.8)
Default content parts of the hover widget that you can use for are:
@ -223,5 +225,25 @@ cdef class Hover(LayoutClass):
def callback_smart_changed_del(self, func):
self._callback_del("smart,changed", func)
def callback_focused_add(self, func, *args, **kwargs):
"""When the hover 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 hover 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_hover", Hover)