EAPI void
ecore_wl_window_rotation_available_rotations_set(Ecore_Wl_Window *win, const int *rots, unsigned int count)
{
- uint32_t angles;
+ uint32_t angles = 0;
int i = 0;
if (!win) return;
_ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Evas *ee;
- Ecore_Evas_Engine_Wl_Data *wdata;
Ecore_Wl_Event_Window_Rotate *ev;
int resize;
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
- wdata = ee->engine.data;
- if (!wdata) return ECORE_CALLBACK_PASS_ON;
-
- //Fixme resize
+ //FIXME: resize
resize = 0;
- _ecore_evas_wl_common_rotation_set(ee, ev->angle, resize);
+
+ if (!strcmp(ee->driver, "wayland_shm"))
+ {
+#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
+ _ecore_evas_wayland_shm_window_rotate(ee, ev->angle, resize);
+#endif
+ }
+ else if (!strcmp(ee->driver, "wayland_egl"))
+ {
+#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
+ _ecore_evas_wayland_egl_window_rotate(ee, ev->angle, resize);
+#endif
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
}
static void
einfo->info.edges = edge;
}
+void
+_ecore_evas_wayland_egl_window_rotate(Ecore_Evas *ee, int rotation, int resize)
+{
+ if (!ee) return;
+ _ecore_evas_wl_rotation_set(ee, rotation, resize);
+ if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
+}
+
#endif
void _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent);
void _ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int transparent);
void _ecore_evas_wayland_shm_buffer_released(void *data);
+void _ecore_evas_wayland_shm_window_rotate(Ecore_Evas *ee, int rotation, int resize);
#endif
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
void _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location);
void _ecore_evas_wayland_egl_resize_edge_set(Ecore_Evas *ee, int edge);
+void _ecore_evas_wayland_egl_window_rotate(Ecore_Evas *ee, int rotation, int resize);
#endif
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */
_ecore_evas_wl_common_render(ee);
}
+void
+_ecore_evas_wayland_shm_window_rotate(Ecore_Evas *ee, int rotation, int resize)
+{
+ if (!ee) return;
+ _ecore_evas_wl_rotation_set(ee, rotation, resize);
+ if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
+}
+
#endif