Update raylib_api.* (#3379)

This commit is contained in:
BLUELOVETH 2023-10-08 03:10:27 +08:00 committed by GitHub
parent 52ba44c474
commit 97c2744a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1088 additions and 686 deletions

View file

@ -1428,6 +1428,11 @@ return {
value = 16384,
description = "Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED"
},
{
name = "FLAG_BORDERLESS_WINDOWED_MODE",
value = 32768,
description = "Set to run program in borderless windowed mode"
},
{
name = "FLAG_MSAA_4X_HINT",
value = 32,
@ -2605,58 +2610,73 @@ return {
description = "32*4 bpp (4 channels - float)"
},
{
name = "PIXELFORMAT_COMPRESSED_DXT1_RGB",
name = "PIXELFORMAT_UNCOMPRESSED_R16",
value = 11,
description = "16 bpp (1 channel - half float)"
},
{
name = "PIXELFORMAT_UNCOMPRESSED_R16G16B16",
value = 12,
description = "16*3 bpp (3 channels - half float)"
},
{
name = "PIXELFORMAT_UNCOMPRESSED_R16G16B16A16",
value = 13,
description = "16*4 bpp (4 channels - half float)"
},
{
name = "PIXELFORMAT_COMPRESSED_DXT1_RGB",
value = 14,
description = "4 bpp (no alpha)"
},
{
name = "PIXELFORMAT_COMPRESSED_DXT1_RGBA",
value = 12,
value = 15,
description = "4 bpp (1 bit alpha)"
},
{
name = "PIXELFORMAT_COMPRESSED_DXT3_RGBA",
value = 13,
value = 16,
description = "8 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_DXT5_RGBA",
value = 14,
description = "8 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ETC1_RGB",
value = 15,
description = "4 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ETC2_RGB",
value = 16,
description = "4 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA",
value = 17,
description = "8 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_PVRT_RGB",
name = "PIXELFORMAT_COMPRESSED_ETC1_RGB",
value = 18,
description = "4 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_PVRT_RGBA",
name = "PIXELFORMAT_COMPRESSED_ETC2_RGB",
value = 19,
description = "4 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA",
name = "PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA",
value = 20,
description = "8 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA",
name = "PIXELFORMAT_COMPRESSED_PVRT_RGB",
value = 21,
description = "4 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_PVRT_RGBA",
value = 22,
description = "4 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA",
value = 23,
description = "8 bpp"
},
{
name = "PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA",
value = 24,
description = "2 bpp"
}
}
@ -2973,7 +2993,7 @@ return {
returnType = "unsigned char *",
params = {
{type = "const char *", name = "fileName"},
{type = "unsigned int *", name = "bytesRead"}
{type = "int *", name = "dataSize"}
}
},
{
@ -2983,7 +3003,7 @@ return {
params = {
{type = "const char *", name = "fileName"},
{type = "void *", name = "data"},
{type = "unsigned int", name = "bytesToWrite"}
{type = "int", name = "dataSize"}
}
},
{
@ -3098,6 +3118,11 @@ return {
description = "Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)",
returnType = "void"
},
{
name = "ToggleBorderlessWindowed",
description = "Toggle window state: borderless windowed (only PLATFORM_DESKTOP)",
returnType = "void"
},
{
name = "MaximizeWindow",
description = "Set window state: maximized, if resizable (only PLATFORM_DESKTOP)",
@ -3132,7 +3157,7 @@ return {
},
{
name = "SetWindowTitle",
description = "Set title for window (only PLATFORM_DESKTOP)",
description = "Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)",
returnType = "void",
params = {
{type = "const char *", name = "title"}
@ -3149,7 +3174,7 @@ return {
},
{
name = "SetWindowMonitor",
description = "Set monitor for the current window (fullscreen mode)",
description = "Set monitor for the current window",
returnType = "void",
params = {
{type = "int", name = "monitor"}
@ -3164,6 +3189,15 @@ return {
{type = "int", name = "height"}
}
},
{
name = "SetWindowMaxSize",
description = "Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)",
returnType = "void",
params = {
{type = "int", name = "width"},
{type = "int", name = "height"}
}
},
{
name = "SetWindowSize",
description = "Set window dimensions",
@ -3181,6 +3215,11 @@ return {
{type = "float", name = "opacity"}
}
},
{
name = "SetWindowFocused",
description = "Set window focused (only PLATFORM_DESKTOP)",
returnType = "void"
},
{
name = "GetWindowHandle",
description = "Get native window handle",
@ -3276,7 +3315,7 @@ return {
},
{
name = "GetMonitorName",
description = "Get the human-readable, UTF-8 encoded name of the primary monitor",
description = "Get the human-readable, UTF-8 encoded name of the specified monitor",
returnType = "const char *",
params = {
{type = "int", name = "monitor"}
@ -3792,7 +3831,7 @@ return {
returnType = "unsigned char *",
params = {
{type = "const char *", name = "fileName"},
{type = "unsigned int *", name = "bytesRead"}
{type = "int *", name = "dataSize"}
}
},
{
@ -3810,7 +3849,7 @@ return {
params = {
{type = "const char *", name = "fileName"},
{type = "void *", name = "data"},
{type = "unsigned int", name = "bytesToWrite"}
{type = "int", name = "dataSize"}
}
},
{
@ -3819,7 +3858,7 @@ return {
returnType = "bool",
params = {
{type = "const unsigned char *", name = "data"},
{type = "unsigned int", name = "size"},
{type = "int", name = "dataSize"},
{type = "const char *", name = "fileName"}
}
},
@ -3928,7 +3967,7 @@ return {
},
{
name = "GetApplicationDirectory",
description = "Get the directory if the running application (uses static string)",
description = "Get the directory of the running application (uses static string)",
returnType = "const char *"
},
{
@ -4046,6 +4085,14 @@ return {
{type = "int", name = "key"}
}
},
{
name = "IsKeyPressedRepeat",
description = "Check if a key has been pressed again (Only PLATFORM_DESKTOP)",
returnType = "bool",
params = {
{type = "int", name = "key"}
}
},
{
name = "IsKeyDown",
description = "Check if a key is being pressed",
@ -4311,7 +4358,7 @@ return {
description = "Check if a gesture have been detected",
returnType = "bool",
params = {
{type = "int", name = "gesture"}
{type = "unsigned int", name = "gesture"}
}
},
{
@ -4461,6 +4508,28 @@ return {
{type = "Color", name = "color"}
}
},
{
name = "DrawLineBSpline",
description = "Draw a B-Spline line, minimum 4 points",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
}
},
{
name = "DrawLineCatmullRom",
description = "Draw a Catmull Rom spline line, minimum 4 points",
returnType = "void",
params = {
{type = "Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
}
},
{
name = "DrawLineStrip",
description = "Draw lines sequence",
@ -4919,6 +4988,16 @@ return {
{type = "int", name = "headerSize"}
}
},
{
name = "LoadImageSvg",
description = "Load image from SVG file data or string with specified size",
returnType = "Image",
params = {
{type = "const char *", name = "fileNameOrString"},
{type = "int", name = "width"},
{type = "int", name = "height"}
}
},
{
name = "LoadImageAnim",
description = "Load image sequence from file (frames appended to image.data)",
@ -4976,6 +5055,16 @@ return {
{type = "const char *", name = "fileName"}
}
},
{
name = "ExportImageToMemory",
description = "Export image to memory buffer",
returnType = "unsigned char *",
params = {
{type = "Image", name = "image"},
{type = "const char *", name = "fileType"},
{type = "int *", name = "fileSize"}
}
},
{
name = "ExportImageAsCode",
description = "Export image as code file defining an array of bytes, returns true on success",
@ -5268,7 +5357,7 @@ return {
},
{
name = "ImageRotate",
description = "Rotate image by input angle in degrees (-359 to 359) ",
description = "Rotate image by input angle in degrees (-359 to 359)",
returnType = "void",
params = {
{type = "Image *", name = "image"},
@ -5911,13 +6000,13 @@ return {
},
{
name = "LoadFontEx",
description = "Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set",
description = "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont",
returnType = "Font",
params = {
{type = "const char *", name = "fileName"},
{type = "int", name = "fontSize"},
{type = "int *", name = "fontChars"},
{type = "int", name = "glyphCount"}
{type = "int *", name = "codepoints"},
{type = "int", name = "codepointCount"}
}
},
{
@ -5939,8 +6028,8 @@ return {
{type = "const unsigned char *", name = "fileData"},
{type = "int", name = "dataSize"},
{type = "int", name = "fontSize"},
{type = "int *", name = "fontChars"},
{type = "int", name = "glyphCount"}
{type = "int *", name = "codepoints"},
{type = "int", name = "codepointCount"}
}
},
{
@ -5959,8 +6048,8 @@ return {
{type = "const unsigned char *", name = "fileData"},
{type = "int", name = "dataSize"},
{type = "int", name = "fontSize"},
{type = "int *", name = "fontChars"},
{type = "int", name = "glyphCount"},
{type = "int *", name = "codepoints"},
{type = "int", name = "codepointCount"},
{type = "int", name = "type"}
}
},
@ -5969,8 +6058,8 @@ return {
description = "Generate image font atlas using chars info",
returnType = "Image",
params = {
{type = "const GlyphInfo *", name = "chars"},
{type = "Rectangle **", name = "recs"},
{type = "const GlyphInfo *", name = "glyphs"},
{type = "Rectangle **", name = "glyphRecs"},
{type = "int", name = "glyphCount"},
{type = "int", name = "fontSize"},
{type = "int", name = "padding"},
@ -5982,7 +6071,7 @@ return {
description = "Unload font chars info data (RAM)",
returnType = "void",
params = {
{type = "GlyphInfo *", name = "chars"},
{type = "GlyphInfo *", name = "glyphs"},
{type = "int", name = "glyphCount"}
}
},
@ -6071,13 +6160,21 @@ return {
params = {
{type = "Font", name = "font"},
{type = "const int *", name = "codepoints"},
{type = "int", name = "count"},
{type = "int", name = "codepointCount"},
{type = "Vector2", name = "position"},
{type = "float", name = "fontSize"},
{type = "float", name = "spacing"},
{type = "Color", name = "tint"}
}
},
{
name = "SetTextLineSpacing",
description = "Set vertical line spacing when drawing with line-breaks",
returnType = "void",
params = {
{type = "int", name = "spacing"}
}
},
{
name = "MeasureText",
description = "Measure string width for default font",
@ -6954,7 +7051,7 @@ return {
returnType = "ModelAnimation *",
params = {
{type = "const char *", name = "fileName"},
{type = "unsigned int *", name = "animCount"}
{type = "int *", name = "animCount"}
}
},
{
@ -6981,7 +7078,7 @@ return {
returnType = "void",
params = {
{type = "ModelAnimation *", name = "animations"},
{type = "unsigned int", name = "count"}
{type = "int", name = "animCount"}
}
},
{
@ -7140,6 +7237,14 @@ return {
{type = "Wave", name = "wave"}
}
},
{
name = "LoadSoundAlias",
description = "Create a new sound that shares the same sample data as the source sound, does not own the sound data",
returnType = "Sound",
params = {
{type = "Sound", name = "source"}
}
},
{
name = "IsSoundReady",
description = "Checks if a sound is ready",
@ -7174,6 +7279,14 @@ return {
{type = "Sound", name = "sound"}
}
},
{
name = "UnloadSoundAlias",
description = "Unload a sound alias (does not deallocate sample data)",
returnType = "void",
params = {
{type = "Sound", name = "alias"}
}
},
{
name = "ExportWave",
description = "Export wave data to file, returns true on success",
@ -7568,7 +7681,7 @@ return {
},
{
name = "AttachAudioStreamProcessor",
description = "Attach audio stream processor to stream",
description = "Attach audio stream processor to stream, receives the samples as <float>s",
returnType = "void",
params = {
{type = "AudioStream", name = "stream"},
@ -7586,7 +7699,7 @@ return {
},
{
name = "AttachAudioMixedProcessor",
description = "Attach audio stream processor to the entire audio pipeline",
description = "Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s",
returnType = "void",
params = {
{type = "AudioCallback", name = "processor"}