34
34
extern "C"
35
35
36
36
#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
39
39
const RAYLIB_VERSION_PATCH = 0
40
- #define RAYLIB_VERSION "4.5 "
40
+ #define RAYLIB_VERSION "5.0 "
41
41
42
42
#ifndef PI
43
43
const PI = 3.14159265358979323846
@@ -443,6 +443,18 @@ type FilePathList
443
443
paths as zstring ptr ptr
444
444
end type
445
445
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
+
446
458
type ConfigFlags as long
447
459
enum
448
460
FLAG_VSYNC_HINT = &h00000040
734
746
PIXELFORMAT_UNCOMPRESSED_R32
735
747
PIXELFORMAT_UNCOMPRESSED_R32G32B32
736
748
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
749
+ PIXELFORMAT_UNCOMPRESSED_R16
750
+ PIXELFORMAT_UNCOMPRESSED_R16G16B16
751
+ PIXELFORMAT_UNCOMPRESSED_R16G16B16A16
737
752
PIXELFORMAT_COMPRESSED_DXT1_RGB
738
753
PIXELFORMAT_COMPRESSED_DXT1_RGBA
739
754
PIXELFORMAT_COMPRESSED_DXT3_RGBA
@@ -832,9 +847,13 @@ enum
832
847
end enum
833
848
834
849
type 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
+
837
855
type LoadFileTextCallback as function ( byval fileName as const zstring ptr) as zstring ptr
856
+
838
857
type SaveFileTextCallback as function ( byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
839
858
840
859
declare 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
851
870
declare sub SetWindowState( byval flags as ulong)
852
871
declare sub ClearWindowState( byval flags as ulong)
853
872
declare sub ToggleFullscreen()
873
+ declare sub ToggleBorderlessWindow()
854
874
declare sub MaximizeWindow()
855
875
declare sub MinimizeWindow()
856
876
declare sub RestoreWindow()
@@ -860,8 +880,10 @@ declare sub SetWindowTitle(byval title as const zstring ptr)
860
880
declare sub SetWindowPosition( byval x as long , byval y as long )
861
881
declare sub SetWindowMonitor( byval monitor as long )
862
882
declare sub SetWindowMinSize( byval width_ as long , byval height_ as long )
883
+ declare sub SetWindowMaxSize( byval width_ as long , byval height_ as long )
863
884
declare sub SetWindowSize( byval width_ as long , byval height_ as long )
864
885
declare sub SetWindowOpacity( byval opacity as single )
886
+ declare sub SetWindowFocused()
865
887
declare function GetWindowHandle() as any ptr
866
888
declare function GetScreenWidth() as long
867
889
declare function GetScreenHeight() as long
@@ -946,10 +968,10 @@ declare sub SetLoadFileDataCallback(byval callback as LoadFileDataCallback)
946
968
declare sub SetSaveFileDataCallback( byval callback as SaveFileDataCallback)
947
969
declare sub SetLoadFileTextCallback( byval callback as LoadFileTextCallback)
948
970
declare 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
950
972
declare 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
953
975
declare function LoadFileText( byval fileName as const zstring ptr) as zstring ptr
954
976
declare sub UnloadFileText( byval text as zstring ptr)
955
977
declare 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
964
986
declare function GetPrevDirectoryPath( byval dirPath as const zstring ptr) as const zstring ptr
965
987
declare function GetWorkingDirectory() as const zstring ptr
966
988
declare 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
968
990
declare function IsPathFile( byval path as const zstring ptr) as boolean
969
991
declare function LoadDirectoryFiles( byval dirPath as const zstring ptr) as FilePathList
970
992
declare 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
977
999
declare function DecompressData( byval compData as const ubyte ptr, byval compDataSize as long , byval dataSize as long ptr) as ubyte ptr
978
1000
declare function EncodeDataBase64( byval data_ as const ubyte ptr, byval dataSize as long , byval outputSize as long ptr) as zstring ptr
979
1001
declare 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
+
980
1013
declare function IsKeyPressed( byval key as long ) as boolean
1014
+ declare function IsKeyPressedRepeat( byval key as long ) as boolean
981
1015
declare function IsKeyDown( byval key as long ) as boolean
982
1016
declare function IsKeyReleased( byval key as long ) as boolean
983
1017
declare function IsKeyUp( byval key as long ) as boolean
@@ -1014,7 +1048,7 @@ declare function GetTouchPosition(byval index as long) as Vector2
1014
1048
declare function GetTouchPointId( byval index as long ) as long
1015
1049
declare function GetTouchPointCount() as long
1016
1050
declare 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
1018
1052
declare function GetGestureDetected() as long
1019
1053
declare function GetGestureHoldDuration() as single
1020
1054
declare function GetGestureDragVector() as Vector2
@@ -1073,18 +1107,20 @@ declare function CheckCollisionPointLine(byval point_ as Vector2, byval p1 as Ve
1073
1107
declare function GetCollisionRec( byval rec1 as Rectangle, byval rec2 as Rectangle) as Rectangle
1074
1108
declare function LoadImage( byval fileName as const zstring ptr) as Image
1075
1109
declare 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
1076
1111
declare function LoadImageAnim( byval fileName as const zstring ptr, byval frames as long ptr) as Image
1077
1112
declare function LoadImageFromMemory( byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long ) as Image
1078
1113
declare function LoadImageFromTexture( byval texture as Texture2D) as Image
1079
1114
declare function LoadImageFromScreen() as Image
1080
1115
declare function IsImageReady( byval image_ as Image) as byte
1081
1116
declare sub UnloadImage( byval image_ as Image)
1082
1117
declare 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
1083
1119
declare function ExportImageAsCode( byval image_ as Image, byval fileName as const zstring ptr) as boolean
1084
1120
declare 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
1087
1122
declare 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
1088
1124
declare 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
1089
1125
declare function GenImageWhiteNoise( byval width_ as long , byval height_ as long , byval factor as single ) as Image
1090
1126
declare 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)
1109
1145
declare sub ImageDither( byval image_ as Image ptr, byval rBpp as long , byval gBpp as long , byval bBpp as long , byval aBpp as long )
1110
1146
declare sub ImageFlipVertical( byval image_ as Image ptr)
1111
1147
declare sub ImageFlipHorizontal( byval image_ as Image ptr)
1148
+ declare sub ImageRotate( byval image_ as Image ptr, byval degrees as long )
1112
1149
declare sub ImageRotateCW( byval image_ as Image ptr)
1113
1150
declare sub ImageRotateCCW( byval image_ as Image ptr)
1114
1151
declare 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
1175
1212
declare function GetPixelDataSize( byval width_ as long , byval height_ as long , byval format_ as long ) as long
1176
1213
declare function GetFontDefault() as Font
1177
1214
declare 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
1179
1216
declare 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
1181
1218
declare 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 )
1185
1222
declare sub UnloadFont( byval font as Font)
1186
1223
declare function ExportFontAsCode( byval font as Font, byval fileName as const zstring ptr) as boolean
1187
1224
declare sub DrawFPS( byval posX as long , byval posY as long )
1188
1225
declare sub DrawText( byval text as const zstring ptr, byval posX as long , byval posY as long , byval fontSize as long , byval color as RLColor)
1189
1226
declare 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)
1190
1227
declare 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)
1191
1228
declare 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
+
1193
1233
declare function MeasureText( byval text as const zstring ptr, byval fontSize as long ) as long
1194
1234
declare function MeasureTextEx( byval font as Font, byval text as const zstring ptr, byval fontSize as single , byval spacing as single ) as Vector2
1195
1235
declare 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
1278
1318
declare sub UnloadMaterial( byval material as Material)
1279
1319
declare sub SetMaterialTexture( byval material as Material ptr, byval mapType as long , byval texture as Texture2D)
1280
1320
declare 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
1282
1322
declare sub UpdateModelAnimation( byval model as Model, byval anim as ModelAnimation, byval frame as long )
1283
1323
declare 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 )
1285
1325
declare function IsModelAnimationValid( byval model as Model, byval anim as ModelAnimation) as boolean
1286
1326
declare function CheckCollisionSpheres( byval center1 as Vector3, byval radius1 as single , byval center2 as Vector3, byval radius2 as single ) as boolean
1287
1327
declare function CheckCollisionBoxes( byval box1 as BoundingBox, byval box2 as BoundingBox) as boolean
@@ -1296,15 +1336,18 @@ declare sub InitAudioDevice()
1296
1336
declare sub CloseAudioDevice()
1297
1337
declare function IsAudioDeviceReady() as boolean
1298
1338
declare sub SetMasterVolume( byval volume as single )
1339
+ declare function GetMasterVolume() as single
1299
1340
declare function LoadWave( byval fileName as const zstring ptr) as Wave
1300
1341
declare function LoadWaveFromMemory( byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long ) as Wave
1301
1342
declare function IsWaveReady( byval wave as Wave) as byte
1302
1343
declare function LoadSound( byval fileName as const zstring ptr) as Sound
1303
1344
declare function LoadSoundFromWave( byval wave as Wave) as Sound
1345
+ declare function LoadSoundAlias( byval source as Sound) as Sound
1304
1346
declare function IsSoundReady( byval sound as Sound) as byte
1305
1347
declare sub UpdateSound( byval sound as Sound, byval data_ as const any ptr, byval sampleCount as long )
1306
1348
declare sub UnloadWave( byval wave as Wave)
1307
1349
declare sub UnloadSound( byval sound as Sound)
1350
+ declare sub UnloadSoundAlias( byval alias as Sound)
1308
1351
declare function ExportWave( byval wave as Wave, byval fileName as const zstring ptr) as boolean
1309
1352
declare function ExportWaveAsCode( byval wave as Wave, byval fileName as const zstring ptr) as boolean
1310
1353
declare sub PlaySound( byval sound as Sound)
0 commit comments