@@ -686,6 +686,11 @@ pub const Window = opaque {
686686 pub const setCloseCallback = zglfw .setWindowCloseCallback ;
687687 pub const setKeyCallback = zglfw .setKeyCallback ;
688688 pub const setCharCallback = zglfw .setCharCallback ;
689+ pub const setDropCallback = zglfw .setDropCallback ;
690+ pub const setMouseButtonCallback = zglfw .setMouseButtonCallback ;
691+ pub const setScrollCallback = zglfw .setScrollCallback ;
692+ pub const setCursorPosCallback = zglfw .setCursorPosCallback ;
693+ pub const setCursorEnterCallback = zglfw .setCursorEnterCallback ;
689694 pub const setMonitor = zglfw .setWindowMonitor ;
690695 pub const show = zglfw .showWindow ;
691696 pub const focus = zglfw .focusWindow ;
@@ -696,6 +701,8 @@ pub const Window = opaque {
696701 pub const setTitle = zglfw .setWindowTitle ;
697702 pub const setIcon = zglfw .setWindowIcon ;
698703 pub const shouldClose = zglfw .windowShouldClose ;
704+ pub const getClipboardString = zglfw .getClipboardString ;
705+ pub const setClipboardString = zglfw .setClipboardString ;
699706 pub const setCursor = zglfw .setCursor ;
700707 pub const setInputMode = zglfw .setInputMode ;
701708 pub const setInputModeUntyped = zglfw .setInputModeUntyped ;
@@ -828,24 +835,44 @@ extern fn glfwSetCharCallback(*Window, ?CharFn) ?CharFn;
828835pub const CharFn = * const fn (* Window , codepoint : u32 ) callconv (.C ) void ;
829836
830837pub const setDropCallback = glfwSetDropCallback ;
831- extern fn glfwSetDropCallback (* Window , ? DropFn ) ? DropFn ;
832- pub const DropFn = * const fn (* Window , path_count : c_int , paths : [* ][* :0 ]const u8 ) callconv (.C ) void ;
838+ extern fn glfwSetDropCallback (window : * Window , callback : ? DropFn ) ? DropFn ;
839+ pub const DropFn = * const fn (
840+ window : * Window ,
841+ path_count : i32 ,
842+ paths : [* ][* :0 ]const u8 ,
843+ ) callconv (.C ) void ;
833844
834845pub const setMouseButtonCallback = glfwSetMouseButtonCallback ;
835- extern fn glfwSetMouseButtonCallback (* Window , ? MouseButtonFn ) ? MouseButtonFn ;
836- pub const MouseButtonFn = * const fn (* Window , MouseButton , Action , Mods ) callconv (.C ) void ;
846+ extern fn glfwSetMouseButtonCallback (window : * Window , callback : ? MouseButtonFn ) ? MouseButtonFn ;
847+ pub const MouseButtonFn = * const fn (
848+ window : * Window ,
849+ button : MouseButton ,
850+ action : Action ,
851+ mods : Mods ,
852+ ) callconv (.C ) void ;
837853
838854pub const setCursorPosCallback = glfwSetCursorPosCallback ;
839- extern fn glfwSetCursorPosCallback (* Window , ? CursorPosFn ) ? CursorPosFn ;
840- pub const CursorPosFn = * const fn (* Window , xpos : f64 , ypos : f64 ) callconv (.C ) void ;
855+ extern fn glfwSetCursorPosCallback (window : * Window , callback : ? CursorPosFn ) ? CursorPosFn ;
856+ pub const CursorPosFn = * const fn (
857+ window : * Window ,
858+ xpos : f64 ,
859+ ypos : f64 ,
860+ ) callconv (.C ) void ;
841861
842862pub const setScrollCallback = glfwSetScrollCallback ;
843- extern fn glfwSetScrollCallback (* Window , ? ScrollFn ) ? ScrollFn ;
844- pub const ScrollFn = * const fn (* Window , xoffset : f64 , yoffset : f64 ) callconv (.C ) void ;
863+ extern fn glfwSetScrollCallback (window : * Window , callback : ? ScrollFn ) ? ScrollFn ;
864+ pub const ScrollFn = * const fn (
865+ window : * Window ,
866+ xoffset : f64 ,
867+ yoffset : f64 ,
868+ ) callconv (.C ) void ;
845869
846870pub const setCursorEnterCallback = glfwSetCursorEnterCallback ;
847- extern fn glfwSetCursorEnterCallback (* Window , ? CursorEnterFn ) ? CursorEnterFn ;
848- pub const CursorEnterFn = * const fn (* Window , entered : Bool ) callconv (.C ) void ;
871+ extern fn glfwSetCursorEnterCallback (window : * Window , callback : ? CursorEnterFn ) ? CursorEnterFn ;
872+ pub const CursorEnterFn = * const fn (
873+ window : * Window ,
874+ entered : i32 ,
875+ ) callconv (.C ) void ;
849876
850877pub const setWindowMonitor = glfwSetWindowMonitor ;
851878extern fn glfwSetWindowMonitor (
@@ -917,6 +944,19 @@ pub fn setWindowShouldClose(window: *Window, should_close: bool) void {
917944}
918945extern fn glfwSetWindowShouldClose (* Window , should_close : Bool ) void ;
919946
947+ pub fn getClipboardString (window : * Window ) ? [:0 ]const u8 {
948+ return std .mem .span (glfwGetClipboardString (window ));
949+ }
950+ extern fn glfwGetClipboardString (window : * Window ) ? [* :0 ]const u8 ;
951+
952+ pub inline fn setClipboardString (window : * Window , string : [:0 ]const u8 ) void {
953+ return glfwSetClipboardString (window , string );
954+ }
955+ extern fn glfwSetClipboardString (
956+ window : * Window ,
957+ string : [* :0 ]const u8 ,
958+ ) void ;
959+
920960pub const setCursor = glfwSetCursor ;
921961extern fn glfwSetCursor (* Window , ? * Cursor ) void ;
922962
0 commit comments