EAPI Eina_Inlist *ecore_wl_outputs_get(void);
+EAPI Ecore_Wl_Output * ecore_wl_window_output_find(Ecore_Wl_Window *window);
+EAPI int ecore_wl_output_transform_get(Ecore_Wl_Output *output);
+
/**
* @internal
* @ingroup Ecore_Wl_Input_Group
EAPI Eina_Bool ecore_wl_window_fullscreen_get(Ecore_Wl_Window *win);
EAPI void ecore_wl_window_transparent_set(Ecore_Wl_Window *win, Eina_Bool transparent);
EAPI Eina_Bool ecore_wl_window_transparent_get(Ecore_Wl_Window *win);
+EAPI void ecore_wl_window_buffer_transform_set(Ecore_Wl_Window *win, int buffer_transform);
EAPI void ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h);
EAPI void ecore_wl_window_update_location(Ecore_Wl_Window *win, int x, int y);
EAPI struct wl_surface *ecore_wl_window_surface_get(Ecore_Wl_Window *win);
if (h) *h = oh;
}
+EAPI Ecore_Wl_Output *
+ecore_wl_window_output_find(Ecore_Wl_Window *window)
+{
+ Ecore_Wl_Output *out;
+ Eina_Inlist *tmp;
+ int x = 0, y = 0;
+
+ ecore_wl_window_geometry_get(window, &x, &y, NULL, NULL);
+
+ EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->outputs, tmp, out)
+ {
+ int ox, oy, ow, oh;
+
+ ox = out->allocation.x;
+ oy = out->allocation.y;
+
+ switch (out->transform)
+ {
+ case WL_OUTPUT_TRANSFORM_90:
+ case WL_OUTPUT_TRANSFORM_270:
+ case WL_OUTPUT_TRANSFORM_FLIPPED_90:
+ case WL_OUTPUT_TRANSFORM_FLIPPED_270:
+ /* Swap width and height */
+ ow = out->allocation.h;
+ oh = out->allocation.w;
+ break;
+ default:
+ ow = out->allocation.w;
+ oh = out->allocation.h;
+ break;
+ }
+
+ if ((x >= ox && x < ow) && (y >= oy && y < oh))
+ return out;
+ }
+
+ return NULL;
+}
+
+
/* @since 1.2 */
EAPI void
ecore_wl_pointer_xy_get(int *x, int *y)
eina_inlist_remove(_ecore_wl_disp->outputs, EINA_INLIST_GET(output));
free(output);
}
+
+EAPI int
+ecore_wl_output_transform_get(Ecore_Wl_Output *output)
+{
+ if (!output) return 0;
+
+ return output->transform;
+}
}
EAPI void
+ecore_wl_window_buffer_transform_set(Ecore_Wl_Window *win, int buffer_transform)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (!win) return;
+
+ wl_surface_set_buffer_transform(win->surface, buffer_transform);
+}
+
+EAPI void
ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);