2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
8 This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0
9 US). To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.
14 xmlns:xi="http://www.w3.org/2001/XInclude">
16 <!-- See http://www.docbook.org/tdg/en/html/refentry.html. -->
19 <refentrytitle>waffle_native</refentrytitle>
20 <manvolnum>3</manvolnum>
24 <refname>waffle_native</refname>
25 <refname>waffle_native_display</refname>
26 <refname>waffle_native_config</refname>
27 <refname>waffle_native_context</refname>
28 <refname>waffle_native_window</refname>
29 <refpurpose>Containers for underlying native objects</refpurpose>
33 <title>Waffle Manual</title>
34 <productname>waffle</productname>
35 <xi:include href="common/author-lina.versace.xml"/>
36 <xi:include href="common/copyright.xml"/>
37 <xi:include href="common/legalnotice.xml"/>
42 <synopsis language="C">
43 #include <waffle.h>
45 union waffle_native_display {
46 struct waffle_gbm_display *gbm;
47 struct waffle_glx_display *glx;
48 struct waffle_wayland_display *wayland;
49 struct waffle_x11_egl_display *x11_egl;
52 union waffle_native_config {
53 struct waffle_gbm_config *gbm;
54 struct waffle_glx_config *glx;
55 struct waffle_wayland_config *wayland;
56 struct waffle_x11_egl_config *x11_egl;
59 union waffle_native_context {
60 struct waffle_gbm_context *gbm;
61 struct waffle_glx_context *glx;
62 struct waffle_wayland_context *wayland;
63 struct waffle_x11_egl_context *x11_egl;
66 union waffle_native_window {
67 struct waffle_gbm_window *gbm;
68 struct waffle_glx_window *glx;
69 struct waffle_wayland_window *wayland;
70 struct waffle_x11_egl_window *x11_egl;
76 <title>Description</title>
79 Each of the <function>waffle_${obj}_get_native()</function> functions returns a correspondingly named
80 <type>union waffle_native_${obj}*</type>.
81 For example, <function>waffle_window_get_native()</function> returns <type>union waffle_native_window*</type>
85 For each platform, the header <filename><waffle_${platform}.h></filename> defines the native container structs. For
86 example, <filename><waffle_glx.h></filename> defines the structs <type>waffle_glx_${obj}</type>.
90 Observerve that native container structs are not defined for all platforms that waffle supports. In
91 particular, waffle supports Android (<constant>WAFFLE_PLATFORM_ANDROID</constant>) and MacOS via CGL
92 (<constant>WAFFLE_PLATFORM_CGL</constant>), but no container structs are defined for those platforms.
93 Presently, waffle does not expose the native objects for those platforms due to implementation difficulties.
98 <xi:include href="common/issues.xml"/>
101 <title>See Also</title>
103 <citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
104 <citerefentry><refentrytitle>waffle_gbm</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
105 <citerefentry><refentrytitle>waffle_glx</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>waffle_wayland</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>waffle_x11_egl</refentrytitle><manvolnum>3</manvolnum></citerefentry>
114 vim:tw=120 et ts=2 sw=2: