summaryrefslogtreecommitdiffstats
path: root/externals/glfw-3.0.2/docs/html/group__init.html
blob: 6bb6e90176ebe22f6d341d3b8fddc9dadc41470b (plain) (blame)
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>GLFW: Initialization and version information</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GLFW
   &#160;<span id="projectnumber">3.0.2</span>
   </div>
   <div id="projectbrief">A multi-platform library for OpenGL, window and input</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Initialization and version information</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga317aac130a235ab08c6db0834907d85e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> (void)</td></tr>
<tr class="memdesc:ga317aac130a235ab08c6db0834907d85e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the GLFW library.  <a href="#ga317aac130a235ab08c6db0834907d85e">More...</a><br/></td></tr>
<tr class="separator:ga317aac130a235ab08c6db0834907d85e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaae48c0a18607ea4a4ba951d939f0901"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> (void)</td></tr>
<tr class="memdesc:gaaae48c0a18607ea4a4ba951d939f0901"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminates the GLFW library.  <a href="#gaaae48c0a18607ea4a4ba951d939f0901">More...</a><br/></td></tr>
<tr class="separator:gaaae48c0a18607ea4a4ba951d939f0901"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> (int *major, int *minor, int *rev)</td></tr>
<tr class="memdesc:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the version of the GLFW library.  <a href="#ga9f8ffaacf3c269cc48eafbf8b9b71197">More...</a><br/></td></tr>
<tr class="separator:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23d47dc013fce2bf58036da66079a657"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga23d47dc013fce2bf58036da66079a657">glfwGetVersionString</a> (void)</td></tr>
<tr class="memdesc:ga23d47dc013fce2bf58036da66079a657"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string describing the compile-time configuration.  <a href="#ga23d47dc013fce2bf58036da66079a657">More...</a><br/></td></tr>
<tr class="separator:ga23d47dc013fce2bf58036da66079a657"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
GLFW version macros</h2></td></tr>
<tr class="memitem:ga6337d9ea43b22fc529b2bba066b4a576"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga6337d9ea43b22fc529b2bba066b4a576">GLFW_VERSION_MAJOR</a>&#160;&#160;&#160;3</td></tr>
<tr class="memdesc:ga6337d9ea43b22fc529b2bba066b4a576"><td class="mdescLeft">&#160;</td><td class="mdescRight">The major version number of the GLFW library.  <a href="#ga6337d9ea43b22fc529b2bba066b4a576">More...</a><br/></td></tr>
<tr class="separator:ga6337d9ea43b22fc529b2bba066b4a576"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf80d40f0aea7088ff337606e9c48f7a3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3">GLFW_VERSION_MINOR</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:gaf80d40f0aea7088ff337606e9c48f7a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The minor version number of the GLFW library.  <a href="#gaf80d40f0aea7088ff337606e9c48f7a3">More...</a><br/></td></tr>
<tr class="separator:gaf80d40f0aea7088ff337606e9c48f7a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab72ae2e2035d9ea461abc3495eac0502"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gab72ae2e2035d9ea461abc3495eac0502">GLFW_VERSION_REVISION</a>&#160;&#160;&#160;2</td></tr>
<tr class="memdesc:gab72ae2e2035d9ea461abc3495eac0502"><td class="mdescLeft">&#160;</td><td class="mdescRight">The revision number of the GLFW library.  <a href="#gab72ae2e2035d9ea461abc3495eac0502">More...</a><br/></td></tr>
<tr class="separator:gab72ae2e2035d9ea461abc3495eac0502"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga6337d9ea43b22fc529b2bba066b4a576"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLFW_VERSION_MAJOR&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is incremented when the API is changed in non-compatible ways. </p>

</div>
</div>
<a class="anchor" id="gaf80d40f0aea7088ff337606e9c48f7a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLFW_VERSION_MINOR&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is incremented when features are added to the API but it remains backward-compatible. </p>

</div>
</div>
<a class="anchor" id="gab72ae2e2035d9ea461abc3495eac0502"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLFW_VERSION_REVISION&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is incremented when a bug fix release is made that does not contain any API changes. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga9f8ffaacf3c269cc48eafbf8b9b71197"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwGetVersion </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>major</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>rev</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure that you are using the minimum required version.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">major</td><td>Where to store the major version number, or <code>NULL</code>. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">minor</td><td>Where to store the minor version number, or <code>NULL</code>. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rev</td><td>Where to store the revision number, or <code>NULL</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd>
<dd>
This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__init.html#ga23d47dc013fce2bf58036da66079a657" title="Returns a string describing the compile-time configuration.">glfwGetVersionString</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga23d47dc013fce2bf58036da66079a657"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* glfwGetVersionString </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns a static string generated at compile-time according to which configuration macros were defined. This is intended for use when submitting bug reports, to allow developers to see which code paths are enabled in a binary.</p>
<p>The format of the string is as follows:</p>
<ul>
<li>The version of GLFW</li>
<li>The name of the window system API</li>
<li>The name of the context creation API</li>
<li>Any additional options or APIs</li>
</ul>
<p>For example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL back ends, the version string may look something like this: </p>
<pre class="fragment">3.0.0 Win32 WGL MinGW
</pre><dl class="section return"><dt>Returns</dt><dd>The GLFW version string.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd>
<dd>
This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197" title="Retrieves the version of the GLFW library.">glfwGetVersion</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga317aac130a235ab08c6db0834907d85e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int glfwInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before a program terminates GLFW should be terminated in order to free any resources allocated during or after initialization.</p>
<p>If this function fails, it calls <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before returning. If it succeeds, you should call <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before the program exits.</p>
<p>Additional calls to this function after successful initialization but before termination will succeed but will do nothing.</p>
<dl class="section return"><dt>Returns</dt><dd><code>GL_TRUE</code> if successful, or <code>GL_FALSE</code> if an error occurred.</dd></dl>
<dl class="section user"><dt>New in GLFW 3</dt><dd>This function no longer registers <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> with <code>atexit</code>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function may only be called from the main thread.</dd>
<dd>
This function may take several seconds to complete on some systems, while on other systems it may take only a fraction of a second to complete.</dd>
<dd>
<b>Mac OS X:</b> This function will change the current directory of the application to the <code>Contents/Resources</code> subdirectory of the application's bundle, if present.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901" title="Terminates the GLFW library.">glfwTerminate</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaaae48c0a18607ea4a4ba951d939f0901"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwTerminate </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function destroys all remaining windows, frees any allocated resources and sets the library to an uninitialized state. Once this is called, you must again call <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> successfully before you will be able to use most GLFW functions.</p>
<p>If GLFW has been successfully initialized, this function should be called before the program exits. If initialization fails, there is no need to call this function, as it is called by <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> before it returns failure.</p>
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function may only be called from the main thread.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>No window's context may be current on another thread when this function is called.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e" title="Initializes the GLFW library.">glfwInit</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 25 2013 21:45:13 for GLFW by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>