*/
EAPI struct wl_surface *ecore_wl_window_surface_create(Ecore_Wl_Window *win);
+EAPI void ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha);
+EAPI Eina_Bool ecore_wl_window_alpha_get(Ecore_Wl_Window *win);
+
#ifdef __cplusplus
}
#endif
}
EAPI Eina_Bool
+ecore_wl_window_alpha_get(Ecore_Wl_Window *win)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (!win) return EINA_FALSE;
+
+ return win->alpha;
+}
+
+EAPI void
+ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (!win) return;
+ win->alpha = alpha;
+ if (win->region.opaque) wl_region_destroy(win->region.opaque);
+ win->region.opaque = NULL;
+ if ((!win->transparent) && (!win->alpha))
+ {
+ win->region.opaque =
+ wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
+ wl_region_add(win->region.opaque, win->allocation.x, win->allocation.y,
+ win->allocation.w, win->allocation.h);
+ }
+}
+
+EAPI Eina_Bool
ecore_wl_window_transparent_get(Ecore_Wl_Window *win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (ee->func.fn_hide) ee->func.fn_hide(ee);
}
-static void
+static void
_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
{
Evas_Engine_Info_Wayland_Egl *einfo;
+ Ecore_Evas_Engine_Wl_Data *wdata;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ee) return;
if ((ee->alpha == alpha)) return;
ee->alpha = alpha;
+
+ wdata = ee->engine.data;
+ if (wdata->win)
+ ecore_wl_window_alpha_set(wdata->win, alpha);
+
if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas)))
{
int fw, fh;