// // Generated by Brutal.Glfw.Generate; do not edit by hand. #nullable enable namespace Brutal.GlfwApi.X11 { /// /// Native handle accessors for the X11 (Linux/BSD) and GLX backends. Add using Brutal.GlfwApi.X11; to call /// these extension methods on / . /// public static class X11Extensions { /// /// Returns the X11 Display used by GLFW. /// /// The Display pointer used by GLFW, or 0 if an error occurred. /// /// This function is only available on the X11 native build. Calling it on any other platform will result in /// an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetX11Display public static nint GetX11Display() => Glfw.PInvoke.GetX11Display(); /// /// Returns the contents of the current X11 primary selection as a string. /// /// The contents of the selection as a UTF-8 encoded string, or null if an error occurred. /// /// This function is only available on the X11 native build. Calling it on any other platform will result in /// an . /// /// If the selection is empty or its contents cannot be converted, null is returned and a /// error is generated. /// /// /// /// , , /// , /// /// /// This function must only be called from the main thread. /// /// glfwGetX11SelectionString public static string? GetX11SelectionString() => Glfw.PInvoke.GetX11SelectionString(); extension(GlfwMonitor monitor) { /// /// Returns the RRCrtc of the specified monitor. /// /// The RRCrtc of the specified monitor, or None (0) if an error occurred. /// /// This function is only available on the X11 native build. Calling it on any other platform will result /// in an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetX11Adapter public ulong GetX11Adapter() => Glfw.PInvoke.GetX11Adapter(monitor); /// /// Returns the RROutput of the specified monitor. /// /// The RROutput of the specified monitor, or None (0) if an error /// occurred. /// /// This function is only available on the X11 native build. Calling it on any other platform will result /// in an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetX11Monitor public ulong GetX11Monitor() => Glfw.PInvoke.GetX11Monitor(monitor); } extension(GlfwWindow window) { /// /// Returns the X11 Window XID of the specified window. /// /// The X11 Window of the specified window, or None (0) if an error /// occurred. /// /// This function is only available on the X11 native build. Calling it on any other platform will result /// in an . /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetX11Window public ulong GetX11Window() => Glfw.PInvoke.GetX11Window(window); /// /// Returns the GLXContext of the specified window. /// /// The GLXContext of the specified window, or 0 if an error occurred. /// /// This function is only available on the X11 native build with GLX context support. Calling it on any /// other platform will result in an . /// /// /// , , /// /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetGLXContext public nint GetGLXContext() => Glfw.PInvoke.GetGLXContext(window); /// /// Returns the GLXWindow of the specified window. /// /// The GLXWindow of the specified window, or None (0) if an error /// occurred. /// /// This function is only available on the X11 native build with GLX context support. Calling it on any /// other platform will result in an . /// /// /// , , /// /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetGLXWindow public ulong GetGLXWindow() => Glfw.PInvoke.GetGLXWindow(window); /// /// Retrieves the GLXFBConfig of the specified window's GLXWindow. /// /// Receives the GLXFBConfig of the window's GLXWindow, if /// available. /// true if successful, or false if an error occurred. /// /// This function is only available when GLFW was built with GLX context support. Calling it otherwise /// will result in an . /// /// GLXFBConfig is an opaque handle. GLFW leaves it unwritten on error, as core GLX defines no /// invalid value, so config is set to 0 before the call. /// /// /// /// , /// /// /// This function may be called from any thread. Access is not synchronized. /// /// glfwGetGLXFBConfig public bool GetGLXFBConfig(out nint config) { config = default; return Glfw.PInvoke.GetGLXFBConfig(window, out config) == GLFW_TRUE; } } /// /// Sets the current X11 primary selection to the specified string. /// /// A UTF-8 encoded string. Copied before this method returns. /// /// This function is only available on the X11 native build. Calling it on any other platform will result in /// an . /// /// /// , , /// /// /// /// This function must only be called from the main thread. /// /// glfwSetX11SelectionString public static void SetX11SelectionString(string @string) => Glfw.PInvoke.SetX11SelectionString(@string); } }