updated generation with proper enum values
This commit is contained in:
parent
4d598067f3
commit
460e012847
|
|
@ -1 +1,2 @@
|
||||||
*tmp/
|
*tmp/
|
||||||
|
*archive/
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,47 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -227,17 +227,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventGamepadSteamHandleUpdated, //Gamepad Steam handle has changed
|
eventGamepadSteamHandleUpdated, //Gamepad Steam handle has changed
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -245,17 +245,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -474,8 +474,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -484,14 +484,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -516,7 +516,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -524,13 +524,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -539,7 +539,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -553,17 +553,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventGamepadSteamHandleUpdated, //Gamepad Steam handle has changed
|
eventGamepadSteamHandleUpdated, //Gamepad Steam handle has changed
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -571,17 +571,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -619,7 +619,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -652,76 +652,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -43,32 +43,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
const std = @import("std");
|
||||||
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
|
pub const TouchID = u64;
|
||||||
|
|
||||||
|
pub const FingerID = u64;
|
||||||
|
|
||||||
|
pub const TouchDeviceType = enum(c_int) {
|
||||||
|
touchDeviceDirect,
|
||||||
|
touchDeviceIndirectAbsolute,
|
||||||
|
touchDeviceIndirectRelative /* trackpad with screen cursor-relative coordinates */,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const Finger = extern struct {
|
||||||
|
id: FingerID, // the finger ID
|
||||||
|
x: f32, // the x-axis location of the touch event, normalized (0...1)
|
||||||
|
y: f32, // the y-axis location of the touch event, normalized (0...1)
|
||||||
|
pressure: f32, // the quantity of pressure applied, normalized (0...1)
|
||||||
|
};
|
||||||
|
|
||||||
|
pub inline fn getTouchDevices(count: *c_int) ?*TouchID {
|
||||||
|
return c.SDL_GetTouchDevices(@ptrCast(count));
|
||||||
|
}
|
||||||
|
|
||||||
|
pub inline fn getTouchDeviceName(touchID: TouchID) [*c]const u8 {
|
||||||
|
return c.SDL_GetTouchDeviceName(touchID);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub inline fn getTouchDeviceType(touchID: TouchID) TouchDeviceType {
|
||||||
|
return @intFromEnum(c.SDL_GetTouchDeviceType(touchID));
|
||||||
|
}
|
||||||
|
|
||||||
|
pub inline fn getTouchFingers(touchID: TouchID, count: *c_int) [*c][*c]Finger {
|
||||||
|
return c.SDL_GetTouchFingers(touchID, @ptrCast(count));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,47 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -524,7 +524,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -580,17 +580,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -628,7 +628,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -43,32 +43,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,47 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -524,7 +524,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -580,17 +580,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -628,7 +628,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -43,32 +43,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,47 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -524,7 +524,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -580,17 +580,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -628,7 +628,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -43,32 +43,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,47 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -524,7 +524,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -580,17 +580,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -628,7 +628,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -43,32 +43,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,47 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -524,7 +524,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -580,17 +580,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -628,7 +628,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -43,32 +43,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,47 +2,48 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,99 +58,100 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,16 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -483,8 +483,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -493,14 +493,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -525,7 +525,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -533,13 +533,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -548,7 +548,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -563,17 +563,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -581,17 +581,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -629,7 +629,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -662,76 +662,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,16 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -44,32 +44,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,16 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
|
|
@ -2,47 +2,48 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Surface = opaque {};
|
pub const Surface = opaque {};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TouchID = u64;
|
pub const TouchID = u64;
|
||||||
|
|
@ -127,7 +127,7 @@ pub const MouseWheelDirection = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -148,8 +148,8 @@ pub const JoystickID = u32;
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -190,7 +190,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -246,17 +246,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommonEvent = extern struct {
|
pub const CommonEvent = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub const IOStream = opaque {
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -33,7 +33,7 @@ pub const SensorType = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
@ -19,7 +19,7 @@ pub const GUID = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
|
||||||
|
|
@ -58,99 +58,100 @@ pub const PackedLayout = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorRange = enum(c_int) {
|
pub const ColorRange = enum(c_int) {
|
||||||
colorRangeLimited, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
|
||||||
colorRangeFull,
|
colorRangeFull = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ColorPrimaries = enum(c_int) {
|
pub const ColorPrimaries = enum(c_int) {
|
||||||
colorPrimariesBt709, //ITU-R BT.709-6
|
colorPrimariesBt709 = 1, //ITU-R BT.709-6
|
||||||
colorPrimariesBt470m, //ITU-R BT.470-6 System M
|
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
|
||||||
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
|
||||||
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
|
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
|
||||||
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
|
||||||
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
|
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
|
||||||
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
|
||||||
colorPrimariesXyz, //SMPTE ST 428-1
|
colorPrimariesXyz = 10, //SMPTE ST 428-1
|
||||||
colorPrimariesSmpte431, //SMPTE RP 431-2
|
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
|
||||||
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
|
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
|
||||||
colorPrimariesEbu3213, //EBU Tech. 3213-E
|
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TransferCharacteristics = enum(c_int) {
|
pub const TransferCharacteristics = enum(c_int) {
|
||||||
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
|
||||||
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
|
||||||
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
|
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
|
||||||
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
|
||||||
transferCharacteristicsSmpte240, //SMPTE ST 240M
|
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
|
||||||
transferCharacteristicsIec61966, //IEC 61966-2-4
|
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
|
||||||
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
|
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
|
||||||
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
|
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
|
||||||
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
|
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
|
||||||
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
|
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
|
||||||
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
|
||||||
transferCharacteristicsSmpte428, //SMPTE ST 428-1
|
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
|
||||||
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MatrixCoefficients = enum(c_int) {
|
pub const MatrixCoefficients = enum(c_int) {
|
||||||
matrixCoefficientsBt709, //ITU-R BT.709-6
|
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
|
||||||
matrixCoefficientsFcc, //US FCC Title 47
|
matrixCoefficientsFcc = 4, //US FCC Title 47
|
||||||
matrixCoefficientsBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
matrixCoefficientsBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601
|
||||||
matrixCoefficientsBt601, //ITU-R BT.601-7 525
|
matrixCoefficientsBt601 = 6, //ITU-R BT.601-7 525
|
||||||
matrixCoefficientsSmpte240, //SMPTE 240M
|
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
|
||||||
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
|
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
|
||||||
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
|
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
|
||||||
matrixCoefficientsSmpte2085, //SMPTE ST 2085
|
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
|
||||||
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
|
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ChromaLocation = enum(c_int) {
|
pub const ChromaLocation = enum(c_int) {
|
||||||
chromaLocationNone, //RGB, no chroma sampling
|
chromaLocationNone = 0, //RGB, no chroma sampling
|
||||||
chromaLocationLeft, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
chromaLocationLeft = 1, //In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
|
||||||
chromaLocationCenter, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
chromaLocationCenter = 2, //In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.
|
||||||
chromaLocationTopleft,
|
chromaLocationTopleft = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,16 @@ pub const FPoint = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const FColor = extern struct {
|
pub const FColor = extern struct {
|
||||||
|
|
@ -483,8 +483,8 @@ pub const TextInputEvent = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EventType = enum(c_int) {
|
pub const EventType = enum(c_int) {
|
||||||
eventFirst, //Unused (do not remove)
|
eventFirst = 0, //Unused (do not remove)
|
||||||
eventQuit, //User-requested quit
|
eventQuit = 0x100, //User-requested quit
|
||||||
eventTerminating,
|
eventTerminating,
|
||||||
eventLowMemory,
|
eventLowMemory,
|
||||||
eventWillEnterBackground,
|
eventWillEnterBackground,
|
||||||
|
|
@ -493,14 +493,14 @@ pub const EventType = enum(c_int) {
|
||||||
eventDidEnterForeground,
|
eventDidEnterForeground,
|
||||||
eventLocaleChanged, //The user's locale preferences have changed.
|
eventLocaleChanged, //The user's locale preferences have changed.
|
||||||
eventSystemThemeChanged, //The system theme changed
|
eventSystemThemeChanged, //The system theme changed
|
||||||
eventDisplayOrientation, //Display orientation has changed to data1
|
eventDisplayOrientation = 0x151, //Display orientation has changed to data1
|
||||||
eventDisplayAdded, //Display has been added to the system
|
eventDisplayAdded, //Display has been added to the system
|
||||||
eventDisplayRemoved, //Display has been removed from the system
|
eventDisplayRemoved, //Display has been removed from the system
|
||||||
eventDisplayMoved, //Display has changed position
|
eventDisplayMoved, //Display has changed position
|
||||||
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
eventDisplayDesktopModeChanged, //Display has changed desktop mode
|
||||||
eventDisplayCurrentModeChanged, //Display has changed current mode
|
eventDisplayCurrentModeChanged, //Display has changed current mode
|
||||||
eventDisplayContentScaleChanged, //Display has changed content scale
|
eventDisplayContentScaleChanged, //Display has changed content scale
|
||||||
eventWindowShown, //Window has been shown
|
eventWindowShown = 0x202, //Window has been shown
|
||||||
eventWindowHidden, //Window has been hidden
|
eventWindowHidden, //Window has been hidden
|
||||||
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
eventWindowExposed, //Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
|
||||||
eventWindowMoved, //Window has been moved to data1, data2
|
eventWindowMoved, //Window has been moved to data1, data2
|
||||||
|
|
@ -525,7 +525,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
eventWindowLeaveFullscreen, //The window has left fullscreen mode
|
||||||
eventWindowDestroyed,
|
eventWindowDestroyed,
|
||||||
eventWindowHdrStateChanged, //Window HDR properties have changed
|
eventWindowHdrStateChanged, //Window HDR properties have changed
|
||||||
eventKeyDown, //Key pressed
|
eventKeyDown = 0x300, //Key pressed
|
||||||
eventKeyUp, //Key released
|
eventKeyUp, //Key released
|
||||||
eventTextEditing, //Keyboard text editing (composition)
|
eventTextEditing, //Keyboard text editing (composition)
|
||||||
eventTextInput, //Keyboard text input
|
eventTextInput, //Keyboard text input
|
||||||
|
|
@ -533,13 +533,13 @@ pub const EventType = enum(c_int) {
|
||||||
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
eventKeyboardAdded, //A new keyboard has been inserted into the system
|
||||||
eventKeyboardRemoved, //A keyboard has been removed
|
eventKeyboardRemoved, //A keyboard has been removed
|
||||||
eventTextEditingCandidates, //Keyboard text editing candidates
|
eventTextEditingCandidates, //Keyboard text editing candidates
|
||||||
eventMouseMotion, //Mouse moved
|
eventMouseMotion = 0x400, //Mouse moved
|
||||||
eventMouseButtonDown, //Mouse button pressed
|
eventMouseButtonDown, //Mouse button pressed
|
||||||
eventMouseButtonUp, //Mouse button released
|
eventMouseButtonUp, //Mouse button released
|
||||||
eventMouseWheel, //Mouse wheel motion
|
eventMouseWheel, //Mouse wheel motion
|
||||||
eventMouseAdded, //A new mouse has been inserted into the system
|
eventMouseAdded, //A new mouse has been inserted into the system
|
||||||
eventMouseRemoved, //A mouse has been removed
|
eventMouseRemoved, //A mouse has been removed
|
||||||
eventJoystickAxisMotion, //Joystick axis motion
|
eventJoystickAxisMotion = 0x600, //Joystick axis motion
|
||||||
eventJoystickBallMotion, //Joystick trackball motion
|
eventJoystickBallMotion, //Joystick trackball motion
|
||||||
eventJoystickHatMotion, //Joystick hat position change
|
eventJoystickHatMotion, //Joystick hat position change
|
||||||
eventJoystickButtonDown, //Joystick button pressed
|
eventJoystickButtonDown, //Joystick button pressed
|
||||||
|
|
@ -548,7 +548,7 @@ pub const EventType = enum(c_int) {
|
||||||
eventJoystickRemoved, //An opened joystick has been removed
|
eventJoystickRemoved, //An opened joystick has been removed
|
||||||
eventJoystickBatteryUpdated, //Joystick battery level change
|
eventJoystickBatteryUpdated, //Joystick battery level change
|
||||||
eventJoystickUpdateComplete, //Joystick update is complete
|
eventJoystickUpdateComplete, //Joystick update is complete
|
||||||
eventGamepadAxisMotion, //Gamepad axis motion
|
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
|
||||||
eventGamepadButtonDown, //Gamepad button pressed
|
eventGamepadButtonDown, //Gamepad button pressed
|
||||||
eventGamepadButtonUp, //Gamepad button released
|
eventGamepadButtonUp, //Gamepad button released
|
||||||
eventGamepadAdded, //A new gamepad has been inserted into the system
|
eventGamepadAdded, //A new gamepad has been inserted into the system
|
||||||
|
|
@ -563,17 +563,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventFingerUp,
|
eventFingerUp,
|
||||||
eventFingerMotion,
|
eventFingerMotion,
|
||||||
eventFingerCanceled,
|
eventFingerCanceled,
|
||||||
eventClipboardUpdate, //The clipboard or primary selection changed
|
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
|
||||||
eventDropFile, //The system requests a file open
|
eventDropFile = 0x1000, //The system requests a file open
|
||||||
eventDropText, //text/plain drag-and-drop event
|
eventDropText, //text/plain drag-and-drop event
|
||||||
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
eventDropBegin, //A new set of drops is beginning (NULL filename)
|
||||||
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
eventDropComplete, //Current set of drops is now complete (NULL filename)
|
||||||
eventDropPosition, //Position while moving over the window
|
eventDropPosition, //Position while moving over the window
|
||||||
eventAudioDeviceAdded, //A new audio device is available
|
eventAudioDeviceAdded = 0x1100, //A new audio device is available
|
||||||
eventAudioDeviceRemoved, //An audio device has been removed.
|
eventAudioDeviceRemoved, //An audio device has been removed.
|
||||||
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
|
||||||
eventSensorUpdate, //A sensor was updated
|
eventSensorUpdate = 0x1200, //A sensor was updated
|
||||||
eventPenProximityIn, //Pressure-sensitive pen has become available
|
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
|
||||||
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
|
||||||
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
eventPenDown, //Pressure-sensitive pen touched drawing surface
|
||||||
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
eventPenUp, //Pressure-sensitive pen stopped touching drawing surface
|
||||||
|
|
@ -581,17 +581,17 @@ pub const EventType = enum(c_int) {
|
||||||
eventPenButtonUp, //Pressure-sensitive pen button released
|
eventPenButtonUp, //Pressure-sensitive pen button released
|
||||||
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
|
||||||
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
eventPenAxis, //Pressure-sensitive pen angle/pressure/etc changed
|
||||||
eventCameraDeviceAdded, //A new camera device is available
|
eventCameraDeviceAdded = 0x1400, //A new camera device is available
|
||||||
eventCameraDeviceRemoved, //A camera device has been removed.
|
eventCameraDeviceRemoved, //A camera device has been removed.
|
||||||
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
eventCameraDeviceApproved, //A camera device has been approved for use by the user.
|
||||||
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
eventCameraDeviceDenied, //A camera device has been denied for use by the user.
|
||||||
eventRenderTargetsReset, //The render targets have been reset and their contents need to be updated
|
eventRenderTargetsReset = 0x2000, //The render targets have been reset and their contents need to be updated
|
||||||
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
eventRenderDeviceReset, //The device has been reset and all textures need to be recreated
|
||||||
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
eventRenderDeviceLost, //The device has been lost and can't be recovered.
|
||||||
eventPrivate1,
|
eventPrivate1,
|
||||||
eventPrivate2,
|
eventPrivate2,
|
||||||
eventPrivate3,
|
eventPrivate3,
|
||||||
eventPollSentinel, //Signals the end of an event poll cycle
|
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const JoystickID = u32;
|
pub const JoystickID = u32;
|
||||||
|
|
@ -629,7 +629,7 @@ pub const CameraID = u32;
|
||||||
pub const KeyboardID = u32;
|
pub const KeyboardID = u32;
|
||||||
|
|
||||||
pub const PowerState = enum(c_int) {
|
pub const PowerState = enum(c_int) {
|
||||||
powerstateError, //error determining power status
|
powerstateError = -1, //error determining power status
|
||||||
powerstateUnknown, //cannot determine power status
|
powerstateUnknown, //cannot determine power status
|
||||||
powerstateOnBattery, //Not plugged in, running on the battery
|
powerstateOnBattery, //Not plugged in, running on the battery
|
||||||
powerstateNoBattery, //Plugged in, no battery available
|
powerstateNoBattery, //Plugged in, no battery available
|
||||||
|
|
@ -662,76 +662,76 @@ pub const PenAxis = enum(c_int) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Scancode = enum(c_int) {
|
pub const Scancode = enum(c_int) {
|
||||||
scancodeBackslash,
|
scancodeBackslash = 49,
|
||||||
scancodeNonushash,
|
scancodeNonushash = 50,
|
||||||
scancodeGrave,
|
scancodeGrave = 53,
|
||||||
scancodeInsert,
|
scancodeInsert = 73,
|
||||||
scancodeNumlockclear,
|
scancodeNumlockclear = 83,
|
||||||
scancodeNonusbackslash,
|
scancodeNonusbackslash = 100,
|
||||||
scancodeApplication, //windows contextual menu, compose
|
scancodeApplication = 101, //windows contextual menu, compose
|
||||||
scancodePower,
|
scancodePower = 102,
|
||||||
scancodeHelp, //AL Integrated Help Center
|
scancodeHelp = 117, //AL Integrated Help Center
|
||||||
scancodeMenu, //Menu (show menu)
|
scancodeMenu = 118, //Menu (show menu)
|
||||||
scancodeStop, //AC Stop
|
scancodeStop = 120, //AC Stop
|
||||||
scancodeAgain, //AC Redo/Repeat
|
scancodeAgain = 121, //AC Redo/Repeat
|
||||||
scancodeUndo, //AC Undo
|
scancodeUndo = 122, //AC Undo
|
||||||
scancodeCut, //AC Cut
|
scancodeCut = 123, //AC Cut
|
||||||
scancodeCopy, //AC Copy
|
scancodeCopy = 124, //AC Copy
|
||||||
scancodePaste, //AC Paste
|
scancodePaste = 125, //AC Paste
|
||||||
scancodeFind, //AC Find
|
scancodeFind = 126, //AC Find
|
||||||
scancodeInternational1,
|
scancodeInternational1 = 135,
|
||||||
scancodeInternational3, //Yen
|
scancodeInternational3 = 137, //Yen
|
||||||
scancodeLang1, //Hangul/English toggle
|
scancodeLang1 = 144, //Hangul/English toggle
|
||||||
scancodeLang2, //Hanja conversion
|
scancodeLang2 = 145, //Hanja conversion
|
||||||
scancodeLang3, //Katakana
|
scancodeLang3 = 146, //Katakana
|
||||||
scancodeLang4, //Hiragana
|
scancodeLang4 = 147, //Hiragana
|
||||||
scancodeLang5, //Zenkaku/Hankaku
|
scancodeLang5 = 148, //Zenkaku/Hankaku
|
||||||
scancodeLang6, //reserved
|
scancodeLang6 = 149, //reserved
|
||||||
scancodeLang7, //reserved
|
scancodeLang7 = 150, //reserved
|
||||||
scancodeLang8, //reserved
|
scancodeLang8 = 151, //reserved
|
||||||
scancodeLang9, //reserved
|
scancodeLang9 = 152, //reserved
|
||||||
scancodeAlterase, //Erase-Eaze
|
scancodeAlterase = 153, //Erase-Eaze
|
||||||
scancodeCancel, //AC Cancel
|
scancodeCancel = 155, //AC Cancel
|
||||||
scancodeLalt, //alt, option
|
scancodeLalt = 226, //alt, option
|
||||||
scancodeLgui, //windows, command (apple), meta
|
scancodeLgui = 227, //windows, command (apple), meta
|
||||||
scancodeRalt, //alt gr, option
|
scancodeRalt = 230, //alt gr, option
|
||||||
scancodeRgui, //windows, command (apple), meta
|
scancodeRgui = 231, //windows, command (apple), meta
|
||||||
scancodeMode,
|
scancodeMode = 257,
|
||||||
scancodeSleep, //Sleep
|
scancodeSleep = 258, //Sleep
|
||||||
scancodeWake, //Wake
|
scancodeWake = 259, //Wake
|
||||||
scancodeChannelIncrement, //Channel Increment
|
scancodeChannelIncrement = 260, //Channel Increment
|
||||||
scancodeChannelDecrement, //Channel Decrement
|
scancodeChannelDecrement = 261, //Channel Decrement
|
||||||
scancodeMediaPlay, //Play
|
scancodeMediaPlay = 262, //Play
|
||||||
scancodeMediaPause, //Pause
|
scancodeMediaPause = 263, //Pause
|
||||||
scancodeMediaRecord, //Record
|
scancodeMediaRecord = 264, //Record
|
||||||
scancodeMediaFastForward, //Fast Forward
|
scancodeMediaFastForward = 265, //Fast Forward
|
||||||
scancodeMediaRewind, //Rewind
|
scancodeMediaRewind = 266, //Rewind
|
||||||
scancodeMediaNextTrack, //Next Track
|
scancodeMediaNextTrack = 267, //Next Track
|
||||||
scancodeMediaPreviousTrack, //Previous Track
|
scancodeMediaPreviousTrack = 268, //Previous Track
|
||||||
scancodeMediaStop, //Stop
|
scancodeMediaStop = 269, //Stop
|
||||||
scancodeMediaEject, //Eject
|
scancodeMediaEject = 270, //Eject
|
||||||
scancodeMediaPlayPause, //Play / Pause
|
scancodeMediaPlayPause = 271, //Play / Pause
|
||||||
scancodeMediaSelect,
|
scancodeMediaSelect = 272,
|
||||||
scancodeAcNew, //AC New
|
scancodeAcNew = 273, //AC New
|
||||||
scancodeAcOpen, //AC Open
|
scancodeAcOpen = 274, //AC Open
|
||||||
scancodeAcClose, //AC Close
|
scancodeAcClose = 275, //AC Close
|
||||||
scancodeAcExit, //AC Exit
|
scancodeAcExit = 276, //AC Exit
|
||||||
scancodeAcSave, //AC Save
|
scancodeAcSave = 277, //AC Save
|
||||||
scancodeAcPrint, //AC Print
|
scancodeAcPrint = 278, //AC Print
|
||||||
scancodeAcProperties, //AC Properties
|
scancodeAcProperties = 279, //AC Properties
|
||||||
scancodeAcSearch, //AC Search
|
scancodeAcSearch = 280, //AC Search
|
||||||
scancodeAcHome, //AC Home
|
scancodeAcHome = 281, //AC Home
|
||||||
scancodeAcBack, //AC Back
|
scancodeAcBack = 282, //AC Back
|
||||||
scancodeAcForward, //AC Forward
|
scancodeAcForward = 283, //AC Forward
|
||||||
scancodeAcStop, //AC Stop
|
scancodeAcStop = 284, //AC Stop
|
||||||
scancodeAcRefresh, //AC Refresh
|
scancodeAcRefresh = 285, //AC Refresh
|
||||||
scancodeAcBookmarks, //AC Bookmarks
|
scancodeAcBookmarks = 286, //AC Bookmarks
|
||||||
scancodeSoftleft,
|
scancodeSoftleft = 287,
|
||||||
scancodeSoftright,
|
scancodeSoftright = 288,
|
||||||
scancodeCall, //Used for accepting phone calls.
|
scancodeCall = 289, //Used for accepting phone calls.
|
||||||
scancodeEndcall, //Used for rejecting phone calls.
|
scancodeEndcall = 290, //Used for rejecting phone calls.
|
||||||
scancodeReserved, //400-500 reserved for dynamic keycodes
|
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
|
||||||
scancodeCount,
|
scancodeCount = 512,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Keymod = u16;
|
pub const Keymod = u16;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub const Sensor = opaque {
|
||||||
pub const SensorID = u32;
|
pub const SensorID = u32;
|
||||||
|
|
||||||
pub const SensorType = enum(c_int) {
|
pub const SensorType = enum(c_int) {
|
||||||
sensorInvalid, //Returned for an invalid sensor
|
sensorInvalid = -1, //Returned for an invalid sensor
|
||||||
sensorUnknown, //Unknown sensor type
|
sensorUnknown, //Unknown sensor type
|
||||||
sensorAccel, //Accelerometer
|
sensorAccel, //Accelerometer
|
||||||
sensorGyro, //Gyroscope
|
sensorGyro, //Gyroscope
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,16 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
@ -44,32 +44,33 @@ pub const Color = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Colorspace = enum(c_int) {
|
pub const Colorspace = enum(c_int) {
|
||||||
colorspaceSrgb, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
colorspaceSrgb = 0x120005a0, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
|
||||||
colorRangeFull,
|
colorRangeFull,
|
||||||
colorPrimariesBt709,
|
colorPrimariesBt709,
|
||||||
transferCharacteristicsSrgb,
|
transferCharacteristicsSrgb,
|
||||||
matrixCoefficientsIdentity,
|
matrixCoefficientsIdentity,
|
||||||
colorspaceSrgbLinear, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
colorspaceSrgbLinear = 0x12000500, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
|
||||||
transferCharacteristicsLinear,
|
transferCharacteristicsLinear,
|
||||||
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
|
||||||
colorPrimariesBt2020,
|
colorPrimariesBt2020,
|
||||||
transferCharacteristicsPq,
|
transferCharacteristicsPq,
|
||||||
colorspaceJpeg, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
colorspaceJpeg = 0x220004c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
|
||||||
transferCharacteristicsBt601,
|
transferCharacteristicsBt601,
|
||||||
matrixCoefficientsBt601,
|
matrixCoefficientsBt601,
|
||||||
colorspaceBt601Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Limited = 0x211018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorRangeLimited,
|
colorRangeLimited,
|
||||||
colorPrimariesBt601,
|
colorPrimariesBt601,
|
||||||
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
|
||||||
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
transferCharacteristicsBt709,
|
transferCharacteristicsBt709,
|
||||||
matrixCoefficientsBt709,
|
matrixCoefficientsBt709,
|
||||||
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
|
||||||
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
|
||||||
matrixCoefficientsBt2020Ncl,
|
matrixCoefficientsBt2020Ncl,
|
||||||
colorspaceBt2020Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
|
||||||
colorspaceRgbDefault, //The default colorspace for RGB surfaces if no colorspace is specified
|
|
||||||
colorspaceYuvDefault, //The default colorspace for YUV surfaces if no colorspace is specified
|
pub const colorspaceRgbDefault = .colorspaceSrgb; //The default colorspace for RGB surfaces if no colorspace is specified
|
||||||
|
pub const colorspaceYuvDefault = .colorspaceJpeg; //The default colorspace for YUV surfaces if no colorspace is specified
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const PropertiesID = u32;
|
pub const PropertiesID = u32;
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ pub const DateTime = extern struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const DateFormat = enum(c_int) {
|
pub const DateFormat = enum(c_int) {
|
||||||
dateFormatYyyymmdd, //Year/Month/Day
|
dateFormatYyyymmdd = 0, //Year/Month/Day
|
||||||
dateFormatDdmmyyyy, //Day/Month/Year
|
dateFormatDdmmyyyy = 1, //Day/Month/Year
|
||||||
dateFormatMmddyyyy, //Month/Day/Year
|
dateFormatMmddyyyy = 2, //Month/Day/Year
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TimeFormat = enum(c_int) {
|
pub const TimeFormat = enum(c_int) {
|
||||||
timeFormat24hr, //24 hour time
|
timeFormat24hr = 0, //24 hour time
|
||||||
timeFormat12hr, //12 hour time
|
timeFormat12hr = 1, //12 hour time
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,16 @@ const std = @import("std");
|
||||||
pub const c = @import("c.zig").c;
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const PixelFormat = enum(c_int) {
|
pub const PixelFormat = enum(c_int) {
|
||||||
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
|
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
|
||||||
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
|
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
|
||||||
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
|
||||||
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
|
||||||
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
|
||||||
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
|
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
|
||||||
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
|
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
|
||||||
pixelformatExternalOes, //Android video texture format
|
pixelformatExternalOes = 0x2053454f, //Android video texture format
|
||||||
pixelformatMjpg, //Motion JPEG
|
pixelformatMjpg = 0x47504a4d, //Motion JPEG
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@ pub const IOStream = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioFormat = enum(c_int) {
|
pub const AudioFormat = enum(c_int) {
|
||||||
audioUnknown, //Unspecified audio format
|
audioUnknown = 0x0000, //Unspecified audio format
|
||||||
audioU8, //Unsigned 8-bit samples
|
audioU8 = 0x0008, //Unsigned 8-bit samples
|
||||||
audioS8, //Signed 8-bit samples
|
audioS8 = 0x8008, //Signed 8-bit samples
|
||||||
audioS16le, //Signed 16-bit samples
|
audioS16le = 0x8010, //Signed 16-bit samples
|
||||||
audioS16be, //As above, but big-endian byte order
|
audioS16be = 0x9010, //As above, but big-endian byte order
|
||||||
audioS32le, //32-bit integer samples
|
audioS32le = 0x8020, //32-bit integer samples
|
||||||
audioS32be, //As above, but big-endian byte order
|
audioS32be = 0x9020, //As above, but big-endian byte order
|
||||||
audioF32le, //32-bit floating point samples
|
audioF32le = 0x8120, //32-bit floating point samples
|
||||||
audioF32be, //As above, but big-endian byte order
|
audioF32be = 0x9120, //As above, but big-endian byte order
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const AudioDeviceID = u32;
|
pub const AudioDeviceID = u32;
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
|
||||||
pub const BlendMode = u32;
|
pub const BlendMode = u32;
|
||||||
|
|
||||||
pub const BlendOperation = enum(c_int) {
|
pub const BlendOperation = enum(c_int) {
|
||||||
blendoperationAdd, //dst + src: supported by all renderers
|
blendoperationAdd = 0x1, //dst + src: supported by all renderers
|
||||||
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
|
||||||
blendoperationMaximum,
|
blendoperationMaximum = 0x5,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(c_int) {
|
pub const BlendFactor = enum(c_int) {
|
||||||
blendfactorZero, //0, 0, 0, 0
|
blendfactorZero = 0x1, //0, 0, 0, 0
|
||||||
blendfactorOne, //1, 1, 1, 1
|
blendfactorOne = 0x2, //1, 1, 1, 1
|
||||||
blendfactorSrcColor, //srcR, srcG, srcB, srcA
|
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
|
||||||
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
|
||||||
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
|
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
|
||||||
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
|
||||||
blendfactorDstColor, //dstR, dstG, dstB, dstA
|
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
|
||||||
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
|
||||||
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
|
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
|
||||||
blendfactorOneMinusDstAlpha,
|
blendfactorOneMinusDstAlpha = 0xA,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue