mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
50 lines
2.2 KiB
C#
50 lines
2.2 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Glfw.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.GlfwApi
|
|
{
|
|
public static unsafe partial class Glfw
|
|
{
|
|
/// <summary>
|
|
/// Returns the platform GLFW was initialized for.
|
|
/// </summary>
|
|
/// <returns>One of <see cref="GlfwPlatform"/>.</returns>
|
|
/// <remarks>
|
|
/// <see cref="Init"/> must succeed before this method is called. If GLFW has not been initialized the
|
|
/// returned value is undefined; check <see cref="GlfwErrorCode.NotInitialized"/> via
|
|
/// <see cref="GetError(out string)"/>.
|
|
/// </remarks>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
|
/// </possibleErrors>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread.
|
|
/// </threadSafety>
|
|
/// <seealso cref="IsPlatformSupported"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/intro_guide.html#platform">Runtime platform
|
|
/// selection</seealso>
|
|
public static GlfwPlatform GetPlatform() => (GlfwPlatform)PInvoke.GetPlatform();
|
|
|
|
/// <summary>
|
|
/// Returns whether the library includes support for the specified platform.
|
|
/// </summary>
|
|
/// <param name="platform">The platform to query.</param>
|
|
/// <returns><c>true</c> if the platform is supported, <c>false</c> otherwise.</returns>
|
|
/// <remarks>
|
|
/// The result depends on which backends were enabled when the GLFW native library was compiled. May be called
|
|
/// before <see cref="Init"/>.
|
|
/// </remarks>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// </possibleErrors>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread.
|
|
/// </threadSafety>
|
|
/// <seealso cref="GetPlatform"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/intro_guide.html#platform">Runtime platform
|
|
/// selection</seealso>
|
|
public static bool IsPlatformSupported(GlfwPlatform platform) =>
|
|
PInvoke.PlatformSupported((int)platform) == GLFW_TRUE;
|
|
}
|
|
}
|