From: Enlightenment S. <no-...@en...> - 2012-05-21 08:23:44
|
Log: py-elm: Align InnerWindow to C api. (patch by Kai Huuhko) Author: billiob Date: 2012-05-21 01:23:35 -0700 (Mon, 21 May 2012) New Revision: 71271 Trac: http://trac.enlightenment.org/e/changeset/71271 Modified: trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_innerwindow.pxi trunk/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd Modified: trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_innerwindow.pxi =================================================================== --- trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_innerwindow.pxi 2012-05-21 08:01:28 UTC (rev 71270) +++ trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_innerwindow.pxi 2012-05-21 08:23:35 UTC (rev 71271) @@ -17,20 +17,31 @@ # cdef class InnerWindow(Window): + + """An inwin is a window inside a window that is useful for a quick popup. + + There are three styles available in the default theme. These are: + + default: The inwin is sized to take over most of the window it's placed in. + minimal: The size of the inwin will be the minimum necessary to show its + contents. + minimal_vertical: Horizontally, the inwin takes as much space as possible, + vertically only as much as it needs to fit its contents. """ - An inner window - """ + def __init__(self, c_evas.Object parent): Object.__init__(self, parent.evas) self._set_obj(elm_win_inwin_add(parent.obj)) def activate(self): - """ - Activate the window - """ + """Activates an inwin object, ensuring its visibility""" elm_win_inwin_activate(self.obj) def content_set(self, c_evas.Object content): + """Set the content of an inwin object. + + @parm: B{content:} The object to set as content + """ cdef c_evas.Evas_Object *o if content is not None: o = content.obj @@ -38,5 +49,28 @@ o = NULL elm_win_inwin_content_set(self.obj, o) + def content_get(self): + """Get the content of an inwin object. + @return: The content that was being used + """ + cdef c_evas.Evas_Object *o + o = elm_win_inwin_content_get(self.obj) + return <Object>o + + property content: + def __get__(self): + return self.content_get() + def __set__(self, content): + self.content_set(content) + + def content_unset(self): + """Unset the content of an inwin object. + + @return: The content that was being used + """ + cdef c_evas.Evas_Object *o + o = elm_win_inwin_content_unset(self.obj) + return <Object>o + _elm_widget_type_register("inwin", InnerWindow) Modified: trunk/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd =================================================================== --- trunk/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd 2012-05-21 08:01:28 UTC (rev 71270) +++ trunk/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd 2012-05-21 08:23:35 UTC (rev 71271) @@ -498,8 +498,10 @@ # Inwin object evas.c_evas.Evas_Object *elm_win_inwin_add(evas.c_evas.Evas_Object *obj) - void elm_win_inwin_activate(evas.c_evas.Evas_Object *obj) - void elm_win_inwin_content_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Evas_Object *content) + void elm_win_inwin_activate(evas.c_evas.Evas_Object *obj) + void elm_win_inwin_content_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Evas_Object *content) + evas.c_evas.Evas_Object *elm_win_inwin_content_get(evas.c_evas.Evas_Object *obj) + evas.c_evas.Evas_Object *elm_win_inwin_content_unset(evas.c_evas.Evas_Object *obj) # Background object (api:DONE cb:TODO test:DONE doc:TODO)) evas.c_evas.Evas_Object *elm_bg_add(evas.c_evas.Evas_Object *parent) |