glx: remove dl_can_open() logic from supports_api()
[mesa-waffle.git] / man / waffle_dl.3.xml
blobffcfad4c1ce6aae6d4d4741dfc1ddc7459b3413a
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 <!--
6   Copyright Intel 2012
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.
10 -->
12 <refentry
13     id="waffle_dl"
14     xmlns:xi="http://www.w3.org/2001/XInclude">
16   <!-- See http://www.docbook.org/tdg/en/html/refentry.html. -->
18   <refmeta>
19     <refentrytitle>waffle_dl</refentrytitle>
20     <manvolnum>3</manvolnum>
21   </refmeta>
23   <refnamediv>
24     <refname>waffle_dl</refname>
25     <refname>waffle_dl_can_open</refname>
26     <refname>waffle_dl_sym</refname>
27     <refpurpose>platform-independent interface to dynamic libraries</refpurpose>
28   </refnamediv>
30   <refentryinfo>
31     <title>Waffle Manual</title>
32     <productname>waffle</productname>
33     <xi:include href="common/author-chad.versace.xml"/>
34     <xi:include href="common/copyright.xml"/>
35     <xi:include href="common/legalnotice.xml"/>
36   </refentryinfo>
38   <refsynopsisdiv>
40     <funcsynopsis language="C">
42       <funcsynopsisinfo>#include &lt;waffle.h&gt;</funcsynopsisinfo>
44       <funcprototype>
45         <funcdef>bool <function>waffle_dl_can_open</function></funcdef>
46         <paramdef>int32_t <parameter>dl</parameter></paramdef>
47       </funcprototype>
49       <funcprototype>
50         <funcdef>void* <function>waffle_dl_sym</function></funcdef>
51         <paramdef>int32_t <parameter>dl</parameter></paramdef>
52         <paramdef>const char* <parameter>symbol</parameter></paramdef>
53       </funcprototype>
55     </funcsynopsis>
56   </refsynopsisdiv>
58   <refsect1>
59     <title>Description</title>
61     <para>
62       The waffle_dl functions provide a platform-independent interface for dynamic OpenGL libraries. For each function,
63       the parameter <parameter>dl</parameter> must be one of:
64       <simplelist type="vertical">
65         <member><constant>WAFFLE_DL_OPENGL</constant></member>
66         <member><constant>WAFFLE_DL_OPENGL_ES1</constant></member>
67         <member><constant>WAFFLE_DL_OPENGL_ES2</constant></member>
68         <member><constant>WAFFLE_DL_OPENGL_ES3</constant></member>
69       </simplelist>
70     </para>
72     <para>
73       For example, on Linux, the <constant>WAFFLE_DL_*</constant> enums map to
74       <filename>libGL.so.1</filename>,
75       <filename>libGLESv1_CM.so.1</filename>,
76       <filename>libGLESv2.so.2</filename>, and
77       <filename>libGLESv2.so.2</filename>, respectively.
78     </para>
80     <variablelist>
82       <varlistentry>
83         <term><function>waffle_dl_can_open()</function></term>
84         <listitem>
85           <para>
86             Test if a dynamic library can be opened.
87           </para>
88         </listitem>
89       </varlistentry>
91       <varlistentry>
92         <term><function>waffle_dl_sym()</function></term>
93         <listitem>
94           <para>
95             Get a <parameter>symbol</parameter> from a dynamic library.
96           </para>
97         </listitem>
98       </varlistentry>
100     </variablelist>
101   </refsect1>
103   <refsect1>
104     <title>Return Value</title>
105     <xi:include href="common/return-value.xml"/>
106   </refsect1>
108   <refsect1>
109     <title>Errors</title>
111     <para>
112       If waffle fails to find the requested library on the system, then
113       <constant>WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM</constant> is emitted.
114     </para>
116     <xi:include href="common/error-codes.xml"/>
118   </refsect1>
120   <xi:include href="common/issues.xml"/>
122   <refsect1>
123     <title>See Also</title>
124     <para>
125       <citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
126       <citerefentry><refentrytitle>waffle_get_proc_address</refentrytitle><manvolnum>3</manvolnum></citerefentry>
127     </para>
128   </refsect1>
130 </refentry>
132 <!--
133 vim:tw=120 et ts=2 sw=2: