int event_fd;
struct wl_surface *surf;
struct wl_egl_window *wl_egl_window;
+ int rotation;
tbm_surface_queue_h tbm_queue;
twe_wl_disp_source *disp_source;
};
}
static void
+__cb_client_window_rotate_callback(struct wl_egl_window *wl_egl_window,
+ void *private)
+{
+ TPL_ASSERT(private);
+ TPL_ASSERT(wl_egl_window);
+
+ int rotation = wl_egl_window->rotation;
+ twe_wl_surf_source *source = (twe_wl_surf_source *)private;
+
+ TPL_LOG_T("WL_EGL", "[ROTATE_CB] wl_egl_window(%p) (%d) -> (%d)",
+ wl_egl_window, source->rotation, rotation);
+
+ source->rotation = rotation;
+}
+
+static void
__cb_tbm_surface_queue_reset_callback(tbm_surface_queue_h tbm_queue,
void *data)
{
source->wl_egl_window = wl_egl_window;
source->tbm_queue = tbm_queue;
source->disp_source = (twe_wl_disp_source *)twe_display;
+ source->rotation = 0;
wl_egl_window->private = (void *)source;
wl_egl_window->resize_callback = (void *)__cb_client_window_resize_callback;
+ wl_egl_window->rotate_callback = (void *)__cb_client_window_rotate_callback;
g_source_set_callback(&source->gsource, NULL, surface, NULL);
g_source_attach(&source->gsource, g_main_loop_get_context(ctx->twe_loop));