using System;
using System.Numerics;
using System.Runtime.InteropServices;
namespace Raylib_cs;
///
/// Keyboard keys (US keyboard layout)
/// NOTE: Use GetKeyPressed() to allow redefining required keys for alternative layouts
///
public enum KeyboardKey
{
///
/// NULL, used for no key pressed
///
Null = 0,
// Alphanumeric keys
Apostrophe = 39,
Comma = 44,
Minus = 45,
Period = 46,
Slash = 47,
Zero = 48,
One = 49,
Two = 50,
Three = 51,
Four = 52,
Five = 53,
Six = 54,
Seven = 55,
Eight = 56,
Nine = 57,
Semicolon = 59,
Equal = 61,
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
// Function keys
Space = 32,
Escape = 256,
Enter = 257,
Tab = 258,
Backspace = 259,
Insert = 260,
Delete = 261,
Right = 262,
Left = 263,
Down = 264,
Up = 265,
PageUp = 266,
PageDown = 267,
Home = 268,
End = 269,
CapsLock = 280,
ScrollLock = 281,
NumLock = 282,
PrintScreen = 283,
Pause = 284,
F1 = 290,
F2 = 291,
F3 = 292,
F4 = 293,
F5 = 294,
F6 = 295,
F7 = 296,
F8 = 297,
F9 = 298,
F10 = 299,
F11 = 300,
F12 = 301,
LeftShift = 340,
LeftControl = 341,
LeftAlt = 342,
LeftSuper = 343,
RightShift = 344,
RightControl = 345,
RightAlt = 346,
RightSuper = 347,
KeyboardMenu = 348,
LeftBracket = 91,
Backslash = 92,
RightBracket = 93,
Grave = 96,
// Keypad keys
Kp0 = 320,
Kp1 = 321,
Kp2 = 322,
Kp3 = 323,
Kp4 = 324,
Kp5 = 325,
Kp6 = 326,
Kp7 = 327,
Kp8 = 328,
Kp9 = 329,
KpDecimal = 330,
KpDivide = 331,
KpMultiply = 332,
KpSubtract = 333,
KpAdd = 334,
KpEnter = 335,
KpEqual = 336,
// Android key buttons
Back = 4,
Menu = 5,
VolumeUp = 24,
VolumeDown = 25
}
///
/// Mouse buttons
///
public enum MouseButton
{
///
/// Mouse button left
///
Left = 0,
///
/// Mouse button right
///
Right = 1,
///
/// Mouse button middle (pressed wheel)
///
Middle = 2,
///
/// Mouse button side (advanced mouse device)
///
Side = 3,
///
/// Mouse button extra (advanced mouse device)
///
Extra = 4,
///
/// Mouse button forward (advanced mouse device)
///
Forward = 5,
///
/// Mouse button back (advanced mouse device)
///
Back = 6
}
///
/// Mouse cursor
///
public enum MouseCursor
{
///
/// Default pointer shape
///
Default = 0,
///
/// Arrow shape
///
Arrow = 1,
///
/// Text writing cursor shape
///
IBeam = 2,
///
/// Cross shape
///
Crosshair = 3,
///
/// Pointing hand cursor
///
PointingHand = 4,
///
/// Horizontal resize/move arrow shape
///
ResizeEw = 5,
///
/// Vertical resize/move arrow shape
///
ResizeNs = 6,
///
/// Top-left to bottom-right diagonal resize/move arrow shape
///
ResizeNwse = 7,
///
/// The top-right to bottom-left diagonal resize/move arrow shape
///
ResizeNesw = 8,
///
/// The omnidirectional resize/move cursor shape
///
ResizeAll = 9,
///
/// The operation-not-allowed shape
///
NotAllowed = 10
}
/// Gamepad axis
public enum GamepadAxis
{
///
/// Gamepad left stick X axis
///
LeftX = 0,
///
/// Gamepad left stick Y axis
///
LeftY = 1,
///
/// Gamepad right stick X axis
///
RightX = 2,
///
/// Gamepad right stick Y axis
///
RightY = 3,
///
/// Gamepad back trigger left, pressure level: [1..-1]
///
LeftTrigger = 4,
///
/// Gamepad back trigger right, pressure level: [1..-1]
///
RightTrigger = 5
}
///
/// Gamepad buttons
///
public enum GamepadButton
{
///
/// Unknown button, just for error checking
///
Unknown = 0,
///
/// Gamepad left DPAD up button
///
LeftFaceUp,
///
/// Gamepad left DPAD right button
///
LeftFaceRight,
///
/// Gamepad left DPAD down button
///
LeftFaceDown,
///
/// Gamepad left DPAD left button
///
LeftFaceLeft,
///
/// Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
///
RightFaceUp,
///
/// Gamepad right button right (i.e. PS3: Circle, Xbox: B)
///
RightFaceRight,
///
/// Gamepad right button down (i.e. PS3: Cross, Xbox: A)
///
RightFaceDown,
///
/// Gamepad right button left (i.e. PS3: Square, Xbox: X)
///
RightFaceLeft,
///
/// Gamepad top/back trigger left (first), it could be a trailing button
///
LeftTrigger1,
///
/// Gamepad top/back trigger left (second), it could be a trailing button
///
LeftTrigger2,
///
/// Gamepad top/back trigger right (first), it could be a trailing button
///
RightTrigger1,
///
/// Gamepad top/back trigger right (second), it could be a trailing button
///
RightTrigger2,
///
/// Gamepad center buttons, left one (i.e. PS3: Select)
///
MiddleLeft,
///
/// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
///
Middle,
///
/// Gamepad center buttons, right one (i.e. PS3: Start)
///
MiddleRight,
///
/// Gamepad joystick pressed button left
///
LeftThumb,
///
/// Gamepad joystick pressed button right
///
RightThumb
}
///
/// Gesture
/// NOTE: It could be used as flags to enable only some gestures
///
[Flags]
public enum Gesture : uint
{
None = 0,
Tap = 1,
DoubleTap = 2,
Hold = 4,
Drag = 8,
SwipeRight = 16,
SwipeLeft = 32,
SwipeUp = 64,
SwipeDown = 128,
PinchIn = 256,
PinchOut = 512
}
///
/// Head-Mounted-Display device parameters
///
[StructLayout(LayoutKind.Sequential)]
public unsafe partial struct VrDeviceInfo
{
///
/// HMD horizontal resolution in pixels
///
public int HResolution;
///
/// HMD vertical resolution in pixels
///
public int VResolution;
///
/// HMD horizontal size in meters
///
public float HScreenSize;
///
/// HMD vertical size in meters
///
public float VScreenSize;
///
/// HMD distance between eye and display in meters
///
public float EyeToScreenDistance;
///
/// HMD lens separation distance in meters
///
public float LensSeparationDistance;
///
/// HMD IPD (distance between pupils) in meters
///
public float InterpupillaryDistance;
///
/// HMD lens distortion constant parameters
///
public fixed float LensDistortionValues[4];
///
/// HMD chromatic aberration correction parameters
///
public fixed float ChromaAbCorrection[4];
}
///
/// VR Stereo rendering configuration for simulator
///
[StructLayout(LayoutKind.Sequential)]
public partial struct VrStereoConfig
{
///
/// VR projection matrices (per eye)
///
public Matrix4x4 Projection1;
///
/// VR projection matrices (per eye)
///
public Matrix4x4 Projection2;
///
/// VR view offset matrices (per eye)
///
public Matrix4x4 ViewOffset1;
///
/// VR view offset matrices (per eye)
///
public Matrix4x4 ViewOffset2;
///
/// VR left lens center
///
public Vector2 LeftLensCenter;
///
/// VR right lens center
///
public Vector2 RightLensCenter;
///
/// VR left screen center
///
public Vector2 LeftScreenCenter;
///
/// VR right screen center
///
public Vector2 RightScreenCenter;
///
/// VR distortion scale
///
public Vector2 Scale;
///
/// VR distortion scale in
///
public Vector2 ScaleIn;
}