}
tpl_result_t
+twe_check_native_handle_is_wl_display(tpl_handle_t display)
+{
+ struct wl_interface *wl_egl_native_dpy = *(void **) display;
+
+ if (!wl_egl_native_dpy) {
+ TPL_ERR("Invalid parameter. native_display(%p)", wl_egl_native_dpy);
+ return TPL_FALSE;
+ }
+
+ /* MAGIC CHECK: A native display handle is a wl_display if the de-referenced first value
+ is a memory address pointing the structure of wl_display_interface. */
+ if (wl_egl_native_dpy == &wl_display_interface)
+ return TPL_TRUE;
+
+ if (strncmp(wl_egl_native_dpy->name, wl_display_interface.name,
+ strlen(wl_display_interface.name)) == 0) {
+ return TPL_TRUE;
+ }
+
+ return TPL_FALSE;
+}
+
+tpl_result_t
twe_get_native_window_info(tpl_handle_t window, int *width, int *height)
{
struct wl_egl_window *wl_egl_window = (struct wl_egl_window *)window;
int num_rects, const int *rects);
tpl_result_t
+twe_check_native_handle_is_wl_display(tpl_handle_t display);
+
+tpl_result_t
twe_get_native_window_info(tpl_handle_t window, int *width, int *height);
tbm_surface_h