mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Added glfwGetWindowMonitor.
This commit is contained in:
parent
ff09d3a343
commit
26480901fd
|
@ -560,6 +560,7 @@ GLFWAPI void glfwRestoreWindow(GLFWwindow window);
|
||||||
GLFWAPI void glfwShowWindow(GLFWwindow window);
|
GLFWAPI void glfwShowWindow(GLFWwindow window);
|
||||||
GLFWAPI void glfwHideWindow(GLFWwindow window);
|
GLFWAPI void glfwHideWindow(GLFWwindow window);
|
||||||
GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param);
|
GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param);
|
||||||
|
GLFWAPI GLFWmonitor glfwGetWindowMonitor(GLFWwindow window);
|
||||||
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer);
|
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer);
|
||||||
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow window);
|
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow window);
|
||||||
GLFWAPI void glfwSetWindowSizeCallback(GLFWwindowsizefun cbfun);
|
GLFWAPI void glfwSetWindowSizeCallback(GLFWwindowsizefun cbfun);
|
||||||
|
|
18
src/window.c
18
src/window.c
|
@ -763,6 +763,24 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//========================================================================
|
||||||
|
// Get window monitor
|
||||||
|
//========================================================================
|
||||||
|
|
||||||
|
GLFWAPI GLFWmonitor glfwGetWindowMonitor(GLFWwindow handle)
|
||||||
|
{
|
||||||
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
|
||||||
|
if (!_glfwInitialized)
|
||||||
|
{
|
||||||
|
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (GLFWmonitor) window->monitor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// Set the user pointer for the specified window
|
// Set the user pointer for the specified window
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user