Elementary: Add trivial methods/properties to label/mbentry/notify.
This commit is contained in:
parent
41ade8572d
commit
e5e82619d5
|
@ -13,6 +13,7 @@ cdef extern from "Elementary.h":
|
|||
Eina_Bool elm_label_slide_get(Evas_Object *obj)#DEP
|
||||
void elm_label_slide_duration_set(Evas_Object *obj, double duration)
|
||||
double elm_label_slide_duration_get(Evas_Object *obj)
|
||||
void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit)
|
||||
void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode)
|
||||
Elm_Label_Slide_Mode elm_label_slide_mode_get(const_Evas_Object *obj)
|
||||
void elm_label_slide_go(Evas_Object *obj)
|
||||
|
|
|
@ -232,6 +232,20 @@ cdef class Label(LayoutClass):
|
|||
def slide_duration_get(self):
|
||||
return elm_label_slide_duration_get(self.obj)
|
||||
|
||||
# TODO: In header but not implemented yet?
|
||||
# property slide_area_limit:
|
||||
# """
|
||||
# Slide only if the
|
||||
|
||||
# :type: bool
|
||||
|
||||
# """
|
||||
# def __set__(self, bint value):
|
||||
# elm_label_slide_area_limit_set(self.obj, limit)
|
||||
|
||||
# def __get__(self):
|
||||
# return elm_label_slide_area_limit_set(self.obj)
|
||||
|
||||
property slide_mode:
|
||||
"""Change the slide mode of the label widget.
|
||||
|
||||
|
|
|
@ -25,4 +25,6 @@ cdef extern from "Elementary.h":
|
|||
Elm_Object_Item *elm_multibuttonentry_item_next_get(const_Elm_Object_Item *it)
|
||||
void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
|
||||
void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
|
||||
void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
|
||||
# TODO: void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data)
|
||||
void elm_multibuttonentry_editable_set(Evas_Object *obj, Eina_Bool editable)
|
||||
Eina_Bool elm_multibuttonentry_editable_get(const_Evas_Object *obj)
|
||||
|
|
|
@ -251,6 +251,24 @@ cdef class MultiButtonEntry(Object):
|
|||
#TODO
|
||||
pass
|
||||
|
||||
property editable:
|
||||
"""Whether the multibuttonentry is to be editable or not.
|
||||
|
||||
:type: bool
|
||||
|
||||
"""
|
||||
def __set__(self, value):
|
||||
self.editable_set(value)
|
||||
|
||||
def __get__(self):
|
||||
return self.editable_get()
|
||||
|
||||
cpdef editable_set(self, bint editable):
|
||||
elm_multibuttonentry_editable_set(self.obj, editable)
|
||||
|
||||
cpdef bint editable_get(self):
|
||||
return elm_multibuttonentry_editable_get(self.obj)
|
||||
|
||||
def callback_item_selected_add(self, func, *args, **kwargs):
|
||||
self._callback_add("item,selected", func, *args, **kwargs)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from efl.evas cimport Eina_Bool, Evas_Object
|
||||
from efl.evas cimport Eina_Bool, Evas_Object, const_Evas_Object
|
||||
from enums cimport Elm_Notify_Orient
|
||||
|
||||
cdef extern from "Elementary.h":
|
||||
|
@ -11,4 +11,6 @@ cdef extern from "Elementary.h":
|
|||
double elm_notify_timeout_get(Evas_Object *obj)
|
||||
void elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool repeat)
|
||||
Eina_Bool elm_notify_allow_events_get(Evas_Object *obj)
|
||||
void elm_notify_align_set(Evas_Object *obj, double horizontal, double vertical)
|
||||
void elm_notify_align_get(const_Evas_Object *obj, double *horizontal, double *vertical)
|
||||
|
||||
|
|
|
@ -37,6 +37,9 @@ Default content parts of the notify widget that you can use are:
|
|||
|
||||
- ``"default"`` - The main content of the notify
|
||||
|
||||
|
||||
.. _Elm_Notify_Orient:
|
||||
|
||||
.. rubric:: Notify orientation types
|
||||
|
||||
.. data:: ELM_NOTIFY_ORIENT_TOP
|
||||
|
@ -75,6 +78,17 @@ Default content parts of the notify widget that you can use are:
|
|||
|
||||
Bottom right orientation
|
||||
|
||||
|
||||
.. _ELM_NOTIFY_ALIGN_FILL:
|
||||
|
||||
.. rubric:: ELM_NOTIFY_ALIGN_FILL
|
||||
|
||||
.. data:: ELM_NOTIFY_ALIGN_FILL
|
||||
|
||||
Use with :py:attr:`Notify.align`
|
||||
|
||||
:since: 1.8
|
||||
|
||||
"""
|
||||
|
||||
include "widget_header.pxi"
|
||||
|
@ -94,6 +108,8 @@ ELM_NOTIFY_ORIENT_BOTTOM_LEFT = enums.ELM_NOTIFY_ORIENT_BOTTOM_LEFT
|
|||
ELM_NOTIFY_ORIENT_BOTTOM_RIGHT = enums.ELM_NOTIFY_ORIENT_BOTTOM_RIGHT
|
||||
ELM_NOTIFY_ORIENT_LAST = enums.ELM_NOTIFY_ORIENT_LAST
|
||||
|
||||
ELM_NOTIFY_ALIGN_FILL = -1.0
|
||||
|
||||
cdef class Notify(Object):
|
||||
|
||||
"""
|
||||
|
@ -128,7 +144,7 @@ cdef class Notify(Object):
|
|||
property orient:
|
||||
"""The position in which the notify will appear in its parent.
|
||||
|
||||
:type: Elm_Notify_Orient
|
||||
:type: :ref:`Notify orientation <Elm_Notify_Orient>`
|
||||
|
||||
"""
|
||||
def __get__(self):
|
||||
|
@ -193,6 +209,34 @@ cdef class Notify(Object):
|
|||
def allow_events_get(self):
|
||||
return bool(elm_notify_allow_events_get(self.obj))
|
||||
|
||||
|
||||
property align:
|
||||
"""Set the alignment of the notify object
|
||||
|
||||
:type: (float **horizontal**, float **vertical**)
|
||||
|
||||
Sets the alignment in which the notify will appear in its parent.
|
||||
|
||||
.. note:: To fill the notify box in the parent area, please pass
|
||||
:ref:`ELM_NOTIFY_ALIGN_FILL <ELM_NOTIFY_ALIGN_FILL>` to ``horizontal``, ``vertical``.
|
||||
|
||||
:since: 1.8
|
||||
|
||||
"""
|
||||
def __set__(self, value):
|
||||
self.align_set(*value)
|
||||
|
||||
def __get__(self):
|
||||
return self.align_get()
|
||||
|
||||
cpdef align_set(self, float horizontal, float vertical):
|
||||
elm_notify_align_set(self.obj, horizontal, vertical)
|
||||
|
||||
cpdef align_get(self):
|
||||
cdef double horizontal, vertical
|
||||
elm_notify_align_get(self.obj, &horizontal, &vertical)
|
||||
return (horizontal, vertical)
|
||||
|
||||
def callback_timeout_add(self, func, *args, **kwargs):
|
||||
"""When timeout happens on notify and it's hidden."""
|
||||
self._callback_add("timeout", func, *args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue