From: 이상진 <lsj119@samsung.com>
author이상진 <lsj119@samsung.com>
Fri, 12 Feb 2010 05:31:26 +0000 (05:31 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Fri, 12 Feb 2010 05:31:26 +0000 (05:31 +0000)
I am attaching another patches for transparent window.

1. Use RGB Visual.
2. Set destination_alpha in ecore_evas for alpha composite in evas.
3. add Function
   - Ecore_Evas_Engine_Func->fn_transparent_set
   - ecore_evas_transparent_set , ecore_evas_transparent_get
   - elm_win_transparent_set, elm_win_transparent_get

SVN revision: 46106

src/lib/Elementary.h.in
src/lib/elm_win.c

index 1897d3694c1c69f0aae5e52d13ee225e75c1de39..1a17d5a7d10814e23fe834ad003c187b9b7163e6 100644 (file)
@@ -257,6 +257,8 @@ extern "C" {
    EAPI void         elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped);
    EAPI Eina_Bool    elm_win_shaped_get(Evas_Object *obj);
    EAPI void         elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha);
+   EAPI Eina_Bool    elm_win_transparent_get(Evas_Object *obj);
+   EAPI void         elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent);
    EAPI Eina_Bool    elm_win_alpha_get(Evas_Object *obj);
    EAPI void         elm_win_override_set(Evas_Object *obj, Eina_Bool override);
    EAPI Eina_Bool    elm_win_override_get(Evas_Object *obj);
index f90ab534c66e3a719a2b0a7187074d4e6a6b2a15..3a6ac19e3fe15a8baff712ac57dda76a513ddeac 100644 (file)
@@ -634,6 +634,34 @@ elm_win_alpha_get(Evas_Object *obj)
    return ecore_evas_alpha_get(win->ee);
 }
 
+EAPI void
+elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent)
+{
+   Elm_Win *win;
+   if (strcmp(elm_widget_type_get(obj), "win")) return;
+   win = elm_widget_data_get(obj);
+   if (!win) return;
+   
+   if (win->xwin)
+     {
+       ecore_evas_transparent_set(win->ee, transparent);         
+       _elm_win_xwin_update(win);
+     }
+   else
+     ecore_evas_transparent_set(win->ee, transparent);
+}
+
+EAPI Eina_Bool
+elm_win_transparent_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;
+
+   return ecore_evas_transparent_get(win->ee);
+}
+
 EAPI void
 elm_win_override_set(Evas_Object *obj, Eina_Bool override)
 {