Stub implementation of monitor callback.

This commit is contained in:
Marcel Metz
2011-10-09 00:20:34 -04:00
parent ac57be060d
commit 784f60365e
3 changed files with 40 additions and 0 deletions
+1
View File
@@ -264,6 +264,7 @@ struct _GLFWlibrary
GLFWscrollfun scrollCallback;
GLFWkeyfun keyCallback;
GLFWcharfun charCallback;
GLFWmonitordevicefun monitorCallback;
GLFWthreadmodel threading;
GLFWallocator allocator;
+15
View File
@@ -130,3 +130,18 @@ GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param)
return NULL;
}
//========================================================================
// Set a callback function for monitor events
//========================================================================
GLFWAPI void glfwSetMonitorDeviceCallback(GLFWmonitordevicefun cbfun)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
return;
}
_glfwLibrary.monitorCallback= cbfun;
}