brutal/brutal.glfw/Brutal.Glfw/Generated/Libraries/Glfw.Native.Wayland.gen.cs
2026-10-15 14:12:02 +13:00

70 lines
3.5 KiB
C#

// <auto-generated/>
// Generated by Brutal.Glfw.Generate; do not edit by hand.
#nullable enable
namespace Brutal.GlfwApi.Wayland
{
/// <summary>
/// Native handle accessors for the Wayland (Linux/BSD) backend. Add <c>using Brutal.GlfwApi.Wayland;</c> to call
/// these extension methods on <see cref="GlfwWindow"/> / <see cref="GlfwMonitor"/>.
/// </summary>
public static class WaylandExtensions
{
/// <summary>
/// Returns the <c>wl_display*</c> used by GLFW.
/// </summary>
/// <returns>The <c>wl_display*</c> used by GLFW, or <c>0</c> if an error occurred.</returns>
/// <remarks>
/// This function is only available on the Wayland native build. Calling it on any other platform will result
/// in an <see cref="EntryPointNotFoundException"/>.
/// </remarks>
/// <possibleErrors>
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.PlatformUnavailable"/>
/// </possibleErrors>
/// <threadSafety>
/// This function may be called from any thread. Access is not synchronized.
/// </threadSafety>
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetWaylandDisplay</seealso>
public static nint GetWaylandDisplay() => Glfw.PInvoke.GetWaylandDisplay();
extension(GlfwMonitor monitor)
{
/// <summary>
/// Returns the <c>wl_output*</c> of the specified monitor.
/// </summary>
/// <returns>The <c>wl_output*</c> of the specified monitor, or <c>0</c> if an error occurred.</returns>
/// <remarks>
/// This function is only available on the Wayland native build. Calling it on any other platform will
/// result in an <see cref="EntryPointNotFoundException"/>.
/// </remarks>
/// <possibleErrors>
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.PlatformUnavailable"/>
/// </possibleErrors>
/// <threadSafety>
/// This function may be called from any thread. Access is not synchronized.
/// </threadSafety>
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetWaylandMonitor</seealso>
public nint GetWaylandMonitor() => Glfw.PInvoke.GetWaylandMonitor(monitor);
}
extension(GlfwWindow window)
{
/// <summary>
/// Returns the main <c>wl_surface*</c> of the specified window.
/// </summary>
/// <returns>The main <c>wl_surface*</c> of the specified window, or <c>0</c> if an error
/// occurred.</returns>
/// <remarks>
/// This function is only available on the Wayland native build. Calling it on any other platform will
/// result in an <see cref="EntryPointNotFoundException"/>.
/// </remarks>
/// <possibleErrors>
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.PlatformUnavailable"/>
/// </possibleErrors>
/// <threadSafety>
/// This function may be called from any thread. Access is not synchronized.
/// </threadSafety>
/// <seealso href="https://www.glfw.org/docs/latest/group__native.html">glfwGetWaylandWindow</seealso>
public nint GetWaylandWindow() => Glfw.PInvoke.GetWaylandWindow(window);
}
}
}