//
// Generated by Brutal.Glfw.Generate; do not edit by hand.
#nullable enable
namespace Brutal.GlfwApi.Win32
{
///
/// Native handle accessors for the Win32 (Windows) and WGL backends. Add using Brutal.GlfwApi.Win32; to
/// call these extension methods on / .
///
public static class Win32Extensions
{
extension(GlfwMonitor monitor)
{
///
/// Returns the adapter device name of the specified monitor.
///
/// The UTF-8 encoded adapter device name (for example \\.\DISPLAY1) of the
/// specified monitor, or null if an error occurred.
///
/// This function is only available on the Windows native build. Calling it on any other platform will
/// result in an .
///
///
/// ,
///
///
/// This function may be called from any thread. Access is not synchronized.
///
/// glfwGetWin32Adapter
public string? GetWin32Adapter() => Glfw.PInvoke.GetWin32Adapter(monitor);
///
/// Returns the display device name of the specified monitor.
///
/// The UTF-8 encoded display device name (for example \\.\DISPLAY1\Monitor0) of
/// the specified monitor, or null if an error occurred.
///
/// This function is only available on the Windows native build. Calling it on any other platform will
/// result in an .
///
///
/// ,
///
///
/// This function may be called from any thread. Access is not synchronized.
///
/// glfwGetWin32Monitor
public string? GetWin32Monitor() => Glfw.PInvoke.GetWin32Monitor(monitor);
}
extension(GlfwWindow window)
{
///
/// Returns the HWND of the specified window.
///
/// The HWND of the specified window, or 0 if an error occurred.
///
/// This function is only available on the Windows native build. Calling it on any other platform will
/// result in an .
///
/// The HDC associated with the window can be obtained by passing the returned HWND to the
/// Win32 GetDC function. The returned DC is private and does not need to be released.
///
///
///
/// ,
///
///
/// This function may be called from any thread. Access is not synchronized.
///
/// glfwGetWin32Window
public nint GetWin32Window() => Glfw.PInvoke.GetWin32Window(window);
///
/// Returns the HGLRC of the specified window.
///
/// The HGLRC of the specified window, or 0 if an error occurred.
///
/// This function is only available on the Windows native build with WGL context support. Calling it on
/// any other platform will result in an .
///
///
/// , ,
///
///
///
/// This function may be called from any thread. Access is not synchronized.
///
/// glfwGetWGLContext
public nint GetWGLContext() => Glfw.PInvoke.GetWGLContext(window);
}
}
}