Add glfw.GetCocoaWindow

This commit is contained in:
Jan Ivanecky
2022-10-08 17:03:55 +02:00
parent 62440df051
commit 7e5c063d98
4 changed files with 46 additions and 33 deletions
+16
View File
@@ -0,0 +1,16 @@
//+build darwin
package glfw
import NS "vendor:darwin/foundation"
foreign import glfw { "lib/darwin/libglfw3.a" }
@(default_calling_convention="c", link_prefix="glfw")
foreign glfw {
GetCocoaWindow :: proc(window: WindowHandle) -> ^NS.Window ---
}
// TODO:
// CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
// id glfwGetNSGLContext(GLFWwindow* window);