Elementary: Add more _set_properties_from_keyword_args

This commit is contained in:
Kai Huuhko 2013-10-25 17:38:01 +03:00
parent 374f267ecc
commit 2dca18ab08
60 changed files with 142 additions and 91 deletions

30
TODO
View File

@ -1,17 +1,15 @@
BUGS
====
----
* Evas: smart object doesn't work
* Evas: SmartObject doesn't work
* EdjeEdit: PartState API does not work
TODO
====
----
* evas.SmartObject
* edje: complete the unit tests
* elm.Web needs a test and a lot of work: signals and documentation
* include python-ethumb
* Review the internal functions and name them consistently
* Add more documentation for the use of callbacks
@ -21,15 +19,23 @@ TODO
* Split base object defines from includes/efl.evas.pxd so that everything
defined there doesn't get included to the C code that cimports it.
This may have been fixed in latest versions of Cython.
* Add compatibility properties/methods for scrollables
* Check that all scrollable Elm widgets are documented as being such.
* Review the new elm list type object item system.
* Check for documentation changes.
* Elm Drag-n-Drop (in progress/kuuko)
* Unit tests for elm, things like top_widget and getting child objects
can be done easily.
* Use more _set_properties_from_keyword_args
* Check for missing properties <-> getter-/setter-functions
* Add more logging
* New Elm documentation images with the new default theme.
Elementary
==========
* Web needs a test and a lot of work: signals and documentation
* Review the new container type object item system.
Should the instance methods be classmethods instead?
* Drag-n-Drop (in progress/kuuko)
* Unit tests, things like top_widget and getting child objects
can be done easily.
* Fix Theme API, add a test
* New documentation images with the new default theme.
* Images missing in the documentation:
- datetime
- video

View File

@ -107,8 +107,9 @@ cdef class Actionslider(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_actionslider_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property selected_label:
"""Selected label.

View File

@ -82,8 +82,9 @@ cdef class Background(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_bg_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property file:
"""The file (image or edje collection) giving life for the background.

View File

@ -180,7 +180,7 @@ cdef class Box(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
"""By default, the box will be in vertical mode and non-homogeneous.
:param parent: The parent object
@ -190,6 +190,7 @@ cdef class Box(Object):
"""
self._set_obj(elm_box_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property horizontal:
"""The horizontal orientation.

View File

@ -71,8 +71,9 @@ cdef class Button(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_button_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property autorepeat:
"""Turn on/off the autorepeat event generated when the button is

View File

@ -289,8 +289,9 @@ cdef class Calendar(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_calendar_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property weekdays_names:
"""The weekdays' names to be displayed by the calendar.

View File

@ -60,8 +60,9 @@ cdef class Check(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_check_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property state:
"""The of/off state of the check object

View File

@ -119,8 +119,9 @@ cdef class Clock(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_clock_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property time:
"""The clock widget's time

View File

@ -121,8 +121,9 @@ cdef class Colorselector(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_colorselector_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property color:
"""The current color (r, g, b, a).

View File

@ -56,8 +56,9 @@ cdef class Conformant(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_conformant_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def callback_virtualkeypad_state_on_add(self, func, *args, **kwargs):
"""if virtualkeypad state is switched to "on".

View File

@ -174,8 +174,9 @@ cdef class Ctxpopup(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_ctxpopup_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property hover_parent:
"""Ctxpopup hover's parent

View File

@ -271,8 +271,9 @@ cdef class Datetime(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_datetime_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property format:
"""The datetime format. Format is a combination of allowed Libc date format

View File

@ -130,8 +130,9 @@ cdef class Dayselector(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_dayselector_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def day_selected_set(self, day, selected):
"""day_selected_set(int day, bool selected)

View File

@ -247,8 +247,9 @@ cdef class Diskselector(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_diskselector_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property round_enabled:
"""Enable or disable round mode.

View File

@ -770,7 +770,7 @@ cdef class Entry(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
"""By default, entries are:
- not scrolled
@ -785,6 +785,7 @@ cdef class Entry(Object):
"""
self._set_obj(elm_entry_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def text_style_user_push(self, style):
"""Push the style to the top of user style stack.

View File

@ -95,11 +95,9 @@ cdef class Fileselector(LayoutClass):
"""This is the class that actually implements the widget."""
cdef object _cbs
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_fileselector_add(parent.obj))
self._cbs = {}
self._set_properties_from_keyword_args(kwargs)
property is_save:
"""Enable/disable the file name entry box where the user can type

View File

@ -94,12 +94,9 @@ cdef class FileselectorButton(Button):
"""This is the class that actually implements the widget."""
cdef object _cbs
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_fileselector_button_add(parent.obj))
# TODO: What's this for?
self._cbs = {}
self._set_properties_from_keyword_args(kwargs)
property window_title:
"""The title for a given file selector button widget's window

View File

@ -109,12 +109,9 @@ cdef class FileselectorEntry(Object):
"""This is the class that actually implements the widget."""
cdef object _cbs
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_fileselector_entry_add(parent.obj))
# TODO: What's this for?
self._cbs = {}
self._set_properties_from_keyword_args(kwargs)
property window_title:
"""The title for a given file selector entry widget's window

View File

@ -210,9 +210,9 @@ cdef class Flip(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_flip_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property front_visible:
"""Front visibility state

View File

@ -233,8 +233,9 @@ cdef class FlipSelector(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_flipselector_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def next(self):
"""next()

View File

@ -64,8 +64,9 @@ cdef class Frame(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_frame_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property autocollapse:
"""Autocollapsing of a frame

View File

@ -1067,8 +1067,9 @@ cdef class Gengrid(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_gengrid_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def clear(self):
"""clear()

View File

@ -4,8 +4,9 @@ cdef class Genlist(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent not None):
def __init__(self, evasObject parent not None, *args, **kwargs):
self._set_obj(elm_genlist_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def __iter__(self):
return GenlistIterator(self)

View File

@ -521,7 +521,7 @@ cdef class GestureLayer(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
"""Call this function to construct a new gesture-layer object.
This does not activate the gesture layer. You have to call
@ -535,6 +535,7 @@ cdef class GestureLayer(Object):
"""
self._set_obj(elm_gesture_layer_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def cb_set(self, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, callback, *args, **kwargs):
"""cb_set(Elm_Gesture_Type idx, Elm_Gesture_State cb_type, callback, *args, **kwargs)

View File

@ -49,8 +49,9 @@ cdef class Grid(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_grid_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property size:
"""The virtual size (width and height) of the grid.

View File

@ -131,8 +131,9 @@ cdef class Hover(LayoutClass):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_hover_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def target_set(self, evasObject target):
elm_hover_target_set(self.obj, target.obj)

View File

@ -205,8 +205,9 @@ cdef class Hoversel(Button):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_hoversel_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property horizontal:
"""Whether the hoversel is set to expand horizontally.

View File

@ -162,8 +162,9 @@ cdef class Icon(Image):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_icon_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property thumb:
"""Set the file (and edje group) that will be used, but use a

View File

@ -162,8 +162,9 @@ cdef class Image(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_image_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
#def memfile_set(self, img, size, format, key):
# NOTE: remove _cfruni if this is implemented

View File

@ -348,8 +348,9 @@ cdef class Index(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_index_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property autohide_disabled:
"""Enable or disable auto hiding feature for a given index widget.

View File

@ -53,8 +53,9 @@ cdef class InnerWindow(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_win_inwin_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def activate(self):
"""activate()

View File

@ -119,8 +119,9 @@ cdef class Label(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_label_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property line_wrap:
"""The wrapping behavior of the label

View File

@ -147,8 +147,9 @@ cdef class Layout(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_layout_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def content_set(self, swallow, evasObject content):
"""content_set(unicode swallow, evas.Object content)

View File

@ -607,8 +607,9 @@ cdef class List(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_list_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def go(self):
"""go()

View File

@ -942,14 +942,15 @@ cdef class MapOverlayRoute(MapOverlay):
Py_INCREF(self)
cdef public class Map(Object)[object PyElementaryMap, type PyElementaryMap_Type]:
cdef class Map(Object):
"""
This is the class that actually implement the widget.
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_map_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property zoom:
""" The zoom level of the map.

View File

@ -40,8 +40,9 @@ cdef class Mapbuf(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_mapbuf_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property enabled:
"""The enabled state of the map.

View File

@ -291,8 +291,9 @@ cdef class Menu(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_menu_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property parent:
"""The parent for the given menu widget.

View File

@ -235,8 +235,9 @@ cdef class MultiButtonEntry(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_multibuttonentry_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property entry:
"""The Entry object child of the multibuttonentry.

View File

@ -342,8 +342,9 @@ cdef class Naviframe(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_naviframe_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def item_push(self, title_label, evasObject prev_btn, evasObject next_btn, evasObject content, item_style):
return NaviframeItem(title_label, prev_btn, next_btn, content, item_style).push_to(self)

View File

@ -126,8 +126,9 @@ cdef class Notify(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_notify_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property parent:
"""The notify parent.

View File

@ -85,8 +85,9 @@ cdef class Panel(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_panel_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property orient:
"""The orientation of the panel.

View File

@ -58,8 +58,9 @@ cdef class Panes(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_panes_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property fixed:
"""Whether the left and right panes resize homogeneously or not.

View File

@ -52,8 +52,9 @@ cdef class Photo(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_photo_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property file:
"""Set the file that will be used as photo

View File

@ -166,8 +166,9 @@ cdef class Photocam(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_photocam_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property file:
"""The photo file to be shown

View File

@ -57,8 +57,9 @@ cdef class Plug(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_plug_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def connect(self, svcname, svcnum, svcsys):
"""connect(unicode svcname, int svcnum, bool svcsys) -> bool

View File

@ -268,8 +268,9 @@ cdef class Popup(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_popup_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def item_append(self, label, evasObject icon, func = None, *args, **kwargs):
"""item_append(unicode label, evas.Object icon, func = None, *args, **kwargs) -> PopupItem

View File

@ -87,8 +87,9 @@ cdef class Progressbar(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_progressbar_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property pulse_mode:
"""Whether a given progress bar widget is at "pulsing mode" or not.

View File

@ -74,12 +74,9 @@ cdef class Radio(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent, obj=None):
# FIXME: This conditional should be removed, use __new__ and _set_obj
if obj is None:
self._set_obj(elm_radio_add(parent.obj))
else:
self._set_obj(<Evas_Object*>obj)
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_radio_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def group_add(self, evasObject group):
"""group_add(evas.Object group)

View File

@ -847,8 +847,9 @@ cdef class Scrollable(Object):
cdef class ScrollerWidget(LayoutClass):
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_scroller_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
class Scroller(Scrollable, ScrollerWidget):

View File

@ -113,8 +113,9 @@ cdef class SegmentControl(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_segment_control_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def item_add(self, evasObject icon = None, label = None):
"""item_add(self, evas.Object icon, unicode label = None) -> SegmentControlItem

View File

@ -40,8 +40,9 @@ cdef class Separator(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_separator_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property horizontal:
"""The horizontal mode of a separator object

View File

@ -84,8 +84,9 @@ cdef class Slider(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_slider_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property span_size:
"""The (exact) length of the bar region of a given slider widget.

View File

@ -387,8 +387,9 @@ cdef class Slideshow(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_slideshow_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def item_add(self, SlideshowItemClass item_class not None, *args, **kwargs):
"""item_add(SlideshowItemClass item_class, *args, **kwargs) -> SlideshowItem

View File

@ -66,8 +66,9 @@ cdef class Spinner(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_spinner_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property label_format:
"""The format string of the displayed label.

View File

@ -53,8 +53,9 @@ cdef class Table(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_table_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property homogeneous:
"""The homogeneous layout in the table

View File

@ -192,8 +192,9 @@ cdef class Thumb(Object):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_thumb_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def reload(self):
"""reload()

View File

@ -750,8 +750,9 @@ cdef class Toolbar(Object):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_toolbar_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property icon_size:
"""The icon size, in pixels, to be used by toolbar items.

View File

@ -46,8 +46,9 @@ cdef class Video(LayoutClass):
"""This is the class that actually implements the widget."""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_video_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
property file:
"""Define the file or URI that will be the video source.
@ -282,8 +283,9 @@ cdef class Player(LayoutClass):
"""
def __init__(self, evasObject parent):
def __init__(self, evasObject parent, *args, **kwargs):
self._set_obj(elm_player_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
def callback_forward_clicked_add(self, func, *args, **kwargs):
"""the user clicked the forward button."""

View File

@ -137,8 +137,9 @@ cdef void _web_console_message_hook(void *data, Evas_Object *obj, const_char *me
cdef class Web(Object):
cdef object _console_message_hook
def __init__(self,evasObject parent):
def __init__(self,evasObject parent, *args, **kwargs):
self._set_obj(elm_web_add(parent.obj))
self._set_properties_from_keyword_args(kwargs)
# XXX TODO: complete all callbacks from elm_web.h
def callback_uri_changed_add(self, func, *args, **kwargs):

View File

@ -419,7 +419,7 @@ cdef class Window(Object):
"""This is the class that actually implements the widget."""
def __init__(self, name, type, evasObject parent=None):
def __init__(self, name, type, evasObject parent=None, *args, **kwargs):
"""
:param name: A name for the new window.
@ -434,6 +434,7 @@ cdef class Window(Object):
self._set_obj(elm_win_add(parent.obj if parent is not None else NULL,
<const_char *>name if name is not None else NULL,
type))
self._set_properties_from_keyword_args(kwargs)
def resize_object_add(self, evasObject subobj):
"""resize_object_add(evas.Object subobj)
@ -1735,9 +1736,10 @@ cdef class StandardWindow(Window):
"""
def __init__(self, name, title):
def __init__(self, name, title, *args, **kwargs):
if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
self._set_obj(elm_win_util_standard_add(
<const_char *>name if name is not None else NULL,
<const_char *>title if title is not None else NULL))
self._set_properties_from_keyword_args(kwargs)