<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GLFW: Input reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
	<div class="glfwheader">
		<a href="http://www.glfw.org/" id="glfwhome">GLFW</a>
		<ul class="glfwnavbar">
			<li><a href="http://www.glfw.org/documentation.html">Documentation</a></li>
			<li><a href="http://www.glfw.org/download.html">Download</a></li>
			<li><a href="http://www.glfw.org/media.html">Media</a></li>
			<li><a href="http://www.glfw.org/community.html">Community</a></li>
		</ul>
	</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

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

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Input reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<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>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<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>
<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>
<tr class="separator:ga39893a4a7e7c3239c98d29c9e084350c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga4cfad918fa836f09541e7b9acd36686c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga51ab436c41eeaed6db5a0c9403b1c840"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga4687e2199c60a18a8dd1da532e6d75c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga0192a232a41e4e82948217c8ba94fdfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gabf24451c7ceb1952bc02b17a0d5c3e5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gae36fb6897d2b7df9b128900c8ce9c507"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gab71f4ca80b651462852e601caf308c4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaa67aa597e974298c748bfe4fb17d406d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<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>
<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>
<tr class="separator:gaf5b859dbe19bdf434e42695ea45cc5f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaa92336e173da9c8834558b54ee80563b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga237a182e5ec0b21ce64543f3b5e7e2be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gadd341da06bc8d418b4dc3a3518af9ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gac1473feacb5996c01a7a5a33b5066704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga01d37b6c40133676b9cea60ca1d7c0cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga04b03af936d906ca123c8f4ee08b39e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gafca356935e10135016aa49ffa464c355"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a custom cursor.  <a href="#gafca356935e10135016aa49ffa464c355">More...</a><br /></td></tr>
<tr class="separator:gafca356935e10135016aa49ffa464c355"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaa65f416d03ebbbb5b8db71a489fcb894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga81b952cd1764274d0db7fb3c5a79ba6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a cursor.  <a href="#ga81b952cd1764274d0db7fb3c5a79ba6a">More...</a><br /></td></tr>
<tr class="separator:ga81b952cd1764274d0db7fb3c5a79ba6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gad3b4f38c8d5dae036bc8fa959e18343e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga7e496507126f35ea72f01b2e6ef6d155"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the key callback.  <a href="#ga7e496507126f35ea72f01b2e6ef6d155">More...</a><br /></td></tr>
<tr class="separator:ga7e496507126f35ea72f01b2e6ef6d155"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga556239421c6a5a243c66fca28da9f742"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga3f55ef5dc03a374e567f068b13c94afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaef49b72d84d615bca0a6ed65485e035d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga7dad39486f2c7591af7fb25134a2501d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaa299c41dd0a3d171d166354e01279e04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gacf02eb10504352f16efda4593c3ce60e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the scroll callback.  <a href="#gacf02eb10504352f16efda4593c3ce60e">More...</a><br /></td></tr>
<tr class="separator:gacf02eb10504352f16efda4593c3ce60e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga41291bf15dd3ff564b3143aa6dc74a4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaffcbd9ac8ee737fcdd25475123a3c790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga6271d46a5901ec2c99601ccf4dd14731"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gace54cd930dcd502e118fe4021384ce1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gac8d7f6107e05cfd106cfba973ab51e19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gab1dc8379f1b82bb660a6b9c9fa06ca07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaba1f022c5eb07dfac421df34cdcd31dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga5aba1d704d9ab539282b1fbe9f18bb94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gaa6cf4e7a77158a3b8fd00328b1720a4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the GLFW timer.  <a href="#gaf59589ef6e8b8c8b5ad184b25afd4dc0">More...</a><br /></td></tr>
<tr class="separator:gaf59589ef6e8b8c8b5ad184b25afd4dc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga09b2bd37d328e0b9456c7ec575cc26aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga3289ee876572f6e91f06df3a24824443"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Key and button actions</h2></td></tr>
<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>
<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>
<tr class="separator:gada11d965c4da13090ad336e030e4d11f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:ga2485743d0b59df3791c45951c4195265"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:gac96fd3b9fc66c6f0eebaf6532595338f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<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>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga2485743d0b59df3791c45951c4195265"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLFW_PRESS&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The key or mouse button was pressed. </p>

</div>
</div>
<a class="anchor" id="gada11d965c4da13090ad336e030e4d11f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLFW_RELEASE&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The key or mouse button was released. </p>

</div>
</div>
<a class="anchor" id="gac96fd3b9fc66c6f0eebaf6532595338f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GLFW_REPEAT&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The key was held down until it repeated. </p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gabf24451c7ceb1952bc02b17a0d5c3e5f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWcharfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, unsigned int)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for Unicode character callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">codepoint</td><td>The Unicode code point of the character.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a> </dd>
<dd>
<a class="el" href="group__input.html#ga556239421c6a5a243c66fca28da9f742" title="Sets the Unicode character callback. ">glfwSetCharCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 2.4. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter. </dd></dl>

</div>
</div>
<a class="anchor" id="gae36fb6897d2b7df9b128900c8ce9c507"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWcharmodsfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, unsigned int, int)</td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">codepoint</td><td>The Unicode code point of the character. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a> </dd>
<dd>
<a class="el" href="group__input.html#ga3f55ef5dc03a374e567f068b13c94afc" title="Sets the Unicode character with modifiers callback. ">glfwSetCharModsCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="ga51ab436c41eeaed6db5a0c9403b1c840"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWcursorenterfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for cursor enter/leave callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_enter">Cursor enter/leave events</a> </dd>
<dd>
<a class="el" href="group__input.html#gaa299c41dd0a3d171d166354e01279e04" title="Sets the cursor enter/exit callback. ">glfwSetCursorEnterCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4cfad918fa836f09541e7b9acd36686c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWcursorposfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, double, double)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for cursor position callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <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>
    <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>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a> </dd>
<dd>
<a class="el" href="group__input.html#ga7dad39486f2c7591af7fb25134a2501d" title="Sets the cursor position callback. ">glfwSetCursorPosCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmouseposfun</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="gab71f4ca80b651462852e601caf308c4a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWdropfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, const char **)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for file drop callbacks.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>The number of dropped files. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">paths</td><td>The UTF-8 encoded file and/or directory path names.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#path_drop">Path drop input</a> </dd>
<dd>
<a class="el" href="group__input.html#ga41291bf15dd3ff564b3143aa6dc74a4b" title="Sets the file drop callback. ">glfwSetDropCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa67aa597e974298c748bfe4fb17d406d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWjoystickfun) (int, int)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for joystick configuration callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">joy</td><td>The joystick that was connected or disconnected. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_event">Joystick configuration changes</a> </dd>
<dd>
<a class="el" href="group__input.html#gab1dc8379f1b82bb660a6b9c9fa06ca07" title="Sets the joystick configuration callback. ">glfwSetJoystickCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>

</div>
</div>
<a class="anchor" id="ga0192a232a41e4e82948217c8ba94fdfd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWkeyfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, int, int, int)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for keyboard key callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <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>
    <tr><td class="paramdir">[in]</td><td class="paramname">scancode</td><td>The system-specific scancode of the key. </td></tr>
    <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>
    <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>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key">Key input</a> </dd>
<dd>
<a class="el" href="group__input.html#ga7e496507126f35ea72f01b2e6ef6d155" title="Sets the key callback. ">glfwSetKeyCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle, scancode and modifier mask parameters. </dd></dl>

</div>
</div>
<a class="anchor" id="ga39893a4a7e7c3239c98d29c9e084350c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWmousebuttonfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, int, int, int)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for mouse button callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <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>
    <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>
    <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>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_mouse_button">Mouse button input</a> </dd>
<dd>
<a class="el" href="group__input.html#gaef49b72d84d615bca0a6ed65485e035d" title="Sets the mouse button callback. ">glfwSetMouseButtonCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle and modifier mask parameters. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4687e2199c60a18a8dd1da532e6d75c9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  GLFWscrollfun) (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *, double, double)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the function signature for scroll callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that received the event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">xoffset</td><td>The scroll offset along the x-axis. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yoffset</td><td>The scroll offset along the y-axis.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#scrolling">Scroll input</a> </dd>
<dd>
<a class="el" href="group__input.html#gacf02eb10504352f16efda4593c3ce60e" title="Sets the scroll callback. ">glfwSetScrollCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmousewheelfun</code>. </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gafca356935e10135016aa49ffa464c355"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a>* glfwCreateCursor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structGLFWimage.html">GLFWimage</a> *&#160;</td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>xhot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yhot</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<p>The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel. They are arranged canonically as packed sequential rows, starting from the top-left corner.</p>
<p>The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>The desired cursor image. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">xhot</td><td>The desired x-coordinate, in pixels, of the cursor hotspot. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yhot</td><td>The desired y-coordinate, in pixels, of the cursor hotspot. </td></tr>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>
<dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a> </dd>
<dd>
<a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a" title="Destroys a cursor. ">glfwDestroyCursor</a> </dd>
<dd>
<a class="el" href="group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894" title="Creates a cursor with a standard shape. ">glfwCreateStandardCursor</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa65f416d03ebbbb5b8db71a489fcb894"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a>* glfwCreateStandardCursor </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>shape</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a> </dd>
<dd>
<a class="el" href="group__input.html#gafca356935e10135016aa49ffa464c355" title="Creates a custom cursor. ">glfwCreateCursor</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="ga81b952cd1764274d0db7fb3c5a79ba6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwDestroyCursor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *&#160;</td>
          <td class="paramname"><em>cursor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cursor</td><td>The cursor object to destroy.</td></tr>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a> </dd>
<dd>
<a class="el" href="group__input.html#gafca356935e10135016aa49ffa464c355" title="Creates a custom cursor. ">glfwCreateCursor</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="ga5aba1d704d9ab539282b1fbe9f18bb94"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* glfwGetClipboardString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that will request the clipboard contents. </td></tr>
  </table>
  </dd>
</dl>
<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>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
<dd>
<a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd" title="Sets the clipboard to the specified string. ">glfwSetClipboardString</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga01d37b6c40133676b9cea60ca1d7c0cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwGetCursorPos </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>xpos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>ypos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the client area of the specified window.</p>
<p>If the cursor is disabled (with <code>GLFW_CURSOR_DISABLED</code>) then the cursor position is unbounded and limited only by the minimum and maximum values of a <code>double</code>.</p>
<p>The coordinate can be converted to their integer equivalents with the <code>floor</code> function. Casting directly to an integer type works for positive coordinates, but fails for negative ones.</p>
<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
    <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>
    <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>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a> </dd>
<dd>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetMousePos</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf5b859dbe19bdf434e42695ea45cc5f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int glfwGetInputMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to query. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6271d46a5901ec2c99601ccf4dd14731"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const float* glfwGetJoystickAxes </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>joy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the values of all axes of the specified joystick. Each element in the array is a value between -1.0 and 1.0.</p>
<p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <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>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_axis">Joystick axis states</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetJoystickPos</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="gace54cd930dcd502e118fe4021384ce1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const unsigned char* glfwGetJoystickButtons </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>joy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the state of all buttons of the specified joystick. Each element in the array is either <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
<p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <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>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_button">Joystick button states</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 2.2. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Changed to return a dynamic array. </dd></dl>

</div>
</div>
<a class="anchor" id="gac8d7f6107e05cfd106cfba973ab51e19"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* glfwGetJoystickName </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>joy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the name, encoded as UTF-8, of the specified joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.</p>
<p>Querying a joystick slot with no device present is not an error, but will cause this function to return <code>NULL</code>. Call <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> to check device presence.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_name">Joystick name</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>

</div>
</div>
<a class="anchor" id="gadd341da06bc8d418b4dc3a3518af9ad2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int glfwGetKey </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the last state reported for the specified key to the specified window. The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. The higher-level action <code>GLFW_REPEAT</code> is only reported to the key callback.</p>
<p>If the <code>GLFW_STICKY_KEYS</code> input mode is enabled, this function returns <code>GLFW_PRESS</code> the first time you call it for a key that was pressed, even if that key has already been released.</p>
<p>The key functions deal with physical keys, with <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>
<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>
<p><b>Do not use this function</b> to implement <a class="el" href="input_guide.html#input_char">text input</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key">Key input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter. </dd></dl>

</div>
</div>
<a class="anchor" id="ga237a182e5ec0b21ce64543f3b5e7e2be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* glfwGetKeyName </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>scancode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the localized name of the specified printable key. This is intended for displaying key bindings to the user.</p>
<p>If the key is <code>GLFW_KEY_UNKNOWN</code>, the scancode is used instead, otherwise the scancode is ignored. If a non-printable key or (if the key is <code>GLFW_KEY_UNKNOWN</code>) a scancode that maps to a non-printable key is specified, this function returns <code>NULL</code>.</p>
<p>This behavior allows you to pass in the arguments passed to the <a class="el" href="input_guide.html#input_key">key callback</a> without modification.</p>
<p>The printable keys are:</p><ul>
<li><code>GLFW_KEY_APOSTROPHE</code></li>
<li><code>GLFW_KEY_COMMA</code></li>
<li><code>GLFW_KEY_MINUS</code></li>
<li><code>GLFW_KEY_PERIOD</code></li>
<li><code>GLFW_KEY_SLASH</code></li>
<li><code>GLFW_KEY_SEMICOLON</code></li>
<li><code>GLFW_KEY_EQUAL</code></li>
<li><code>GLFW_KEY_LEFT_BRACKET</code></li>
<li><code>GLFW_KEY_RIGHT_BRACKET</code></li>
<li><code>GLFW_KEY_BACKSLASH</code></li>
<li><code>GLFW_KEY_WORLD_1</code></li>
<li><code>GLFW_KEY_WORLD_2</code></li>
<li><code>GLFW_KEY_0</code> to <code>GLFW_KEY_9</code></li>
<li><code>GLFW_KEY_A</code> to <code>GLFW_KEY_Z</code></li>
<li><code>GLFW_KEY_KP_0</code> to <code>GLFW_KEY_KP_9</code></li>
<li><code>GLFW_KEY_KP_DECIMAL</code></li>
<li><code>GLFW_KEY_KP_DIVIDE</code></li>
<li><code>GLFW_KEY_KP_MULTIPLY</code></li>
<li><code>GLFW_KEY_KP_SUBTRACT</code></li>
<li><code>GLFW_KEY_KP_ADD</code></li>
<li><code>GLFW_KEY_KP_EQUAL</code></li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The key to query, or <code>GLFW_KEY_UNKNOWN</code>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scancode</td><td>The scancode of the key to query. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The localized name of the key, or <code>NULL</code>.</dd></dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key_name">Key names</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>

</div>
</div>
<a class="anchor" id="gac1473feacb5996c01a7a5a33b5066704"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int glfwGetMouseButton </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>button</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the last state reported for the specified mouse button to the specified window. The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
<p>If the <code>GLFW_STICKY_MOUSE_BUTTONS</code> input mode is enabled, this function <code>GLFW_PRESS</code> the first time you call it for a mouse button that was pressed, even if that mouse button has already been released.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa6cf4e7a77158a3b8fd00328b1720a4a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double glfwGetTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns 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>
<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>
<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>
<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>
<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>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga3289ee876572f6e91f06df3a24824443"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t glfwGetTimerFrequency </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the frequency, in Hz, of the raw timer.</p>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a> </dd>
<dd>
<a class="el" href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa" title="Returns the current value of the raw timer. ">glfwGetTimerValue</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>

</div>
</div>
<a class="anchor" id="ga09b2bd37d328e0b9456c7ec575cc26aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t glfwGetTimerValue </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns 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>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a> </dd>
<dd>
<a class="el" href="group__input.html#ga3289ee876572f6e91f06df3a24824443" title="Returns the frequency, in Hz, of the raw timer. ">glfwGetTimerFrequency</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>

</div>
</div>
<a class="anchor" id="gaffcbd9ac8ee737fcdd25475123a3c790"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int glfwJoystickPresent </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>joy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns whether the specified joystick is present.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick">Joystick input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetJoystickParam</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga556239421c6a5a243c66fca28da9f742"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a> glfwSetCharCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f">GLFWcharfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the character callback of the specified window, which is called when a Unicode character is input.</p>
<p>The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas the <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>
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 2.4. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>

</div>
</div>
<a class="anchor" id="ga3f55ef5dc03a374e567f068b13c94afc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a> glfwSetCharModsCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#gae36fb6897d2b7df9b128900c8ce9c507">GLFWcharmodsfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys are used.</p>
<p>The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see the <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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_char">Text input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="gaba1f022c5eb07dfac421df34cdcd31dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwSetClipboardString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>string</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the system clipboard to the specified, UTF-8 encoded string.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window that will own the clipboard contents. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">string</td><td>A UTF-8 encoded string.</td></tr>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
<dd>
<a class="el" href="group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94" title="Returns the contents of the clipboard as a string. ">glfwGetClipboardString</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>

</div>
</div>
<a class="anchor" id="gad3b4f38c8d5dae036bc8fa959e18343e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwSetCursor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> *&#160;</td>
          <td class="paramname"><em>cursor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<p>On some platforms, the set cursor may not be visible unless the window also has input focus.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to set the cursor for. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_object">Cursor objects</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa299c41dd0a3d171d166354e01279e04"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a> glfwSetCursorEnterCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840">GLFWcursorenterfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga04b03af936d906ca123c8f4ee08b39e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwSetCursorPos </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>xpos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>ypos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the position, in screen coordinates, of the cursor relative to the upper-left corner of the client area of the specified window. The window must have input focus. If the window does not have input focus when this function is called, it fails silently.</p>
<p><b>Do not use this function</b> to implement things like camera controls. GLFW already provides the <code>GLFW_CURSOR_DISABLED</code> cursor mode that hides the cursor, transparently re-centers it and provides unconstrained cursor motion. See <a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> for more information.</p>
<p>If the cursor mode is <code>GLFW_CURSOR_DISABLED</code> then the cursor position is unconstrained and limited only by the minimum and maximum values of a <code>double</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The desired window. </td></tr>
    <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>
    <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>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a> </dd>
<dd>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePos</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7dad39486f2c7591af7fb25134a2501d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a> glfwSetCursorPosCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#ga4cfad918fa836f09541e7b9acd36686c">GLFWcursorposfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#cursor_pos">Cursor position</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePosCallback</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga41291bf15dd3ff564b3143aa6dc74a4b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a> glfwSetDropCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#gab71f4ca80b651462852e601caf308c4a">GLFWdropfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the file drop callback of the specified window, which is called when one or more dragged files are dropped on the window.</p>
<p>Because the path array and its strings may have been generated specifically for that event, they are not guaranteed to be valid after the callback has returned. If you wish to use them after the callback returns, you need to make a deep copy.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#path_drop">Path drop input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa92336e173da9c8834558b54ee80563b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwSetInputMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets an input mode option for the specified window. The mode must be one of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code> or <code>GLFW_STICKY_MOUSE_BUTTONS</code>.</p>
<p>If the mode is <code>GLFW_CURSOR</code>, the value must be one of the following cursor modes:</p><ul>
<li><code>GLFW_CURSOR_NORMAL</code> makes the cursor visible and behaving normally.</li>
<li><code>GLFW_CURSOR_HIDDEN</code> makes the cursor invisible when it is over the client area of the window but does not restrict the cursor from leaving.</li>
<li><code>GLFW_CURSOR_DISABLED</code> hides and grabs the cursor, providing virtual and unlimited cursor movement. This is useful for implementing for example 3D camera controls.</li>
</ul>
<p>If the mode is <code>GLFW_STICKY_KEYS</code>, the value must be either <code>GLFW_TRUE</code> to enable sticky keys, or <code>GLFW_FALSE</code> to disable it. If sticky keys are enabled, a key press will ensure that <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>
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose input mode to set. </td></tr>
    <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>
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The new value of the specified input mode.</td></tr>
  </table>
  </dd>
</dl>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwEnable</code> and <code>glfwDisable</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="gab1dc8379f1b82bb660a6b9c9fa06ca07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a> glfwSetJoystickCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__input.html#gaa67aa597e974298c748bfe4fb17d406d">GLFWjoystickfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#joystick_event">Joystick configuration changes</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7e496507126f35ea72f01b2e6ef6d155"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a> glfwSetKeyCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#ga0192a232a41e4e82948217c8ba94fdfd">GLFWkeyfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the key callback of the specified window, which is called when a key is pressed, repeated or released.</p>
<p>The key functions deal with physical keys, with layout independent <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>
<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>
<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>
<p>Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#input_key">Key input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>

</div>
</div>
<a class="anchor" id="gaef49b72d84d615bca0a6ed65485e035d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a> glfwSetMouseButtonCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#ga39893a4a7e7c3239c98d29c9e084350c">GLFWmousebuttonfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released.</p>
<p>When a window loses input focus, it will generate synthetic mouse button release events for all pressed mouse buttons. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the <a class="el" href="group__window.html#ga25d1c584edb375d7711c5c3548ba711f">window focus callback</a> has been called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<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>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
<dl class="section user"><dt></dt><dd><b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>

</div>
</div>
<a class="anchor" id="gacf02eb10504352f16efda4593c3ce60e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a> glfwSetScrollCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9">GLFWscrollfun</a>&#160;</td>
          <td class="paramname"><em>cbfun</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the scroll callback of the specified window, which is called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.</p>
<p>The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose callback to set. </td></tr>
    <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>
  </table>
  </dd>
</dl>
<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>
<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>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#scrolling">Scroll input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMouseWheelCallback</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf59589ef6e8b8c8b5ad184b25afd4dc0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void glfwSetTime </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>The new value, in seconds.</td></tr>
  </table>
  </dd>
</dl>
<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>
<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>
<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>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#time">Time input</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 2.2. </dd></dl>

</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Thu Aug 18 2016 for GLFW 3.2.1
</p>
</address>
</body>
</html>
