<trclass="memdesc:ga3d47c2d2fbe0be9c505d0e04e91a133c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Client API function pointer type. <ahref="#ga3d47c2d2fbe0be9c505d0e04e91a133c">More...</a><br/></td></tr>
<trclass="memdesc:ga1c04dc242268f827290fe40aa1c91157"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Makes the context of the specified window current for the calling thread. <ahref="#ga1c04dc242268f827290fe40aa1c91157">More...</a><br/></td></tr>
<trclass="memdesc:gac84759b1f6c2d271a4fea8ae89ec980d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the window whose context is current on the calling thread. <ahref="#gac84759b1f6c2d271a4fea8ae89ec980d">More...</a><br/></td></tr>
<trclass="memdesc:ga6d4e0cdf151b5e579bd67f13202994ed"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the swap interval for the current context. <ahref="#ga6d4e0cdf151b5e579bd67f13202994ed">More...</a><br/></td></tr>
<trclass="memdesc:ga87425065c011cef1ebd6aac75e059dfa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether the specified extension is available. <ahref="#ga87425065c011cef1ebd6aac75e059dfa">More...</a><br/></td></tr>
<trclass="memdesc:ga35f1837e6f666781842483937612f163"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the address of the specified function for the current context. <ahref="#ga35f1837e6f666781842483937612f163">More...</a><br/></td></tr>
<p>This is the reference documentation for OpenGL and OpenGL ES context related functions. For more task-oriented information, see the <aclass="el"href="context_guide.html">Context guide</a>. </p>
<p>Generic function pointer used for returning client API function pointers without forcing a cast from a regular pointer.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a></dd>
<dd>
<aclass="el"href="group__context.html#ga35f1837e6f666781842483937612f163"title="Returns the address of the specified function for the current context. ">glfwGetProcAddress</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function returns whether the specified <aclass="el"href="context_guide.html#context_glext">API extension</a> is supported by the current OpenGL or OpenGL ES context. It searches both for client API extension and context creation API extensions.</p>
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <aclass="el"href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<p>As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.</p>
<p>This function does not apply to Vulkan. If you are using Vulkan, see <aclass="el"href="group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1">glfwGetRequiredInstanceExtensions</a>, <code>vkEnumerateInstanceExtensionProperties</code> and <code>vkEnumerateDeviceExtensionProperties</code> instead.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">extension</td><td>The ASCII encoded name of the extension. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the extension is available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a></dd>
<dd>
<aclass="el"href="group__context.html#ga35f1837e6f666781842483937612f163"title="Returns the address of the specified function for the current context. ">glfwGetProcAddress</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.</p>
<dlclass="section return"><dt>Returns</dt><dd>The window whose context is current, or <code>NULL</code> if no window's context is current.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__context.html#ga1c04dc242268f827290fe40aa1c91157"title="Makes the context of the specified window current for the calling thread. ">glfwMakeContextCurrent</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function returns the address of the specified OpenGL or OpenGL ES <aclass="el"href="context_guide.html#context_glext">core or extension function</a>, if it is supported by the current context.</p>
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <aclass="el"href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see <aclass="el"href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a>, <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> instead.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>The address of a given function is not guaranteed to be the same between contexts.</dd>
<dd>
This function may return a non-<code>NULL</code> address despite the associated version or extension not being available. Always check the context version or extension string first.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the context is destroyed or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a></dd>
<dd>
<aclass="el"href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa"title="Returns whether the specified extension is available. ">glfwExtensionSupported</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. A context can only be made current on a single thread at a time and each thread can have only a single current context at a time.</p>
<p>By default, making a context non-current implicitly forces a pipeline flush. On machines that support <code>GL_KHR_context_flush_control</code>, you can control whether a context performs this flush by setting the <aclass="el"href="window_guide.html#window_hints_ctx">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> window hint.</p>
<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <aclass="el"href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose context to make current, or <code>NULL</code> to detach the current context.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d"title="Returns the window whose context is current on the calling thread. ">glfwGetCurrentContext</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time <aclass="el"href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> was called before swapping the buffers and returning. This is sometimes called <em>vertical synchronization</em>, <em>vertical retrace synchronization</em> or just <em>vsync</em>.</p>
<p>Contexts that support either of the <code>WGL_EXT_swap_control_tear</code> and <code>GLX_EXT_swap_control_tear</code> extensions also accept negative swap intervals, which allow the driver to swap even if a frame arrives a little bit late. You can check for the presence of these extensions using <aclass="el"href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>. For more information about swap tearing, see the extension specifications.</p>
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <aclass="el"href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">interval</td><td>The minimum number of screen updates to wait for until the buffers are swapped by <aclass="el"href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>This function is not called during context creation, leaving the swap interval set to whatever is the default on that platform. This is done because some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.</dd>
<dd>
Some GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs in the driver.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14"title="Swaps the front and back buffers of the specified window. ">glfwSwapBuffers</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<!-- iframe showing the search results (closed by default) -->
<divid="MSearchResultsWindow">
<iframesrc="javascript:void(0)"frameborder="0"
name="MSearchResults"id="MSearchResults">
</iframe>
</div>
<divclass="header">
<divclass="summary">
<ahref="#define-members">Macros</a></div>
<divclass="headertitle">
<divclass="title">Error codes<divclass="ingroups"><aclass="el"href="group__init.html">Initialization, version and error reference</a></div></div></div>
<trclass="memdesc:ga2374ee02c177f12e1fa76ff3ed15e14a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">GLFW has not been initialized. <ahref="#ga2374ee02c177f12e1fa76ff3ed15e14a">More...</a><br/></td></tr>
<trclass="memdesc:gaa8290386e9528ccb9e42a3a4e16fc0d0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">No context is current for this thread. <ahref="#gaa8290386e9528ccb9e42a3a4e16fc0d0">More...</a><br/></td></tr>
<trclass="memdesc:ga76f6bb9c4eea73db675f096b404593ce"><tdclass="mdescLeft"> </td><tdclass="mdescRight">One of the arguments to the function was an invalid enum value. <ahref="#ga76f6bb9c4eea73db675f096b404593ce">More...</a><br/></td></tr>
<trclass="memdesc:gaaf2ef9aa8202c2b82ac2d921e554c687"><tdclass="mdescLeft"> </td><tdclass="mdescRight">One of the arguments to the function was an invalid value. <ahref="#gaaf2ef9aa8202c2b82ac2d921e554c687">More...</a><br/></td></tr>
<trclass="memdesc:ga56882b290db23261cc6c053c40c2d08e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">GLFW could not find support for the requested API on the system. <ahref="#ga56882b290db23261cc6c053c40c2d08e">More...</a><br/></td></tr>
<trclass="memdesc:gad16c5565b4a69f9c2a9ac2c0dbc89462"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The requested OpenGL or OpenGL ES version is not available. <ahref="#gad16c5565b4a69f9c2a9ac2c0dbc89462">More...</a><br/></td></tr>
<trclass="memdesc:gad44162d78100ea5e87cdd38426b8c7a1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A platform-specific error occurred that does not match any of the more specific categories. <ahref="#gad44162d78100ea5e87cdd38426b8c7a1">More...</a><br/></td></tr>
<trclass="memdesc:ga196e125ef261d94184e2b55c05762f14"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The requested format is not supported or available. <ahref="#ga196e125ef261d94184e2b55c05762f14">More...</a><br/></td></tr>
<trclass="memdesc:gacff24d2757da752ae4c80bf452356487"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The specified window does not have an OpenGL or OpenGL ES context. <ahref="#gacff24d2757da752ae4c80bf452356487">More...</a><br/></td></tr>
<p>GLFW could not find support for the requested API on the system.</p>
<dlclass="section user"><dt>Analysis</dt><dd>The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples.</dd></dl>
<dlclass="section user"><dt></dt><dd>Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. OS X does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan. </dd></dl>
<p>If emitted during window creation, the requested pixel format is not supported.</p>
<p>If emitted when querying the clipboard, the contents of the clipboard could not be converted to the requested format.</p>
<dlclass="section user"><dt>Analysis</dt><dd>If emitted during window creation, one or more <aclass="el"href="window_guide.html#window_hints_hard">hard constraints</a> did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>
<dlclass="section user"><dt></dt><dd>If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate. </dd></dl>
<p>One of the arguments to the function was an invalid enum value, for example requesting <aclass="el"href="window_guide.html#window_hints_fb">GLFW_RED_BITS</a> with <aclass="el"href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
<dlclass="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
<p>One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or OpenGL ES version like 2.7.</p>
<p>Requesting a valid but unavailable OpenGL or OpenGL ES version will instead result in a <aclass="el"href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a> error.</p>
<dlclass="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
<p>This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES context but no context is current on the calling thread. One such function is <aclass="el"href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a>.</p>
<dlclass="section user"><dt>Analysis</dt><dd>Application programmer error. Ensure a context is current before calling functions that require a current context. </dd></dl>
<p>This occurs if a GLFW function was called that must not be called unless the library is <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</p>
<dlclass="section user"><dt>Analysis</dt><dd>Application programmer error. Initialize GLFW before calling any function that requires initialization. </dd></dl>
<dlclass="section user"><dt>Analysis</dt><dd>A bug in GLFW or the underlying operating system. Report the bug to our <ahref="https://github.com/glfw/glfw/issues">issue tracker</a>. </dd></dl>
<p>A platform-specific error occurred that does not match any of the more specific categories.</p>
<dlclass="section user"><dt>Analysis</dt><dd>A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our <ahref="https://github.com/glfw/glfw/issues">issue tracker</a>. </dd></dl>
<p>The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.</p>
<dlclass="section user"><dt>Analysis</dt><dd>The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>
<dlclass="section user"><dt></dt><dd>Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this error and not <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>, because GLFW cannot know what future versions will exist. </dd></dl>
<trclass="memdesc:ga6b8a2639706d5c409fc1287e8f55e928"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for error callbacks. <ahref="#ga6b8a2639706d5c409fc1287e8f55e928">More...</a><br/></td></tr>
<trclass="memdesc:ga317aac130a235ab08c6db0834907d85e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes the GLFW library. <ahref="#ga317aac130a235ab08c6db0834907d85e">More...</a><br/></td></tr>
<trclass="memdesc:gaaae48c0a18607ea4a4ba951d939f0901"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Terminates the GLFW library. <ahref="#gaaae48c0a18607ea4a4ba951d939f0901">More...</a><br/></td></tr>
<trclass="memitem:ga9f8ffaacf3c269cc48eafbf8b9b71197"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> (int *major, int *minor, int *rev)</td></tr>
<trclass="memdesc:ga9f8ffaacf3c269cc48eafbf8b9b71197"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the version of the GLFW library. <ahref="#ga9f8ffaacf3c269cc48eafbf8b9b71197">More...</a><br/></td></tr>
<trclass="memdesc:ga23d47dc013fce2bf58036da66079a657"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a string describing the compile-time configuration. <ahref="#ga23d47dc013fce2bf58036da66079a657">More...</a><br/></td></tr>
<trclass="memdesc:gaa5d796c3cf7c1a7f02f845486333fb5f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the error callback. <ahref="#gaa5d796c3cf7c1a7f02f845486333fb5f">More...</a><br/></td></tr>
<trclass="memdesc:ga6337d9ea43b22fc529b2bba066b4a576"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The major version number of the GLFW library. <ahref="#ga6337d9ea43b22fc529b2bba066b4a576">More...</a><br/></td></tr>
<trclass="memdesc:gaf80d40f0aea7088ff337606e9c48f7a3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The minor version number of the GLFW library. <ahref="#gaf80d40f0aea7088ff337606e9c48f7a3">More...</a><br/></td></tr>
<trclass="memdesc:gab72ae2e2035d9ea461abc3495eac0502"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The revision number of the GLFW library. <ahref="#gab72ae2e2035d9ea461abc3495eac0502">More...</a><br/></td></tr>
<p>This is the reference documentation for initialization and termination of the library, version management and error handling. For more task-oriented information, see the <aclass="el"href="intro_guide.html">Introduction to the API</a>. </p>
<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>
<p>Any or all of the version arguments may be <code>NULL</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">major</td><td>Where to store the major version number, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">minor</td><td>Where to store the minor version number, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">rev</td><td>Where to store the revision number, or <code>NULL</code>.</td></tr>
<dlclass="section remark"><dt>Remarks</dt><dd>This function may be called before <aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__init.html#ga23d47dc013fce2bf58036da66079a657"title="Returns a string describing the compile-time configuration. ">glfwGetVersionString</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function returns the compile-time generated <aclass="el"href="intro_guide.html#intro_version_string">version string</a> of the GLFW library binary. It describes the version, platform, compiler and any platform-specific compile-time options. It should not be confused with the OpenGL or OpenGL ES version string, queried with <code>glGetString</code>.</p>
<p><b>Do not use the version string</b> to parse the GLFW library version. The <aclass="el"href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> function provides the version of the running library binary in numerical format.</p>
<dlclass="section return"><dt>Returns</dt><dd>The ASCII encoded GLFW version string.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>This function may be called before <aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned string is static and compile-time generated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<p>This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be terminated in order to free any resources allocated during or after initialization.</p>
<p>If this function fails, it calls <aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before returning. If it succeeds, you should call <aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before the application exits.</p>
<p>Additional calls to this function after successful initialization but before termination will return <code>GLFW_TRUE</code> immediately.</p>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>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. This can be disabled with a <aclass="el"href="compile_guide.html#compile_options_osx">compile-time option</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="intro_guide.html#intro_init">Initialization and termination</a></dd>
<dd>
<aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901"title="Terminates the GLFW library. ">glfwTerminate</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.</p>
<p>The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be written accordingly.</p>
<p>Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If you wish to use it after the callback returns, you need to make a copy.</p>
<p>Once set, the error callback remains set even after the library has been terminated.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>This function may be called before <aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function is called, you must again call <aclass="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 application exits. If initialization fails, there is no need to call this function, as it is called by <aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> before it returns failure.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>This function may be called before <aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>The contexts of any remaining windows must not be current on any other thread when this function is called.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="intro_guide.html#intro_init">Initialization and termination</a></dd>
<dd>
<aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e"title="Initializes the GLFW library. ">glfwInit</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<trclass="memdesc:ga39893a4a7e7c3239c98d29c9e084350c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for mouse button callbacks. <ahref="#ga39893a4a7e7c3239c98d29c9e084350c">More...</a><br/></td></tr>
<trclass="memdesc:ga4cfad918fa836f09541e7b9acd36686c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for cursor position callbacks. <ahref="#ga4cfad918fa836f09541e7b9acd36686c">More...</a><br/></td></tr>
<trclass="memdesc:ga51ab436c41eeaed6db5a0c9403b1c840"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for cursor enter/leave callbacks. <ahref="#ga51ab436c41eeaed6db5a0c9403b1c840">More...</a><br/></td></tr>
<trclass="memdesc:ga4687e2199c60a18a8dd1da532e6d75c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for scroll callbacks. <ahref="#ga4687e2199c60a18a8dd1da532e6d75c9">More...</a><br/></td></tr>
<trclass="memdesc:ga0192a232a41e4e82948217c8ba94fdfd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for keyboard key callbacks. <ahref="#ga0192a232a41e4e82948217c8ba94fdfd">More...</a><br/></td></tr>
<trclass="memdesc:gabf24451c7ceb1952bc02b17a0d5c3e5f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for Unicode character callbacks. <ahref="#gabf24451c7ceb1952bc02b17a0d5c3e5f">More...</a><br/></td></tr>
<trclass="memdesc:gae36fb6897d2b7df9b128900c8ce9c507"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for Unicode character with modifiers callbacks. <ahref="#gae36fb6897d2b7df9b128900c8ce9c507">More...</a><br/></td></tr>
<trclass="memdesc:gab71f4ca80b651462852e601caf308c4a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for file drop callbacks. <ahref="#gab71f4ca80b651462852e601caf308c4a">More...</a><br/></td></tr>
<trclass="memdesc:gaa67aa597e974298c748bfe4fb17d406d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for joystick configuration callbacks. <ahref="#gaa67aa597e974298c748bfe4fb17d406d">More...</a><br/></td></tr>
<trclass="memitem:gaf5b859dbe19bdf434e42695ea45cc5f4"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4">glfwGetInputMode</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int mode)</td></tr>
<trclass="memdesc:gaf5b859dbe19bdf434e42695ea45cc5f4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the value of an input option for the specified window. <ahref="#gaf5b859dbe19bdf434e42695ea45cc5f4">More...</a><br/></td></tr>
<trclass="memitem:gaa92336e173da9c8834558b54ee80563b"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int mode, int value)</td></tr>
<trclass="memdesc:gaa92336e173da9c8834558b54ee80563b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets an input option for the specified window. <ahref="#gaa92336e173da9c8834558b54ee80563b">More...</a><br/></td></tr>
<trclass="memitem:ga237a182e5ec0b21ce64543f3b5e7e2be"><tdclass="memItemLeft"align="right"valign="top">const char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be">glfwGetKeyName</a> (int key, int scancode)</td></tr>
<trclass="memdesc:ga237a182e5ec0b21ce64543f3b5e7e2be"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the localized name of the specified printable key. <ahref="#ga237a182e5ec0b21ce64543f3b5e7e2be">More...</a><br/></td></tr>
<trclass="memitem:gadd341da06bc8d418b4dc3a3518af9ad2"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int key)</td></tr>
<trclass="memdesc:gadd341da06bc8d418b4dc3a3518af9ad2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the last reported state of a keyboard key for the specified window. <ahref="#gadd341da06bc8d418b4dc3a3518af9ad2">More...</a><br/></td></tr>
<trclass="memitem:gac1473feacb5996c01a7a5a33b5066704"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int button)</td></tr>
<trclass="memdesc:gac1473feacb5996c01a7a5a33b5066704"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the last reported state of a mouse button for the specified window. <ahref="#gac1473feacb5996c01a7a5a33b5066704">More...</a><br/></td></tr>
<trclass="memdesc:ga01d37b6c40133676b9cea60ca1d7c0cc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the position of the cursor relative to the client area of the window. <ahref="#ga01d37b6c40133676b9cea60ca1d7c0cc">More...</a><br/></td></tr>
<trclass="memdesc:ga04b03af936d906ca123c8f4ee08b39e7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the position of the cursor, relative to the client area of the window. <ahref="#ga04b03af936d906ca123c8f4ee08b39e7">More...</a><br/></td></tr>
<trclass="memitem:gafca356935e10135016aa49ffa464c355"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gafca356935e10135016aa49ffa464c355">glfwCreateCursor</a> (const <aclass="el"href="structGLFWimage.html">GLFWimage</a> *image, int xhot, int yhot)</td></tr>
<trclass="memdesc:gafca356935e10135016aa49ffa464c355"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a custom cursor. <ahref="#gafca356935e10135016aa49ffa464c355">More...</a><br/></td></tr>
<trclass="memdesc:gaa65f416d03ebbbb5b8db71a489fcb894"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a cursor with a standard shape. <ahref="#gaa65f416d03ebbbb5b8db71a489fcb894">More...</a><br/></td></tr>
<trclass="memdesc:ga81b952cd1764274d0db7fb3c5a79ba6a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Destroys a cursor. <ahref="#ga81b952cd1764274d0db7fb3c5a79ba6a">More...</a><br/></td></tr>
<trclass="memdesc:gad3b4f38c8d5dae036bc8fa959e18343e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the cursor for the window. <ahref="#gad3b4f38c8d5dae036bc8fa959e18343e">More...</a><br/></td></tr>
<trclass="memdesc:ga7e496507126f35ea72f01b2e6ef6d155"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the key callback. <ahref="#ga7e496507126f35ea72f01b2e6ef6d155">More...</a><br/></td></tr>
<trclass="memdesc:ga556239421c6a5a243c66fca28da9f742"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the Unicode character callback. <ahref="#ga556239421c6a5a243c66fca28da9f742">More...</a><br/></td></tr>
<trclass="memdesc:ga3f55ef5dc03a374e567f068b13c94afc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the Unicode character with modifiers callback. <ahref="#ga3f55ef5dc03a374e567f068b13c94afc">More...</a><br/></td></tr>
<trclass="memdesc:ga7dad39486f2c7591af7fb25134a2501d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the cursor position callback. <ahref="#ga7dad39486f2c7591af7fb25134a2501d">More...</a><br/></td></tr>
<trclass="memdesc:gacf02eb10504352f16efda4593c3ce60e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the scroll callback. <ahref="#gacf02eb10504352f16efda4593c3ce60e">More...</a><br/></td></tr>
<trclass="memdesc:ga41291bf15dd3ff564b3143aa6dc74a4b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the file drop callback. <ahref="#ga41291bf15dd3ff564b3143aa6dc74a4b">More...</a><br/></td></tr>
<trclass="memdesc:gaffcbd9ac8ee737fcdd25475123a3c790"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether the specified joystick is present. <ahref="#gaffcbd9ac8ee737fcdd25475123a3c790">More...</a><br/></td></tr>
<trclass="memitem:ga6271d46a5901ec2c99601ccf4dd14731"><tdclass="memItemLeft"align="right"valign="top">const float * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga6271d46a5901ec2c99601ccf4dd14731">glfwGetJoystickAxes</a> (int joy, int *count)</td></tr>
<trclass="memdesc:ga6271d46a5901ec2c99601ccf4dd14731"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the values of all axes of the specified joystick. <ahref="#ga6271d46a5901ec2c99601ccf4dd14731">More...</a><br/></td></tr>
<trclass="memitem:gace54cd930dcd502e118fe4021384ce1b"><tdclass="memItemLeft"align="right"valign="top">const unsigned char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gace54cd930dcd502e118fe4021384ce1b">glfwGetJoystickButtons</a> (int joy, int *count)</td></tr>
<trclass="memdesc:gace54cd930dcd502e118fe4021384ce1b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the state of all buttons of the specified joystick. <ahref="#gace54cd930dcd502e118fe4021384ce1b">More...</a><br/></td></tr>
<trclass="memdesc:gac8d7f6107e05cfd106cfba973ab51e19"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the name of the specified joystick. <ahref="#gac8d7f6107e05cfd106cfba973ab51e19">More...</a><br/></td></tr>
<trclass="memdesc:gaba1f022c5eb07dfac421df34cdcd31dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the clipboard to the specified string. <ahref="#gaba1f022c5eb07dfac421df34cdcd31dd">More...</a><br/></td></tr>
<trclass="memdesc:ga5aba1d704d9ab539282b1fbe9f18bb94"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the contents of the clipboard as a string. <ahref="#ga5aba1d704d9ab539282b1fbe9f18bb94">More...</a><br/></td></tr>
<trclass="memdesc:gaa6cf4e7a77158a3b8fd00328b1720a4a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the value of the GLFW timer. <ahref="#gaa6cf4e7a77158a3b8fd00328b1720a4a">More...</a><br/></td></tr>
<trclass="memdesc:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the GLFW timer. <ahref="#gaf59589ef6e8b8c8b5ad184b25afd4dc0">More...</a><br/></td></tr>
<trclass="memdesc:ga09b2bd37d328e0b9456c7ec575cc26aa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the current value of the raw timer. <ahref="#ga09b2bd37d328e0b9456c7ec575cc26aa">More...</a><br/></td></tr>
<trclass="memdesc:ga3289ee876572f6e91f06df3a24824443"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the frequency, in Hz, of the raw timer. <ahref="#ga3289ee876572f6e91f06df3a24824443">More...</a><br/></td></tr>
<trclass="memdesc:gada11d965c4da13090ad336e030e4d11f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The key or mouse button was released. <ahref="#gada11d965c4da13090ad336e030e4d11f">More...</a><br/></td></tr>
<trclass="memdesc:ga2485743d0b59df3791c45951c4195265"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The key or mouse button was pressed. <ahref="#ga2485743d0b59df3791c45951c4195265">More...</a><br/></td></tr>
<trclass="memdesc:gac96fd3b9fc66c6f0eebaf6532595338f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The key was held down until it repeated. <ahref="#gac96fd3b9fc66c6f0eebaf6532595338f">More...</a><br/></td></tr>
<p>This is the reference documentation for input related functions and types. For more task-oriented information, see the <aclass="el"href="input_guide.html">Input guide</a>. </p>
<p>This is the function signature for Unicode character with modifiers callback functions. It is called for each input character, regardless of what modifier keys are held down.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that received the event. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">codepoint</td><td>The Unicode code point of the character. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mods</td><td>Bit field describing which <aclass="el"href="group__mods.html">modifier keys</a> were held down.</td></tr>
<aclass="el"href="group__input.html#ga3f55ef5dc03a374e567f068b13c94afc"title="Sets the Unicode character with modifiers callback. ">glfwSetCharModsCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<p>This is the function signature for cursor enter/leave callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that received the event. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">entered</td><td><code>GLFW_TRUE</code> if the cursor entered the window's client area, or <code>GLFW_FALSE</code> if it left it.</td></tr>
<p>This is the function signature for cursor position callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that received the event. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The new cursor x-coordinate, relative to the left edge of the client area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The new cursor y-coordinate, relative to the top edge of the client area.</td></tr>
<aclass="el"href="group__input.html#ga7dad39486f2c7591af7fb25134a2501d"title="Sets the cursor position callback. ">glfwSetCursorPosCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmouseposfun</code>. </dd></dl>
<p>This is the function signature for keyboard key callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that received the event. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">key</td><td>The <aclass="el"href="group__keys.html">keyboard key</a> that was pressed or released. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">scancode</td><td>The system-specific scancode of the key. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">action</td><td><code>GLFW_PRESS</code>, <code>GLFW_RELEASE</code> or <code>GLFW_REPEAT</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mods</td><td>Bit field describing which <aclass="el"href="group__mods.html">modifier keys</a> were held down.</td></tr>
<p>This is the function signature for mouse button callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that received the event. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">button</td><td>The <aclass="el"href="group__buttons.html">mouse button</a> that was pressed or released. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">action</td><td>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mods</td><td>Bit field describing which <aclass="el"href="group__mods.html">modifier keys</a> were held down.</td></tr>
<p>Creates a new custom cursor image that can be set for a window with <aclass="el"href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>. The cursor can be destroyed with <aclass="el"href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a>. Any remaining cursors are destroyed by <aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
<p>The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel. They are arranged canonically as packed sequential rows, starting from the top-left corner.</p>
<p>The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down.</p>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xhot</td><td>The desired x-coordinate, in pixels, of the cursor hotspot. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">yhot</td><td>The desired y-coordinate, in pixels, of the cursor hotspot. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The handle of the created cursor, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a"title="Destroys a cursor. ">glfwDestroyCursor</a></dd>
<dd>
<aclass="el"href="group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894"title="Creates a cursor with a standard shape. ">glfwCreateStandardCursor</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<p>Returns a cursor with a <aclass="el"href="group__shapes.html">standard shape</a>, that can be set for a window with <aclass="el"href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">shape</td><td>One of the <aclass="el"href="group__shapes.html">standard shapes</a>. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A new cursor ready to use or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function destroys a cursor previously created with <aclass="el"href="group__input.html#gafca356935e10135016aa49ffa464c355">glfwCreateCursor</a>. Any remaining cursors will be destroyed by <aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cursor</td><td>The cursor object to destroy.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the contents of the system clipboard, if it contains or is convertible to a UTF-8 encoded string. If the clipboard is empty or if its contents cannot be converted, <code>NULL</code> is returned and a <aclass="el"href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a> error is generated.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that will request the clipboard contents. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The contents of the clipboard as a UTF-8 encoded string, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to <aclass="el"href="group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94">glfwGetClipboardString</a> or <aclass="el"href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">glfwSetClipboardString</a>, or until the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="input_guide.html#clipboard">Clipboard input and output</a></dd>
<dd>
<aclass="el"href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd"title="Sets the clipboard to the specified string. ">glfwSetClipboardString</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the client area of the specified window.</p>
<p>If the cursor is disabled (with <code>GLFW_CURSOR_DISABLED</code>) then the cursor position is unbounded and limited only by the minimum and maximum values of a <code>double</code>.</p>
<p>The coordinate can be converted to their integer equivalents with the <code>floor</code> function. Casting directly to an integer type works for positive coordinates, but fails for negative ones.</p>
<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">xpos</td><td>Where to store the cursor x-coordinate, relative to the left edge of the client area, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">ypos</td><td>Where to store the cursor y-coordinate, relative to the to top edge of the client area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__input.html#ga04b03af936d906ca123c8f4ee08b39e7"title="Sets the position of the cursor, relative to the client area of the window. ">glfwSetCursorPos</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetMousePos</code>. </dd></dl>
<p>This function returns the value of an input option for the specified window. The mode must be one of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mode</td><td>One of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__input.html#gaa92336e173da9c8834558b54ee80563b"title="Sets an input option for the specified window. ">glfwSetInputMode</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function returns the values of all axes of the specified joystick. Each element in the array is a value between -1.0 and 1.0.</p>
<p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <aclass="el"href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">joy</td><td>The <aclass="el"href="group__joysticks.html">joystick</a> to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">count</td><td>Where to store the number of axis values in the returned array. This is set to zero if the joystick is not present or an error occurred. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>An array of axis values, or <code>NULL</code> if the joystick is not present or an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the state of all buttons of the specified joystick. Each element in the array is either <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
<p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <aclass="el"href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">joy</td><td>The <aclass="el"href="group__joysticks.html">joystick</a> to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">count</td><td>Where to store the number of button states in the returned array. This is set to zero if the joystick is not present or an error occurred. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>An array of button states, or <code>NULL</code> if the joystick is not present or an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the name, encoded as UTF-8, of the specified joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.</p>
<p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <aclass="el"href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">joy</td><td>The <aclass="el"href="group__joysticks.html">joystick</a> to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The UTF-8 encoded name of the joystick, or <code>NULL</code> if the joystick is not present or an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the last state reported for the specified key to the specified window. The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. The higher-level action <code>GLFW_REPEAT</code> is only reported to the key callback.</p>
<p>If the <code>GLFW_STICKY_KEYS</code> input mode is enabled, this function returns <code>GLFW_PRESS</code> the first time you call it for a key that was pressed, even if that key has already been released.</p>
<p>The key functions deal with physical keys, with <aclass="el"href="group__keys.html">key tokens</a> named after their use on the standard US keyboard layout. If you want to input text, use the Unicode character callback instead.</p>
<p>The <aclass="el"href="group__mods.html">modifier key bit masks</a> are not key tokens and cannot be used with this function.</p>
<p><b>Do not use this function</b> to implement <aclass="el"href="input_guide.html#input_char">text input</a>.</p>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">key</td><td>The desired <aclass="el"href="group__keys.html">keyboard key</a>. <code>GLFW_KEY_UNKNOWN</code> is not a valid key for this function. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the localized name of the specified printable key. This is intended for displaying key bindings to the user.</p>
<p>If the key is <code>GLFW_KEY_UNKNOWN</code>, the scancode is used instead, otherwise the scancode is ignored. If a non-printable key or (if the key is <code>GLFW_KEY_UNKNOWN</code>) a scancode that maps to a non-printable key is specified, this function returns <code>NULL</code>.</p>
<p>This behavior allows you to pass in the arguments passed to the <aclass="el"href="input_guide.html#input_key">key callback</a> without modification.</p>
<p>The printable keys are:</p><ul>
<li><code>GLFW_KEY_APOSTROPHE</code></li>
<li><code>GLFW_KEY_COMMA</code></li>
<li><code>GLFW_KEY_MINUS</code></li>
<li><code>GLFW_KEY_PERIOD</code></li>
<li><code>GLFW_KEY_SLASH</code></li>
<li><code>GLFW_KEY_SEMICOLON</code></li>
<li><code>GLFW_KEY_EQUAL</code></li>
<li><code>GLFW_KEY_LEFT_BRACKET</code></li>
<li><code>GLFW_KEY_RIGHT_BRACKET</code></li>
<li><code>GLFW_KEY_BACKSLASH</code></li>
<li><code>GLFW_KEY_WORLD_1</code></li>
<li><code>GLFW_KEY_WORLD_2</code></li>
<li><code>GLFW_KEY_0</code> to <code>GLFW_KEY_9</code></li>
<li><code>GLFW_KEY_A</code> to <code>GLFW_KEY_Z</code></li>
<li><code>GLFW_KEY_KP_0</code> to <code>GLFW_KEY_KP_9</code></li>
<li><code>GLFW_KEY_KP_DECIMAL</code></li>
<li><code>GLFW_KEY_KP_DIVIDE</code></li>
<li><code>GLFW_KEY_KP_MULTIPLY</code></li>
<li><code>GLFW_KEY_KP_SUBTRACT</code></li>
<li><code>GLFW_KEY_KP_ADD</code></li>
<li><code>GLFW_KEY_KP_EQUAL</code></li>
</ul>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">key</td><td>The key to query, or <code>GLFW_KEY_UNKNOWN</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">scancode</td><td>The scancode of the key to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The localized name of the key, or <code>NULL</code>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to <aclass="el"href="group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be">glfwGetKeyName</a>, or until the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the last state reported for the specified mouse button to the specified window. The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
<p>If the <code>GLFW_STICKY_MOUSE_BUTTONS</code> input mode is enabled, this function <code>GLFW_PRESS</code> the first time you call it for a mouse button that was pressed, even if that mouse button has already been released.</p>
<dlclass="section return"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the value of the GLFW timer. Unless the timer has been set using <aclass="el"href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a>, the timer measures time elapsed since GLFW was initialized.</p>
<p>The resolution of the timer is system dependent, but is usually on the order of a few micro- or nanoseconds. It uses the highest-resolution monotonic time source on each supported platform.</p>
<dlclass="section return"><dt>Returns</dt><dd>The current value, in seconds, or zero if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Reading and writing of the internal timer offset is not atomic, so it needs to be externally synchronized with calls to <aclass="el"href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a>.</dd></dl>
<p>This function returns the frequency, in Hz, of the raw timer.</p>
<dlclass="section return"><dt>Returns</dt><dd>The frequency of the timer, in Hz, or zero if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa"title="Returns the current value of the raw timer. ">glfwGetTimerValue</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function returns the current value of the raw timer, measured in 1 / frequency seconds. To get the frequency, call <aclass="el"href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>The value of the timer, or zero if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__input.html#ga3289ee876572f6e91f06df3a24824443"title="Returns the frequency, in Hz, of the raw timer. ">glfwGetTimerFrequency</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function returns whether the specified joystick is present.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">joy</td><td>The <aclass="el"href="group__joysticks.html">joystick</a> to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the joystick is present, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the character callback of the specified window, which is called when a Unicode character is input.</p>
<p>The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas the <aclass="el"href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155">key callback</a> is not. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was pressed or released, see the key callback instead.</p>
<p>The character callback behaves as system text input normally does and will not be called if modifier keys are held down that would prevent normal text input on that platform, for example a Super (Command) key on OS X or Alt key on Windows. There is a <aclass="el"href="group__input.html#ga3f55ef5dc03a374e567f068b13c94afc">character with modifiers callback</a> that receives these events.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys are used.</p>
<p>The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see the <aclass="el"href="group__input.html#ga556239421c6a5a243c66fca28da9f742">character callback</a>. Like the character callback, the character with modifiers callback deals with characters and is keyboard layout dependent. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was pressed or released, see the <aclass="el"href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155">key callback</a> instead.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="input_guide.html#clipboard">Clipboard input and output</a></dd>
<dd>
<aclass="el"href="group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94"title="Returns the contents of the clipboard as a string. ">glfwGetClipboardString</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function sets the cursor image to be used when the cursor is over the client area of the specified window. The set cursor will only be visible when the <aclass="el"href="input_guide.html#cursor_mode">cursor mode</a> of the window is <code>GLFW_CURSOR_NORMAL</code>.</p>
<p>On some platforms, the set cursor may not be visible unless the window also has input focus.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set the cursor for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cursor</td><td>The cursor to set, or <code>NULL</code> to switch back to the default arrow cursor.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the client area of the window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the position, in screen coordinates, of the cursor relative to the upper-left corner of the client area of the specified window. The window must have input focus. If the window does not have input focus when this function is called, it fails silently.</p>
<p><b>Do not use this function</b> to implement things like camera controls. GLFW already provides the <code>GLFW_CURSOR_DISABLED</code> cursor mode that hides the cursor, transparently re-centers it and provides unconstrained cursor motion. See <aclass="el"href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> for more information.</p>
<p>If the cursor mode is <code>GLFW_CURSOR_DISABLED</code> then the cursor position is unconstrained and limited only by the minimum and maximum values of a <code>double</code>.</p>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The desired x-coordinate, relative to the left edge of the client area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The desired y-coordinate, relative to the top edge of the client area.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc"title="Retrieves the position of the cursor relative to the client area of the window. ">glfwGetCursorPos</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePos</code>. </dd></dl>
<p>This function sets the cursor position callback of the specified window, which is called when the cursor is moved. The callback is provided with the position, in screen coordinates, relative to the upper-left corner of the client area of the window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the file drop callback of the specified window, which is called when one or more dragged files are dropped on the window.</p>
<p>Because the path array and its strings may have been generated specifically for that event, they are not guaranteed to be valid after the callback has returned. If you wish to use them after the callback returns, you need to make a deep copy.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new file drop callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="input_guide.html#path_drop">Path drop input</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<p>This function sets an input mode option for the specified window. The mode must be one of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>.</p>
<p>If the mode is <code>GLFW_CURSOR</code>, the value must be one of the following cursor modes:</p><ul>
<li><code>GLFW_CURSOR_NORMAL</code> makes the cursor visible and behaving normally.</li>
<li><code>GLFW_CURSOR_HIDDEN</code> makes the cursor invisible when it is over the client area of the window but does not restrict the cursor from leaving.</li>
<li><code>GLFW_CURSOR_DISABLED</code> hides and grabs the cursor, providing virtual and unlimited cursor movement. This is useful for implementing for example 3D camera controls.</li>
</ul>
<p>If the mode is <code>GLFW_STICKY_KEYS</code>, the value must be either <code>GLFW_TRUE</code> to enable sticky keys, or <code>GLFW_FALSE</code> to disable it. If sticky keys are enabled, a key press will ensure that <aclass="el"href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a> returns <code>GLFW_PRESS</code> the next time it is called even if the key had been released before the call. This is useful when you are only interested in whether keys have been pressed but not when or in which order.</p>
<p>If the mode is <code>GLFW_STICKY_MOUSE_BUTTONS</code>, the value must be either <code>GLFW_TRUE</code> to enable sticky mouse buttons, or <code>GLFW_FALSE</code> to disable it. If sticky mouse buttons are enabled, a mouse button press will ensure that <aclass="el"href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a> returns <code>GLFW_PRESS</code> the next time it is called even if the mouse button had been released before the call. This is useful when you are only interested in whether mouse buttons have been pressed but not when or in which order.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose input mode to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mode</td><td>One of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The new value of the specified input mode.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4"title="Returns the value of an input option for the specified window. ">glfwGetInputMode</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwEnable</code> and <code>glfwDisable</code>. </dd></dl>
<p>This function sets the joystick configuration callback, or removes the currently set callback. This is called when a joystick is connected to or disconnected from the system.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the key callback of the specified window, which is called when a key is pressed, repeated or released.</p>
<p>The key functions deal with physical keys, with layout independent <aclass="el"href="group__keys.html">key tokens</a> named after their values in the standard US keyboard layout. If you want to input text, use the <aclass="el"href="group__input.html#ga556239421c6a5a243c66fca28da9f742">character callback</a> instead.</p>
<p>When a window loses input focus, it will generate synthetic key release events for all pressed keys. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the <aclass="el"href="group__window.html#ga25d1c584edb375d7711c5c3548ba711f">window focus callback</a> has been called.</p>
<p>The scancode of a key is specific to that platform or sometimes even to that machine. Scancodes are intended to allow users to bind keys that don't have a GLFW key token. Such keys have <code>key</code> set to <code>GLFW_KEY_UNKNOWN</code>, their state is not saved and so it cannot be queried with <aclass="el"href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a>.</p>
<p>Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new key callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released.</p>
<p>When a window loses input focus, it will generate synthetic mouse button release events for all pressed mouse buttons. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the <aclass="el"href="group__window.html#ga25d1c584edb375d7711c5c3548ba711f">window focus callback</a> has been called.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the scroll callback of the specified window, which is called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.</p>
<p>The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new scroll callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the value of the GLFW timer. It then continues to count up from that value. The value must be a positive finite number less than or equal to 18446744073.0, which is approximately 584.5 years.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">time</td><td>The new value, in seconds.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>The upper limit of the timer is calculated as floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations storing nanoseconds in 64 bits. The limit may be increased in the future.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Reading and writing of the internal timer offset is not atomic, so it needs to be externally synchronized with calls to <aclass="el"href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a>.</dd></dl>
<p>See <aclass="el"href="input_guide.html#input_key">key input</a> for how these are used.</p>
<p>These key codes are inspired by the <em>USB HID Usage Tables v1.12</em> (p. 53-60), but re-arranged to map to 7-bit ASCII for printable keys (function keys are put in the 256+ range).</p>
<p>The naming of the key codes follow these rules:</p><ul>
<li>The US keyboard layout is used</li>
<li>Names of printable alpha-numeric characters are used (e.g. "A", "R", "3", etc.)</li>
<li>For non-alphanumeric characters, Unicode:ish names are used (e.g. "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not correspond to the Unicode standard (usually for brevity)</li>
<li>Keys that lack a clear US mapping are named "WORLD_x"</li>
<li>For non-printable keys, custom names are used (e.g. "F4", "BACKSPACE", etc.) </li>
<trclass="memdesc:ga14994d3196c290aaa347248e51740274"><tdclass="mdescLeft"> </td><tdclass="mdescRight">If this bit is set one or more Shift keys were held down. <ahref="#ga14994d3196c290aaa347248e51740274">More...</a><br/></td></tr>
<trclass="memdesc:ga6ed94871c3208eefd85713fa929d45aa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">If this bit is set one or more Control keys were held down. <ahref="#ga6ed94871c3208eefd85713fa929d45aa">More...</a><br/></td></tr>
<trclass="memdesc:gad2acd5633463c29e07008687ea73c0f4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">If this bit is set one or more Alt keys were held down. <ahref="#gad2acd5633463c29e07008687ea73c0f4">More...</a><br/></td></tr>
<trclass="memdesc:ga6b64ba10ea0227cf6f42efd0a220aba1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">If this bit is set one or more Super keys were held down. <ahref="#ga6b64ba10ea0227cf6f42efd0a220aba1">More...</a><br/></td></tr>
<trclass="memdesc:ga8a7ee579a66720f24d656526f3e44c63"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for monitor configuration callbacks. <ahref="#ga8a7ee579a66720f24d656526f3e44c63">More...</a><br/></td></tr>
<trclass="memdesc:ga3fba51c8bd36491d4712aa5bd074a537"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the currently connected monitors. <ahref="#ga3fba51c8bd36491d4712aa5bd074a537">More...</a><br/></td></tr>
<trclass="memdesc:ga721867d84c6d18d6790d64d2847ca0b1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the primary monitor. <ahref="#ga721867d84c6d18d6790d64d2847ca0b1">More...</a><br/></td></tr>
<trclass="memitem:ga102f54e7acc9149edbcf0997152df8c9"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a> (<aclass="el"href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *xpos, int *ypos)</td></tr>
<trclass="memdesc:ga102f54e7acc9149edbcf0997152df8c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the position of the monitor's viewport on the virtual screen. <ahref="#ga102f54e7acc9149edbcf0997152df8c9">More...</a><br/></td></tr>
<trclass="memitem:ga7d8bffc6c55539286a6bd20d32a8d7ea"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">glfwGetMonitorPhysicalSize</a> (<aclass="el"href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *widthMM, int *heightMM)</td></tr>
<trclass="memdesc:ga7d8bffc6c55539286a6bd20d32a8d7ea"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the physical size of the monitor. <ahref="#ga7d8bffc6c55539286a6bd20d32a8d7ea">More...</a><br/></td></tr>
<trclass="memdesc:ga79a34ee22ff080ca954a9663e4679daf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the name of the specified monitor. <ahref="#ga79a34ee22ff080ca954a9663e4679daf">More...</a><br/></td></tr>
<trclass="memitem:ga820b0ce9a5237d645ea7cbb4bd383458"><tdclass="memItemLeft"align="right"valign="top">const <aclass="el"href="structGLFWvidmode.html">GLFWvidmode</a> * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458">glfwGetVideoModes</a> (<aclass="el"href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *count)</td></tr>
<trclass="memdesc:ga820b0ce9a5237d645ea7cbb4bd383458"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the available video modes for the specified monitor. <ahref="#ga820b0ce9a5237d645ea7cbb4bd383458">More...</a><br/></td></tr>
<trclass="memdesc:gafc1bb972a921ad5b3bd5d63a95fc2d52"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the current mode of the specified monitor. <ahref="#gafc1bb972a921ad5b3bd5d63a95fc2d52">More...</a><br/></td></tr>
<trclass="memdesc:ga6ac582625c990220785ddd34efa3169a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Generates a gamma ramp and sets it for the specified monitor. <ahref="#ga6ac582625c990220785ddd34efa3169a">More...</a><br/></td></tr>
<trclass="memdesc:gab7c41deb2219bde3e1eb756ddaa9ec80"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the current gamma ramp for the specified monitor. <ahref="#gab7c41deb2219bde3e1eb756ddaa9ec80">More...</a><br/></td></tr>
<trclass="memdesc:ga583f0ffd0d29613d8cd172b996bbf0dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the current gamma ramp for the specified monitor. <ahref="#ga583f0ffd0d29613d8cd172b996bbf0dd">More...</a><br/></td></tr>
<p>This is the reference documentation for monitor related functions and types. For more task-oriented information, see the <aclass="el"href="monitor_guide.html">Monitor guide</a>. </p>
<aclass="el"href="group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80"title="Returns the current gamma ramp for the specified monitor. ">glfwGetGammaRamp</a><aclass="el"href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd"title="Sets the current gamma ramp for the specified monitor. ">glfwSetGammaRamp</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<aclass="el"href="group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52"title="Returns the current mode of the specified monitor. ">glfwGetVideoMode</a><aclass="el"href="group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458"title="Returns the available video modes for the specified monitor. ">glfwGetVideoModes</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function returns the current gamma ramp of the specified monitor.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The current gamma ramp, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The UTF-8 encoded name of the monitor, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the size, in millimetres, of the display area of the specified monitor.</p>
<p>Some systems do not provide accurate monitor size information, either because the monitor <ahref="https://en.wikipedia.org/wiki/Extended_display_identification_data">EDID</a> data is incorrect or because the driver does not report it accurately.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">widthMM</td><td>Where to store the width, in millimetres, of the monitor's display area, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">heightMM</td><td>Where to store the height, in millimetres, of the monitor's display area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Windows:</b> calculates the returned physical size from the current resolution and system DPI instead of querying the monitor EDID data.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.</p>
<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns <code>NULL</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">count</td><td>Where to store the number of monitors in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>An array of monitor handles, or <code>NULL</code> if no monitors were found or if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the primary monitor. This is usually the monitor where elements like the task bar or global menu bar are located.</p>
<dlclass="section return"><dt>Returns</dt><dd>The primary monitor, or <code>NULL</code> if no monitors were found or if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>The primary monitor is always first in the array returned by <aclass="el"href="group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537">glfwGetMonitors</a>.</dd></dl>
<aclass="el"href="group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537"title="Returns the currently connected monitors. ">glfwGetMonitors</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on whether that window is iconified.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The current mode of the monitor, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458"title="Returns the available video modes for the specified monitor. ">glfwGetVideoModes</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetDesktopMode</code>. </dd></dl>
<p>This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths) and then by resolution area (the product of width and height).</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">count</td><td>Where to store the number of video modes in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>An array of video modes, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52"title="Returns the current mode of the specified monitor. ">glfwGetVideoMode</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dlclass="section user"><dt></dt><dd><b>GLFW 3:</b> Changed to return an array of modes for a specific monitor. </dd></dl>
<p>This function generates a 256-element gamma ramp from the specified exponent and then calls <aclass="el"href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> with it. The value must be a finite number greater than zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this function is called and is restored by <aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ramp</td><td>The gamma ramp to use.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>Gamma ramp sizes other than 256 are not supported by all platforms or graphics hardware.</dd>
<dd>
<b>Windows:</b> The gamma ramp size must be 256.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The specified gamma ramp is copied before this function returns.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<trclass="memdesc:gac84f63a3f9db145b9435e5e0dbc4183d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the adapter device name of the specified monitor. <ahref="#gac84f63a3f9db145b9435e5e0dbc4183d">More...</a><br/></td></tr>
<trclass="memdesc:gac408b09a330749402d5d1fa1f5894dd9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the display device name of the specified monitor. <ahref="#gac408b09a330749402d5d1fa1f5894dd9">More...</a><br/></td></tr>
<trclass="memdesc:gafe5079aa79038b0079fc09d5f0a8e667"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>HWND</code> of the specified window. <ahref="#gafe5079aa79038b0079fc09d5f0a8e667">More...</a><br/></td></tr>
<trclass="memdesc:gadc4010d91d9cc1134d040eeb1202a143"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>HGLRC</code> of the specified window. <ahref="#gadc4010d91d9cc1134d040eeb1202a143">More...</a><br/></td></tr>
<trclass="memdesc:gaf22f429aec4b1aab316142d66d9be3e6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>CGDirectDisplayID</code> of the specified monitor. <ahref="#gaf22f429aec4b1aab316142d66d9be3e6">More...</a><br/></td></tr>
<trclass="memdesc:gac3ed9d495d0c2bb9652de5a50c648715"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>NSWindow</code> of the specified window. <ahref="#gac3ed9d495d0c2bb9652de5a50c648715">More...</a><br/></td></tr>
<trclass="memdesc:ga559e002e3cd63c979881770cd4dc63bc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>NSOpenGLContext</code> of the specified window. <ahref="#ga559e002e3cd63c979881770cd4dc63bc">More...</a><br/></td></tr>
<trclass="memdesc:ga8519b66594ea3ef6eeafaa2e3ee37406"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>Display</code> used by GLFW. <ahref="#ga8519b66594ea3ef6eeafaa2e3ee37406">More...</a><br/></td></tr>
<trclass="memdesc:ga088fbfa80f50569402b41be71ad66e40"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>RRCrtc</code> of the specified monitor. <ahref="#ga088fbfa80f50569402b41be71ad66e40">More...</a><br/></td></tr>
<trclass="memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>RROutput</code> of the specified monitor. <ahref="#gab2f8cc043905e9fa9b12bfdbbcfe874c">More...</a><br/></td></tr>
<trclass="memdesc:ga90ca676322740842db446999a1b1f21d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>Window</code> of the specified window. <ahref="#ga90ca676322740842db446999a1b1f21d">More...</a><br/></td></tr>
<trclass="memdesc:ga62d884114b0abfcdc2930e89f20867e2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>GLXContext</code> of the specified window. <ahref="#ga62d884114b0abfcdc2930e89f20867e2">More...</a><br/></td></tr>
<trclass="memdesc:ga1ed27b8766e859a21381e8f8ce18d049"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>GLXWindow</code> of the specified window. <ahref="#ga1ed27b8766e859a21381e8f8ce18d049">More...</a><br/></td></tr>
<trclass="memdesc:gaaf8118a3c877f3a6bc8e7a649519de5e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>struct wl_display*</code> used by GLFW. <ahref="#gaaf8118a3c877f3a6bc8e7a649519de5e">More...</a><br/></td></tr>
<trclass="memdesc:gab10427a667b6cd91eec7709f7a906bd3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>struct wl_output*</code> of the specified monitor. <ahref="#gab10427a667b6cd91eec7709f7a906bd3">More...</a><br/></td></tr>
<trclass="memdesc:ga4738d7aca4191363519a9a641c3ab64c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the main <code>struct wl_surface*</code> of the specified window. <ahref="#ga4738d7aca4191363519a9a641c3ab64c">More...</a><br/></td></tr>
<trclass="memdesc:ga40dd05325d9813fa67d61328c51d2930"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>MirConnection*</code> used by GLFW. <ahref="#ga40dd05325d9813fa67d61328c51d2930">More...</a><br/></td></tr>
<trclass="memdesc:gae0941c11dc8f01aeb7cbb563f5cd930b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the Mir output ID of the specified monitor. <ahref="#gae0941c11dc8f01aeb7cbb563f5cd930b">More...</a><br/></td></tr>
<trclass="memdesc:ga964d52bb7932216c379762eef1ea9b05"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>MirSurface*</code> of the specified window. <ahref="#ga964d52bb7932216c379762eef1ea9b05">More...</a><br/></td></tr>
<trclass="memdesc:ga1cd8d973f47aacb5532d368147cc3138"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>EGLDisplay</code> used by GLFW. <ahref="#ga1cd8d973f47aacb5532d368147cc3138">More...</a><br/></td></tr>
<trclass="memdesc:ga671c5072becd085f4ab5771a9c8efcf1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>EGLContext</code> of the specified window. <ahref="#ga671c5072becd085f4ab5771a9c8efcf1">More...</a><br/></td></tr>
<trclass="memdesc:ga2199b36117a6a695fec8441d8052eee6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code>EGLSurface</code> of the specified window. <ahref="#ga2199b36117a6a695fec8441d8052eee6">More...</a><br/></td></tr>
<p><b>By using the native access functions you assert that you know what you're doing and how to fix problems caused by using them. If you don't, you shouldn't be using them.</b></p>
<p>Before the inclusion of <aclass="el"href="glfw3native_8h.html">glfw3native.h</a>, you may define exactly one window system API macro and zero or more context creation API macros.</p>
<p>The chosen backends must match those the library was compiled for. Failure to do this will cause a link-time error.</p>
<p>The available window API macros are:</p><ul>
<li><code>GLFW_EXPOSE_NATIVE_WIN32</code></li>
<li><code>GLFW_EXPOSE_NATIVE_COCOA</code></li>
<li><code>GLFW_EXPOSE_NATIVE_X11</code></li>
<li><code>GLFW_EXPOSE_NATIVE_WAYLAND</code></li>
<li><code>GLFW_EXPOSE_NATIVE_MIR</code></li>
</ul>
<p>The available context API macros are:</p><ul>
<li><code>GLFW_EXPOSE_NATIVE_WGL</code></li>
<li><code>GLFW_EXPOSE_NATIVE_NSGL</code></li>
<li><code>GLFW_EXPOSE_NATIVE_GLX</code></li>
<li><code>GLFW_EXPOSE_NATIVE_EGL</code></li>
</ul>
<p>These macros select which of the native access functions that are declared and which platform-specific headers to include. It is then up your (by definition platform-specific) code to handle which of these should be defined. </p>
<dlclass="section return"><dt>Returns</dt><dd>The <code>CGDirectDisplayID</code> of the specified monitor, or <code>kCGNullDirectDisplay</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>NSWindow</code> of the specified window, or <code>nil</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>EGLContext</code> of the specified window, or <code>EGL_NO_CONTEXT</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>EGLDisplay</code> used by GLFW, or <code>EGL_NO_DISPLAY</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>EGLSurface</code> of the specified window, or <code>EGL_NO_SURFACE</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>GLXContext</code> of the specified window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>GLXWindow</code> of the specified window, or <code>None</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>MirConnection*</code> used by GLFW, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The Mir output ID of the specified monitor, or zero if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>MirSurface*</code> of the specified window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>NSOpenGLContext</code> of the specified window, or <code>nil</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>struct wl_display*</code> used by GLFW, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>struct wl_output*</code> of the specified monitor, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The main <code>struct wl_surface*</code> of the specified window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>HGLRC</code> of the specified window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The UTF-8 encoded adapter device name (for example <code>\\.\DISPLAY1</code>) of the specified monitor, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The UTF-8 encoded display device name (for example <code>\\.\DISPLAY1\Monitor0</code>) of the specified monitor, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>HWND</code> of the specified window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>RRCrtc</code> of the specified monitor, or <code>None</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>Display</code> used by GLFW, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>RROutput</code> of the specified monitor, or <code>None</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The <code>Window</code> of the specified window, or <code>None</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<trclass="memdesc:ga1db35e20849e0837c82e3dc1fd797263"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The hand shape. <ahref="#ga1db35e20849e0837c82e3dc1fd797263">More...</a><br/></td></tr>
<trclass="memdesc:ga70c01918dc9d233a4fbe0681a43018af"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Vulkan API function pointer type. <ahref="#ga70c01918dc9d233a4fbe0681a43018af">More...</a><br/></td></tr>
<trclass="memdesc:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether the Vulkan loader has been found. <ahref="#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">More...</a><br/></td></tr>
<trclass="memdesc:ga1abcbe61033958f22f63ef82008874b1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the Vulkan instance extensions required by GLFW. <ahref="#ga1abcbe61033958f22f63ef82008874b1">More...</a><br/></td></tr>
<trclass="memdesc:gadf228fac94c5fd8f12423ec9af9ff1e9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the address of the specified Vulkan instance function. <ahref="#gadf228fac94c5fd8f12423ec9af9ff1e9">More...</a><br/></td></tr>
<trclass="memdesc:gaff3823355cdd7e2f3f9f4d9ea9518d92"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether the specified queue family can present images. <ahref="#gaff3823355cdd7e2f3f9f4d9ea9518d92">More...</a><br/></td></tr>
<trclass="memdesc:ga1a24536bec3f80b08ead18e28e6ae965"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a Vulkan surface for the specified window. <ahref="#ga1a24536bec3f80b08ead18e28e6ae965">More...</a><br/></td></tr>
<p>This is the reference documentation for Vulkan related functions and types. For more task-oriented information, see the <aclass="el"href="vulkan_guide.html">Vulkan guide</a>. </p>
<p>Generic function pointer used for returning Vulkan API function pointers without forcing a cast from a regular pointer.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a></dd>
<dd>
<aclass="el"href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9"title="Returns the address of the specified Vulkan instance function. ">glfwGetInstanceProcAddress</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function creates a Vulkan surface for the specified window.</p>
<p>If the Vulkan loader was not found at initialization, this function returns <code>VK_ERROR_INITIALIZATION_FAILED</code> and generates a <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <aclass="el"href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether the Vulkan loader was found.</p>
<p>If the required window surface creation instance extensions are not available or if the specified instance was not created with these extensions enabled, this function returns <code>VK_ERROR_EXTENSION_NOT_PRESENT</code> and generates a <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <aclass="el"href="group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
<p>The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the caller to destroy the window surface. GLFW does not destroy it for you. Call <code>vkDestroySurfaceKHR</code> to destroy the surface.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">instance</td><td>The Vulkan instance to create the surface in. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to create the surface for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">allocator</td><td>The allocator to use, or <code>NULL</code> to use the default allocator. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">surface</td><td>Where to store the handle of the surface. This is set to <code>VK_NULL_HANDLE</code> if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>VK_SUCCESS</code> if successful, or a Vulkan error code if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for the error. Appropriate use of <aclass="el"href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> and <aclass="el"href="group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1">glfwGetRequiredInstanceExtensions</a> should eliminate almost all occurrences of these errors.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="vulkan_guide.html#vulkan_surface">Creating a Vulkan window surface</a></dd>
<dd>
<aclass="el"href="group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1"title="Returns the Vulkan instance extensions required by GLFW. ">glfwGetRequiredInstanceExtensions</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to <code>NULL</code> it can return any function exported from the Vulkan loader, including at least the following functions:</p>
<p>If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <aclass="el"href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is available.</p>
<p>This function is equivalent to calling <code>vkGetInstanceProcAddr</code> with a platform-specific query of the Vulkan loader as a fallback.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">instance</td><td>The Vulkan instance to query, or <code>NULL</code> to retrieve functions related to instance creation. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function returns whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for.</p>
<p>If Vulkan or the required window surface creation instance extensions are not available on the machine, or if the specified instance was not created with the required extensions, this function returns <code>GLFW_FALSE</code> and generates a <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <aclass="el"href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is available and <aclass="el"href="group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">instance</td><td>The instance that the physical device belongs to. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">device</td><td>The physical device that the queue family belongs to. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">queuefamily</td><td>The index of the queue family to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the queue family supports presentation, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="vulkan_guide.html#vulkan_present">Querying for Vulkan presentation support</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will always contains <code>VK_KHR_surface</code>, so if you don't require any additional extensions you can pass this list directly to the <code>VkInstanceCreateInfo</code> struct.</p>
<p>If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <aclass="el"href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is available.</p>
<p>If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns <code>NULL</code>. You may still use Vulkan for off-screen rendering and compute work.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">count</td><td>Where to store the number of extensions in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>An array of ASCII encoded extension names, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>Additional extensions may be required by future versions of GLFW. You should check if any extensions you wish to enable are already in the returned array, as it is an error to specify an extension more than once in the <code>VkInstanceCreateInfo</code> struct.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the library is terminated.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965"title="Creates a Vulkan surface for the specified window. ">glfwCreateWindowSurface</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function returns whether the Vulkan loader has been found. This check is performed by <aclass="el"href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</p>
<p>The availability of a Vulkan loader does not by itself guarantee that window surface creation or even device creation is possible. Call <aclass="el"href="group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1">glfwGetRequiredInstanceExtensions</a> to check whether the extensions necessary for Vulkan surface creation are available and <aclass="el"href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> to check whether a queue family of a physical device supports image presentation.</p>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if Vulkan is available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="vulkan_guide.html#vulkan_support">Querying for Vulkan support</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<trclass="memdesc:gafd8db81fdb0e850549dc6bace5ed697a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for window position callbacks. <ahref="#gafd8db81fdb0e850549dc6bace5ed697a">More...</a><br/></td></tr>
<trclass="memdesc:gae49ee6ebc03fa2da024b89943a331355"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for window resize callbacks. <ahref="#gae49ee6ebc03fa2da024b89943a331355">More...</a><br/></td></tr>
<trclass="memdesc:ga93e7c2555bd837f4ed8b20f76cada72e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for window close callbacks. <ahref="#ga93e7c2555bd837f4ed8b20f76cada72e">More...</a><br/></td></tr>
<trclass="memdesc:ga7a56f9e0227e2cd9470d80d919032e08"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for window content refresh callbacks. <ahref="#ga7a56f9e0227e2cd9470d80d919032e08">More...</a><br/></td></tr>
<trclass="memdesc:ga58be2061828dd35080bb438405d3a7e2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for window focus/defocus callbacks. <ahref="#ga58be2061828dd35080bb438405d3a7e2">More...</a><br/></td></tr>
<trclass="memdesc:gad2d4e4c3d28b1242e742e8268b9528af"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for window iconify/restore callbacks. <ahref="#gad2d4e4c3d28b1242e742e8268b9528af">More...</a><br/></td></tr>
<trclass="memdesc:ga3e218ef9ff826129c55a7d5f6971a285"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function signature for framebuffer resize callbacks. <ahref="#ga3e218ef9ff826129c55a7d5f6971a285">More...</a><br/></td></tr>
<trclass="memdesc:gaa77c4898dfb83344a6b4f76aa16b9a4a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Resets all window hints to their default values. <ahref="#gaa77c4898dfb83344a6b4f76aa16b9a4a">More...</a><br/></td></tr>
<trclass="memitem:ga7d9c8c62384b1e2821c4dc48952d2033"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a> (int hint, int value)</td></tr>
<trclass="memdesc:ga7d9c8c62384b1e2821c4dc48952d2033"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the specified window hint to the desired value. <ahref="#ga7d9c8c62384b1e2821c4dc48952d2033">More...</a><br/></td></tr>
<trclass="memdesc:ga5c336fddf2cbb5b92f65f10fb6043344"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a window and its associated context. <ahref="#ga5c336fddf2cbb5b92f65f10fb6043344">More...</a><br/></td></tr>
<trclass="memdesc:gacdf43e51376051d2c091662e9fe3d7b2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Destroys the specified window and its context. <ahref="#gacdf43e51376051d2c091662e9fe3d7b2">More...</a><br/></td></tr>
<trclass="memdesc:ga24e02fbfefbb81fc45320989f8140ab5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Checks the close flag of the specified window. <ahref="#ga24e02fbfefbb81fc45320989f8140ab5">More...</a><br/></td></tr>
<trclass="memitem:ga49c449dde2a6f87d996f4daaa09d6708"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int value)</td></tr>
<trclass="memdesc:ga49c449dde2a6f87d996f4daaa09d6708"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the close flag of the specified window. <ahref="#ga49c449dde2a6f87d996f4daaa09d6708">More...</a><br/></td></tr>
<trclass="memdesc:ga5d877f09e968cef7a360b513306f17ff"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the title of the specified window. <ahref="#ga5d877f09e968cef7a360b513306f17ff">More...</a><br/></td></tr>
<trclass="memitem:gadd7ccd39fe7a7d1f0904666ae5932dc5"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int count, const <aclass="el"href="structGLFWimage.html">GLFWimage</a> *images)</td></tr>
<trclass="memdesc:gadd7ccd39fe7a7d1f0904666ae5932dc5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the icon for the specified window. <ahref="#gadd7ccd39fe7a7d1f0904666ae5932dc5">More...</a><br/></td></tr>
<trclass="memitem:ga73cb526c000876fd8ddf571570fdb634"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga73cb526c000876fd8ddf571570fdb634">glfwGetWindowPos</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *xpos, int *ypos)</td></tr>
<trclass="memdesc:ga73cb526c000876fd8ddf571570fdb634"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the position of the client area of the specified window. <ahref="#ga73cb526c000876fd8ddf571570fdb634">More...</a><br/></td></tr>
<trclass="memitem:ga1abb6d690e8c88e0c8cd1751356dbca8"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8">glfwSetWindowPos</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int xpos, int ypos)</td></tr>
<trclass="memdesc:ga1abb6d690e8c88e0c8cd1751356dbca8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the position of the client area of the specified window. <ahref="#ga1abb6d690e8c88e0c8cd1751356dbca8">More...</a><br/></td></tr>
<trclass="memitem:gaeea7cbc03373a41fb51cfbf9f2a5d4c6"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height)</td></tr>
<trclass="memdesc:gaeea7cbc03373a41fb51cfbf9f2a5d4c6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the size of the client area of the specified window. <ahref="#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">More...</a><br/></td></tr>
<trclass="memitem:gac314fa6cec7d2d307be9963e2709cc90"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">glfwSetWindowSizeLimits</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int minwidth, int minheight, int maxwidth, int maxheight)</td></tr>
<trclass="memdesc:gac314fa6cec7d2d307be9963e2709cc90"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the size limits of the specified window. <ahref="#gac314fa6cec7d2d307be9963e2709cc90">More...</a><br/></td></tr>
<trclass="memitem:ga72ac8cb1ee2e312a878b55153d81b937"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">glfwSetWindowAspectRatio</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int numer, int denom)</td></tr>
<trclass="memdesc:ga72ac8cb1ee2e312a878b55153d81b937"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the aspect ratio of the specified window. <ahref="#ga72ac8cb1ee2e312a878b55153d81b937">More...</a><br/></td></tr>
<trclass="memitem:ga371911f12c74c504dd8d47d832d095cb"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int width, int height)</td></tr>
<trclass="memdesc:ga371911f12c74c504dd8d47d832d095cb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the size of the client area of the specified window. <ahref="#ga371911f12c74c504dd8d47d832d095cb">More...</a><br/></td></tr>
<trclass="memitem:ga0e2637a4161afb283f5300c7f94785c9"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height)</td></tr>
<trclass="memdesc:ga0e2637a4161afb283f5300c7f94785c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the size of the framebuffer of the specified window. <ahref="#ga0e2637a4161afb283f5300c7f94785c9">More...</a><br/></td></tr>
<trclass="memitem:ga1a9fd382058c53101b21cf211898f1f1"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga1a9fd382058c53101b21cf211898f1f1">glfwGetWindowFrameSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *left, int *top, int *right, int *bottom)</td></tr>
<trclass="memdesc:ga1a9fd382058c53101b21cf211898f1f1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the size of the frame of the window. <ahref="#ga1a9fd382058c53101b21cf211898f1f1">More...</a><br/></td></tr>
<trclass="memdesc:ga1bb559c0ebaad63c5c05ad2a066779c4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Iconifies the specified window. <ahref="#ga1bb559c0ebaad63c5c05ad2a066779c4">More...</a><br/></td></tr>
<trclass="memdesc:ga52527a5904b47d802b6b4bb519cdebc7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Restores the specified window. <ahref="#ga52527a5904b47d802b6b4bb519cdebc7">More...</a><br/></td></tr>
<trclass="memdesc:ga3f541387449d911274324ae7f17ec56b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Maximizes the specified window. <ahref="#ga3f541387449d911274324ae7f17ec56b">More...</a><br/></td></tr>
<trclass="memdesc:ga49401f82a1ba5f15db5590728314d47c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Hides the specified window. <ahref="#ga49401f82a1ba5f15db5590728314d47c">More...</a><br/></td></tr>
<trclass="memdesc:ga873780357abd3f3a081d71a40aae45a1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Brings the specified window to front and sets input focus. <ahref="#ga873780357abd3f3a081d71a40aae45a1">More...</a><br/></td></tr>
<trclass="memdesc:gaeac25e64789974ccbe0811766bd91a16"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the monitor that the window uses for full screen mode. <ahref="#gaeac25e64789974ccbe0811766bd91a16">More...</a><br/></td></tr>
<trclass="memitem:ga81c76c418af80a1cce7055bccb0ae0a7"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <aclass="el"href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int xpos, int ypos, int width, int height, int refreshRate)</td></tr>
<trclass="memdesc:ga81c76c418af80a1cce7055bccb0ae0a7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the mode, monitor, video mode and placement of a window. <ahref="#ga81c76c418af80a1cce7055bccb0ae0a7">More...</a><br/></td></tr>
<trclass="memitem:gacccb29947ea4b16860ebef42c2cb9337"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int attrib)</td></tr>
<trclass="memdesc:gacccb29947ea4b16860ebef42c2cb9337"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns an attribute of the specified window. <ahref="#gacccb29947ea4b16860ebef42c2cb9337">More...</a><br/></td></tr>
<trclass="memdesc:ga3d2fc6026e690ab31a13f78bc9fd3651"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the user pointer of the specified window. <ahref="#ga3d2fc6026e690ab31a13f78bc9fd3651">More...</a><br/></td></tr>
<trclass="memdesc:ga17807ce0f45ac3f8bb50d6dcc59a4e06"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the user pointer of the specified window. <ahref="#ga17807ce0f45ac3f8bb50d6dcc59a4e06">More...</a><br/></td></tr>
<trclass="memdesc:ga2837d4d240659feb4268fcb6530a6ba1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the position callback for the specified window. <ahref="#ga2837d4d240659feb4268fcb6530a6ba1">More...</a><br/></td></tr>
<trclass="memdesc:gaa40cd24840daa8c62f36cafc847c72b6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the size callback for the specified window. <ahref="#gaa40cd24840daa8c62f36cafc847c72b6">More...</a><br/></td></tr>
<trclass="memdesc:gaade9264e79fae52bdb78e2df11ee8d6a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the close callback for the specified window. <ahref="#gaade9264e79fae52bdb78e2df11ee8d6a">More...</a><br/></td></tr>
<trclass="memdesc:ga4569b76e8ac87c55b53199e6becd97eb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the refresh callback for the specified window. <ahref="#ga4569b76e8ac87c55b53199e6becd97eb">More...</a><br/></td></tr>
<trclass="memdesc:ga25d1c584edb375d7711c5c3548ba711f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the focus callback for the specified window. <ahref="#ga25d1c584edb375d7711c5c3548ba711f">More...</a><br/></td></tr>
<trclass="memdesc:gab1ea7263081c0e073b8d5b91d6ffd367"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the iconify callback for the specified window. <ahref="#gab1ea7263081c0e073b8d5b91d6ffd367">More...</a><br/></td></tr>
<trclass="memdesc:ga3203461a5303bf289f2e05f854b2f7cf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the framebuffer resize callback for the specified window. <ahref="#ga3203461a5303bf289f2e05f854b2f7cf">More...</a><br/></td></tr>
<trclass="memdesc:ga37bd57223967b4211d60ca1a0bf3c832"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Processes all pending events. <ahref="#ga37bd57223967b4211d60ca1a0bf3c832">More...</a><br/></td></tr>
<trclass="memdesc:ga554e37d781f0a997656c26b2c56c835e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Waits until events are queued and processes them. <ahref="#ga554e37d781f0a997656c26b2c56c835e">More...</a><br/></td></tr>
<trclass="memdesc:ga605a178db92f1a7f1a925563ef3ea2cf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Waits with timeout until events are queued and processes them. <ahref="#ga605a178db92f1a7f1a925563ef3ea2cf">More...</a><br/></td></tr>
<trclass="memdesc:gab5997a25187e9fd5c6f2ecbbc8dfd7e9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Posts an empty event to the event queue. <ahref="#gab5997a25187e9fd5c6f2ecbbc8dfd7e9">More...</a><br/></td></tr>
<trclass="memdesc:ga15a5a1ee5b3c2ca6b15ca209a12efd14"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Swaps the front and back buffers of the specified window. <ahref="#ga15a5a1ee5b3c2ca6b15ca209a12efd14">More...</a><br/></td></tr>
<p>This is the reference documentation for window related functions and types, including creation, deletion and event polling. For more task-oriented information, see the <aclass="el"href="window_guide.html">Window guide</a>. </p>
<aclass="el"href="group__window.html#ga3203461a5303bf289f2e05f854b2f7cf"title="Sets the framebuffer resize callback for the specified window. ">glfwSetFramebufferSizeCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This is the function signature for window close callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that the user attempted to close.</td></tr>
</table>
</dd>
</dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd>
<dd>
<aclass="el"href="group__window.html#gaade9264e79fae52bdb78e2df11ee8d6a"title="Sets the close callback for the specified window. ">glfwSetWindowCloseCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. </dd></dl>
<p>This is the function signature for window focus callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that gained or lost input focus. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">focused</td><td><code>GLFW_TRUE</code> if the window was given input focus, or <code>GLFW_FALSE</code> if it lost it.</td></tr>
<aclass="el"href="group__window.html#ga25d1c584edb375d7711c5c3548ba711f"title="Sets the focus callback for the specified window. ">glfwSetWindowFocusCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This is the function signature for window iconify/restore callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that was iconified or restored. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">iconified</td><td><code>GLFW_TRUE</code> if the window was iconified, or <code>GLFW_FALSE</code> if it was restored.</td></tr>
<aclass="el"href="group__window.html#gab1ea7263081c0e073b8d5b91d6ffd367"title="Sets the iconify callback for the specified window. ">glfwSetWindowIconifyCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This is the function signature for window position callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that was moved. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The new x-coordinate, in screen coordinates, of the upper-left corner of the client area of the window. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The new y-coordinate, in screen coordinates, of the upper-left corner of the client area of the window.</td></tr>
<aclass="el"href="group__window.html#ga2837d4d240659feb4268fcb6530a6ba1"title="Sets the position callback for the specified window. ">glfwSetWindowPosCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This is the function signature for window refresh callback functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose content needs to be refreshed.</td></tr>
</table>
</dd>
</dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_refresh">Window damage and refresh</a></dd>
<dd>
<aclass="el"href="group__window.html#ga4569b76e8ac87c55b53199e6becd97eb"title="Sets the refresh callback for the specified window. ">glfwSetWindowRefreshCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. </dd></dl>
<aclass="el"href="group__window.html#gaa40cd24840daa8c62f36cafc847c72b6"title="Sets the size callback for the specified window. ">glfwSetWindowSizeCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function creates a window and its associated OpenGL or OpenGL ES context. Most of the options controlling how the window and its context should be created are specified with <aclass="el"href="window_guide.html#window_hints">window hints</a>.</p>
<p>Successful creation does not change which context is current. Before you can use the newly created context, you need to <aclass="el"href="context_guide.html#context_current">make it current</a>. For information about the <code>share</code> parameter, see <aclass="el"href="context_guide.html#context_sharing">Context object sharing</a>.</p>
<p>The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are <aclass="el"href="window_guide.html#window_hints_hard">hard constraints</a>. This includes the size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, see <aclass="el"href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>, <aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a> and <aclass="el"href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a>.</p>
<p>To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to query connected monitors, see <aclass="el"href="monitor_guide.html#monitor_monitors">Retrieving monitors</a>.</p>
<p>For full screen windows, the specified size becomes the resolution of the window's <em>desired video mode</em>. As long as a full screen window is not iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full screen windows, including the creation of so called <em>windowed full screen</em> or <em>borderless full screen</em> windows, see <aclass="el"href="window_guide.html#window_windowed_full_screen">"Windowed full screen" windows</a>.</p>
<p>Once you have created the window, you can switch it between windowed and full screen mode with <aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>. If the window has an OpenGL or OpenGL ES context, it will be unaffected.</p>
<p>By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, make it initially invisible using the <aclass="el"href="window_guide.html#window_hints_wnd">GLFW_VISIBLE</a> window hint, set its <aclass="el"href="window_guide.html#window_pos">position</a> and then <aclass="el"href="window_guide.html#window_hide">show</a> it.</p>
<p>As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.</p>
<p>Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the actual <aclass="el"href="window_guide.html#window_size">size</a> after creation.</p>
<p>The <aclass="el"href="window_guide.html#buffer_swap">swap interval</a> is not set during window creation and the initial value may vary depending on driver settings and defaults.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The desired width, in screen coordinates, of the window. This must be greater than zero. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The desired height, in screen coordinates, of the window. This must be greater than zero. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to use for full screen mode, or <code>NULL</code> for windowed mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">share</td><td>The window whose context to share resources with, or <code>NULL</code> to not share resources. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The handle of the created window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>, <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>, <aclass="el"href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a>, <aclass="el"href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Windows:</b> Window creation will fail if the Microsoft GDI software OpenGL implementation is the only one available.</dd>
<dd>
<b>Windows:</b> If the executable has an icon resource named <code>GLFW_ICON,</code> it will be set as the initial icon for the window. If no such icon is present, the <code>IDI_WINLOGO</code> icon will be used instead. To set a different icon, see <aclass="el"href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a>.</dd>
<dd>
<b>Windows:</b> The context to share resources with must not be current on any other thread.</dd>
<dd>
<b>OS X:</b> The GLFW window has no icon, as it is not a document window, but the dock icon will be the same as the application bundle's icon. For more information on bundles, see the <ahref="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/">Bundle Programming Guide</a> in the Mac Developer Library.</dd>
<dd>
<b>OS X:</b> The first time a window is created the menu bar is populated with common commands like Hide, Quit and About. The About entry opens a minimal about dialog with information from the application's bundle. The menu bar can be disabled with a <aclass="el"href="compile_guide.html#compile_options_osx">compile-time option</a>.</dd>
<dd>
<b>OS X:</b> On OS X 10.10 and later the window frame will not be rendered at full resolution on Retina displays unless the <code>NSHighResolutionCapable</code> key is enabled in the application bundle's <code>Info.plist</code>. For more information, see <ahref="https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html">High Resolution Guidelines for OS X</a> in the Mac Developer Library. The GLFW test and example programs use a custom <code>Info.plist</code> template for this, which can be found as <code>CMake/MacOSXBundleInfo.plist.in</code> in the source tree.</dd>
<dd>
<b>X11:</b> Some window managers will not respect the placement of initially hidden windows.</dd>
<dd>
<b>X11:</b> Due to the asynchronous nature of X11, it may take a moment for a window to reach its requested state. This means you may not be able to query the final size, position or other attributes directly after window creation.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2"title="Destroys the specified window and its context. ">glfwDestroyWindow</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwOpenWindow</code>. </dd></dl>
<p>This function resets all window hints to their <aclass="el"href="window_guide.html#window_hints_values">default values</a>.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033"title="Sets the specified window hint to the desired value. ">glfwWindowHint</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function destroys the specified window and its context. On calling this function, no further callbacks will be called for that window.</p>
<p>If the context of the specified window is current on the main thread, it is detached before being destroyed.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to destroy.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The context of the specified window must not be current on any other thread when this function is called.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344"title="Creates a window and its associated context. ">glfwCreateWindow</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwCloseWindow</code>. </dd></dl>
<p>This function brings the specified window to front and sets input focus. The window should already be visible and not iconified.</p>
<p>By default, both windowed and full screen mode windows are focused when initially created. Set the <aclass="el"href="window_guide.html#window_hints_wnd">GLFW_FOCUSED</a> to disable this behavior.</p>
<p><b>Do not use this function</b> to steal focus from other applications unless you are certain that is what the user wants. Focus stealing can be extremely disruptive.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to give input focus.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function retrieves the size, in pixels, of the framebuffer of the specified window. If you wish to retrieve the size of the window in screen coordinates, see <aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a>.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose framebuffer to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">width</td><td>Where to store the width, in pixels, of the framebuffer, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">height</td><td>Where to store the height, in pixels, of the framebuffer, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga3203461a5303bf289f2e05f854b2f7cf"title="Sets the framebuffer resize callback for the specified window. ">glfwSetFramebufferSizeCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function returns the value of an attribute of the specified window or its OpenGL or OpenGL ES context.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">attrib</td><td>The <aclass="el"href="window_guide.html#window_attribs">window attribute</a> whose value to return. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The value of the attribute, or zero if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>Framebuffer related hints are not window attributes. See <aclass="el"href="window_guide.html#window_attribs_fb">Framebuffer related attributes</a> for more information.</dd>
<dd>
Zero is a valid value for many window and context related attributes so you cannot use a return value of zero as an indication of errors. However, this function should not fail as long as it is passed valid arguments and the library has been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetWindowParam</code> and <code>glfwGetGLVersion</code>. </dd></dl>
<p>This function retrieves the size, in screen coordinates, of each edge of the frame of the specified window. This size includes the title bar, if the window has one. The size of the frame may vary depending on the <aclass="el"href="window_guide.html#window_hints_wnd">window-related hints</a> used to create it.</p>
<p>Because this function retrieves the size of each window frame edge and not the offset along a particular coordinate axis, the retrieved values will always be zero or positive.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose frame size to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">left</td><td>Where to store the size, in screen coordinates, of the left edge of the window frame, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">top</td><td>Where to store the size, in screen coordinates, of the top edge of the window frame, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">right</td><td>Where to store the size, in screen coordinates, of the right edge of the window frame, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">bottom</td><td>Where to store the size, in screen coordinates, of the bottom edge of the window frame, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the handle of the monitor that the specified window is in full screen on.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The monitor, or <code>NULL</code> if the window is in windowed mode or an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7"title="Sets the mode, monitor, video mode and placement of a window. ">glfwSetWindowMonitor</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function retrieves the position, in screen coordinates, of the upper-left corner of the client area of the specified window.</p>
<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">xpos</td><td>Where to store the x-coordinate of the upper-left corner of the client area, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">ypos</td><td>Where to store the y-coordinate of the upper-left corner of the client area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8"title="Sets the position of the client area of the specified window. ">glfwSetWindowPos</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function retrieves the size, in screen coordinates, of the client area of the specified window. If you wish to retrieve the size of the framebuffer of the window in pixels, see <aclass="el"href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a>.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose size to retrieve. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">width</td><td>Where to store the width, in screen coordinates, of the client area, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">height</td><td>Where to store the height, in screen coordinates, of the client area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga371911f12c74c504dd8d47d832d095cb"title="Sets the size of the client area of the specified window. ">glfwSetWindowSize</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function returns the current value of the user-defined pointer of the specified window. The initial value is <code>NULL</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose pointer to return.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<aclass="el"href="group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651"title="Sets the user pointer of the specified window. ">glfwSetWindowUserPointer</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function hides the specified window if it was previously visible. If the window is already hidden or is in full screen mode, this function does nothing.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to hide.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function iconifies (minimizes) the specified window if it was previously restored. If the window is already iconified, this function does nothing.</p>
<p>If the specified window is a full screen window, the original monitor resolution is restored until the window is restored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to iconify.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function maximizes the specified window if it was previously not maximized. If the window is already maximized, this function does nothing.</p>
<p>If the specified window is a full screen window, this function does nothing.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to maximize.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread Safety</dt><dd>This function may only be called from the main thread.</dd></dl>
<p>This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>
<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <aclass="el"href="window_guide.html#window_refresh">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>
<p>On some platforms, certain events are sent directly to the application without going through the event queue, causing callbacks to be called outside of a call to one of the event processing functions.</p>
<p>Event processing is not required for joystick input to work.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga554e37d781f0a997656c26b2c56c835e"title="Waits until events are queued and processes them. ">glfwWaitEvents</a></dd>
<dd>
<aclass="el"href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf"title="Waits with timeout until events are queued and processes them. ">glfwWaitEventsTimeout</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function posts an empty event from the current thread to the event queue, causing <aclass="el"href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a> or <aclass="el"href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">glfwWaitEventsTimeout</a> to return.</p>
<p>If no windows exist, this function returns immediately. For synchronization of threads in applications that do not create windows, use your threading library of choice.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__window.html#ga554e37d781f0a997656c26b2c56c835e"title="Waits until events are queued and processes them. ">glfwWaitEvents</a></dd>
<dd>
<aclass="el"href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf"title="Waits with timeout until events are queued and processes them. ">glfwWaitEventsTimeout</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<p>This function restores the specified window if it was previously iconified (minimized) or maximized. If the window is already restored, this function does nothing.</p>
<p>If the specified window is a full screen window, the resolution chosen for the window is restored on the selected monitor.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to restore.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the required aspect ratio of the client area of the specified window. If the window is full screen, the aspect ratio only takes effect once it is made windowed. If the window is not resizable, this function does nothing.</p>
<p>The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For example, the common 16:9 aspect ratio is specified as 16 and 9, respectively.</p>
<p>If the numerator and denominator is set to <code>GLFW_DONT_CARE</code> then the aspect ratio limit is disabled.</p>
<p>The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set limits for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">numer</td><td>The numerator of the desired aspect ratio, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">denom</td><td>The denominator of the desired aspect ratio, or <code>GLFW_DONT_CARE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>If you set size limits and an aspect ratio that conflict, the results are undefined.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90"title="Sets the size limits of the specified window. ">glfwSetWindowSizeLimits</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in the title bar.</p>
<p>The close flag is set before this callback is called, but you can modify it at any time with <aclass="el"href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a>.</p>
<p>The close callback is not triggered by <aclass="el"href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>OS X:</b> Selecting Quit from the application menu will trigger the close callback for all windows.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. </dd></dl>
<p>This function sets the focus callback of the specified window, which is called when the window gains or loses input focus.</p>
<p>After the focus callback is called for a window that lost input focus, synthetic key and mouse button release events will be generated for all such that had been pressed. For more information, see <aclass="el"href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155">glfwSetKeyCallback</a> and <aclass="el"href="group__input.html#gaef49b72d84d615bca0a6ed65485e035d">glfwSetMouseButtonCallback</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the icon of the specified window. If passed an array of candidate images, those of or closest to the sizes desired by the system are selected. If no images are specified, the window reverts to its default icon.</p>
<p>The desired image sizes varies depending on platform and system settings. The selected images will be rescaled as needed. Good sizes include 16x16, 32x32 and 48x48.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose icon to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">count</td><td>The number of images in the specified array, or zero to revert to the default window icon. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">images</td><td>The images to create the icon from. This is ignored if count is zero.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>OS X:</b> The GLFW window has no icon, as it is not a document window, so this function does nothing. The dock icon will be the same as the application bundle's icon. For more information on bundles, see the <ahref="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/">Bundle Programming Guide</a> in the Mac Developer Library.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the iconification callback of the specified window, which is called when the window is iconified or restored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the monitor that the window uses for full screen mode or, if the monitor is <code>NULL</code>, makes it windowed mode.</p>
<p>When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to it. The window position is ignored when setting a monitor.</p>
<p>When the monitor is <code>NULL</code>, the position, width and height are used to place the window client area. The refresh rate is ignored when no monitor is specified.</p>
<p>If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see <aclass="el"href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a>.</p>
<p>When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc..</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose monitor, size or video mode to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The desired monitor, or <code>NULL</code> to set windowed mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The desired x-coordinate of the upper-left corner of the client area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The desired y-coordinate of the upper-left corner of the client area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The desired with, in screen coordinates, of the client area or video mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The desired height, in screen coordinates, of the client area or video mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">refreshRate</td><td>The desired refresh rate, in Hz, of the video mode, or <code>GLFW_DONT_CARE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#gaeac25e64789974ccbe0811766bd91a16"title="Returns the monitor that the window uses for full screen mode. ">glfwGetWindowMonitor</a></dd>
<dd>
<aclass="el"href="group__window.html#ga371911f12c74c504dd8d47d832d095cb"title="Sets the size of the client area of the specified window. ">glfwSetWindowSize</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function sets the position, in screen coordinates, of the upper-left corner of the client area of the specified windowed mode window. If the window is a full screen window, this function does nothing.</p>
<p><b>Do not use this function</b> to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.</p>
<p>The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The x-coordinate of the upper-left corner of the client area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The y-coordinate of the upper-left corner of the client area.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga73cb526c000876fd8ddf571570fdb634"title="Retrieves the position of the client area of the specified window. ">glfwGetWindowPos</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function sets the position callback of the specified window, which is called when the window is moved. The callback is provided with the screen position of the upper-left corner of the client area of the window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the refresh callback of the specified window, which is called when the client area of the window needs to be redrawn, for example if the window has been exposed after having been covered by another window.</p>
<p>On compositing window systems such as Aero, Compiz or Aqua, where the window contents are saved off-screen, this callback may be called only very infrequently or never at all.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_refresh">Window damage and refresh</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. </dd></dl>
<p>This function sets the value of the close flag of the specified window. This can be used to override the user's attempt to close the window, or to signal that it should be closed.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose flag to change. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The new value.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function sets the size, in screen coordinates, of the client area of the specified window.</p>
<p>For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.</p>
<p>If you wish to update the refresh rate of the desired video mode in addition to its resolution, see <aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>.</p>
<p>The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to resize. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The desired width, in screen coordinates, of the window client area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The desired height, in screen coordinates, of the window client area.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6"title="Retrieves the size of the client area of the specified window. ">glfwGetWindowSize</a></dd>
<dd>
<aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7"title="Sets the mode, monitor, video mode and placement of a window. ">glfwSetWindowMonitor</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function sets the size callback of the specified window, which is called when the window is resized. The callback is provided with the size, in screen coordinates, of the client area of the window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the size limits of the client area of the specified window. If the window is full screen, the size limits only take effect once it is made windowed. If the window is not resizable, this function does nothing.</p>
<p>The size limits are applied immediately to a windowed mode window and may cause it to be resized.</p>
<p>The maximum dimensions must be greater than or equal to the minimum dimensions and all must be greater than or equal to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set limits for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">minwidth</td><td>The minimum width, in screen coordinates, of the client area, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">minheight</td><td>The minimum height, in screen coordinates, of the client area, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">maxwidth</td><td>The maximum width, in screen coordinates, of the client area, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">maxheight</td><td>The maximum height, in screen coordinates, of the client area, or <code>GLFW_DONT_CARE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>If you set size limits and an aspect ratio that conflict, the results are undefined.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937"title="Sets the aspect ratio of the specified window. ">glfwSetWindowAspectRatio</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>OS X:</b> The window title will not be updated until the next time you process events.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the user-defined pointer of the specified window. The current value is retained until the window is destroyed. The initial value is <code>NULL</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose pointer to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">pointer</td><td>The new value.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<aclass="el"href="group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06"title="Returns the user pointer of the specified window. ">glfwGetWindowUserPointer</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function makes the specified window visible if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to make visible.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.</p>
<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <aclass="el"href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see <code>vkQueuePresentKHR</code> instead.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose buffers to swap.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>EGL:</b> The context of the specified window must be current on the calling thread.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<aclass="el"href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed"title="Sets the swap interval for the current context. ">glfwSwapInterval</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<p>This function puts the calling thread to sleep until at least one event is available in the event queue. Once one or more events are available, it behaves exactly like <aclass="el"href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>
<p>Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.</p>
<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <aclass="el"href="window_guide.html#window_refresh">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>
<p>On some platforms, certain callbacks may be called outside of a call to one of the event processing functions.</p>
<p>If no windows exist, this function returns immediately. For synchronization of threads in applications that do not create windows, use your threading library of choice.</p>
<p>Event processing is not required for joystick input to work.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832"title="Processes all pending events. ">glfwPollEvents</a></dd>
<dd>
<aclass="el"href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf"title="Waits with timeout until events are queued and processes them. ">glfwWaitEventsTimeout</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. </dd></dl>
<p>This function puts the calling thread to sleep until at least one event is available in the event queue, or until the specified timeout is reached. If one or more events are available, it behaves exactly like <aclass="el"href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>
<p>The timeout value must be a positive finite number.</p>
<p>Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.</p>
<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <aclass="el"href="window_guide.html#window_refresh">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>
<p>On some platforms, certain callbacks may be called outside of a call to one of the event processing functions.</p>
<p>If no windows exist, this function returns immediately. For synchronization of threads in applications that do not create windows, use your threading library of choice.</p>
<p>Event processing is not required for joystick input to work.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">timeout</td><td>The maximum amount of time, in seconds, to wait.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832"title="Processes all pending events. ">glfwPollEvents</a></dd>
<dd>
<aclass="el"href="group__window.html#ga554e37d781f0a997656c26b2c56c835e"title="Waits until events are queued and processes them. ">glfwWaitEvents</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
<p>This function sets hints for the next call to <aclass="el"href="group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344">glfwCreateWindow</a>. The hints, once set, retain their values until changed by a call to <aclass="el"href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a> or <aclass="el"href="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a">glfwDefaultWindowHints</a>, or until the library is terminated.</p>
<p>This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next call to <aclass="el"href="group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344">glfwCreateWindow</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">hint</td><td>The <aclass="el"href="window_guide.html#window_hints">window hint</a> to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The new value of the window hint.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<aclass="el"href="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a"title="Resets all window hints to their default values. ">glfwDefaultWindowHints</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwOpenWindowHint</code>. </dd></dl>
<p>This function returns the value of the close flag of the specified window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The value of the close flag.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>