mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
458 lines
25 KiB
C#
458 lines
25 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 whether raw mouse motion is supported.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This function returns whether raw mouse motion is supported on the current system. This status does not
|
|
/// change after GLFW has been initialized so you only need to check this once. If you attempt to enable raw
|
|
/// motion on a system that does not support it, a <see cref="GlfwErrorCode.PlatformError"/> will be emitted.
|
|
/// <para>
|
|
/// Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the
|
|
/// scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a
|
|
/// cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse
|
|
/// motion is only provided when the cursor is disabled.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="GlfwWindow.SetInputMode">GlfwWindow.SetInputMode</seealso>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#raw_mouse_motion">Raw mouse
|
|
/// motion</seealso>
|
|
public static bool RawMotionSupported() => PInvoke.RawMouseMotionSupported() == GLFW_TRUE;
|
|
|
|
/// <summary>
|
|
/// Returns the layout-specific name of the specified printable key.
|
|
/// </summary>
|
|
/// <param name="key">The key to query, or <see cref="GlfwKey.Unknown"/>.</param>
|
|
/// <param name="scanCode">The scancode of the key to query.</param>
|
|
/// <returns>The layout-specific name of the specified key, or null if the key is non-printable.</returns>
|
|
/// <remarks>
|
|
/// This function returns the name of the specified printable key, encoded as UTF-8. This is typically the
|
|
/// character that key would produce without any modifier keys, intended for displaying key bindings to the
|
|
/// user. For dead keys, it is typically the diacritic it would add to a character.
|
|
/// <para>
|
|
/// <b>Do not use this function</b> for
|
|
/// <see href="https://www.glfw.org/docs/latest/input_guide.html#input_char">text input</see>. You will
|
|
/// break text input for many languages even if it happens to work for yours.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the key is <see cref="GlfwKey.Unknown"/>, the scancode is used to identify the key, otherwise the
|
|
/// scancode is ignored. If you specify a non-printable key, or <see cref="GlfwKey.Unknown"/> and a scancode
|
|
/// that maps to a non-printable key, this function returns null but does not emit an error.
|
|
/// </para>
|
|
/// <para>
|
|
/// This behavior allows you to always pass in the arguments in the
|
|
/// <see href="https://www.glfw.org/docs/latest/input_guide.html#input_key">key callback</see> without
|
|
/// modification.
|
|
/// </para>
|
|
/// <para>
|
|
/// Names for printable keys depend on a keyboard layout, while names for non-printable keys are the same
|
|
/// across layouts but depend on the application language and should be localized along with other user
|
|
/// interface text.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidValue"/>
|
|
/// <see cref="GlfwErrorCode.InvalidEnum"/> <see cref="GlfwErrorCode.PlatformError"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#input_key_name">Key names</seealso>
|
|
public static string? GetKeyName(GlfwKey key, int scanCode) => PInvoke.GetKeyName((int)key, scanCode);
|
|
|
|
/// <summary>
|
|
/// Returns the platform-specific scancode of the specified key.
|
|
/// </summary>
|
|
/// <param name="key">Any key token.</param>
|
|
/// <returns>The platform-specific scancode of the specified key, or <c>-1</c> if the key is not
|
|
/// supported on the current platform or an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the platform-specified scancode of the specified key.
|
|
/// <para>
|
|
/// If the specified <see href="https://www.glfw.org/docs/latest/group__keys.html">key token</see>
|
|
/// corresponds to a physical key not supported on the current platform then this method will return
|
|
/// <c>-1</c>. Calling this function with anything other than a key token will return <c>-1</c>. and
|
|
/// generate a <see cref="GlfwErrorCode.InvalidEnum"/> error.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#input_key">Key input</seealso>
|
|
public static int GetKeyScanCode(int key) => PInvoke.GetKeyScanCode(key);
|
|
|
|
/// <summary>
|
|
/// Returns whether the specified joystick is present.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick ID to query.</param>
|
|
/// <remarks>
|
|
/// This function returns whether the specified joystick is present.
|
|
/// <para>
|
|
/// There is no need to call this function before other functions that accept a joystick ID, as they all
|
|
/// check for presence before performing any other work.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// <see cref="GlfwErrorCode.PlatformError"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#joystick">Joystick input</seealso>
|
|
public static bool JoystickPresent(int joystickId) => PInvoke.JoystickPresent(joystickId) == GLFW_TRUE;
|
|
|
|
/// <summary>
|
|
/// Returns the values of all axes of the specified joystick.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick ID to query.</param>
|
|
/// <returns>An array of axis values, or <c>null</c> if the joystick is not present or an error
|
|
/// occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the values of all axes of the specified joystick. Each element in the array is a
|
|
/// value between -1.0 and 1.0.
|
|
/// <para>
|
|
/// If the specified joystick is not present this function will return <c>null</c> but will not generate an
|
|
/// error. This can be used instead of first calling
|
|
/// <see cref="JoystickPresent(int)">Glfw.JoystickPresent</see>.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// <see cref="GlfwErrorCode.PlatformError"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#joystick_axis">Joystick axis
|
|
/// states</seealso>
|
|
public static ReadOnlySpan<float> GetJoystickAxes(int joystickId)
|
|
{
|
|
int count;
|
|
return new ReadOnlySpan<float>(PInvoke.GetJoystickAxes(joystickId, out count), count);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the state of all buttons of the specified joystick.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick ID to query.</param>
|
|
/// <returns>An array of button states, or <c>null</c> if the joystick is not present or an error
|
|
/// occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the state of all buttons of the specified joystick. Each element in the array is
|
|
/// either <see cref="GlfwButtonAction.Press"/> or <see cref="GlfwButtonAction.Release"/>.
|
|
/// <para>
|
|
/// For backward compatibility with earlier versions that did not have <see cref="GetJoystickHats"/>, the
|
|
/// button array also includes all hats, each represented as four buttons. The hats are in the same order as
|
|
/// returned by <c>GetJoystickHats</c> and are in the order <em>up</em>, <em>right</em>, <em>down</em> and
|
|
/// <em>left</em>. To disable these extra buttons, set the <see cref="GlfwInitHint.JoystickHatButtons"/>
|
|
/// init hint before initialization.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the specified joystick is not present this function will return <c>null</c> but will not generate an
|
|
/// error. This can be used instead of first calling
|
|
/// <see cref="JoystickPresent(int)">Glfw.JoystickPresent</see>.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// <see cref="GlfwErrorCode.PlatformError"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#joystick_button">Joystick button
|
|
/// states</seealso>
|
|
public static ReadOnlySpan<byte> GetJoystickButtons(int joystickId)
|
|
{
|
|
int count;
|
|
return new ReadOnlySpan<byte>(PInvoke.GetJoystickButtons(joystickId, out count), count);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the name of the specified joystick.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick ID to query.</param>
|
|
/// <returns>The name of the joystick, or null if the joystick is not present or an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the name, encoded as UTF-8, of the specified joystick. The returned string is
|
|
/// allocated and freed by GLFW. You should not free it yourself.
|
|
/// <para>
|
|
/// If the specified joystick is not present this function will return <c>null</c> but will not generate an
|
|
/// error. This can be used instead of first calling
|
|
/// <see cref="JoystickPresent(int)">Glfw.JoystickPresent</see>.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// <see cref="GlfwErrorCode.PlatformError"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#joystick_name">Joystick name</seealso>
|
|
public static string? GetJoystickName(int joystickId) => PInvoke.GetJoystickName(joystickId);
|
|
|
|
/// <summary>
|
|
/// Returns the SDL compatible GUID of the specified joystick.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick ID to query.</param>
|
|
/// <returns>The GUID of the joystick, or null if the joystick is not present or an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified
|
|
/// joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.
|
|
/// <para>
|
|
/// The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID
|
|
/// even if there is no gamepad mapping assigned to it.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the specified joystick is not present this function will return null but will not generate an error.
|
|
/// This can be used instead of first calling <see cref="JoystickPresent(int)">Glfw.JoystickPresent</see>.
|
|
/// </para>
|
|
/// <para>
|
|
/// The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and
|
|
/// model of a joystick but does not identify a specific unit, e.g. all wired Xbox 360 controllers will have
|
|
/// the same GUID on that platform. The GUID for a unit may vary between platforms depending on what
|
|
/// hardware information the platform specific APIs provide.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// <see cref="GlfwErrorCode.PlatformError"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#gamepad">Gamepad input</seealso>
|
|
public static string? GetJoystickGuid(int joystickId) => PInvoke.GetJoystickGuid(joystickId);
|
|
|
|
/// <summary>
|
|
/// Sets the user pointer of the specified joystick.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick whose user pointer to set.</param>
|
|
/// <param name="handle">The new user pointer value.</param>
|
|
/// <remarks>
|
|
/// This function sets the user-defined pointer of the specified joystick. The current value is retained until
|
|
/// the joystick is disconnected. The initial value is <c>null</c>.
|
|
/// <para>
|
|
/// This function may be called from the joystick callback, even for a joystick that is being disconnected.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread. Access is not synchronized.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="GetJoystickUserPointer(int)">GetJoystickUserPointer</seealso>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#joystick_userptr">Joystick user
|
|
/// pointer</seealso>
|
|
public static void SetJoystickUserPointer(int joystickId, void* handle) =>
|
|
PInvoke.SetJoystickUserPointer(joystickId, handle);
|
|
|
|
/// <summary>
|
|
/// Returns the user pointer of the specified joystick.
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick whose user pointer to return.</param>
|
|
/// <remarks>
|
|
/// This function returns the current value of the user-defined pointer of the specified joystick. The initial
|
|
/// value is <c>null</c>.
|
|
/// <para>
|
|
/// This function may be called from the joystick callback, even for a joystick that is being disconnected.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread. Access is not synchronized.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="SetJoystickUserPointer">SetJoystickUserPointer</seealso>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#joystick_userptr">Joystick user
|
|
/// pointer</seealso>
|
|
public static void* GetJoystickUserPointer(int joystickId) => PInvoke.GetJoystickUserPointer(joystickId);
|
|
|
|
/// <summary>
|
|
/// Returns whether the specified joystick has a gamepad mapping
|
|
/// </summary>
|
|
/// <param name="joystickId">The joystick ID to query.</param>
|
|
/// <returns><c>true</c> if the joystick is both present and has a gamepad mapping, otherwise
|
|
/// <c>false</c>.</returns>
|
|
/// <remarks>
|
|
/// This function returns whether the specified joystick is both present and has a gamepad mapping.
|
|
/// <para>
|
|
/// If the specified joystick is present but does not have a gamepad mapping this function will return
|
|
/// <c>false</c> but will not generate an error. Call
|
|
/// <see cref="JoystickPresent(int)">Glfw.JoystickPresent</see> to check if a joystick is present regardless
|
|
/// of whether it has a mapping.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="GetGamepadState"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#gamepad">Gamepad input</seealso>
|
|
public static bool JoystickIsGamepad(int joystickId) => PInvoke.JoystickIsGamepad(joystickId) == GLFW_TRUE;
|
|
|
|
/// <summary>
|
|
/// Adds the specified SDL_GameControllerDB gamepad mappings
|
|
/// </summary>
|
|
/// <param name="mappings">The string containing the gamepad mappings.</param>
|
|
/// <returns><c>true</c> if successful, or <c>false</c> if an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function parses the specified ASCII encoded string and updates the internal list with any gamepad
|
|
/// mappings it finds. This string may contain either a single gamepad mapping or many mappings separated by
|
|
/// newlines. The parser supports the full format of the <c>gamecontrollerdb.txt</c> source file including
|
|
/// empty lines and comments.
|
|
/// <para>
|
|
/// See <see href="https://www.glfw.org/docs/latest/input_guide.html#gamepad_mapping">Gamepad mappings</see>
|
|
/// for a description of the format.
|
|
/// </para>
|
|
/// <para>
|
|
/// If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the
|
|
/// one passed to this function. If the library is terminated and re-initialized the internal list will
|
|
/// revert to the built-in default.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidValue"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="JoystickIsGamepad"/>
|
|
/// <seealso cref="GetGamepadName"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#gamepad">Gamepad input</seealso>
|
|
public static bool UpdateGamepadMappings(string mappings) =>
|
|
PInvoke.UpdateGamepadMappings(mappings) == GLFW_TRUE;
|
|
|
|
/// <summary>
|
|
/// Returns the human-readable gamepad name for the specified joystick.
|
|
/// </summary>
|
|
/// <param name="gamepadId">The joystick ID to query.</param>
|
|
/// <returns>The name of the gamepad, or null if the joystick is not present, or does not have a
|
|
/// gamepad mapping or an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the human-readable name of the gamepad from the gamepad mapping assigned to the
|
|
/// specified joystick. If the specified joystick is not present or does not have a gamepad mapping this
|
|
/// function will return null but will not generate an error. Call <see cref="JoystickPresent"/> to check
|
|
/// whether it is present regardless of whether it has a mapping.
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function must only be called from the main thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="JoystickIsGamepad"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#gamepad">Gamepad input</seealso>
|
|
public static string? GetGamepadName(int gamepadId) => PInvoke.GetGamepadName(gamepadId);
|
|
|
|
/// <summary>
|
|
/// Retrieves the state of the specified joystick remapped as a gamepad.
|
|
/// </summary>
|
|
/// <param name="gamepadId">The joystick ID to query.</param>
|
|
/// <param name="state">The gamepad state to fill.</param>
|
|
/// <returns><c>true</c> if successful, or <c>false</c> if the joystick is not present, it does not
|
|
/// have a gamepad mapping or an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function retrieves the state of the specified joystick remapped to an Xbox-like gamepad.
|
|
/// <para>
|
|
/// If the specified joystick is not present or does not have a gamepad mapping this function will return
|
|
/// <c>false</c> but will not generate an error. Call <see cref="JoystickPresent"/> to check whether it is
|
|
/// present regardless of whether it has a mapping.
|
|
/// </para>
|
|
/// <para>
|
|
/// The Guide button may not be available for input as it is often hooked by the system or the Steam client.
|
|
/// </para>
|
|
/// <para>
|
|
/// Not all devices have all the buttons or axes provided by <see cref="GlfwGamepadState"/>. Unavailable
|
|
/// buttons and axes will always report <see cref="GlfwButtonAction.Release"/> and <c>0.0</c> respectively.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidEnum"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="UpdateGamepadMappings"/>
|
|
/// <seealso cref="JoystickIsGamepad"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#gamepad">Gamepad input</seealso>
|
|
public static bool GetGamepadState(int gamepadId, out GlfwGamepadState state)
|
|
{
|
|
state = default;
|
|
return PInvoke.GetGamepadState(gamepadId, out state) == GLFW_TRUE;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the GLFW time.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This function sets the current GLFW time, in seconds. The value must be a positive finite number less than
|
|
/// or equal to <c>18446744073.0</c>, which is approximately <c>584.5</c> years.
|
|
/// <para>
|
|
/// This function and <see cref="Time"/> are helper functions on top of <see cref="GetTimerFrequency"/> and
|
|
/// <see cref="GetTimerValue"/>.
|
|
/// </para>
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread. Reading and writing of the internal base time is not atomic,
|
|
/// so it needs to be externally synchronized with calls to <see cref="Time"/>.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/> <see cref="GlfwErrorCode.InvalidValue"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#time">Time input</seealso>
|
|
public static void SetTime(double time) => PInvoke.SetTime(time);
|
|
|
|
/// <summary>
|
|
/// Returns the current value of the raw timer.
|
|
/// </summary>
|
|
/// <returns>The value of the timer, or zero if an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the current value of the raw timer, measured in 1 / frequency seconds. To get the
|
|
/// frequency, call <see cref="GetTimerFrequency"/>.
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
|
/// </possibleErrors>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#time">Time input</seealso>
|
|
public static ulong GetTimerValue() => PInvoke.GetTimerValue();
|
|
|
|
/// <summary>
|
|
/// Returns the frequency, in Hz, of the raw timer.
|
|
/// </summary>
|
|
/// <returns>The frequency of the timer, in Hz, or zero if an error occurred.</returns>
|
|
/// <remarks>
|
|
/// This function returns the frequency, in Hz, of the raw timer.
|
|
/// </remarks>
|
|
/// <threadSafety>
|
|
/// This function may be called from any thread.
|
|
/// </threadSafety>
|
|
/// <possibleErrors>
|
|
/// <see cref="GlfwErrorCode.NotInitialized"/>
|
|
/// </possibleErrors>
|
|
/// <seealso cref="GetTimerValue"/>
|
|
/// <seealso href="https://www.glfw.org/docs/latest/input_guide.html#time">Time input</seealso>
|
|
public static ulong GetTimerFrequency() => PInvoke.GetTimerFrequency();
|
|
}
|
|
}
|