Cocoa: Added glfwGetCocoaView native access function

Resolves #2235

Co-authored-by: mightgoyardstill <mightgoyardstill@users.noreply.github.com>
This commit is contained in:
Doug Binks
2024-02-20 13:20:30 +00:00
parent 0bb605cd79
commit 1fb7f0e120
5 changed files with 40 additions and 0 deletions
+17
View File
@@ -286,6 +286,23 @@ GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
* @ingroup native
*/
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
/*! @brief Returns the `NSView` of the specified window.
*
* @return The `NSView` of the specified window, or `nil` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_UNAVAILABLE.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.4.
*
* @ingroup native
*/
GLFWAPI id glfwGetCocoaView(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_NSGL)