summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-03 14:51:08 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-03 14:51:08 +0100
commit64c1d33c9f69ec43e342337cb06920b83781cb86 (patch)
treedf83139281bbdeda2f57c263421ca2bd06be7a29 /efl
parent1746a0acdd08be89eceb822f99789db73e0cd0b3 (diff)
Added new convenience class: DialogWindow
With a new test for both StandardWindow and DialogWindow
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/window.pxd1
-rw-r--r--efl/elementary/window.pyx30
2 files changed, 31 insertions, 0 deletions
diff --git a/efl/elementary/window.pxd b/efl/elementary/window.pxd
index 11dc863..0ae4406 100644
--- a/efl/elementary/window.pxd
+++ b/efl/elementary/window.pxd
@@ -13,6 +13,7 @@ cdef extern from "Ecore_X.h":
13cdef extern from "Elementary.h": 13cdef extern from "Elementary.h":
14 Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type) 14 Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
15 Evas_Object *elm_win_util_standard_add(const char *name, const char *title) 15 Evas_Object *elm_win_util_standard_add(const char *name, const char *title)
16 Evas_Object *elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title)
16 void elm_win_resize_object_add(Evas_Object *obj, Evas_Object* subobj) 17 void elm_win_resize_object_add(Evas_Object *obj, Evas_Object* subobj)
17 void elm_win_resize_object_del(Evas_Object *obj, Evas_Object* subobj) 18 void elm_win_resize_object_del(Evas_Object *obj, Evas_Object* subobj)
18 void elm_win_title_set(Evas_Object *obj, const char *title) 19 void elm_win_title_set(Evas_Object *obj, const char *title)
diff --git a/efl/elementary/window.pyx b/efl/elementary/window.pyx
index 71ae407..7603e14 100644
--- a/efl/elementary/window.pyx
+++ b/efl/elementary/window.pyx
@@ -1889,3 +1889,33 @@ cdef class StandardWindow(Window):
1889 <const char *>name if name is not None else NULL, 1889 <const char *>name if name is not None else NULL,
1890 <const char *>title if title is not None else NULL)) 1890 <const char *>title if title is not None else NULL))
1891 self._set_properties_from_keyword_args(kwargs) 1891 self._set_properties_from_keyword_args(kwargs)
1892
1893
1894cdef class DialogWindow(Window):
1895
1896 """A :py:class:`Window` with standard dialog setup.
1897
1898 This creates a window like :py:class:`Window` but also puts in a standard
1899 :py:class:`Background <efl.elementary.background.Background>`, as well as
1900 setting the window title to ``title``. The window type created is of type
1901 ELM_WIN_DIALOG_BASIC. This tipe of window will be handled in special
1902 mode by window managers with regards of it's parent window.
1903
1904 :param parent: The parent window (mandatory)
1905 :type parent: :py:class:`efl.evas.Object`
1906 :param name: A name for the new window.
1907 :type name: string
1908 :param title: A title for the new window.
1909 :type title: string
1910
1911 .. versionadded :: 1.13
1912
1913 """
1914
1915 def __init__(self, evasObject parent not None, name, title, *args, **kwargs):
1916 if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
1917 if isinstance(title, unicode): title = PyUnicode_AsUTF8String(title)
1918 self._set_obj(elm_win_util_dialog_add(parent.obj,
1919 <const char *>name if name is not None else NULL,
1920 <const char *>title if title is not None else NULL))
1921 self._set_properties_from_keyword_args(kwargs)