summaryrefslogtreecommitdiff
path: root/man/waffle_enum.3.xml
blob: 07edd6c0a0588d494ddfefaa68bd3851267f246a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<!--
  Copyright Intel 2012

  This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0
  US). To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.
-->

<refentry
    id="waffle_enum"
    xmlns:xi="http://www.w3.org/2001/XInclude">

  <!-- See http://www.docbook.org/tdg/en/html/refentry.html. -->

  <refmeta>
    <refentrytitle>waffle_enum</refentrytitle>
    <manvolnum>3</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>waffle_enum</refname>
    <refname>waffle_enum_to_string</refname>
    <refpurpose>Listing of non-error enums and associated utility functions</refpurpose>
  </refnamediv>

  <refentryinfo>
    <title>Waffle Manual</title>
    <productname>waffle</productname>
    <xi:include href="common/author-chad.versace.xml"/>
    <xi:include href="common/copyright.xml"/>
    <xi:include href="common/legalnotice.xml"/>
  </refentryinfo>

  <refsynopsisdiv>

    <funcsynopsis language="C">

      <funcsynopsisinfo>
#include &lt;waffle.h&gt;

enum waffle_enum {...};
      </funcsynopsisinfo>

      <funcprototype>
        <funcdef>const char* <function>waffle_enum_to_string</function></funcdef>
        <paramdef>int32_t <parameter>e</parameter></paramdef>
      </funcprototype>

    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <variablelist>

      <varlistentry>
        <term><function>waffle_enum_to_string()</function></term>
        <listitem>
          <para>
            Convert an <type>waffle_enum</type> token to a string.
            For example, convert <constant>WAFFLE_DONT_CARE</constant> to <code>"WAFFLE_DONT_CARE"</code>.
            Return null if the token is not a valid <type>waffle_enum</type>.
          </para>
          <para>
            This function always sets the error code to <constant>WAFFLE_NO_ERROR</constant>.
            It can be called before waffle has been successfully initialized with
            <citerefentry><refentrytitle><function>waffle_init</function></refentrytitle><manvolnum>3</manvolnum></citerefentry>
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><type>enum waffle_enum</type></term>
        <listitem>
          <para>
            For reference, below is the complete list of waffle's non-error enums.

            <programlisting>
<![CDATA[
enum waffle_enum {
    // ------------------------------------------------------------------
    // Generic
    // ------------------------------------------------------------------

    WAFFLE_DONT_CARE                                            = -1,
    WAFFLE_NONE                                                 =  0,

    // ------------------------------------------------------------------
    // For waffle_init()
    // ------------------------------------------------------------------

    WAFFLE_PLATFORM                                             = 0x0010,
        WAFFLE_PLATFORM_ANDROID                                 = 0x0011,
        WAFFLE_PLATFORM_CGL                                     = 0x0012,
        WAFFLE_PLATFORM_GLX                                     = 0x0013,
        WAFFLE_PLATFORM_WAYLAND                                 = 0x0014,
        WAFFLE_PLATFORM_X11_EGL                                 = 0x0015,
        WAFFLE_PLATFORM_GBM                                     = 0x0016,
        WAFFLE_PLATFORM_WGL                                     = 0x0017,
        WAFFLE_PLATFORM_NACL                                    = 0x0018,

    // ------------------------------------------------------------------
    // For waffle_config_choose()
    // ------------------------------------------------------------------

    WAFFLE_CONTEXT_API                                          = 0x020a,
        WAFFLE_CONTEXT_OPENGL                                   = 0x020b,
        WAFFLE_CONTEXT_OPENGL_ES1                               = 0x020c,
        WAFFLE_CONTEXT_OPENGL_ES2                               = 0x020d,
        WAFFLE_CONTEXT_OPENGL_ES3                               = 0x0214,

    WAFFLE_CONTEXT_MAJOR_VERSION                                = 0x020e,
    WAFFLE_CONTEXT_MINOR_VERSION                                = 0x020f,

    WAFFLE_CONTEXT_PROFILE                                      = 0x0210,
        WAFFLE_CONTEXT_CORE_PROFILE                             = 0x0211,
        WAFFLE_CONTEXT_COMPATIBILITY_PROFILE                    = 0x0212,

    WAFFLE_RED_SIZE                                             = 0x0201,
    WAFFLE_GREEN_SIZE                                           = 0x0202,
    WAFFLE_BLUE_SIZE                                            = 0x0203,
    WAFFLE_ALPHA_SIZE                                           = 0x0204,

    WAFFLE_DEPTH_SIZE                                           = 0x0205,
    WAFFLE_STENCIL_SIZE                                         = 0x0206,

    WAFFLE_SAMPLE_BUFFERS                                       = 0x0207,
    WAFFLE_SAMPLES                                              = 0x0208,

    WAFFLE_DOUBLE_BUFFERED                                      = 0x0209,

    WAFFLE_ACCUM_BUFFER                                         = 0x0213,

    // ------------------------------------------------------------------
    // For waffle_dl_sym()
    // ------------------------------------------------------------------

    WAFFLE_DL_OPENGL                                            = 0x0301,
    WAFFLE_DL_OPENGL_ES1                                        = 0x0302,
    WAFFLE_DL_OPENGL_ES2                                        = 0x0303,
};
]]>
            </programlisting>
          </para>
        </listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

  <xi:include href="common/issues.xml"/>

  <refsect1>
    <title>See Also</title>
    <para>
      <citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>
    </para>
  </refsect1>

</refentry>

<!--
vim:tw=120 et ts=2 sw=2:
-->