Added initial support for displaying on Wayland compositors.
authorSam Spilsbury <smspillaz@gmail.com>
Tue, 16 Jul 2013 01:11:20 +0000 (18:11 -0700)
committerSam Spilsbury <smspillaz@gmail.com>
Fri, 11 Oct 2013 16:34:31 +0000 (00:34 +0800)
commit9f5d93981ee8abab0765bb85578accbb2a0baac0
tree9399387c45f3e9dd43f78301a6e0a80cc9b435fd
parent1b06bcdb9199994a7319e26e2a2d447cfdf67b57
Added initial support for displaying on Wayland compositors.

SDL and X11 builds are disabled when using the --enable-wayland
switch.

EGLNativeTypeWayland is an implementation of EGLNativeType which
connects to a running wayland compositor if possible and starts
rendering in a new surface.

WinEventsWayland polls the wayland display for new events and updates
the main surface.

The wayland client libraries are loaded dynamically and their functions
should not be used directly. Instead, IDllWaylandClient should be injected
into any objects that need to call functions in those libraries. Because
the autogenerated protocol functions are inline in the header files
and not available to be looked up, the protocol needs to be used directly.

Some of the helpers there are:

 1. wayland::protocol::CreateWaylandObject -> creates a wl_proxy casted
    to the result type with a specific wl_interface as looked up in
    the client library.
 2. wayland::protocol::CallMethodOnWaylandObject -> calls wl_proxy_marshal
    with on the proxy with the specified opcode and arguments
 3. wayland::protocol::AddListenerOnWaylandObject -> adds a wl_listener
    to the wl_proxy
 4. wayland::protocol::DestroyWaylandObject -> calls wl_proxy_destroy
    on the proxy.

There may be some cases where additional constructor or destructor functions
might need to be called before or after CreateWaylandObject and
DestroyWaylandObject. Developers should consult the autogenerated
wayland-*-protocol.h headers to determine the expected call order.

XBMCSurface and XBMCConnection wrap most of the wayland connection
and surface creation / destruction and provide outputs for getting
the current resolution and EGL surface.

There is currently no support for keyboard input, mouse input or
multiple monitors.
42 files changed:
.gitignore
configure.in
xbmc/DllPaths_generated.h.in
xbmc/windowing/DllWaylandClient.h [new file with mode: 0644]
xbmc/windowing/DllWaylandEgl.h [new file with mode: 0644]
xbmc/windowing/DllXKBCommon.h [new file with mode: 0644]
xbmc/windowing/Makefile [deleted file]
xbmc/windowing/Makefile.in [new file with mode: 0644]
xbmc/windowing/WaylandProtocol.h [new file with mode: 0644]
xbmc/windowing/WinEvents.cpp
xbmc/windowing/WinEvents.h
xbmc/windowing/WinEventsWayland.cpp [new file with mode: 0644]
xbmc/windowing/WinEventsWayland.h [new file with mode: 0644]
xbmc/windowing/egl/EGLNativeTypeWayland.cpp [new file with mode: 0644]
xbmc/windowing/egl/EGLNativeTypeWayland.h [new file with mode: 0644]
xbmc/windowing/egl/EGLWrapper.cpp
xbmc/windowing/egl/Makefile [deleted file]
xbmc/windowing/egl/Makefile.in [new file with mode: 0644]
xbmc/windowing/egl/wayland/Callback.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Callback.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/Compositor.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Compositor.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/Display.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Display.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/OpenGLSurface.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/OpenGLSurface.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/Region.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Region.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/Registry.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Registry.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/Shell.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Shell.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/ShellSurface.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/ShellSurface.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/Surface.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/Surface.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/WaylandLibraries.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/WaylandLibraries.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/XBMCConnection.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/XBMCConnection.h [new file with mode: 0644]
xbmc/windowing/egl/wayland/XBMCSurface.cpp [new file with mode: 0644]
xbmc/windowing/egl/wayland/XBMCSurface.h [new file with mode: 0644]