mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Updated native API and merged into related files.
This commit is contained in:
@@ -969,3 +969,25 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW native API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Returns the Cocoa object of the specified window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return window->ns.object;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user