<p>This is the reference documentation for window related functions and types, including creation, deletion and event polling. For more task-oriented information, see the <aclass="el"href="window_guide.html">Window guide</a>. </p>
<trclass="memdesc:ga54ddb14825a1541a56e22afb5f832a9e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Input focus window hint and attribute. <ahref="group__window.html#ga54ddb14825a1541a56e22afb5f832a9e">More...</a><br/></td></tr>
<trclass="memdesc:gadba13c7a1b3aa40831eb2beedbd5bd1d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window resize-ability window hint and attribute. <ahref="group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d">More...</a><br/></td></tr>
<trclass="memdesc:gafb3cdc45297e06d8f1eb13adc69ca6c4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window visibility window hint and attribute. <ahref="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">More...</a><br/></td></tr>
<trclass="memdesc:ga21b854d36314c94d65aed84405b2f25e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window decoration window hint and attribute. <ahref="group__window.html#ga21b854d36314c94d65aed84405b2f25e">More...</a><br/></td></tr>
<trclass="memdesc:ga9d9874fc928200136a6dcdad726aa252"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window auto-iconification window hint and attribute. <ahref="group__window.html#ga9d9874fc928200136a6dcdad726aa252">More...</a><br/></td></tr>
<trclass="memdesc:ga7fb0be51407783b41adbf5bec0b09d80"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window decoration window hint and attribute. <ahref="group__window.html#ga7fb0be51407783b41adbf5bec0b09d80">More...</a><br/></td></tr>
<trclass="memdesc:gad8ccb396253ad0b72c6d4c917eb38a03"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window maximization window hint and attribute. <ahref="group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03">More...</a><br/></td></tr>
<trclass="memdesc:ga60a0578c3b9449027d683a9c6abb9f14"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Window framebuffer transparency hint and attribute. <ahref="group__window.html#ga60a0578c3b9449027d683a9c6abb9f14">More...</a><br/></td></tr>
<trclass="memdesc:gafa94b1da34bfd6488c0d709761504dfc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Input focus on calling show window hint and attribute. <ahref="group__window.html#gafa94b1da34bfd6488c0d709761504dfc">More...</a><br/></td></tr>
<trclass="memdesc:gaf78ed8e417dbcc1e354906cc2708c982"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#gaf78ed8e417dbcc1e354906cc2708c982">More...</a><br/></td></tr>
<trclass="memdesc:gafba3b72638c914e5fb8a237dd4c50d4d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d">More...</a><br/></td></tr>
<trclass="memdesc:gab292ea403db6d514537b515311bf9ae3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#gab292ea403db6d514537b515311bf9ae3">More...</a><br/></td></tr>
<trclass="memdesc:gafed79a3f468997877da86c449bd43e8c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#gafed79a3f468997877da86c449bd43e8c">More...</a><br/></td></tr>
<trclass="memdesc:ga318a55eac1fee57dfe593b6d38149d07"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#ga318a55eac1fee57dfe593b6d38149d07">More...</a><br/></td></tr>
<trclass="memdesc:ga5339890a45a1fb38e93cb9fcc5fd069d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d">More...</a><br/></td></tr>
<trclass="memdesc:gaead34a9a683b2bc20eecf30ba738bfc6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6">More...</a><br/></td></tr>
<trclass="memdesc:ga65713cee1326f8e9d806fdf93187b471"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#ga65713cee1326f8e9d806fdf93187b471">More...</a><br/></td></tr>
<trclass="memdesc:ga22bbe9104a8ce1f8b88fb4f186aa36ce"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce">More...</a><br/></td></tr>
<trclass="memdesc:gae829b55591c18169a40ab4067a041b1f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Framebuffer bit depth hint. <ahref="group__window.html#gae829b55591c18169a40ab4067a041b1f">More...</a><br/></td></tr>
<trclass="memdesc:ga649309cf72a3d3de5b1348ca7936c95b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context client API hint and attribute. <ahref="group__window.html#ga649309cf72a3d3de5b1348ca7936c95b">More...</a><br/></td></tr>
<trclass="memdesc:gafe5e4922de1f9932d7e9849bb053b0c0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context client API major version hint and attribute. <ahref="group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0">More...</a><br/></td></tr>
<trclass="memdesc:ga31aca791e4b538c4e4a771eb95cc2d07"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context client API minor version hint and attribute. <ahref="group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07">More...</a><br/></td></tr>
<trclass="memdesc:gafb9475071aa77c6fb05ca5a5c8678a08"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context client API revision number attribute. <ahref="group__window.html#gafb9475071aa77c6fb05ca5a5c8678a08">More...</a><br/></td></tr>
<trclass="memdesc:gade3593916b4c507900aa2d6844810e00"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context robustness hint and attribute. <ahref="group__window.html#gade3593916b4c507900aa2d6844810e00">More...</a><br/></td></tr>
<trclass="memdesc:ga13d24b12465da8b28985f46c8557925b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">OpenGL forward-compatibility hint and attribute. <ahref="group__window.html#ga13d24b12465da8b28985f46c8557925b">More...</a><br/></td></tr>
<trclass="memdesc:ga87ec2df0b915201e950ca42d5d0831e1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Debug mode context hint and attribute. <ahref="group__window.html#ga87ec2df0b915201e950ca42d5d0831e1">More...</a><br/></td></tr>
<trclass="memdesc:ga44f3a6b4261fbe351e0b950b0f372e12"><tdclass="mdescLeft"> </td><tdclass="mdescRight">OpenGL profile hint and attribute. <ahref="group__window.html#ga44f3a6b4261fbe351e0b950b0f372e12">More...</a><br/></td></tr>
<trclass="memdesc:ga72b648a8378fe3310c7c7bbecc0f7be6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context flush-on-release hint and attribute. <ahref="group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6">More...</a><br/></td></tr>
<trclass="memdesc:ga5a52fdfd46d8249c211f923675728082"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context error suppression hint and attribute. <ahref="group__window.html#ga5a52fdfd46d8249c211f923675728082">More...</a><br/></td></tr>
<trclass="memdesc:ga5154cebfcd831c1cc63a4d5ac9bb4486"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Context creation API hint and attribute. <ahref="group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486">More...</a><br/></td></tr>
<trclass="memdesc:gab6ef2d02eb55800d249ccf1af253c35e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">macOS specific <aclass="el"href="window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint">window hint</a>. <ahref="group__window.html#gab6ef2d02eb55800d249ccf1af253c35e">More...</a><br/></td></tr>
<trclass="memdesc:ga70fa0fbc745de6aa824df79a580e84b5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">macOS specific <aclass="el"href="window_guide.html#GLFW_COCOA_FRAME_NAME_hint">window hint</a>. <ahref="group__window.html#ga70fa0fbc745de6aa824df79a580e84b5">More...</a><br/></td></tr>
<trclass="memdesc:ga53c84ed2ddd94e15bbd44b1f6f7feafc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">macOS specific <aclass="el"href="window_guide.html#GLFW_COCOA_GRAPHICS_SWITCHING_hint">window hint</a>. <ahref="group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc">More...</a><br/></td></tr>
<trclass="memdesc:gae5a9ea2fccccd92edbd343fc56461114"><tdclass="mdescLeft"> </td><tdclass="mdescRight">X11 specific <aclass="el"href="window_guide.html#GLFW_X11_CLASS_NAME_hint">window hint</a>. <ahref="group__window.html#gae5a9ea2fccccd92edbd343fc56461114">More...</a><br/></td></tr>
<trclass="memdesc:ga494c3c0d911e4b860b946530a3e389e8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">X11 specific <aclass="el"href="window_guide.html#GLFW_X11_CLASS_NAME_hint">window hint</a>. <ahref="group__window.html#ga494c3c0d911e4b860b946530a3e389e8">More...</a><br/></td></tr>
<trclass="memitem:gabe287973a21a8f927cde4db06b8dcbe9"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gabe287973a21a8f927cde4db06b8dcbe9">GLFWwindowposfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int xpos, int ypos)</td></tr>
<trclass="memdesc:gabe287973a21a8f927cde4db06b8dcbe9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window position callbacks. <ahref="group__window.html#gabe287973a21a8f927cde4db06b8dcbe9">More...</a><br/></td></tr>
<trclass="memitem:gaec0282944bb810f6f3163ec02da90350"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gaec0282944bb810f6f3163ec02da90350">GLFWwindowsizefun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int width, int height)</td></tr>
<trclass="memdesc:gaec0282944bb810f6f3163ec02da90350"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window size callbacks. <ahref="group__window.html#gaec0282944bb810f6f3163ec02da90350">More...</a><br/></td></tr>
<trclass="memdesc:gabf859b936d80961b7d39013a9694cc3e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window close callbacks. <ahref="group__window.html#gabf859b936d80961b7d39013a9694cc3e">More...</a><br/></td></tr>
<trclass="memdesc:ga431663a1427d2eb3a273bc398b6737b5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window content refresh callbacks. <ahref="group__window.html#ga431663a1427d2eb3a273bc398b6737b5">More...</a><br/></td></tr>
<trclass="memitem:gabc58c47e9d93f6eb1862d615c3680f46"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gabc58c47e9d93f6eb1862d615c3680f46">GLFWwindowfocusfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int focused)</td></tr>
<trclass="memdesc:gabc58c47e9d93f6eb1862d615c3680f46"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window focus callbacks. <ahref="group__window.html#gabc58c47e9d93f6eb1862d615c3680f46">More...</a><br/></td></tr>
<trclass="memitem:ga35c658cccba236f26e7adee0e25f6a4f"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga35c658cccba236f26e7adee0e25f6a4f">GLFWwindowiconifyfun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int iconified)</td></tr>
<trclass="memdesc:ga35c658cccba236f26e7adee0e25f6a4f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window iconify callbacks. <ahref="group__window.html#ga35c658cccba236f26e7adee0e25f6a4f">More...</a><br/></td></tr>
<trclass="memitem:ga3017196fdaec33ac3e095765176c2a90"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga3017196fdaec33ac3e095765176c2a90">GLFWwindowmaximizefun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int maximized)</td></tr>
<trclass="memdesc:ga3017196fdaec33ac3e095765176c2a90"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window maximize callbacks. <ahref="group__window.html#ga3017196fdaec33ac3e095765176c2a90">More...</a><br/></td></tr>
<trclass="memitem:gae18026e294dde685ed2e5f759533144d"><tdclass="memItemLeft"align="right"valign="top">typedef void(* </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gae18026e294dde685ed2e5f759533144d">GLFWframebuffersizefun</a>) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int width, int height)</td></tr>
<trclass="memdesc:gae18026e294dde685ed2e5f759533144d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for framebuffer size callbacks. <ahref="group__window.html#gae18026e294dde685ed2e5f759533144d">More...</a><br/></td></tr>
<trclass="memdesc:ga77f288a2d04bb3c77c7d9615d08cf70e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The function pointer type for window content scale callbacks. <ahref="group__window.html#ga77f288a2d04bb3c77c7d9615d08cf70e">More...</a><br/></td></tr>
<trclass="memdesc:gaa77c4898dfb83344a6b4f76aa16b9a4a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Resets all window hints to their default values. <ahref="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a">More...</a><br/></td></tr>
<trclass="memitem:ga7d9c8c62384b1e2821c4dc48952d2033"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a> (int hint, int value)</td></tr>
<trclass="memdesc:ga7d9c8c62384b1e2821c4dc48952d2033"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the specified window hint to the desired value. <ahref="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">More...</a><br/></td></tr>
<trclass="memdesc:ga8cb2782861c9d997bcf2dea97f363e5f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the specified window hint to the desired value. <ahref="group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f">More...</a><br/></td></tr>
<trclass="memdesc:ga3555a418df92ad53f917597fe2f64aeb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a window and its associated context. <ahref="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">More...</a><br/></td></tr>
<trclass="memdesc:gacdf43e51376051d2c091662e9fe3d7b2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Destroys the specified window and its context. <ahref="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">More...</a><br/></td></tr>
<trclass="memdesc:ga24e02fbfefbb81fc45320989f8140ab5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Checks the close flag of the specified window. <ahref="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">More...</a><br/></td></tr>
<trclass="memitem:ga49c449dde2a6f87d996f4daaa09d6708"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int value)</td></tr>
<trclass="memdesc:ga49c449dde2a6f87d996f4daaa09d6708"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the close flag of the specified window. <ahref="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">More...</a><br/></td></tr>
<trclass="memdesc:ga5d877f09e968cef7a360b513306f17ff"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the title of the specified window. <ahref="group__window.html#ga5d877f09e968cef7a360b513306f17ff">More...</a><br/></td></tr>
<trclass="memitem:gadd7ccd39fe7a7d1f0904666ae5932dc5"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int count, const <aclass="el"href="structGLFWimage.html">GLFWimage</a> *images)</td></tr>
<trclass="memdesc:gadd7ccd39fe7a7d1f0904666ae5932dc5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the icon for the specified window. <ahref="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">More...</a><br/></td></tr>
<trclass="memitem:ga73cb526c000876fd8ddf571570fdb634"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga73cb526c000876fd8ddf571570fdb634">glfwGetWindowPos</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *xpos, int *ypos)</td></tr>
<trclass="memdesc:ga73cb526c000876fd8ddf571570fdb634"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the position of the content area of the specified window. <ahref="group__window.html#ga73cb526c000876fd8ddf571570fdb634">More...</a><br/></td></tr>
<trclass="memitem:ga1abb6d690e8c88e0c8cd1751356dbca8"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8">glfwSetWindowPos</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int xpos, int ypos)</td></tr>
<trclass="memdesc:ga1abb6d690e8c88e0c8cd1751356dbca8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the position of the content area of the specified window. <ahref="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8">More...</a><br/></td></tr>
<trclass="memitem:gaeea7cbc03373a41fb51cfbf9f2a5d4c6"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height)</td></tr>
<trclass="memdesc:gaeea7cbc03373a41fb51cfbf9f2a5d4c6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the size of the content area of the specified window. <ahref="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">More...</a><br/></td></tr>
<trclass="memitem:gac314fa6cec7d2d307be9963e2709cc90"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">glfwSetWindowSizeLimits</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int minwidth, int minheight, int maxwidth, int maxheight)</td></tr>
<trclass="memdesc:gac314fa6cec7d2d307be9963e2709cc90"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the size limits of the specified window. <ahref="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">More...</a><br/></td></tr>
<trclass="memitem:ga72ac8cb1ee2e312a878b55153d81b937"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">glfwSetWindowAspectRatio</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int numer, int denom)</td></tr>
<trclass="memdesc:ga72ac8cb1ee2e312a878b55153d81b937"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the aspect ratio of the specified window. <ahref="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">More...</a><br/></td></tr>
<trclass="memitem:ga371911f12c74c504dd8d47d832d095cb"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int width, int height)</td></tr>
<trclass="memdesc:ga371911f12c74c504dd8d47d832d095cb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the size of the content area of the specified window. <ahref="group__window.html#ga371911f12c74c504dd8d47d832d095cb">More...</a><br/></td></tr>
<trclass="memitem:ga0e2637a4161afb283f5300c7f94785c9"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height)</td></tr>
<trclass="memdesc:ga0e2637a4161afb283f5300c7f94785c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the size of the framebuffer of the specified window. <ahref="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">More...</a><br/></td></tr>
<trclass="memitem:ga1a9fd382058c53101b21cf211898f1f1"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga1a9fd382058c53101b21cf211898f1f1">glfwGetWindowFrameSize</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *left, int *top, int *right, int *bottom)</td></tr>
<trclass="memdesc:ga1a9fd382058c53101b21cf211898f1f1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the size of the frame of the window. <ahref="group__window.html#ga1a9fd382058c53101b21cf211898f1f1">More...</a><br/></td></tr>
<trclass="memdesc:gaf5d31de9c19c4f994facea64d2b3106c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the content scale for the specified window. <ahref="group__window.html#gaf5d31de9c19c4f994facea64d2b3106c">More...</a><br/></td></tr>
<trclass="memdesc:gad09f0bd7a6307c4533b7061828480a84"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the opacity of the whole window. <ahref="group__window.html#gad09f0bd7a6307c4533b7061828480a84">More...</a><br/></td></tr>
<trclass="memdesc:gac31caeb3d1088831b13d2c8a156802e9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the opacity of the whole window. <ahref="group__window.html#gac31caeb3d1088831b13d2c8a156802e9">More...</a><br/></td></tr>
<trclass="memdesc:ga1bb559c0ebaad63c5c05ad2a066779c4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Iconifies the specified window. <ahref="group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4">More...</a><br/></td></tr>
<trclass="memdesc:ga52527a5904b47d802b6b4bb519cdebc7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Restores the specified window. <ahref="group__window.html#ga52527a5904b47d802b6b4bb519cdebc7">More...</a><br/></td></tr>
<trclass="memdesc:ga3f541387449d911274324ae7f17ec56b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Maximizes the specified window. <ahref="group__window.html#ga3f541387449d911274324ae7f17ec56b">More...</a><br/></td></tr>
<trclass="memdesc:ga49401f82a1ba5f15db5590728314d47c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Hides the specified window. <ahref="group__window.html#ga49401f82a1ba5f15db5590728314d47c">More...</a><br/></td></tr>
<trclass="memdesc:ga873780357abd3f3a081d71a40aae45a1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Brings the specified window to front and sets input focus. <ahref="group__window.html#ga873780357abd3f3a081d71a40aae45a1">More...</a><br/></td></tr>
<trclass="memdesc:ga2f8d59323fc4692c1d54ba08c863a703"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Requests user attention to the specified window. <ahref="group__window.html#ga2f8d59323fc4692c1d54ba08c863a703">More...</a><br/></td></tr>
<trclass="memdesc:ga4d766499ac02c60f02221a9dfab87299"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the monitor that the window uses for full screen mode. <ahref="group__window.html#ga4d766499ac02c60f02221a9dfab87299">More...</a><br/></td></tr>
<trclass="memitem:ga81c76c418af80a1cce7055bccb0ae0a7"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, <aclass="el"href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int xpos, int ypos, int width, int height, int refreshRate)</td></tr>
<trclass="memdesc:ga81c76c418af80a1cce7055bccb0ae0a7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the mode, monitor, video mode and placement of a window. <ahref="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">More...</a><br/></td></tr>
<trclass="memitem:gacccb29947ea4b16860ebef42c2cb9337"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int attrib)</td></tr>
<trclass="memdesc:gacccb29947ea4b16860ebef42c2cb9337"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns an attribute of the specified window. <ahref="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">More...</a><br/></td></tr>
<trclass="memitem:gace2afda29b4116ec012e410a6819033e"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a> (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int attrib, int value)</td></tr>
<trclass="memdesc:gace2afda29b4116ec012e410a6819033e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets an attribute of the specified window. <ahref="group__window.html#gace2afda29b4116ec012e410a6819033e">More...</a><br/></td></tr>
<trclass="memdesc:ga3d2fc6026e690ab31a13f78bc9fd3651"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the user pointer of the specified window. <ahref="group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651">More...</a><br/></td></tr>
<trclass="memdesc:gae77a4add0d2023ca21ff1443ced01653"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the user pointer of the specified window. <ahref="group__window.html#gae77a4add0d2023ca21ff1443ced01653">More...</a><br/></td></tr>
<trclass="memdesc:ga08bdfbba88934f9c4f92fd757979ac74"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the position callback for the specified window. <ahref="group__window.html#ga08bdfbba88934f9c4f92fd757979ac74">More...</a><br/></td></tr>
<trclass="memdesc:gad91b8b047a0c4c6033c38853864c34f8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the size callback for the specified window. <ahref="group__window.html#gad91b8b047a0c4c6033c38853864c34f8">More...</a><br/></td></tr>
<trclass="memdesc:gada646d775a7776a95ac000cfc1885331"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the close callback for the specified window. <ahref="group__window.html#gada646d775a7776a95ac000cfc1885331">More...</a><br/></td></tr>
<trclass="memdesc:ga1c5c7eb889c33c7f4d10dd35b327654e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the refresh callback for the specified window. <ahref="group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e">More...</a><br/></td></tr>
<trclass="memdesc:gac2d83c4a10f071baf841f6730528e66c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the focus callback for the specified window. <ahref="group__window.html#gac2d83c4a10f071baf841f6730528e66c">More...</a><br/></td></tr>
<trclass="memdesc:gac793e9efd255567b5fb8b445052cfd3e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the iconify callback for the specified window. <ahref="group__window.html#gac793e9efd255567b5fb8b445052cfd3e">More...</a><br/></td></tr>
<trclass="memdesc:gacbe64c339fbd94885e62145563b6dc93"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the maximize callback for the specified window. <ahref="group__window.html#gacbe64c339fbd94885e62145563b6dc93">More...</a><br/></td></tr>
<trclass="memdesc:gab3fb7c3366577daef18c0023e2a8591f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the framebuffer resize callback for the specified window. <ahref="group__window.html#gab3fb7c3366577daef18c0023e2a8591f">More...</a><br/></td></tr>
<trclass="memdesc:gaf2832ebb5aa6c252a2d261de002c92d6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the window content scale callback for the specified window. <ahref="group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6">More...</a><br/></td></tr>
<trclass="memdesc:ga37bd57223967b4211d60ca1a0bf3c832"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Processes all pending events. <ahref="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">More...</a><br/></td></tr>
<trclass="memdesc:ga554e37d781f0a997656c26b2c56c835e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Waits until events are queued and processes them. <ahref="group__window.html#ga554e37d781f0a997656c26b2c56c835e">More...</a><br/></td></tr>
<trclass="memdesc:ga605a178db92f1a7f1a925563ef3ea2cf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Waits with timeout until events are queued and processes them. <ahref="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">More...</a><br/></td></tr>
<trclass="memdesc:gab5997a25187e9fd5c6f2ecbbc8dfd7e9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Posts an empty event to the event queue. <ahref="group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9">More...</a><br/></td></tr>
<trclass="memdesc:ga15a5a1ee5b3c2ca6b15ca209a12efd14"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Swaps the front and back buffers of the specified window. <ahref="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">More...</a><br/></td></tr>
<p>Context client API <aclass="el"href="window_guide.html#GLFW_CLIENT_API_hint">hint</a> and <aclass="el"href="window_guide.html#GLFW_CLIENT_API_attrib">attribute</a>. </p>
<p>Context client API major version <aclass="el"href="window_guide.html#GLFW_CONTEXT_VERSION_MAJOR_hint">hint</a> and <aclass="el"href="window_guide.html#GLFW_CONTEXT_VERSION_MAJOR_attrib">attribute</a>. </p>
<p>Context client API minor version <aclass="el"href="window_guide.html#GLFW_CONTEXT_VERSION_MINOR_hint">hint</a> and <aclass="el"href="window_guide.html#GLFW_CONTEXT_VERSION_MINOR_attrib">attribute</a>. </p>
<p>Context client API revision number <aclass="el"href="window_guide.html#GLFW_CONTEXT_ROBUSTNESS_hint">hint</a> and <aclass="el"href="window_guide.html#GLFW_CONTEXT_ROBUSTNESS_attrib">attribute</a>. </p>
<p>Context creation API <aclass="el"href="window_guide.html#GLFW_CONTEXT_CREATION_API_hint">hint</a> and <aclass="el"href="window_guide.html#GLFW_CONTEXT_CREATION_API_attrib">attribute</a>. </p>
<tdclass="memname">typedef void(* GLFWwindowposfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int xpos, int ypos)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for window position callbacks. A window position callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> callback_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> xpos, <spanclass="keywordtype">int</span> ypos)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that was moved. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The new x-coordinate, in screen coordinates, of the upper-left corner of the content area of the window. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The new y-coordinate, in screen coordinates, of the upper-left corner of the content area of the window.</td></tr>
<tdclass="memname">typedef void(* GLFWwindowsizefun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int width, int height)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for window size callbacks. A window size callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> callback_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> width, <spanclass="keywordtype">int</span> height)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that was resized. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The new width, in screen coordinates, of the window. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The new height, in screen coordinates, of the window.</td></tr>
<p>This is the function pointer type for window close callbacks. A window close callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that the user attempted to close.</td></tr>
</table>
</dd>
</dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd>
<p>This is the function pointer type for window content refresh callbacks. A window content refresh callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose content needs to be refreshed.</td></tr>
</table>
</dd>
</dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_refresh">Window damage and refresh</a></dd>
<tdclass="memname">typedef void(* GLFWwindowfocusfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int focused)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for window focus callbacks. A window focus callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> focused)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that gained or lost input focus. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">focused</td><td><code>GLFW_TRUE</code> if the window was given input focus, or <code>GLFW_FALSE</code> if it lost it.</td></tr>
<tdclass="memname">typedef void(* GLFWwindowiconifyfun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int iconified)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for window iconify callbacks. A window iconify callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> iconified)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that was iconified or restored. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">iconified</td><td><code>GLFW_TRUE</code> if the window was iconified, or <code>GLFW_FALSE</code> if it was restored.</td></tr>
<tdclass="memname">typedef void(* GLFWwindowmaximizefun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int maximized)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for window maximize callbacks. A window maximize callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> maximized)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window that was maximized or restored. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">maximized</td><td><code>GLFW_TRUE</code> if the window was maximized, or <code>GLFW_FALSE</code> if it was restored.</td></tr>
<aclass="el"href="group__window.html#gacbe64c339fbd94885e62145563b6dc93"title="Sets the maximize callback for the specified window.">glfwSetWindowMaximizeCallback</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
<tdclass="memname">typedef void(* GLFWframebuffersizefun) (<aclass="el"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int width, int height)</td>
</tr>
</table>
</div><divclass="memdoc">
<p>This is the function pointer type for framebuffer size callbacks. A framebuffer size callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">int</span> width, <spanclass="keywordtype">int</span> height)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose framebuffer was resized. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The new width, in pixels, of the framebuffer. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The new height, in pixels, of the framebuffer.</td></tr>
<p>This is the function pointer type for window content scale callbacks. A window content scale callback function has the following signature: </p><divclass="fragment"><divclass="line"><spanclass="keywordtype">void</span> function_name(<aclass="code hl_typedef"href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <spanclass="keywordtype">float</span> xscale, <spanclass="keywordtype">float</span> yscale)</div>
</div><!-- fragment --><dlclass="params"><dt>Parameters</dt><dd>
<p>This function resets all window hints to their <aclass="el"href="window_guide.html#window_hints_values">default values</a>.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets hints for the next call to <aclass="el"href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>. The hints, once set, retain their values until changed by a call to this function or <aclass="el"href="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a">glfwDefaultWindowHints</a>, or until the library is terminated.</p>
<p>Only integer value hints can be set with this function. String value hints are set with <aclass="el"href="group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f">glfwWindowHintString</a>.</p>
<p>This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next call to <aclass="el"href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>.</p>
<p>Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">hint</td><td>The <aclass="el"href="window_guide.html#window_hints">window hint</a> to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The new value of the window hint.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets hints for the next call to <aclass="el"href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>. The hints, once set, retain their values until changed by a call to this function or <aclass="el"href="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a">glfwDefaultWindowHints</a>, or until the library is terminated.</p>
<p>Only string type hints can be set with this function. Integer value hints are set with <aclass="el"href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>.</p>
<p>This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next call to <aclass="el"href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>.</p>
<p>Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">hint</td><td>The <aclass="el"href="window_guide.html#window_hints">window hint</a> to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The new value of the window hint.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function creates a window and its associated OpenGL or OpenGL ES context. Most of the options controlling how the window and its context should be created are specified with <aclass="el"href="window_guide.html#window_hints">window hints</a>.</p>
<p>Successful creation does not change which context is current. Before you can use the newly created context, you need to <aclass="el"href="context_guide.html#context_current">make it current</a>. For information about the <code>share</code> parameter, see <aclass="el"href="context_guide.html#context_sharing">Context object sharing</a>.</p>
<p>The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are <aclass="el"href="window_guide.html#window_hints_hard">hard constraints</a>. This includes the size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, see <aclass="el"href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>, <aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a> and <aclass="el"href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a>.</p>
<p>To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to query connected monitors, see <aclass="el"href="monitor_guide.html#monitor_monitors">Retrieving monitors</a>.</p>
<p>For full screen windows, the specified size becomes the resolution of the window's <em>desired video mode</em>. As long as a full screen window is not iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full screen windows, including the creation of so called <em>windowed full screen</em> or <em>borderless full screen</em> windows, see <aclass="el"href="window_guide.html#window_windowed_full_screen">"Windowed full screen" windows</a>.</p>
<p>Once you have created the window, you can switch it between windowed and full screen mode with <aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>. This will not affect its OpenGL or OpenGL ES context.</p>
<p>By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, make it initially invisible using the <aclass="el"href="window_guide.html#GLFW_VISIBLE_hint">GLFW_VISIBLE</a> window hint, set its <aclass="el"href="window_guide.html#window_pos">position</a> and then <aclass="el"href="window_guide.html#window_hide">show</a> it.</p>
<p>As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.</p>
<p>Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the actual <aclass="el"href="window_guide.html#window_size">size</a> after creation.</p>
<p>The <aclass="el"href="window_guide.html#buffer_swap">swap interval</a> is not set during window creation and the initial value may vary depending on driver settings and defaults.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The desired width, in screen coordinates, of the window. This must be greater than zero. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The desired height, in screen coordinates, of the window. This must be greater than zero. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The monitor to use for full screen mode, or <code>NULL</code> for windowed mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">share</td><td>The window whose context to share resources with, or <code>NULL</code> to not share resources. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The handle of the created window, or <code>NULL</code> if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>, <aclass="el"href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>, <aclass="el"href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a>, <aclass="el"href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Windows:</b> Window creation will fail if the Microsoft GDI software OpenGL implementation is the only one available.</dd>
<dd>
<b>Windows:</b> If the executable has an icon resource named <code>GLFW_ICON,</code> it will be set as the initial icon for the window. If no such icon is present, the <code>IDI_APPLICATION</code> icon will be used instead. To set a different icon, see <aclass="el"href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a>.</dd>
<dd>
<b>Windows:</b> The context to share resources with must not be current on any other thread.</dd>
<dd>
<b>macOS:</b> The OS only supports forward-compatible core profile contexts for OpenGL versions 3.2 and later. Before creating an OpenGL context of version 3.2 or later you must set the <aclass="el"href="window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint">GLFW_OPENGL_FORWARD_COMPAT</a> and <aclass="el"href="window_guide.html#GLFW_OPENGL_PROFILE_hint">GLFW_OPENGL_PROFILE</a> hints accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.</dd>
<dd>
<b>macOS:</b> The GLFW window has no icon, as it is not a document window, but the dock icon will be the same as the application bundle's icon. For more information on bundles, see the <ahref="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/">Bundle Programming Guide</a> in the Mac Developer Library.</dd>
<dd>
<b>macOS:</b> The first time a window is created the menu bar is created. If GLFW finds a <code>MainMenu.nib</code> it is loaded and assumed to contain a menu bar. Otherwise a minimal menu bar is created manually with common commands like Hide, Quit and About. The About entry opens a minimal about dialog with information from the application's bundle. Menu bar creation can be disabled entirely with the <aclass="el"href="group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf">GLFW_COCOA_MENUBAR</a> init hint.</dd>
<dd>
<b>macOS:</b> On OS X 10.10 and later the window frame will not be rendered at full resolution on Retina displays unless the <aclass="el"href="window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint">GLFW_COCOA_RETINA_FRAMEBUFFER</a> hint is <code>GLFW_TRUE</code> and the <code>NSHighResolutionCapable</code> key is enabled in the application bundle's <code>Info.plist</code>. For more information, see <ahref="https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html">High Resolution Guidelines for OS X</a> in the Mac Developer Library. The GLFW test and example programs use a custom <code>Info.plist</code> template for this, which can be found as <code>CMake/MacOSXBundleInfo.plist.in</code> in the source tree.</dd>
<dd>
<b>macOS:</b> When activating frame autosaving with <aclass="el"href="window_guide.html#GLFW_COCOA_FRAME_NAME_hint">GLFW_COCOA_FRAME_NAME</a>, the specified window size and position may be overridden by previously saved values.</dd>
<dd>
<b>X11:</b> Some window managers will not respect the placement of initially hidden windows.</dd>
<dd>
<b>X11:</b> Due to the asynchronous nature of X11, it may take a moment for a window to reach its requested state. This means you may not be able to query the final size, position or other attributes directly after window creation.</dd>
<dd>
<b>X11:</b> The class part of the <code>WM_CLASS</code> window property will by default be set to the window title passed to this function. The instance part will use the contents of the <code>RESOURCE_NAME</code> environment variable, if present and not empty, or fall back to the window title. Set the <aclass="el"href="window_guide.html#GLFW_X11_CLASS_NAME_hint">GLFW_X11_CLASS_NAME</a> and <aclass="el"href="window_guide.html#GLFW_X11_INSTANCE_NAME_hint">GLFW_X11_INSTANCE_NAME</a> window hints to override this.</dd>
<dd>
<b>Wayland:</b> Compositors should implement the xdg-decoration protocol for GLFW to decorate the window properly. If this protocol isn't supported, or if the compositor prefers client-side decorations, a very simple fallback frame will be drawn using the wp_viewporter protocol. A compositor can still emit close, maximize or fullscreen events, using for instance a keybind mechanism. If neither of these protocols is supported, the window won't be decorated.</dd>
<dd>
<b>Wayland:</b> A full screen window will not attempt to change the mode, no matter what the requested size or refresh rate.</dd>
<dd>
<b>Wayland:</b> Screensaver inhibition requires the idle-inhibit protocol to be implemented in the user's compositor.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function destroys the specified window and its context. On calling this function, no further callbacks will be called for that window.</p>
<p>If the context of the specified window is current on the main thread, it is detached before being destroyed.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to destroy.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>The context of the specified window must not be current on any other thread when this function is called.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the value of the close flag of the specified window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The value of the close flag.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<p>This function sets the value of the close flag of the specified window. This can be used to override the user's attempt to close the window, or to signal that it should be closed.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose flag to change. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The new value.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>macOS:</b> The window title will not be updated until the next time you process events.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the icon of the specified window. If passed an array of candidate images, those of or closest to the sizes desired by the system are selected. If no images are specified, the window reverts to its default icon.</p>
<p>The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner.</p>
<p>The desired image sizes varies depending on platform and system settings. The selected images will be rescaled as needed. Good sizes include 16x16, 32x32 and 48x48.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose icon to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">count</td><td>The number of images in the specified array, or zero to revert to the default window icon. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">images</td><td>The images to create the icon from. This is ignored if count is zero.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>macOS:</b> The GLFW window has no icon, as it is not a document window, so this function does nothing. The dock icon will be the same as the application bundle's icon. For more information on bundles, see the <ahref="https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/">Bundle Programming Guide</a> in the Mac Developer Library.</dd>
<dd>
<b>Wayland:</b> There is no existing protocol to change an icon, the window will thus inherit the one defined in the application's desktop file. This function always emits <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function retrieves the position, in screen coordinates, of the upper-left corner of the content area of the specified window.</p>
<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">xpos</td><td>Where to store the x-coordinate of the upper-left corner of the content area, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">ypos</td><td>Where to store the y-coordinate of the upper-left corner of the content area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> There is no way for an application to retrieve the global position of its windows, this function will always emit <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window. If the window is a full screen window, this function does nothing.</p>
<p><b>Do not use this function</b> to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.</p>
<p>The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The x-coordinate of the upper-left corner of the content area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The y-coordinate of the upper-left corner of the content area.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> There is no way for an application to set the global position of its windows, this function will always emit <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function retrieves the size, in screen coordinates, of the content area of the specified window. If you wish to retrieve the size of the framebuffer of the window in pixels, see <aclass="el"href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a>.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose size to retrieve. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">width</td><td>Where to store the width, in screen coordinates, of the content area, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">height</td><td>Where to store the height, in screen coordinates, of the content area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the size limits of the content area of the specified window. If the window is full screen, the size limits only take effect once it is made windowed. If the window is not resizable, this function does nothing.</p>
<p>The size limits are applied immediately to a windowed mode window and may cause it to be resized.</p>
<p>The maximum dimensions must be greater than or equal to the minimum dimensions and all must be greater than or equal to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set limits for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">minwidth</td><td>The minimum width, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">minheight</td><td>The minimum height, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">maxwidth</td><td>The maximum width, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">maxheight</td><td>The maximum height, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>If you set size limits and an aspect ratio that conflict, the results are undefined.</dd>
<dd>
<b>Wayland:</b> The size limits will not be applied until the window is actually resized, either by the user or by the compositor.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the required aspect ratio of the content area of the specified window. If the window is full screen, the aspect ratio only takes effect once it is made windowed. If the window is not resizable, this function does nothing.</p>
<p>The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For example, the common 16:9 aspect ratio is specified as 16 and 9, respectively.</p>
<p>If the numerator and denominator is set to <code>GLFW_DONT_CARE</code> then the aspect ratio limit is disabled.</p>
<p>The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set limits for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">numer</td><td>The numerator of the desired aspect ratio, or <code>GLFW_DONT_CARE</code>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">denom</td><td>The denominator of the desired aspect ratio, or <code>GLFW_DONT_CARE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>If you set size limits and an aspect ratio that conflict, the results are undefined.</dd>
<dd>
<b>Wayland:</b> The aspect ratio will not be applied until the window is actually resized, either by the user or by the compositor.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the size, in screen coordinates, of the content area of the specified window.</p>
<p>For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.</p>
<p>If you wish to update the refresh rate of the desired video mode in addition to its resolution, see <aclass="el"href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>.</p>
<p>The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to resize. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The desired width, in screen coordinates, of the window content area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The desired height, in screen coordinates, of the window content area.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> A full screen window will not attempt to change the mode, no matter what the requested size.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function retrieves the size, in pixels, of the framebuffer of the specified window. If you wish to retrieve the size of the window in screen coordinates, see <aclass="el"href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a>.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose framebuffer to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">width</td><td>Where to store the width, in pixels, of the framebuffer, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">height</td><td>Where to store the height, in pixels, of the framebuffer, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function retrieves the size, in screen coordinates, of each edge_t of the frame of the specified window. This size includes the title bar, if the window has one. The size of the frame may vary depending on the <aclass="el"href="window_guide.html#window_hints_wnd">window-related hints</a> used to create it.</p>
<p>Because this function retrieves the size of each window frame edge_t and not the offset along a particular coordinate axis, the retrieved values will always be zero or positive.</p>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">left</td><td>Where to store the size, in screen coordinates, of the left edge_t of the window frame, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">top</td><td>Where to store the size, in screen coordinates, of the top edge_t of the window frame, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">right</td><td>Where to store the size, in screen coordinates, of the right edge_t of the window frame, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">bottom</td><td>Where to store the size, in screen coordinates, of the bottom edge_t of the window frame, or <code>NULL</code>.</td></tr>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function retrieves the content scale for the specified window. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>
<p>On systems where each monitors can have its own content scale, the window content scale will depend on which monitor the system considers the window to be on.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">xscale</td><td>Where to store the x-axis content scale, or <code>NULL</code>. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">yscale</td><td>Where to store the y-axis content scale, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the opacity of the window, including any decorations.</p>
<p>The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque. If the system does not support whole window transparency, this function always returns one.</p>
<p>The initial opacity value for newly created windows is one.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The opacity value of the specified window.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the opacity of the window, including any decorations.</p>
<p>The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque.</p>
<p>The initial opacity value for newly created windows is one.</p>
<p>A window created with framebuffer transparency may not use whole window transparency. The results of doing this are undefined.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set the opacity for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">opacity</td><td>The desired opacity of the specified window.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function iconifies (minimizes) the specified window if it was previously restored. If the window is already iconified, this function does nothing.</p>
<p>If the specified window is a full screen window, GLFW restores the original video mode of the monitor. The window's desired video mode is set again when the window is restored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to iconify.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function restores the specified window if it was previously iconified (minimized) or maximized. If the window is already restored, this function does nothing.</p>
<p>If the specified window is an iconified full screen window, its desired video mode is set again for its monitor when the window is restored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to restore.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function maximizes the specified window if it was previously not maximized. If the window is already maximized, this function does nothing.</p>
<p>If the specified window is a full screen window, this function does nothing.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to maximize.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread Safety</dt><dd>This function may only be called from the main thread.</dd></dl>
<p>This function makes the specified window visible if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing.</p>
<p>By default, windowed mode windows are focused when shown Set the <aclass="el"href="window_guide.html#GLFW_FOCUS_ON_SHOW_hint">GLFW_FOCUS_ON_SHOW</a> window hint to change this behavior for all newly created windows, or change the behavior for an existing window with <aclass="el"href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to make visible.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> Because Wayland wants every frame of the desktop to be complete, this function does not immediately make the window visible. Instead it will become visible the next time the window framebuffer is updated after this call.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function hides the specified window if it was previously visible. If the window is already hidden or is in full screen mode, this function does nothing.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to hide.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function brings the specified window to front and sets input focus. The window should already be visible and not iconified.</p>
<p>By default, both windowed and full screen mode windows are focused when initially created. Set the <aclass="el"href="window_guide.html#GLFW_FOCUSED_hint">GLFW_FOCUSED</a> to disable this behavior.</p>
<p>Also by default, windowed mode windows are focused when shown with <aclass="el"href="group__window.html#ga61be47917b72536a148300f46494fc66">glfwShowWindow</a>. Set the <aclass="el"href="window_guide.html#GLFW_FOCUS_ON_SHOW_hint">GLFW_FOCUS_ON_SHOW</a> to disable this behavior.</p>
<p><b>Do not use this function</b> to steal focus from other applications unless you are certain that is what the user wants. Focus stealing can be extremely disruptive.</p>
<p>For a less disruptive way of getting the user's attention, see <aclass="el"href="window_guide.html#window_attention">attention requests</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to give input focus.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> It is not possible for an application to bring its windows to front, this function will always emit <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function requests user attention to the specified window. On platforms where this is not supported, attention is requested to the application as a whole.</p>
<p>Once the user has given attention, usually by focusing the window or application, the system will end the request automatically.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to request attention to.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>macOS:</b> Attention is requested to the application as a whole, not the specific window.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the handle of the monitor that the specified window is in full screen on.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The monitor, or <code>NULL</code> if the window is in windowed mode or an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the monitor that the window uses for full screen mode or, if the monitor is <code>NULL</code>, makes it windowed mode.</p>
<p>When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to it. The window position is ignored when setting a monitor.</p>
<p>When the monitor is <code>NULL</code>, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is specified.</p>
<p>If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see <aclass="el"href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a>.</p>
<p>When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose monitor, size or video mode to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">monitor</td><td>The desired monitor, or <code>NULL</code> to set windowed mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">xpos</td><td>The desired x-coordinate of the upper-left corner of the content area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">ypos</td><td>The desired y-coordinate of the upper-left corner of the content area. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">width</td><td>The desired with, in screen coordinates, of the content area or video mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">height</td><td>The desired height, in screen coordinates, of the content area or video mode. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">refreshRate</td><td>The desired refresh rate, in Hz, of the video mode, or <code>GLFW_DONT_CARE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>The OpenGL or OpenGL ES context will not be destroyed or otherwise affected by any resizing or mode switching, although you may need to update your viewport if the framebuffer size has changed.</dd>
<dd>
<b>Wayland:</b> The desired window position is ignored, as there is no way for an application to set this property.</dd>
<dd>
<b>Wayland:</b> Setting the window to full screen will not attempt to change the mode, no matter what the requested size or refresh rate.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function returns the value of an attribute of the specified window or its OpenGL or OpenGL ES context.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to query. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">attrib</td><td>The <aclass="el"href="window_guide.html#window_attribs">window attribute</a> whose value to return. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The value of the attribute, or zero if an <aclass="el"href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>Framebuffer related hints are not window attributes. See <aclass="el"href="window_guide.html#window_attribs_fb">Framebuffer related attributes</a> for more information.</dd>
<dd>
Zero is a valid value for many window and context related attributes so you cannot use a return value of zero as an indication of errors. However, this function should not fail as long as it is passed valid arguments and the library has been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd>
<dd>
<b>Wayland:</b> The Wayland protocol provides no way to check whether a window is iconfied, so <aclass="el"href="group__window.html#ga39d44b7c056e55e581355a92d240b58a">GLFW_ICONIFIED</a> always returns <code>GLFW_FALSE</code>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetWindowParam</code> and <code>glfwGetGLVersion</code>. </dd></dl>
<p>This function sets the value of an attribute of the specified window.</p>
<p>The supported attributes are <aclass="el"href="window_guide.html#GLFW_DECORATED_attrib">GLFW_DECORATED</a>, <aclass="el"href="window_guide.html#GLFW_RESIZABLE_attrib">GLFW_RESIZABLE</a>, <aclass="el"href="window_guide.html#GLFW_FLOATING_attrib">GLFW_FLOATING</a>, <aclass="el"href="window_guide.html#GLFW_AUTO_ICONIFY_attrib">GLFW_AUTO_ICONIFY</a> and <aclass="el"href="window_guide.html#GLFW_FOCUS_ON_SHOW_attrib">GLFW_FOCUS_ON_SHOW</a>.</p>
<p>Some of these attributes are ignored for full screen windows. The new value will take effect if the window is later made windowed.</p>
<p>Some of these attributes are ignored for windowed mode windows. The new value will take effect if the window is later made full screen.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window to set the attribute for. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd>Calling <aclass="el"href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a> will always return the latest value, even if that value is ignored by the current mode of the window.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the user-defined pointer of the specified window. The current value is retained until the window is destroyed. The initial value is <code>NULL</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose pointer to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">pointer</td><td>The new value.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<p>This function returns the current value of the user-defined pointer of the specified window. The initial value is <code>NULL</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose pointer to return.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<p>This function sets the position callback of the specified window, which is called when the window is moved. The callback is provided with the position, in screen coordinates, of the upper-left corner of the content area of the window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#gabe287973a21a8f927cde4db06b8dcbe9">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> This callback will never be called, as there is no way for an application to know its global position.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the size callback of the specified window, which is called when the window is resized. The callback is provided with the size, in screen coordinates, of the content area of the window.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#gaec0282944bb810f6f3163ec02da90350">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in the title bar.</p>
<p>The close flag is set before this callback is called, but you can modify it at any time with <aclass="el"href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a>.</p>
<p>The close callback is not triggered by <aclass="el"href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#gabf859b936d80961b7d39013a9694cc3e">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>macOS:</b> Selecting Quit from the application menu will trigger the close callback for all windows.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_close">Window closing and close flag</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>
<p>This function sets the refresh callback of the specified window, which is called when the content area of the window needs to be redrawn, for example if the window has been exposed after having been covered by another window.</p>
<p>On compositing window systems such as Aero, Compiz, Aqua or Wayland, where the window contents are saved off-screen, this callback may be called only very infrequently or never at all.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#ga431663a1427d2eb3a273bc398b6737b5">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="window_guide.html#window_refresh">Window damage and refresh</a></dd></dl>
<dlclass="section since"><dt>Since</dt><dd>Added in version 2.5. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>
<p>This function sets the focus callback of the specified window, which is called when the window gains or loses input focus.</p>
<p>After the focus callback is called for a window that lost input focus, synthetic key and mouse button release events will be generated for all such that had been pressed. For more information, see <aclass="el"href="group__input.html#ga1caf18159767e761185e49a3be019f8d">glfwSetKeyCallback</a> and <aclass="el"href="group__input.html#ga6ab84420974d812bee700e45284a723c">glfwSetMouseButtonCallback</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#gabc58c47e9d93f6eb1862d615c3680f46">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the iconification callback of the specified window, which is called when the window is iconified or restored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#ga35c658cccba236f26e7adee0e25f6a4f">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> The XDG-shell protocol has no event for iconification, so this callback will never be called.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the maximization callback of the specified window, which is called when the window is maximized or restored.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#ga3017196fdaec33ac3e095765176c2a90">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#gae18026e294dde685ed2e5f759533144d">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function sets the window content scale callback of the specified window, which is called when the content scale of the specified window changes.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose callback to set. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <aclass="el"href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
</div><!-- fragment --> For more information about the callback parameters, see the <aclass="el"href="group__window.html#ga77f288a2d04bb3c77c7d9615d08cf70e">function pointer type</a>.</dd></dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>
<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <aclass="el"href="window_guide.html#window_refresh">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>
<p>Do not assume that callbacks you set will <em>only</em> be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>
<p>Event processing is not required for joystick input to work.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function puts the calling thread to sleep until at least one event is available in the event queue. Once one or more events are available, it behaves exactly like <aclass="el"href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>
<p>Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.</p>
<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <aclass="el"href="window_guide.html#window_refresh">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>
<p>Do not assume that callbacks you set will <em>only</em> be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>
<p>Event processing is not required for joystick input to work.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function puts the calling thread to sleep until at least one event is available in the event queue, or until the specified timeout is reached. If one or more events are available, it behaves exactly like <aclass="el"href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>
<p>The timeout value must be a positive finite number.</p>
<p>Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.</p>
<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <aclass="el"href="window_guide.html#window_refresh">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>
<p>Do not assume that callbacks you set will <em>only</em> be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>
<p>Event processing is not required for joystick input to work.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">timeout</td><td>The maximum amount of time, in seconds, to wait.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<p>This function posts an empty event from the current thread to the event queue, causing <aclass="el"href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a> or <aclass="el"href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">glfwWaitEventsTimeout</a> to return.</p>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<p>This function swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.</p>
<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <aclass="el"href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see <code>vkQueuePresentKHR</code> instead.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">window</td><td>The window whose buffers to swap.</td></tr>
</table>
</dd>
</dl>
<dlclass="section user"><dt>Errors</dt><dd>Possible errors include <aclass="el"href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <aclass="el"href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <aclass="el"href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dlclass="section remark"><dt>Remarks</dt><dd><b>EGL:</b> The context of the specified window must be current on the calling thread.</dd></dl>
<dlclass="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>