@@ -545,6 +545,7 @@ pub const Monitor = opaque {
545545 pub const getName = zglfw .getMonitorName ;
546546 pub const getVideoMode = zglfw .getVideoMode ;
547547 pub const getVideoModes = zglfw .getVideoModes ;
548+ pub const getPhysicalSize = zglfw .getMonitorPhysicalSize ;
548549
549550 pub fn getPos (self : * Monitor ) [2 ]c_int {
550551 var xpos : c_int = 0 ;
@@ -566,6 +567,15 @@ pub fn getMonitors() []*Monitor {
566567}
567568extern fn glfwGetMonitors (count : * c_int ) ? [* ]* Monitor ;
568569
570+ pub fn getMonitorPhysicalSize (monitor : * Monitor ) Error ! [2 ]i32 {
571+ var width_mm : c_int = undefined ;
572+ var height_mm : c_int = undefined ;
573+ glfwGetMonitorPhysicalSize (monitor , & width_mm , & height_mm );
574+ try maybeError ();
575+ return .{ width_mm , height_mm };
576+ }
577+ extern fn glfwGetMonitorPhysicalSize (* Monitor , width_mm : ? * c_int , height_mm : ? * c_int ) void ;
578+
569579pub const getMonitorPos = glfwGetMonitorPos ;
570580extern fn glfwGetMonitorPos (* Monitor , xpos : ? * c_int , ypos : ? * c_int ) void ;
571581
@@ -691,6 +701,7 @@ pub const Window = opaque {
691701 pub const setScrollCallback = zglfw .setScrollCallback ;
692702 pub const setCursorPosCallback = zglfw .setCursorPosCallback ;
693703 pub const setCursorEnterCallback = zglfw .setCursorEnterCallback ;
704+ pub const getMonitor = zglfw .getWindowMonitor ;
694705 pub const setMonitor = zglfw .setWindowMonitor ;
695706 pub const show = zglfw .showWindow ;
696707 pub const focus = zglfw .focusWindow ;
@@ -853,6 +864,9 @@ pub const MouseButtonFn = *const fn (
853864 mods : Mods ,
854865) callconv (.C ) void ;
855866
867+ pub const getWindowMonitor = glfwGetWindowMonitor ;
868+ extern fn glfwGetWindowMonitor (window : * Window ) ? * Monitor ;
869+
856870pub const setCursorPosCallback = glfwSetCursorPosCallback ;
857871extern fn glfwSetCursorPosCallback (window : * Window , callback : ? CursorPosFn ) ? CursorPosFn ;
858872pub const CursorPosFn = * const fn (
0 commit comments