File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -618,6 +618,8 @@ pub const Monitor = opaque {
618618 pub const getVideoMode = zglfw .getVideoMode ;
619619 pub const getVideoModes = zglfw .getVideoModes ;
620620 pub const getPhysicalSize = zglfw .getMonitorPhysicalSize ;
621+ pub const getUserPointer = zglfw .getMonitorUserPointer ;
622+ pub const setUserPointer = zglfw .setMonitorUserPointer ;
621623
622624 pub fn getPos (self : * Monitor ) [2 ]c_int {
623625 var xpos : c_int = 0 ;
@@ -665,6 +667,16 @@ pub fn getMonitorName(monitor: *Monitor) Error![]const u8 {
665667}
666668extern fn glfwGetMonitorName (monitor : * Monitor ) ? [* :0 ]const u8 ;
667669
670+ pub fn getMonitorUserPointer (monitor : * Monitor , comptime T : type ) ? * T {
671+ return @ptrCast (@alignCast (glfwGetMonitorUserPointer (monitor )));
672+ }
673+ extern fn glfwGetMonitorUserPointer (monitor : * Monitor ) callconv (.c ) ? * anyopaque ;
674+
675+ pub fn setMonitorUserPointer (monitor : * Monitor , pointer : ? * anyopaque ) void {
676+ glfwSetMonitorUserPointer (monitor , pointer );
677+ }
678+ extern fn glfwSetMonitorUserPointer (monitor : * Monitor , pointer : ? * anyopaque ) callconv (.c ) void ;
679+
668680pub const MonitorFn = * const fn (monitor : * Monitor , event : Monitor.Event ) callconv (.c ) void ;
669681pub const setMonitorCallback = glfwSetMonitorCallback ;
670682extern fn glfwSetMonitorCallback (callback : ? MonitorFn ) ? MonitorFn ;
You can’t perform that action at this time.
0 commit comments