use bitmask_enum::bitmask;
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum MouseButton {
Left,
Right,
Middle,
Side,
Extra,
Forward,
Back,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum MouseCursor {
Default,
Arrow,
Ibeam,
Crosshair,
PointingHand,
ResizeEW,
ResizeNS,
ResizeNWSE,
ResizeNESW,
ResizeAll,
NotAllowed,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GamepadButton {
UNKNOWN = 0,
LeftFaceUp,
LeftFaceRight,
LeftFaceDown,
LeftFaceLeft,
RightFaceUp,
RightFaceRight,
RightFaceDown,
RightFaceLeft,
LeftTrigger1,
LeftTrigger2,
RightTrigger1,
RightTrigger2,
MiddleLeft,
Middle,
MiddleRight,
LeftThumb,
RightThumb,
}
impl From<i32> for GamepadButton {
fn from(value: i32) -> Self {
unsafe { std::mem::transmute(value) }
}
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GamepadAxis {
LeftX,
LeftY,
RightX,
RightY,
TriggerLeft,
TriggerRight,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum MaterialMap {
Albedo,
Metalness,
Normal,
Roughness,
Occlusion,
Emission,
Height,
Cubemap,
Irradiance,
Prefilter,
BRDF,
}
pub const MATERIAL_MAP_DIFFUSE: MaterialMap = MaterialMap::Albedo;
pub const MATERIAL_MAP_SPECULAR: MaterialMap = MaterialMap::Metalness;
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum TextureFilter {
Point,
Bilinear,
Trilinear,
Anisotropic4X,
Anisotropic8X,
Anisotropic16X,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum TextureWrap {
Repeat,
Clamp,
MirrorRepeat,
MirrorClamp,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum FontType {
Default,
Bitmap,
SDF,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum BlendMode {
Alpha,
Additive,
Multiplied,
AddColors,
SubtractColors,
AlphaPremultiply,
Custom,
CustomSeparate,
}
#[bitmask(u32)]
pub enum Gesture {
None,
Tap,
DoubleTap,
Hold,
Drag,
SwipeRight,
SwipeLeft,
SwipeUp,
SwipeDown,
PinchIn,
PinchOut,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CameraMode {
Custom,
Free,
Orbital,
FirstPerson,
ThridPerson,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CameraProjection {
Perspective,
Orthographic,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum NPatchLayout {
NinePatch,
ThreePatchVertical,
ThreePatchHorizontal,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum TraceLogLevel {
All,
Trace,
Debug,
Info,
Warning,
Error,
Fatal,
None,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum KeyboardKey {
Null = 0,
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,
LeftBracket = 91,
Backslash = 92,
RightBracket = 93,
Grave = 96,
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,
KBMenu = 348,
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,
Back = 4,
Menu = 5,
VolumeUp = 24,
VolumeDown = 25,
}
#[bitmask(u32)]
pub enum ConfigFlag {
VsyncHint = 0x00000040,
FullscreenMode = 0x00000002,
WindowResizable = 0x00000004,
WindowUndecorated = 0x00000008,
WindowHidden = 0x00000080,
WindowMinimized = 0x00000200,
WindowMaximized = 0x00000400,
WindowUnfocused = 0x00000800,
WindowTopmost = 0x00001000,
WindowAlwaysRun = 0x00000100,
WindowTransparent = 0x00000010,
WindowHighdpi = 0x00002000,
WindowMousePassthrough = 0x00004000,
BorderlessWindowedMode = 0x00008000,
Msaa4xHint = 0x00000020,
InterlacedHint = 0x00010000,
}