native_windows.go (904B)
1 package glfw 2 3 //#define GLFW_EXPOSE_NATIVE_WIN32 4 //#define GLFW_EXPOSE_NATIVE_WGL 5 //#define GLFW_INCLUDE_NONE 6 //#include "glfw/include/GLFW/glfw3.h" 7 //#include "glfw/include/GLFW/glfw3native.h" 8 import "C" 9 10 // GetWin32Adapter returns the adapter device name of the monitor. 11 func (m *Monitor) GetWin32Adapter() string { 12 ret := C.glfwGetWin32Adapter(m.data) 13 panicError() 14 return C.GoString(ret) 15 } 16 17 // GetWin32Monitor returns the display device name of the monitor. 18 func (m *Monitor) GetWin32Monitor() string { 19 ret := C.glfwGetWin32Monitor(m.data) 20 panicError() 21 return C.GoString(ret) 22 } 23 24 // GetWin32Window returns the HWND of the window. 25 func (w *Window) GetWin32Window() C.HWND { 26 ret := C.glfwGetWin32Window(w.data) 27 panicError() 28 return ret 29 } 30 31 // GetWGLContext returns the HGLRC of the window. 32 func (w *Window) GetWGLContext() C.HGLRC { 33 ret := C.glfwGetWGLContext(w.data) 34 panicError() 35 return ret 36 }