From 2dca18ab0865f383ee16b9db47775ab084217cf4 Mon Sep 17 00:00:00 2001 From: Kai Huuhko Date: Fri, 25 Oct 2013 17:38:01 +0300 Subject: [PATCH] Elementary: Add more _set_properties_from_keyword_args --- TODO | 30 +++++++++++++++----------- efl/elementary/actionslider.pyx | 3 ++- efl/elementary/background.pyx | 3 ++- efl/elementary/box.pyx | 3 ++- efl/elementary/button.pyx | 3 ++- efl/elementary/calendar_elm.pyx | 3 ++- efl/elementary/check.pyx | 3 ++- efl/elementary/clock.pyx | 3 ++- efl/elementary/colorselector.pyx | 3 ++- efl/elementary/conformant.pyx | 3 ++- efl/elementary/ctxpopup.pyx | 3 ++- efl/elementary/datetime_elm.pyx | 3 ++- efl/elementary/dayselector.pyx | 3 ++- efl/elementary/diskselector.pyx | 3 ++- efl/elementary/entry.pyx | 3 ++- efl/elementary/fileselector.pyx | 6 ++---- efl/elementary/fileselector_button.pyx | 7 ++---- efl/elementary/fileselector_entry.pyx | 7 ++---- efl/elementary/flip.pyx | 4 ++-- efl/elementary/flipselector.pyx | 3 ++- efl/elementary/frame.pyx | 3 ++- efl/elementary/gengrid.pyx | 3 ++- efl/elementary/genlist_widget.pxi | 3 ++- efl/elementary/gesture_layer.pyx | 3 ++- efl/elementary/grid.pyx | 3 ++- efl/elementary/hover.pyx | 3 ++- efl/elementary/hoversel.pyx | 3 ++- efl/elementary/icon.pyx | 3 ++- efl/elementary/image.pyx | 3 ++- efl/elementary/index.pyx | 3 ++- efl/elementary/innerwindow.pyx | 3 ++- efl/elementary/label.pyx | 3 ++- efl/elementary/layout.pyx | 3 ++- efl/elementary/list.pyx | 3 ++- efl/elementary/map.pyx | 5 +++-- efl/elementary/mapbuf.pyx | 3 ++- efl/elementary/menu.pyx | 3 ++- efl/elementary/multibuttonentry.pyx | 3 ++- efl/elementary/naviframe.pyx | 3 ++- efl/elementary/notify.pyx | 3 ++- efl/elementary/panel.pyx | 3 ++- efl/elementary/panes.pyx | 3 ++- efl/elementary/photo.pyx | 3 ++- efl/elementary/photocam.pyx | 3 ++- efl/elementary/plug.pyx | 3 ++- efl/elementary/popup.pyx | 3 ++- efl/elementary/progressbar.pyx | 3 ++- efl/elementary/radio.pyx | 9 +++----- efl/elementary/scroller.pyx | 3 ++- efl/elementary/segment_control.pyx | 3 ++- efl/elementary/separator.pyx | 3 ++- efl/elementary/slider.pyx | 3 ++- efl/elementary/slideshow.pyx | 3 ++- efl/elementary/spinner.pyx | 3 ++- efl/elementary/table.pyx | 3 ++- efl/elementary/thumb.pyx | 3 ++- efl/elementary/toolbar.pyx | 3 ++- efl/elementary/video.pyx | 6 ++++-- efl/elementary/web.pyx | 3 ++- efl/elementary/window.pyx | 6 ++++-- 60 files changed, 142 insertions(+), 91 deletions(-) diff --git a/TODO b/TODO index 87ec07d..9948894 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/efl/elementary/actionslider.pyx b/efl/elementary/actionslider.pyx index 5197658..63b210f 100644 --- a/efl/elementary/actionslider.pyx +++ b/efl/elementary/actionslider.pyx @@ -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. diff --git a/efl/elementary/background.pyx b/efl/elementary/background.pyx index 2023cee..bffe776 100644 --- a/efl/elementary/background.pyx +++ b/efl/elementary/background.pyx @@ -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. diff --git a/efl/elementary/box.pyx b/efl/elementary/box.pyx index 1a37611..2eebf13 100644 --- a/efl/elementary/box.pyx +++ b/efl/elementary/box.pyx @@ -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. diff --git a/efl/elementary/button.pyx b/efl/elementary/button.pyx index 11b8810..ad4c8d3 100644 --- a/efl/elementary/button.pyx +++ b/efl/elementary/button.pyx @@ -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 diff --git a/efl/elementary/calendar_elm.pyx b/efl/elementary/calendar_elm.pyx index 1470ce2..3b591f1 100644 --- a/efl/elementary/calendar_elm.pyx +++ b/efl/elementary/calendar_elm.pyx @@ -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. diff --git a/efl/elementary/check.pyx b/efl/elementary/check.pyx index 3d11fd1..9543ace 100644 --- a/efl/elementary/check.pyx +++ b/efl/elementary/check.pyx @@ -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 diff --git a/efl/elementary/clock.pyx b/efl/elementary/clock.pyx index faca892..8c823b7 100644 --- a/efl/elementary/clock.pyx +++ b/efl/elementary/clock.pyx @@ -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 diff --git a/efl/elementary/colorselector.pyx b/efl/elementary/colorselector.pyx index 612b609..6bf4677 100644 --- a/efl/elementary/colorselector.pyx +++ b/efl/elementary/colorselector.pyx @@ -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). diff --git a/efl/elementary/conformant.pyx b/efl/elementary/conformant.pyx index 50e7c9c..fc5b996 100644 --- a/efl/elementary/conformant.pyx +++ b/efl/elementary/conformant.pyx @@ -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". diff --git a/efl/elementary/ctxpopup.pyx b/efl/elementary/ctxpopup.pyx index 24ea197..0b529df 100644 --- a/efl/elementary/ctxpopup.pyx +++ b/efl/elementary/ctxpopup.pyx @@ -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 diff --git a/efl/elementary/datetime_elm.pyx b/efl/elementary/datetime_elm.pyx index d219c8b..fab0b02 100644 --- a/efl/elementary/datetime_elm.pyx +++ b/efl/elementary/datetime_elm.pyx @@ -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 diff --git a/efl/elementary/dayselector.pyx b/efl/elementary/dayselector.pyx index 50d1f80..5dd0162 100644 --- a/efl/elementary/dayselector.pyx +++ b/efl/elementary/dayselector.pyx @@ -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) diff --git a/efl/elementary/diskselector.pyx b/efl/elementary/diskselector.pyx index 8f35e66..f668152 100644 --- a/efl/elementary/diskselector.pyx +++ b/efl/elementary/diskselector.pyx @@ -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. diff --git a/efl/elementary/entry.pyx b/efl/elementary/entry.pyx index 82c13dd..001823b 100644 --- a/efl/elementary/entry.pyx +++ b/efl/elementary/entry.pyx @@ -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. diff --git a/efl/elementary/fileselector.pyx b/efl/elementary/fileselector.pyx index 6830cad..d6c6905 100644 --- a/efl/elementary/fileselector.pyx +++ b/efl/elementary/fileselector.pyx @@ -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 diff --git a/efl/elementary/fileselector_button.pyx b/efl/elementary/fileselector_button.pyx index a489c0b..2e1067a 100644 --- a/efl/elementary/fileselector_button.pyx +++ b/efl/elementary/fileselector_button.pyx @@ -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 diff --git a/efl/elementary/fileselector_entry.pyx b/efl/elementary/fileselector_entry.pyx index 0718af9..45f1a59 100644 --- a/efl/elementary/fileselector_entry.pyx +++ b/efl/elementary/fileselector_entry.pyx @@ -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 diff --git a/efl/elementary/flip.pyx b/efl/elementary/flip.pyx index 848d399..6373009 100644 --- a/efl/elementary/flip.pyx +++ b/efl/elementary/flip.pyx @@ -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 diff --git a/efl/elementary/flipselector.pyx b/efl/elementary/flipselector.pyx index bc2ea02..20488db 100644 --- a/efl/elementary/flipselector.pyx +++ b/efl/elementary/flipselector.pyx @@ -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() diff --git a/efl/elementary/frame.pyx b/efl/elementary/frame.pyx index f203deb..3e6fff0 100644 --- a/efl/elementary/frame.pyx +++ b/efl/elementary/frame.pyx @@ -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 diff --git a/efl/elementary/gengrid.pyx b/efl/elementary/gengrid.pyx index 19fd4aa..b8b0185 100644 --- a/efl/elementary/gengrid.pyx +++ b/efl/elementary/gengrid.pyx @@ -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() diff --git a/efl/elementary/genlist_widget.pxi b/efl/elementary/genlist_widget.pxi index 2348b5c..3dadd97 100644 --- a/efl/elementary/genlist_widget.pxi +++ b/efl/elementary/genlist_widget.pxi @@ -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) diff --git a/efl/elementary/gesture_layer.pyx b/efl/elementary/gesture_layer.pyx index 01fa9a5..ccac853 100644 --- a/efl/elementary/gesture_layer.pyx +++ b/efl/elementary/gesture_layer.pyx @@ -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) diff --git a/efl/elementary/grid.pyx b/efl/elementary/grid.pyx index df95c29..72d4650 100644 --- a/efl/elementary/grid.pyx +++ b/efl/elementary/grid.pyx @@ -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. diff --git a/efl/elementary/hover.pyx b/efl/elementary/hover.pyx index 2df8685..b4918af 100644 --- a/efl/elementary/hover.pyx +++ b/efl/elementary/hover.pyx @@ -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) diff --git a/efl/elementary/hoversel.pyx b/efl/elementary/hoversel.pyx index 69644b2..2a47b2f 100644 --- a/efl/elementary/hoversel.pyx +++ b/efl/elementary/hoversel.pyx @@ -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. diff --git a/efl/elementary/icon.pyx b/efl/elementary/icon.pyx index 5b00835..8eb7af5 100644 --- a/efl/elementary/icon.pyx +++ b/efl/elementary/icon.pyx @@ -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 diff --git a/efl/elementary/image.pyx b/efl/elementary/image.pyx index f70e236..115da13 100644 --- a/efl/elementary/image.pyx +++ b/efl/elementary/image.pyx @@ -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 diff --git a/efl/elementary/index.pyx b/efl/elementary/index.pyx index 093a745..5db62c4 100644 --- a/efl/elementary/index.pyx +++ b/efl/elementary/index.pyx @@ -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. diff --git a/efl/elementary/innerwindow.pyx b/efl/elementary/innerwindow.pyx index db23d5a..3a464f8 100644 --- a/efl/elementary/innerwindow.pyx +++ b/efl/elementary/innerwindow.pyx @@ -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() diff --git a/efl/elementary/label.pyx b/efl/elementary/label.pyx index 4d8c9bb..9a5c490 100644 --- a/efl/elementary/label.pyx +++ b/efl/elementary/label.pyx @@ -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 diff --git a/efl/elementary/layout.pyx b/efl/elementary/layout.pyx index d04a2ef..c4edb53 100644 --- a/efl/elementary/layout.pyx +++ b/efl/elementary/layout.pyx @@ -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) diff --git a/efl/elementary/list.pyx b/efl/elementary/list.pyx index f12d342..863471f 100644 --- a/efl/elementary/list.pyx +++ b/efl/elementary/list.pyx @@ -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() diff --git a/efl/elementary/map.pyx b/efl/elementary/map.pyx index 48fe2e1..cd0f73e 100644 --- a/efl/elementary/map.pyx +++ b/efl/elementary/map.pyx @@ -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. diff --git a/efl/elementary/mapbuf.pyx b/efl/elementary/mapbuf.pyx index f6c0bd2..fef6a06 100644 --- a/efl/elementary/mapbuf.pyx +++ b/efl/elementary/mapbuf.pyx @@ -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. diff --git a/efl/elementary/menu.pyx b/efl/elementary/menu.pyx index f17cf11..a4ac97b 100644 --- a/efl/elementary/menu.pyx +++ b/efl/elementary/menu.pyx @@ -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. diff --git a/efl/elementary/multibuttonentry.pyx b/efl/elementary/multibuttonentry.pyx index f5f0dab..9d8f326 100644 --- a/efl/elementary/multibuttonentry.pyx +++ b/efl/elementary/multibuttonentry.pyx @@ -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. diff --git a/efl/elementary/naviframe.pyx b/efl/elementary/naviframe.pyx index 1cb1f9d..70267f3 100644 --- a/efl/elementary/naviframe.pyx +++ b/efl/elementary/naviframe.pyx @@ -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) diff --git a/efl/elementary/notify.pyx b/efl/elementary/notify.pyx index e5ef62a..0605ee7 100644 --- a/efl/elementary/notify.pyx +++ b/efl/elementary/notify.pyx @@ -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. diff --git a/efl/elementary/panel.pyx b/efl/elementary/panel.pyx index 1596c2d..5e0b398 100644 --- a/efl/elementary/panel.pyx +++ b/efl/elementary/panel.pyx @@ -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. diff --git a/efl/elementary/panes.pyx b/efl/elementary/panes.pyx index 7e6b046..752b4c6 100644 --- a/efl/elementary/panes.pyx +++ b/efl/elementary/panes.pyx @@ -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. diff --git a/efl/elementary/photo.pyx b/efl/elementary/photo.pyx index 4ee7c07..c4fc554 100644 --- a/efl/elementary/photo.pyx +++ b/efl/elementary/photo.pyx @@ -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 diff --git a/efl/elementary/photocam.pyx b/efl/elementary/photocam.pyx index 316d441..65e5fb7 100644 --- a/efl/elementary/photocam.pyx +++ b/efl/elementary/photocam.pyx @@ -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 diff --git a/efl/elementary/plug.pyx b/efl/elementary/plug.pyx index ded9edd..10cdbf7 100644 --- a/efl/elementary/plug.pyx +++ b/efl/elementary/plug.pyx @@ -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 diff --git a/efl/elementary/popup.pyx b/efl/elementary/popup.pyx index e7222a5..dd2b048 100644 --- a/efl/elementary/popup.pyx +++ b/efl/elementary/popup.pyx @@ -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 diff --git a/efl/elementary/progressbar.pyx b/efl/elementary/progressbar.pyx index 14426ff..f02bc08 100644 --- a/efl/elementary/progressbar.pyx +++ b/efl/elementary/progressbar.pyx @@ -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. diff --git a/efl/elementary/radio.pyx b/efl/elementary/radio.pyx index 0b753f1..c788ac7 100644 --- a/efl/elementary/radio.pyx +++ b/efl/elementary/radio.pyx @@ -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(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) diff --git a/efl/elementary/scroller.pyx b/efl/elementary/scroller.pyx index 66aacf4..38ba60b 100644 --- a/efl/elementary/scroller.pyx +++ b/efl/elementary/scroller.pyx @@ -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): diff --git a/efl/elementary/segment_control.pyx b/efl/elementary/segment_control.pyx index 0cae483..d7455ea 100644 --- a/efl/elementary/segment_control.pyx +++ b/efl/elementary/segment_control.pyx @@ -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 diff --git a/efl/elementary/separator.pyx b/efl/elementary/separator.pyx index 1cf5964..8ec06f7 100644 --- a/efl/elementary/separator.pyx +++ b/efl/elementary/separator.pyx @@ -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 diff --git a/efl/elementary/slider.pyx b/efl/elementary/slider.pyx index daf7201..3a9fc71 100644 --- a/efl/elementary/slider.pyx +++ b/efl/elementary/slider.pyx @@ -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. diff --git a/efl/elementary/slideshow.pyx b/efl/elementary/slideshow.pyx index f27f2aa..8a1c564 100644 --- a/efl/elementary/slideshow.pyx +++ b/efl/elementary/slideshow.pyx @@ -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 diff --git a/efl/elementary/spinner.pyx b/efl/elementary/spinner.pyx index a5bb568..ee198a2 100644 --- a/efl/elementary/spinner.pyx +++ b/efl/elementary/spinner.pyx @@ -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. diff --git a/efl/elementary/table.pyx b/efl/elementary/table.pyx index c5e55f7..078a76f 100644 --- a/efl/elementary/table.pyx +++ b/efl/elementary/table.pyx @@ -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 diff --git a/efl/elementary/thumb.pyx b/efl/elementary/thumb.pyx index d8fa569..50d528d 100644 --- a/efl/elementary/thumb.pyx +++ b/efl/elementary/thumb.pyx @@ -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() diff --git a/efl/elementary/toolbar.pyx b/efl/elementary/toolbar.pyx index 78a401d..28ddad7 100644 --- a/efl/elementary/toolbar.pyx +++ b/efl/elementary/toolbar.pyx @@ -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. diff --git a/efl/elementary/video.pyx b/efl/elementary/video.pyx index 6b7d33a..414f2d0 100644 --- a/efl/elementary/video.pyx +++ b/efl/elementary/video.pyx @@ -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.""" diff --git a/efl/elementary/web.pyx b/efl/elementary/web.pyx index b1ec308..5362b0a 100644 --- a/efl/elementary/web.pyx +++ b/efl/elementary/web.pyx @@ -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): diff --git a/efl/elementary/window.pyx b/efl/elementary/window.pyx index 17aedcb..7b76495 100644 --- a/efl/elementary/window.pyx +++ b/efl/elementary/window.pyx @@ -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, 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( name if name is not None else NULL, title if title is not None else NULL)) + self._set_properties_from_keyword_args(kwargs)