Add glfwSetWindowMonitor

This adds the ability to switch between windowed and full screen modes,
move a full screen window between monitors and update its desired
resolution and refresh rate.

Fixes #43.
This commit is contained in:
Camilla Berglund
2016-02-23 12:26:42 +01:00
parent fb8a31ba3f
commit 6570d0c4b7
16 changed files with 764 additions and 318 deletions
+11
View File
@@ -339,6 +339,10 @@ struct _GLFWwindow
_GLFWmonitor* monitor;
_GLFWcursor* cursor;
int minwidth, minheight;
int maxwidth, maxheight;
int numer, denom;
// Window input state
GLFWbool stickyKeys;
GLFWbool stickyMouseButtons;
@@ -694,6 +698,11 @@ void _glfwPlatformHideWindow(_GLFWwindow* window);
*/
void _glfwPlatformFocusWindow(_GLFWwindow* window);
/*! @copydoc glfwSetWindowMonitor
* @ingroup platform
*/
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
/*! @brief Returns whether the window is focused.
* @ingroup platform
*/
@@ -856,6 +865,8 @@ void _glfwInputWindowDamage(_GLFWwindow* window);
*/
void _glfwInputWindowCloseRequest(_GLFWwindow* window);
void _glfwInputWindowMonitorChange(_GLFWwindow* window, _GLFWmonitor* monitor);
/*! @brief Notifies shared code of a physical key event.
* @param[in] window The window that received the event.
* @param[in] key The key that was pressed or released.