From e7faff6a9828933709a03ce1ece212590812bf2f Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Sun, 24 Jan 2010 10:12:57 +0000 Subject: [PATCH] Add elm_win function(s) for get/set of quickpanel. SVN revision: 45510 --- src/lib/Elementary.h.in | 2 ++ src/lib/elm_conform.c | 1 + src/lib/elm_win.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 0ad8627..efb9aa2 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -276,6 +276,8 @@ extern "C" { EAPI Eina_Bool elm_win_sticky_get(Evas_Object *obj); EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant); EAPI Eina_Bool elm_win_conformant_get(Evas_Object *obj); + EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel); + EAPI Eina_Bool elm_win_quickpanel_get(Evas_Object *obj); /*... * ecore_x_icccm_hints_set -> accepts_focus (add to ecore_evas) diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c index 83ed9ca..8b53581 100644 --- a/src/lib/elm_conform.c +++ b/src/lib/elm_conform.c @@ -39,6 +39,7 @@ _sizing_eval(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); Evas_Coord mw = -1, mh = -1; + edje_object_size_min_calc(wd->base, &mw, &mh); evas_object_size_hint_min_set(obj, mw, mh); evas_object_size_hint_max_set(obj, -1, -1); diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 1bafe32..0ff12c9 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -867,6 +867,35 @@ elm_win_conformant_get(Evas_Object *obj) return EINA_FALSE; } +EAPI void +elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel) +{ + Elm_Win *win; + if (strcmp(elm_widget_type_get(obj), "win")) return; + win = elm_widget_data_get(obj); + if (!win) return; + _elm_win_xwindow_get(win); +#ifdef HAVE_ELEMENTARY_X + if (win->xwin) + ecore_x_e_illume_quickpanel_set(win->xwin, quickpanel); +#endif +} + +EAPI Eina_Bool +elm_win_quickpanel_get(Evas_Object *obj) +{ + Elm_Win *win; + if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE; + win = elm_widget_data_get(obj); + if (!win) return EINA_FALSE; + _elm_win_xwindow_get(win); +#ifdef HAVE_ELEMENTARY_X + if (win->xwin) + return ecore_x_e_illume_quickpanel_get(win->xwin); +#endif + return EINA_FALSE; +} + typedef struct _Widget_Data Widget_Data; struct _Widget_Data -- 2.7.4