mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
93
Brutal.Glfw/Generated/Libraries/Glfw.Native.Win32.gen.cs
Normal file
93
Brutal.Glfw/Generated/Libraries/Glfw.Native.Win32.gen.cs
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Glfw.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.GlfwApi.Win32
|
||||
{
|
||||
/// <summary>
|
||||
/// Native handle accessors for the Win32 (Windows) and WGL backends. Add <c>using Brutal.GlfwApi.Win32;</c> to
|
||||
/// call these extension methods on <see cref="GlfwWindow"/> / <see cref="GlfwMonitor"/>.
|
||||
/// </summary>
|
||||
public static class Win32Extensions
|
||||
{
|
||||
extension(GlfwMonitor monitor)
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the adapter device name of the specified monitor.
|
||||
/// </summary>
|
||||
/// <returns>The UTF-8 encoded adapter device name (for example <c>\\.\DISPLAY1</c>) of the
|
||||
/// specified monitor, or null if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the Windows 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">glfwGetWin32Adapter</seealso>
|
||||
public string? GetWin32Adapter() => Glfw.PInvoke.GetWin32Adapter(monitor);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the display device name of the specified monitor.
|
||||
/// </summary>
|
||||
/// <returns>The UTF-8 encoded display device name (for example <c>\\.\DISPLAY1\Monitor0</c>) of
|
||||
/// the specified monitor, or null if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the Windows 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">glfwGetWin32Monitor</seealso>
|
||||
public string? GetWin32Monitor() => Glfw.PInvoke.GetWin32Monitor(monitor);
|
||||
}
|
||||
extension(GlfwWindow window)
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the <c>HWND</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>HWND</c> of the specified window, or <c>0</c> if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the Windows native build. Calling it on any other platform will
|
||||
/// result in an <see cref="EntryPointNotFoundException"/>.
|
||||
/// <para>
|
||||
/// The <c>HDC</c> associated with the window can be obtained by passing the returned <c>HWND</c> to the
|
||||
/// Win32 <c>GetDC</c> function. The returned DC is private and does not need to be released.
|
||||
/// </para>
|
||||
/// </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">glfwGetWin32Window</seealso>
|
||||
public nint GetWin32Window() => Glfw.PInvoke.GetWin32Window(window);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <c>HGLRC</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>HGLRC</c> of the specified window, or <c>0</c> if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the Windows native build with WGL context support. Calling it on
|
||||
/// any other platform will result in an <see cref="EntryPointNotFoundException"/>.
|
||||
/// </remarks>
|
||||
/// <possibleErrors>
|
||||
/// <see cref="GlfwErrorCode.NotInitialized"/>, <see cref="GlfwErrorCode.PlatformUnavailable"/>,
|
||||
/// <see cref="GlfwErrorCode.NoWindowContext"/>
|
||||
/// </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">glfwGetWGLContext</seealso>
|
||||
public nint GetWGLContext() => Glfw.PInvoke.GetWGLContext(window);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue