<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>
<trclass="memitem:group__hat__state"><tdclass="memItemLeft"align="right"valign="top"> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__hat__state.html">Joystick hat states</a></td></tr>
<trclass="memdesc:group__hat__state"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Joystick hat states. <br/></td></tr>
<trclass="memitem:ga0184dcb59f6d85d735503dcaae809727"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga0184dcb59f6d85d735503dcaae809727">GLFWmousebuttonfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int button, int action, int mods)</td></tr>
<trclass="memdesc:ga0184dcb59f6d85d735503dcaae809727"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for mouse button callbacks. <ahref="group__input.html#ga0184dcb59f6d85d735503dcaae809727">More...</a><br/></td></tr>
<trclass="memdesc:gad6fae41b3ac2e4209aaa87b596c57f68"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for cursor position callbacks. <ahref="group__input.html#gad6fae41b3ac2e4209aaa87b596c57f68">More...</a><br/></td></tr>
<trclass="memitem:gaa93dc4818ac9ab32532909d53a337cbe"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaa93dc4818ac9ab32532909d53a337cbe">GLFWcursorenterfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int entered)</td></tr>
<trclass="memdesc:gaa93dc4818ac9ab32532909d53a337cbe"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for cursor enter/leave callbacks. <ahref="group__input.html#gaa93dc4818ac9ab32532909d53a337cbe">More...</a><br/></td></tr>
<trclass="memdesc:gaf656112c33de3efdb227fa58f0134cf5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for scroll callbacks. <ahref="group__input.html#gaf656112c33de3efdb227fa58f0134cf5">More...</a><br/></td></tr>
<trclass="memitem:ga5bd751b27b90f865d2ea613533f0453c"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga5bd751b27b90f865d2ea613533f0453c">GLFWkeyfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int key, int scancode, int action, int mods)</td></tr>
<trclass="memdesc:ga5bd751b27b90f865d2ea613533f0453c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for keyboard key callbacks. <ahref="group__input.html#ga5bd751b27b90f865d2ea613533f0453c">More...</a><br/></td></tr>
<trclass="memitem:ga1ab90a55cf3f58639b893c0f4118cb6e"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga1ab90a55cf3f58639b893c0f4118cb6e">GLFWcharfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, unsigned int codepoint)</td></tr>
<trclass="memdesc:ga1ab90a55cf3f58639b893c0f4118cb6e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for Unicode character callbacks. <ahref="group__input.html#ga1ab90a55cf3f58639b893c0f4118cb6e">More...</a><br/></td></tr>
<trclass="memitem:gac3cf64f90b6219c05ac7b7822d5a4b8f"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gac3cf64f90b6219c05ac7b7822d5a4b8f">GLFWcharmodsfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, unsigned int codepoint, int mods)</td></tr>
<trclass="memdesc:gac3cf64f90b6219c05ac7b7822d5a4b8f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for Unicode character with modifiers callbacks. <ahref="group__input.html#gac3cf64f90b6219c05ac7b7822d5a4b8f">More...</a><br/></td></tr>
<trclass="memitem:gaaba73c3274062c18723b7f05862d94b2"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaaba73c3274062c18723b7f05862d94b2">GLFWdropfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int path_count, const char *paths[])</td></tr>
<trclass="memdesc:gaaba73c3274062c18723b7f05862d94b2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for path drop callbacks. <ahref="group__input.html#gaaba73c3274062c18723b7f05862d94b2">More...</a><br/></td></tr>
<trclass="memitem:gaa21ad5986ae9a26077a40142efb56243"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaa21ad5986ae9a26077a40142efb56243">GLFWjoystickfun</a>) (int jid, int event)</td></tr>
<trclass="memdesc:gaa21ad5986ae9a26077a40142efb56243"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for joystick configuration callbacks. <ahref="group__input.html#gaa21ad5986ae9a26077a40142efb56243">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="group__input.html#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="group__input.html#gaa92336e173da9c8834558b54ee80563b">More...</a><br/></td></tr>
<trclass="memdesc:gae4ee0dbd0d256183e1ea4026d897e1c2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether raw mouse motion is supported. <ahref="group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2">More...</a><br/></td></tr>
<trclass="memitem:gaeaed62e69c3bd62b7ff8f7b19913ce4f"><tdclass="memItemLeft"align="right"valign="top">const char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaeaed62e69c3bd62b7ff8f7b19913ce4f">glfwGetKeyName</a> (int key, int scancode)</td></tr>
<trclass="memdesc:gaeaed62e69c3bd62b7ff8f7b19913ce4f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the layout-specific name of the specified printable key. <ahref="group__input.html#gaeaed62e69c3bd62b7ff8f7b19913ce4f">More...</a><br/></td></tr>
<trclass="memdesc:ga67ddd1b7dcbbaff03e4a76c0ea67103a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the platform-specific scancode of the specified key. <ahref="group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a">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="group__input.html#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="group__input.html#gac1473feacb5996c01a7a5a33b5066704">More...</a><br/></td></tr>
<trclass="memdesc:ga01d37b6c40133676b9cea60ca1d7c0cc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the position of the cursor relative to the content area of the window. <ahref="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc">More...</a><br/></td></tr>
<trclass="memdesc:ga04b03af936d906ca123c8f4ee08b39e7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the position of the cursor, relative to the content area of the window. <ahref="group__input.html#ga04b03af936d906ca123c8f4ee08b39e7">More...</a><br/></td></tr>
<trclass="memitem:ga556f604f73af156c0db0e97c081373c3"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="group__input.html#ga89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a> (const <aclass="el"href="structGLFWimage.html">GLFWimage</a> *image, int xhot, int yhot)</td></tr>
<trclass="memdesc:ga556f604f73af156c0db0e97c081373c3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a custom cursor. <ahref="group__input.html#ga556f604f73af156c0db0e97c081373c3">More...</a><br/></td></tr>
<trclass="memdesc:gaf2fb2eb2c9dd842d1cef8a34e3c6403e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a cursor with a standard shape. <ahref="group__input.html#gaf2fb2eb2c9dd842d1cef8a34e3c6403e">More...</a><br/></td></tr>
<trclass="memdesc:ga81b952cd1764274d0db7fb3c5a79ba6a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Destroys a cursor. <ahref="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">More...</a><br/></td></tr>
<trclass="memdesc:gad3b4f38c8d5dae036bc8fa959e18343e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the cursor for the window. <ahref="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">More...</a><br/></td></tr>
<trclass="memdesc:ga1caf18159767e761185e49a3be019f8d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the key callback. <ahref="group__input.html#ga1caf18159767e761185e49a3be019f8d">More...</a><br/></td></tr>
<trclass="memdesc:gab25c4a220fd8f5717718dbc487828996"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the Unicode character callback. <ahref="group__input.html#gab25c4a220fd8f5717718dbc487828996">More...</a><br/></td></tr>
<trclass="memdesc:ga0b7f4ad13c2b17435ff13b6dcfb4e43c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the Unicode character with modifiers callback. <ahref="group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c">More...</a><br/></td></tr>
<trclass="memdesc:gac1f879ab7435d54d4d79bb469fe225d7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the cursor position callback. <ahref="group__input.html#gac1f879ab7435d54d4d79bb469fe225d7">More...</a><br/></td></tr>
<trclass="memdesc:ga571e45a030ae4061f746ed56cb76aede"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the scroll callback. <ahref="group__input.html#ga571e45a030ae4061f746ed56cb76aede">More...</a><br/></td></tr>
<trclass="memdesc:gab773f0ee0a07cff77a210cea40bc1f6b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the path drop callback. <ahref="group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b">More...</a><br/></td></tr>
<trclass="memdesc:gaed0966cee139d815317f9ffcba64c9f1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether the specified joystick is present. <ahref="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">More...</a><br/></td></tr>
<trclass="memitem:gaeb1c0191d3140a233a682987c61eb408"><tdclass="memItemLeft"align="right"valign="top">const float * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#gaeb1c0191d3140a233a682987c61eb408">glfwGetJoystickAxes</a> (int jid, int *count)</td></tr>
<trclass="memdesc:gaeb1c0191d3140a233a682987c61eb408"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the values of all axes of the specified joystick. <ahref="group__input.html#gaeb1c0191d3140a233a682987c61eb408">More...</a><br/></td></tr>
<trclass="memitem:ga5ffe34739d3dc97efe432ed2d81d9938"><tdclass="memItemLeft"align="right"valign="top">const unsigned char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a> (int jid, int *count)</td></tr>
<trclass="memdesc:ga5ffe34739d3dc97efe432ed2d81d9938"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the state of all buttons of the specified joystick. <ahref="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">More...</a><br/></td></tr>
<trclass="memitem:ga06e660841b3e79c54da4f54a932c5a2c"><tdclass="memItemLeft"align="right"valign="top">const unsigned char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a> (int jid, int *count)</td></tr>
<trclass="memdesc:ga06e660841b3e79c54da4f54a932c5a2c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the state of all hats of the specified joystick. <ahref="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">More...</a><br/></td></tr>
<trclass="memdesc:gac6a8e769e18e0bcfa9097793fc2c3978"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the name of the specified joystick. <ahref="group__input.html#gac6a8e769e18e0bcfa9097793fc2c3978">More...</a><br/></td></tr>
<trclass="memdesc:ga6659411aec3c7fcef27780e2cb2d9600"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the SDL compatible GUID of the specified joystick. <ahref="group__input.html#ga6659411aec3c7fcef27780e2cb2d9600">More...</a><br/></td></tr>
<trclass="memdesc:ga6b2f72d64d636b48a727b437cbb7489e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the user pointer of the specified joystick. <ahref="group__input.html#ga6b2f72d64d636b48a727b437cbb7489e">More...</a><br/></td></tr>
<trclass="memdesc:ga18cefd7265d1fa04f3fd38a6746db5f3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the user pointer of the specified joystick. <ahref="group__input.html#ga18cefd7265d1fa04f3fd38a6746db5f3">More...</a><br/></td></tr>
<trclass="memdesc:gad0f676860f329d80f7e47e9f06a96f00"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether the specified joystick has a gamepad mapping. <ahref="group__input.html#gad0f676860f329d80f7e47e9f06a96f00">More...</a><br/></td></tr>
<trclass="memdesc:ga8aea73a1a25cc6c0486a617019f56728"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the human-readable gamepad name for the specified joystick. <ahref="group__input.html#ga8aea73a1a25cc6c0486a617019f56728">More...</a><br/></td></tr>
<trclass="memdesc:gadccddea8bce6113fa459de379ddaf051"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the state of the specified joystick remapped as a gamepad. <ahref="group__input.html#gadccddea8bce6113fa459de379ddaf051">More...</a><br/></td></tr>
<trclass="memdesc:gaba1f022c5eb07dfac421df34cdcd31dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the clipboard to the specified string. <ahref="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">More...</a><br/></td></tr>
<trclass="memdesc:ga71a5b20808ea92193d65c21b82580355"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the contents of the clipboard as a string. <ahref="group__input.html#ga71a5b20808ea92193d65c21b82580355">More...</a><br/></td></tr>
<trclass="memdesc:gaa6cf4e7a77158a3b8fd00328b1720a4a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the GLFW time. <ahref="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">More...</a><br/></td></tr>
<trclass="memdesc:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the GLFW time. <ahref="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">More...</a><br/></td></tr>
<trclass="memdesc:ga09b2bd37d328e0b9456c7ec575cc26aa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the current value of the raw timer. <ahref="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">More...</a><br/></td></tr>
<trclass="memdesc:ga3289ee876572f6e91f06df3a24824443"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the frequency, in Hz, of the raw timer. <ahref="group__input.html#ga3289ee876572f6e91f06df3a24824443">More...</a><br/></td></tr>
<tdclass="memname">typedef void(* GLFWmousebuttonfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int button, int action, int mods)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for mouse button callback functions. A mouse button callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> button, <spanclass="keywordtype">int</span> action, <spanclass="keywordtype">int</span> mods)</div>
</div><!-- fragment --><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>. Future releases may add more actions. </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 pointer type for cursor position callbacks. A cursor position callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">double</span> xpos, <spanclass="keywordtype">double</span> ypos);</div>
</div><!-- fragment --><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_t of the content area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The new cursor y-coordinate, relative to the top edge_t of the content area.</td></tr>
<tdclass="memname">typedef void(* GLFWcursorenterfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int entered)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for cursor enter/leave callbacks. A cursor enter/leave callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> entered)</div>
</div><!-- fragment --><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 content area, or <code>GLFW_FALSE</code> if it left it.</td></tr>
<p>This is the function pointer type for scroll callbacks. A scroll callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">double</span> xoffset, <spanclass="keywordtype">double</span> yoffset)</div>
</div><!-- fragment --><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">xoffset</td><td>The scroll offset along the x-axis. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">yoffset</td><td>The scroll offset along the y-axis.</td></tr>
<tdclass="memname">typedef void(* GLFWkeyfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int key, int scancode, int action, int mods)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for keyboard key callbacks. A keyboard key callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> key, <spanclass="keywordtype">int</span> scancode, <spanclass="keywordtype">int</span> action, <spanclass="keywordtype">int</span> mods)</div>
</div><!-- fragment --><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>. Future releases may add more actions. </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>
<tdclass="memname">typedef void(* GLFWcharfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, unsigned int codepoint)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for Unicode character callbacks. A Unicode character callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">unsigned</span><spanclass="keywordtype">int</span> codepoint)</div>
</div><!-- fragment --><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>
<tdclass="memname">typedef void(* GLFWcharmodsfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, unsigned int codepoint, int mods)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for Unicode character with modifiers callbacks. It is called for each input character, regardless of what modifier keys are held down. A Unicode character with modifiers callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">unsigned</span><spanclass="keywordtype">int</span> codepoint, <spanclass="keywordtype">int</span> mods)</div>
</div><!-- fragment --><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>
<dlclass="deprecated"><dt><b><aclass="el"href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Scheduled for removal in version 4.0.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
<tdclass="memname">typedef void(* GLFWdropfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int path_count, const char *paths[])</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for path drop callbacks. A path drop callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> path_count, <spanclass="keyword">const</span><spanclass="keywordtype">char</span>* paths[])</div>
</div><!-- fragment --><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">path_count</td><td>The number of dropped paths. </td></tr>
<tdclass="memname">typedef void(* GLFWjoystickfun) (int jid, int event)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for joystick configuration callbacks. A joystick configuration callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<spanclass="keywordtype">int</span> jid, <spanclass="keywordtype">int</span> event)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</td><td>The joystick that was connected or disconnected. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>. Future releases may add more events.</td></tr>
<p>This function returns the value of an input option for the specified window. The mode must be one of <aclass="el"href="input_guide.html#GLFW_CURSOR">GLFW_CURSOR</a>, <aclass="el"href="input_guide.html#GLFW_STICKY_KEYS">GLFW_STICKY_KEYS</a>, <aclass="el"href="input_guide.html#GLFW_STICKY_MOUSE_BUTTONS">GLFW_STICKY_MOUSE_BUTTONS</a>, <aclass="el"href="input_guide.html#GLFW_LOCK_KEY_MODS">GLFW_LOCK_KEY_MODS</a> or <aclass="el"href="input_guide.html#GLFW_RAW_MOUSE_MOTION">GLFW_RAW_MOUSE_MOTION</a>.</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>, <code>GLFW_STICKY_MOUSE_BUTTONS</code>, <code>GLFW_LOCK_KEY_MODS</code> or <code>GLFW_RAW_MOUSE_MOTION</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>
<p>This function sets an input mode option for the specified window. The mode must be one of <aclass="el"href="input_guide.html#GLFW_CURSOR">GLFW_CURSOR</a>, <aclass="el"href="input_guide.html#GLFW_STICKY_KEYS">GLFW_STICKY_KEYS</a>, <aclass="el"href="input_guide.html#GLFW_STICKY_MOUSE_BUTTONS">GLFW_STICKY_MOUSE_BUTTONS</a>, <aclass="el"href="input_guide.html#GLFW_LOCK_KEY_MODS">GLFW_LOCK_KEY_MODS</a> or <aclass="el"href="input_guide.html#GLFW_RAW_MOUSE_MOTION">GLFW_RAW_MOUSE_MOTION</a>.</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 content 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>
<p>If the mode is <code>GLFW_LOCK_KEY_MODS</code>, the value must be either <code>GLFW_TRUE</code> to enable lock key modifier bits, or <code>GLFW_FALSE</code> to disable them. If enabled, callbacks that receive modifier bits will also have the <aclass="el"href="group__mods.html#gaefeef8fcf825a6e43e241b337897200f">GLFW_MOD_CAPS_LOCK</a> bit set when the event was generated with Caps Lock on, and the <aclass="el"href="group__mods.html#ga64e020b8a42af8376e944baf61feecbe">GLFW_MOD_NUM_LOCK</a> bit when Num Lock was on.</p>
<p>If the mode is <code>GLFW_RAW_MOUSE_MOTION</code>, the value must be either <code>GLFW_TRUE</code> to enable raw (unscaled and unaccelerated) mouse motion when the cursor is disabled, or <code>GLFW_FALSE</code> to disable it. If raw motion is not supported, attempting to set this will emit <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>. Call <aclass="el"href="group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2">glfwRawMouseMotionSupported</a> to check for support.</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>, <code>GLFW_STICKY_MOUSE_BUTTONS</code>, <code>GLFW_LOCK_KEY_MODS</code> or <code>GLFW_RAW_MOUSE_MOTION</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>
<p>This function returns whether raw mouse motion is supported on the current system. This status does not change after GLFW has been initialized so you only need to check this once. If you attempt to enable raw motion on a system that does not support it, <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> will be emitted.</p>
<p>Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse motion is only provided when the cursor is disabled.</p>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if raw mouse motion is supported on the current machine, 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 must only be called from the main thread.</dd></dl>
<p>This function returns the name of the specified printable key, encoded as UTF-8. This is typically the character that key would produce without any modifier keys, intended for displaying key bindings to the user. For dead keys, it is typically the diacritic it would add to a character.</p>
<p><b>Do not use this function</b> for <aclass="el"href="input_guide.html#input_char">text input</a>. You will break text input for many languages even if it happens to work for yours.</p>
<p>If the key is <code>GLFW_KEY_UNKNOWN</code>, the scancode is used to identify the key, otherwise the scancode is ignored. If you specify a non-printable key, or <code>GLFW_KEY_UNKNOWN</code> and a scancode that maps to a non-printable key, this function returns <code>NULL</code> but does not emit an error.</p>
<p>This behavior allows you to always pass in the arguments in 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>
<p>Names for printable keys depend on keyboard layout, while names for non-printable keys are the same across layouts but depend on the application language and should be localized along with other user interface text.</p>
<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 UTF-8 encoded, layout-specific 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 remark"><dt>Remarks</dt><dd>The contents of the returned string may change when a keyboard layout change event is received.</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 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 return"><dt>Returns</dt><dd>The platform-specific scancode for the key, or <code>-1</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>Thread safety</dt><dd>This function may be called from any 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 action <code>GLFW_REPEAT</code> is only reported to the key callback.</p>
<p>If the <aclass="el"href="input_guide.html#GLFW_STICKY_KEYS">GLFW_STICKY_KEYS</a> 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 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 <aclass="el"href="input_guide.html#GLFW_STICKY_MOUSE_BUTTONS">GLFW_STICKY_MOUSE_BUTTONS</a> input mode is enabled, this function returns <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 position of the cursor, in screen coordinates, relative to the upper-left corner of the content 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_t of the content 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_t of the content area, or <code>NULL</code>.</td></tr>
<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 position, in screen coordinates, of the cursor relative to the upper-left corner of the content 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_t of the content area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The desired y-coordinate, relative to the top edge_t of the content area.</td></tr>
<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>Wayland:</b> This function will only work when the cursor mode is <code>GLFW_CURSOR_DISABLED</code>, otherwise it will do nothing.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<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 with the red channel first. 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>, <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>Pointer lifetime</dt><dd>The specified image data 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>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>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#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a>. Any remaining cursors will be destroyed by <aclass="el"href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
<p>If the specified cursor is current for any window, that window will be reverted to the default cursor. This does not affect the cursor mode.</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 sets the cursor image to be used when the cursor is over the content 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 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#gab25c4a220fd8f5717718dbc487828996">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#gac2d83c4a10f071baf841f6730528e66c">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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#ga5bd751b27b90f865d2ea613533f0453c">function pointer type</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 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#ga1caf18159767e761185e49a3be019f8d">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 macOS or Alt key on Windows.</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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#ga1ab90a55cf3f58639b893c0f4118cb6e">function pointer type</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#gab25c4a220fd8f5717718dbc487828996">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#ga1caf18159767e761185e49a3be019f8d">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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#gac3cf64f90b6219c05ac7b7822d5a4b8f">function pointer type</a>.</dd></dl>
<dlclass="deprecated"><dt><b><aclass="el"href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>Scheduled for removal in version 4.0.</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#gac2d83c4a10f071baf841f6730528e66c">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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#ga0184dcb59f6d85d735503dcaae809727">function pointer type</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 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 content 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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#gad6fae41b3ac2e4209aaa87b596c57f68">function pointer type</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 cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the content 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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#gaa93dc4818ac9ab32532909d53a337cbe">function pointer type</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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#gaf656112c33de3efdb227fa58f0134cf5">function pointer type</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 path drop callback of the specified window, which is called when one or more dragged paths 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">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#gaaba73c3274062c18723b7f05862d94b2">function pointer type</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>Wayland:</b> File drop is currently unimplemented.</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 returns whether the specified joystick is present.</p>
<p>There is no need to call this function before other functions that accept a joystick ID, as they all check for presence before performing any other work.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 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>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 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>For backward compatibility with earlier versions that did not have <aclass="el"href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a>, the button array also includes all hats, each represented as four buttons. The hats are in the same order as returned by <b>glfwGetJoystickHats</b> and are in the order <em>up</em>, <em>right</em>, <em>down</em> and <em>left</em>. To disable these extra buttons, set the <aclass="el"href="intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS">GLFW_JOYSTICK_HAT_BUTTONS</a> init hint before initialization.</p>
<p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 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>The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing it with the corresponding direction.</p>
</div><!-- fragment --><p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 hat 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 hat 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>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="input_guide.html#joystick_hat">Joystick hat states</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.3. </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>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 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 SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.</p>
<p>The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID even if there is no gamepad mapping assigned to it.</p>
<p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
<p>The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and model of a joystick but does not identify a specific unit, e.g. all wired Xbox 360 controllers will have the same GUID on that platform. The GUID for a unit may vary between platforms depending on what hardware information the platform specific APIs provide.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 GUID 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 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 sets the user-defined pointer of the specified joystick. The current value is retained until the joystick is disconnected. The initial value is <code>NULL</code>.</p>
<p>This function may be called from the joystick callback, even for a joystick that is being disconnected.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</td><td>The joystick 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>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="input_guide.html#joystick_userptr">Joystick user pointer</a></dd>
<p>This function returns the current value of the user-defined pointer of the specified joystick. The initial value is <code>NULL</code>.</p>
<p>This function may be called from the joystick callback, even for a joystick that is being disconnected.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</td><td>The joystick 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>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="input_guide.html#joystick_userptr">Joystick user pointer</a></dd>
<p>This function returns whether the specified joystick is both present and has a gamepad mapping.</p>
<p>If the specified joystick is present but does not have a gamepad mapping this function will return <code>GLFW_FALSE</code> but will not generate an error. Call <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a> to check if a joystick is present regardless of whether it has a mapping.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 a joystick is both present and has a gamepad mapping, 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> 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 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>
<p>For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the <aclass="el"href="input_guide.html#events">event processing</a> functions. Joystick disconnection may also be detected and the callback called by joystick functions. The function will then return whatever it returns if the joystick is not present.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</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>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__input.html#gaa21ad5986ae9a26077a40142efb56243">function pointer type</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 parses the specified ASCII encoded string and updates the internal list with any gamepad mappings it finds. This string may contain either a single gamepad mapping or many mappings separated by newlines. The parser supports the full format of the <code>gamecontrollerdb.txt</code> source file including empty lines and comments.</p>
<p>See <aclass="el"href="input_guide.html#gamepad_mapping">Gamepad mappings</a> for a description of the format.</p>
<p>If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the one passed to this function. If the library is terminated and re-initialized the internal list will revert to the built-in default.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">string</td><td>The string containing the gamepad mappings. </td></tr>
</table>
</dd>
</dl>
<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#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</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 human-readable name of the gamepad from the gamepad mapping assigned to the specified joystick.</p>
<p>If the specified joystick is not present or does not have a gamepad mapping this function will return <code>NULL</code> but will not generate an error. Call <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a> to check whether it is present regardless of whether it has a mapping.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</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 gamepad, or <code>NULL</code> if the joystick is not present, does not have a mapping 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> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</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, the gamepad mappings are updated 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 retrieves the state of the specified joystick remapped to an Xbox-like gamepad.</p>
<p>If the specified joystick is not present or does not have a gamepad mapping this function will return <code>GLFW_FALSE</code> but will not generate an error. Call <aclass="el"href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a> to check whether it is present regardless of whether it has a mapping.</p>
<p>The Guide button may not be available for input as it is often hooked by the system or the Steam client.</p>
<p>Not all devices have all the buttons or axes provided by <aclass="el"href="structGLFWgamepadstate.html">GLFWgamepadstate</a>. Unavailable buttons and axes will always report <code>GLFW_RELEASE</code> and 0.0 respectively.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">jid</td><td>The <aclass="el"href="group__joysticks.html">joystick</a> to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">state</td><td>The gamepad input state of the joystick. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if no joystick is connected, it has no gamepad mapping 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> 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 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>
<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>Deprecated. Any valid window or <code>NULL</code>. </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>, <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 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#ga71a5b20808ea92193d65c21b82580355">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>
<p>This function returns the current GLFW time, in seconds. Unless the time has been set using <aclass="el"href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a> it measures time elapsed since GLFW was initialized.</p>
<p>This function and <aclass="el"href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a> are helper functions on top of <aclass="el"href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a> and <aclass="el"href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a>.</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 time, 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 base time 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 sets the current GLFW time, in seconds. The value must be a positive finite number less than or equal to 18446744073.0, which is approximately 584.5 years.</p>
<p>This function and <aclass="el"href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a> are helper functions on top of <aclass="el"href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a> and <aclass="el"href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a>.</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 GLFW time 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 base time 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>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>
<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>