diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-06-03 16:54:34 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-06-05 13:50:20 -0700 |
commit | e3fdf634232f236a7ac454b219e7994f9490c6dd (patch) | |
tree | 62e142491eccdf8d7adb3555f76c61b023f419e8 | |
parent | deba8e55cc12cecf67f1d60421dcbed775a3b7a1 (diff) |
include: Add headers <waffle/native/*.h>
Add the following headers:
waffle_glx.h
waffle_wayland.h
waffle_x11_egl.h
Each header defines the types returned by waffle_$x_get_native for the
respective platform. The types defined are:
struct waffle_$x_config
struct waffle_$x_context
struct waffle_$x_display
struct waffle_$x_window
This patch intentionally neglects waffle_cgl.h because I haven't yet
decided how to define the waffle_cgl types.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r-- | include/waffle/native/waffle_glx.h | 58 | ||||
-rw-r--r-- | include/waffle/native/waffle_wayland.h | 73 | ||||
-rw-r--r-- | include/waffle/native/waffle_x11_egl.h | 61 |
3 files changed, 192 insertions, 0 deletions
diff --git a/include/waffle/native/waffle_glx.h b/include/waffle/native/waffle_glx.h new file mode 100644 index 0000000..2f578fb --- /dev/null +++ b/include/waffle/native/waffle_glx.h @@ -0,0 +1,58 @@ +// Copyright 2012 Intel Corporation +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#pragma once + +#include <stdbool.h> +#include <stdint.h> + +#include <X11/Xlib.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct waffle_glx_display { + Display *xlib_display; +}; + +struct waffle_glx_config { + Display *xlib_display; + GLXFBConfig glx_fbconfig; +}; + +struct waffle_glx_context { + Display *xlib_display; + GLXContext glx_context; +}; + +struct waffle_glx_window { + Display *xlib_display; + XID xlib_window; +}; + +#ifdef __cplusplus +} // end extern "C" +#endif diff --git a/include/waffle/native/waffle_wayland.h b/include/waffle/native/waffle_wayland.h new file mode 100644 index 0000000..1a2ec43 --- /dev/null +++ b/include/waffle/native/waffle_wayland.h @@ -0,0 +1,73 @@ +// Copyright 2012 Intel Corporation +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#pragma once + +#define WL_EGL_PLATFORM 1 + +#include <stdbool.h> +#include <stdint.h> + +#include <EGL/egl.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct wl_compositor; +struct wl_display; +struct wl_egl_window; +struct wl_shell; +struct wl_shell_surface; +struct wl_surface; + +struct waffle_wayland_display { + struct wl_display *wl_display; + struct wl_compositor *wl_compositor; + struct wl_shell *wl_shell; + EGLDisplay egl_display; +}; + +struct waffle_wayland_config { + struct waffle_wayland_display display; + EGLConfig egl_config; +}; + +struct waffle_wayland_context { + struct waffle_wayland_display display; + EGLContext egl_context; +}; + +struct waffle_wayland_window { + struct waffle_wayland_display display; + struct wl_surface *wl_surface; + struct wl_shell_surface *wl_shell_surface; + struct wl_egl_window *wl_window; + EGLSurface egl_surface; +}; + +#ifdef __cplusplus +} // end extern "C" +#endif diff --git a/include/waffle/native/waffle_x11_egl.h b/include/waffle/native/waffle_x11_egl.h new file mode 100644 index 0000000..50b2112 --- /dev/null +++ b/include/waffle/native/waffle_x11_egl.h @@ -0,0 +1,61 @@ +// Copyright 2012 Intel Corporation +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#pragma once + +#include <stdbool.h> +#include <stdint.h> + +#include <EGL/egl.h> +#include <X11/Xlib.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct waffle_x11_egl_display { + Display *xlib_display; + EGLDisplay egl_display; +}; + +struct waffle_x11_egl_config { + struct waffle_x11_egl_display display; + EGLConfig egl_config; +}; + +struct waffle_x11_egl_context { + struct waffle_x11_egl_display display; + EGLContext egl_context; +}; + +struct waffle_x11_egl_window { + struct waffle_x11_egl_display display; + XID xlib_window; + EGLSurface egl_surface; +}; + +#ifdef __cplusplus +} // end extern "C" +#endif |