Commit 6eafc08b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

window: define Wayland surface type

The convention used here matches with the Qt Wayland native platform,
and seems most generic. Note that Wayland does not allow "sharing"
surface handles between multiple display connections in general, and
multiple processes in particular.
parent 38dab127
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
typedef struct vout_window_t vout_window_t; typedef struct vout_window_t vout_window_t;
typedef struct vout_window_sys_t vout_window_sys_t; typedef struct vout_window_sys_t vout_window_sys_t;
struct wl_display;
struct wl_surface;
/** /**
* Window handle type * Window handle type
...@@ -46,6 +48,7 @@ enum { ...@@ -46,6 +48,7 @@ enum {
VOUT_WINDOW_TYPE_HWND, VOUT_WINDOW_TYPE_HWND,
VOUT_WINDOW_TYPE_NSOBJECT, VOUT_WINDOW_TYPE_NSOBJECT,
VOUT_WINDOW_TYPE_ANDROID_NATIVE, VOUT_WINDOW_TYPE_ANDROID_NATIVE,
VOUT_WINDOW_TYPE_WAYLAND,
}; };
/** /**
...@@ -92,11 +95,13 @@ struct vout_window_t { ...@@ -92,11 +95,13 @@ struct vout_window_t {
uint32_t xid; /* X11 windows ID */ uint32_t xid; /* X11 windows ID */
void *nsobject; /* Mac OSX view object */ void *nsobject; /* Mac OSX view object */
void *anativewindow; /* Android native window. */ void *anativewindow; /* Android native window. */
struct wl_surface *wl; /* Wayland surface */
} handle; } handle;
/* display server (mandatory) */ /* display server (mandatory) */
union { union {
char *x11; /* X11 display (NULL = use default) */ char *x11; /* X11 display (NULL = use default) */
struct wl_display *wl; /* Wayland struct wl_display pointer */
} display; } display;
/* Control on the module (mandatory) /* Control on the module (mandatory)
......
...@@ -86,6 +86,11 @@ vout_window_t *vout_window_New(vlc_object_t *obj, ...@@ -86,6 +86,11 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
type = "vout window anative"; type = "vout window anative";
window->handle.anativewindow = NULL; window->handle.anativewindow = NULL;
break; break;
case VOUT_WINDOW_TYPE_WAYLAND:
type = "vout surface wl";
window->handle.wl = NULL;
window->display.wl = NULL;
break;
default: default:
assert(0); assert(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment