3434extern "C"
3535
3636#define RAYLIB_H
37- const RAYLIB_VERSION_MAJOR = 4
38- const RAYLIB_VERSION_MINOR = 5
37+ const RAYLIB_VERSION_MAJOR = 5
38+ const RAYLIB_VERSION_MINOR = 0
3939const RAYLIB_VERSION_PATCH = 0
40- #define RAYLIB_VERSION "4.5 "
40+ #define RAYLIB_VERSION "5.0 "
4141
4242#ifndef PI
4343 const PI = 3.14159265358979323846
@@ -443,6 +443,18 @@ type FilePathList
443443 paths as zstring ptr ptr
444444end type
445445
446+ type AutomationEvent
447+ frame as ulong
448+ type_ as ulong
449+ params( 0 to 4 ) as long
450+ end type
451+
452+ type AutomationEventList
453+ capacity as ulong
454+ count as ulong
455+ events as AutomationEvent ptr
456+ end type
457+
446458type ConfigFlags as long
447459enum
448460 FLAG_VSYNC_HINT = &h00000040
734746 PIXELFORMAT_UNCOMPRESSED_R32
735747 PIXELFORMAT_UNCOMPRESSED_R32G32B32
736748 PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
749+ PIXELFORMAT_UNCOMPRESSED_R16
750+ PIXELFORMAT_UNCOMPRESSED_R16G16B16
751+ PIXELFORMAT_UNCOMPRESSED_R16G16B16A16
737752 PIXELFORMAT_COMPRESSED_DXT1_RGB
738753 PIXELFORMAT_COMPRESSED_DXT1_RGBA
739754 PIXELFORMAT_COMPRESSED_DXT3_RGBA
@@ -832,9 +847,13 @@ enum
832847end enum
833848
834849type TraceLogCallback as sub ( byval logLevel as long , byval text as const zstring ptr, byval args as va_list)
835- type LoadFileDataCallback as function ( byval fileName as const zstring ptr, byval bytesRead as ulong ptr) as ubyte ptr
836- type SaveFileDataCallback as function ( byval fileName as const zstring ptr, byval data_ as any ptr, byval bytesToWrite as ulong) as boolean
850+
851+ type LoadFileDataCallback as function ( byval fileName as const zstring ptr, byval dataSize as long ptr) as ubyte ptr
852+
853+ type SaveFileDataCallback as function ( byval fileName as const zstring ptr, byval data_ as any ptr, byval dataSize as long ) as boolean
854+
837855type LoadFileTextCallback as function ( byval fileName as const zstring ptr) as zstring ptr
856+
838857type SaveFileTextCallback as function ( byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
839858
840859declare sub InitWindow( byval width_ as long , byval height_ as long , byval title as const zstring ptr)
@@ -851,6 +870,7 @@ declare function IsWindowState(byval flag as ulong) as boolean
851870declare sub SetWindowState( byval flags as ulong)
852871declare sub ClearWindowState( byval flags as ulong)
853872declare sub ToggleFullscreen()
873+ declare sub ToggleBorderlessWindow()
854874declare sub MaximizeWindow()
855875declare sub MinimizeWindow()
856876declare sub RestoreWindow()
@@ -860,8 +880,10 @@ declare sub SetWindowTitle(byval title as const zstring ptr)
860880declare sub SetWindowPosition( byval x as long , byval y as long )
861881declare sub SetWindowMonitor( byval monitor as long )
862882declare sub SetWindowMinSize( byval width_ as long , byval height_ as long )
883+ declare sub SetWindowMaxSize( byval width_ as long , byval height_ as long )
863884declare sub SetWindowSize( byval width_ as long , byval height_ as long )
864885declare sub SetWindowOpacity( byval opacity as single )
886+ declare sub SetWindowFocused()
865887declare function GetWindowHandle() as any ptr
866888declare function GetScreenWidth() as long
867889declare function GetScreenHeight() as long
@@ -946,10 +968,10 @@ declare sub SetLoadFileDataCallback(byval callback as LoadFileDataCallback)
946968declare sub SetSaveFileDataCallback( byval callback as SaveFileDataCallback)
947969declare sub SetLoadFileTextCallback( byval callback as LoadFileTextCallback)
948970declare sub SetSaveFileTextCallback( byval callback as SaveFileTextCallback)
949- declare function LoadFileData( byval fileName as const zstring ptr, byval bytesRead as ulong ptr) as ubyte ptr
971+ declare function LoadFileData( byval fileName as const zstring ptr, byval dataSize as long ptr) as ubyte ptr
950972declare sub UnloadFileData( byval data_ as ubyte ptr)
951- declare function SaveFileData( byval fileName as const zstring ptr, byval data_ as any ptr, byval bytesToWrite as ulong ) as boolean
952- declare function ExportDataAsCode( byval data_ as const zstring ptr, byval size as ulong , byval fileName as const zstring ptr) as boolean
973+ declare function SaveFileData( byval fileName as const zstring ptr, byval data_ as any ptr, byval dataSize as long ) as boolean
974+ declare function ExportDataAsCode( byval data_ as const zstring ptr, byval dataSize as long , byval fileName as const zstring ptr) as boolean
953975declare function LoadFileText( byval fileName as const zstring ptr) as zstring ptr
954976declare sub UnloadFileText( byval text as zstring ptr)
955977declare function SaveFileText( byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
@@ -964,7 +986,7 @@ declare function GetDirectoryPath(byval filePath as const zstring ptr) as const
964986declare function GetPrevDirectoryPath( byval dirPath as const zstring ptr) as const zstring ptr
965987declare function GetWorkingDirectory() as const zstring ptr
966988declare function GetApplicationDirectory() as const zstring ptr
967- declare function ChangeDirectory( byval dir as const zstring ptr) as boolean
989+ declare function ChangeDirectory( byval dir_ as const zstring ptr) as boolean
968990declare function IsPathFile( byval path as const zstring ptr) as boolean
969991declare function LoadDirectoryFiles( byval dirPath as const zstring ptr) as FilePathList
970992declare function LoadDirectoryFilesEx( byval basePath as const zstring ptr, byval filter as const zstring ptr, byval scanSubdirs as boolean ) as FilePathList
@@ -977,7 +999,19 @@ declare function CompressData(byval data_ as const ubyte ptr, byval dataSize as
977999declare function DecompressData( byval compData as const ubyte ptr, byval compDataSize as long , byval dataSize as long ptr) as ubyte ptr
9781000declare function EncodeDataBase64( byval data_ as const ubyte ptr, byval dataSize as long , byval outputSize as long ptr) as zstring ptr
9791001declare function DecodeDataBase64( byval data_ as const ubyte ptr, byval outputSize as long ptr) as ubyte ptr
1002+
1003+ declare function LoadAutomationEventList( byval fileName as const zstring ptr) as AutomationEventList
1004+ declare sub UnloadAutomationEventList( byval list_ as AutomationEventList ptr)
1005+ declare function ExportAutomationEventList( byval list_ as AutomationEventList, byval fileName as const zstring ptr) as boolean
1006+ declare sub SetAutomationEventList( byval list_ as AutomationEventList ptr)
1007+ declare sub SetAutomationEventBaseFrame( byval frame_ as long )
1008+ declare sub StartAutomationEventRecording()
1009+ declare sub StopAutomationEventRecording()
1010+ declare sub PlayAutomationEvent( byval frame_ as AutomationEvent)
1011+
1012+
9801013declare function IsKeyPressed( byval key as long ) as boolean
1014+ declare function IsKeyPressedRepeat( byval key as long ) as boolean
9811015declare function IsKeyDown( byval key as long ) as boolean
9821016declare function IsKeyReleased( byval key as long ) as boolean
9831017declare function IsKeyUp( byval key as long ) as boolean
@@ -1014,7 +1048,7 @@ declare function GetTouchPosition(byval index as long) as Vector2
10141048declare function GetTouchPointId( byval index as long ) as long
10151049declare function GetTouchPointCount() as long
10161050declare sub SetGesturesEnabled( byval flags as ulong)
1017- declare function IsGestureDetected( byval gesture as long ) as boolean
1051+ declare function IsGestureDetected( byval gesture as ulong ) as boolean
10181052declare function GetGestureDetected() as long
10191053declare function GetGestureHoldDuration() as single
10201054declare function GetGestureDragVector() as Vector2
@@ -1073,18 +1107,20 @@ declare function CheckCollisionPointLine(byval point_ as Vector2, byval p1 as Ve
10731107declare function GetCollisionRec( byval rec1 as Rectangle, byval rec2 as Rectangle) as Rectangle
10741108declare function LoadImage( byval fileName as const zstring ptr) as Image
10751109declare function LoadImageRaw( byval fileName as const zstring ptr, byval width_ as long , byval height_ as long , byval format_ as long , byval headerSize as long ) as Image
1110+ declare function LoadImageSVG( byval fileNameOrString as const zstring ptr, byval width_ as long , byval height_ as long ) as Image
10761111declare function LoadImageAnim( byval fileName as const zstring ptr, byval frames as long ptr) as Image
10771112declare function LoadImageFromMemory( byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long ) as Image
10781113declare function LoadImageFromTexture( byval texture as Texture2D) as Image
10791114declare function LoadImageFromScreen() as Image
10801115declare function IsImageReady( byval image_ as Image) as byte
10811116declare sub UnloadImage( byval image_ as Image)
10821117declare function ExportImage( byval image_ as Image, byval fileName as const zstring ptr) as boolean
1118+ declare function ExportImageToMemory( byval image_ as Image, byval fileType as const zstring ptr, byval fileSie as long ) as zstring ptr
10831119declare function ExportImageAsCode( byval image_ as Image, byval fileName as const zstring ptr) as boolean
10841120declare function GenImageColor( byval width_ as long , byval height_ as long , byval color as RLColor) as Image
1085- declare function GenImageGradientV( byval width_ as long , byval height_ as long , byval top as RLColor, byval bottom as RLColor) as Image
1086- declare function GenImageGradientH( byval width_ as long , byval height_ as long , byval left_ as RLColor, byval right_ as RLColor) as Image
1121+ declare function GenImageGradientLinear( byval width_ as long , byval height_ as long , byval direction as long , byval start_ as RLColor, byval end_ as RLColor) as Image
10871122declare function GenImageGradientRadial( byval width_ as long , byval height_ as long , byval density as single , byval inner as RLColor, byval outer as RLColor) as Image
1123+ declare function GenImageGradientSquare( byval width_ as long , byval height_ as long , byval density as single , byval inner as RLColor, byval outer as RLColor) as Image
10881124declare function GenImageChecked( byval width_ as long , byval height_ as long , byval checksX as long , byval checksY as long , byval col1 as RLColor, byval col2 as RLColor) as Image
10891125declare function GenImageWhiteNoise( byval width_ as long , byval height_ as long , byval factor as single ) as Image
10901126declare function GenImagePerlinNoise( byval width_ as long , byval height_ as long , byval offsetX as long , byval offsetY as long , byval scale as single ) as Image
@@ -1109,6 +1145,7 @@ declare sub ImageMipmaps(byval image_ as Image ptr)
11091145declare sub ImageDither( byval image_ as Image ptr, byval rBpp as long , byval gBpp as long , byval bBpp as long , byval aBpp as long )
11101146declare sub ImageFlipVertical( byval image_ as Image ptr)
11111147declare sub ImageFlipHorizontal( byval image_ as Image ptr)
1148+ declare sub ImageRotate( byval image_ as Image ptr, byval degrees as long )
11121149declare sub ImageRotateCW( byval image_ as Image ptr)
11131150declare sub ImageRotateCCW( byval image_ as Image ptr)
11141151declare sub ImageColorTint( byval image_ as Image ptr, byval color as RLColor)
@@ -1175,21 +1212,24 @@ declare sub SetPixelColor(byval dstPtr as any ptr, byval color as RLColor, byval
11751212declare function GetPixelDataSize( byval width_ as long , byval height_ as long , byval format_ as long ) as long
11761213declare function GetFontDefault() as Font
11771214declare function LoadFont( byval fileName as const zstring ptr) as Font
1178- declare function LoadFontEx( byval fileName as const zstring ptr, byval fontSize as long , byval fontChars as long ptr, byval glyphCount as long ) as Font
1215+ declare function LoadFontEx( byval fileName as const zstring ptr, byval fontSize as long , byval codepoints as long ptr, byval codepointCount as long ) as Font
11791216declare function LoadFontFromImage( byval image_ as Image, byval key as RLColor, byval firstChar as long ) as Font
1180- declare function LoadFontFromMemory( byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long , byval fontSize as long , byval fontChars as long ptr, byval glyphCount as long ) as Font
1217+ declare function LoadFontFromMemory( byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long , byval fontSize as long , byval codepoints as long ptr, byval codepointCount as long ) as Font
11811218declare function IsFontReady( byval font as Font) as byte
1182- declare function LoadFontData( byval fileData as const ubyte ptr, byval dataSize as long , byval fontSize as long , byval fontChars as long ptr, byval glyphCount as long , byval type as long ) as GlyphInfo ptr
1183- declare function GenImageFontAtlas( byval chars as const GlyphInfo ptr, byval recs as Rectangle ptr ptr, byval glyphCount as long , byval fontSize as long , byval padding as long , byval packMethod as long ) as Image
1184- declare sub UnloadFontData( byval chars as GlyphInfo ptr, byval glyphCount as long )
1219+ declare function LoadFontData( byval fileData as const ubyte ptr, byval dataSize as long , byval fontSize as long , byval codepoints as long ptr, byval codepointCount as long , byval type as long ) as GlyphInfo ptr
1220+ declare function GenImageFontAtlas( byval glyphs as const GlyphInfo ptr, byval glyphRecs as Rectangle ptr ptr, byval glyphCount as long , byval fontSize as long , byval padding as long , byval packMethod as long ) as Image
1221+ declare sub UnloadFontData( byval glyphs as GlyphInfo ptr, byval glyphCount as long )
11851222declare sub UnloadFont( byval font as Font)
11861223declare function ExportFontAsCode( byval font as Font, byval fileName as const zstring ptr) as boolean
11871224declare sub DrawFPS( byval posX as long , byval posY as long )
11881225declare sub DrawText( byval text as const zstring ptr, byval posX as long , byval posY as long , byval fontSize as long , byval color as RLColor)
11891226declare sub DrawTextEx( byval font as Font, byval text as const zstring ptr, byval position as Vector2, byval fontSize as single , byval spacing as single , byval tint as RLColor)
11901227declare sub DrawTextPro( byval font as Font, byval text as const zstring ptr, byval position as Vector2, byval origin as Vector2, byval rotation as single , byval fontSize as single , byval spacing as single , byval tint as RLColor)
11911228declare sub DrawTextCodepoint( byval font as Font, byval codepoint as long , byval position as Vector2, byval fontSize as single , byval tint as RLColor)
1192- declare sub DrawTextCodepoints( byval font as Font, byval codepoints as const long ptr, byval count as long , byval position as Vector2, byval fontSize as single , byval spacing as single , byval tint as RLColor)
1229+ declare sub DrawTextCodepoints( byval font as Font, byval codepoints as const long ptr, byval codepointCount as long , byval position as Vector2, byval fontSize as single , byval spacing as single , byval tint as RLColor)
1230+
1231+ declare sub SetTextLineSpacing( byval spaceing as long )
1232+
11931233declare function MeasureText( byval text as const zstring ptr, byval fontSize as long ) as long
11941234declare function MeasureTextEx( byval font as Font, byval text as const zstring ptr, byval fontSize as single , byval spacing as single ) as Vector2
11951235declare function GetGlyphIndex( byval font as Font, byval codepoint as long ) as long
@@ -1278,10 +1318,10 @@ declare function IsMaterialReady(byval material as Material) as byte
12781318declare sub UnloadMaterial( byval material as Material)
12791319declare sub SetMaterialTexture( byval material as Material ptr, byval mapType as long , byval texture as Texture2D)
12801320declare sub SetModelMeshMaterial( byval model as Model ptr, byval meshId as long , byval materialId as long )
1281- declare function LoadModelAnimations( byval fileName as const zstring ptr, byval animCount as ulong ptr) as ModelAnimation ptr
1321+ declare function LoadModelAnimations( byval fileName as const zstring ptr, byval animCount as long ptr) as ModelAnimation ptr
12821322declare sub UpdateModelAnimation( byval model as Model, byval anim as ModelAnimation, byval frame as long )
12831323declare sub UnloadModelAnimation( byval anim as ModelAnimation)
1284- declare sub UnloadModelAnimations( byval animations as ModelAnimation ptr, byval count as ulong )
1324+ declare sub UnloadModelAnimations( byval animations as ModelAnimation ptr, byval count as long )
12851325declare function IsModelAnimationValid( byval model as Model, byval anim as ModelAnimation) as boolean
12861326declare function CheckCollisionSpheres( byval center1 as Vector3, byval radius1 as single , byval center2 as Vector3, byval radius2 as single ) as boolean
12871327declare function CheckCollisionBoxes( byval box1 as BoundingBox, byval box2 as BoundingBox) as boolean
@@ -1296,15 +1336,18 @@ declare sub InitAudioDevice()
12961336declare sub CloseAudioDevice()
12971337declare function IsAudioDeviceReady() as boolean
12981338declare sub SetMasterVolume( byval volume as single )
1339+ declare function GetMasterVolume() as single
12991340declare function LoadWave( byval fileName as const zstring ptr) as Wave
13001341declare function LoadWaveFromMemory( byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long ) as Wave
13011342declare function IsWaveReady( byval wave as Wave) as byte
13021343declare function LoadSound( byval fileName as const zstring ptr) as Sound
13031344declare function LoadSoundFromWave( byval wave as Wave) as Sound
1345+ declare function LoadSoundAlias( byval source as Sound) as Sound
13041346declare function IsSoundReady( byval sound as Sound) as byte
13051347declare sub UpdateSound( byval sound as Sound, byval data_ as const any ptr, byval sampleCount as long )
13061348declare sub UnloadWave( byval wave as Wave)
13071349declare sub UnloadSound( byval sound as Sound)
1350+ declare sub UnloadSoundAlias( byval alias as Sound)
13081351declare function ExportWave( byval wave as Wave, byval fileName as const zstring ptr) as boolean
13091352declare function ExportWaveAsCode( byval wave as Wave, byval fileName as const zstring ptr) as boolean
13101353declare sub PlaySound( byval sound as Sound)
0 commit comments