mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 14:38:25 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,89 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Glfw.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.GlfwApi.Cocoa
|
||||
{
|
||||
/// <summary>
|
||||
/// Native handle accessors for the Cocoa (macOS) and NSGL backends. Add <c>using Brutal.GlfwApi.Cocoa;</c> to
|
||||
/// call these extension methods on <see cref="GlfwWindow"/> / <see cref="GlfwMonitor"/>.
|
||||
/// </summary>
|
||||
public static class CocoaExtensions
|
||||
{
|
||||
extension(GlfwMonitor monitor)
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the <c>CGDirectDisplayID</c> of the specified monitor.
|
||||
/// </summary>
|
||||
/// <returns>The <c>CGDirectDisplayID</c> of the specified monitor, or <c>kCGNullDirectDisplay</c>
|
||||
/// (0) if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the macOS 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">glfwGetCocoaMonitor</seealso>
|
||||
public uint GetCocoaMonitor() => Glfw.PInvoke.GetCocoaMonitor(monitor);
|
||||
}
|
||||
extension(GlfwWindow window)
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the <c>NSWindow</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>NSWindow</c> handle of the specified window, or <c>0</c> if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the macOS 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">glfwGetCocoaWindow</seealso>
|
||||
public nint GetCocoaWindow() => Glfw.PInvoke.GetCocoaWindow(window);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <c>NSView</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>NSView</c> handle of the specified window, or <c>0</c> if an error occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the macOS 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">glfwGetCocoaView</seealso>
|
||||
public nint GetCocoaView() => Glfw.PInvoke.GetCocoaView(window);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <c>NSOpenGLContext</c> of the specified window.
|
||||
/// </summary>
|
||||
/// <returns>The <c>NSOpenGLContext</c> handle of the specified window, or <c>0</c> if an error
|
||||
/// occurred.</returns>
|
||||
/// <remarks>
|
||||
/// This function is only available on the macOS native build with NSGL 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">glfwGetNSGLContext</seealso>
|
||||
public nint GetNSGLContext() => Glfw.PInvoke.GetNSGLContext(window);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue