Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1673 lines
123 KiB

5 years ago
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.11"/>
  7. <title>GLFW: Input reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. <link href="extra.css" rel="stylesheet" type="text/css"/>
  19. </head>
  20. <body>
  21. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  22. <div id="titlearea">
  23. <div class="glfwheader">
  24. <a href="http://www.glfw.org/" id="glfwhome">GLFW</a>
  25. <ul class="glfwnavbar">
  26. <li><a href="http://www.glfw.org/documentation.html">Documentation</a></li>
  27. <li><a href="http://www.glfw.org/download.html">Download</a></li>
  28. <li><a href="http://www.glfw.org/media.html">Media</a></li>
  29. <li><a href="http://www.glfw.org/community.html">Community</a></li>
  30. </ul>
  31. </div>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.11 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li class="current"><a href="modules.html"><span>Modules</span></a></li>
  43. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  44. <li><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. </div><!-- top -->
  64. <!-- window showing the filter options -->
  65. <div id="MSearchSelectWindow"
  66. onmouseover="return searchBox.OnSearchSelectShow()"
  67. onmouseout="return searchBox.OnSearchSelectHide()"
  68. onkeydown="return searchBox.OnSearchSelectKey(event)">
  69. </div>
  70. <!-- iframe showing the search results (closed by default) -->
  71. <div id="MSearchResultsWindow">
  72. <iframe src="javascript:void(0)" frameborder="0"
  73. name="MSearchResults" id="MSearchResults">
  74. </iframe>
  75. </div>
  76. <div class="header">
  77. <div class="summary">
  78. <a href="#groups">Modules</a> &#124;
  79. <a href="#typedef-members">Typedefs</a> &#124;
  80. <a href="#func-members">Functions</a> </div>
  81. <div class="headertitle">
  82. <div class="title">Input reference</div> </div>
  83. </div><!--header-->
  84. <div class="contents">
  85. <table class="memberdecls">
  86. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
  87. Modules</h2></td></tr>
  88. <tr class="memitem:group__joysticks"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html">Joysticks</a></td></tr>
  89. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:group__keys"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__keys.html">Keyboard keys</a></td></tr>
  91. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:group__mods"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html">Modifier key flags</a></td></tr>
  93. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:group__buttons"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html">Mouse buttons</a></td></tr>
  95. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:group__shapes"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html">Standard cursor shapes</a></td></tr>
  97. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. </table><table class="memberdecls">
  99. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  100. Typedefs</h2></td></tr>
  101. <tr class="memitem:ga39893a4a7e7c3239c98d29c9e084350c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, int, int)</td></tr>
  102. <tr class="memdesc:ga39893a4a7e7c3239c98d29c9e084350c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for mouse button callbacks. <a href="#ga39893a4a7e7c3239c98d29c9e084350c">More...</a><br /></td></tr>
  103. <tr class="separator:ga39893a4a7e7c3239c98d29c9e084350c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:ga4cfad918fa836f09541e7b9acd36686c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, double, double)</td></tr>
  105. <tr class="memdesc:ga4cfad918fa836f09541e7b9acd36686c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for cursor position callbacks. <a href="#ga4cfad918fa836f09541e7b9acd36686c">More...</a><br /></td></tr>
  106. <tr class="separator:ga4cfad918fa836f09541e7b9acd36686c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:ga51ab436c41eeaed6db5a0c9403b1c840"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int)</td></tr>
  108. <tr class="memdesc:ga51ab436c41eeaed6db5a0c9403b1c840"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for cursor enter/leave callbacks. <a href="#ga51ab436c41eeaed6db5a0c9403b1c840">More...</a><br /></td></tr>
  109. <tr class="separator:ga51ab436c41eeaed6db5a0c9403b1c840"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:ga4687e2199c60a18a8dd1da532e6d75c9"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, double, double)</td></tr>
  111. <tr class="memdesc:ga4687e2199c60a18a8dd1da532e6d75c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for scroll callbacks. <a href="#ga4687e2199c60a18a8dd1da532e6d75c9">More...</a><br /></td></tr>
  112. <tr class="separator:ga4687e2199c60a18a8dd1da532e6d75c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:ga0192a232a41e4e82948217c8ba94fdfd"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, int, int, int)</td></tr>
  114. <tr class="memdesc:ga0192a232a41e4e82948217c8ba94fdfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for keyboard key callbacks. <a href="#ga0192a232a41e4e82948217c8ba94fdfd">More...</a><br /></td></tr>
  115. <tr class="separator:ga0192a232a41e4e82948217c8ba94fdfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:gabf24451c7ceb1952bc02b17a0d5c3e5f"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, unsigned int)</td></tr>
  117. <tr class="memdesc:gabf24451c7ceb1952bc02b17a0d5c3e5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for Unicode character callbacks. <a href="#gabf24451c7ceb1952bc02b17a0d5c3e5f">More...</a><br /></td></tr>
  118. <tr class="separator:gabf24451c7ceb1952bc02b17a0d5c3e5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:gae36fb6897d2b7df9b128900c8ce9c507"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, unsigned int, int)</td></tr>
  120. <tr class="memdesc:gae36fb6897d2b7df9b128900c8ce9c507"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for Unicode character with modifiers callbacks. <a href="#gae36fb6897d2b7df9b128900c8ce9c507">More...</a><br /></td></tr>
  121. <tr class="separator:gae36fb6897d2b7df9b128900c8ce9c507"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:gab71f4ca80b651462852e601caf308c4a"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a>) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, const char **)</td></tr>
  123. <tr class="memdesc:gab71f4ca80b651462852e601caf308c4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for file drop callbacks. <a href="#gab71f4ca80b651462852e601caf308c4a">More...</a><br /></td></tr>
  124. <tr class="separator:gab71f4ca80b651462852e601caf308c4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:gaa67aa597e974298c748bfe4fb17d406d"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a>) (int, int)</td></tr>
  126. <tr class="memdesc:gaa67aa597e974298c748bfe4fb17d406d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for joystick configuration callbacks. <a href="#gaa67aa597e974298c748bfe4fb17d406d">More...</a><br /></td></tr>
  127. <tr class="separator:gaa67aa597e974298c748bfe4fb17d406d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. </table><table class="memberdecls">
  129. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  130. Functions</h2></td></tr>
  131. <tr class="memitem:gaf5b859dbe19bdf434e42695ea45cc5f4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4">glfwGetInputMode</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int mode)</td></tr>
  132. <tr class="memdesc:gaf5b859dbe19bdf434e42695ea45cc5f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value of an input option for the specified window. <a href="#gaf5b859dbe19bdf434e42695ea45cc5f4">More...</a><br /></td></tr>
  133. <tr class="separator:gaf5b859dbe19bdf434e42695ea45cc5f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:gaa92336e173da9c8834558b54ee80563b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int mode, int value)</td></tr>
  135. <tr class="memdesc:gaa92336e173da9c8834558b54ee80563b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets an input option for the specified window. <a href="#gaa92336e173da9c8834558b54ee80563b">More...</a><br /></td></tr>
  136. <tr class="separator:gaa92336e173da9c8834558b54ee80563b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  137. <tr class="memitem:ga237a182e5ec0b21ce64543f3b5e7e2be"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be">glfwGetKeyName</a> (int key, int scancode)</td></tr>
  138. <tr class="memdesc:ga237a182e5ec0b21ce64543f3b5e7e2be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the localized name of the specified printable key. <a href="#ga237a182e5ec0b21ce64543f3b5e7e2be">More...</a><br /></td></tr>
  139. <tr class="separator:ga237a182e5ec0b21ce64543f3b5e7e2be"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:gadd341da06bc8d418b4dc3a3518af9ad2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int key)</td></tr>
  141. <tr class="memdesc:gadd341da06bc8d418b4dc3a3518af9ad2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last reported state of a keyboard key for the specified window. <a href="#gadd341da06bc8d418b4dc3a3518af9ad2">More...</a><br /></td></tr>
  142. <tr class="separator:gadd341da06bc8d418b4dc3a3518af9ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. <tr class="memitem:gac1473feacb5996c01a7a5a33b5066704"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int button)</td></tr>
  144. <tr class="memdesc:gac1473feacb5996c01a7a5a33b5066704"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last reported state of a mouse button for the specified window. <a href="#gac1473feacb5996c01a7a5a33b5066704">More...</a><br /></td></tr>
  145. <tr class="separator:gac1473feacb5996c01a7a5a33b5066704"><td class="memSeparator" colspan="2">&#160;</td></tr>
  146. <tr class="memitem:ga01d37b6c40133676b9cea60ca1d7c0cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc">glfwGetCursorPos</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, double *xpos, double *ypos)</td></tr>
  147. <tr class="memdesc:ga01d37b6c40133676b9cea60ca1d7c0cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the position of the cursor relative to the client area of the window. <a href="#ga01d37b6c40133676b9cea60ca1d7c0cc">More...</a><br /></td></tr>
  148. <tr class="separator:ga01d37b6c40133676b9cea60ca1d7c0cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <tr class="memitem:ga04b03af936d906ca123c8f4ee08b39e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga04b03af936d906ca123c8f4ee08b39e7">glfwSetCursorPos</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, double xpos, double ypos)</td></tr>
  150. <tr class="memdesc:ga04b03af936d906ca123c8f4ee08b39e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the position of the cursor, relative to the client area of the window. <a href="#ga04b03af936d906ca123c8f4ee08b39e7">More...</a><br /></td></tr>
  151. <tr class="separator:ga04b03af936d906ca123c8f4ee08b39e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  152. <tr class="memitem:gafca356935e10135016aa49ffa464c355"><td class="memItemLeft" align="right" valign="top"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gafca356935e10135016aa49ffa464c355">glfwCreateCursor</a> (const <a class="el" href="structGLFWimage.html">GLFWimage</a> *image, int xhot, int yhot)</td></tr>
  153. <tr class="memdesc:gafca356935e10135016aa49ffa464c355"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a custom cursor. <a href="#gafca356935e10135016aa49ffa464c355">More...</a><br /></td></tr>
  154. <tr class="separator:gafca356935e10135016aa49ffa464c355"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. <tr class="memitem:gaa65f416d03ebbbb5b8db71a489fcb894"><td class="memItemLeft" align="right" valign="top"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894">glfwCreateStandardCursor</a> (int shape)</td></tr>
  156. <tr class="memdesc:gaa65f416d03ebbbb5b8db71a489fcb894"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a cursor with a standard shape. <a href="#gaa65f416d03ebbbb5b8db71a489fcb894">More...</a><br /></td></tr>
  157. <tr class="separator:gaa65f416d03ebbbb5b8db71a489fcb894"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <tr class="memitem:ga81b952cd1764274d0db7fb3c5a79ba6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a> (<a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *cursor)</td></tr>
  159. <tr class="memdesc:ga81b952cd1764274d0db7fb3c5a79ba6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a cursor. <a href="#ga81b952cd1764274d0db7fb3c5a79ba6a">More...</a><br /></td></tr>
  160. <tr class="separator:ga81b952cd1764274d0db7fb3c5a79ba6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  161. <tr class="memitem:gad3b4f38c8d5dae036bc8fa959e18343e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *cursor)</td></tr>
  162. <tr class="memdesc:gad3b4f38c8d5dae036bc8fa959e18343e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the cursor for the window. <a href="#gad3b4f38c8d5dae036bc8fa959e18343e">More...</a><br /></td></tr>
  163. <tr class="separator:gad3b4f38c8d5dae036bc8fa959e18343e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  164. <tr class="memitem:ga7e496507126f35ea72f01b2e6ef6d155"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155">glfwSetKeyCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a> cbfun)</td></tr>
  165. <tr class="memdesc:ga7e496507126f35ea72f01b2e6ef6d155"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the key callback. <a href="#ga7e496507126f35ea72f01b2e6ef6d155">More...</a><br /></td></tr>
  166. <tr class="separator:ga7e496507126f35ea72f01b2e6ef6d155"><td class="memSeparator" colspan="2">&#160;</td></tr>
  167. <tr class="memitem:ga556239421c6a5a243c66fca28da9f742"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga556239421c6a5a243c66fca28da9f742">glfwSetCharCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a> cbfun)</td></tr>
  168. <tr class="memdesc:ga556239421c6a5a243c66fca28da9f742"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Unicode character callback. <a href="#ga556239421c6a5a243c66fca28da9f742">More...</a><br /></td></tr>
  169. <tr class="separator:ga556239421c6a5a243c66fca28da9f742"><td class="memSeparator" colspan="2">&#160;</td></tr>
  170. <tr class="memitem:ga3f55ef5dc03a374e567f068b13c94afc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga3f55ef5dc03a374e567f068b13c94afc">glfwSetCharModsCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a> cbfun)</td></tr>
  171. <tr class="memdesc:ga3f55ef5dc03a374e567f068b13c94afc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Unicode character with modifiers callback. <a href="#ga3f55ef5dc03a374e567f068b13c94afc">More...</a><br /></td></tr>
  172. <tr class="separator:ga3f55ef5dc03a374e567f068b13c94afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  173. <tr class="memitem:gaef49b72d84d615bca0a6ed65485e035d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaef49b72d84d615bca0a6ed65485e035d">glfwSetMouseButtonCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a> cbfun)</td></tr>
  174. <tr class="memdesc:gaef49b72d84d615bca0a6ed65485e035d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the mouse button callback. <a href="#gaef49b72d84d615bca0a6ed65485e035d">More...</a><br /></td></tr>
  175. <tr class="separator:gaef49b72d84d615bca0a6ed65485e035d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  176. <tr class="memitem:ga7dad39486f2c7591af7fb25134a2501d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga7dad39486f2c7591af7fb25134a2501d">glfwSetCursorPosCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a> cbfun)</td></tr>
  177. <tr class="memdesc:ga7dad39486f2c7591af7fb25134a2501d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the cursor position callback. <a href="#ga7dad39486f2c7591af7fb25134a2501d">More...</a><br /></td></tr>
  178. <tr class="separator:ga7dad39486f2c7591af7fb25134a2501d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  179. <tr class="memitem:gaa299c41dd0a3d171d166354e01279e04"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaa299c41dd0a3d171d166354e01279e04">glfwSetCursorEnterCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a> cbfun)</td></tr>
  180. <tr class="memdesc:gaa299c41dd0a3d171d166354e01279e04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the cursor enter/exit callback. <a href="#gaa299c41dd0a3d171d166354e01279e04">More...</a><br /></td></tr>
  181. <tr class="separator:gaa299c41dd0a3d171d166354e01279e04"><td class="memSeparator" colspan="2">&#160;</td></tr>
  182. <tr class="memitem:gacf02eb10504352f16efda4593c3ce60e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gacf02eb10504352f16efda4593c3ce60e">glfwSetScrollCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a> cbfun)</td></tr>
  183. <tr class="memdesc:gacf02eb10504352f16efda4593c3ce60e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the scroll callback. <a href="#gacf02eb10504352f16efda4593c3ce60e">More...</a><br /></td></tr>
  184. <tr class="separator:gacf02eb10504352f16efda4593c3ce60e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  185. <tr class="memitem:ga41291bf15dd3ff564b3143aa6dc74a4b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga41291bf15dd3ff564b3143aa6dc74a4b">glfwSetDropCallback</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a> cbfun)</td></tr>
  186. <tr class="memdesc:ga41291bf15dd3ff564b3143aa6dc74a4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file drop callback. <a href="#ga41291bf15dd3ff564b3143aa6dc74a4b">More...</a><br /></td></tr>
  187. <tr class="separator:ga41291bf15dd3ff564b3143aa6dc74a4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:gaffcbd9ac8ee737fcdd25475123a3c790"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> (int joy)</td></tr>
  189. <tr class="memdesc:gaffcbd9ac8ee737fcdd25475123a3c790"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the specified joystick is present. <a href="#gaffcbd9ac8ee737fcdd25475123a3c790">More...</a><br /></td></tr>
  190. <tr class="separator:gaffcbd9ac8ee737fcdd25475123a3c790"><td class="memSeparator" colspan="2">&#160;</td></tr>
  191. <tr class="memitem:ga6271d46a5901ec2c99601ccf4dd14731"><td class="memItemLeft" align="right" valign="top">const float *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga6271d46a5901ec2c99601ccf4dd14731">glfwGetJoystickAxes</a> (int joy, int *count)</td></tr>
  192. <tr class="memdesc:ga6271d46a5901ec2c99601ccf4dd14731"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the values of all axes of the specified joystick. <a href="#ga6271d46a5901ec2c99601ccf4dd14731">More...</a><br /></td></tr>
  193. <tr class="separator:ga6271d46a5901ec2c99601ccf4dd14731"><td class="memSeparator" colspan="2">&#160;</td></tr>
  194. <tr class="memitem:gace54cd930dcd502e118fe4021384ce1b"><td class="memItemLeft" align="right" valign="top">const unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gace54cd930dcd502e118fe4021384ce1b">glfwGetJoystickButtons</a> (int joy, int *count)</td></tr>
  195. <tr class="memdesc:gace54cd930dcd502e118fe4021384ce1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the state of all buttons of the specified joystick. <a href="#gace54cd930dcd502e118fe4021384ce1b">More...</a><br /></td></tr>
  196. <tr class="separator:gace54cd930dcd502e118fe4021384ce1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  197. <tr class="memitem:gac8d7f6107e05cfd106cfba973ab51e19"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gac8d7f6107e05cfd106cfba973ab51e19">glfwGetJoystickName</a> (int joy)</td></tr>
  198. <tr class="memdesc:gac8d7f6107e05cfd106cfba973ab51e19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the specified joystick. <a href="#gac8d7f6107e05cfd106cfba973ab51e19">More...</a><br /></td></tr>
  199. <tr class="separator:gac8d7f6107e05cfd106cfba973ab51e19"><td class="memSeparator" colspan="2">&#160;</td></tr>
  200. <tr class="memitem:gab1dc8379f1b82bb660a6b9c9fa06ca07"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gab1dc8379f1b82bb660a6b9c9fa06ca07">glfwSetJoystickCallback</a> (<a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a> cbfun)</td></tr>
  201. <tr class="memdesc:gab1dc8379f1b82bb660a6b9c9fa06ca07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the joystick configuration callback. <a href="#gab1dc8379f1b82bb660a6b9c9fa06ca07">More...</a><br /></td></tr>
  202. <tr class="separator:gab1dc8379f1b82bb660a6b9c9fa06ca07"><td class="memSeparator" colspan="2">&#160;</td></tr>
  203. <tr class="memitem:gaba1f022c5eb07dfac421df34cdcd31dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">glfwSetClipboardString</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, const char *string)</td></tr>
  204. <tr class="memdesc:gaba1f022c5eb07dfac421df34cdcd31dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the clipboard to the specified string. <a href="#gaba1f022c5eb07dfac421df34cdcd31dd">More...</a><br /></td></tr>
  205. <tr class="separator:gaba1f022c5eb07dfac421df34cdcd31dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  206. <tr class="memitem:ga5aba1d704d9ab539282b1fbe9f18bb94"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94">glfwGetClipboardString</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
  207. <tr class="memdesc:ga5aba1d704d9ab539282b1fbe9f18bb94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the contents of the clipboard as a string. <a href="#ga5aba1d704d9ab539282b1fbe9f18bb94">More...</a><br /></td></tr>
  208. <tr class="separator:ga5aba1d704d9ab539282b1fbe9f18bb94"><td class="memSeparator" colspan="2">&#160;</td></tr>
  209. <tr class="memitem:gaa6cf4e7a77158a3b8fd00328b1720a4a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a> (void)</td></tr>
  210. <tr class="memdesc:gaa6cf4e7a77158a3b8fd00328b1720a4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value of the GLFW timer. <a href="#gaa6cf4e7a77158a3b8fd00328b1720a4a">More...</a><br /></td></tr>
  211. <tr class="separator:gaa6cf4e7a77158a3b8fd00328b1720a4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  212. <tr class="memitem:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a> (double time)</td></tr>
  213. <tr class="memdesc:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the GLFW timer. <a href="#gaf59589ef6e8b8c8b5ad184b25afd4dc0">More...</a><br /></td></tr>
  214. <tr class="separator:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  215. <tr class="memitem:ga09b2bd37d328e0b9456c7ec575cc26aa"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a> (void)</td></tr>
  216. <tr class="memdesc:ga09b2bd37d328e0b9456c7ec575cc26aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current value of the raw timer. <a href="#ga09b2bd37d328e0b9456c7ec575cc26aa">More...</a><br /></td></tr>
  217. <tr class="separator:ga09b2bd37d328e0b9456c7ec575cc26aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. <tr class="memitem:ga3289ee876572f6e91f06df3a24824443"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a> (void)</td></tr>
  219. <tr class="memdesc:ga3289ee876572f6e91f06df3a24824443"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the frequency, in Hz, of the raw timer. <a href="#ga3289ee876572f6e91f06df3a24824443">More...</a><br /></td></tr>
  220. <tr class="separator:ga3289ee876572f6e91f06df3a24824443"><td class="memSeparator" colspan="2">&#160;</td></tr>
  221. </table><table class="memberdecls">
  222. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
  223. Key and button actions</h2></td></tr>
  224. <tr class="memitem:gada11d965c4da13090ad336e030e4d11f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gada11d965c4da13090ad336e030e4d11f">GLFW_RELEASE</a>&#160;&#160;&#160;0</td></tr>
  225. <tr class="memdesc:gada11d965c4da13090ad336e030e4d11f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The key or mouse button was released. <a href="#gada11d965c4da13090ad336e030e4d11f">More...</a><br /></td></tr>
  226. <tr class="separator:gada11d965c4da13090ad336e030e4d11f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  227. <tr class="memitem:ga2485743d0b59df3791c45951c4195265"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#ga2485743d0b59df3791c45951c4195265">GLFW_PRESS</a>&#160;&#160;&#160;1</td></tr>
  228. <tr class="memdesc:ga2485743d0b59df3791c45951c4195265"><td class="mdescLeft">&#160;</td><td class="mdescRight">The key or mouse button was pressed. <a href="#ga2485743d0b59df3791c45951c4195265">More...</a><br /></td></tr>
  229. <tr class="separator:ga2485743d0b59df3791c45951c4195265"><td class="memSeparator" colspan="2">&#160;</td></tr>
  230. <tr class="memitem:gac96fd3b9fc66c6f0eebaf6532595338f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__input.html#gac96fd3b9fc66c6f0eebaf6532595338f">GLFW_REPEAT</a>&#160;&#160;&#160;2</td></tr>
  231. <tr class="memdesc:gac96fd3b9fc66c6f0eebaf6532595338f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The key was held down until it repeated. <a href="#gac96fd3b9fc66c6f0eebaf6532595338f">More...</a><br /></td></tr>
  232. <tr class="separator:gac96fd3b9fc66c6f0eebaf6532595338f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  233. </table>
  234. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  235. <p>This is the reference documentation for input related functions and types. For more task-oriented information, see the <a class="el" href="input_guide.html">Input guide</a>. </p>
  236. <h2 class="groupheader">Macro Definition Documentation</h2>
  237. <a class="anchor" id="ga2485743d0b59df3791c45951c4195265"></a>
  238. <div class="memitem">
  239. <div class="memproto">
  240. <table class="memname">
  241. <tr>
  242. <td class="memname">#define GLFW_PRESS&#160;&#160;&#160;1</td>
  243. </tr>
  244. </table>
  245. </div><div class="memdoc">
  246. <p>The key or mouse button was pressed. </p>
  247. </div>
  248. </div>
  249. <a class="anchor" id="gada11d965c4da13090ad336e030e4d11f"></a>
  250. <div class="memitem">
  251. <div class="memproto">
  252. <table class="memname">
  253. <tr>
  254. <td class="memname">#define GLFW_RELEASE&#160;&#160;&#160;0</td>
  255. </tr>
  256. </table>
  257. </div><div class="memdoc">
  258. <p>The key or mouse button was released. </p>
  259. </div>
  260. </div>
  261. <a class="anchor" id="gac96fd3b9fc66c6f0eebaf6532595338f"></a>
  262. <div class="memitem">
  263. <div class="memproto">
  264. <table class="memname">
  265. <tr>
  266. <td class="memname">#define GLFW_REPEAT&#160;&#160;&#160;2</td>
  267. </tr>
  268. </table>
  269. </div><div class="memdoc">
  270. <p>The key was held down until it repeated. </p>
  271. </div>
  272. </div>
  273. <h2 class="groupheader">Typedef Documentation</h2>
  274. <a class="anchor" id="gabf24451c7ceb1952bc02b17a0d5c3e5f"></a>
  275. <div class="memitem">
  276. <div class="memproto">
  277. <table class="memname">
  278. <tr>
  279. <td class="memname">typedef void(* GLFWcharfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, unsigned int)</td>
  280. </tr>
  281. </table>
  282. </div><div class="memdoc">
  283. <p>This is the function signature for Unicode character callback functions.</p>
  284. <dl class="params"><dt>Parameters</dt><dd>
  285. <table class="params">
  286. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  287. <tr><td class="paramdir">[in]</td><td class="paramname">codepoint</td><td>The Unicode code point of the character.</td></tr>
  288. </table>
  289. </dd>
  290. </dl>
  291. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a> </dd>
  292. <dd>
  293. <a class="el" href="group__input.html#ga556239421c6a5a243c66fca28da9f742" title="Sets the Unicode character callback. ">glfwSetCharCallback</a></dd></dl>
  294. <dl class="section since"><dt>Since</dt><dd>Added in version 2.4. </dd></dl>
  295. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter. </dd></dl>
  296. </div>
  297. </div>
  298. <a class="anchor" id="gae36fb6897d2b7df9b128900c8ce9c507"></a>
  299. <div class="memitem">
  300. <div class="memproto">
  301. <table class="memname">
  302. <tr>
  303. <td class="memname">typedef void(* GLFWcharmodsfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, unsigned int, int)</td>
  304. </tr>
  305. </table>
  306. </div><div class="memdoc">
  307. <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>
  308. <dl class="params"><dt>Parameters</dt><dd>
  309. <table class="params">
  310. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  311. <tr><td class="paramdir">[in]</td><td class="paramname">codepoint</td><td>The Unicode code point of the character. </td></tr>
  312. <tr><td class="paramdir">[in]</td><td class="paramname">mods</td><td>Bit field describing which <a class="el" href="group__mods.html">modifier keys</a> were held down.</td></tr>
  313. </table>
  314. </dd>
  315. </dl>
  316. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a> </dd>
  317. <dd>
  318. <a class="el" href="group__input.html#ga3f55ef5dc03a374e567f068b13c94afc" title="Sets the Unicode character with modifiers callback. ">glfwSetCharModsCallback</a></dd></dl>
  319. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  320. </div>
  321. </div>
  322. <a class="anchor" id="ga51ab436c41eeaed6db5a0c9403b1c840"></a>
  323. <div class="memitem">
  324. <div class="memproto">
  325. <table class="memname">
  326. <tr>
  327. <td class="memname">typedef void(* GLFWcursorenterfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int)</td>
  328. </tr>
  329. </table>
  330. </div><div class="memdoc">
  331. <p>This is the function signature for cursor enter/leave callback functions.</p>
  332. <dl class="params"><dt>Parameters</dt><dd>
  333. <table class="params">
  334. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  335. <tr><td class="paramdir">[in]</td><td class="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>
  336. </table>
  337. </dd>
  338. </dl>
  339. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_enter">Cursor enter/leave events</a> </dd>
  340. <dd>
  341. <a class="el" href="group__input.html#gaa299c41dd0a3d171d166354e01279e04" title="Sets the cursor enter/exit callback. ">glfwSetCursorEnterCallback</a></dd></dl>
  342. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  343. </div>
  344. </div>
  345. <a class="anchor" id="ga4cfad918fa836f09541e7b9acd36686c"></a>
  346. <div class="memitem">
  347. <div class="memproto">
  348. <table class="memname">
  349. <tr>
  350. <td class="memname">typedef void(* GLFWcursorposfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, double, double)</td>
  351. </tr>
  352. </table>
  353. </div><div class="memdoc">
  354. <p>This is the function signature for cursor position callback functions.</p>
  355. <dl class="params"><dt>Parameters</dt><dd>
  356. <table class="params">
  357. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  358. <tr><td class="paramdir">[in]</td><td class="paramname">xpos</td><td>The new cursor x-coordinate, relative to the left edge of the client area. </td></tr>
  359. <tr><td class="paramdir">[in]</td><td class="paramname">ypos</td><td>The new cursor y-coordinate, relative to the top edge of the client area.</td></tr>
  360. </table>
  361. </dd>
  362. </dl>
  363. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a> </dd>
  364. <dd>
  365. <a class="el" href="group__input.html#ga7dad39486f2c7591af7fb25134a2501d" title="Sets the cursor position callback. ">glfwSetCursorPosCallback</a></dd></dl>
  366. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmouseposfun</code>. </dd></dl>
  367. </div>
  368. </div>
  369. <a class="anchor" id="gab71f4ca80b651462852e601caf308c4a"></a>
  370. <div class="memitem">
  371. <div class="memproto">
  372. <table class="memname">
  373. <tr>
  374. <td class="memname">typedef void(* GLFWdropfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, const char **)</td>
  375. </tr>
  376. </table>
  377. </div><div class="memdoc">
  378. <p>This is the function signature for file drop callbacks.</p>
  379. <dl class="params"><dt>Parameters</dt><dd>
  380. <table class="params">
  381. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  382. <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>The number of dropped files. </td></tr>
  383. <tr><td class="paramdir">[in]</td><td class="paramname">paths</td><td>The UTF-8 encoded file and/or directory path names.</td></tr>
  384. </table>
  385. </dd>
  386. </dl>
  387. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#path_drop">Path drop input</a> </dd>
  388. <dd>
  389. <a class="el" href="group__input.html#ga41291bf15dd3ff564b3143aa6dc74a4b" title="Sets the file drop callback. ">glfwSetDropCallback</a></dd></dl>
  390. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  391. </div>
  392. </div>
  393. <a class="anchor" id="gaa67aa597e974298c748bfe4fb17d406d"></a>
  394. <div class="memitem">
  395. <div class="memproto">
  396. <table class="memname">
  397. <tr>
  398. <td class="memname">typedef void(* GLFWjoystickfun) (int, int)</td>
  399. </tr>
  400. </table>
  401. </div><div class="memdoc">
  402. <p>This is the function signature for joystick configuration callback functions.</p>
  403. <dl class="params"><dt>Parameters</dt><dd>
  404. <table class="params">
  405. <tr><td class="paramdir">[in]</td><td class="paramname">joy</td><td>The joystick that was connected or disconnected. </td></tr>
  406. <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>.</td></tr>
  407. </table>
  408. </dd>
  409. </dl>
  410. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_event">Joystick configuration changes</a> </dd>
  411. <dd>
  412. <a class="el" href="group__input.html#gab1dc8379f1b82bb660a6b9c9fa06ca07" title="Sets the joystick configuration callback. ">glfwSetJoystickCallback</a></dd></dl>
  413. <dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
  414. </div>
  415. </div>
  416. <a class="anchor" id="ga0192a232a41e4e82948217c8ba94fdfd"></a>
  417. <div class="memitem">
  418. <div class="memproto">
  419. <table class="memname">
  420. <tr>
  421. <td class="memname">typedef void(* GLFWkeyfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, int, int, int)</td>
  422. </tr>
  423. </table>
  424. </div><div class="memdoc">
  425. <p>This is the function signature for keyboard key callback functions.</p>
  426. <dl class="params"><dt>Parameters</dt><dd>
  427. <table class="params">
  428. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  429. <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The <a class="el" href="group__keys.html">keyboard key</a> that was pressed or released. </td></tr>
  430. <tr><td class="paramdir">[in]</td><td class="paramname">scancode</td><td>The system-specific scancode of the key. </td></tr>
  431. <tr><td class="paramdir">[in]</td><td class="paramname">action</td><td><code>GLFW_PRESS</code>, <code>GLFW_RELEASE</code> or <code>GLFW_REPEAT</code>. </td></tr>
  432. <tr><td class="paramdir">[in]</td><td class="paramname">mods</td><td>Bit field describing which <a class="el" href="group__mods.html">modifier keys</a> were held down.</td></tr>
  433. </table>
  434. </dd>
  435. </dl>
  436. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key">Key input</a> </dd>
  437. <dd>
  438. <a class="el" href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155" title="Sets the key callback. ">glfwSetKeyCallback</a></dd></dl>
  439. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  440. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle, scancode and modifier mask parameters. </dd></dl>
  441. </div>
  442. </div>
  443. <a class="anchor" id="ga39893a4a7e7c3239c98d29c9e084350c"></a>
  444. <div class="memitem">
  445. <div class="memproto">
  446. <table class="memname">
  447. <tr>
  448. <td class="memname">typedef void(* GLFWmousebuttonfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, int, int)</td>
  449. </tr>
  450. </table>
  451. </div><div class="memdoc">
  452. <p>This is the function signature for mouse button callback functions.</p>
  453. <dl class="params"><dt>Parameters</dt><dd>
  454. <table class="params">
  455. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  456. <tr><td class="paramdir">[in]</td><td class="paramname">button</td><td>The <a class="el" href="group__buttons.html">mouse button</a> that was pressed or released. </td></tr>
  457. <tr><td class="paramdir">[in]</td><td class="paramname">action</td><td>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. </td></tr>
  458. <tr><td class="paramdir">[in]</td><td class="paramname">mods</td><td>Bit field describing which <a class="el" href="group__mods.html">modifier keys</a> were held down.</td></tr>
  459. </table>
  460. </dd>
  461. </dl>
  462. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_mouse_button">Mouse button input</a> </dd>
  463. <dd>
  464. <a class="el" href="group__input.html#gaef49b72d84d615bca0a6ed65485e035d" title="Sets the mouse button callback. ">glfwSetMouseButtonCallback</a></dd></dl>
  465. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  466. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle and modifier mask parameters. </dd></dl>
  467. </div>
  468. </div>
  469. <a class="anchor" id="ga4687e2199c60a18a8dd1da532e6d75c9"></a>
  470. <div class="memitem">
  471. <div class="memproto">
  472. <table class="memname">
  473. <tr>
  474. <td class="memname">typedef void(* GLFWscrollfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, double, double)</td>
  475. </tr>
  476. </table>
  477. </div><div class="memdoc">
  478. <p>This is the function signature for scroll callback functions.</p>
  479. <dl class="params"><dt>Parameters</dt><dd>
  480. <table class="params">
  481. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
  482. <tr><td class="paramdir">[in]</td><td class="paramname">xoffset</td><td>The scroll offset along the x-axis. </td></tr>
  483. <tr><td class="paramdir">[in]</td><td class="paramname">yoffset</td><td>The scroll offset along the y-axis.</td></tr>
  484. </table>
  485. </dd>
  486. </dl>
  487. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#scrolling">Scroll input</a> </dd>
  488. <dd>
  489. <a class="el" href="group__input.html#gacf02eb10504352f16efda4593c3ce60e" title="Sets the scroll callback. ">glfwSetScrollCallback</a></dd></dl>
  490. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmousewheelfun</code>. </dd></dl>
  491. </div>
  492. </div>
  493. <h2 class="groupheader">Function Documentation</h2>
  494. <a class="anchor" id="gafca356935e10135016aa49ffa464c355"></a>
  495. <div class="memitem">
  496. <div class="memproto">
  497. <table class="memname">
  498. <tr>
  499. <td class="memname"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a>* glfwCreateCursor </td>
  500. <td>(</td>
  501. <td class="paramtype">const <a class="el" href="structGLFWimage.html">GLFWimage</a> *&#160;</td>
  502. <td class="paramname"><em>image</em>, </td>
  503. </tr>
  504. <tr>
  505. <td class="paramkey"></td>
  506. <td></td>
  507. <td class="paramtype">int&#160;</td>
  508. <td class="paramname"><em>xhot</em>, </td>
  509. </tr>
  510. <tr>
  511. <td class="paramkey"></td>
  512. <td></td>
  513. <td class="paramtype">int&#160;</td>
  514. <td class="paramname"><em>yhot</em>&#160;</td>
  515. </tr>
  516. <tr>
  517. <td></td>
  518. <td>)</td>
  519. <td></td><td></td>
  520. </tr>
  521. </table>
  522. </div><div class="memdoc">
  523. <p>Creates a new custom cursor image that can be set for a window with <a class="el" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>. The cursor can be destroyed with <a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a>. Any remaining cursors are destroyed by <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
  524. <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>
  525. <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>
  526. <dl class="params"><dt>Parameters</dt><dd>
  527. <table class="params">
  528. <tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>The desired cursor image. </td></tr>
  529. <tr><td class="paramdir">[in]</td><td class="paramname">xhot</td><td>The desired x-coordinate, in pixels, of the cursor hotspot. </td></tr>
  530. <tr><td class="paramdir">[in]</td><td class="paramname">yhot</td><td>The desired y-coordinate, in pixels, of the cursor hotspot. </td></tr>
  531. </table>
  532. </dd>
  533. </dl>
  534. <dl class="section return"><dt>Returns</dt><dd>The handle of the created cursor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  535. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  536. <dl class="section user"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>
  537. <dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
  538. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  539. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a> </dd>
  540. <dd>
  541. <a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a" title="Destroys a cursor. ">glfwDestroyCursor</a> </dd>
  542. <dd>
  543. <a class="el" href="group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894" title="Creates a cursor with a standard shape. ">glfwCreateStandardCursor</a></dd></dl>
  544. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  545. </div>
  546. </div>
  547. <a class="anchor" id="gaa65f416d03ebbbb5b8db71a489fcb894"></a>
  548. <div class="memitem">
  549. <div class="memproto">
  550. <table class="memname">
  551. <tr>
  552. <td class="memname"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a>* glfwCreateStandardCursor </td>
  553. <td>(</td>
  554. <td class="paramtype">int&#160;</td>
  555. <td class="paramname"><em>shape</em></td><td>)</td>
  556. <td></td>
  557. </tr>
  558. </table>
  559. </div><div class="memdoc">
  560. <p>Returns a cursor with a <a class="el" href="group__shapes.html">standard shape</a>, that can be set for a window with <a class="el" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>.</p>
  561. <dl class="params"><dt>Parameters</dt><dd>
  562. <table class="params">
  563. <tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>One of the <a class="el" href="group__shapes.html">standard shapes</a>. </td></tr>
  564. </table>
  565. </dd>
  566. </dl>
  567. <dl class="section return"><dt>Returns</dt><dd>A new cursor ready to use or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  568. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  569. <dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
  570. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  571. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a> </dd>
  572. <dd>
  573. <a class="el" href="group__input.html#gafca356935e10135016aa49ffa464c355" title="Creates a custom cursor. ">glfwCreateCursor</a></dd></dl>
  574. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  575. </div>
  576. </div>
  577. <a class="anchor" id="ga81b952cd1764274d0db7fb3c5a79ba6a"></a>
  578. <div class="memitem">
  579. <div class="memproto">
  580. <table class="memname">
  581. <tr>
  582. <td class="memname">void glfwDestroyCursor </td>
  583. <td>(</td>
  584. <td class="paramtype"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *&#160;</td>
  585. <td class="paramname"><em>cursor</em></td><td>)</td>
  586. <td></td>
  587. </tr>
  588. </table>
  589. </div><div class="memdoc">
  590. <p>This function destroys a cursor previously created with <a class="el" href="group__input.html#gafca356935e10135016aa49ffa464c355">glfwCreateCursor</a>. Any remaining cursors will be destroyed by <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
  591. <dl class="params"><dt>Parameters</dt><dd>
  592. <table class="params">
  593. <tr><td class="paramdir">[in]</td><td class="paramname">cursor</td><td>The cursor object to destroy.</td></tr>
  594. </table>
  595. </dd>
  596. </dl>
  597. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  598. <dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
  599. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  600. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a> </dd>
  601. <dd>
  602. <a class="el" href="group__input.html#gafca356935e10135016aa49ffa464c355" title="Creates a custom cursor. ">glfwCreateCursor</a></dd></dl>
  603. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  604. </div>
  605. </div>
  606. <a class="anchor" id="ga5aba1d704d9ab539282b1fbe9f18bb94"></a>
  607. <div class="memitem">
  608. <div class="memproto">
  609. <table class="memname">
  610. <tr>
  611. <td class="memname">const char* glfwGetClipboardString </td>
  612. <td>(</td>
  613. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  614. <td class="paramname"><em>window</em></td><td>)</td>
  615. <td></td>
  616. </tr>
  617. </table>
  618. </div><div class="memdoc">
  619. <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 <a class="el" href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a> error is generated.</p>
  620. <dl class="params"><dt>Parameters</dt><dd>
  621. <table class="params">
  622. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that will request the clipboard contents. </td></tr>
  623. </table>
  624. </dd>
  625. </dl>
  626. <dl class="section return"><dt>Returns</dt><dd>The contents of the clipboard as a UTF-8 encoded string, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  627. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  628. <dl class="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 <a class="el" href="group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94">glfwGetClipboardString</a> or <a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">glfwSetClipboardString</a>, or until the library is terminated.</dd></dl>
  629. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  630. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
  631. <dd>
  632. <a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd" title="Sets the clipboard to the specified string. ">glfwSetClipboardString</a></dd></dl>
  633. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  634. </div>
  635. </div>
  636. <a class="anchor" id="ga01d37b6c40133676b9cea60ca1d7c0cc"></a>
  637. <div class="memitem">
  638. <div class="memproto">
  639. <table class="memname">
  640. <tr>
  641. <td class="memname">void glfwGetCursorPos </td>
  642. <td>(</td>
  643. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  644. <td class="paramname"><em>window</em>, </td>
  645. </tr>
  646. <tr>
  647. <td class="paramkey"></td>
  648. <td></td>
  649. <td class="paramtype">double *&#160;</td>
  650. <td class="paramname"><em>xpos</em>, </td>
  651. </tr>
  652. <tr>
  653. <td class="paramkey"></td>
  654. <td></td>
  655. <td class="paramtype">double *&#160;</td>
  656. <td class="paramname"><em>ypos</em>&#160;</td>
  657. </tr>
  658. <tr>
  659. <td></td>
  660. <td>)</td>
  661. <td></td><td></td>
  662. </tr>
  663. </table>
  664. </div><div class="memdoc">
  665. <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>
  666. <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>
  667. <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>
  668. <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>
  669. <dl class="params"><dt>Parameters</dt><dd>
  670. <table class="params">
  671. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
  672. <tr><td class="paramdir">[out]</td><td class="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>
  673. <tr><td class="paramdir">[out]</td><td class="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>
  674. </table>
  675. </dd>
  676. </dl>
  677. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  678. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  679. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a> </dd>
  680. <dd>
  681. <a class="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>
  682. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetMousePos</code>. </dd></dl>
  683. </div>
  684. </div>
  685. <a class="anchor" id="gaf5b859dbe19bdf434e42695ea45cc5f4"></a>
  686. <div class="memitem">
  687. <div class="memproto">
  688. <table class="memname">
  689. <tr>
  690. <td class="memname">int glfwGetInputMode </td>
  691. <td>(</td>
  692. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  693. <td class="paramname"><em>window</em>, </td>
  694. </tr>
  695. <tr>
  696. <td class="paramkey"></td>
  697. <td></td>
  698. <td class="paramtype">int&#160;</td>
  699. <td class="paramname"><em>mode</em>&#160;</td>
  700. </tr>
  701. <tr>
  702. <td></td>
  703. <td>)</td>
  704. <td></td><td></td>
  705. </tr>
  706. </table>
  707. </div><div class="memdoc">
  708. <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>
  709. <dl class="params"><dt>Parameters</dt><dd>
  710. <table class="params">
  711. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to query. </td></tr>
  712. <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>One of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>.</td></tr>
  713. </table>
  714. </dd>
  715. </dl>
  716. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
  717. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  718. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b" title="Sets an input option for the specified window. ">glfwSetInputMode</a></dd></dl>
  719. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  720. </div>
  721. </div>
  722. <a class="anchor" id="ga6271d46a5901ec2c99601ccf4dd14731"></a>
  723. <div class="memitem">
  724. <div class="memproto">
  725. <table class="memname">
  726. <tr>
  727. <td class="memname">const float* glfwGetJoystickAxes </td>
  728. <td>(</td>
  729. <td class="paramtype">int&#160;</td>
  730. <td class="paramname"><em>joy</em>, </td>
  731. </tr>
  732. <tr>
  733. <td class="paramkey"></td>
  734. <td></td>
  735. <td class="paramtype">int *&#160;</td>
  736. <td class="paramname"><em>count</em>&#160;</td>
  737. </tr>
  738. <tr>
  739. <td></td>
  740. <td>)</td>
  741. <td></td><td></td>
  742. </tr>
  743. </table>
  744. </div><div class="memdoc">
  745. <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>
  746. <p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
  747. <dl class="params"><dt>Parameters</dt><dd>
  748. <table class="params">
  749. <tr><td class="paramdir">[in]</td><td class="paramname">joy</td><td>The <a class="el" href="group__joysticks.html">joystick</a> to query. </td></tr>
  750. <tr><td class="paramdir">[out]</td><td class="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>
  751. </table>
  752. </dd>
  753. </dl>
  754. <dl class="section return"><dt>Returns</dt><dd>An array of axis values, or <code>NULL</code> if the joystick is not present or an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  755. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  756. <dl class="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>
  757. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  758. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_axis">Joystick axis states</a></dd></dl>
  759. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetJoystickPos</code>. </dd></dl>
  760. </div>
  761. </div>
  762. <a class="anchor" id="gace54cd930dcd502e118fe4021384ce1b"></a>
  763. <div class="memitem">
  764. <div class="memproto">
  765. <table class="memname">
  766. <tr>
  767. <td class="memname">const unsigned char* glfwGetJoystickButtons </td>
  768. <td>(</td>
  769. <td class="paramtype">int&#160;</td>
  770. <td class="paramname"><em>joy</em>, </td>
  771. </tr>
  772. <tr>
  773. <td class="paramkey"></td>
  774. <td></td>
  775. <td class="paramtype">int *&#160;</td>
  776. <td class="paramname"><em>count</em>&#160;</td>
  777. </tr>
  778. <tr>
  779. <td></td>
  780. <td>)</td>
  781. <td></td><td></td>
  782. </tr>
  783. </table>
  784. </div><div class="memdoc">
  785. <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>
  786. <p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
  787. <dl class="params"><dt>Parameters</dt><dd>
  788. <table class="params">
  789. <tr><td class="paramdir">[in]</td><td class="paramname">joy</td><td>The <a class="el" href="group__joysticks.html">joystick</a> to query. </td></tr>
  790. <tr><td class="paramdir">[out]</td><td class="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>
  791. </table>
  792. </dd>
  793. </dl>
  794. <dl class="section return"><dt>Returns</dt><dd>An array of button states, or <code>NULL</code> if the joystick is not present or an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  795. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  796. <dl class="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>
  797. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  798. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_button">Joystick button states</a></dd></dl>
  799. <dl class="section since"><dt>Since</dt><dd>Added in version 2.2. </dd></dl>
  800. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Changed to return a dynamic array. </dd></dl>
  801. </div>
  802. </div>
  803. <a class="anchor" id="gac8d7f6107e05cfd106cfba973ab51e19"></a>
  804. <div class="memitem">
  805. <div class="memproto">
  806. <table class="memname">
  807. <tr>
  808. <td class="memname">const char* glfwGetJoystickName </td>
  809. <td>(</td>
  810. <td class="paramtype">int&#160;</td>
  811. <td class="paramname"><em>joy</em></td><td>)</td>
  812. <td></td>
  813. </tr>
  814. </table>
  815. </div><div class="memdoc">
  816. <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>
  817. <p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
  818. <dl class="params"><dt>Parameters</dt><dd>
  819. <table class="params">
  820. <tr><td class="paramdir">[in]</td><td class="paramname">joy</td><td>The <a class="el" href="group__joysticks.html">joystick</a> to query. </td></tr>
  821. </table>
  822. </dd>
  823. </dl>
  824. <dl class="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 <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  825. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  826. <dl class="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>
  827. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  828. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_name">Joystick name</a></dd></dl>
  829. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  830. </div>
  831. </div>
  832. <a class="anchor" id="gadd341da06bc8d418b4dc3a3518af9ad2"></a>
  833. <div class="memitem">
  834. <div class="memproto">
  835. <table class="memname">
  836. <tr>
  837. <td class="memname">int glfwGetKey </td>
  838. <td>(</td>
  839. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  840. <td class="paramname"><em>window</em>, </td>
  841. </tr>
  842. <tr>
  843. <td class="paramkey"></td>
  844. <td></td>
  845. <td class="paramtype">int&#160;</td>
  846. <td class="paramname"><em>key</em>&#160;</td>
  847. </tr>
  848. <tr>
  849. <td></td>
  850. <td>)</td>
  851. <td></td><td></td>
  852. </tr>
  853. </table>
  854. </div><div class="memdoc">
  855. <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>
  856. <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>
  857. <p>The key functions deal with physical keys, with <a class="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>
  858. <p>The <a class="el" href="group__mods.html">modifier key bit masks</a> are not key tokens and cannot be used with this function.</p>
  859. <p><b>Do not use this function</b> to implement <a class="el" href="input_guide.html#input_char">text input</a>.</p>
  860. <dl class="params"><dt>Parameters</dt><dd>
  861. <table class="params">
  862. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
  863. <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The desired <a class="el" href="group__keys.html">keyboard key</a>. <code>GLFW_KEY_UNKNOWN</code> is not a valid key for this function. </td></tr>
  864. </table>
  865. </dd>
  866. </dl>
  867. <dl class="section return"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>
  868. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
  869. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  870. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key">Key input</a></dd></dl>
  871. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  872. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter. </dd></dl>
  873. </div>
  874. </div>
  875. <a class="anchor" id="ga237a182e5ec0b21ce64543f3b5e7e2be"></a>
  876. <div class="memitem">
  877. <div class="memproto">
  878. <table class="memname">
  879. <tr>
  880. <td class="memname">const char* glfwGetKeyName </td>
  881. <td>(</td>
  882. <td class="paramtype">int&#160;</td>
  883. <td class="paramname"><em>key</em>, </td>
  884. </tr>
  885. <tr>
  886. <td class="paramkey"></td>
  887. <td></td>
  888. <td class="paramtype">int&#160;</td>
  889. <td class="paramname"><em>scancode</em>&#160;</td>
  890. </tr>
  891. <tr>
  892. <td></td>
  893. <td>)</td>
  894. <td></td><td></td>
  895. </tr>
  896. </table>
  897. </div><div class="memdoc">
  898. <p>This function returns the localized name of the specified printable key. This is intended for displaying key bindings to the user.</p>
  899. <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>
  900. <p>This behavior allows you to pass in the arguments passed to the <a class="el" href="input_guide.html#input_key">key callback</a> without modification.</p>
  901. <p>The printable keys are:</p><ul>
  902. <li><code>GLFW_KEY_APOSTROPHE</code></li>
  903. <li><code>GLFW_KEY_COMMA</code></li>
  904. <li><code>GLFW_KEY_MINUS</code></li>
  905. <li><code>GLFW_KEY_PERIOD</code></li>
  906. <li><code>GLFW_KEY_SLASH</code></li>
  907. <li><code>GLFW_KEY_SEMICOLON</code></li>
  908. <li><code>GLFW_KEY_EQUAL</code></li>
  909. <li><code>GLFW_KEY_LEFT_BRACKET</code></li>
  910. <li><code>GLFW_KEY_RIGHT_BRACKET</code></li>
  911. <li><code>GLFW_KEY_BACKSLASH</code></li>
  912. <li><code>GLFW_KEY_WORLD_1</code></li>
  913. <li><code>GLFW_KEY_WORLD_2</code></li>
  914. <li><code>GLFW_KEY_0</code> to <code>GLFW_KEY_9</code></li>
  915. <li><code>GLFW_KEY_A</code> to <code>GLFW_KEY_Z</code></li>
  916. <li><code>GLFW_KEY_KP_0</code> to <code>GLFW_KEY_KP_9</code></li>
  917. <li><code>GLFW_KEY_KP_DECIMAL</code></li>
  918. <li><code>GLFW_KEY_KP_DIVIDE</code></li>
  919. <li><code>GLFW_KEY_KP_MULTIPLY</code></li>
  920. <li><code>GLFW_KEY_KP_SUBTRACT</code></li>
  921. <li><code>GLFW_KEY_KP_ADD</code></li>
  922. <li><code>GLFW_KEY_KP_EQUAL</code></li>
  923. </ul>
  924. <dl class="params"><dt>Parameters</dt><dd>
  925. <table class="params">
  926. <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The key to query, or <code>GLFW_KEY_UNKNOWN</code>. </td></tr>
  927. <tr><td class="paramdir">[in]</td><td class="paramname">scancode</td><td>The scancode of the key to query. </td></tr>
  928. </table>
  929. </dd>
  930. </dl>
  931. <dl class="section return"><dt>Returns</dt><dd>The localized name of the key, or <code>NULL</code>.</dd></dl>
  932. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  933. <dl class="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 <a class="el" href="group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be">glfwGetKeyName</a>, or until the library is terminated.</dd></dl>
  934. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  935. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key_name">Key names</a></dd></dl>
  936. <dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
  937. </div>
  938. </div>
  939. <a class="anchor" id="gac1473feacb5996c01a7a5a33b5066704"></a>
  940. <div class="memitem">
  941. <div class="memproto">
  942. <table class="memname">
  943. <tr>
  944. <td class="memname">int glfwGetMouseButton </td>
  945. <td>(</td>
  946. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  947. <td class="paramname"><em>window</em>, </td>
  948. </tr>
  949. <tr>
  950. <td class="paramkey"></td>
  951. <td></td>
  952. <td class="paramtype">int&#160;</td>
  953. <td class="paramname"><em>button</em>&#160;</td>
  954. </tr>
  955. <tr>
  956. <td></td>
  957. <td>)</td>
  958. <td></td><td></td>
  959. </tr>
  960. </table>
  961. </div><div class="memdoc">
  962. <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>
  963. <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>
  964. <dl class="params"><dt>Parameters</dt><dd>
  965. <table class="params">
  966. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
  967. <tr><td class="paramdir">[in]</td><td class="paramname">button</td><td>The desired <a class="el" href="group__buttons.html">mouse button</a>. </td></tr>
  968. </table>
  969. </dd>
  970. </dl>
  971. <dl class="section return"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>
  972. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
  973. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  974. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_mouse_button">Mouse button input</a></dd></dl>
  975. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  976. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter. </dd></dl>
  977. </div>
  978. </div>
  979. <a class="anchor" id="gaa6cf4e7a77158a3b8fd00328b1720a4a"></a>
  980. <div class="memitem">
  981. <div class="memproto">
  982. <table class="memname">
  983. <tr>
  984. <td class="memname">double glfwGetTime </td>
  985. <td>(</td>
  986. <td class="paramtype">void&#160;</td>
  987. <td class="paramname"></td><td>)</td>
  988. <td></td>
  989. </tr>
  990. </table>
  991. </div><div class="memdoc">
  992. <p>This function returns the value of the GLFW timer. Unless the timer has been set using <a class="el" href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a>, the timer measures time elapsed since GLFW was initialized.</p>
  993. <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>
  994. <dl class="section return"><dt>Returns</dt><dd>The current value, in seconds, or zero if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  995. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  996. <dl class="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 <a class="el" href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a>.</dd></dl>
  997. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a></dd></dl>
  998. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  999. </div>
  1000. </div>
  1001. <a class="anchor" id="ga3289ee876572f6e91f06df3a24824443"></a>
  1002. <div class="memitem">
  1003. <div class="memproto">
  1004. <table class="memname">
  1005. <tr>
  1006. <td class="memname">uint64_t glfwGetTimerFrequency </td>
  1007. <td>(</td>
  1008. <td class="paramtype">void&#160;</td>
  1009. <td class="paramname"></td><td>)</td>
  1010. <td></td>
  1011. </tr>
  1012. </table>
  1013. </div><div class="memdoc">
  1014. <p>This function returns the frequency, in Hz, of the raw timer.</p>
  1015. <dl class="section return"><dt>Returns</dt><dd>The frequency of the timer, in Hz, or zero if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  1016. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1017. <dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
  1018. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a> </dd>
  1019. <dd>
  1020. <a class="el" href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa" title="Returns the current value of the raw timer. ">glfwGetTimerValue</a></dd></dl>
  1021. <dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
  1022. </div>
  1023. </div>
  1024. <a class="anchor" id="ga09b2bd37d328e0b9456c7ec575cc26aa"></a>
  1025. <div class="memitem">
  1026. <div class="memproto">
  1027. <table class="memname">
  1028. <tr>
  1029. <td class="memname">uint64_t glfwGetTimerValue </td>
  1030. <td>(</td>
  1031. <td class="paramtype">void&#160;</td>
  1032. <td class="paramname"></td><td>)</td>
  1033. <td></td>
  1034. </tr>
  1035. </table>
  1036. </div><div class="memdoc">
  1037. <p>This function returns the current value of the raw timer, measured in 1&#160;/&#160;frequency seconds. To get the frequency, call <a class="el" href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a>.</p>
  1038. <dl class="section return"><dt>Returns</dt><dd>The value of the timer, or zero if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  1039. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1040. <dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
  1041. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a> </dd>
  1042. <dd>
  1043. <a class="el" href="group__input.html#ga3289ee876572f6e91f06df3a24824443" title="Returns the frequency, in Hz, of the raw timer. ">glfwGetTimerFrequency</a></dd></dl>
  1044. <dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
  1045. </div>
  1046. </div>
  1047. <a class="anchor" id="gaffcbd9ac8ee737fcdd25475123a3c790"></a>
  1048. <div class="memitem">
  1049. <div class="memproto">
  1050. <table class="memname">
  1051. <tr>
  1052. <td class="memname">int glfwJoystickPresent </td>
  1053. <td>(</td>
  1054. <td class="paramtype">int&#160;</td>
  1055. <td class="paramname"><em>joy</em></td><td>)</td>
  1056. <td></td>
  1057. </tr>
  1058. </table>
  1059. </div><div class="memdoc">
  1060. <p>This function returns whether the specified joystick is present.</p>
  1061. <dl class="params"><dt>Parameters</dt><dd>
  1062. <table class="params">
  1063. <tr><td class="paramdir">[in]</td><td class="paramname">joy</td><td>The <a class="el" href="group__joysticks.html">joystick</a> to query. </td></tr>
  1064. </table>
  1065. </dd>
  1066. </dl>
  1067. <dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the joystick is present, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
  1068. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  1069. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1070. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick">Joystick input</a></dd></dl>
  1071. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetJoystickParam</code>. </dd></dl>
  1072. </div>
  1073. </div>
  1074. <a class="anchor" id="ga556239421c6a5a243c66fca28da9f742"></a>
  1075. <div class="memitem">
  1076. <div class="memproto">
  1077. <table class="memname">
  1078. <tr>
  1079. <td class="memname"><a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a> glfwSetCharCallback </td>
  1080. <td>(</td>
  1081. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1082. <td class="paramname"><em>window</em>, </td>
  1083. </tr>
  1084. <tr>
  1085. <td class="paramkey"></td>
  1086. <td></td>
  1087. <td class="paramtype"><a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a>&#160;</td>
  1088. <td class="paramname"><em>cbfun</em>&#160;</td>
  1089. </tr>
  1090. <tr>
  1091. <td></td>
  1092. <td>)</td>
  1093. <td></td><td></td>
  1094. </tr>
  1095. </table>
  1096. </div><div class="memdoc">
  1097. <p>This function sets the character callback of the specified window, which is called when a Unicode character is input.</p>
  1098. <p>The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas the <a class="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>
  1099. <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 <a class="el" href="group__input.html#ga3f55ef5dc03a374e567f068b13c94afc">character with modifiers callback</a> that receives these events.</p>
  1100. <dl class="params"><dt>Parameters</dt><dd>
  1101. <table class="params">
  1102. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1103. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1104. </table>
  1105. </dd>
  1106. </dl>
  1107. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1108. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1109. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1110. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a></dd></dl>
  1111. <dl class="section since"><dt>Since</dt><dd>Added in version 2.4. </dd></dl>
  1112. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>
  1113. </div>
  1114. </div>
  1115. <a class="anchor" id="ga3f55ef5dc03a374e567f068b13c94afc"></a>
  1116. <div class="memitem">
  1117. <div class="memproto">
  1118. <table class="memname">
  1119. <tr>
  1120. <td class="memname"><a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a> glfwSetCharModsCallback </td>
  1121. <td>(</td>
  1122. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1123. <td class="paramname"><em>window</em>, </td>
  1124. </tr>
  1125. <tr>
  1126. <td class="paramkey"></td>
  1127. <td></td>
  1128. <td class="paramtype"><a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a>&#160;</td>
  1129. <td class="paramname"><em>cbfun</em>&#160;</td>
  1130. </tr>
  1131. <tr>
  1132. <td></td>
  1133. <td>)</td>
  1134. <td></td><td></td>
  1135. </tr>
  1136. </table>
  1137. </div><div class="memdoc">
  1138. <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>
  1139. <p>The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see the <a class="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 <a class="el" href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155">key callback</a> instead.</p>
  1140. <dl class="params"><dt>Parameters</dt><dd>
  1141. <table class="params">
  1142. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1143. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1144. </table>
  1145. </dd>
  1146. </dl>
  1147. <dl class="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  1148. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1149. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1150. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a></dd></dl>
  1151. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  1152. </div>
  1153. </div>
  1154. <a class="anchor" id="gaba1f022c5eb07dfac421df34cdcd31dd"></a>
  1155. <div class="memitem">
  1156. <div class="memproto">
  1157. <table class="memname">
  1158. <tr>
  1159. <td class="memname">void glfwSetClipboardString </td>
  1160. <td>(</td>
  1161. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1162. <td class="paramname"><em>window</em>, </td>
  1163. </tr>
  1164. <tr>
  1165. <td class="paramkey"></td>
  1166. <td></td>
  1167. <td class="paramtype">const char *&#160;</td>
  1168. <td class="paramname"><em>string</em>&#160;</td>
  1169. </tr>
  1170. <tr>
  1171. <td></td>
  1172. <td>)</td>
  1173. <td></td><td></td>
  1174. </tr>
  1175. </table>
  1176. </div><div class="memdoc">
  1177. <p>This function sets the system clipboard to the specified, UTF-8 encoded string.</p>
  1178. <dl class="params"><dt>Parameters</dt><dd>
  1179. <table class="params">
  1180. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that will own the clipboard contents. </td></tr>
  1181. <tr><td class="paramdir">[in]</td><td class="paramname">string</td><td>A UTF-8 encoded string.</td></tr>
  1182. </table>
  1183. </dd>
  1184. </dl>
  1185. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  1186. <dl class="section user"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>
  1187. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1188. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
  1189. <dd>
  1190. <a class="el" href="group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94" title="Returns the contents of the clipboard as a string. ">glfwGetClipboardString</a></dd></dl>
  1191. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  1192. </div>
  1193. </div>
  1194. <a class="anchor" id="gad3b4f38c8d5dae036bc8fa959e18343e"></a>
  1195. <div class="memitem">
  1196. <div class="memproto">
  1197. <table class="memname">
  1198. <tr>
  1199. <td class="memname">void glfwSetCursor </td>
  1200. <td>(</td>
  1201. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1202. <td class="paramname"><em>window</em>, </td>
  1203. </tr>
  1204. <tr>
  1205. <td class="paramkey"></td>
  1206. <td></td>
  1207. <td class="paramtype"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *&#160;</td>
  1208. <td class="paramname"><em>cursor</em>&#160;</td>
  1209. </tr>
  1210. <tr>
  1211. <td></td>
  1212. <td>)</td>
  1213. <td></td><td></td>
  1214. </tr>
  1215. </table>
  1216. </div><div class="memdoc">
  1217. <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 <a class="el" href="input_guide.html#cursor_mode">cursor mode</a> of the window is <code>GLFW_CURSOR_NORMAL</code>.</p>
  1218. <p>On some platforms, the set cursor may not be visible unless the window also has input focus.</p>
  1219. <dl class="params"><dt>Parameters</dt><dd>
  1220. <table class="params">
  1221. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to set the cursor for. </td></tr>
  1222. <tr><td class="paramdir">[in]</td><td class="paramname">cursor</td><td>The cursor to set, or <code>NULL</code> to switch back to the default arrow cursor.</td></tr>
  1223. </table>
  1224. </dd>
  1225. </dl>
  1226. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  1227. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1228. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a></dd></dl>
  1229. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  1230. </div>
  1231. </div>
  1232. <a class="anchor" id="gaa299c41dd0a3d171d166354e01279e04"></a>
  1233. <div class="memitem">
  1234. <div class="memproto">
  1235. <table class="memname">
  1236. <tr>
  1237. <td class="memname"><a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a> glfwSetCursorEnterCallback </td>
  1238. <td>(</td>
  1239. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1240. <td class="paramname"><em>window</em>, </td>
  1241. </tr>
  1242. <tr>
  1243. <td class="paramkey"></td>
  1244. <td></td>
  1245. <td class="paramtype"><a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a>&#160;</td>
  1246. <td class="paramname"><em>cbfun</em>&#160;</td>
  1247. </tr>
  1248. <tr>
  1249. <td></td>
  1250. <td>)</td>
  1251. <td></td><td></td>
  1252. </tr>
  1253. </table>
  1254. </div><div class="memdoc">
  1255. <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>
  1256. <dl class="params"><dt>Parameters</dt><dd>
  1257. <table class="params">
  1258. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1259. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1260. </table>
  1261. </dd>
  1262. </dl>
  1263. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1264. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1265. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1266. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_enter">Cursor enter/leave events</a></dd></dl>
  1267. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  1268. </div>
  1269. </div>
  1270. <a class="anchor" id="ga04b03af936d906ca123c8f4ee08b39e7"></a>
  1271. <div class="memitem">
  1272. <div class="memproto">
  1273. <table class="memname">
  1274. <tr>
  1275. <td class="memname">void glfwSetCursorPos </td>
  1276. <td>(</td>
  1277. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1278. <td class="paramname"><em>window</em>, </td>
  1279. </tr>
  1280. <tr>
  1281. <td class="paramkey"></td>
  1282. <td></td>
  1283. <td class="paramtype">double&#160;</td>
  1284. <td class="paramname"><em>xpos</em>, </td>
  1285. </tr>
  1286. <tr>
  1287. <td class="paramkey"></td>
  1288. <td></td>
  1289. <td class="paramtype">double&#160;</td>
  1290. <td class="paramname"><em>ypos</em>&#160;</td>
  1291. </tr>
  1292. <tr>
  1293. <td></td>
  1294. <td>)</td>
  1295. <td></td><td></td>
  1296. </tr>
  1297. </table>
  1298. </div><div class="memdoc">
  1299. <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>
  1300. <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 <a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> for more information.</p>
  1301. <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>
  1302. <dl class="params"><dt>Parameters</dt><dd>
  1303. <table class="params">
  1304. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
  1305. <tr><td class="paramdir">[in]</td><td class="paramname">xpos</td><td>The desired x-coordinate, relative to the left edge of the client area. </td></tr>
  1306. <tr><td class="paramdir">[in]</td><td class="paramname">ypos</td><td>The desired y-coordinate, relative to the top edge of the client area.</td></tr>
  1307. </table>
  1308. </dd>
  1309. </dl>
  1310. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  1311. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1312. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a> </dd>
  1313. <dd>
  1314. <a class="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>
  1315. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePos</code>. </dd></dl>
  1316. </div>
  1317. </div>
  1318. <a class="anchor" id="ga7dad39486f2c7591af7fb25134a2501d"></a>
  1319. <div class="memitem">
  1320. <div class="memproto">
  1321. <table class="memname">
  1322. <tr>
  1323. <td class="memname"><a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a> glfwSetCursorPosCallback </td>
  1324. <td>(</td>
  1325. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1326. <td class="paramname"><em>window</em>, </td>
  1327. </tr>
  1328. <tr>
  1329. <td class="paramkey"></td>
  1330. <td></td>
  1331. <td class="paramtype"><a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a>&#160;</td>
  1332. <td class="paramname"><em>cbfun</em>&#160;</td>
  1333. </tr>
  1334. <tr>
  1335. <td></td>
  1336. <td>)</td>
  1337. <td></td><td></td>
  1338. </tr>
  1339. </table>
  1340. </div><div class="memdoc">
  1341. <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>
  1342. <dl class="params"><dt>Parameters</dt><dd>
  1343. <table class="params">
  1344. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1345. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1346. </table>
  1347. </dd>
  1348. </dl>
  1349. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1350. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1351. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1352. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a></dd></dl>
  1353. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePosCallback</code>. </dd></dl>
  1354. </div>
  1355. </div>
  1356. <a class="anchor" id="ga41291bf15dd3ff564b3143aa6dc74a4b"></a>
  1357. <div class="memitem">
  1358. <div class="memproto">
  1359. <table class="memname">
  1360. <tr>
  1361. <td class="memname"><a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a> glfwSetDropCallback </td>
  1362. <td>(</td>
  1363. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1364. <td class="paramname"><em>window</em>, </td>
  1365. </tr>
  1366. <tr>
  1367. <td class="paramkey"></td>
  1368. <td></td>
  1369. <td class="paramtype"><a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a>&#160;</td>
  1370. <td class="paramname"><em>cbfun</em>&#160;</td>
  1371. </tr>
  1372. <tr>
  1373. <td></td>
  1374. <td>)</td>
  1375. <td></td><td></td>
  1376. </tr>
  1377. </table>
  1378. </div><div class="memdoc">
  1379. <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>
  1380. <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>
  1381. <dl class="params"><dt>Parameters</dt><dd>
  1382. <table class="params">
  1383. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1384. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new file drop callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1385. </table>
  1386. </dd>
  1387. </dl>
  1388. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1389. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1390. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1391. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#path_drop">Path drop input</a></dd></dl>
  1392. <dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
  1393. </div>
  1394. </div>
  1395. <a class="anchor" id="gaa92336e173da9c8834558b54ee80563b"></a>
  1396. <div class="memitem">
  1397. <div class="memproto">
  1398. <table class="memname">
  1399. <tr>
  1400. <td class="memname">void glfwSetInputMode </td>
  1401. <td>(</td>
  1402. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1403. <td class="paramname"><em>window</em>, </td>
  1404. </tr>
  1405. <tr>
  1406. <td class="paramkey"></td>
  1407. <td></td>
  1408. <td class="paramtype">int&#160;</td>
  1409. <td class="paramname"><em>mode</em>, </td>
  1410. </tr>
  1411. <tr>
  1412. <td class="paramkey"></td>
  1413. <td></td>
  1414. <td class="paramtype">int&#160;</td>
  1415. <td class="paramname"><em>value</em>&#160;</td>
  1416. </tr>
  1417. <tr>
  1418. <td></td>
  1419. <td>)</td>
  1420. <td></td><td></td>
  1421. </tr>
  1422. </table>
  1423. </div><div class="memdoc">
  1424. <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>
  1425. <p>If the mode is <code>GLFW_CURSOR</code>, the value must be one of the following cursor modes:</p><ul>
  1426. <li><code>GLFW_CURSOR_NORMAL</code> makes the cursor visible and behaving normally.</li>
  1427. <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>
  1428. <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>
  1429. </ul>
  1430. <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 <a class="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>
  1431. <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 <a class="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>
  1432. <dl class="params"><dt>Parameters</dt><dd>
  1433. <table class="params">
  1434. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose input mode to set. </td></tr>
  1435. <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>One of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>. </td></tr>
  1436. <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The new value of the specified input mode.</td></tr>
  1437. </table>
  1438. </dd>
  1439. </dl>
  1440. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  1441. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1442. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4" title="Returns the value of an input option for the specified window. ">glfwGetInputMode</a></dd></dl>
  1443. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwEnable</code> and <code>glfwDisable</code>. </dd></dl>
  1444. </div>
  1445. </div>
  1446. <a class="anchor" id="gab1dc8379f1b82bb660a6b9c9fa06ca07"></a>
  1447. <div class="memitem">
  1448. <div class="memproto">
  1449. <table class="memname">
  1450. <tr>
  1451. <td class="memname"><a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a> glfwSetJoystickCallback </td>
  1452. <td>(</td>
  1453. <td class="paramtype"><a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a>&#160;</td>
  1454. <td class="paramname"><em>cbfun</em></td><td>)</td>
  1455. <td></td>
  1456. </tr>
  1457. </table>
  1458. </div><div class="memdoc">
  1459. <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>
  1460. <dl class="params"><dt>Parameters</dt><dd>
  1461. <table class="params">
  1462. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1463. </table>
  1464. </dd>
  1465. </dl>
  1466. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1467. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1468. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1469. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_event">Joystick configuration changes</a></dd></dl>
  1470. <dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
  1471. </div>
  1472. </div>
  1473. <a class="anchor" id="ga7e496507126f35ea72f01b2e6ef6d155"></a>
  1474. <div class="memitem">
  1475. <div class="memproto">
  1476. <table class="memname">
  1477. <tr>
  1478. <td class="memname"><a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a> glfwSetKeyCallback </td>
  1479. <td>(</td>
  1480. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1481. <td class="paramname"><em>window</em>, </td>
  1482. </tr>
  1483. <tr>
  1484. <td class="paramkey"></td>
  1485. <td></td>
  1486. <td class="paramtype"><a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a>&#160;</td>
  1487. <td class="paramname"><em>cbfun</em>&#160;</td>
  1488. </tr>
  1489. <tr>
  1490. <td></td>
  1491. <td>)</td>
  1492. <td></td><td></td>
  1493. </tr>
  1494. </table>
  1495. </div><div class="memdoc">
  1496. <p>This function sets the key callback of the specified window, which is called when a key is pressed, repeated or released.</p>
  1497. <p>The key functions deal with physical keys, with layout independent <a class="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 <a class="el" href="group__input.html#ga556239421c6a5a243c66fca28da9f742">character callback</a> instead.</p>
  1498. <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 <a class="el" href="group__window.html#ga25d1c584edb375d7711c5c3548ba711f">window focus callback</a> has been called.</p>
  1499. <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 <a class="el" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a>.</p>
  1500. <p>Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.</p>
  1501. <dl class="params"><dt>Parameters</dt><dd>
  1502. <table class="params">
  1503. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1504. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new key callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1505. </table>
  1506. </dd>
  1507. </dl>
  1508. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1509. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1510. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1511. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key">Key input</a></dd></dl>
  1512. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  1513. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>
  1514. </div>
  1515. </div>
  1516. <a class="anchor" id="gaef49b72d84d615bca0a6ed65485e035d"></a>
  1517. <div class="memitem">
  1518. <div class="memproto">
  1519. <table class="memname">
  1520. <tr>
  1521. <td class="memname"><a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a> glfwSetMouseButtonCallback </td>
  1522. <td>(</td>
  1523. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1524. <td class="paramname"><em>window</em>, </td>
  1525. </tr>
  1526. <tr>
  1527. <td class="paramkey"></td>
  1528. <td></td>
  1529. <td class="paramtype"><a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a>&#160;</td>
  1530. <td class="paramname"><em>cbfun</em>&#160;</td>
  1531. </tr>
  1532. <tr>
  1533. <td></td>
  1534. <td>)</td>
  1535. <td></td><td></td>
  1536. </tr>
  1537. </table>
  1538. </div><div class="memdoc">
  1539. <p>This function sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released.</p>
  1540. <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 <a class="el" href="group__window.html#ga25d1c584edb375d7711c5c3548ba711f">window focus callback</a> has been called.</p>
  1541. <dl class="params"><dt>Parameters</dt><dd>
  1542. <table class="params">
  1543. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1544. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1545. </table>
  1546. </dd>
  1547. </dl>
  1548. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1549. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1550. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1551. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_mouse_button">Mouse button input</a></dd></dl>
  1552. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  1553. <dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>
  1554. </div>
  1555. </div>
  1556. <a class="anchor" id="gacf02eb10504352f16efda4593c3ce60e"></a>
  1557. <div class="memitem">
  1558. <div class="memproto">
  1559. <table class="memname">
  1560. <tr>
  1561. <td class="memname"><a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a> glfwSetScrollCallback </td>
  1562. <td>(</td>
  1563. <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
  1564. <td class="paramname"><em>window</em>, </td>
  1565. </tr>
  1566. <tr>
  1567. <td class="paramkey"></td>
  1568. <td></td>
  1569. <td class="paramtype"><a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a>&#160;</td>
  1570. <td class="paramname"><em>cbfun</em>&#160;</td>
  1571. </tr>
  1572. <tr>
  1573. <td></td>
  1574. <td>)</td>
  1575. <td></td><td></td>
  1576. </tr>
  1577. </table>
  1578. </div><div class="memdoc">
  1579. <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>
  1580. <p>The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area.</p>
  1581. <dl class="params"><dt>Parameters</dt><dd>
  1582. <table class="params">
  1583. <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
  1584. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new scroll callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  1585. </table>
  1586. </dd>
  1587. </dl>
  1588. <dl class="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 <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
  1589. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
  1590. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  1591. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#scrolling">Scroll input</a></dd></dl>
  1592. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMouseWheelCallback</code>. </dd></dl>
  1593. </div>
  1594. </div>
  1595. <a class="anchor" id="gaf59589ef6e8b8c8b5ad184b25afd4dc0"></a>
  1596. <div class="memitem">
  1597. <div class="memproto">
  1598. <table class="memname">
  1599. <tr>
  1600. <td class="memname">void glfwSetTime </td>
  1601. <td>(</td>
  1602. <td class="paramtype">double&#160;</td>
  1603. <td class="paramname"><em>time</em></td><td>)</td>
  1604. <td></td>
  1605. </tr>
  1606. </table>
  1607. </div><div class="memdoc">
  1608. <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>
  1609. <dl class="params"><dt>Parameters</dt><dd>
  1610. <table class="params">
  1611. <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>The new value, in seconds.</td></tr>
  1612. </table>
  1613. </dd>
  1614. </dl>
  1615. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>.</dd></dl>
  1616. <dl class="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>
  1617. <dl class="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 <a class="el" href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a>.</dd></dl>
  1618. <dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a></dd></dl>
  1619. <dl class="section since"><dt>Since</dt><dd>Added in version 2.2. </dd></dl>
  1620. </div>
  1621. </div>
  1622. </div><!-- contents -->
  1623. <address class="footer">
  1624. <p>
  1625. Last update on Thu Aug 18 2016 for GLFW 3.2.1
  1626. </p>
  1627. </address>
  1628. </body>
  1629. </html>