// // Generated by Brutal.Glfw.Generate; do not edit by hand. #nullable enable namespace Brutal.GlfwApi.Cocoa { /// /// Native handle accessors for the Cocoa (macOS) and NSGL backends. Add using Brutal.GlfwApi.Cocoa; to /// call these extension methods on / . /// public static class CocoaExtensions { extension(GlfwMonitor monitor) { /// /// Returns the CGDirectDisplayID of the specified monitor. /// /// The CGDirectDisplayID of the specified monitor, or kCGNullDirectDisplay /// (0) if an error occurred. /// /// This function is only available on the macOS native build. Calling it on any other platform will /// result in an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetCocoaMonitor public uint GetCocoaMonitor() => Glfw.PInvoke.GetCocoaMonitor(monitor); } extension(GlfwWindow window) { /// /// Returns the NSWindow of the specified window. /// /// The NSWindow handle of the specified window, or 0 if an error occurred. /// /// This function is only available on the macOS native build. Calling it on any other platform will /// result in an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetCocoaWindow public nint GetCocoaWindow() => Glfw.PInvoke.GetCocoaWindow(window); /// /// Returns the NSView of the specified window. /// /// The NSView handle of the specified window, or 0 if an error occurred. /// /// This function is only available on the macOS native build. Calling it on any other platform will /// result in an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetCocoaView public nint GetCocoaView() => Glfw.PInvoke.GetCocoaView(window); /// /// Returns the NSOpenGLContext of the specified window. /// /// The NSOpenGLContext handle of the specified window, or 0 if an error /// occurred. /// /// This function is only available on the macOS native build with NSGL context support. Calling it on any /// other platform will result in an . /// /// /// , , /// /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetNSGLContext public nint GetNSGLContext() => Glfw.PInvoke.GetNSGLContext(window); } } }