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_window</refentrytitle>
20 <manvolnum>3</manvolnum>
24 <refname>waffle_window</refname>
25 <refname>waffle_window_create</refname>
26 <refname>waffle_window_destroy</refname>
27 <refname>waffle_window_show</refname>
28 <refname>waffle_window_swap_buffers</refname>
29 <refname>waffle_window_get_native</refname>
30 <refpurpose>class <classname>waffle_window</classname></refpurpose>
34 <title>Waffle Manual</title>
35 <productname>waffle</productname>
36 <xi:include href="common/author-chad.versace.xml"/>
37 <xi:include href="common/copyright.xml"/>
38 <xi:include href="common/legalnotice.xml"/>
43 <funcsynopsis language="C">
46 #include <waffle.h>
52 <funcdef>struct waffle_window* <function>waffle_window_create</function></funcdef>
53 <paramdef>struct waffle_window *<parameter>config</parameter></paramdef>
54 <paramdef>int32_t <parameter>width</parameter></paramdef>
55 <paramdef>int32_t <parameter>height</parameter></paramdef>
59 <funcdef>struct waffle_window* <function>waffle_window_create2</function></funcdef>
60 <paramdef>struct waffle_window *<parameter>config</parameter></paramdef>
61 <paramdef>const intptr_t <parameter>attrib_list</parameter>[]</paramdef>
65 <funcdef>bool <function>waffle_window_destroy</function></funcdef>
66 <paramdef>struct waffle_window *<parameter>self</parameter></paramdef>
70 <funcdef>bool <function>waffle_window_show</function></funcdef>
71 <paramdef>struct waffle_window *<parameter>self</parameter></paramdef>
75 <funcdef>bool <function>waffle_window_swap_buffers</function></funcdef>
76 <paramdef>struct waffle_window *<parameter>self</parameter></paramdef>
80 <funcdef>union waffle_native_window* <function>waffle_window_get_native</function></funcdef>
81 <paramdef>struct waffle_window *<parameter>self</parameter></paramdef>
88 <title>Description</title>
93 <term><type>struct waffle_window</type></term><listitem><para>
100 <term><function>waffle_window_create()</function></term>
103 Create a window with the properties specified by <parameter>config</parameter>.
106 If the platform allows, the window is not displayed onto the screen after creation. To display the window,
107 call <function>waffle_window_show()</function>.
113 <term><function>waffle_window_create2()</function></term>
116 Feature test macro: <code>WAFFLE_API_VERSION >= 0x0106</code>.
117 (See <citerefentry><refentrytitle>waffle_feature_test_macros</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
120 Create a window with the properties specified by
121 <parameter>config</parameter> and
122 <parameter>attrib_list</parameter>.
124 <parameter>attrib_list</parameter> must specify the window size
125 either with the attributes
126 <constant>WAFFLE_WINDOW_WIDTH</constant> and
127 <constant>WAFFLE_WINDOW_HEIGHT</constant> having positive values
128 <= <constant>INT32_MAX</constant>,
129 or with the attribute
130 <constant>WAFFLE_WINDOW_FULLSCREEN</constant> equal to true(1).
136 <term><function>waffle_window_destroy()</function></term>
139 Destroy the window and release its memory.
145 <term><function>waffle_window_show()</function></term>
148 Show the window on the display. If the window is already shown, or if the native platform does not support
149 showing windows (such as GBM), then do nothing and returns true.
155 <term><function>waffle_window_swap_buffers()</function></term>
158 If the window is double-buffered, then implicitly call <function>glFlush()</function> and post the contents
159 of the back buffer to the front buffer. If the window is front-buffered, then do nothing. For
160 platform-specific details of swap semantics, see the specification for the relevant native platform:
161 the <ulink url="http://www.opengl.org/registry/doc/glx1.4.pdf">GLX 1.4 Specification</ulink>,
162 the <ulink url="http://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf">EGL 1.4 Specification</ulink>,
163 or the <ulink url="https://developer.apple.com/library/mac/#documentation/graphicsimaging/reference/CGL_OpenGL/Reference/reference.html">CGL Reference</ulink>.
169 <term><function>waffle_window_get_native()</function></term>
172 Get the window's underlying native objects. Use
173 <citerefentry><refentrytitle><function>free</function></refentrytitle><manvolnum>3</manvolnum></citerefentry> to deallocate the
175 See <citerefentry><refentrytitle><function>waffle_native</function></refentrytitle><manvolnum>3</manvolnum></citerefentry>
176 for the definition of <type>union waffle_native_window</type>.
185 <title>Return Value</title>
186 <xi:include href="common/return-value.xml"/>
190 <title>Errors</title>
192 <xi:include href="common/error-codes.xml"/>
195 No errors are specific to the <type>waffle_window</type> functions.
199 <xi:include href="common/issues.xml"/>
202 <title>See Also</title>
204 <citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>
211 vim:tw=120 et ts=2 sw=2: