updated generation with proper enum values

This commit is contained in:
peterino2 2026-01-26 20:39:04 -08:00
parent 4d598067f3
commit 460e012847
464 changed files with 38187 additions and 10944 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*tmp/
*archive/

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,46 +2,47 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
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
eventFingerUp,
eventFingerMotion,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,15 +7,15 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const FColor = extern struct {
@ -474,8 +474,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -484,14 +484,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -524,13 +524,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -539,7 +539,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
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
eventFingerUp,
eventFingerMotion,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -619,7 +619,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -652,76 +652,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const BlendMode = u32;
@ -43,32 +43,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Point = extern struct {

View File

@ -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));
}

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,46 +2,47 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,15 +7,15 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const FColor = extern struct {
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -628,7 +628,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const BlendMode = u32;
@ -43,32 +43,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,46 +2,47 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,15 +7,15 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const FColor = extern struct {
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -628,7 +628,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const BlendMode = u32;
@ -43,32 +43,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,46 +2,47 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,15 +7,15 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const FColor = extern struct {
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -628,7 +628,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const BlendMode = u32;
@ -43,32 +43,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,46 +2,47 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,15 +7,15 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const FColor = extern struct {
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -628,7 +628,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const BlendMode = u32;
@ -43,32 +43,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,46 +2,47 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,98 +58,99 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,15 +7,15 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const FColor = extern struct {
@ -482,8 +482,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -492,14 +492,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -532,13 +532,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -547,7 +547,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -562,17 +562,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -628,7 +628,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -661,76 +661,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const BlendMode = u32;
@ -43,32 +43,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,15 +2,15 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,47 +2,48 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,99 +58,100 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,16 +7,16 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const FColor = extern struct {
@ -483,8 +483,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -493,14 +493,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -533,13 +533,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -548,7 +548,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -563,17 +563,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -629,7 +629,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -662,76 +662,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,16 +2,16 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const BlendMode = u32;
@ -44,32 +44,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,16 +2,16 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
pub inline fn composeCustomBlendMode(srcColorFactor: BlendFactor, dstColorFactor: BlendFactor, colorOperation: BlendOperation, srcAlphaFactor: BlendFactor, dstAlphaFactor: BlendFactor, alphaOperation: BlendOperation) BlendMode {

View File

@ -2,47 +2,48 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const Surface = opaque {};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -32,76 +32,76 @@ pub const MouseButtonFlags = packed struct(u32) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const TouchID = u64;
@ -127,7 +127,7 @@ pub const MouseWheelDirection = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -148,8 +148,8 @@ pub const JoystickID = u32;
pub const Keymod = u16;
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -158,14 +158,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -198,13 +198,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -213,7 +213,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -228,17 +228,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
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 {

View File

@ -22,7 +22,7 @@ pub const IOStream = opaque {
pub const JoystickID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -33,7 +33,7 @@ pub const SensorType = 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
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -4,7 +4,7 @@ pub const c = @import("c.zig").c;
pub const PropertiesID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope
@ -19,7 +19,7 @@ pub const GUID = extern struct {
};
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available

View File

@ -58,99 +58,100 @@ pub const PackedLayout = enum(c_int) {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
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
colorRangeFull,
colorRangeLimited = 1, //Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma
colorRangeFull = 2,
};
pub const ColorPrimaries = enum(c_int) {
colorPrimariesBt709, //ITU-R BT.709-6
colorPrimariesBt470m, //ITU-R BT.470-6 System M
colorPrimariesBt470bg, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz, //SMPTE ST 428-1
colorPrimariesSmpte431, //SMPTE RP 431-2
colorPrimariesSmpte432, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213, //EBU Tech. 3213-E
colorPrimariesBt709 = 1, //ITU-R BT.709-6
colorPrimariesBt470m = 4, //ITU-R BT.470-6 System M
colorPrimariesBt470bg = 5, //ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625
colorPrimariesBt601 = 6, //ITU-R BT.601-7 525, SMPTE 170M
colorPrimariesSmpte240 = 7, //SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601
colorPrimariesGenericFilm = 8, //Generic film (color filters using Illuminant C)
colorPrimariesBt2020 = 9, //ITU-R BT.2020-2 / ITU-R BT.2100-0
colorPrimariesXyz = 10, //SMPTE ST 428-1
colorPrimariesSmpte431 = 11, //SMPTE RP 431-2
colorPrimariesSmpte432 = 12, //SMPTE EG 432-1 / DCI P3
colorPrimariesEbu3213 = 22, //EBU Tech. 3213-E
};
pub const TransferCharacteristics = enum(c_int) {
transferCharacteristicsBt709, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240, //SMPTE ST 240M
transferCharacteristicsIec61966, //IEC 61966-2-4
transferCharacteristicsBt1361, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428, //SMPTE ST 428-1
transferCharacteristicsHlg, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
transferCharacteristicsBt709 = 1, //Rec. ITU-R BT.709-6 / ITU-R BT1361
transferCharacteristicsGamma22 = 4, //ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM
transferCharacteristicsGamma28 = 5, //ITU-R BT.470-6 System B, G
transferCharacteristicsBt601 = 6, //SMPTE ST 170M / ITU-R BT.601-7 525 or 625
transferCharacteristicsSmpte240 = 7, //SMPTE ST 240M
transferCharacteristicsIec61966 = 11, //IEC 61966-2-4
transferCharacteristicsBt1361 = 12, //ITU-R BT1361 Extended Colour Gamut
transferCharacteristicsSrgb = 13, //IEC 61966-2-1 (sRGB or sYCC)
transferCharacteristicsBt202010bit = 14, //ITU-R BT2020 for 10-bit system
transferCharacteristicsBt202012bit = 15, //ITU-R BT2020 for 12-bit system
transferCharacteristicsPq = 16, //SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
transferCharacteristicsSmpte428 = 17, //SMPTE ST 428-1
transferCharacteristicsHlg = 18, //ARIB STD-B67, known as "hybrid log-gamma" (HLG)
};
pub const MatrixCoefficients = enum(c_int) {
matrixCoefficientsBt709, //ITU-R BT.709-6
matrixCoefficientsFcc, //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
matrixCoefficientsBt601, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240, //SMPTE 240M
matrixCoefficientsBt2020Ncl, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085, //SMPTE ST 2085
matrixCoefficientsIctcp, //ITU-R BT.2100-0 ICTCP
matrixCoefficientsBt709 = 1, //ITU-R BT.709-6
matrixCoefficientsFcc = 4, //US FCC Title 47
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 = 6, //ITU-R BT.601-7 525
matrixCoefficientsSmpte240 = 7, //SMPTE 240M
matrixCoefficientsBt2020Ncl = 9, //ITU-R BT.2020-2 non-constant luminance
matrixCoefficientsBt2020Cl = 10, //ITU-R BT.2020-2 constant luminance
matrixCoefficientsSmpte2085 = 11, //SMPTE ST 2085
matrixCoefficientsIctcp = 14, //ITU-R BT.2100-0 ICTCP
};
pub const ChromaLocation = enum(c_int) {
chromaLocationNone, //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.
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.
chromaLocationTopleft,
chromaLocationNone = 0, //RGB, no chroma sampling
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 = 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 = 3,
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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 {

View File

@ -7,16 +7,16 @@ pub const FPoint = extern struct {
};
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const FColor = extern struct {
@ -483,8 +483,8 @@ pub const TextInputEvent = extern struct {
};
pub const EventType = enum(c_int) {
eventFirst, //Unused (do not remove)
eventQuit, //User-requested quit
eventFirst = 0, //Unused (do not remove)
eventQuit = 0x100, //User-requested quit
eventTerminating,
eventLowMemory,
eventWillEnterBackground,
@ -493,14 +493,14 @@ pub const EventType = enum(c_int) {
eventDidEnterForeground,
eventLocaleChanged, //The user's locale preferences have 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
eventDisplayRemoved, //Display has been removed from the system
eventDisplayMoved, //Display has changed position
eventDisplayDesktopModeChanged, //Display has changed desktop mode
eventDisplayCurrentModeChanged, //Display has changed current mode
eventDisplayContentScaleChanged, //Display has changed content scale
eventWindowShown, //Window has been shown
eventWindowShown = 0x202, //Window has been shown
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
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
eventWindowDestroyed,
eventWindowHdrStateChanged, //Window HDR properties have changed
eventKeyDown, //Key pressed
eventKeyDown = 0x300, //Key pressed
eventKeyUp, //Key released
eventTextEditing, //Keyboard text editing (composition)
eventTextInput, //Keyboard text input
@ -533,13 +533,13 @@ pub const EventType = enum(c_int) {
eventKeyboardAdded, //A new keyboard has been inserted into the system
eventKeyboardRemoved, //A keyboard has been removed
eventTextEditingCandidates, //Keyboard text editing candidates
eventMouseMotion, //Mouse moved
eventMouseMotion = 0x400, //Mouse moved
eventMouseButtonDown, //Mouse button pressed
eventMouseButtonUp, //Mouse button released
eventMouseWheel, //Mouse wheel motion
eventMouseAdded, //A new mouse has been inserted into the system
eventMouseRemoved, //A mouse has been removed
eventJoystickAxisMotion, //Joystick axis motion
eventJoystickAxisMotion = 0x600, //Joystick axis motion
eventJoystickBallMotion, //Joystick trackball motion
eventJoystickHatMotion, //Joystick hat position change
eventJoystickButtonDown, //Joystick button pressed
@ -548,7 +548,7 @@ pub const EventType = enum(c_int) {
eventJoystickRemoved, //An opened joystick has been removed
eventJoystickBatteryUpdated, //Joystick battery level change
eventJoystickUpdateComplete, //Joystick update is complete
eventGamepadAxisMotion, //Gamepad axis motion
eventGamepadAxisMotion = 0x650, //Gamepad axis motion
eventGamepadButtonDown, //Gamepad button pressed
eventGamepadButtonUp, //Gamepad button released
eventGamepadAdded, //A new gamepad has been inserted into the system
@ -563,17 +563,17 @@ pub const EventType = enum(c_int) {
eventFingerUp,
eventFingerMotion,
eventFingerCanceled,
eventClipboardUpdate, //The clipboard or primary selection changed
eventDropFile, //The system requests a file open
eventClipboardUpdate = 0x900, //The clipboard or primary selection changed
eventDropFile = 0x1000, //The system requests a file open
eventDropText, //text/plain drag-and-drop event
eventDropBegin, //A new set of drops is beginning (NULL filename)
eventDropComplete, //Current set of drops is now complete (NULL filename)
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.
eventAudioDeviceFormatChanged, //An audio device's format has been changed by the system.
eventSensorUpdate, //A sensor was updated
eventPenProximityIn, //Pressure-sensitive pen has become available
eventSensorUpdate = 0x1200, //A sensor was updated
eventPenProximityIn = 0x1300, //Pressure-sensitive pen has become available
eventPenProximityOut, //Pressure-sensitive pen has become unavailable
eventPenDown, //Pressure-sensitive pen touched 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
eventPenMotion, //Pressure-sensitive pen is moving on the tablet
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.
eventCameraDeviceApproved, //A camera device has been approved 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
eventRenderDeviceLost, //The device has been lost and can't be recovered.
eventPrivate1,
eventPrivate2,
eventPrivate3,
eventPollSentinel, //Signals the end of an event poll cycle
eventPollSentinel = 0x7F00, //Signals the end of an event poll cycle
};
pub const JoystickID = u32;
@ -629,7 +629,7 @@ pub const CameraID = u32;
pub const KeyboardID = u32;
pub const PowerState = enum(c_int) {
powerstateError, //error determining power status
powerstateError = -1, //error determining power status
powerstateUnknown, //cannot determine power status
powerstateOnBattery, //Not plugged in, running on the battery
powerstateNoBattery, //Plugged in, no battery available
@ -662,76 +662,76 @@ pub const PenAxis = enum(c_int) {
};
pub const Scancode = enum(c_int) {
scancodeBackslash,
scancodeNonushash,
scancodeGrave,
scancodeInsert,
scancodeNumlockclear,
scancodeNonusbackslash,
scancodeApplication, //windows contextual menu, compose
scancodePower,
scancodeHelp, //AL Integrated Help Center
scancodeMenu, //Menu (show menu)
scancodeStop, //AC Stop
scancodeAgain, //AC Redo/Repeat
scancodeUndo, //AC Undo
scancodeCut, //AC Cut
scancodeCopy, //AC Copy
scancodePaste, //AC Paste
scancodeFind, //AC Find
scancodeInternational1,
scancodeInternational3, //Yen
scancodeLang1, //Hangul/English toggle
scancodeLang2, //Hanja conversion
scancodeLang3, //Katakana
scancodeLang4, //Hiragana
scancodeLang5, //Zenkaku/Hankaku
scancodeLang6, //reserved
scancodeLang7, //reserved
scancodeLang8, //reserved
scancodeLang9, //reserved
scancodeAlterase, //Erase-Eaze
scancodeCancel, //AC Cancel
scancodeLalt, //alt, option
scancodeLgui, //windows, command (apple), meta
scancodeRalt, //alt gr, option
scancodeRgui, //windows, command (apple), meta
scancodeMode,
scancodeSleep, //Sleep
scancodeWake, //Wake
scancodeChannelIncrement, //Channel Increment
scancodeChannelDecrement, //Channel Decrement
scancodeMediaPlay, //Play
scancodeMediaPause, //Pause
scancodeMediaRecord, //Record
scancodeMediaFastForward, //Fast Forward
scancodeMediaRewind, //Rewind
scancodeMediaNextTrack, //Next Track
scancodeMediaPreviousTrack, //Previous Track
scancodeMediaStop, //Stop
scancodeMediaEject, //Eject
scancodeMediaPlayPause, //Play / Pause
scancodeMediaSelect,
scancodeAcNew, //AC New
scancodeAcOpen, //AC Open
scancodeAcClose, //AC Close
scancodeAcExit, //AC Exit
scancodeAcSave, //AC Save
scancodeAcPrint, //AC Print
scancodeAcProperties, //AC Properties
scancodeAcSearch, //AC Search
scancodeAcHome, //AC Home
scancodeAcBack, //AC Back
scancodeAcForward, //AC Forward
scancodeAcStop, //AC Stop
scancodeAcRefresh, //AC Refresh
scancodeAcBookmarks, //AC Bookmarks
scancodeSoftleft,
scancodeSoftright,
scancodeCall, //Used for accepting phone calls.
scancodeEndcall, //Used for rejecting phone calls.
scancodeReserved, //400-500 reserved for dynamic keycodes
scancodeCount,
scancodeBackslash = 49,
scancodeNonushash = 50,
scancodeGrave = 53,
scancodeInsert = 73,
scancodeNumlockclear = 83,
scancodeNonusbackslash = 100,
scancodeApplication = 101, //windows contextual menu, compose
scancodePower = 102,
scancodeHelp = 117, //AL Integrated Help Center
scancodeMenu = 118, //Menu (show menu)
scancodeStop = 120, //AC Stop
scancodeAgain = 121, //AC Redo/Repeat
scancodeUndo = 122, //AC Undo
scancodeCut = 123, //AC Cut
scancodeCopy = 124, //AC Copy
scancodePaste = 125, //AC Paste
scancodeFind = 126, //AC Find
scancodeInternational1 = 135,
scancodeInternational3 = 137, //Yen
scancodeLang1 = 144, //Hangul/English toggle
scancodeLang2 = 145, //Hanja conversion
scancodeLang3 = 146, //Katakana
scancodeLang4 = 147, //Hiragana
scancodeLang5 = 148, //Zenkaku/Hankaku
scancodeLang6 = 149, //reserved
scancodeLang7 = 150, //reserved
scancodeLang8 = 151, //reserved
scancodeLang9 = 152, //reserved
scancodeAlterase = 153, //Erase-Eaze
scancodeCancel = 155, //AC Cancel
scancodeLalt = 226, //alt, option
scancodeLgui = 227, //windows, command (apple), meta
scancodeRalt = 230, //alt gr, option
scancodeRgui = 231, //windows, command (apple), meta
scancodeMode = 257,
scancodeSleep = 258, //Sleep
scancodeWake = 259, //Wake
scancodeChannelIncrement = 260, //Channel Increment
scancodeChannelDecrement = 261, //Channel Decrement
scancodeMediaPlay = 262, //Play
scancodeMediaPause = 263, //Pause
scancodeMediaRecord = 264, //Record
scancodeMediaFastForward = 265, //Fast Forward
scancodeMediaRewind = 266, //Rewind
scancodeMediaNextTrack = 267, //Next Track
scancodeMediaPreviousTrack = 268, //Previous Track
scancodeMediaStop = 269, //Stop
scancodeMediaEject = 270, //Eject
scancodeMediaPlayPause = 271, //Play / Pause
scancodeMediaSelect = 272,
scancodeAcNew = 273, //AC New
scancodeAcOpen = 274, //AC Open
scancodeAcClose = 275, //AC Close
scancodeAcExit = 276, //AC Exit
scancodeAcSave = 277, //AC Save
scancodeAcPrint = 278, //AC Print
scancodeAcProperties = 279, //AC Properties
scancodeAcSearch = 280, //AC Search
scancodeAcHome = 281, //AC Home
scancodeAcBack = 282, //AC Back
scancodeAcForward = 283, //AC Forward
scancodeAcStop = 284, //AC Stop
scancodeAcRefresh = 285, //AC Refresh
scancodeAcBookmarks = 286, //AC Bookmarks
scancodeSoftleft = 287,
scancodeSoftright = 288,
scancodeCall = 289, //Used for accepting phone calls.
scancodeEndcall = 290, //Used for rejecting phone calls.
scancodeReserved = 400, //400-500 reserved for dynamic keycodes
scancodeCount = 512,
};
pub const Keymod = u16;

View File

@ -36,7 +36,7 @@ pub const Sensor = opaque {
pub const SensorID = u32;
pub const SensorType = enum(c_int) {
sensorInvalid, //Returned for an invalid sensor
sensorInvalid = -1, //Returned for an invalid sensor
sensorUnknown, //Unknown sensor type
sensorAccel, //Accelerometer
sensorGyro, //Gyroscope

View File

@ -2,16 +2,16 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const BlendMode = u32;
@ -44,32 +44,33 @@ pub const Color = extern struct {
};
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,
colorPrimariesBt709,
transferCharacteristicsSrgb,
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,
colorspaceHdr10, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorspaceHdr10 = 0x12002600, //Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
colorPrimariesBt2020,
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,
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,
colorPrimariesBt601,
colorspaceBt601Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt601Full = 0x221018c6, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
colorspaceBt709Limited = 0x21100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
transferCharacteristicsBt709,
matrixCoefficientsBt709,
colorspaceBt709Full, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
colorspaceBt709Full = 0x22100421, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
colorspaceBt2020Limited = 0x21102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
matrixCoefficientsBt2020Ncl,
colorspaceBt2020Full, //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
colorspaceBt2020Full = 0x22102609, //Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
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;

View File

@ -16,14 +16,14 @@ pub const DateTime = extern struct {
};
pub const DateFormat = enum(c_int) {
dateFormatYyyymmdd, //Year/Month/Day
dateFormatDdmmyyyy, //Day/Month/Year
dateFormatMmddyyyy, //Month/Day/Year
dateFormatYyyymmdd = 0, //Year/Month/Day
dateFormatDdmmyyyy = 1, //Day/Month/Year
dateFormatMmddyyyy = 2, //Month/Day/Year
};
pub const TimeFormat = enum(c_int) {
timeFormat24hr, //24 hour time
timeFormat12hr, //12 hour time
timeFormat24hr = 0, //24 hour time
timeFormat12hr = 1, //12 hour time
};
pub inline fn getDateTimeLocalePreferences(dateFormat: ?*DateFormat, timeFormat: ?*TimeFormat) bool {

View File

@ -2,16 +2,16 @@ const std = @import("std");
pub const c = @import("c.zig").c;
pub const PixelFormat = enum(c_int) {
pixelformatYv12, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes, //Android video texture format
pixelformatMjpg, //Motion JPEG
pixelformatYv12 = 0x32315659, //Planar mode: Y + V + U (3 planes)
pixelformatIyuv = 0x56555949, //Planar mode: Y + U + V (3 planes)
pixelformatYuy2 = 0x32595559, //Packed mode: Y0+U0+Y1+V0 (1 plane)
pixelformatUyvy = 0x59565955, //Packed mode: U0+Y0+V0+Y1 (1 plane)
pixelformatYvyu = 0x55595659, //Packed mode: Y0+V0+Y1+U0 (1 plane)
pixelformatNv12 = 0x3231564e, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatNv21 = 0x3132564e, //Planar mode: Y + V/U interleaved (2 planes)
pixelformatP010 = 0x30313050, //Planar mode: Y + U/V interleaved (2 planes)
pixelformatExternalOes = 0x2053454f, //Android video texture format
pixelformatMjpg = 0x47504a4d, //Motion JPEG
};
pub const Point = extern struct {

View File

@ -10,15 +10,15 @@ pub const IOStream = opaque {
};
pub const AudioFormat = enum(c_int) {
audioUnknown, //Unspecified audio format
audioU8, //Unsigned 8-bit samples
audioS8, //Signed 8-bit samples
audioS16le, //Signed 16-bit samples
audioS16be, //As above, but big-endian byte order
audioS32le, //32-bit integer samples
audioS32be, //As above, but big-endian byte order
audioF32le, //32-bit floating point samples
audioF32be, //As above, but big-endian byte order
audioUnknown = 0x0000, //Unspecified audio format
audioU8 = 0x0008, //Unsigned 8-bit samples
audioS8 = 0x8008, //Signed 8-bit samples
audioS16le = 0x8010, //Signed 16-bit samples
audioS16be = 0x9010, //As above, but big-endian byte order
audioS32le = 0x8020, //32-bit integer samples
audioS32be = 0x9020, //As above, but big-endian byte order
audioF32le = 0x8120, //32-bit floating point samples
audioF32be = 0x9120, //As above, but big-endian byte order
};
pub const AudioDeviceID = u32;

View File

@ -4,24 +4,24 @@ pub const c = @import("c.zig").c;
pub const BlendMode = u32;
pub const BlendOperation = enum(c_int) {
blendoperationAdd, //dst + src: supported by all renderers
blendoperationSubtract, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum,
blendoperationAdd = 0x1, //dst + src: supported by all renderers
blendoperationSubtract = 0x2, //src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationRevSubtract = 0x3, //dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMinimum = 0x4, //min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
blendoperationMaximum = 0x5,
};
pub const BlendFactor = enum(c_int) {
blendfactorZero, //0, 0, 0, 0
blendfactorOne, //1, 1, 1, 1
blendfactorSrcColor, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha,
blendfactorZero = 0x1, //0, 0, 0, 0
blendfactorOne = 0x2, //1, 1, 1, 1
blendfactorSrcColor = 0x3, //srcR, srcG, srcB, srcA
blendfactorOneMinusSrcColor = 0x4, //1-srcR, 1-srcG, 1-srcB, 1-srcA
blendfactorSrcAlpha = 0x5, //srcA, srcA, srcA, srcA
blendfactorOneMinusSrcAlpha = 0x6, //1-srcA, 1-srcA, 1-srcA, 1-srcA
blendfactorDstColor = 0x7, //dstR, dstG, dstB, dstA
blendfactorOneMinusDstColor = 0x8, //1-dstR, 1-dstG, 1-dstB, 1-dstA
blendfactorDstAlpha = 0x9, //dstA, dstA, dstA, dstA
blendfactorOneMinusDstAlpha = 0xA,
};
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