diff --git a/Makefile b/Makefile index e7096e3..addfee2 100644 --- a/Makefile +++ b/Makefile @@ -286,15 +286,16 @@ $(BIN): $(OBJ) $(LUAJIT_AR) $(RAYLIB_AR) # --------------------------------------------------------------------------- # Lua bindings (hate-no-d.lua) # -# gen-hate-no-d.lua turns the rlparser tables for raylib.h, rlgl.h, raymath.h -# and raygui.h into one ffi.cdef block plus constants, wrappers and LuaCATS -# comments. +# generate.lua turns the rlparser tables for raylib.h, rlgl.h, raymath.h and +# raygui.h into one globals-only LuaJIT FFI binding: a single ffi.cdef block, +# the constants, and one global wrapper per C function, all with LuaLS +# annotations. # # The tables are generated into build/api from the pinned submodule headers, so # raylib's tools/rlparser/output (where raylib_api.lua is tracked) stays clean. # rlparser runs on HOST_CC, never the target CC: cross builds still produce the -# same platform-independent binding. The script has these paths baked in -# (build/api/*.lua in, hate-no-d.lua out), so BINDING must match OUT. +# same platform-independent binding. generate.lua reads build/api/*.lua and +# writes hate-no-d.lua (pass a different output path as its first argument). # --------------------------------------------------------------------------- $(RLPARSER): $(RLPARSER_DIR)/rlparser.c | $(BUILD_DIR) $(HOST_CC) -O2 -Wall -std=c99 -o $@ $(RLPARSER_DIR)/rlparser.c @@ -311,20 +312,20 @@ $(RAYMATH_API): $(RLPARSER) $(RAYLIB_SRC)/raymath.h | $(API_DIR) $(RAYGUI_API): $(RLPARSER) $(RAYGUI_SRC)/raygui.h | $(API_DIR) $(RLPARSER) -i $(RAYGUI_SRC)/raygui.h -o $@ -f LUA -d RAYGUIAPI -$(BINDING): gen-hate-no-d.lua $(RLGL_API) $(RAYMATH_API) $(RAYLIB_API) $(RAYGUI_API) +$(BINDING): generate.lua $(RLGL_API) $(RAYMATH_API) $(RAYLIB_API) $(RAYGUI_API) @command -v $(LUAJIT) >/dev/null 2>&1 || { \ echo "hate-no-d: cannot run '$(LUAJIT)' -- install LuaJIT or set LUAJIT=..." >&2; exit 1; } - $(LUAJIT) gen-hate-no-d.lua + $(LUAJIT) generate.lua bindings: $(BINDING) -# Fail if regeneration is not byte-identical or the module does not load. +# Fail if regeneration is not byte-identical or the binding does not load. check-bindings: $(BINDING) @before=$$(cksum $(BINDING)); \ - $(LUAJIT) gen-hate-no-d.lua; \ + $(LUAJIT) generate.lua; \ [ "$$before" = "$$(cksum $(BINDING))" ] || { \ echo "hate-no-d.lua: regeneration is not byte-identical" >&2; exit 1; } - $(LUAJIT) -e 'local M = dofile("$(BINDING)"); assert(type(M) == "table"); assert(type(M.GetMousePosition) == "function", "raylib"); assert(type(M.rlLoadIdentity) == "function", "rlgl"); assert(type(M.Vector2Add) == "function", "raymath"); assert(type(M.GuiButton) == "function", "raygui"); print("bindings ok")' + $(LUAJIT) -e 'dofile("$(BINDING)"); assert(type(GetMousePosition) == "function", "raylib"); assert(type(rlLoadIdentity) == "function", "rlgl"); assert(type(Vector2Add) == "function", "raymath"); assert(type(GuiButton) == "function", "raygui"); print("bindings ok")' # --------------------------------------------------------------------------- # Info and maintenance diff --git a/README.md b/README.md index dbcdc96..753de7b 100644 --- a/README.md +++ b/README.md @@ -17,25 +17,25 @@ Should work on: Save this as `quick-start.lua`: ```lua -local hnd = require("hate-no-d") +require("hate-no-d") -hnd.InitWindow(1280, 720, "hate-no-d") -hnd.SetTargetFPS(60) +InitWindow(1280, 720, "hate-no-d") +SetTargetFPS(60) local text = "Your first hate-no-d application!" local fontSize = 48 -while not hnd.WindowShouldClose() do - hnd.BeginDrawing() - hnd.ClearBackground(hnd.SKYBLUE) +while not WindowShouldClose() do + BeginDrawing() + ClearBackground(SKYBLUE) - local width = hnd.MeasureText(text, fontSize) - hnd.DrawText(text, (hnd.GetScreenWidth() - width)/2, (hnd.GetScreenHeight() - fontSize)/2, fontSize, hnd.DARKBLUE) + local width = MeasureText(text, fontSize) + DrawText(text, (GetScreenWidth() - width)/2, (GetScreenHeight() - fontSize)/2, fontSize, DARKBLUE) - hnd.EndDrawing() + EndDrawing() end -hnd.CloseWindow() +CloseWindow() ``` Run it: @@ -50,8 +50,9 @@ On Windows: hate-no-d.exe quick-start.lua ``` -`hate-no-d.lua` is the generated raylib/rlgl/raymath binding; release archives -ship it next to the binary. +`hate-no-d.lua` is the generated raylib/rlgl/raymath/raygui binding. It defines +every function and constant as a Lua global, so `require("hate-no-d")` is all +the setup you need; release archives ship it next to the binary. ## Building diff --git a/gen-hate-no-d.lua b/gen-hate-no-d.lua deleted file mode 100644 index 00edbe2..0000000 --- a/gen-hate-no-d.lua +++ /dev/null @@ -1,1124 +0,0 @@ -#!/usr/bin/env luajit ---[[ -gen-hate-no-d.lua - generate hate-no-d.lua from raylib's own parser output. - -The generated file contains: - * one ffi.cdef block with every typedef/struct/alias/callback/prototype - * Lua constants (enums, #defines, colors) - * one Lua wrapper per C function, with ffi.string() handling for char* - returns, array conversions for const T* params, in/out helpers for - asset structs (Image*, Mesh*, ...) and callback pinning - * complete LuaCATS annotations (---@class / @field / @param / @return) - -Inputs are plain Lua tables produced by raylib's tools/rlparser. The Makefile -generates them into build/api (the parser itself into build/rlparser), so a -build never writes into raylib's tools/ tree: - - build/rlparser -i submodules/raylib/src/raylib.h \ - -o build/api/raylib_api.lua -f LUA -d RLAPI - build/rlparser -i submodules/raylib/src/rlgl.h \ - -o build/api/rlgl_api.lua -f LUA -d RLAPI -t "RLGL IMPLEMENTATION" - build/rlparser -i submodules/raylib/src/raymath.h \ - -o build/api/raymath_api.lua -f LUA -d RMAPI - build/rlparser -i submodules/raygui/src/raygui.h \ - -o build/api/raygui_api.lua -f LUA -d RAYGUIAPI - -Run from the repository root; every table above is required and the result is -always written to hate-no-d.lua. - -raymath needs no extra translation unit: raylib's own rcore.c defines -RAYMATH_IMPLEMENTATION before including raymath.h, so libraylib.a already -contains all 146 raymath symbols (verified with nm). Linking the library -with --whole-archive exposes them to ffi.C. - -raygui is header-only, its implementation is force-included into the CLI's -translation unit (-DRAYGUI_IMPLEMENTATION -include .../raygui.h), so its -symbols land in the executable and --whole-archive is not involved. -]] - -local RAYLIB_API = "build/api/raylib_api.lua" -local RLGL_API = "build/api/rlgl_api.lua" -local RAYMATH_API = "build/api/raymath_api.lua" -local RAYGUI_API = "build/api/raygui_api.lua" -local OUT = "hate-no-d.lua" - -local function die(fmt, ...) - io.stderr:write("gen-hate-no-d: " .. string.format(fmt, ...) .. "\n") - os.exit(1) -end - ----------------------------------------------------------------------------- --- loading ----------------------------------------------------------------------------- - -local function load_api(path) - local chunk, err = loadfile(path) - if not chunk then - die("cannot load %s: %s", path, err) - end - local ok, data = pcall(chunk) - if not ok then - die("cannot run %s: %s", path, data) - end - if type(data) ~= "table" then - die("%s did not return a table", path) - end - return data -end - -local raylib_api = load_api(RAYLIB_API) -local raygui_api = load_api(RAYGUI_API) - --- Merge order matters: raylib defines the base types (Texture, ...) that raygui --- redeclares in its standalone fallback, so raylib always goes first. -local apis = { - raylib_api, - load_api(RLGL_API), - load_api(RAYMATH_API), - raygui_api, -} - ----------------------------------------------------------------------------- --- type model ----------------------------------------------------------------------------- - -local SCALAR = { - ["void"] = true, bool = true, char = true, short = true, int = true, - long = true, float = true, double = true, - ["unsigned char"] = true, ["unsigned short"] = true, - ["unsigned int"] = true, ["unsigned long"] = true, - ["signed char"] = true, ["long long"] = true, ["size_t"] = true, -} - -local INTEGER = { - char = true, short = true, int = true, long = true, - ["unsigned char"] = true, ["unsigned short"] = true, - ["unsigned int"] = true, ["unsigned long"] = true, - ["signed char"] = true, ["long long"] = true, ["size_t"] = true, -} - -local NUMBER = { float = true, double = true } - -local STRUCTS, ALIASES, CALLBACKS = {}, {}, {} -local DEFS = {} - -local function norm(s) - return (s:gsub("%s+", " "):gsub("^ ", ""):gsub(" $", "")) -end - --- Parse a raylib parser type string into base / pointer depth / const / array. -local function parse_type(t) - local s = norm(t) - local array = s:match("%[(%d+)%]%s*$") - if array then - s = s:gsub("%[%d+%]%s*$", "") - s = norm(s) - end - local is_const = false - if s:match("^const ") then - is_const = true - s = norm(s:sub(7)) - end - local ptr = select(2, s:gsub("%*", "")) - s = norm((s:gsub("%*", ""))) - return { base = s, ptr = ptr, const = is_const, array = tonumber(array) } -end - -local function is_structish(base) - return STRUCTS[base] ~= nil or ALIASES[base] ~= nil -end - ----------------------------------------------------------------------------- --- merge the three API tables ----------------------------------------------------------------------------- - -local FUNCS = {} - --- rlparser is line-oriented and does not evaluate the preprocessor: rlgl.h --- struct fields guarded by #if/#endif leak into the output as bogus fields --- ("#endif indices", "#if defined(...) unsigned int * indices"). Drop those --- and keep the first real field with a given name. -local function sanitize_fields(fields) - local clean, seen = {}, {} - for _, f in ipairs(fields) do - local ftype = norm(f.type or "") - local fname = norm(f.name or "") - if fname ~= "" and not fname:match("^#") and not ftype:match("^#") and not seen[fname] then - seen[fname] = true - clean[#clean + 1] = f - end - end - return clean -end - -local function add_api(data) - for _, s in ipairs(data.structs or {}) do - if not STRUCTS[s.name] and not ALIASES[s.name] then - STRUCTS[s.name] = { - kind = "struct", - name = s.name, - fields = sanitize_fields(s.fields or {}), - description = s.description, - } - DEFS[#DEFS + 1] = STRUCTS[s.name] - end - end - - for _, a in ipairs(data.aliases or {}) do - if not ALIASES[a.name] and not STRUCTS[a.name] then - -- rlparser stores the target in `type` and the new name in `name`. - ALIASES[a.name] = { - kind = "alias", - name = a.name, - target = a.type, - description = a.description, - } - DEFS[#DEFS + 1] = ALIASES[a.name] - end - end - - for _, c in ipairs(data.callbacks or {}) do - if not CALLBACKS[c.name] then - CALLBACKS[c.name] = c - end - end - - for _, f in ipairs(data.functions or {}) do - FUNCS[#FUNCS + 1] = f - end -end - -for _, data in ipairs(apis) do - add_api(data) -end - --- TraceLogCallback carries va_list, which LuaJIT cannot pass to a Lua --- callback; drop the callback and the single function using it. -CALLBACKS.TraceLogCallback = nil - -local SKIP = { - SetTraceLogCallback = true, -} - -local function params_of(f) - return f.params or {} -end - -local function is_skipped(f) - if SKIP[f.name] then - return true - end - for _, p in ipairs(params_of(f)) do - if norm(p.type) == "va_list" then - return true - end - end - return false -end - ----------------------------------------------------------------------------- --- validation ----------------------------------------------------------------------------- - -local function check_type(t, where) - local p = parse_type(t) - if p.base == "..." or p.base == "va_list" then - return - end - if SCALAR[p.base] or is_structish(p.base) or CALLBACKS[p.base] then - return - end - if p.ptr > 0 then - return -- opaque pointer (rAudioBuffer *, ...) - end - die("unknown type %q in %s", p.base, where) -end - -local func_names = {} -for _, f in ipairs(FUNCS) do - if func_names[f.name] then - die("duplicate function name %s", f.name) - end - func_names[f.name] = true - if not is_skipped(f) then - check_type(f.returnType, f.name .. " return") - for _, p in ipairs(params_of(f)) do - check_type(p.type, f.name .. " param " .. p.name) - end - end -end - -for _, def in ipairs(DEFS) do - if def.kind == "struct" then - for _, f in ipairs(def.fields) do - check_type(f.type, def.name .. "." .. f.name) - end - else - check_type(def.target, def.name .. " alias") - end -end - --- Opaque struct names (forward declarations in the cdef). -local OPAQUE = {} -local function scan_opaque(t) - local p = parse_type(t) - if p.base == "..." or p.base == "va_list" then - return - end - if SCALAR[p.base] or is_structish(p.base) or CALLBACKS[p.base] then - return - end - OPAQUE[p.base] = true -end - -for _, def in ipairs(DEFS) do - if def.kind == "struct" then - for _, f in ipairs(def.fields) do - scan_opaque(f.type) - end - end -end -for _, f in ipairs(FUNCS) do - if not is_skipped(f) then - scan_opaque(f.returnType) - for _, p in ipairs(params_of(f)) do - scan_opaque(p.type) - end - end -end - -local opaque_names = {} -for name in pairs(OPAQUE) do - opaque_names[#opaque_names + 1] = name -end -table.sort(opaque_names) - ----------------------------------------------------------------------------- --- dependency order (typedefs must be declared before use) ----------------------------------------------------------------------------- - -local function deps_of(def) - local deps = {} - local function add(t) - local p = parse_type(t) - if is_structish(p.base) and p.base ~= def.name then - deps[#deps + 1] = p.base - end - end - if def.kind == "struct" then - for _, f in ipairs(def.fields) do - add(f.type) - end - else - add(def.target) - end - return deps -end - -local ordered = {} -local state = {} - -local function visit(name) - if state[name] == "done" then - return - end - if state[name] == "active" then - die("cyclic typedef involving %s", name) - end - local def = STRUCTS[name] or ALIASES[name] - if not def then - return - end - state[name] = "active" - for _, dep in ipairs(deps_of(def)) do - visit(dep) - end - state[name] = "done" - ordered[#ordered + 1] = def -end - -for _, def in ipairs(DEFS) do - visit(def.name) -end - ----------------------------------------------------------------------------- --- C rendering ----------------------------------------------------------------------------- - -local function c_base(base) - if SCALAR[base] or is_structish(base) or CALLBACKS[base] then - return base - end - return "struct " .. base -end - -local function c_type(t) - local p = parse_type(t) - if p.base == "..." then - return "..." - end - local s = c_base(p.base) - if p.ptr > 0 then - s = s .. " " .. string.rep("*", p.ptr) - end - if p.const then - s = "const " .. s - end - return s -end - -local function c_field(ftype, fname) - local p = parse_type(ftype) - local base = c_base(p.base) - if p.array then - return base .. " " .. fname .. "[" .. p.array .. "]" - end - if p.ptr > 0 then - return base .. " " .. string.rep("*", p.ptr) .. fname - end - return base .. " " .. fname -end - ----------------------------------------------------------------------------- --- LuaCATS rendering ----------------------------------------------------------------------------- - -local CHAR_BUFFER = "raylib.char_buffer" -local CSTRING_ARRAY = "raylib.cstring_array" - -local function ann_scalar(base) - if base == "bool" then - return "boolean" - end - if INTEGER[base] then - return "integer" - end - if NUMBER[base] then - return "number" - end - return nil -end - -local function ann_value(base) - local scalar = ann_scalar(base) - if scalar then - return scalar - end - if is_structish(base) then - return "raylib." .. base - end - return "ffi.cdata*" -end - -local function ann_field(ftype) - local p = parse_type(ftype) - if p.array then - if p.base == "char" then - return CHAR_BUFFER - end - local elem = ann_scalar(p.base) - if elem then - return elem .. "[]" - end - if is_structish(p.base) then - return "raylib." .. p.base .. "[]" - end - return "ffi.cdata*" - end - if p.ptr > 0 then - if p.base == "char" then - return p.ptr == 1 and CHAR_BUFFER or CSTRING_ARRAY - end - if p.base == "void" then - return "ffi.cdata*" - end - if INTEGER[p.base] then - return "integer[]" - end - if NUMBER[p.base] then - return "number[]" - end - if is_structish(p.base) then - return "raylib." .. p.base .. "[]" - end - return "ffi.cdata*" - end - return ann_value(p.base) -end - --- Struct pointers that are genuinely in/out: the caller passes the handle and --- gets the (possibly mutated) handle back. -local OUT_STRUCT = { - Image = true, Texture2D = true, Mesh = true, Wave = true, Material = true, - Model = true, RenderTexture2D = true, Camera = true, AutomationEventList = true, -} - --- Functions whose struct-pointer parameters are pure outputs. Those params are --- optional on the Lua side and become extra return values. -local OUT_OVERRIDES = { - MatrixDecompose = { 2, 3, 4 }, -} - -local function ann_param(p, is_out) - local pt = parse_type(p.type) - if pt.base == "..." then - return "any" - end - if CALLBACKS[pt.base] then - return "raylib." .. pt.base - end - if pt.ptr == 0 then - return ann_value(pt.base) - end - if is_out then - return "raylib." .. pt.base - end - if pt.base == "char" then - if pt.ptr == 1 then - return pt.const and "string" or (CHAR_BUFFER .. "|string") - end - return "string[]|" .. CSTRING_ARRAY - end - if pt.base == "void" then - return "ffi.cdata*|string" - end - if pt.base == "unsigned char" and pt.const then - return "string|integer[]" - end - if pt.const then - local elem = ann_scalar(pt.base) - if elem then - return elem .. "[]" - end - if is_structish(pt.base) then - return "raylib." .. pt.base .. "[]" - end - end - return "ffi.cdata*" -end - -local function ann_return(t) - local p = parse_type(t) - if p.base == "void" and p.ptr == 0 then - return "nil" - end - if p.ptr == 0 then - return ann_value(p.base) - end - if p.base == "char" and p.ptr == 1 then - return "string|nil" - end - return "ffi.cdata*" -end - ----------------------------------------------------------------------------- --- out-params / array conversions ----------------------------------------------------------------------------- - -local function out_params(f) - local out = {} - local ret = parse_type(f.returnType) - if ret.base ~= "void" or ret.ptr ~= 0 then - return out - end - if OUT_OVERRIDES[f.name] then - for _, i in ipairs(OUT_OVERRIDES[f.name]) do - out[i] = "out" - end - return out - end - local params = params_of(f) - for i, p in ipairs(params) do - local pt = parse_type(p.type) - if pt.ptr == 1 and not pt.const and OUT_STRUCT[pt.base] then - out[i] = "inout" - end - end - return out -end - --- Convert Lua-friendly argument forms (string / table) to cdata without --- reassigning the annotated parameter: doing that makes LuaLS warn with --- cast-local-type. The result goes into an untyped local instead. -local function conversion_for(name, ptype, idx) - local pt = parse_type(ptype) - local var = "_a" .. idx - if pt.base == "unsigned char" and pt.ptr == 1 and pt.const then - return { arg = var, lines = { - "local " .. var, - 'if type(' .. name .. ') == "string" then ' .. var .. ' = ffi.cast("const unsigned char *", ' .. name .. ")", - 'elseif type(' .. name .. ') == "table" then ' .. var .. ' = to_array("unsigned char", ' .. name .. ")", - "else " .. var .. " = " .. name .. " end", - } } - end - if pt.base == "void" and pt.ptr == 1 then - return { arg = var, lines = { - "local " .. var, - 'if type(' .. name .. ') == "string" then ' .. var .. ' = ffi.cast("const void *", ' .. name .. ")", - "else " .. var .. " = " .. name .. " end", - } } - end - if pt.base == "char" and pt.ptr == 2 then - -- raylib takes char** (non-const), but an array of const char* is what a - -- Lua table naturally builds; the cast is safe because these parameters - -- are read-only in practice. - local array = 'to_array("const char *", ' .. name .. ")" - if not pt.const then - array = 'ffi.cast("char **", ' .. array .. ")" - end - return { arg = var, lines = { - "local " .. var, - 'if type(' .. name .. ') == "table" then ' .. var .. " = " .. array, - "else " .. var .. " = " .. name .. " end", - } } - end - if pt.const and pt.ptr == 1 and pt.base ~= "char" and pt.base ~= "void" then - return { arg = var, lines = { - "local " .. var, - 'if type(' .. name .. ') == "table" then ' .. var .. ' = to_array("' .. pt.base .. '", ' .. name .. ")", - "else " .. var .. " = " .. name .. " end", - } } - end - return nil -end - ----------------------------------------------------------------------------- --- emitted source ----------------------------------------------------------------------------- - -local out = {} -local function w(line) - out[#out + 1] = line or "" -end - -local function clean_description(s) - if not s or s == "" then - return nil - end - s = s:gsub("%s+", " "):gsub("^ ", ""):gsub(" $", "") - return s -end - -local version = "unknown" -local function find_define(data, name) - for _, d in ipairs(data.defines or {}) do - if d.name == name then - return d.value - end - end - return nil -end - -version = tostring(find_define(raylib_api, "RAYLIB_VERSION") or "unknown") -local raygui_version = tostring(find_define(raygui_api, "RAYGUI_VERSION") or "unknown") - -w("--[[") -w(" hate-no-d.lua - generated by gen-hate-no-d.lua, do not edit.") -w("") -w(" raylib " .. version .. " / rlgl / raymath / raygui " .. raygui_version) -w(" Functions: " .. tostring(#FUNCS)) -w("") -w(" raymath symbols come from rcore.o (RAYMATH_IMPLEMENTATION) in libraylib.a.") -w(" raygui symbols come from a forced -include of raygui.h (RAYGUI_IMPLEMENTATION).") -w("]]") -w("") -w('local ffi = require("ffi")') -w("") -w("ffi.cdef[[") -for _, name in ipairs(opaque_names) do - w("struct " .. name .. ";") -end -if #opaque_names > 0 then - w("") -end - -for _, def in ipairs(ordered) do - if def.kind == "struct" then - w("typedef struct " .. def.name .. " {") - for _, f in ipairs(def.fields) do - w(" " .. c_field(f.type, f.name) .. ";") - end - w("} " .. def.name .. ";") - else - w("typedef " .. c_type(def.target) .. " " .. def.name .. ";") - end - w("") -end - -for _, cb in ipairs({ CALLBACKS.AudioCallback, CALLBACKS.LoadFileDataCallback, - CALLBACKS.SaveFileDataCallback, CALLBACKS.LoadFileTextCallback, - CALLBACKS.SaveFileTextCallback }) do - if cb then - local args = {} - for _, p in ipairs(params_of(cb)) do - if parse_type(p.type).base == "..." then - args[#args + 1] = "..." - else - args[#args + 1] = c_type(p.type) .. " " .. p.name - end - end - if #args == 0 then - args[1] = "void" - end - w("typedef " .. c_type(cb.returnType) .. " (*" .. cb.name .. ")(" .. table.concat(args, ", ") .. ");") - w("") - end -end - -for _, f in ipairs(FUNCS) do - if not is_skipped(f) then - local args = {} - for _, p in ipairs(params_of(f)) do - if parse_type(p.type).base == "..." then - args[#args + 1] = "..." - else - args[#args + 1] = c_type(p.type) .. " " .. p.name - end - end - if #args == 0 then - args[1] = "void" - end - w(c_type(f.returnType) .. " " .. f.name .. "(" .. table.concat(args, ", ") .. ");") - end -end - -w("]]") -w("") -w("local C = ffi.C") -w("local string_format = string.format") -w("local ffi_string = ffi.string") -w("local type, select = type, select") -w("") -w("local M = {}") -w("") -w("-- Raw namespace for hot paths that want to skip the Lua wrapper.") -w("---@type ffi.namespace*") -w("M.C = C") -w("") -w("---@class raylib.char_buffer") -w("---@field [integer] integer") -w("") -w("---@class raylib.cstring_array") -w("---@field [integer] ffi.cdata*") -w("") -w("local pinned = {}") -w("local callback_cache = {}") -w("local function pin(ctype, fn)") -w(" if fn == nil then") -w(" return nil") -w(" end") -w(" local by_type = callback_cache[fn]") -w(" if by_type == nil then") -w(" by_type = {}") -w(" callback_cache[fn] = by_type") -w(" end") -w(" local cb = by_type[ctype]") -w(" if cb == nil then") -w(" cb = ffi.cast(ctype, fn)") -w(" by_type[ctype] = cb") -w(" pinned[#pinned + 1] = cb") -w(" end") -w(" return cb") -w("end") -w("") -w("local function to_array(ct, t, n)") -w(" n = n or #t") -w(' local a = ffi.new(ct .. "[?]", n)') -w(" for i = 1, n do") -w(" a[i - 1] = t[i]") -w(" end") -w(" return a") -w("end") -w("") - ----------------------------------------------------------------------------- --- constants ----------------------------------------------------------------------------- - -local enum_constants = {} -local seen_const = {} - -for _, data in ipairs(apis) do - for _, enum in ipairs(data.enums or {}) do - w("---@enum raylib." .. enum.name) - w("M." .. enum.name .. " = {") - for _, v in ipairs(enum.values or {}) do - local value - if type(v.value) == "number" then - value = tostring(v.value) - elseif type(v.value) == "string" then - value = string.format("%q", v.value) - else - value = tostring(v.value) - end - w(" " .. v.name .. " = " .. value .. ",") - enum_constants[v.name] = enum.name - seen_const[v.name] = true - end - w("}") - w("") - end -end - -for _, data in ipairs(apis) do - for _, enum in ipairs(data.enums or {}) do - for _, v in ipairs(enum.values or {}) do - w("---@type raylib." .. enum.name) - w("M." .. v.name .. " = M." .. enum.name .. "." .. v.name) - end - end -end -w("") - -local alias_defines = {} -local pi_value = nil - -local function eval_float_math(expr) - expr = expr:gsub("PI", tostring(pi_value or math.pi)) - expr = expr:gsub("(%d)f", "%1") - local chunk = load("return " .. expr) - if not chunk then - return nil - end - local ok, value = pcall(chunk) - if not ok or type(value) ~= "number" then - return nil - end - return value -end - -for _, data in ipairs(apis) do - for _, d in ipairs(data.defines or {}) do - if not seen_const[d.name] then - local dtype = d.type - local emitted = false - if dtype == "FLOAT" or dtype == "INT" then - if type(d.value) == "number" then - if d.name == "PI" then - pi_value = d.value - end - w("M." .. d.name .. " = " .. tostring(d.value)) - emitted = true - end - elseif dtype == "FLOAT_MATH" then - local value = eval_float_math(tostring(d.value)) - if value then - w("M." .. d.name .. " = " .. tostring(value)) - emitted = true - end - elseif dtype == "STRING" then - w("M." .. d.name .. " = " .. string.format("%q", tostring(d.value))) - emitted = true - elseif dtype == "COLOR" then - local r, g, b, a = tostring(d.value):match("{%s*(%d+)%s*,%s*(%d+)%s*,%s*(%d+)%s*,%s*(%d+)%s*}") - if r then - w("---@type raylib.Color") - w(string.format('M.%s = ffi.new("Color", { r = %s, g = %s, b = %s, a = %s })', - d.name, r, g, b, a)) - emitted = true - end - elseif dtype == "UNKNOWN" then - local target = tostring(d.value) - if target:match("^[A-Z_][A-Z0-9_]*$") then - alias_defines[#alias_defines + 1] = { name = d.name, target = target } - end - end - if emitted then - seen_const[d.name] = true - end - end - end -end - -for _, a in ipairs(alias_defines) do - if seen_const[a.target] then - local enum = enum_constants[a.target] - if enum then - w("---@type raylib." .. enum) - end - w("M." .. a.name .. " = M." .. a.target) - end -end -w("") - ----------------------------------------------------------------------------- --- struct / alias / callback annotations ----------------------------------------------------------------------------- - -for _, def in ipairs(ordered) do - local desc = clean_description(def.description) - if def.kind == "struct" then - if desc then - w("---" .. desc) - end - w("---@class raylib." .. def.name) - for _, f in ipairs(def.fields) do - local fdesc = clean_description(f.description) - local line = "---@field " .. f.name .. " " .. ann_field(f.type) - if fdesc then - line = line .. " " .. fdesc - end - w(line) - end - else - local pt = parse_type(def.target) - if pt.ptr > 0 then - w("---@alias raylib." .. def.name .. " ffi.cdata*") - else - w("---@alias raylib." .. def.name .. " raylib." .. pt.base) - end - end - w("") -end - -for _, cb in ipairs({ CALLBACKS.AudioCallback, CALLBACKS.LoadFileDataCallback, - CALLBACKS.SaveFileDataCallback, CALLBACKS.LoadFileTextCallback, - CALLBACKS.SaveFileTextCallback }) do - if cb then - local parts = {} - for _, p in ipairs(params_of(cb)) do - local pt = parse_type(p.type) - local ann - if pt.base == "char" and pt.ptr == 1 then - ann = "string" - elseif pt.base == "void" and pt.ptr == 1 then - ann = "ffi.cdata*" - else - ann = ann_value(pt.base) - end - parts[#parts + 1] = (p.name or "arg") .. ": " .. ann - end - local ret = parse_type(cb.returnType) - local ret_ann = "" - if ret.base ~= "void" then - if ret.base == "char" and ret.ptr == 1 then - ret_ann = ": string" - else - ret_ann = ": " .. ann_return(cb.returnType) - end - end - w("---@alias raylib." .. cb.name .. " fun(" .. table.concat(parts, ", ") .. ")" .. ret_ann) - w("") - end -end - ----------------------------------------------------------------------------- --- wrappers ----------------------------------------------------------------------------- - -local LUA_KEYWORDS = { - ["and"] = true, ["break"] = true, ["do"] = true, ["else"] = true, - ["elseif"] = true, ["end"] = true, ["false"] = true, ["for"] = true, - ["function"] = true, ["if"] = true, ["in"] = true, ["local"] = true, - ["nil"] = true, ["not"] = true, ["or"] = true, ["repeat"] = true, - ["return"] = true, ["then"] = true, ["true"] = true, ["until"] = true, - ["while"] = true, -} - -local function lua_name(name) - if LUA_KEYWORDS[name] then - return name .. "_" - end - return name -end - -local RET_OWNER = { - LoadFileText = "UnloadFileText", - LoadUTF8 = "UnloadUTF8", - EncodeDataBase64 = "MemFree", - TextReplaceAlloc = "MemFree", - TextReplaceBetweenAlloc = "MemFree", - TextInsertAlloc = "MemFree", -} - -local SPECIAL = { - TextFormat = true, - TraceLog = true, - CodepointToUTF8 = true, -} - -local emitted_wrappers = 0 - -local function emit_special(f) - if f.name == "TextFormat" then - w("---" .. (clean_description(f.description) or "Text formatting")) - w("---@param fmt string") - w("---@param ... any") - w("---@return string") - w("function M.TextFormat(fmt, ...)") - w(' if select("#", ...) == 0 then') - w(" return fmt") - w(" end") - w(" return string_format(fmt, ...)") - w("end") - w("") - elseif f.name == "TraceLog" then - w("---" .. (clean_description(f.description) or "Show trace log messages")) - w("---@param level integer") - w("---@param fmt string") - w("---@param ... any") - w("---@return nil") - w("function M.TraceLog(level, fmt, ...)") - w(' if select("#", ...) == 0 then') - w(' C.TraceLog(level, "%s", fmt)') - w(" else") - w(' C.TraceLog(level, "%s", string_format(fmt, ...))') - w(" end") - w("end") - w("") - elseif f.name == "CodepointToUTF8" then - w("---" .. (clean_description(f.description) or "Encode a codepoint")) - w("---@param codepoint integer") - w("---@return string|nil") - w("function M.CodepointToUTF8(codepoint)") - w(' local size = ffi.new("int[1]")') - w(" local p = C.CodepointToUTF8(codepoint, size)") - w(" if p == nil then return nil end") - w(" return ffi_string(p, size[0])") - w("end") - w("") - end - emitted_wrappers = emitted_wrappers + 1 -end - -local function emit_function(f) - local params = params_of(f) - local outs = out_params(f) - - local sig = {} - local pre = {} - local args = {} - local arg_ann = {} - local out_vars = {} - local out_ann = {} - - for i, p in ipairs(params) do - local pt = parse_type(p.type) - local name = lua_name(p.name) - if pt.base == "..." then - sig[#sig + 1] = "..." - args[#args + 1] = "..." - arg_ann[#arg_ann + 1] = "---@param ... any" - elseif outs[i] then - local var = "_o" .. i - if outs[i] == "inout" then - pre[#pre + 1] = 'local ' .. var .. ' = ffi.new("' .. pt.base .. '[1]", ' .. name .. ')' - arg_ann[#arg_ann + 1] = "---@param " .. name .. " raylib." .. pt.base - else - pre[#pre + 1] = 'local ' .. var .. ' = ffi.new("' .. pt.base .. '[1]")' - pre[#pre + 1] = "if " .. name .. " ~= nil then " .. var .. "[0] = " .. name .. " end" - arg_ann[#arg_ann + 1] = "---@param " .. name .. "? raylib." .. pt.base - end - args[#args + 1] = var - out_vars[#out_vars + 1] = var .. "[0]" - out_ann[#out_ann + 1] = "---@return raylib." .. pt.base - sig[#sig + 1] = name - else - sig[#sig + 1] = name - arg_ann[#arg_ann + 1] = "---@param " .. name .. " " .. ann_param(p, false) - - if CALLBACKS[pt.base] then - local var = "_cb" .. i - pre[#pre + 1] = "local " .. var .. ' = pin("' .. pt.base .. '", ' .. name .. ")" - args[#args + 1] = var - else - local conv = conversion_for(name, p.type, i) - if conv then - for _, line in ipairs(conv.lines) do - pre[#pre + 1] = line - end - args[#args + 1] = conv.arg - else - args[#args + 1] = name - end - end - end - end - - local desc = clean_description(f.description) - if desc then - w("---" .. desc) - end - for _, line in ipairs(arg_ann) do - w(line) - end - if #out_vars > 0 then - for _, line in ipairs(out_ann) do - w(line) - end - elseif parse_type(f.returnType).base == "void" and parse_type(f.returnType).ptr == 0 then - w("---@return nil") - else - w("---@return " .. ann_return(f.returnType)) - end - - w("function M." .. f.name .. "(" .. table.concat(sig, ", ") .. ")") - for _, line in ipairs(pre) do - w(" " .. line) - end - - local call = "C." .. f.name .. "(" .. table.concat(args, ", ") .. ")" - local ret = parse_type(f.returnType) - - if #out_vars > 0 then - w(" " .. call) - w(" return " .. table.concat(out_vars, ", ")) - elseif ret.base == "void" and ret.ptr == 0 then - w(" " .. call) - elseif ret.base == "char" and ret.ptr == 1 then - local owner = RET_OWNER[f.name] - w(" local _p = " .. call) - w(" if _p == nil then") - w(" return nil") - w(" end") - w(" local _s = ffi_string(_p)") - if owner then - w(" C." .. owner .. "(_p)") - end - w(" return _s") - else - w(" return " .. call) - end - w("end") - w("") - emitted_wrappers = emitted_wrappers + 1 -end - -for _, f in ipairs(FUNCS) do - if not is_skipped(f) then - if SPECIAL[f.name] then - emit_special(f) - else - emit_function(f) - end - end -end - -w("return M") - ----------------------------------------------------------------------------- --- write ----------------------------------------------------------------------------- - -local text = table.concat(out, "\n") .. "\n" -local file, err = io.open(OUT, "wb") -if not file then - die("cannot write %s: %s", OUT, err) -end -file:write(text) -file:close() - -local n_struct, n_alias, n_cb = 0, 0, 0 -for _, d in ipairs(ordered) do - if d.kind == "struct" then - n_struct = n_struct + 1 - else - n_alias = n_alias + 1 - end -end -for _ in pairs(CALLBACKS) do - n_cb = n_cb + 1 -end -io.stderr:write(string.format( - "gen-hate-no-d: wrote %s (%d functions, %d structs, %d aliases, %d callbacks, %d lines)\n", - OUT, emitted_wrappers, n_struct, n_alias, n_cb, #out)) diff --git a/generate.lua b/generate.lua new file mode 100644 index 0000000..bf64087 --- /dev/null +++ b/generate.lua @@ -0,0 +1,810 @@ +---@class ApiParam +---@field name string +---@field type string +---@field description string + +---@class ApiField +---@field name string +---@field type string +---@field description string + +---@class ApiStruct +---@field name string +---@field description string +---@field fields ApiField[] + +---@class ApiAlias +---@field name string +---@field type string +---@field description string + +---@class ApiCallback +---@field name string +---@field description string +---@field returnType string +---@field params? ApiParam[] + +---@class ApiFunction +---@field name string +---@field description string +---@field returnType string +---@field params? ApiParam[] + +---@class ApiDefine +---@field name string +---@field type string +---@field value string|number +---@field description string + +---@class ApiEnumValue +---@field name string +---@field description string +---@field value string|number + +---@class ApiEnum +---@field name string +---@field description string +---@field values ApiEnumValue[] + +---@class Api +---@field structs ApiStruct[] +---@field aliases ApiAlias[] +---@field callbacks ApiCallback[] +---@field functions ApiFunction[] +---@field defines ApiDefine[] +---@field enums ApiEnum[] + +---@class CType +---@field const boolean +---@field base string +---@field ptr integer + +---@class ParamInfo +---@field ann string +---@field pre string[]|nil +---@field arg string|nil + +---@class GenState +---@field struct_ffi string[] +---@field callback_ffi string[] +---@field function_ffi string[] +---@field define_lines string[] +---@field enum_lines string[] +---@field alias_lines string[] +---@field struct_lines string[] +---@field callback_lines string[] +---@field function_lines string[] +---@field struct_types table +---@field callback_types table +---@field seen_struct_ffi table +---@field seen_alias_ffi table +---@field seen_callback_ffi table +---@field seen_function_ffi table +---@field seen_define table +---@field seen_enum_alias table +---@field seen_constant table +---@field seen_struct_doc table +---@field seen_alias_doc table +---@field seen_callback_doc table +---@field seen_function_doc table + +---@param fmt string +---@param ... any +---@return nil +local function die(fmt, ...) + io.stderr:write("[ERROR] " .. string.format(fmt, ...) .. "\n") + os.exit(1) +end + +---@param file_path string +---@return Api +local function load_api_file(file_path) + local chunk, err = loadfile(file_path) + if not chunk then die("could not load %s: %s", file_path, err) end + ---@cast chunk -nil + + local ok, data = pcall(chunk) + if not ok then die("could not run %s: %s", file_path, data) end + + if type(data) ~= "table" then die("%s did not return a table", file_path) end + + ---@cast data Api + return data +end + +---Register a name the first time it is seen. +---@param seen table +---@param name string +---@return boolean claimed true when this is the first occurrence +local function claim(seen, name) + if seen[name] then return false end + seen[name] = true + return true +end + +---rlgl's parser output contains C preprocessor fragments in some field types; +---ffi.cdef cannot parse those, so they are dropped. +---@param field ApiField +---@return boolean +local function is_usable_field(field) + return field.type:sub(1, 1) ~= "#" +end + +---@param strs ApiStruct[] +---@param aliases ApiAlias[]|nil +---@param seen_structs table +---@param seen_aliases table +---@return string[] +local function structs_and_aliases_as_fii_lines(strs, aliases, seen_structs, seen_aliases) + local result = {} + -- Group aliases by their base struct so we emit them right after the struct is defined + ---@type table + local alias_by_base = {} + for _, a in ipairs(aliases or {}) do + local base = a.type:match("^([%w_]+)") + if not base then die("could not determine base type for alias %s", a.name) end + alias_by_base[base] = alias_by_base[base] or {} + table.insert(alias_by_base[base], a) + end + + for _, str in ipairs(strs) do + if claim(seen_structs, str.name) then + local fields = "" + ---@type table + local field_names = {} + for _, field in ipairs(str.fields) do + if is_usable_field(field) and not field_names[field.name] then + field_names[field.name] = true + local base_type, arr_size = field.type:match("^(.-)(%[%d+%])$") + if base_type then + fields = fields .. base_type .. " " .. field.name .. arr_size .. "; " + else + fields = fields .. field.type .. " " .. field.name .. "; " + end + end + end + if fields == "" then die("created a struct with an empty fields list") end + table.insert(result, string.format("typedef struct %s { %s} %s;", str.name, fields, str.name)) + end + + -- Aliases are emitted once per name, even if the base struct came from an + -- earlier API (the typedef is already in the cdef by then). + if alias_by_base[str.name] then + for _, a in ipairs(alias_by_base[str.name]) do + if claim(seen_aliases, a.name) then + table.insert(result, string.format("typedef %s %s;", a.type, a.name)) + end + end + end + end + + return result +end + +---@param callbacks ApiCallback[]|nil +---@param seen table +---@return string[] +local function callbacks_as_ffi_lines(callbacks, seen) + local result = {} + for _, cb in ipairs(callbacks or {}) do + if claim(seen, cb.name) then + local params = {} + for _, p in ipairs(cb.params or {}) do + table.insert(params, p.type .. " " .. p.name) + end + table.insert(result, string.format("typedef %s (*%s)(%s);", cb.returnType, cb.name, table.concat(params, ", "))) + end + end + return result +end + +---@param funcs ApiFunction[] +---@param seen table +---@return string[] +local function functions_as_ffi_lines(funcs, seen) + local result = {} + for _, func in ipairs(funcs) do + if claim(seen, func.name) then + local params = {} + for _, param in ipairs(func.params or {}) do + if param.type == "..." then + table.insert(params, "...") + else + table.insert(params, param.type .. " " .. param.name) + end + end + table.insert(result, string.format("%s %s(%s);", func.returnType, func.name, table.concat(params, ", "))) + end + end + return result +end + +---@param defs ApiDefine[] +---@param seen table +---@param seen_defines table +---@return string[] +local function defines_as_lines(defs, seen, seen_defines) + local result = {} + for _, def in ipairs(defs) do + local def_type = def.type + local ignored = def_type == "GUARD" or def_type == "MACRO" or def_type == "UNKNOWN" + if not ignored and claim(seen, def.name) then + seen_defines[def.name] = true + if def_type == "INT" or def_type == "STRING" or def_type == "FLOAT" or def_type == "INT_MATH" then + local value = def.value + if def_type == "STRING" then value = "\"" .. tostring(def.value) .. "\"" end + local str = "" .. def.name .. " = " .. tostring(value) + if def.description ~= "" then str = str .. " --" .. def.description end + table.insert(result, str) + elseif def_type == "FLOAT_MATH" then + if def.name == "DEG2RAD" then + table.insert(result, "DEG2RAD = 0.017453292519943") + elseif def.name == "RAD2DEG" then + table.insert(result, "RAD2DEG = 57.295779513082") + else + die("unknown float math define name %s", def.name) + end + elseif def_type == "COLOR" then + local r, g, b, a = tostring(def.value):match("{%s*(%d+)%s*,%s*(%d+)%s*,%s*(%d+)%s*,%s*(%d+)%s*}") + if not r then die("could not parse color define %s", def.name) end + local str = string.format('%s = ffi.new("Color", { r = %s, g = %s, b = %s, a = %s })', def.name, r, g, b, a) + table.insert(result, str) + else + die("unknown define type %s", def_type) + end + end + end + return result +end + +---@param enums ApiEnum[] +---@param seen_aliases table +---@param seen_values table +---@return string[] +local function enums_as_lines(enums, seen_aliases, seen_values) + local result = {} + for _, enum in ipairs(enums) do + if claim(seen_aliases, enum.name) then + table.insert(result, string.format("---%s", enum.description)) + table.insert(result, string.format("---@alias %s", enum.name)) + for _, value in ipairs(enum.values) do + table.insert(result, string.format("---| `%s` #%s", value.name, value.description)) + end + end + for _, value in ipairs(enum.values) do + if claim(seen_values, value.name) then + if value.description ~= "" then table.insert(result, string.format("--- %s", value.description)) end + table.insert(result, string.format("%s = %s", value.name, value.value)) + end + end + table.insert(result, "") + end + return result +end + +---@type table +local c_type_map = { + ["bool"] = "boolean", + ["float"] = "number", + ["double"] = "number", + ["int"] = "integer", + ["unsigned int"] = "integer", + ["long"] = "integer", + ["unsigned long"] = "integer", + ["short"] = "integer", + ["unsigned short"] = "integer", + ["char"] = "integer", + ["unsigned char"] = "integer", +} + +---@param c_type string +---@return string +local function map_type(c_type) + -- Strip leading "const " first so "const char *" and "const void *" match cleanly + c_type = c_type:gsub("^const%s+", "") + + -- Special cases for C strings and void pointers in Raylib + if c_type == "char *" or c_type:match("^char%[%d+%]$") then + return "string" + elseif c_type == "void *" or c_type == "rAudioBuffer *" or c_type == "rAudioProcessor *" or c_type == "va_list" then + return "ffi.cdata*" + end + + -- Fixed-size arrays like "float[4]" or "Matrix[2]" + local base_type = c_type:match("^(.-)%[%d+%]$") + if base_type then + return map_type(base_type) .. "[]" + end + + -- Pointers like "int *" or "Rectangle **" + local ptr_base = c_type:match("^(.-)%s*%*$") + if ptr_base then + return map_type(ptr_base) .. "[]" + end + + return c_type_map[c_type] or c_type +end + +---Split a C type into pointer depth, constness and base name. +---@param c_type string +---@return CType +local function parse_ctype(c_type) + local s = c_type:gsub("^%s+", ""):gsub("%s+$", "") + local is_const = false + if s:match("^const%s+") then + is_const = true + s = s:gsub("^const%s+", "") + end + + local ptr = 0 + while true do + local stripped = s:gsub("%s*%*%s*$", "") + if stripped == s then break end + ptr = ptr + 1 + s = stripped:gsub("%s+$", "") + -- const after the pointer is not used by these APIs, but tolerate it + s = s:gsub("^const%s+", "") + end + + return { const = is_const, base = s, ptr = ptr } +end + +---@param aliases ApiAlias[] +---@param seen table +---@return string[] +local function aliases_as_lines(aliases, seen) + local result = {} + for _, alias in ipairs(aliases) do + if claim(seen, alias.name) then + table.insert(result, string.format("---%s", alias.description)) + table.insert(result, string.format("---@alias %s %s", alias.name, map_type(alias.type))) + table.insert(result, "") + end + end + return result +end + +---@param strs ApiStruct[] +---@param seen table +---@return string[] +local function structs_as_lines(strs, seen) + local result = {} + for _, str in ipairs(strs) do + if claim(seen, str.name) then + table.insert(result, string.format("---%s", str.description)) + table.insert(result, string.format("---@class %s", str.name)) + ---@type table + local field_names = {} + for _, field in ipairs(str.fields) do + if is_usable_field(field) and not field_names[field.name] then + field_names[field.name] = true + table.insert(result, string.format("---@field %s %s %s", field.name, map_type(field.type), field.description)) + end + end + table.insert(result, "") + end + end + return result +end + +---@param callbacks ApiCallback[] +---@param seen table +---@return string[] +local function callbacks_as_lines(callbacks, seen) + local result = {} + for _, c in ipairs(callbacks) do + if claim(seen, c.name) then + if c.description ~= "" then + table.insert(result, string.format("---%s", c.description)) + end + local params = "" + if c.params then + for i, param in ipairs(c.params) do + params = params .. param.name .. ": " .. map_type(param.type) + if #c.params > 1 and i < #c.params then params = params .. ", " end + end + end + local ret = "" + if c.returnType ~= "void" then + ret = ": " .. map_type(c.returnType) + end + table.insert(result, string.format("---@alias %s fun(%s)%s", c.name, params, ret)) + table.insert(result, "") + end + end + return result +end + +---@type table +local param_enum_map = { + -- By parameter name across Raylib: + ["key"] = "KeyboardKey", + ["logLevel"] = "TraceLogLevel", + ["cursor"] = "MouseCursor", + ["axis"] = "GamepadAxis", + ["uniformType"] = "ShaderUniformDataType", + ["filter"] = "TextureFilter", + ["wrap"] = "TextureWrap", + ["gesture"] = "Gesture", + ["mapType"] = "MaterialMapIndex", + -- Disambiguated by FunctionName.paramName: + ["IsWindowState.flag"] = "ConfigFlags", + ["SetWindowState.flags"] = "ConfigFlags", + ["ClearWindowState.flags"] = "ConfigFlags", + ["SetConfigFlags.flags"] = "ConfigFlags", + ["SetGesturesEnabled.flags"] = "Gesture", + ["BeginBlendMode.mode"] = "BlendMode", + ["UpdateCamera.mode"] = "CameraMode", + ["LoadTextureCubemap.layout"] = "CubemapLayout", + ["IsMouseButtonPressed.button"] = "MouseButton", + ["IsMouseButtonDown.button"] = "MouseButton", + ["IsMouseButtonReleased.button"] = "MouseButton", + ["IsMouseButtonUp.button"] = "MouseButton", + ["IsGamepadButtonPressed.button"] = "GamepadButton", + ["IsGamepadButtonDown.button"] = "GamepadButton", + ["IsGamepadButtonReleased.button"] = "GamepadButton", + ["IsGamepadButtonUp.button"] = "GamepadButton", +} + +---@type table +local return_enum_map = { + ["GetKeyPressed"] = "KeyboardKey", + ["GetGamepadButtonPressed"] = "GamepadButton", + ["GetGestureDetected"] = "Gesture", +} + +---@param dst string[] +---@param src string[] +---@return nil +local function append_all(dst, src) + for _, line in ipairs(src) do + dst[#dst + 1] = line + end +end + +---@param func ApiFunction +---@param param ApiParam +---@param index integer +---@param pname string +---@param struct_types table +---@param callback_types table +---@return ParamInfo +local function param_info(func, param, index, pname, struct_types, callback_types) + local ct = parse_ctype(param.type) + local var = "_a" .. index + + if ct.ptr == 0 then + if callback_types[ct.base] then + return { ann = "ffi.cdata*", pre = nil, arg = nil } + end + local ptype = param_enum_map[func.name .. "." .. pname] + or ((param.type == "int" or param.type == "unsigned int") and param_enum_map[pname]) + or map_type(param.type) + return { ann = ptype, pre = nil, arg = nil } + end + + -- char ** / const char **: array of Lua strings + if ct.base == "char" and ct.ptr == 2 then + local array = 'to_array("const char *", ' .. pname .. ")" + if not ct.const then + array = 'ffi.cast("char **", ' .. array .. ")" + end + return { + ann = "string[]|ffi.cdata*", + arg = var, + pre = { + "local " .. var, + 'if type(' .. pname .. ') == "table" then ' .. var .. " = " .. array, + "else " .. var .. " = " .. pname .. " end", + }, + } + end + + -- const char * accepts a Lua string; non-const char * is a mutable buffer + if ct.base == "char" and ct.ptr == 1 then + if ct.const then + return { ann = "string", pre = nil, arg = nil } + end + return { ann = "ffi.cdata*", pre = nil, arg = nil } + end + + if ct.base == "unsigned char" and ct.ptr == 1 and ct.const then + return { + ann = "string|integer[]|ffi.cdata*", + arg = var, + pre = { + "local " .. var, + string.format('if type(%s) == "string" then %s = ffi.cast("const unsigned char *", %s)', pname, var, pname), + string.format('elseif type(%s) == "table" then %s = to_array("unsigned char", %s)', pname, var, pname), + "else " .. var .. " = " .. pname .. " end", + }, + } + end + + if ct.base == "void" and ct.ptr == 1 and ct.const then + return { + ann = "string|ffi.cdata*", + arg = var, + pre = { + "local " .. var, + string.format('if type(%s) == "string" then %s = ffi.cast("const void *", %s)', pname, var, pname), + "else " .. var .. " = " .. pname .. " end", + }, + } + end + + -- const T * where T is a scalar or a known struct/alias: tables become arrays + if ct.const and ct.ptr == 1 and (c_type_map[ct.base] ~= nil or struct_types[ct.base]) then + return { + ann = map_type(ct.base) .. "[]|ffi.cdata*", + arg = var, + pre = { + "local " .. var, + string.format('if type(%s) == "table" then %s = to_array("%s", %s)', pname, var, ct.base, pname), + "else " .. var .. " = " .. pname .. " end", + }, + } + end + + return { ann = "ffi.cdata*", pre = nil, arg = nil } +end + +---@param func ApiFunction +---@return string|nil +local function return_ann(func) + local ct = parse_ctype(func.returnType) + if ct.ptr == 0 then + if ct.base == "void" then return nil end + return return_enum_map[func.name] or map_type(func.returnType) + end + if ct.base == "char" and ct.ptr == 1 then + return ct.const and "string" or "string|nil" + end + return "ffi.cdata*" +end + +---@param funcs ApiFunction[] +---@param seen table +---@param struct_types table +---@param callback_types table +---@return string[] +local function functions_as_lines(funcs, seen, struct_types, callback_types) + local result = {} + for _, func in ipairs(funcs) do + if claim(seen, func.name) then + if func.name == "TextFormat" then + -- LuaJIT cannot forward Lua varargs to a C vararg function with + -- unknown types, so format in Lua and never call C here. + table.insert(result, "---" .. func.description) + table.insert(result, "---@param fmt string") + table.insert(result, "---@param ... any") + table.insert(result, "---@return string") + table.insert(result, "function TextFormat(fmt, ...)") + table.insert(result, ' if select("#", ...) == 0 then') + table.insert(result, " return fmt") + table.insert(result, " end") + table.insert(result, " return string_format(fmt, ...)") + table.insert(result, "end") + elseif func.name == "TraceLog" then + table.insert(result, "---" .. func.description) + table.insert(result, "---@param level TraceLogLevel") + table.insert(result, "---@param fmt string") + table.insert(result, "---@param ... any") + table.insert(result, "---@return nil") + table.insert(result, "function TraceLog(level, fmt, ...)") + table.insert(result, ' if select("#", ...) == 0 then') + table.insert(result, ' C.TraceLog(level, "%s", fmt)') + table.insert(result, " else") + table.insert(result, ' C.TraceLog(level, "%s", string_format(fmt, ...))') + table.insert(result, " end") + table.insert(result, "end") + else + table.insert(result, "---" .. func.description) + local sig = {} + local args = {} + local pre = {} + local ann = {} + for i, param in ipairs(func.params or {}) do + local pname = (param.name == "end") and "_end" or param.name + if param.type == "..." then + table.insert(ann, "---@param ... any") + table.insert(sig, "...") + table.insert(args, "...") + else + local info = param_info(func, param, i, pname, struct_types, callback_types) + table.insert(ann, string.format("---@param %s %s", pname, info.ann)) + if info.pre then append_all(pre, info.pre) end + table.insert(sig, pname) + table.insert(args, info.arg or pname) + end + end + + for _, line in ipairs(ann) do table.insert(result, line) end + local ra = return_ann(func) + if ra then table.insert(result, "---@return " .. ra) end + + local param_str = table.concat(sig, ", ") + local call = string.format("C.%s(%s)", func.name, table.concat(args, ", ")) + table.insert(result, string.format("function %s(%s)", func.name, param_str)) + for _, line in ipairs(pre) do table.insert(result, " " .. line) end + + local ct = parse_ctype(func.returnType) + if ra == nil then + table.insert(result, " " .. call) + elseif ct.base == "char" and ct.ptr == 1 and ct.const then + table.insert(result, " local _r = " .. call) + table.insert(result, ' return _r ~= nil and ffi.string(_r) or ""') + elseif ct.base == "char" and ct.ptr == 1 then + table.insert(result, " local _r = " .. call) + table.insert(result, " if _r == nil then return nil end") + table.insert(result, " return ffi.string(_r)") + else + table.insert(result, " return " .. call) + end + table.insert(result, "end") + end + table.insert(result, "") + end + end + return result +end + +---@param tbl table +---@return integer +local function count_keys(tbl) + local n = 0 + for _ in pairs(tbl) do n = n + 1 end + return n +end + +---@return GenState +local function new_state() + return { + struct_ffi = {}, + callback_ffi = {}, + function_ffi = {}, + define_lines = {}, + enum_lines = {}, + alias_lines = {}, + struct_lines = {}, + callback_lines = {}, + function_lines = {}, + struct_types = {}, + callback_types = {}, + + seen_struct_ffi = {}, + seen_alias_ffi = {}, + seen_callback_ffi = {}, + seen_function_ffi = {}, + seen_define = {}, + seen_enum_alias = {}, + seen_constant = {}, + seen_struct_doc = {}, + seen_alias_doc = {}, + seen_callback_doc = {}, + seen_function_doc = {}, + } +end + +---@param api Api +---@param st GenState +---@return nil +local function wapi(api, st) + append_all(st.struct_ffi, structs_and_aliases_as_fii_lines( + api.structs, api.aliases, st.seen_struct_ffi, st.seen_alias_ffi)) + append_all(st.callback_ffi, callbacks_as_ffi_lines(api.callbacks, st.seen_callback_ffi)) + append_all(st.function_ffi, functions_as_ffi_lines(api.functions, st.seen_function_ffi)) + append_all(st.define_lines, defines_as_lines(api.defines, st.seen_constant, st.seen_define)) + append_all(st.enum_lines, enums_as_lines(api.enums, st.seen_enum_alias, st.seen_constant)) + append_all(st.alias_lines, aliases_as_lines(api.aliases, st.seen_alias_doc)) + append_all(st.struct_lines, structs_as_lines(api.structs, st.seen_struct_doc)) + append_all(st.callback_lines, callbacks_as_lines(api.callbacks, st.seen_callback_doc)) + append_all(st.function_lines, functions_as_lines( + api.functions, st.seen_function_doc, st.struct_types, st.callback_types)) +end + +local lines = {} + +---@param line string +---@return nil +local function aline(line) + lines[#lines + 1] = line -- append a line. +end + +-- Load order determines output order. +---@type string[] +local api_paths = { + "build/api/raylib_api.lua", + "build/api/rlgl_api.lua", + "build/api/raymath_api.lua", + "build/api/raygui_api.lua", +} + +---@type Api[] +local apis = {} +for _, path in ipairs(api_paths) do + apis[#apis + 1] = load_api_file(path) +end + +local st = new_state() + +---@type string[] +local api_labels = {} +for i, api in ipairs(apis) do + for _, str in ipairs(api.structs) do st.struct_types[str.name] = true end + for _, alias in ipairs(api.aliases) do st.struct_types[alias.name] = true end + for _, cb in ipairs(api.callbacks) do st.callback_types[cb.name] = true end + local label = api_paths[i]:match("([^/]+)_api%.lua$") or api_paths[i] + api_labels[#api_labels + 1] = string.format("%s (%d functions)", label, #api.functions) +end + +for _, api in ipairs(apis) do + wapi(api, st) +end + +---@type string +local out_path = (arg and arg[1]) or "hate-no-d.lua" + +local n_functions = count_keys(st.seen_function_doc) +local n_structs = count_keys(st.seen_struct_doc) +local n_aliases = count_keys(st.seen_alias_doc) +local n_callbacks = count_keys(st.seen_callback_doc) +local n_defines = count_keys(st.seen_define) +local n_enums = count_keys(st.seen_enum_alias) + +aline("--[[") +aline(string.format(" %s - generated by generate.lua, do not edit.", out_path)) +aline(" APIs: " .. table.concat(api_labels, ", ")) +aline(string.format(" %d functions, %d structs, %d aliases, %d callbacks, %d defines, %d enums", + n_functions, n_structs, n_aliases, n_callbacks, n_defines, n_enums)) +aline("]]") +aline("") +aline('local ffi = require("ffi")') +aline("") +aline("ffi.cdef[[") +aline("typedef struct rAudioBuffer rAudioBuffer;") +aline("typedef struct rAudioProcessor rAudioProcessor;") +for _, l in ipairs(st.struct_ffi) do aline(l) end +aline("") +for _, l in ipairs(st.callback_ffi) do aline(l) end +aline("") +for _, l in ipairs(st.function_ffi) do aline(l) end +aline("]]") +aline("") +aline("local C = ffi.C") +aline("local string_format = string.format") +aline("local type, select = type, select") +aline("") +aline("local function to_array(ct, t, n)") +aline(" n = n or #t") +aline(' local a = ffi.new(ct .. "[?]", n)') +aline(" for i = 1, n do") +aline(" a[i - 1] = t[i]") +aline(" end") +aline(" return a") +aline("end") +aline("") +for _, l in ipairs(st.define_lines) do aline(l) end +aline("") +for _, l in ipairs(st.enum_lines) do aline(l) end +aline("") +for _, l in ipairs(st.alias_lines) do aline(l) end +aline("") +for _, l in ipairs(st.struct_lines) do aline(l) end +aline("") +for _, l in ipairs(st.callback_lines) do aline(l) end +aline("") +for _, l in ipairs(st.function_lines) do aline(l) end + +local fh, open_err = io.open(out_path, "wb") +if not fh then die("could not open %s for writing: %s", out_path, open_err) end +---@cast fh -nil + +fh:write(table.concat(lines, "\n")) +fh:write("\n") +fh:close() + +io.stderr:write(string.format( + "generate: wrote %s (%d functions, %d structs, %d aliases, %d callbacks, %d defines, %d enums)\n", + out_path, n_functions, n_structs, n_aliases, n_callbacks, n_defines, n_enums +)) diff --git a/hate-no-d.lua b/hate-no-d.lua index f6f2630..6da6fa6 100644 --- a/hate-no-d.lua +++ b/hate-no-d.lua @@ -1,381 +1,88 @@ --[[ - hate-no-d.lua - generated by gen-hate-no-d.lua, do not edit. - - raylib 6.5-dev / rlgl / raymath / raygui 5.1-dev - Functions: 989 - - raymath symbols come from rcore.o (RAYMATH_IMPLEMENTATION) in libraylib.a. - raygui symbols come from a forced -include of raygui.h (RAYGUI_IMPLEMENTATION). + hate-no-d.lua - generated by generate.lua, do not edit. + APIs: raylib (619 functions), rlgl (163 functions), raymath (146 functions), raygui (61 functions) + 989 functions, 42 structs, 6 aliases, 6 callbacks, 161 defines, 53 enums ]] local ffi = require("ffi") ffi.cdef[[ -struct rAudioBuffer; -struct rAudioProcessor; - -typedef struct Vector2 { - float x; - float y; -} Vector2; - -typedef struct Vector3 { - float x; - float y; - float z; -} Vector3; - -typedef struct Vector4 { - float x; - float y; - float z; - float w; -} Vector4; - -typedef struct Matrix { - float m0; - float m4; - float m8; - float m12; - float m1; - float m5; - float m9; - float m13; - float m2; - float m6; - float m10; - float m14; - float m3; - float m7; - float m11; - float m15; -} Matrix; - -typedef struct Color { - unsigned char r; - unsigned char g; - unsigned char b; - unsigned char a; -} Color; - -typedef struct Rectangle { - float x; - float y; - float width; - float height; -} Rectangle; - -typedef struct Image { - void *data; - int width; - int height; - int mipmaps; - int format; -} Image; - -typedef struct Texture { - unsigned int id; - int width; - int height; - int mipmaps; - int format; -} Texture; - -typedef struct RenderTexture { - unsigned int id; - Texture texture; - Texture depth; -} RenderTexture; - -typedef struct NPatchInfo { - Rectangle source; - int left; - int top; - int right; - int bottom; - int layout; -} NPatchInfo; - -typedef struct GlyphInfo { - int value; - int offsetX; - int offsetY; - int advanceX; - Image image; -} GlyphInfo; - -typedef Texture Texture2D; - -typedef struct Font { - int baseSize; - int glyphCount; - int glyphPadding; - Texture2D texture; - Rectangle *recs; - GlyphInfo *glyphs; -} Font; - -typedef struct Camera3D { - Vector3 position; - Vector3 target; - Vector3 up; - float fovy; - int projection; -} Camera3D; - -typedef struct Camera2D { - Vector2 offset; - Vector2 target; - float rotation; - float zoom; -} Camera2D; - -typedef struct Mesh { - int vertexCount; - int triangleCount; - float *vertices; - float *texcoords; - float *texcoords2; - float *normals; - float *tangents; - unsigned char *colors; - unsigned short *indices; - int boneCount; - unsigned char *boneIndices; - float *boneWeights; - float *animVertices; - float *animNormals; - unsigned int vaoId; - unsigned int *vboId; -} Mesh; - -typedef struct Shader { - unsigned int id; - int *locs; -} Shader; - -typedef struct MaterialMap { - Texture2D texture; - Color color; - float value; -} MaterialMap; - -typedef struct Material { - Shader shader; - MaterialMap *maps; - float params[4]; -} Material; - +typedef struct rAudioBuffer rAudioBuffer; +typedef struct rAudioProcessor rAudioProcessor; +typedef struct Vector2 { float x; float y; } Vector2; +typedef struct Vector3 { float x; float y; float z; } Vector3; +typedef struct Vector4 { float x; float y; float z; float w; } Vector4; typedef Vector4 Quaternion; - -typedef struct Transform { - Vector3 translation; - Quaternion rotation; - Vector3 scale; -} Transform; - -typedef struct BoneInfo { - char name[32]; - int parent; -} BoneInfo; - -typedef Transform * ModelAnimPose; - -typedef struct ModelSkeleton { - unsigned int boneCount; - BoneInfo *bones; - ModelAnimPose bindPose; -} ModelSkeleton; - -typedef struct Model { - Matrix transform; - int meshCount; - int materialCount; - Mesh *meshes; - Material *materials; - int *meshMaterial; - ModelSkeleton skeleton; - ModelAnimPose currentPose; - Matrix *boneMatrices; -} Model; - -typedef struct ModelAnimation { - char name[32]; - unsigned int boneCount; - int keyframeCount; - ModelAnimPose *keyframePoses; -} ModelAnimation; - -typedef struct Ray { - Vector3 position; - Vector3 direction; -} Ray; - -typedef struct RayCollision { - bool hit; - float distance; - Vector3 point; - Vector3 normal; -} RayCollision; - -typedef struct BoundingBox { - Vector3 min; - Vector3 max; -} BoundingBox; - -typedef struct Wave { - unsigned int frameCount; - unsigned int sampleRate; - unsigned int sampleSize; - unsigned int channels; - void *data; -} Wave; - -typedef struct AudioStream { - struct rAudioBuffer *buffer; - struct rAudioProcessor *processor; - unsigned int sampleRate; - unsigned int sampleSize; - unsigned int channels; -} AudioStream; - -typedef struct Sound { - AudioStream stream; - unsigned int frameCount; -} Sound; - -typedef struct Music { - AudioStream stream; - unsigned int frameCount; - bool looping; - int ctxType; - void *ctxData; -} Music; - -typedef struct VrDeviceInfo { - int hResolution; - int vResolution; - float hScreenSize; - float vScreenSize; - float eyeToScreenDistance; - float lensSeparationDistance; - float interpupillaryDistance; - float lensDistortionValues[4]; - float chromaAbCorrection[4]; -} VrDeviceInfo; - -typedef struct VrStereoConfig { - Matrix projection[2]; - Matrix viewOffset[2]; - float leftLensCenter[2]; - float rightLensCenter[2]; - float leftScreenCenter[2]; - float rightScreenCenter[2]; - float scale[2]; - float scaleIn[2]; -} VrStereoConfig; - -typedef struct FilePathList { - unsigned int count; - char **paths; -} FilePathList; - -typedef struct AutomationEvent { - unsigned int frame; - unsigned int type; - int params[4]; -} AutomationEvent; - -typedef struct AutomationEventList { - unsigned int capacity; - unsigned int count; - AutomationEvent *events; -} AutomationEventList; - +typedef struct Matrix { float m0; float m4; float m8; float m12; float m1; float m5; float m9; float m13; float m2; float m6; float m10; float m14; float m3; float m7; float m11; float m15; } Matrix; +typedef struct Color { unsigned char r; unsigned char g; unsigned char b; unsigned char a; } Color; +typedef struct Rectangle { float x; float y; float width; float height; } Rectangle; +typedef struct Image { void * data; int width; int height; int mipmaps; int format; } Image; +typedef struct Texture { unsigned int id; int width; int height; int mipmaps; int format; } Texture; +typedef Texture Texture2D; typedef Texture TextureCubemap; - +typedef struct RenderTexture { unsigned int id; Texture texture; Texture depth; } RenderTexture; typedef RenderTexture RenderTexture2D; - +typedef struct NPatchInfo { Rectangle source; int left; int top; int right; int bottom; int layout; } NPatchInfo; +typedef struct GlyphInfo { int value; int offsetX; int offsetY; int advanceX; Image image; } GlyphInfo; +typedef struct Font { int baseSize; int glyphCount; int glyphPadding; Texture2D texture; Rectangle * recs; GlyphInfo * glyphs; } Font; +typedef struct Camera3D { Vector3 position; Vector3 target; Vector3 up; float fovy; int projection; } Camera3D; typedef Camera3D Camera; +typedef struct Camera2D { Vector2 offset; Vector2 target; float rotation; float zoom; } Camera2D; +typedef struct Mesh { int vertexCount; int triangleCount; float * vertices; float * texcoords; float * texcoords2; float * normals; float * tangents; unsigned char * colors; unsigned short * indices; int boneCount; unsigned char * boneIndices; float * boneWeights; float * animVertices; float * animNormals; unsigned int vaoId; unsigned int * vboId; } Mesh; +typedef struct Shader { unsigned int id; int * locs; } Shader; +typedef struct MaterialMap { Texture2D texture; Color color; float value; } MaterialMap; +typedef struct Material { Shader shader; MaterialMap * maps; float params[4]; } Material; +typedef struct Transform { Vector3 translation; Quaternion rotation; Vector3 scale; } Transform; +typedef Transform * ModelAnimPose; +typedef struct BoneInfo { char name[32]; int parent; } BoneInfo; +typedef struct ModelSkeleton { unsigned int boneCount; BoneInfo * bones; ModelAnimPose bindPose; } ModelSkeleton; +typedef struct Model { Matrix transform; int meshCount; int materialCount; Mesh * meshes; Material * materials; int * meshMaterial; ModelSkeleton skeleton; ModelAnimPose currentPose; Matrix * boneMatrices; } Model; +typedef struct ModelAnimation { char name[32]; unsigned int boneCount; int keyframeCount; ModelAnimPose * keyframePoses; } ModelAnimation; +typedef struct Ray { Vector3 position; Vector3 direction; } Ray; +typedef struct RayCollision { bool hit; float distance; Vector3 point; Vector3 normal; } RayCollision; +typedef struct BoundingBox { Vector3 min; Vector3 max; } BoundingBox; +typedef struct Wave { unsigned int frameCount; unsigned int sampleRate; unsigned int sampleSize; unsigned int channels; void * data; } Wave; +typedef struct AudioStream { rAudioBuffer * buffer; rAudioProcessor * processor; unsigned int sampleRate; unsigned int sampleSize; unsigned int channels; } AudioStream; +typedef struct Sound { AudioStream stream; unsigned int frameCount; } Sound; +typedef struct Music { AudioStream stream; unsigned int frameCount; bool looping; int ctxType; void * ctxData; } Music; +typedef struct VrDeviceInfo { int hResolution; int vResolution; float hScreenSize; float vScreenSize; float eyeToScreenDistance; float lensSeparationDistance; float interpupillaryDistance; float lensDistortionValues[4]; float chromaAbCorrection[4]; } VrDeviceInfo; +typedef struct VrStereoConfig { Matrix projection[2]; Matrix viewOffset[2]; float leftLensCenter[2]; float rightLensCenter[2]; float leftScreenCenter[2]; float rightScreenCenter[2]; float scale[2]; float scaleIn[2]; } VrStereoConfig; +typedef struct FilePathList { unsigned int count; char ** paths; } FilePathList; +typedef struct AutomationEvent { unsigned int frame; unsigned int type; int params[4]; } AutomationEvent; +typedef struct AutomationEventList { unsigned int capacity; unsigned int count; AutomationEvent * events; } AutomationEventList; +typedef struct rlVertexBuffer { int elementCount; float * vertices; float * texcoords; float * normals; unsigned char * colors; unsigned int * indices; unsigned int vaoId; unsigned int vboId[5]; } rlVertexBuffer; +typedef struct rlDrawCall { int mode; int vertexCount; int vertexAlignment; unsigned int textureId; } rlDrawCall; +typedef struct rlRenderBatch { int bufferCount; int currentBuffer; rlVertexBuffer * vertexBuffer; rlDrawCall * draws; int drawCounter; float currentDepth; } rlRenderBatch; +typedef struct float3 { float v[3]; } float3; +typedef struct float16 { float v[16]; } float16; +typedef struct GuiStyleProp { unsigned short controlId; unsigned short propertyId; int propertyValue; } GuiStyleProp; +typedef struct GuiTextStyle { unsigned int size; int charSpacing; int lineSpacing; int alignmentH; int alignmentV; int padding; } GuiTextStyle; -typedef struct rlVertexBuffer { - int elementCount; - float *vertices; - float *texcoords; - float *normals; - unsigned char *colors; - unsigned int *indices; - unsigned int vaoId; - unsigned int vboId[5]; -} rlVertexBuffer; - -typedef struct rlDrawCall { - int mode; - int vertexCount; - int vertexAlignment; - unsigned int textureId; -} rlDrawCall; - -typedef struct rlRenderBatch { - int bufferCount; - int currentBuffer; - rlVertexBuffer *vertexBuffer; - rlDrawCall *draws; - int drawCounter; - float currentDepth; -} rlRenderBatch; - -typedef struct float3 { - float v[3]; -} float3; - -typedef struct float16 { - float v[16]; -} float16; - -typedef struct GuiStyleProp { - unsigned short controlId; - unsigned short propertyId; - int propertyValue; -} GuiStyleProp; - -typedef struct GuiTextStyle { - unsigned int size; - int charSpacing; - int lineSpacing; - int alignmentH; - int alignmentV; - int padding; -} GuiTextStyle; - +typedef void (*TraceLogCallback)(int logLevel, const char * text, va_list args); +typedef unsigned char * (*LoadFileDataCallback)(const char * fileName, int * dataSize); +typedef bool (*SaveFileDataCallback)(const char * fileName, const void * data, int dataSize); +typedef char * (*LoadFileTextCallback)(const char * fileName); +typedef bool (*SaveFileTextCallback)(const char * fileName, const char * text); typedef void (*AudioCallback)(void * bufferData, unsigned int frames); -typedef unsigned char * (*LoadFileDataCallback)(const char * fileName, int * dataSize); - -typedef bool (*SaveFileDataCallback)(const char * fileName, const void * data, int dataSize); - -typedef char * (*LoadFileTextCallback)(const char * fileName); - -typedef bool (*SaveFileTextCallback)(const char * fileName, const char * text); - void InitWindow(int width, int height, const char * title); -void CloseWindow(void); -bool WindowShouldClose(void); -bool IsWindowReady(void); -bool IsWindowFullscreen(void); -bool IsWindowHidden(void); -bool IsWindowMinimized(void); -bool IsWindowMaximized(void); -bool IsWindowFocused(void); -bool IsWindowResized(void); +void CloseWindow(); +bool WindowShouldClose(); +bool IsWindowReady(); +bool IsWindowFullscreen(); +bool IsWindowHidden(); +bool IsWindowMinimized(); +bool IsWindowMaximized(); +bool IsWindowFocused(); +bool IsWindowResized(); bool IsWindowState(unsigned int flag); void SetWindowState(unsigned int flags); void ClearWindowState(unsigned int flags); -void ToggleFullscreen(void); -void ToggleBorderlessWindowed(void); -void MaximizeWindow(void); -void MinimizeWindow(void); -void RestoreWindow(void); +void ToggleFullscreen(); +void ToggleBorderlessWindowed(); +void MaximizeWindow(); +void MinimizeWindow(); +void RestoreWindow(); void SetWindowIcon(Image image); void SetWindowIcons(Image * images, int count); void SetWindowTitle(const char * title); @@ -385,51 +92,51 @@ void SetWindowMinSize(int width, int height); void SetWindowMaxSize(int width, int height); void SetWindowSize(int width, int height); void SetWindowOpacity(float opacity); -void SetWindowFocused(void); -void * GetWindowHandle(void); -int GetScreenWidth(void); -int GetScreenHeight(void); -int GetRenderWidth(void); -int GetRenderHeight(void); -int GetMonitorCount(void); -int GetCurrentMonitor(void); +void SetWindowFocused(); +void * GetWindowHandle(); +int GetScreenWidth(); +int GetScreenHeight(); +int GetRenderWidth(); +int GetRenderHeight(); +int GetMonitorCount(); +int GetCurrentMonitor(); Vector2 GetMonitorPosition(int monitor); int GetMonitorWidth(int monitor); int GetMonitorHeight(int monitor); int GetMonitorPhysicalWidth(int monitor); int GetMonitorPhysicalHeight(int monitor); int GetMonitorRefreshRate(int monitor); -Vector2 GetWindowPosition(void); -Vector2 GetWindowScaleDPI(void); +Vector2 GetWindowPosition(); +Vector2 GetWindowScaleDPI(); const char * GetMonitorName(int monitor); void SetClipboardText(const char * text); -const char * GetClipboardText(void); -Image GetClipboardImage(void); -void EnableEventWaiting(void); -void DisableEventWaiting(void); -void ShowCursor(void); -void HideCursor(void); -bool IsCursorHidden(void); -void EnableCursor(void); -void DisableCursor(void); -bool IsCursorOnScreen(void); +const char * GetClipboardText(); +Image GetClipboardImage(); +void EnableEventWaiting(); +void DisableEventWaiting(); +void ShowCursor(); +void HideCursor(); +bool IsCursorHidden(); +void EnableCursor(); +void DisableCursor(); +bool IsCursorOnScreen(); void ClearBackground(Color color); -void BeginDrawing(void); -void EndDrawing(void); +void BeginDrawing(); +void EndDrawing(); void BeginMode2D(Camera2D camera); -void EndMode2D(void); +void EndMode2D(); void BeginMode3D(Camera3D camera); -void EndMode3D(void); +void EndMode3D(); void BeginTextureMode(RenderTexture2D target); -void EndTextureMode(void); +void EndTextureMode(); void BeginShaderMode(Shader shader); -void EndShaderMode(void); +void EndShaderMode(); void BeginBlendMode(int mode); -void EndBlendMode(void); +void EndBlendMode(); void BeginScissorMode(int x, int y, int width, int height); -void EndScissorMode(void); +void EndScissorMode(); void BeginVrStereoMode(VrStereoConfig config); -void EndVrStereoMode(void); +void EndVrStereoMode(); VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device); void UnloadVrStereoConfig(VrStereoConfig config); Shader LoadShader(const char * vsFileName, const char * fsFileName); @@ -451,11 +158,11 @@ Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); Matrix GetCameraMatrix(Camera camera); Matrix GetCameraMatrix2D(Camera2D camera); void SetTargetFPS(int fps); -float GetFrameTime(void); -double GetTime(void); -int GetFPS(void); -void SwapScreenBuffer(void); -void PollInputEvents(void); +float GetFrameTime(); +double GetTime(); +int GetFPS(); +void SwapScreenBuffer(); +void PollInputEvents(); void WaitTime(double seconds); void SetRandomSeed(unsigned int seed); int GetRandomValue(int min, int max); @@ -466,6 +173,7 @@ void SetConfigFlags(unsigned int flags); void OpenURL(const char * url); void SetTraceLogLevel(int logLevel); void TraceLog(int logLevel, const char * text, ...); +void SetTraceLogCallback(TraceLogCallback callback); void * MemAlloc(unsigned int size); void * MemRealloc(void * ptr, unsigned int size); void MemFree(void * ptr); @@ -497,8 +205,8 @@ const char * GetFileName(const char * filePath); const char * GetFileNameWithoutExt(const char * filePath); const char * GetDirectoryPath(const char * filePath); const char * GetPrevDirectoryPath(const char * dirPath); -const char * GetWorkingDirectory(void); -const char * GetApplicationDirectory(void); +const char * GetWorkingDirectory(); +const char * GetApplicationDirectory(); int MakeDirectory(const char * dirPath); int ChangeDirectory(const char * dirPath); bool IsPathFile(const char * path); @@ -508,8 +216,8 @@ bool IsFileNameValid(const char * fileName); FilePathList LoadDirectoryFiles(const char * dirPath); FilePathList LoadDirectoryFilesEx(const char * basePath, const char * filter, bool scanSubdirs); void UnloadDirectoryFiles(FilePathList files); -bool IsFileDropped(void); -FilePathList LoadDroppedFiles(void); +bool IsFileDropped(); +FilePathList LoadDroppedFiles(); void UnloadDroppedFiles(FilePathList files); unsigned int GetDirectoryFileCount(const char * dirPath); unsigned int GetDirectoryFileCountEx(const char * basePath, const char * filter, bool scanSubdirs); @@ -526,16 +234,16 @@ void UnloadAutomationEventList(AutomationEventList list); bool ExportAutomationEventList(AutomationEventList list, const char * fileName); void SetAutomationEventList(AutomationEventList * list); void SetAutomationEventBaseFrame(int frame); -void StartAutomationEventRecording(void); -void StopAutomationEventRecording(void); +void StartAutomationEventRecording(); +void StopAutomationEventRecording(); void PlayAutomationEvent(AutomationEvent event); bool IsKeyPressed(int key); bool IsKeyPressedRepeat(int key); bool IsKeyDown(int key); bool IsKeyReleased(int key); bool IsKeyUp(int key); -int GetKeyPressed(void); -int GetCharPressed(void); +int GetKeyPressed(); +int GetCharPressed(); const char * GetKeyName(int key); void SetExitKey(int key); bool IsGamepadAvailable(int gamepad); @@ -544,7 +252,7 @@ bool IsGamepadButtonPressed(int gamepad, int button); bool IsGamepadButtonDown(int gamepad, int button); bool IsGamepadButtonReleased(int gamepad, int button); bool IsGamepadButtonUp(int gamepad, int button); -int GetGamepadButtonPressed(void); +int GetGamepadButtonPressed(); int GetGamepadAxisCount(int gamepad); float GetGamepadAxisMovement(int gamepad, int axis); int SetGamepadMappings(const char * mappings); @@ -553,34 +261,34 @@ bool IsMouseButtonPressed(int button); bool IsMouseButtonDown(int button); bool IsMouseButtonReleased(int button); bool IsMouseButtonUp(int button); -int GetMouseX(void); -int GetMouseY(void); -Vector2 GetMousePosition(void); -Vector2 GetMouseDelta(void); +int GetMouseX(); +int GetMouseY(); +Vector2 GetMousePosition(); +Vector2 GetMouseDelta(); void SetMousePosition(int x, int y); void SetMouseOffset(int offsetX, int offsetY); void SetMouseScale(float scaleX, float scaleY); -float GetMouseWheelMove(void); -Vector2 GetMouseWheelMoveV(void); +float GetMouseWheelMove(); +Vector2 GetMouseWheelMoveV(); void SetMouseCursor(int cursor); -int GetTouchX(void); -int GetTouchY(void); +int GetTouchX(); +int GetTouchY(); Vector2 GetTouchPosition(int index); int GetTouchPointId(int index); -int GetTouchPointCount(void); +int GetTouchPointCount(); void SetGesturesEnabled(unsigned int flags); bool IsGestureDetected(unsigned int gesture); -int GetGestureDetected(void); -float GetGestureHoldDuration(void); -Vector2 GetGestureDragVector(void); -float GetGestureDragAngle(void); -Vector2 GetGesturePinchVector(void); -float GetGesturePinchAngle(void); +int GetGestureDetected(); +float GetGestureHoldDuration(); +Vector2 GetGestureDragVector(); +float GetGestureDragAngle(); +Vector2 GetGesturePinchVector(); +float GetGesturePinchAngle(); void UpdateCamera(Camera * camera, int mode); void UpdateCameraPro(Camera * camera, Vector3 movement, Vector3 rotation, float zoom); void SetShapesTexture(Texture2D texture, Rectangle rec); -Texture2D GetShapesTexture(void); -Rectangle GetShapesTextureRectangle(void); +Texture2D GetShapesTexture(); +Rectangle GetShapesTextureRectangle(); void DrawPixel(int posX, int posY, Color color); void DrawPixelV(Vector2 position, Color color); void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); @@ -659,7 +367,7 @@ Image LoadImageAnim(const char * fileName, int * frames); Image LoadImageAnimFromMemory(const char * fileType, const unsigned char * fileData, int dataSize, int * frames); Image LoadImageFromMemory(const char * fileType, const unsigned char * fileData, int dataSize); Image LoadImageFromTexture(Texture2D texture); -Image LoadImageFromScreen(void); +Image LoadImageFromScreen(); bool IsImageValid(Image image); void UnloadImage(Image image); bool ExportImage(Image image, const char * fileName); @@ -778,7 +486,7 @@ Color GetColor(unsigned int hexValue); Color GetPixelColor(const void * srcPtr, int format); void SetPixelColor(void * dstPtr, Color color, int format); int GetPixelDataSize(int width, int height, int format); -Font GetFontDefault(void); +Font GetFontDefault(); Font LoadFont(const char * fileName); Font LoadFontEx(const char * fileName, int fontSize, const int * codepoints, int codepointCount); Font LoadFontFromImage(Image image, Color key, int firstChar); @@ -892,7 +600,7 @@ Mesh GenMeshKnot(float radius, float size, int radSeg, int sides); Mesh GenMeshHeightmap(Image heightmap, Vector3 size); Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); Material * LoadMaterials(const char * fileName, int * materialCount); -Material LoadMaterialDefault(void); +Material LoadMaterialDefault(); bool IsMaterialValid(Material material); void UnloadMaterial(Material material); void SetMaterialTexture(Material * material, int mapType, Texture2D texture); @@ -910,11 +618,11 @@ RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); -void InitAudioDevice(void); -void CloseAudioDevice(void); -bool IsAudioDeviceReady(void); +void InitAudioDevice(); +void CloseAudioDevice(); +bool IsAudioDeviceReady(); void SetMasterVolume(float volume); -float GetMasterVolume(void); +float GetMasterVolume(); Wave LoadWave(const char * fileName); Wave LoadWaveFromMemory(const char * fileType, const unsigned char * fileData, int dataSize); bool IsWaveValid(Wave wave); @@ -977,9 +685,9 @@ void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); void AttachAudioMixedProcessor(AudioCallback processor); void DetachAudioMixedProcessor(AudioCallback processor); void rlMatrixMode(int mode); -void rlPushMatrix(void); -void rlPopMatrix(void); -void rlLoadIdentity(void); +void rlPushMatrix(); +void rlPopMatrix(); +void rlLoadIdentity(); void rlTranslatef(float x, float y, float z); void rlRotatef(float angle, float x, float y, float z); void rlScalef(float x, float y, float z); @@ -988,10 +696,10 @@ void rlFrustum(float left, float right, float bottom, float top, float znear, fl void rlOrtho(float left, float right, float bottom, float top, float znear, float zfar); void rlViewport(int x, int y, int width, int height); void rlSetClipPlanes(float nearPlane, float farPlane); -float rlGetCullDistanceNear(void); -float rlGetCullDistanceFar(void); +float rlGetCullDistanceNear(); +float rlGetCullDistanceFar(); void rlBegin(int mode); -void rlEnd(void); +void rlEnd(); void rlVertex2i(int x, int y); void rlVertex2f(float x, float y); void rlVertex3f(float x, float y, float z); @@ -1001,82 +709,82 @@ void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char void rlColor3f(float x, float y, float z); void rlColor4f(float x, float y, float z, float w); bool rlEnableVertexArray(unsigned int vaoId); -void rlDisableVertexArray(void); +void rlDisableVertexArray(); void rlEnableVertexBuffer(unsigned int id); -void rlDisableVertexBuffer(void); +void rlDisableVertexBuffer(); void rlEnableVertexBufferElement(unsigned int id); -void rlDisableVertexBufferElement(void); +void rlDisableVertexBufferElement(); void rlEnableVertexAttribute(unsigned int index); void rlDisableVertexAttribute(unsigned int index); void rlEnableStatePointer(int vertexAttribType, void * buffer); void rlDisableStatePointer(int vertexAttribType); void rlActiveTextureSlot(int slot); void rlEnableTexture(unsigned int id); -void rlDisableTexture(void); +void rlDisableTexture(); void rlEnableTextureCubemap(unsigned int id); -void rlDisableTextureCubemap(void); +void rlDisableTextureCubemap(); void rlTextureParameters(unsigned int id, int param, int value); void rlCubemapParameters(unsigned int id, int param, int value); void rlEnableShader(unsigned int id); -void rlDisableShader(void); +void rlDisableShader(); void rlEnableFramebuffer(unsigned int id); -void rlDisableFramebuffer(void); -unsigned int rlGetActiveFramebuffer(void); +void rlDisableFramebuffer(); +unsigned int rlGetActiveFramebuffer(); void rlActiveDrawBuffers(int count); void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); -void rlEnableColorBlend(void); -void rlDisableColorBlend(void); -void rlEnableDepthTest(void); -void rlDisableDepthTest(void); -void rlEnableDepthMask(void); -void rlDisableDepthMask(void); -void rlEnableBackfaceCulling(void); -void rlDisableBackfaceCulling(void); +void rlEnableColorBlend(); +void rlDisableColorBlend(); +void rlEnableDepthTest(); +void rlDisableDepthTest(); +void rlEnableDepthMask(); +void rlDisableDepthMask(); +void rlEnableBackfaceCulling(); +void rlDisableBackfaceCulling(); void rlColorMask(bool r, bool g, bool b, bool a); void rlSetCullFace(int mode); -void rlEnableScissorTest(void); -void rlDisableScissorTest(void); +void rlEnableScissorTest(); +void rlDisableScissorTest(); void rlScissor(int x, int y, int width, int height); -void rlEnablePointMode(void); -void rlDisablePointMode(void); +void rlEnablePointMode(); +void rlDisablePointMode(); void rlSetPointSize(float size); -float rlGetPointSize(void); -void rlEnableWireMode(void); -void rlDisableWireMode(void); +float rlGetPointSize(); +void rlEnableWireMode(); +void rlDisableWireMode(); void rlSetLineWidth(float width); -float rlGetLineWidth(void); -void rlEnableSmoothLines(void); -void rlDisableSmoothLines(void); -void rlEnableStereoRender(void); -void rlDisableStereoRender(void); -bool rlIsStereoRenderEnabled(void); +float rlGetLineWidth(); +void rlEnableSmoothLines(); +void rlDisableSmoothLines(); +void rlEnableStereoRender(); +void rlDisableStereoRender(); +bool rlIsStereoRenderEnabled(); void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a); -void rlClearScreenBuffers(void); -void rlCheckErrors(void); +void rlClearScreenBuffers(); +void rlCheckErrors(); void rlSetBlendMode(int mode); void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); void rlglInit(int width, int height); -void rlglClose(void); +void rlglClose(); void rlLoadExtensions(void * loader); void * rlGetProcAddress(const char * procName); -int rlGetVersion(void); +int rlGetVersion(); void rlSetFramebufferWidth(int width); -int rlGetFramebufferWidth(void); +int rlGetFramebufferWidth(); void rlSetFramebufferHeight(int height); -int rlGetFramebufferHeight(void); -unsigned int rlGetTextureIdDefault(void); -unsigned int rlGetShaderIdDefault(void); -int * rlGetShaderLocsDefault(void); +int rlGetFramebufferHeight(); +unsigned int rlGetTextureIdDefault(); +unsigned int rlGetShaderIdDefault(); +int * rlGetShaderLocsDefault(); rlRenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements); void rlUnloadRenderBatch(rlRenderBatch batch); void rlDrawRenderBatch(rlRenderBatch * batch); void rlSetRenderBatchActive(rlRenderBatch * batch); -void rlDrawRenderBatchActive(void); +void rlDrawRenderBatchActive(); bool rlCheckRenderBatchLimit(int vCount); void rlSetTexture(unsigned int id); -unsigned int rlLoadVertexArray(void); +unsigned int rlLoadVertexArray(); unsigned int rlLoadVertexBuffer(const void * buffer, int size, bool dynamic); unsigned int rlLoadVertexBufferElement(const void * buffer, int size, bool dynamic); void rlUpdateVertexBuffer(unsigned int bufferId, const void * data, int dataSize, int offset); @@ -1100,7 +808,7 @@ void rlUnloadTexture(unsigned int id); void rlGenTextureMipmaps(unsigned int id, int width, int height, int format, int * mipmaps); void * rlReadTexturePixels(unsigned int id, int width, int height, int format); unsigned char * rlReadScreenPixels(int width, int height); -unsigned int rlLoadFramebuffer(void); +unsigned int rlLoadFramebuffer(); void rlFramebufferAttach(unsigned int id, unsigned int texId, int attachType, int texType, int mipLevel); bool rlFramebufferComplete(unsigned int id); void rlUnloadFramebuffer(unsigned int id); @@ -1128,25 +836,25 @@ void rlReadShaderBuffer(unsigned int id, void * dest, unsigned int count, unsign void rlCopyShaderBuffer(unsigned int destId, unsigned int srcId, unsigned int destOffset, unsigned int srcOffset, unsigned int count); unsigned int rlGetShaderBufferSize(unsigned int id); void rlBindImageTexture(unsigned int id, unsigned int index, int format, bool readonly); -Matrix rlGetMatrixModelview(void); -Matrix rlGetMatrixProjection(void); -Matrix rlGetMatrixTransform(void); +Matrix rlGetMatrixModelview(); +Matrix rlGetMatrixProjection(); +Matrix rlGetMatrixTransform(); Matrix rlGetMatrixProjectionStereo(int eye); Matrix rlGetMatrixViewOffsetStereo(int eye); void rlSetMatrixProjection(Matrix proj); void rlSetMatrixModelview(Matrix view); void rlSetMatrixProjectionStereo(Matrix right, Matrix left); void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left); -void rlLoadDrawCube(void); -void rlLoadDrawQuad(void); +void rlLoadDrawCube(); +void rlLoadDrawQuad(); float Clamp(float value, float min, float max); float Lerp(float start, float end, float amount); float Normalize(float value, float start, float end); float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd); float Wrap(float value, float min, float max); int FloatEquals(float x, float y); -Vector2 Vector2Zero(void); -Vector2 Vector2One(void); +Vector2 Vector2Zero(); +Vector2 Vector2One(); Vector2 Vector2Add(Vector2 v1, Vector2 v2); Vector2 Vector2AddValue(Vector2 v, float add); Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); @@ -1176,8 +884,8 @@ Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max); Vector2 Vector2ClampValue(Vector2 v, float min, float max); int Vector2Equals(Vector2 p, Vector2 q); Vector2 Vector2Refract(Vector2 v, Vector2 n, float r); -Vector3 Vector3Zero(void); -Vector3 Vector3One(void); +Vector3 Vector3Zero(); +Vector3 Vector3One(); Vector3 Vector3Add(Vector3 v1, Vector3 v2); Vector3 Vector3AddValue(Vector3 v, float add); Vector3 Vector3Subtract(Vector3 v1, Vector3 v2); @@ -1215,8 +923,8 @@ Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max); Vector3 Vector3ClampValue(Vector3 v, float min, float max); int Vector3Equals(Vector3 p, Vector3 q); Vector3 Vector3Refract(Vector3 v, Vector3 n, float r); -Vector4 Vector4Zero(void); -Vector4 Vector4One(void); +Vector4 Vector4Zero(); +Vector4 Vector4One(); Vector4 Vector4Add(Vector4 v1, Vector4 v2); Vector4 Vector4AddValue(Vector4 v, float add); Vector4 Vector4Subtract(Vector4 v1, Vector4 v2); @@ -1241,7 +949,7 @@ float MatrixDeterminant(Matrix mat); float MatrixTrace(Matrix mat); Matrix MatrixTranspose(Matrix mat); Matrix MatrixInvert(Matrix mat); -Matrix MatrixIdentity(void); +Matrix MatrixIdentity(); Matrix MatrixAdd(Matrix left, Matrix right); Matrix MatrixSubtract(Matrix left, Matrix right); Matrix MatrixMultiply(Matrix left, Matrix right); @@ -1263,7 +971,7 @@ Quaternion QuaternionAdd(Quaternion q1, Quaternion q2); Quaternion QuaternionAddValue(Quaternion q, float add); Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2); Quaternion QuaternionSubtractValue(Quaternion q, float sub); -Quaternion QuaternionIdentity(void); +Quaternion QuaternionIdentity(); float QuaternionLength(Quaternion q); Quaternion QuaternionNormalize(Quaternion q); Quaternion QuaternionInvert(Quaternion q); @@ -1285,27 +993,27 @@ Quaternion QuaternionTransform(Quaternion q, Matrix mat); int QuaternionEquals(Quaternion p, Quaternion q); Matrix MatrixCompose(Vector3 translation, Quaternion rotation, Vector3 scale); void MatrixDecompose(Matrix mat, Vector3 * translation, Quaternion * rotation, Vector3 * scale); -void GuiEnable(void); -void GuiDisable(void); -void GuiLock(void); -void GuiUnlock(void); -bool GuiIsLocked(void); +void GuiEnable(); +void GuiDisable(); +void GuiLock(); +void GuiUnlock(); +bool GuiIsLocked(); void GuiSetAlpha(float alpha); void GuiSetState(int state); -int GuiGetState(void); +int GuiGetState(); void GuiSetFont(Font font); -Font GuiGetFont(void); +Font GuiGetFont(); void GuiSetStyle(int control, int property, int value); int GuiGetStyle(int control, int property); void GuiLoadStyle(const char * fileName); void GuiLoadStyleFromMemory(const unsigned char * fileData, int dataSize); -void GuiLoadStyleDefault(void); -void GuiEnableTooltip(void); -void GuiDisableTooltip(void); +void GuiLoadStyleDefault(); +void GuiEnableTooltip(); +void GuiDisableTooltip(); void GuiSetTooltip(const char * tooltip); const char * GuiIconText(int iconId, const char * text); void GuiSetIconScale(int scale); -unsigned int * GuiGetIcons(void); +unsigned int * GuiGetIcons(); char ** GuiLoadIcons(const char * fileName, bool loadIconsName); char ** GuiLoadIconsFromMemory(const unsigned char * fileData, int dataSize, bool loadIconsName); void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color); @@ -1350,41 +1058,8 @@ int GuiColorPanelHSV(Rectangle bounds, const char * text, Vector3 * colorHsv); local C = ffi.C local string_format = string.format -local ffi_string = ffi.string local type, select = type, select -local M = {} - --- Raw namespace for hot paths that want to skip the Lua wrapper. ----@type ffi.namespace* -M.C = C - ----@class raylib.char_buffer ----@field [integer] integer - ----@class raylib.cstring_array ----@field [integer] ffi.cdata* - -local pinned = {} -local callback_cache = {} -local function pin(ctype, fn) - if fn == nil then - return nil - end - local by_type = callback_cache[fn] - if by_type == nil then - by_type = {} - callback_cache[fn] = by_type - end - local cb = by_type[ctype] - if cb == nil then - cb = ffi.cast(ctype, fn) - by_type[ctype] = cb - pinned[#pinned + 1] = cb - end - return cb -end - local function to_array(ct, t, n) n = n or #t local a = ffi.new(ct .. "[?]", n) @@ -1394,2760 +1069,2396 @@ local function to_array(ct, t, n) return a end ----@enum raylib.ConfigFlags -M.ConfigFlags = { - FLAG_VSYNC_HINT = 64, - FLAG_FULLSCREEN_MODE = 2, - FLAG_WINDOW_RESIZABLE = 4, - FLAG_WINDOW_UNDECORATED = 8, - FLAG_WINDOW_HIDDEN = 128, - FLAG_WINDOW_MINIMIZED = 512, - FLAG_WINDOW_MAXIMIZED = 1024, - FLAG_WINDOW_UNFOCUSED = 2048, - FLAG_WINDOW_TOPMOST = 4096, - FLAG_WINDOW_ALWAYS_RUN = 256, - FLAG_WINDOW_TRANSPARENT = 16, - FLAG_WINDOW_HIGHDPI = 8192, - FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384, - FLAG_BORDERLESS_WINDOWED_MODE = 32768, - FLAG_MSAA_4X_HINT = 32, - FLAG_INTERLACED_HINT = 65536, -} +RAYLIB_VERSION_MAJOR = 6 +RAYLIB_VERSION_MINOR = 5 +RAYLIB_VERSION_PATCH = 0 +RAYLIB_VERSION = "6.5-dev" +PI = 3.1415926535898 +DEG2RAD = 0.017453292519943 +RAD2DEG = 57.295779513082 +LIGHTGRAY = ffi.new("Color", { r = 200, g = 200, b = 200, a = 255 }) +GRAY = ffi.new("Color", { r = 130, g = 130, b = 130, a = 255 }) +DARKGRAY = ffi.new("Color", { r = 80, g = 80, b = 80, a = 255 }) +YELLOW = ffi.new("Color", { r = 253, g = 249, b = 0, a = 255 }) +GOLD = ffi.new("Color", { r = 255, g = 203, b = 0, a = 255 }) +ORANGE = ffi.new("Color", { r = 255, g = 161, b = 0, a = 255 }) +PINK = ffi.new("Color", { r = 255, g = 109, b = 194, a = 255 }) +RED = ffi.new("Color", { r = 230, g = 41, b = 55, a = 255 }) +MAROON = ffi.new("Color", { r = 190, g = 33, b = 55, a = 255 }) +GREEN = ffi.new("Color", { r = 0, g = 228, b = 48, a = 255 }) +LIME = ffi.new("Color", { r = 0, g = 158, b = 47, a = 255 }) +DARKGREEN = ffi.new("Color", { r = 0, g = 117, b = 44, a = 255 }) +SKYBLUE = ffi.new("Color", { r = 102, g = 191, b = 255, a = 255 }) +BLUE = ffi.new("Color", { r = 0, g = 121, b = 241, a = 255 }) +DARKBLUE = ffi.new("Color", { r = 0, g = 82, b = 172, a = 255 }) +PURPLE = ffi.new("Color", { r = 200, g = 122, b = 255, a = 255 }) +VIOLET = ffi.new("Color", { r = 135, g = 60, b = 190, a = 255 }) +DARKPURPLE = ffi.new("Color", { r = 112, g = 31, b = 126, a = 255 }) +BEIGE = ffi.new("Color", { r = 211, g = 176, b = 131, a = 255 }) +BROWN = ffi.new("Color", { r = 127, g = 106, b = 79, a = 255 }) +DARKBROWN = ffi.new("Color", { r = 76, g = 63, b = 47, a = 255 }) +WHITE = ffi.new("Color", { r = 255, g = 255, b = 255, a = 255 }) +BLACK = ffi.new("Color", { r = 0, g = 0, b = 0, a = 255 }) +BLANK = ffi.new("Color", { r = 0, g = 0, b = 0, a = 0 }) +MAGENTA = ffi.new("Color", { r = 255, g = 0, b = 255, a = 255 }) +RAYWHITE = ffi.new("Color", { r = 245, g = 245, b = 245, a = 255 }) +RLGL_VERSION = "6.0" +RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192 +RL_DEFAULT_BATCH_BUFFERS = 1 --Default number of batch buffers (multi-buffering) +RL_DEFAULT_BATCH_DRAWCALLS = 256 --Default number of batch draw calls (by state changes: mode, texture) +RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4 --Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture()) +RL_MAX_MATRIX_STACK_SIZE = 32 --Maximum size of Matrix stack +RL_MAX_SHADER_LOCATIONS = 32 --Maximum number of shader locations supported +RL_CULL_DISTANCE_NEAR = 0.05 --Default near cull distance +RL_CULL_DISTANCE_FAR = 4000 --Default far cull distance +RL_TEXTURE_WRAP_S = 10242 --GL_TEXTURE_WRAP_S +RL_TEXTURE_WRAP_T = 10243 --GL_TEXTURE_WRAP_T +RL_TEXTURE_MAG_FILTER = 10240 --GL_TEXTURE_MAG_FILTER +RL_TEXTURE_MIN_FILTER = 10241 --GL_TEXTURE_MIN_FILTER +RL_TEXTURE_FILTER_NEAREST = 9728 --GL_NEAREST +RL_TEXTURE_FILTER_LINEAR = 9729 --GL_LINEAR +RL_TEXTURE_FILTER_MIP_NEAREST = 9984 --GL_NEAREST_MIPMAP_NEAREST +RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986 --GL_NEAREST_MIPMAP_LINEAR +RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985 --GL_LINEAR_MIPMAP_NEAREST +RL_TEXTURE_FILTER_MIP_LINEAR = 9987 --GL_LINEAR_MIPMAP_LINEAR +RL_TEXTURE_FILTER_ANISOTROPIC = 12288 --Anisotropic filter (custom identifier) +RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384 --Texture mipmap bias, percentage ratio (custom identifier) +RL_TEXTURE_WRAP_REPEAT = 10497 --GL_REPEAT +RL_TEXTURE_WRAP_CLAMP = 33071 --GL_CLAMP_TO_EDGE +RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648 --GL_MIRRORED_REPEAT +RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626 --GL_MIRROR_CLAMP_EXT +RL_MODELVIEW = 5888 --GL_MODELVIEW +RL_PROJECTION = 5889 --GL_PROJECTION +RL_TEXTURE = 5890 --GL_TEXTURE +RL_LINES = 1 --GL_LINES +RL_TRIANGLES = 4 --GL_TRIANGLES +RL_QUADS = 7 --GL_QUADS +RL_UNSIGNED_BYTE = 5121 --GL_UNSIGNED_BYTE +RL_FLOAT = 5126 --GL_FLOAT +RL_STREAM_DRAW = 35040 --GL_STREAM_DRAW +RL_STREAM_READ = 35041 --GL_STREAM_READ +RL_STREAM_COPY = 35042 --GL_STREAM_COPY +RL_STATIC_DRAW = 35044 --GL_STATIC_DRAW +RL_STATIC_READ = 35045 --GL_STATIC_READ +RL_STATIC_COPY = 35046 --GL_STATIC_COPY +RL_DYNAMIC_DRAW = 35048 --GL_DYNAMIC_DRAW +RL_DYNAMIC_READ = 35049 --GL_DYNAMIC_READ +RL_DYNAMIC_COPY = 35050 --GL_DYNAMIC_COPY +RL_FRAGMENT_SHADER = 35632 --GL_FRAGMENT_SHADER +RL_VERTEX_SHADER = 35633 --GL_VERTEX_SHADER +RL_COMPUTE_SHADER = 37305 --GL_COMPUTE_SHADER +RL_ZERO = 0 --GL_ZERO +RL_ONE = 1 --GL_ONE +RL_SRC_COLOR = 768 --GL_SRC_COLOR +RL_ONE_MINUS_SRC_COLOR = 769 --GL_ONE_MINUS_SRC_COLOR +RL_SRC_ALPHA = 770 --GL_SRC_ALPHA +RL_ONE_MINUS_SRC_ALPHA = 771 --GL_ONE_MINUS_SRC_ALPHA +RL_DST_ALPHA = 772 --GL_DST_ALPHA +RL_ONE_MINUS_DST_ALPHA = 773 --GL_ONE_MINUS_DST_ALPHA +RL_DST_COLOR = 774 --GL_DST_COLOR +RL_ONE_MINUS_DST_COLOR = 775 --GL_ONE_MINUS_DST_COLOR +RL_SRC_ALPHA_SATURATE = 776 --GL_SRC_ALPHA_SATURATE +RL_CONSTANT_COLOR = 32769 --GL_CONSTANT_COLOR +RL_ONE_MINUS_CONSTANT_COLOR = 32770 --GL_ONE_MINUS_CONSTANT_COLOR +RL_CONSTANT_ALPHA = 32771 --GL_CONSTANT_ALPHA +RL_ONE_MINUS_CONSTANT_ALPHA = 32772 --GL_ONE_MINUS_CONSTANT_ALPHA +RL_FUNC_ADD = 32774 --GL_FUNC_ADD +RL_MIN = 32775 --GL_MIN +RL_MAX = 32776 --GL_MAX +RL_FUNC_SUBTRACT = 32778 --GL_FUNC_SUBTRACT +RL_FUNC_REVERSE_SUBTRACT = 32779 --GL_FUNC_REVERSE_SUBTRACT +RL_BLEND_EQUATION = 32777 --GL_BLEND_EQUATION +RL_BLEND_EQUATION_RGB = 32777 --GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION) +RL_BLEND_EQUATION_ALPHA = 34877 --GL_BLEND_EQUATION_ALPHA +RL_BLEND_DST_RGB = 32968 --GL_BLEND_DST_RGB +RL_BLEND_SRC_RGB = 32969 --GL_BLEND_SRC_RGB +RL_BLEND_DST_ALPHA = 32970 --GL_BLEND_DST_ALPHA +RL_BLEND_SRC_ALPHA = 32971 --GL_BLEND_SRC_ALPHA +RL_BLEND_COLOR = 32773 --GL_BLEND_COLOR +RL_READ_FRAMEBUFFER = 36008 --GL_READ_FRAMEBUFFER +RL_DRAW_FRAMEBUFFER = 36009 --GL_DRAW_FRAMEBUFFER +RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION = 0 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD = 1 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL = 2 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR = 3 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT = 4 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 = 5 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES = 6 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES = 7 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS = 8 +RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM = 9 +EPSILON = 1e-06 +RAYGUI_VERSION_MAJOR = 5 +RAYGUI_VERSION_MINOR = 1 +RAYGUI_VERSION_PATCH = 0 +RAYGUI_VERSION = "5.1-dev" +SCROLLBAR_LEFT_SIDE = 0 +SCROLLBAR_RIGHT_SIDE = 1 +RAYGUI_ICON_SIZE = 16 --Size of icons in pixels (squared) +RAYGUI_ICON_MAX_ICONS = 512 --Maximum number of icons +RAYGUI_ICON_MAX_FONT_BACKED = 257 --Maximum number of icons to back in font atlas +RAYGUI_ICON_MAX_NAME_LENGTH = 32 --Maximum length of icon name id +RAYGUI_ICON_FONT_ATLAS_PADDING = 1 --Padding between backed icons in font atlas +RAYGUI_ICON_DATA_ELEMENTS = (RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32) +RAYGUI_MAX_CONTROLS = 16 --Maximum number of controls +RAYGUI_MAX_PROPS_BASE = 16 --Maximum number of base properties +RAYGUI_MAX_PROPS_EXTENDED = 8 --Maximum number of extended properties +MOUSE_LEFT_BUTTON = 0 +RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT = 24 +RAYGUI_WINDOWBOX_CLOSEBUTTON_HEIGHT = 18 +RAYGUI_GROUPBOX_LINE_THICK = 1 +RAYGUI_LINE_MARGIN_TEXT = 12 +RAYGUI_LINE_TEXT_PADDING = 4 +RAYGUI_PANEL_BORDER_WIDTH = 1 +RAYGUI_MIN_SCROLLBAR_WIDTH = 40 +RAYGUI_MIN_SCROLLBAR_HEIGHT = 40 +RAYGUI_MIN_MOUSE_WHEEL_SPEED = 20 +RAYGUI_TOGGLEGROUP_MAX_ITEM_TEXT_SIZE = 256 +RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN = 20 --Frames to wait for autocursor movement +RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY = 1 --Frames delay for autocursor movement +RAYGUI_VALUEBOX_MAX_CHARS = 32 +RAYGUI_COLORBARALPHA_CHECKED_SIZE = 10 +RAYGUI_MESSAGEBOX_BUTTON_HEIGHT = 24 +RAYGUI_MESSAGEBOX_BUTTON_PADDING = 12 +RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT = 24 +RAYGUI_TEXTINPUTBOX_BUTTON_PADDING = 12 +RAYGUI_TEXTINPUTBOX_HEIGHT = 26 +RAYGUI_GRID_ALPHA = 0.15 +MAX_LINE_BUFFER_SIZE = 256 +RAYGUI_ICON_TEXT_PADDING = 4 +RAYGUI_MAX_TEXT_LINES = 128 +RAYGUI_TEXTSPLIT_MAX_ITEMS = 128 +RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE = 1024 --WARNING: Max expected size for all concat items +RAYGUI_TEXTFORMAT_MAX_SIZE = 256 ----@enum raylib.TraceLogLevel -M.TraceLogLevel = { - LOG_ALL = 0, - LOG_TRACE = 1, - LOG_DEBUG = 2, - LOG_INFO = 3, - LOG_WARNING = 4, - LOG_ERROR = 5, - LOG_FATAL = 6, - LOG_NONE = 7, -} +---System/Window config flags +---@alias ConfigFlags +---| `FLAG_VSYNC_HINT` #Set to try enabling V-Sync on GPU +---| `FLAG_FULLSCREEN_MODE` #Set to run program in fullscreen +---| `FLAG_WINDOW_RESIZABLE` #Set to allow resizable window +---| `FLAG_WINDOW_UNDECORATED` #Set to disable window decoration (frame and buttons) +---| `FLAG_WINDOW_HIDDEN` #Set to hide window +---| `FLAG_WINDOW_MINIMIZED` #Set to minimize window (iconify) +---| `FLAG_WINDOW_MAXIMIZED` #Set to maximize window (expanded to monitor) +---| `FLAG_WINDOW_UNFOCUSED` #Set to window non focused +---| `FLAG_WINDOW_TOPMOST` #Set to window always on top +---| `FLAG_WINDOW_ALWAYS_RUN` #Set to allow windows running while minimized +---| `FLAG_WINDOW_TRANSPARENT` #Set to allow transparent framebuffer +---| `FLAG_WINDOW_HIGHDPI` #Set to support HighDPI +---| `FLAG_WINDOW_MOUSE_PASSTHROUGH` #Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED +---| `FLAG_BORDERLESS_WINDOWED_MODE` #Set to run program in borderless windowed mode +---| `FLAG_MSAA_4X_HINT` #Set to try enabling MSAA 4X +---| `FLAG_INTERLACED_HINT` #Set to try enabling interlaced video format (for V3D) +--- Set to try enabling V-Sync on GPU +FLAG_VSYNC_HINT = 64 +--- Set to run program in fullscreen +FLAG_FULLSCREEN_MODE = 2 +--- Set to allow resizable window +FLAG_WINDOW_RESIZABLE = 4 +--- Set to disable window decoration (frame and buttons) +FLAG_WINDOW_UNDECORATED = 8 +--- Set to hide window +FLAG_WINDOW_HIDDEN = 128 +--- Set to minimize window (iconify) +FLAG_WINDOW_MINIMIZED = 512 +--- Set to maximize window (expanded to monitor) +FLAG_WINDOW_MAXIMIZED = 1024 +--- Set to window non focused +FLAG_WINDOW_UNFOCUSED = 2048 +--- Set to window always on top +FLAG_WINDOW_TOPMOST = 4096 +--- Set to allow windows running while minimized +FLAG_WINDOW_ALWAYS_RUN = 256 +--- Set to allow transparent framebuffer +FLAG_WINDOW_TRANSPARENT = 16 +--- Set to support HighDPI +FLAG_WINDOW_HIGHDPI = 8192 +--- Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED +FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384 +--- Set to run program in borderless windowed mode +FLAG_BORDERLESS_WINDOWED_MODE = 32768 +--- Set to try enabling MSAA 4X +FLAG_MSAA_4X_HINT = 32 +--- Set to try enabling interlaced video format (for V3D) +FLAG_INTERLACED_HINT = 65536 ----@enum raylib.KeyboardKey -M.KeyboardKey = { - KEY_NULL = 0, - KEY_APOSTROPHE = 39, - KEY_COMMA = 44, - KEY_MINUS = 45, - KEY_PERIOD = 46, - KEY_SLASH = 47, - KEY_ZERO = 48, - KEY_ONE = 49, - KEY_TWO = 50, - KEY_THREE = 51, - KEY_FOUR = 52, - KEY_FIVE = 53, - KEY_SIX = 54, - KEY_SEVEN = 55, - KEY_EIGHT = 56, - KEY_NINE = 57, - KEY_SEMICOLON = 59, - KEY_EQUAL = 61, - KEY_A = 65, - KEY_B = 66, - KEY_C = 67, - KEY_D = 68, - KEY_E = 69, - KEY_F = 70, - KEY_G = 71, - KEY_H = 72, - KEY_I = 73, - KEY_J = 74, - KEY_K = 75, - KEY_L = 76, - KEY_M = 77, - KEY_N = 78, - KEY_O = 79, - KEY_P = 80, - KEY_Q = 81, - KEY_R = 82, - KEY_S = 83, - KEY_T = 84, - KEY_U = 85, - KEY_V = 86, - KEY_W = 87, - KEY_X = 88, - KEY_Y = 89, - KEY_Z = 90, - KEY_LEFT_BRACKET = 91, - KEY_BACKSLASH = 92, - KEY_RIGHT_BRACKET = 93, - KEY_GRAVE = 96, - KEY_SPACE = 32, - KEY_ESCAPE = 256, - KEY_ENTER = 257, - KEY_TAB = 258, - KEY_BACKSPACE = 259, - KEY_INSERT = 260, - KEY_DELETE = 261, - KEY_RIGHT = 262, - KEY_LEFT = 263, - KEY_DOWN = 264, - KEY_UP = 265, - KEY_PAGE_UP = 266, - KEY_PAGE_DOWN = 267, - KEY_HOME = 268, - KEY_END = 269, - KEY_CAPS_LOCK = 280, - KEY_SCROLL_LOCK = 281, - KEY_NUM_LOCK = 282, - KEY_PRINT_SCREEN = 283, - KEY_PAUSE = 284, - KEY_F1 = 290, - KEY_F2 = 291, - KEY_F3 = 292, - KEY_F4 = 293, - KEY_F5 = 294, - KEY_F6 = 295, - KEY_F7 = 296, - KEY_F8 = 297, - KEY_F9 = 298, - KEY_F10 = 299, - KEY_F11 = 300, - KEY_F12 = 301, - KEY_LEFT_SHIFT = 340, - KEY_LEFT_CONTROL = 341, - KEY_LEFT_ALT = 342, - KEY_LEFT_SUPER = 343, - KEY_RIGHT_SHIFT = 344, - KEY_RIGHT_CONTROL = 345, - KEY_RIGHT_ALT = 346, - KEY_RIGHT_SUPER = 347, - KEY_KB_MENU = 348, - KEY_KP_0 = 320, - KEY_KP_1 = 321, - KEY_KP_2 = 322, - KEY_KP_3 = 323, - KEY_KP_4 = 324, - KEY_KP_5 = 325, - KEY_KP_6 = 326, - KEY_KP_7 = 327, - KEY_KP_8 = 328, - KEY_KP_9 = 329, - KEY_KP_DECIMAL = 330, - KEY_KP_DIVIDE = 331, - KEY_KP_MULTIPLY = 332, - KEY_KP_SUBTRACT = 333, - KEY_KP_ADD = 334, - KEY_KP_ENTER = 335, - KEY_KP_EQUAL = 336, - KEY_BACK = 4, - KEY_MENU = 5, - KEY_VOLUME_UP = 24, - KEY_VOLUME_DOWN = 25, -} +---Trace log level +---@alias TraceLogLevel +---| `LOG_ALL` #Display all logs +---| `LOG_TRACE` #Trace logging, intended for internal use only +---| `LOG_DEBUG` #Debug logging, used for internal debugging, it should be disabled on release builds +---| `LOG_INFO` #Info logging, used for program execution info +---| `LOG_WARNING` #Warning logging, used on recoverable failures +---| `LOG_ERROR` #Error logging, used on unrecoverable failures +---| `LOG_FATAL` #Fatal logging, used to abort program: exit(EXIT_FAILURE) +---| `LOG_NONE` #Disable logging +--- Display all logs +LOG_ALL = 0 +--- Trace logging, intended for internal use only +LOG_TRACE = 1 +--- Debug logging, used for internal debugging, it should be disabled on release builds +LOG_DEBUG = 2 +--- Info logging, used for program execution info +LOG_INFO = 3 +--- Warning logging, used on recoverable failures +LOG_WARNING = 4 +--- Error logging, used on unrecoverable failures +LOG_ERROR = 5 +--- Fatal logging, used to abort program: exit(EXIT_FAILURE) +LOG_FATAL = 6 +--- Disable logging +LOG_NONE = 7 ----@enum raylib.MouseButton -M.MouseButton = { - MOUSE_BUTTON_LEFT = 0, - MOUSE_BUTTON_RIGHT = 1, - MOUSE_BUTTON_MIDDLE = 2, - MOUSE_BUTTON_SIDE = 3, - MOUSE_BUTTON_EXTRA = 4, - MOUSE_BUTTON_FORWARD = 5, - MOUSE_BUTTON_BACK = 6, -} +---Keyboard keys (US keyboard layout) +---@alias KeyboardKey +---| `KEY_NULL` #Key: NULL, used for no key pressed +---| `KEY_APOSTROPHE` #Key: ' +---| `KEY_COMMA` #Key: , +---| `KEY_MINUS` #Key: - +---| `KEY_PERIOD` #Key: . +---| `KEY_SLASH` #Key: / +---| `KEY_ZERO` #Key: 0 +---| `KEY_ONE` #Key: 1 +---| `KEY_TWO` #Key: 2 +---| `KEY_THREE` #Key: 3 +---| `KEY_FOUR` #Key: 4 +---| `KEY_FIVE` #Key: 5 +---| `KEY_SIX` #Key: 6 +---| `KEY_SEVEN` #Key: 7 +---| `KEY_EIGHT` #Key: 8 +---| `KEY_NINE` #Key: 9 +---| `KEY_SEMICOLON` #Key: ; +---| `KEY_EQUAL` #Key: = +---| `KEY_A` #Key: A | a +---| `KEY_B` #Key: B | b +---| `KEY_C` #Key: C | c +---| `KEY_D` #Key: D | d +---| `KEY_E` #Key: E | e +---| `KEY_F` #Key: F | f +---| `KEY_G` #Key: G | g +---| `KEY_H` #Key: H | h +---| `KEY_I` #Key: I | i +---| `KEY_J` #Key: J | j +---| `KEY_K` #Key: K | k +---| `KEY_L` #Key: L | l +---| `KEY_M` #Key: M | m +---| `KEY_N` #Key: N | n +---| `KEY_O` #Key: O | o +---| `KEY_P` #Key: P | p +---| `KEY_Q` #Key: Q | q +---| `KEY_R` #Key: R | r +---| `KEY_S` #Key: S | s +---| `KEY_T` #Key: T | t +---| `KEY_U` #Key: U | u +---| `KEY_V` #Key: V | v +---| `KEY_W` #Key: W | w +---| `KEY_X` #Key: X | x +---| `KEY_Y` #Key: Y | y +---| `KEY_Z` #Key: Z | z +---| `KEY_LEFT_BRACKET` #Key: [ +---| `KEY_BACKSLASH` #Key: '\' +---| `KEY_RIGHT_BRACKET` #Key: ] +---| `KEY_GRAVE` #Key: ` +---| `KEY_SPACE` #Key: Space +---| `KEY_ESCAPE` #Key: Esc +---| `KEY_ENTER` #Key: Enter +---| `KEY_TAB` #Key: Tab +---| `KEY_BACKSPACE` #Key: Backspace +---| `KEY_INSERT` #Key: Ins +---| `KEY_DELETE` #Key: Del +---| `KEY_RIGHT` #Key: Cursor right +---| `KEY_LEFT` #Key: Cursor left +---| `KEY_DOWN` #Key: Cursor down +---| `KEY_UP` #Key: Cursor up +---| `KEY_PAGE_UP` #Key: Page up +---| `KEY_PAGE_DOWN` #Key: Page down +---| `KEY_HOME` #Key: Home +---| `KEY_END` #Key: End +---| `KEY_CAPS_LOCK` #Key: Caps lock +---| `KEY_SCROLL_LOCK` #Key: Scroll down +---| `KEY_NUM_LOCK` #Key: Num lock +---| `KEY_PRINT_SCREEN` #Key: Print screen +---| `KEY_PAUSE` #Key: Pause +---| `KEY_F1` #Key: F1 +---| `KEY_F2` #Key: F2 +---| `KEY_F3` #Key: F3 +---| `KEY_F4` #Key: F4 +---| `KEY_F5` #Key: F5 +---| `KEY_F6` #Key: F6 +---| `KEY_F7` #Key: F7 +---| `KEY_F8` #Key: F8 +---| `KEY_F9` #Key: F9 +---| `KEY_F10` #Key: F10 +---| `KEY_F11` #Key: F11 +---| `KEY_F12` #Key: F12 +---| `KEY_LEFT_SHIFT` #Key: Shift left +---| `KEY_LEFT_CONTROL` #Key: Control left +---| `KEY_LEFT_ALT` #Key: Alt left +---| `KEY_LEFT_SUPER` #Key: Super left +---| `KEY_RIGHT_SHIFT` #Key: Shift right +---| `KEY_RIGHT_CONTROL` #Key: Control right +---| `KEY_RIGHT_ALT` #Key: Alt right +---| `KEY_RIGHT_SUPER` #Key: Super right +---| `KEY_KB_MENU` #Key: KB menu +---| `KEY_KP_0` #Key: Keypad 0 +---| `KEY_KP_1` #Key: Keypad 1 +---| `KEY_KP_2` #Key: Keypad 2 +---| `KEY_KP_3` #Key: Keypad 3 +---| `KEY_KP_4` #Key: Keypad 4 +---| `KEY_KP_5` #Key: Keypad 5 +---| `KEY_KP_6` #Key: Keypad 6 +---| `KEY_KP_7` #Key: Keypad 7 +---| `KEY_KP_8` #Key: Keypad 8 +---| `KEY_KP_9` #Key: Keypad 9 +---| `KEY_KP_DECIMAL` #Key: Keypad . +---| `KEY_KP_DIVIDE` #Key: Keypad / +---| `KEY_KP_MULTIPLY` #Key: Keypad * +---| `KEY_KP_SUBTRACT` #Key: Keypad - +---| `KEY_KP_ADD` #Key: Keypad + +---| `KEY_KP_ENTER` #Key: Keypad Enter +---| `KEY_KP_EQUAL` #Key: Keypad = +---| `KEY_BACK` #Key: Android back button +---| `KEY_MENU` #Key: Android menu button +---| `KEY_VOLUME_UP` #Key: Android volume up button +---| `KEY_VOLUME_DOWN` #Key: Android volume down button +--- Key: NULL, used for no key pressed +KEY_NULL = 0 +--- Key: ' +KEY_APOSTROPHE = 39 +--- Key: , +KEY_COMMA = 44 +--- Key: - +KEY_MINUS = 45 +--- Key: . +KEY_PERIOD = 46 +--- Key: / +KEY_SLASH = 47 +--- Key: 0 +KEY_ZERO = 48 +--- Key: 1 +KEY_ONE = 49 +--- Key: 2 +KEY_TWO = 50 +--- Key: 3 +KEY_THREE = 51 +--- Key: 4 +KEY_FOUR = 52 +--- Key: 5 +KEY_FIVE = 53 +--- Key: 6 +KEY_SIX = 54 +--- Key: 7 +KEY_SEVEN = 55 +--- Key: 8 +KEY_EIGHT = 56 +--- Key: 9 +KEY_NINE = 57 +--- Key: ; +KEY_SEMICOLON = 59 +--- Key: = +KEY_EQUAL = 61 +--- Key: A | a +KEY_A = 65 +--- Key: B | b +KEY_B = 66 +--- Key: C | c +KEY_C = 67 +--- Key: D | d +KEY_D = 68 +--- Key: E | e +KEY_E = 69 +--- Key: F | f +KEY_F = 70 +--- Key: G | g +KEY_G = 71 +--- Key: H | h +KEY_H = 72 +--- Key: I | i +KEY_I = 73 +--- Key: J | j +KEY_J = 74 +--- Key: K | k +KEY_K = 75 +--- Key: L | l +KEY_L = 76 +--- Key: M | m +KEY_M = 77 +--- Key: N | n +KEY_N = 78 +--- Key: O | o +KEY_O = 79 +--- Key: P | p +KEY_P = 80 +--- Key: Q | q +KEY_Q = 81 +--- Key: R | r +KEY_R = 82 +--- Key: S | s +KEY_S = 83 +--- Key: T | t +KEY_T = 84 +--- Key: U | u +KEY_U = 85 +--- Key: V | v +KEY_V = 86 +--- Key: W | w +KEY_W = 87 +--- Key: X | x +KEY_X = 88 +--- Key: Y | y +KEY_Y = 89 +--- Key: Z | z +KEY_Z = 90 +--- Key: [ +KEY_LEFT_BRACKET = 91 +--- Key: '\' +KEY_BACKSLASH = 92 +--- Key: ] +KEY_RIGHT_BRACKET = 93 +--- Key: ` +KEY_GRAVE = 96 +--- Key: Space +KEY_SPACE = 32 +--- Key: Esc +KEY_ESCAPE = 256 +--- Key: Enter +KEY_ENTER = 257 +--- Key: Tab +KEY_TAB = 258 +--- Key: Backspace +KEY_BACKSPACE = 259 +--- Key: Ins +KEY_INSERT = 260 +--- Key: Del +KEY_DELETE = 261 +--- Key: Cursor right +KEY_RIGHT = 262 +--- Key: Cursor left +KEY_LEFT = 263 +--- Key: Cursor down +KEY_DOWN = 264 +--- Key: Cursor up +KEY_UP = 265 +--- Key: Page up +KEY_PAGE_UP = 266 +--- Key: Page down +KEY_PAGE_DOWN = 267 +--- Key: Home +KEY_HOME = 268 +--- Key: End +KEY_END = 269 +--- Key: Caps lock +KEY_CAPS_LOCK = 280 +--- Key: Scroll down +KEY_SCROLL_LOCK = 281 +--- Key: Num lock +KEY_NUM_LOCK = 282 +--- Key: Print screen +KEY_PRINT_SCREEN = 283 +--- Key: Pause +KEY_PAUSE = 284 +--- Key: F1 +KEY_F1 = 290 +--- Key: F2 +KEY_F2 = 291 +--- Key: F3 +KEY_F3 = 292 +--- Key: F4 +KEY_F4 = 293 +--- Key: F5 +KEY_F5 = 294 +--- Key: F6 +KEY_F6 = 295 +--- Key: F7 +KEY_F7 = 296 +--- Key: F8 +KEY_F8 = 297 +--- Key: F9 +KEY_F9 = 298 +--- Key: F10 +KEY_F10 = 299 +--- Key: F11 +KEY_F11 = 300 +--- Key: F12 +KEY_F12 = 301 +--- Key: Shift left +KEY_LEFT_SHIFT = 340 +--- Key: Control left +KEY_LEFT_CONTROL = 341 +--- Key: Alt left +KEY_LEFT_ALT = 342 +--- Key: Super left +KEY_LEFT_SUPER = 343 +--- Key: Shift right +KEY_RIGHT_SHIFT = 344 +--- Key: Control right +KEY_RIGHT_CONTROL = 345 +--- Key: Alt right +KEY_RIGHT_ALT = 346 +--- Key: Super right +KEY_RIGHT_SUPER = 347 +--- Key: KB menu +KEY_KB_MENU = 348 +--- Key: Keypad 0 +KEY_KP_0 = 320 +--- Key: Keypad 1 +KEY_KP_1 = 321 +--- Key: Keypad 2 +KEY_KP_2 = 322 +--- Key: Keypad 3 +KEY_KP_3 = 323 +--- Key: Keypad 4 +KEY_KP_4 = 324 +--- Key: Keypad 5 +KEY_KP_5 = 325 +--- Key: Keypad 6 +KEY_KP_6 = 326 +--- Key: Keypad 7 +KEY_KP_7 = 327 +--- Key: Keypad 8 +KEY_KP_8 = 328 +--- Key: Keypad 9 +KEY_KP_9 = 329 +--- Key: Keypad . +KEY_KP_DECIMAL = 330 +--- Key: Keypad / +KEY_KP_DIVIDE = 331 +--- Key: Keypad * +KEY_KP_MULTIPLY = 332 +--- Key: Keypad - +KEY_KP_SUBTRACT = 333 +--- Key: Keypad + +KEY_KP_ADD = 334 +--- Key: Keypad Enter +KEY_KP_ENTER = 335 +--- Key: Keypad = +KEY_KP_EQUAL = 336 +--- Key: Android back button +KEY_BACK = 4 +--- Key: Android menu button +KEY_MENU = 5 +--- Key: Android volume up button +KEY_VOLUME_UP = 24 +--- Key: Android volume down button +KEY_VOLUME_DOWN = 25 ----@enum raylib.MouseCursor -M.MouseCursor = { - MOUSE_CURSOR_DEFAULT = 0, - MOUSE_CURSOR_ARROW = 1, - MOUSE_CURSOR_IBEAM = 2, - MOUSE_CURSOR_CROSSHAIR = 3, - MOUSE_CURSOR_POINTING_HAND = 4, - MOUSE_CURSOR_RESIZE_EW = 5, - MOUSE_CURSOR_RESIZE_NS = 6, - MOUSE_CURSOR_RESIZE_NWSE = 7, - MOUSE_CURSOR_RESIZE_NESW = 8, - MOUSE_CURSOR_RESIZE_ALL = 9, - MOUSE_CURSOR_NOT_ALLOWED = 10, -} +---Mouse buttons +---@alias MouseButton +---| `MOUSE_BUTTON_LEFT` #Mouse button left +---| `MOUSE_BUTTON_RIGHT` #Mouse button right +---| `MOUSE_BUTTON_MIDDLE` #Mouse button middle (pressed wheel) +---| `MOUSE_BUTTON_SIDE` #Mouse button side (advanced mouse device) +---| `MOUSE_BUTTON_EXTRA` #Mouse button extra (advanced mouse device) +---| `MOUSE_BUTTON_FORWARD` #Mouse button forward (advanced mouse device) +---| `MOUSE_BUTTON_BACK` #Mouse button back (advanced mouse device) +--- Mouse button left +MOUSE_BUTTON_LEFT = 0 +--- Mouse button right +MOUSE_BUTTON_RIGHT = 1 +--- Mouse button middle (pressed wheel) +MOUSE_BUTTON_MIDDLE = 2 +--- Mouse button side (advanced mouse device) +MOUSE_BUTTON_SIDE = 3 +--- Mouse button extra (advanced mouse device) +MOUSE_BUTTON_EXTRA = 4 +--- Mouse button forward (advanced mouse device) +MOUSE_BUTTON_FORWARD = 5 +--- Mouse button back (advanced mouse device) +MOUSE_BUTTON_BACK = 6 ----@enum raylib.GamepadButton -M.GamepadButton = { - GAMEPAD_BUTTON_UNKNOWN = 0, - GAMEPAD_BUTTON_LEFT_FACE_UP = 1, - GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2, - GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3, - GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4, - GAMEPAD_BUTTON_RIGHT_FACE_UP = 5, - GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6, - GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7, - GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8, - GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9, - GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10, - GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11, - GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12, - GAMEPAD_BUTTON_MIDDLE_LEFT = 13, - GAMEPAD_BUTTON_MIDDLE = 14, - GAMEPAD_BUTTON_MIDDLE_RIGHT = 15, - GAMEPAD_BUTTON_LEFT_THUMB = 16, - GAMEPAD_BUTTON_RIGHT_THUMB = 17, -} +---Mouse cursor +---@alias MouseCursor +---| `MOUSE_CURSOR_DEFAULT` #Default pointer shape +---| `MOUSE_CURSOR_ARROW` #Arrow shape +---| `MOUSE_CURSOR_IBEAM` #Text writing cursor shape +---| `MOUSE_CURSOR_CROSSHAIR` #Cross shape +---| `MOUSE_CURSOR_POINTING_HAND` #Pointing hand cursor +---| `MOUSE_CURSOR_RESIZE_EW` #Horizontal resize/move arrow shape +---| `MOUSE_CURSOR_RESIZE_NS` #Vertical resize/move arrow shape +---| `MOUSE_CURSOR_RESIZE_NWSE` #Top-left to bottom-right diagonal resize/move arrow shape +---| `MOUSE_CURSOR_RESIZE_NESW` #The top-right to bottom-left diagonal resize/move arrow shape +---| `MOUSE_CURSOR_RESIZE_ALL` #The omnidirectional resize/move cursor shape +---| `MOUSE_CURSOR_NOT_ALLOWED` #The operation-not-allowed shape +--- Default pointer shape +MOUSE_CURSOR_DEFAULT = 0 +--- Arrow shape +MOUSE_CURSOR_ARROW = 1 +--- Text writing cursor shape +MOUSE_CURSOR_IBEAM = 2 +--- Cross shape +MOUSE_CURSOR_CROSSHAIR = 3 +--- Pointing hand cursor +MOUSE_CURSOR_POINTING_HAND = 4 +--- Horizontal resize/move arrow shape +MOUSE_CURSOR_RESIZE_EW = 5 +--- Vertical resize/move arrow shape +MOUSE_CURSOR_RESIZE_NS = 6 +--- Top-left to bottom-right diagonal resize/move arrow shape +MOUSE_CURSOR_RESIZE_NWSE = 7 +--- The top-right to bottom-left diagonal resize/move arrow shape +MOUSE_CURSOR_RESIZE_NESW = 8 +--- The omnidirectional resize/move cursor shape +MOUSE_CURSOR_RESIZE_ALL = 9 +--- The operation-not-allowed shape +MOUSE_CURSOR_NOT_ALLOWED = 10 ----@enum raylib.GamepadAxis -M.GamepadAxis = { - GAMEPAD_AXIS_LEFT_X = 0, - GAMEPAD_AXIS_LEFT_Y = 1, - GAMEPAD_AXIS_RIGHT_X = 2, - GAMEPAD_AXIS_RIGHT_Y = 3, - GAMEPAD_AXIS_LEFT_TRIGGER = 4, - GAMEPAD_AXIS_RIGHT_TRIGGER = 5, -} +---Gamepad buttons +---@alias GamepadButton +---| `GAMEPAD_BUTTON_UNKNOWN` #Unknown button, for error checking +---| `GAMEPAD_BUTTON_LEFT_FACE_UP` #Gamepad left DPAD up button +---| `GAMEPAD_BUTTON_LEFT_FACE_RIGHT` #Gamepad left DPAD right button +---| `GAMEPAD_BUTTON_LEFT_FACE_DOWN` #Gamepad left DPAD down button +---| `GAMEPAD_BUTTON_LEFT_FACE_LEFT` #Gamepad left DPAD left button +---| `GAMEPAD_BUTTON_RIGHT_FACE_UP` #Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) +---| `GAMEPAD_BUTTON_RIGHT_FACE_RIGHT` #Gamepad right button right (i.e. PS3: Circle, Xbox: B) +---| `GAMEPAD_BUTTON_RIGHT_FACE_DOWN` #Gamepad right button down (i.e. PS3: Cross, Xbox: A) +---| `GAMEPAD_BUTTON_RIGHT_FACE_LEFT` #Gamepad right button left (i.e. PS3: Square, Xbox: X) +---| `GAMEPAD_BUTTON_LEFT_TRIGGER_1` #Gamepad top/back trigger left (first), it could be a trailing button +---| `GAMEPAD_BUTTON_LEFT_TRIGGER_2` #Gamepad top/back trigger left (second), it could be a trailing button +---| `GAMEPAD_BUTTON_RIGHT_TRIGGER_1` #Gamepad top/back trigger right (first), it could be a trailing button +---| `GAMEPAD_BUTTON_RIGHT_TRIGGER_2` #Gamepad top/back trigger right (second), it could be a trailing button +---| `GAMEPAD_BUTTON_MIDDLE_LEFT` #Gamepad center buttons, left one (i.e. PS3: Select) +---| `GAMEPAD_BUTTON_MIDDLE` #Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) +---| `GAMEPAD_BUTTON_MIDDLE_RIGHT` #Gamepad center buttons, right one (i.e. PS3: Start) +---| `GAMEPAD_BUTTON_LEFT_THUMB` #Gamepad joystick pressed button left +---| `GAMEPAD_BUTTON_RIGHT_THUMB` #Gamepad joystick pressed button right +--- Unknown button, for error checking +GAMEPAD_BUTTON_UNKNOWN = 0 +--- Gamepad left DPAD up button +GAMEPAD_BUTTON_LEFT_FACE_UP = 1 +--- Gamepad left DPAD right button +GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2 +--- Gamepad left DPAD down button +GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3 +--- Gamepad left DPAD left button +GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4 +--- Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) +GAMEPAD_BUTTON_RIGHT_FACE_UP = 5 +--- Gamepad right button right (i.e. PS3: Circle, Xbox: B) +GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6 +--- Gamepad right button down (i.e. PS3: Cross, Xbox: A) +GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7 +--- Gamepad right button left (i.e. PS3: Square, Xbox: X) +GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8 +--- Gamepad top/back trigger left (first), it could be a trailing button +GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9 +--- Gamepad top/back trigger left (second), it could be a trailing button +GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10 +--- Gamepad top/back trigger right (first), it could be a trailing button +GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11 +--- Gamepad top/back trigger right (second), it could be a trailing button +GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12 +--- Gamepad center buttons, left one (i.e. PS3: Select) +GAMEPAD_BUTTON_MIDDLE_LEFT = 13 +--- Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) +GAMEPAD_BUTTON_MIDDLE = 14 +--- Gamepad center buttons, right one (i.e. PS3: Start) +GAMEPAD_BUTTON_MIDDLE_RIGHT = 15 +--- Gamepad joystick pressed button left +GAMEPAD_BUTTON_LEFT_THUMB = 16 +--- Gamepad joystick pressed button right +GAMEPAD_BUTTON_RIGHT_THUMB = 17 ----@enum raylib.MaterialMapIndex -M.MaterialMapIndex = { - MATERIAL_MAP_ALBEDO = 0, - MATERIAL_MAP_METALNESS = 1, - MATERIAL_MAP_NORMAL = 2, - MATERIAL_MAP_ROUGHNESS = 3, - MATERIAL_MAP_OCCLUSION = 4, - MATERIAL_MAP_EMISSION = 5, - MATERIAL_MAP_HEIGHT = 6, - MATERIAL_MAP_CUBEMAP = 7, - MATERIAL_MAP_IRRADIANCE = 8, - MATERIAL_MAP_PREFILTER = 9, - MATERIAL_MAP_BRDF = 10, -} +---Gamepad axes +---@alias GamepadAxis +---| `GAMEPAD_AXIS_LEFT_X` #Gamepad left stick X axis +---| `GAMEPAD_AXIS_LEFT_Y` #Gamepad left stick Y axis +---| `GAMEPAD_AXIS_RIGHT_X` #Gamepad right stick X axis +---| `GAMEPAD_AXIS_RIGHT_Y` #Gamepad right stick Y axis +---| `GAMEPAD_AXIS_LEFT_TRIGGER` #Gamepad back trigger left, pressure level: [1..-1] +---| `GAMEPAD_AXIS_RIGHT_TRIGGER` #Gamepad back trigger right, pressure level: [1..-1] +--- Gamepad left stick X axis +GAMEPAD_AXIS_LEFT_X = 0 +--- Gamepad left stick Y axis +GAMEPAD_AXIS_LEFT_Y = 1 +--- Gamepad right stick X axis +GAMEPAD_AXIS_RIGHT_X = 2 +--- Gamepad right stick Y axis +GAMEPAD_AXIS_RIGHT_Y = 3 +--- Gamepad back trigger left, pressure level: [1..-1] +GAMEPAD_AXIS_LEFT_TRIGGER = 4 +--- Gamepad back trigger right, pressure level: [1..-1] +GAMEPAD_AXIS_RIGHT_TRIGGER = 5 ----@enum raylib.ShaderLocationIndex -M.ShaderLocationIndex = { - SHADER_LOC_VERTEX_POSITION = 0, - SHADER_LOC_VERTEX_TEXCOORD01 = 1, - SHADER_LOC_VERTEX_TEXCOORD02 = 2, - SHADER_LOC_VERTEX_NORMAL = 3, - SHADER_LOC_VERTEX_TANGENT = 4, - SHADER_LOC_VERTEX_COLOR = 5, - SHADER_LOC_MATRIX_MVP = 6, - SHADER_LOC_MATRIX_VIEW = 7, - SHADER_LOC_MATRIX_PROJECTION = 8, - SHADER_LOC_MATRIX_MODEL = 9, - SHADER_LOC_MATRIX_NORMAL = 10, - SHADER_LOC_VECTOR_VIEW = 11, - SHADER_LOC_COLOR_DIFFUSE = 12, - SHADER_LOC_COLOR_SPECULAR = 13, - SHADER_LOC_COLOR_AMBIENT = 14, - SHADER_LOC_MAP_ALBEDO = 15, - SHADER_LOC_MAP_METALNESS = 16, - SHADER_LOC_MAP_NORMAL = 17, - SHADER_LOC_MAP_ROUGHNESS = 18, - SHADER_LOC_MAP_OCCLUSION = 19, - SHADER_LOC_MAP_EMISSION = 20, - SHADER_LOC_MAP_HEIGHT = 21, - SHADER_LOC_MAP_CUBEMAP = 22, - SHADER_LOC_MAP_IRRADIANCE = 23, - SHADER_LOC_MAP_PREFILTER = 24, - SHADER_LOC_MAP_BRDF = 25, - SHADER_LOC_VERTEX_BONEIDS = 26, - SHADER_LOC_VERTEX_BONEWEIGHTS = 27, - SHADER_LOC_MATRIX_BONETRANSFORMS = 28, - SHADER_LOC_VERTEX_INSTANCETRANSFORM = 29, -} +---Material map index +---@alias MaterialMapIndex +---| `MATERIAL_MAP_ALBEDO` #Albedo material (same as: MATERIAL_MAP_DIFFUSE) +---| `MATERIAL_MAP_METALNESS` #Metalness material (same as: MATERIAL_MAP_SPECULAR) +---| `MATERIAL_MAP_NORMAL` #Normal material +---| `MATERIAL_MAP_ROUGHNESS` #Roughness material +---| `MATERIAL_MAP_OCCLUSION` #Ambient occlusion material +---| `MATERIAL_MAP_EMISSION` #Emission material +---| `MATERIAL_MAP_HEIGHT` #Heightmap material +---| `MATERIAL_MAP_CUBEMAP` #Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) +---| `MATERIAL_MAP_IRRADIANCE` #Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) +---| `MATERIAL_MAP_PREFILTER` #Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) +---| `MATERIAL_MAP_BRDF` #Brdf material +--- Albedo material (same as: MATERIAL_MAP_DIFFUSE) +MATERIAL_MAP_ALBEDO = 0 +--- Metalness material (same as: MATERIAL_MAP_SPECULAR) +MATERIAL_MAP_METALNESS = 1 +--- Normal material +MATERIAL_MAP_NORMAL = 2 +--- Roughness material +MATERIAL_MAP_ROUGHNESS = 3 +--- Ambient occlusion material +MATERIAL_MAP_OCCLUSION = 4 +--- Emission material +MATERIAL_MAP_EMISSION = 5 +--- Heightmap material +MATERIAL_MAP_HEIGHT = 6 +--- Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP) +MATERIAL_MAP_CUBEMAP = 7 +--- Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP) +MATERIAL_MAP_IRRADIANCE = 8 +--- Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP) +MATERIAL_MAP_PREFILTER = 9 +--- Brdf material +MATERIAL_MAP_BRDF = 10 ----@enum raylib.ShaderUniformDataType -M.ShaderUniformDataType = { - SHADER_UNIFORM_FLOAT = 0, - SHADER_UNIFORM_VEC2 = 1, - SHADER_UNIFORM_VEC3 = 2, - SHADER_UNIFORM_VEC4 = 3, - SHADER_UNIFORM_INT = 4, - SHADER_UNIFORM_IVEC2 = 5, - SHADER_UNIFORM_IVEC3 = 6, - SHADER_UNIFORM_IVEC4 = 7, - SHADER_UNIFORM_UINT = 8, - SHADER_UNIFORM_UIVEC2 = 9, - SHADER_UNIFORM_UIVEC3 = 10, - SHADER_UNIFORM_UIVEC4 = 11, - SHADER_UNIFORM_SAMPLER2D = 12, -} +---Shader location index +---@alias ShaderLocationIndex +---| `SHADER_LOC_VERTEX_POSITION` #Shader location: vertex attribute: position +---| `SHADER_LOC_VERTEX_TEXCOORD01` #Shader location: vertex attribute: texcoord01 +---| `SHADER_LOC_VERTEX_TEXCOORD02` #Shader location: vertex attribute: texcoord02 +---| `SHADER_LOC_VERTEX_NORMAL` #Shader location: vertex attribute: normal +---| `SHADER_LOC_VERTEX_TANGENT` #Shader location: vertex attribute: tangent +---| `SHADER_LOC_VERTEX_COLOR` #Shader location: vertex attribute: color +---| `SHADER_LOC_MATRIX_MVP` #Shader location: matrix uniform: model-view-projection +---| `SHADER_LOC_MATRIX_VIEW` #Shader location: matrix uniform: view (camera transform) +---| `SHADER_LOC_MATRIX_PROJECTION` #Shader location: matrix uniform: projection +---| `SHADER_LOC_MATRIX_MODEL` #Shader location: matrix uniform: model (transform) +---| `SHADER_LOC_MATRIX_NORMAL` #Shader location: matrix uniform: normal +---| `SHADER_LOC_VECTOR_VIEW` #Shader location: vector uniform: view +---| `SHADER_LOC_COLOR_DIFFUSE` #Shader location: vector uniform: diffuse color +---| `SHADER_LOC_COLOR_SPECULAR` #Shader location: vector uniform: specular color +---| `SHADER_LOC_COLOR_AMBIENT` #Shader location: vector uniform: ambient color +---| `SHADER_LOC_MAP_ALBEDO` #Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) +---| `SHADER_LOC_MAP_METALNESS` #Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) +---| `SHADER_LOC_MAP_NORMAL` #Shader location: sampler2d texture: normal +---| `SHADER_LOC_MAP_ROUGHNESS` #Shader location: sampler2d texture: roughness +---| `SHADER_LOC_MAP_OCCLUSION` #Shader location: sampler2d texture: occlusion +---| `SHADER_LOC_MAP_EMISSION` #Shader location: sampler2d texture: emission +---| `SHADER_LOC_MAP_HEIGHT` #Shader location: sampler2d texture: heightmap +---| `SHADER_LOC_MAP_CUBEMAP` #Shader location: samplerCube texture: cubemap +---| `SHADER_LOC_MAP_IRRADIANCE` #Shader location: samplerCube texture: irradiance +---| `SHADER_LOC_MAP_PREFILTER` #Shader location: samplerCube texture: prefilter +---| `SHADER_LOC_MAP_BRDF` #Shader location: sampler2d texture: brdf +---| `SHADER_LOC_VERTEX_BONEIDS` #Shader location: vertex attribute: bone indices +---| `SHADER_LOC_VERTEX_BONEWEIGHTS` #Shader location: vertex attribute: bone weights +---| `SHADER_LOC_MATRIX_BONETRANSFORMS` #Shader location: matrix attribute: bone transforms (animation) +---| `SHADER_LOC_VERTEX_INSTANCETRANSFORM` #Shader location: vertex attribute: instance transforms +--- Shader location: vertex attribute: position +SHADER_LOC_VERTEX_POSITION = 0 +--- Shader location: vertex attribute: texcoord01 +SHADER_LOC_VERTEX_TEXCOORD01 = 1 +--- Shader location: vertex attribute: texcoord02 +SHADER_LOC_VERTEX_TEXCOORD02 = 2 +--- Shader location: vertex attribute: normal +SHADER_LOC_VERTEX_NORMAL = 3 +--- Shader location: vertex attribute: tangent +SHADER_LOC_VERTEX_TANGENT = 4 +--- Shader location: vertex attribute: color +SHADER_LOC_VERTEX_COLOR = 5 +--- Shader location: matrix uniform: model-view-projection +SHADER_LOC_MATRIX_MVP = 6 +--- Shader location: matrix uniform: view (camera transform) +SHADER_LOC_MATRIX_VIEW = 7 +--- Shader location: matrix uniform: projection +SHADER_LOC_MATRIX_PROJECTION = 8 +--- Shader location: matrix uniform: model (transform) +SHADER_LOC_MATRIX_MODEL = 9 +--- Shader location: matrix uniform: normal +SHADER_LOC_MATRIX_NORMAL = 10 +--- Shader location: vector uniform: view +SHADER_LOC_VECTOR_VIEW = 11 +--- Shader location: vector uniform: diffuse color +SHADER_LOC_COLOR_DIFFUSE = 12 +--- Shader location: vector uniform: specular color +SHADER_LOC_COLOR_SPECULAR = 13 +--- Shader location: vector uniform: ambient color +SHADER_LOC_COLOR_AMBIENT = 14 +--- Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE) +SHADER_LOC_MAP_ALBEDO = 15 +--- Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR) +SHADER_LOC_MAP_METALNESS = 16 +--- Shader location: sampler2d texture: normal +SHADER_LOC_MAP_NORMAL = 17 +--- Shader location: sampler2d texture: roughness +SHADER_LOC_MAP_ROUGHNESS = 18 +--- Shader location: sampler2d texture: occlusion +SHADER_LOC_MAP_OCCLUSION = 19 +--- Shader location: sampler2d texture: emission +SHADER_LOC_MAP_EMISSION = 20 +--- Shader location: sampler2d texture: heightmap +SHADER_LOC_MAP_HEIGHT = 21 +--- Shader location: samplerCube texture: cubemap +SHADER_LOC_MAP_CUBEMAP = 22 +--- Shader location: samplerCube texture: irradiance +SHADER_LOC_MAP_IRRADIANCE = 23 +--- Shader location: samplerCube texture: prefilter +SHADER_LOC_MAP_PREFILTER = 24 +--- Shader location: sampler2d texture: brdf +SHADER_LOC_MAP_BRDF = 25 +--- Shader location: vertex attribute: bone indices +SHADER_LOC_VERTEX_BONEIDS = 26 +--- Shader location: vertex attribute: bone weights +SHADER_LOC_VERTEX_BONEWEIGHTS = 27 +--- Shader location: matrix attribute: bone transforms (animation) +SHADER_LOC_MATRIX_BONETRANSFORMS = 28 +--- Shader location: vertex attribute: instance transforms +SHADER_LOC_VERTEX_INSTANCETRANSFORM = 29 ----@enum raylib.ShaderAttributeDataType -M.ShaderAttributeDataType = { - SHADER_ATTRIB_FLOAT = 0, - SHADER_ATTRIB_VEC2 = 1, - SHADER_ATTRIB_VEC3 = 2, - SHADER_ATTRIB_VEC4 = 3, -} +---Shader uniform data type +---@alias ShaderUniformDataType +---| `SHADER_UNIFORM_FLOAT` #Shader uniform type: float +---| `SHADER_UNIFORM_VEC2` #Shader uniform type: vec2 (2 float) +---| `SHADER_UNIFORM_VEC3` #Shader uniform type: vec3 (3 float) +---| `SHADER_UNIFORM_VEC4` #Shader uniform type: vec4 (4 float) +---| `SHADER_UNIFORM_INT` #Shader uniform type: int +---| `SHADER_UNIFORM_IVEC2` #Shader uniform type: ivec2 (2 int) +---| `SHADER_UNIFORM_IVEC3` #Shader uniform type: ivec3 (3 int) +---| `SHADER_UNIFORM_IVEC4` #Shader uniform type: ivec4 (4 int) +---| `SHADER_UNIFORM_UINT` #Shader uniform type: unsigned int +---| `SHADER_UNIFORM_UIVEC2` #Shader uniform type: uivec2 (2 unsigned int) +---| `SHADER_UNIFORM_UIVEC3` #Shader uniform type: uivec3 (3 unsigned int) +---| `SHADER_UNIFORM_UIVEC4` #Shader uniform type: uivec4 (4 unsigned int) +---| `SHADER_UNIFORM_SAMPLER2D` #Shader uniform type: sampler2d +--- Shader uniform type: float +SHADER_UNIFORM_FLOAT = 0 +--- Shader uniform type: vec2 (2 float) +SHADER_UNIFORM_VEC2 = 1 +--- Shader uniform type: vec3 (3 float) +SHADER_UNIFORM_VEC3 = 2 +--- Shader uniform type: vec4 (4 float) +SHADER_UNIFORM_VEC4 = 3 +--- Shader uniform type: int +SHADER_UNIFORM_INT = 4 +--- Shader uniform type: ivec2 (2 int) +SHADER_UNIFORM_IVEC2 = 5 +--- Shader uniform type: ivec3 (3 int) +SHADER_UNIFORM_IVEC3 = 6 +--- Shader uniform type: ivec4 (4 int) +SHADER_UNIFORM_IVEC4 = 7 +--- Shader uniform type: unsigned int +SHADER_UNIFORM_UINT = 8 +--- Shader uniform type: uivec2 (2 unsigned int) +SHADER_UNIFORM_UIVEC2 = 9 +--- Shader uniform type: uivec3 (3 unsigned int) +SHADER_UNIFORM_UIVEC3 = 10 +--- Shader uniform type: uivec4 (4 unsigned int) +SHADER_UNIFORM_UIVEC4 = 11 +--- Shader uniform type: sampler2d +SHADER_UNIFORM_SAMPLER2D = 12 ----@enum raylib.PixelFormat -M.PixelFormat = { - PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, - PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, - PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, - PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, - PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, - PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, - PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, - PIXELFORMAT_UNCOMPRESSED_R32 = 8, - PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, - PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, - PIXELFORMAT_UNCOMPRESSED_R16 = 11, - PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12, - PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13, - PIXELFORMAT_COMPRESSED_DXT1_RGB = 14, - PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15, - PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16, - PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17, - PIXELFORMAT_COMPRESSED_ETC1_RGB = 18, - PIXELFORMAT_COMPRESSED_ETC2_RGB = 19, - PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20, - PIXELFORMAT_COMPRESSED_PVRT_RGB = 21, - PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22, - PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23, - PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24, -} +---Shader attribute data types +---@alias ShaderAttributeDataType +---| `SHADER_ATTRIB_FLOAT` #Shader attribute type: float +---| `SHADER_ATTRIB_VEC2` #Shader attribute type: vec2 (2 float) +---| `SHADER_ATTRIB_VEC3` #Shader attribute type: vec3 (3 float) +---| `SHADER_ATTRIB_VEC4` #Shader attribute type: vec4 (4 float) +--- Shader attribute type: float +SHADER_ATTRIB_FLOAT = 0 +--- Shader attribute type: vec2 (2 float) +SHADER_ATTRIB_VEC2 = 1 +--- Shader attribute type: vec3 (3 float) +SHADER_ATTRIB_VEC3 = 2 +--- Shader attribute type: vec4 (4 float) +SHADER_ATTRIB_VEC4 = 3 ----@enum raylib.TextureFilter -M.TextureFilter = { - TEXTURE_FILTER_POINT = 0, - TEXTURE_FILTER_BILINEAR = 1, - TEXTURE_FILTER_TRILINEAR = 2, - TEXTURE_FILTER_ANISOTROPIC_4X = 3, - TEXTURE_FILTER_ANISOTROPIC_8X = 4, - TEXTURE_FILTER_ANISOTROPIC_16X = 5, -} +---Pixel formats +---@alias PixelFormat +---| `PIXELFORMAT_UNCOMPRESSED_GRAYSCALE` #8 bit per pixel (no alpha) +---| `PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA` #8*2 bpp (2 channels) +---| `PIXELFORMAT_UNCOMPRESSED_R5G6B5` #16 bpp +---| `PIXELFORMAT_UNCOMPRESSED_R8G8B8` #24 bpp +---| `PIXELFORMAT_UNCOMPRESSED_R5G5B5A1` #16 bpp (1 bit alpha) +---| `PIXELFORMAT_UNCOMPRESSED_R4G4B4A4` #16 bpp (4 bit alpha) +---| `PIXELFORMAT_UNCOMPRESSED_R8G8B8A8` #32 bpp +---| `PIXELFORMAT_UNCOMPRESSED_R32` #32 bpp (1 channel - float) +---| `PIXELFORMAT_UNCOMPRESSED_R32G32B32` #32*3 bpp (3 channels - float) +---| `PIXELFORMAT_UNCOMPRESSED_R32G32B32A32` #32*4 bpp (4 channels - float) +---| `PIXELFORMAT_UNCOMPRESSED_R16` #16 bpp (1 channel - half float) +---| `PIXELFORMAT_UNCOMPRESSED_R16G16B16` #16*3 bpp (3 channels - half float) +---| `PIXELFORMAT_UNCOMPRESSED_R16G16B16A16` #16*4 bpp (4 channels - half float) +---| `PIXELFORMAT_COMPRESSED_DXT1_RGB` #4 bpp (no alpha) +---| `PIXELFORMAT_COMPRESSED_DXT1_RGBA` #4 bpp (1 bit alpha) +---| `PIXELFORMAT_COMPRESSED_DXT3_RGBA` #8 bpp +---| `PIXELFORMAT_COMPRESSED_DXT5_RGBA` #8 bpp +---| `PIXELFORMAT_COMPRESSED_ETC1_RGB` #4 bpp +---| `PIXELFORMAT_COMPRESSED_ETC2_RGB` #4 bpp +---| `PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA` #8 bpp +---| `PIXELFORMAT_COMPRESSED_PVRT_RGB` #4 bpp +---| `PIXELFORMAT_COMPRESSED_PVRT_RGBA` #4 bpp +---| `PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA` #8 bpp +---| `PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA` #2 bpp +--- 8 bit per pixel (no alpha) +PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 +--- 8*2 bpp (2 channels) +PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 +--- 16 bpp +PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 +--- 24 bpp +PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 +--- 16 bpp (1 bit alpha) +PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 +--- 16 bpp (4 bit alpha) +PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 +--- 32 bpp +PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 +--- 32 bpp (1 channel - float) +PIXELFORMAT_UNCOMPRESSED_R32 = 8 +--- 32*3 bpp (3 channels - float) +PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 +--- 32*4 bpp (4 channels - float) +PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 +--- 16 bpp (1 channel - half float) +PIXELFORMAT_UNCOMPRESSED_R16 = 11 +--- 16*3 bpp (3 channels - half float) +PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12 +--- 16*4 bpp (4 channels - half float) +PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13 +--- 4 bpp (no alpha) +PIXELFORMAT_COMPRESSED_DXT1_RGB = 14 +--- 4 bpp (1 bit alpha) +PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15 +--- 8 bpp +PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16 +--- 8 bpp +PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17 +--- 4 bpp +PIXELFORMAT_COMPRESSED_ETC1_RGB = 18 +--- 4 bpp +PIXELFORMAT_COMPRESSED_ETC2_RGB = 19 +--- 8 bpp +PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20 +--- 4 bpp +PIXELFORMAT_COMPRESSED_PVRT_RGB = 21 +--- 4 bpp +PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22 +--- 8 bpp +PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23 +--- 2 bpp +PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24 ----@enum raylib.TextureWrap -M.TextureWrap = { - TEXTURE_WRAP_REPEAT = 0, - TEXTURE_WRAP_CLAMP = 1, - TEXTURE_WRAP_MIRROR_REPEAT = 2, - TEXTURE_WRAP_MIRROR_CLAMP = 3, -} +---Texture parameters: filter mode +---@alias TextureFilter +---| `TEXTURE_FILTER_POINT` #No filter, pixel approximation +---| `TEXTURE_FILTER_BILINEAR` #Linear filtering +---| `TEXTURE_FILTER_TRILINEAR` #Trilinear filtering (linear with mipmaps) +---| `TEXTURE_FILTER_ANISOTROPIC_4X` #Anisotropic filtering 4x +---| `TEXTURE_FILTER_ANISOTROPIC_8X` #Anisotropic filtering 8x +---| `TEXTURE_FILTER_ANISOTROPIC_16X` #Anisotropic filtering 16x +--- No filter, pixel approximation +TEXTURE_FILTER_POINT = 0 +--- Linear filtering +TEXTURE_FILTER_BILINEAR = 1 +--- Trilinear filtering (linear with mipmaps) +TEXTURE_FILTER_TRILINEAR = 2 +--- Anisotropic filtering 4x +TEXTURE_FILTER_ANISOTROPIC_4X = 3 +--- Anisotropic filtering 8x +TEXTURE_FILTER_ANISOTROPIC_8X = 4 +--- Anisotropic filtering 16x +TEXTURE_FILTER_ANISOTROPIC_16X = 5 ----@enum raylib.CubemapLayout -M.CubemapLayout = { - CUBEMAP_LAYOUT_AUTO_DETECT = 0, - CUBEMAP_LAYOUT_LINE_VERTICAL = 1, - CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2, - CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3, - CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4, -} +---Texture parameters: wrap mode +---@alias TextureWrap +---| `TEXTURE_WRAP_REPEAT` #Repeats texture in tiled mode +---| `TEXTURE_WRAP_CLAMP` #Clamps texture to edge pixel in tiled mode +---| `TEXTURE_WRAP_MIRROR_REPEAT` #Mirrors and repeats the texture in tiled mode +---| `TEXTURE_WRAP_MIRROR_CLAMP` #Mirrors and clamps to border the texture in tiled mode +--- Repeats texture in tiled mode +TEXTURE_WRAP_REPEAT = 0 +--- Clamps texture to edge pixel in tiled mode +TEXTURE_WRAP_CLAMP = 1 +--- Mirrors and repeats the texture in tiled mode +TEXTURE_WRAP_MIRROR_REPEAT = 2 +--- Mirrors and clamps to border the texture in tiled mode +TEXTURE_WRAP_MIRROR_CLAMP = 3 ----@enum raylib.FontType -M.FontType = { - FONT_DEFAULT = 0, - FONT_BITMAP = 1, - FONT_SDF = 2, -} +---Cubemap layouts +---@alias CubemapLayout +---| `CUBEMAP_LAYOUT_AUTO_DETECT` #Automatically detect layout type +---| `CUBEMAP_LAYOUT_LINE_VERTICAL` #Layout is defined by a vertical line with faces +---| `CUBEMAP_LAYOUT_LINE_HORIZONTAL` #Layout is defined by a horizontal line with faces +---| `CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR` #Layout is defined by a 3x4 cross with cubemap faces +---| `CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE` #Layout is defined by a 4x3 cross with cubemap faces +--- Automatically detect layout type +CUBEMAP_LAYOUT_AUTO_DETECT = 0 +--- Layout is defined by a vertical line with faces +CUBEMAP_LAYOUT_LINE_VERTICAL = 1 +--- Layout is defined by a horizontal line with faces +CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2 +--- Layout is defined by a 3x4 cross with cubemap faces +CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3 +--- Layout is defined by a 4x3 cross with cubemap faces +CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4 ----@enum raylib.BlendMode -M.BlendMode = { - BLEND_ALPHA = 0, - BLEND_ADDITIVE = 1, - BLEND_MULTIPLIED = 2, - BLEND_ADD_COLORS = 3, - BLEND_SUBTRACT_COLORS = 4, - BLEND_ALPHA_PREMULTIPLY = 5, - BLEND_CUSTOM = 6, - BLEND_CUSTOM_SEPARATE = 7, -} +---Font type, defines generation method +---@alias FontType +---| `FONT_DEFAULT` #Default font generation, anti-aliased +---| `FONT_BITMAP` #Bitmap font generation, no anti-aliasing +---| `FONT_SDF` #SDF font generation, requires external shader +--- Default font generation, anti-aliased +FONT_DEFAULT = 0 +--- Bitmap font generation, no anti-aliasing +FONT_BITMAP = 1 +--- SDF font generation, requires external shader +FONT_SDF = 2 ----@enum raylib.Gesture -M.Gesture = { - GESTURE_NONE = 0, - GESTURE_TAP = 1, - GESTURE_DOUBLETAP = 2, - GESTURE_HOLD = 4, - GESTURE_DRAG = 8, - GESTURE_SWIPE_RIGHT = 16, - GESTURE_SWIPE_LEFT = 32, - GESTURE_SWIPE_UP = 64, - GESTURE_SWIPE_DOWN = 128, - GESTURE_PINCH_IN = 256, - GESTURE_PINCH_OUT = 512, -} +---Color blending modes (pre-defined) +---@alias BlendMode +---| `BLEND_ALPHA` #Blend textures considering alpha (default) +---| `BLEND_ADDITIVE` #Blend textures adding colors +---| `BLEND_MULTIPLIED` #Blend textures multiplying colors +---| `BLEND_ADD_COLORS` #Blend textures adding colors (alternative) +---| `BLEND_SUBTRACT_COLORS` #Blend textures subtracting colors (alternative) +---| `BLEND_ALPHA_PREMULTIPLY` #Blend premultiplied textures considering alpha +---| `BLEND_CUSTOM` #Blend textures using custom src/dst factors (use rlSetBlendFactors()) +---| `BLEND_CUSTOM_SEPARATE` #Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) +--- Blend textures considering alpha (default) +BLEND_ALPHA = 0 +--- Blend textures adding colors +BLEND_ADDITIVE = 1 +--- Blend textures multiplying colors +BLEND_MULTIPLIED = 2 +--- Blend textures adding colors (alternative) +BLEND_ADD_COLORS = 3 +--- Blend textures subtracting colors (alternative) +BLEND_SUBTRACT_COLORS = 4 +--- Blend premultiplied textures considering alpha +BLEND_ALPHA_PREMULTIPLY = 5 +--- Blend textures using custom src/dst factors (use rlSetBlendFactors()) +BLEND_CUSTOM = 6 +--- Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) +BLEND_CUSTOM_SEPARATE = 7 ----@enum raylib.CameraMode -M.CameraMode = { - CAMERA_CUSTOM = 0, - CAMERA_FREE = 1, - CAMERA_ORBITAL = 2, - CAMERA_FIRST_PERSON = 3, - CAMERA_THIRD_PERSON = 4, -} +---Gesture +---@alias Gesture +---| `GESTURE_NONE` #No gesture +---| `GESTURE_TAP` #Tap gesture +---| `GESTURE_DOUBLETAP` #Double tap gesture +---| `GESTURE_HOLD` #Hold gesture +---| `GESTURE_DRAG` #Drag gesture +---| `GESTURE_SWIPE_RIGHT` #Swipe right gesture +---| `GESTURE_SWIPE_LEFT` #Swipe left gesture +---| `GESTURE_SWIPE_UP` #Swipe up gesture +---| `GESTURE_SWIPE_DOWN` #Swipe down gesture +---| `GESTURE_PINCH_IN` #Pinch in gesture +---| `GESTURE_PINCH_OUT` #Pinch out gesture +--- No gesture +GESTURE_NONE = 0 +--- Tap gesture +GESTURE_TAP = 1 +--- Double tap gesture +GESTURE_DOUBLETAP = 2 +--- Hold gesture +GESTURE_HOLD = 4 +--- Drag gesture +GESTURE_DRAG = 8 +--- Swipe right gesture +GESTURE_SWIPE_RIGHT = 16 +--- Swipe left gesture +GESTURE_SWIPE_LEFT = 32 +--- Swipe up gesture +GESTURE_SWIPE_UP = 64 +--- Swipe down gesture +GESTURE_SWIPE_DOWN = 128 +--- Pinch in gesture +GESTURE_PINCH_IN = 256 +--- Pinch out gesture +GESTURE_PINCH_OUT = 512 ----@enum raylib.CameraProjection -M.CameraProjection = { - CAMERA_PERSPECTIVE = 0, - CAMERA_ORTHOGRAPHIC = 1, -} +---Camera system modes +---@alias CameraMode +---| `CAMERA_CUSTOM` #Camera custom, controlled by user (UpdateCamera() does nothing) +---| `CAMERA_FREE` #Camera free mode +---| `CAMERA_ORBITAL` #Camera orbital, around target, zoom supported +---| `CAMERA_FIRST_PERSON` #Camera first person +---| `CAMERA_THIRD_PERSON` #Camera third person +--- Camera custom, controlled by user (UpdateCamera() does nothing) +CAMERA_CUSTOM = 0 +--- Camera free mode +CAMERA_FREE = 1 +--- Camera orbital, around target, zoom supported +CAMERA_ORBITAL = 2 +--- Camera first person +CAMERA_FIRST_PERSON = 3 +--- Camera third person +CAMERA_THIRD_PERSON = 4 ----@enum raylib.NPatchLayout -M.NPatchLayout = { - NPATCH_NINE_PATCH = 0, - NPATCH_THREE_PATCH_VERTICAL = 1, - NPATCH_THREE_PATCH_HORIZONTAL = 2, -} +---Camera projection +---@alias CameraProjection +---| `CAMERA_PERSPECTIVE` #Perspective projection +---| `CAMERA_ORTHOGRAPHIC` #Orthographic projection +--- Perspective projection +CAMERA_PERSPECTIVE = 0 +--- Orthographic projection +CAMERA_ORTHOGRAPHIC = 1 ----@enum raylib.rlGlVersion -M.rlGlVersion = { - RL_OPENGL_SOFTWARE = 0, - RL_OPENGL_11 = 1, - RL_OPENGL_21 = 2, - RL_OPENGL_33 = 3, - RL_OPENGL_43 = 4, - RL_OPENGL_ES_20 = 5, - RL_OPENGL_ES_30 = 6, -} +---N-patch layout +---@alias NPatchLayout +---| `NPATCH_NINE_PATCH` #Npatch layout: 3x3 tiles +---| `NPATCH_THREE_PATCH_VERTICAL` #Npatch layout: 1x3 tiles +---| `NPATCH_THREE_PATCH_HORIZONTAL` #Npatch layout: 3x1 tiles +--- Npatch layout: 3x3 tiles +NPATCH_NINE_PATCH = 0 +--- Npatch layout: 1x3 tiles +NPATCH_THREE_PATCH_VERTICAL = 1 +--- Npatch layout: 3x1 tiles +NPATCH_THREE_PATCH_HORIZONTAL = 2 ----@enum raylib.rlTraceLogLevel -M.rlTraceLogLevel = { - RL_LOG_ALL = 0, - RL_LOG_TRACE = 1, - RL_LOG_DEBUG = 2, - RL_LOG_INFO = 3, - RL_LOG_WARNING = 4, - RL_LOG_ERROR = 5, - RL_LOG_FATAL = 6, - RL_LOG_NONE = 7, -} +---OpenGL version +---@alias rlGlVersion +---| `RL_OPENGL_SOFTWARE` #Software rendering +---| `RL_OPENGL_11` #OpenGL 1.1 +---| `RL_OPENGL_21` #OpenGL 2.1 (GLSL 120) +---| `RL_OPENGL_33` #OpenGL 3.3 (GLSL 330) +---| `RL_OPENGL_43` #OpenGL 4.3 (using GLSL 330) +---| `RL_OPENGL_ES_20` #OpenGL ES 2.0 (GLSL 100) +---| `RL_OPENGL_ES_30` #OpenGL ES 3.0 (GLSL 300 es) +--- Software rendering +RL_OPENGL_SOFTWARE = 0 +--- OpenGL 1.1 +RL_OPENGL_11 = 1 +--- OpenGL 2.1 (GLSL 120) +RL_OPENGL_21 = 2 +--- OpenGL 3.3 (GLSL 330) +RL_OPENGL_33 = 3 +--- OpenGL 4.3 (using GLSL 330) +RL_OPENGL_43 = 4 +--- OpenGL ES 2.0 (GLSL 100) +RL_OPENGL_ES_20 = 5 +--- OpenGL ES 3.0 (GLSL 300 es) +RL_OPENGL_ES_30 = 6 ----@enum raylib.rlPixelFormat -M.rlPixelFormat = { - RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, - RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2, - RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3, - RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4, - RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5, - RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6, - RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7, - RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8, - RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9, - RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10, - RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11, - RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12, - RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13, - RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14, - RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15, - RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16, - RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17, - RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18, - RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19, - RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20, - RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21, - RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22, - RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23, - RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24, -} +---Trace log level +---@alias rlTraceLogLevel +---| `RL_LOG_ALL` #Display all logs +---| `RL_LOG_TRACE` #Trace logging, intended for internal use only +---| `RL_LOG_DEBUG` #Debug logging, used for internal debugging, it should be disabled on release builds +---| `RL_LOG_INFO` #Info logging, used for program execution info +---| `RL_LOG_WARNING` #Warning logging, used on recoverable failures +---| `RL_LOG_ERROR` #Error logging, used on unrecoverable failures +---| `RL_LOG_FATAL` #Fatal logging, used to abort program: exit(EXIT_FAILURE) +---| `RL_LOG_NONE` #Disable logging +--- Display all logs +RL_LOG_ALL = 0 +--- Trace logging, intended for internal use only +RL_LOG_TRACE = 1 +--- Debug logging, used for internal debugging, it should be disabled on release builds +RL_LOG_DEBUG = 2 +--- Info logging, used for program execution info +RL_LOG_INFO = 3 +--- Warning logging, used on recoverable failures +RL_LOG_WARNING = 4 +--- Error logging, used on unrecoverable failures +RL_LOG_ERROR = 5 +--- Fatal logging, used to abort program: exit(EXIT_FAILURE) +RL_LOG_FATAL = 6 +--- Disable logging +RL_LOG_NONE = 7 ----@enum raylib.rlTextureFilter -M.rlTextureFilter = { - RL_TEXTURE_FILTER_POINT = 0, - RL_TEXTURE_FILTER_BILINEAR = 1, - RL_TEXTURE_FILTER_TRILINEAR = 2, - RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3, - RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4, - RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5, -} +---Texture pixel formats +---@alias rlPixelFormat +---| `RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE` #8 bit per pixel (no alpha) +---| `RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA` #8*2 bpp (2 channels) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5` #16 bpp +---| `RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8` #24 bpp +---| `RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1` #16 bpp (1 bit alpha) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4` #16 bpp (4 bit alpha) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8` #32 bpp +---| `RL_PIXELFORMAT_UNCOMPRESSED_R32` #32 bpp (1 channel - float) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32` #32*3 bpp (3 channels - float) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32` #32*4 bpp (4 channels - float) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R16` #16 bpp (1 channel - half float) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16` #16*3 bpp (3 channels - half float) +---| `RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16` #16*4 bpp (4 channels - half float) +---| `RL_PIXELFORMAT_COMPRESSED_DXT1_RGB` #4 bpp (no alpha) +---| `RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA` #4 bpp (1 bit alpha) +---| `RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA` #8 bpp +---| `RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA` #8 bpp +---| `RL_PIXELFORMAT_COMPRESSED_ETC1_RGB` #4 bpp +---| `RL_PIXELFORMAT_COMPRESSED_ETC2_RGB` #4 bpp +---| `RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA` #8 bpp +---| `RL_PIXELFORMAT_COMPRESSED_PVRT_RGB` #4 bpp +---| `RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA` #4 bpp +---| `RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA` #8 bpp +---| `RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA` #2 bpp +--- 8 bit per pixel (no alpha) +RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 +--- 8*2 bpp (2 channels) +RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 +--- 16 bpp +RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 +--- 24 bpp +RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 +--- 16 bpp (1 bit alpha) +RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 +--- 16 bpp (4 bit alpha) +RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 +--- 32 bpp +RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 +--- 32 bpp (1 channel - float) +RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8 +--- 32*3 bpp (3 channels - float) +RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 +--- 32*4 bpp (4 channels - float) +RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 +--- 16 bpp (1 channel - half float) +RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11 +--- 16*3 bpp (3 channels - half float) +RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12 +--- 16*4 bpp (4 channels - half float) +RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13 +--- 4 bpp (no alpha) +RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14 +--- 4 bpp (1 bit alpha) +RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15 +--- 8 bpp +RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16 +--- 8 bpp +RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17 +--- 4 bpp +RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18 +--- 4 bpp +RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19 +--- 8 bpp +RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20 +--- 4 bpp +RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21 +--- 4 bpp +RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22 +--- 8 bpp +RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23 +--- 2 bpp +RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24 ----@enum raylib.rlBlendMode -M.rlBlendMode = { - RL_BLEND_ALPHA = 0, - RL_BLEND_ADDITIVE = 1, - RL_BLEND_MULTIPLIED = 2, - RL_BLEND_ADD_COLORS = 3, - RL_BLEND_SUBTRACT_COLORS = 4, - RL_BLEND_ALPHA_PREMULTIPLY = 5, - RL_BLEND_CUSTOM = 6, - RL_BLEND_CUSTOM_SEPARATE = 7, -} +---Texture parameters: filter mode +---@alias rlTextureFilter +---| `RL_TEXTURE_FILTER_POINT` #No filter, pixel approximation +---| `RL_TEXTURE_FILTER_BILINEAR` #Linear filtering +---| `RL_TEXTURE_FILTER_TRILINEAR` #Trilinear filtering (linear with mipmaps) +---| `RL_TEXTURE_FILTER_ANISOTROPIC_4X` #Anisotropic filtering 4x +---| `RL_TEXTURE_FILTER_ANISOTROPIC_8X` #Anisotropic filtering 8x +---| `RL_TEXTURE_FILTER_ANISOTROPIC_16X` #Anisotropic filtering 16x +--- No filter, pixel approximation +RL_TEXTURE_FILTER_POINT = 0 +--- Linear filtering +RL_TEXTURE_FILTER_BILINEAR = 1 +--- Trilinear filtering (linear with mipmaps) +RL_TEXTURE_FILTER_TRILINEAR = 2 +--- Anisotropic filtering 4x +RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3 +--- Anisotropic filtering 8x +RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4 +--- Anisotropic filtering 16x +RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5 ----@enum raylib.rlShaderLocationIndex -M.rlShaderLocationIndex = { - RL_SHADER_LOC_VERTEX_POSITION = 0, - RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1, - RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2, - RL_SHADER_LOC_VERTEX_NORMAL = 3, - RL_SHADER_LOC_VERTEX_TANGENT = 4, - RL_SHADER_LOC_VERTEX_COLOR = 5, - RL_SHADER_LOC_MATRIX_MVP = 6, - RL_SHADER_LOC_MATRIX_VIEW = 7, - RL_SHADER_LOC_MATRIX_PROJECTION = 8, - RL_SHADER_LOC_MATRIX_MODEL = 9, - RL_SHADER_LOC_MATRIX_NORMAL = 10, - RL_SHADER_LOC_VECTOR_VIEW = 11, - RL_SHADER_LOC_COLOR_DIFFUSE = 12, - RL_SHADER_LOC_COLOR_SPECULAR = 13, - RL_SHADER_LOC_COLOR_AMBIENT = 14, - RL_SHADER_LOC_MAP_ALBEDO = 15, - RL_SHADER_LOC_MAP_METALNESS = 16, - RL_SHADER_LOC_MAP_NORMAL = 17, - RL_SHADER_LOC_MAP_ROUGHNESS = 18, - RL_SHADER_LOC_MAP_OCCLUSION = 19, - RL_SHADER_LOC_MAP_EMISSION = 20, - RL_SHADER_LOC_MAP_HEIGHT = 21, - RL_SHADER_LOC_MAP_CUBEMAP = 22, - RL_SHADER_LOC_MAP_IRRADIANCE = 23, - RL_SHADER_LOC_MAP_PREFILTER = 24, - RL_SHADER_LOC_MAP_BRDF = 25, -} +---Color blending modes (pre-defined) +---@alias rlBlendMode +---| `RL_BLEND_ALPHA` #Blend textures considering alpha (default) +---| `RL_BLEND_ADDITIVE` #Blend textures adding colors +---| `RL_BLEND_MULTIPLIED` #Blend textures multiplying colors +---| `RL_BLEND_ADD_COLORS` #Blend textures adding colors (alternative) +---| `RL_BLEND_SUBTRACT_COLORS` #Blend textures subtracting colors (alternative) +---| `RL_BLEND_ALPHA_PREMULTIPLY` #Blend premultiplied textures considering alpha +---| `RL_BLEND_CUSTOM` #Blend textures using custom src/dst factors (use rlSetBlendFactors()) +---| `RL_BLEND_CUSTOM_SEPARATE` #Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) +--- Blend textures considering alpha (default) +RL_BLEND_ALPHA = 0 +--- Blend textures adding colors +RL_BLEND_ADDITIVE = 1 +--- Blend textures multiplying colors +RL_BLEND_MULTIPLIED = 2 +--- Blend textures adding colors (alternative) +RL_BLEND_ADD_COLORS = 3 +--- Blend textures subtracting colors (alternative) +RL_BLEND_SUBTRACT_COLORS = 4 +--- Blend premultiplied textures considering alpha +RL_BLEND_ALPHA_PREMULTIPLY = 5 +--- Blend textures using custom src/dst factors (use rlSetBlendFactors()) +RL_BLEND_CUSTOM = 6 +--- Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate()) +RL_BLEND_CUSTOM_SEPARATE = 7 ----@enum raylib.rlShaderUniformDataType -M.rlShaderUniformDataType = { - RL_SHADER_UNIFORM_FLOAT = 0, - RL_SHADER_UNIFORM_VEC2 = 1, - RL_SHADER_UNIFORM_VEC3 = 2, - RL_SHADER_UNIFORM_VEC4 = 3, - RL_SHADER_UNIFORM_INT = 4, - RL_SHADER_UNIFORM_IVEC2 = 5, - RL_SHADER_UNIFORM_IVEC3 = 6, - RL_SHADER_UNIFORM_IVEC4 = 7, - RL_SHADER_UNIFORM_UINT = 8, - RL_SHADER_UNIFORM_UIVEC2 = 9, - RL_SHADER_UNIFORM_UIVEC3 = 10, - RL_SHADER_UNIFORM_UIVEC4 = 11, - RL_SHADER_UNIFORM_SAMPLER2D = 12, -} +---Shader location point type +---@alias rlShaderLocationIndex +---| `RL_SHADER_LOC_VERTEX_POSITION` #Shader location: vertex attribute: position +---| `RL_SHADER_LOC_VERTEX_TEXCOORD01` #Shader location: vertex attribute: texcoord01 +---| `RL_SHADER_LOC_VERTEX_TEXCOORD02` #Shader location: vertex attribute: texcoord02 +---| `RL_SHADER_LOC_VERTEX_NORMAL` #Shader location: vertex attribute: normal +---| `RL_SHADER_LOC_VERTEX_TANGENT` #Shader location: vertex attribute: tangent +---| `RL_SHADER_LOC_VERTEX_COLOR` #Shader location: vertex attribute: color +---| `RL_SHADER_LOC_MATRIX_MVP` #Shader location: matrix uniform: model-view-projection +---| `RL_SHADER_LOC_MATRIX_VIEW` #Shader location: matrix uniform: view (camera transform) +---| `RL_SHADER_LOC_MATRIX_PROJECTION` #Shader location: matrix uniform: projection +---| `RL_SHADER_LOC_MATRIX_MODEL` #Shader location: matrix uniform: model (transform) +---| `RL_SHADER_LOC_MATRIX_NORMAL` #Shader location: matrix uniform: normal +---| `RL_SHADER_LOC_VECTOR_VIEW` #Shader location: vector uniform: view +---| `RL_SHADER_LOC_COLOR_DIFFUSE` #Shader location: vector uniform: diffuse color +---| `RL_SHADER_LOC_COLOR_SPECULAR` #Shader location: vector uniform: specular color +---| `RL_SHADER_LOC_COLOR_AMBIENT` #Shader location: vector uniform: ambient color +---| `RL_SHADER_LOC_MAP_ALBEDO` #Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE) +---| `RL_SHADER_LOC_MAP_METALNESS` #Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR) +---| `RL_SHADER_LOC_MAP_NORMAL` #Shader location: sampler2d texture: normal +---| `RL_SHADER_LOC_MAP_ROUGHNESS` #Shader location: sampler2d texture: roughness +---| `RL_SHADER_LOC_MAP_OCCLUSION` #Shader location: sampler2d texture: occlusion +---| `RL_SHADER_LOC_MAP_EMISSION` #Shader location: sampler2d texture: emission +---| `RL_SHADER_LOC_MAP_HEIGHT` #Shader location: sampler2d texture: height +---| `RL_SHADER_LOC_MAP_CUBEMAP` #Shader location: samplerCube texture: cubemap +---| `RL_SHADER_LOC_MAP_IRRADIANCE` #Shader location: samplerCube texture: irradiance +---| `RL_SHADER_LOC_MAP_PREFILTER` #Shader location: samplerCube texture: prefilter +---| `RL_SHADER_LOC_MAP_BRDF` #Shader location: sampler2d texture: brdf +--- Shader location: vertex attribute: position +RL_SHADER_LOC_VERTEX_POSITION = 0 +--- Shader location: vertex attribute: texcoord01 +RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1 +--- Shader location: vertex attribute: texcoord02 +RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2 +--- Shader location: vertex attribute: normal +RL_SHADER_LOC_VERTEX_NORMAL = 3 +--- Shader location: vertex attribute: tangent +RL_SHADER_LOC_VERTEX_TANGENT = 4 +--- Shader location: vertex attribute: color +RL_SHADER_LOC_VERTEX_COLOR = 5 +--- Shader location: matrix uniform: model-view-projection +RL_SHADER_LOC_MATRIX_MVP = 6 +--- Shader location: matrix uniform: view (camera transform) +RL_SHADER_LOC_MATRIX_VIEW = 7 +--- Shader location: matrix uniform: projection +RL_SHADER_LOC_MATRIX_PROJECTION = 8 +--- Shader location: matrix uniform: model (transform) +RL_SHADER_LOC_MATRIX_MODEL = 9 +--- Shader location: matrix uniform: normal +RL_SHADER_LOC_MATRIX_NORMAL = 10 +--- Shader location: vector uniform: view +RL_SHADER_LOC_VECTOR_VIEW = 11 +--- Shader location: vector uniform: diffuse color +RL_SHADER_LOC_COLOR_DIFFUSE = 12 +--- Shader location: vector uniform: specular color +RL_SHADER_LOC_COLOR_SPECULAR = 13 +--- Shader location: vector uniform: ambient color +RL_SHADER_LOC_COLOR_AMBIENT = 14 +--- Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE) +RL_SHADER_LOC_MAP_ALBEDO = 15 +--- Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR) +RL_SHADER_LOC_MAP_METALNESS = 16 +--- Shader location: sampler2d texture: normal +RL_SHADER_LOC_MAP_NORMAL = 17 +--- Shader location: sampler2d texture: roughness +RL_SHADER_LOC_MAP_ROUGHNESS = 18 +--- Shader location: sampler2d texture: occlusion +RL_SHADER_LOC_MAP_OCCLUSION = 19 +--- Shader location: sampler2d texture: emission +RL_SHADER_LOC_MAP_EMISSION = 20 +--- Shader location: sampler2d texture: height +RL_SHADER_LOC_MAP_HEIGHT = 21 +--- Shader location: samplerCube texture: cubemap +RL_SHADER_LOC_MAP_CUBEMAP = 22 +--- Shader location: samplerCube texture: irradiance +RL_SHADER_LOC_MAP_IRRADIANCE = 23 +--- Shader location: samplerCube texture: prefilter +RL_SHADER_LOC_MAP_PREFILTER = 24 +--- Shader location: sampler2d texture: brdf +RL_SHADER_LOC_MAP_BRDF = 25 ----@enum raylib.rlShaderAttributeDataType -M.rlShaderAttributeDataType = { - RL_SHADER_ATTRIB_FLOAT = 0, - RL_SHADER_ATTRIB_VEC2 = 1, - RL_SHADER_ATTRIB_VEC3 = 2, - RL_SHADER_ATTRIB_VEC4 = 3, -} +---Shader uniform data type +---@alias rlShaderUniformDataType +---| `RL_SHADER_UNIFORM_FLOAT` #Shader uniform type: float +---| `RL_SHADER_UNIFORM_VEC2` #Shader uniform type: vec2 (2 float) +---| `RL_SHADER_UNIFORM_VEC3` #Shader uniform type: vec3 (3 float) +---| `RL_SHADER_UNIFORM_VEC4` #Shader uniform type: vec4 (4 float) +---| `RL_SHADER_UNIFORM_INT` #Shader uniform type: int +---| `RL_SHADER_UNIFORM_IVEC2` #Shader uniform type: ivec2 (2 int) +---| `RL_SHADER_UNIFORM_IVEC3` #Shader uniform type: ivec3 (3 int) +---| `RL_SHADER_UNIFORM_IVEC4` #Shader uniform type: ivec4 (4 int) +---| `RL_SHADER_UNIFORM_UINT` #Shader uniform type: unsigned int +---| `RL_SHADER_UNIFORM_UIVEC2` #Shader uniform type: uivec2 (2 unsigned int) +---| `RL_SHADER_UNIFORM_UIVEC3` #Shader uniform type: uivec3 (3 unsigned int) +---| `RL_SHADER_UNIFORM_UIVEC4` #Shader uniform type: uivec4 (4 unsigned int) +---| `RL_SHADER_UNIFORM_SAMPLER2D` #Shader uniform type: sampler2d +--- Shader uniform type: float +RL_SHADER_UNIFORM_FLOAT = 0 +--- Shader uniform type: vec2 (2 float) +RL_SHADER_UNIFORM_VEC2 = 1 +--- Shader uniform type: vec3 (3 float) +RL_SHADER_UNIFORM_VEC3 = 2 +--- Shader uniform type: vec4 (4 float) +RL_SHADER_UNIFORM_VEC4 = 3 +--- Shader uniform type: int +RL_SHADER_UNIFORM_INT = 4 +--- Shader uniform type: ivec2 (2 int) +RL_SHADER_UNIFORM_IVEC2 = 5 +--- Shader uniform type: ivec3 (3 int) +RL_SHADER_UNIFORM_IVEC3 = 6 +--- Shader uniform type: ivec4 (4 int) +RL_SHADER_UNIFORM_IVEC4 = 7 +--- Shader uniform type: unsigned int +RL_SHADER_UNIFORM_UINT = 8 +--- Shader uniform type: uivec2 (2 unsigned int) +RL_SHADER_UNIFORM_UIVEC2 = 9 +--- Shader uniform type: uivec3 (3 unsigned int) +RL_SHADER_UNIFORM_UIVEC3 = 10 +--- Shader uniform type: uivec4 (4 unsigned int) +RL_SHADER_UNIFORM_UIVEC4 = 11 +--- Shader uniform type: sampler2d +RL_SHADER_UNIFORM_SAMPLER2D = 12 ----@enum raylib.rlFramebufferAttachType -M.rlFramebufferAttachType = { - RL_ATTACHMENT_COLOR_CHANNEL0 = 0, - RL_ATTACHMENT_COLOR_CHANNEL1 = 1, - RL_ATTACHMENT_COLOR_CHANNEL2 = 2, - RL_ATTACHMENT_COLOR_CHANNEL3 = 3, - RL_ATTACHMENT_COLOR_CHANNEL4 = 4, - RL_ATTACHMENT_COLOR_CHANNEL5 = 5, - RL_ATTACHMENT_COLOR_CHANNEL6 = 6, - RL_ATTACHMENT_COLOR_CHANNEL7 = 7, - RL_ATTACHMENT_DEPTH = 100, - RL_ATTACHMENT_STENCIL = 200, -} +---Shader attribute data types +---@alias rlShaderAttributeDataType +---| `RL_SHADER_ATTRIB_FLOAT` #Shader attribute type: float +---| `RL_SHADER_ATTRIB_VEC2` #Shader attribute type: vec2 (2 float) +---| `RL_SHADER_ATTRIB_VEC3` #Shader attribute type: vec3 (3 float) +---| `RL_SHADER_ATTRIB_VEC4` #Shader attribute type: vec4 (4 float) +--- Shader attribute type: float +RL_SHADER_ATTRIB_FLOAT = 0 +--- Shader attribute type: vec2 (2 float) +RL_SHADER_ATTRIB_VEC2 = 1 +--- Shader attribute type: vec3 (3 float) +RL_SHADER_ATTRIB_VEC3 = 2 +--- Shader attribute type: vec4 (4 float) +RL_SHADER_ATTRIB_VEC4 = 3 ----@enum raylib.rlFramebufferAttachTextureType -M.rlFramebufferAttachTextureType = { - RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, - RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, - RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, - RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, - RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, - RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, - RL_ATTACHMENT_TEXTURE2D = 100, - RL_ATTACHMENT_RENDERBUFFER = 200, -} +---Framebuffer attachment type +---@alias rlFramebufferAttachType +---| `RL_ATTACHMENT_COLOR_CHANNEL0` #Framebuffer attachment type: color 0 +---| `RL_ATTACHMENT_COLOR_CHANNEL1` #Framebuffer attachment type: color 1 +---| `RL_ATTACHMENT_COLOR_CHANNEL2` #Framebuffer attachment type: color 2 +---| `RL_ATTACHMENT_COLOR_CHANNEL3` #Framebuffer attachment type: color 3 +---| `RL_ATTACHMENT_COLOR_CHANNEL4` #Framebuffer attachment type: color 4 +---| `RL_ATTACHMENT_COLOR_CHANNEL5` #Framebuffer attachment type: color 5 +---| `RL_ATTACHMENT_COLOR_CHANNEL6` #Framebuffer attachment type: color 6 +---| `RL_ATTACHMENT_COLOR_CHANNEL7` #Framebuffer attachment type: color 7 +---| `RL_ATTACHMENT_DEPTH` #Framebuffer attachment type: depth +---| `RL_ATTACHMENT_STENCIL` #Framebuffer attachment type: stencil +--- Framebuffer attachment type: color 0 +RL_ATTACHMENT_COLOR_CHANNEL0 = 0 +--- Framebuffer attachment type: color 1 +RL_ATTACHMENT_COLOR_CHANNEL1 = 1 +--- Framebuffer attachment type: color 2 +RL_ATTACHMENT_COLOR_CHANNEL2 = 2 +--- Framebuffer attachment type: color 3 +RL_ATTACHMENT_COLOR_CHANNEL3 = 3 +--- Framebuffer attachment type: color 4 +RL_ATTACHMENT_COLOR_CHANNEL4 = 4 +--- Framebuffer attachment type: color 5 +RL_ATTACHMENT_COLOR_CHANNEL5 = 5 +--- Framebuffer attachment type: color 6 +RL_ATTACHMENT_COLOR_CHANNEL6 = 6 +--- Framebuffer attachment type: color 7 +RL_ATTACHMENT_COLOR_CHANNEL7 = 7 +--- Framebuffer attachment type: depth +RL_ATTACHMENT_DEPTH = 100 +--- Framebuffer attachment type: stencil +RL_ATTACHMENT_STENCIL = 200 ----@enum raylib.rlCullMode -M.rlCullMode = { - RL_CULL_FACE_FRONT = 0, - RL_CULL_FACE_BACK = 1, -} +---Framebuffer texture attachment type +---@alias rlFramebufferAttachTextureType +---| `RL_ATTACHMENT_CUBEMAP_POSITIVE_X` #Framebuffer texture attachment type: cubemap, +X side +---| `RL_ATTACHMENT_CUBEMAP_NEGATIVE_X` #Framebuffer texture attachment type: cubemap, -X side +---| `RL_ATTACHMENT_CUBEMAP_POSITIVE_Y` #Framebuffer texture attachment type: cubemap, +Y side +---| `RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y` #Framebuffer texture attachment type: cubemap, -Y side +---| `RL_ATTACHMENT_CUBEMAP_POSITIVE_Z` #Framebuffer texture attachment type: cubemap, +Z side +---| `RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z` #Framebuffer texture attachment type: cubemap, -Z side +---| `RL_ATTACHMENT_TEXTURE2D` #Framebuffer texture attachment type: texture2d +---| `RL_ATTACHMENT_RENDERBUFFER` #Framebuffer texture attachment type: renderbuffer +--- Framebuffer texture attachment type: cubemap, +X side +RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0 +--- Framebuffer texture attachment type: cubemap, -X side +RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1 +--- Framebuffer texture attachment type: cubemap, +Y side +RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2 +--- Framebuffer texture attachment type: cubemap, -Y side +RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3 +--- Framebuffer texture attachment type: cubemap, +Z side +RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4 +--- Framebuffer texture attachment type: cubemap, -Z side +RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5 +--- Framebuffer texture attachment type: texture2d +RL_ATTACHMENT_TEXTURE2D = 100 +--- Framebuffer texture attachment type: renderbuffer +RL_ATTACHMENT_RENDERBUFFER = 200 ----@enum raylib.GuiResult -M.GuiResult = { - RESULT_NONE = 0, - RESULT_PRESSED = 1, - RESULT_CHANGED = 2, - RESULT_TAB_CLOSE = 4, -} +---Face culling mode +---@alias rlCullMode +---| `RL_CULL_FACE_FRONT` # +---| `RL_CULL_FACE_BACK` # +RL_CULL_FACE_FRONT = 0 +RL_CULL_FACE_BACK = 1 ----@enum raylib.GuiState -M.GuiState = { - STATE_NORMAL = 0, - STATE_FOCUSED = 1, - STATE_PRESSED = 2, - STATE_DISABLED = 3, -} +---Gui control result +---@alias GuiResult +---| `RESULT_NONE` # +---| `RESULT_PRESSED` # +---| `RESULT_CHANGED` # +---| `RESULT_TAB_CLOSE` #GuiTabBar(), tab close request +RESULT_NONE = 0 +RESULT_PRESSED = 1 +RESULT_CHANGED = 2 +--- GuiTabBar(), tab close request +RESULT_TAB_CLOSE = 4 ----@enum raylib.GuiTextAlignment -M.GuiTextAlignment = { - TEXT_ALIGN_LEFT = 0, - TEXT_ALIGN_CENTER = 1, - TEXT_ALIGN_RIGHT = 2, -} +---Gui control state +---@alias GuiState +---| `STATE_NORMAL` # +---| `STATE_FOCUSED` # +---| `STATE_PRESSED` # +---| `STATE_DISABLED` # +STATE_NORMAL = 0 +STATE_FOCUSED = 1 +STATE_PRESSED = 2 +STATE_DISABLED = 3 ----@enum raylib.GuiTextAlignmentVertical -M.GuiTextAlignmentVertical = { - TEXT_ALIGN_TOP = 0, - TEXT_ALIGN_MIDDLE = 1, - TEXT_ALIGN_BOTTOM = 2, -} +---Gui control text alignment +---@alias GuiTextAlignment +---| `TEXT_ALIGN_LEFT` # +---| `TEXT_ALIGN_CENTER` # +---| `TEXT_ALIGN_RIGHT` # +TEXT_ALIGN_LEFT = 0 +TEXT_ALIGN_CENTER = 1 +TEXT_ALIGN_RIGHT = 2 ----@enum raylib.GuiTextWrapMode -M.GuiTextWrapMode = { - TEXT_WRAP_NONE = 0, - TEXT_WRAP_CHAR = 1, - TEXT_WRAP_WORD = 2, -} +---Gui control text alignment vertical +---@alias GuiTextAlignmentVertical +---| `TEXT_ALIGN_TOP` # +---| `TEXT_ALIGN_MIDDLE` # +---| `TEXT_ALIGN_BOTTOM` # +TEXT_ALIGN_TOP = 0 +TEXT_ALIGN_MIDDLE = 1 +TEXT_ALIGN_BOTTOM = 2 ----@enum raylib.GuiControl -M.GuiControl = { - DEFAULT = 0, - LABEL = 1, - BUTTON = 2, - TOGGLE = 3, - SLIDER = 4, - PROGRESSBAR = 5, - CHECKBOX = 6, - COMBOBOX = 7, - DROPDOWNBOX = 8, - TEXTBOX = 9, - VALUEBOX = 10, - TABBAR = 11, - LISTVIEW = 12, - COLORPICKER = 13, - SCROLLBAR = 14, - STATUSBAR = 15, -} +---Gui control text wrap mode +---@alias GuiTextWrapMode +---| `TEXT_WRAP_NONE` # +---| `TEXT_WRAP_CHAR` # +---| `TEXT_WRAP_WORD` # +TEXT_WRAP_NONE = 0 +TEXT_WRAP_CHAR = 1 +TEXT_WRAP_WORD = 2 ----@enum raylib.GuiControlProperty -M.GuiControlProperty = { - BORDER_COLOR_NORMAL = 0, - BASE_COLOR_NORMAL = 1, - TEXT_COLOR_NORMAL = 2, - BORDER_COLOR_FOCUSED = 3, - BASE_COLOR_FOCUSED = 4, - TEXT_COLOR_FOCUSED = 5, - BORDER_COLOR_PRESSED = 6, - BASE_COLOR_PRESSED = 7, - TEXT_COLOR_PRESSED = 8, - BORDER_COLOR_DISABLED = 9, - BASE_COLOR_DISABLED = 10, - TEXT_COLOR_DISABLED = 11, - BORDER_WIDTH = 12, - TEXT_PADDING = 13, - TEXT_ALIGNMENT = 14, - BASEPROP16 = 15, -} +---Gui controls +---@alias GuiControl +---| `DEFAULT` # +---| `LABEL` #Used also for: LABELBUTTON +---| `BUTTON` # +---| `TOGGLE` #Used also for: TOGGLEGROUP +---| `SLIDER` #Used also for: SLIDERBAR, TOGGLESLIDER +---| `PROGRESSBAR` # +---| `CHECKBOX` # +---| `COMBOBOX` # +---| `DROPDOWNBOX` # +---| `TEXTBOX` #Used also for: TEXTBOXMULTI +---| `VALUEBOX` # +---| `TABBAR` # +---| `LISTVIEW` # +---| `COLORPICKER` # +---| `SCROLLBAR` # +---| `STATUSBAR` # +DEFAULT = 0 +--- Used also for: LABELBUTTON +LABEL = 1 +BUTTON = 2 +--- Used also for: TOGGLEGROUP +TOGGLE = 3 +--- Used also for: SLIDERBAR, TOGGLESLIDER +SLIDER = 4 +PROGRESSBAR = 5 +CHECKBOX = 6 +COMBOBOX = 7 +DROPDOWNBOX = 8 +--- Used also for: TEXTBOXMULTI +TEXTBOX = 9 +VALUEBOX = 10 +TABBAR = 11 +LISTVIEW = 12 +COLORPICKER = 13 +SCROLLBAR = 14 +STATUSBAR = 15 ----@enum raylib.GuiDefaultProperty -M.GuiDefaultProperty = { - TEXT_SIZE = 16, - TEXT_SPACING = 17, - LINE_COLOR = 18, - BACKGROUND_COLOR = 19, - TEXT_LINE_SPACING = 20, - TEXT_ALIGNMENT_VERTICAL = 21, - TEXT_WRAP_MODE = 22, - EXTPROP08 = 23, -} +---Controls BASE properties for every control (RAYGUI_MAX_PROPS_BASE = 16) +---@alias GuiControlProperty +---| `BORDER_COLOR_NORMAL` #Control border color in STATE_NORMAL +---| `BASE_COLOR_NORMAL` #Control base color in STATE_NORMAL +---| `TEXT_COLOR_NORMAL` #Control text color in STATE_NORMAL +---| `BORDER_COLOR_FOCUSED` #Control border color in STATE_FOCUSED +---| `BASE_COLOR_FOCUSED` #Control base color in STATE_FOCUSED +---| `TEXT_COLOR_FOCUSED` #Control text color in STATE_FOCUSED +---| `BORDER_COLOR_PRESSED` #Control border color in STATE_PRESSED +---| `BASE_COLOR_PRESSED` #Control base color in STATE_PRESSED +---| `TEXT_COLOR_PRESSED` #Control text color in STATE_PRESSED +---| `BORDER_COLOR_DISABLED` #Control border color in STATE_DISABLED +---| `BASE_COLOR_DISABLED` #Control base color in STATE_DISABLED +---| `TEXT_COLOR_DISABLED` #Control text color in STATE_DISABLED +---| `BORDER_WIDTH` #Control border size, 0 for no border +---| `TEXT_PADDING` #Control text padding, not considering border +---| `TEXT_ALIGNMENT` #Control text horizontal alignment inside control text bound (after border and padding): 0-Left, 1-Center, 2-Right +---| `BASEPROP16` #Not used yet... +--- Control border color in STATE_NORMAL +BORDER_COLOR_NORMAL = 0 +--- Control base color in STATE_NORMAL +BASE_COLOR_NORMAL = 1 +--- Control text color in STATE_NORMAL +TEXT_COLOR_NORMAL = 2 +--- Control border color in STATE_FOCUSED +BORDER_COLOR_FOCUSED = 3 +--- Control base color in STATE_FOCUSED +BASE_COLOR_FOCUSED = 4 +--- Control text color in STATE_FOCUSED +TEXT_COLOR_FOCUSED = 5 +--- Control border color in STATE_PRESSED +BORDER_COLOR_PRESSED = 6 +--- Control base color in STATE_PRESSED +BASE_COLOR_PRESSED = 7 +--- Control text color in STATE_PRESSED +TEXT_COLOR_PRESSED = 8 +--- Control border color in STATE_DISABLED +BORDER_COLOR_DISABLED = 9 +--- Control base color in STATE_DISABLED +BASE_COLOR_DISABLED = 10 +--- Control text color in STATE_DISABLED +TEXT_COLOR_DISABLED = 11 +--- Control border size, 0 for no border +BORDER_WIDTH = 12 +--- Control text padding, not considering border +TEXT_PADDING = 13 +--- Control text horizontal alignment inside control text bound (after border and padding): 0-Left, 1-Center, 2-Right +TEXT_ALIGNMENT = 14 +--- Not used yet... +BASEPROP16 = 15 ----@enum raylib.GuiToggleProperty -M.GuiToggleProperty = { - GROUP_PADDING = 16, - GROUP_WIDTH_FULL = 17, -} +---DEFAULT control, extended properties +---@alias GuiDefaultProperty +---| `TEXT_SIZE` #Text size (glyphs max height) +---| `TEXT_SPACING` #Text spacing between glyphs +---| `LINE_COLOR` #Line control color +---| `BACKGROUND_COLOR` #Background color +---| `TEXT_LINE_SPACING` #Text spacing between lines +---| `TEXT_ALIGNMENT_VERTICAL` #Text vertical alignment inside text bounds (after border and padding): 0-Top, 1-Middle, 2-Bottom +---| `TEXT_WRAP_MODE` #Text wrap-mode inside text bounds +---| `EXTPROP08` #Not used yet... +--- Text size (glyphs max height) +TEXT_SIZE = 16 +--- Text spacing between glyphs +TEXT_SPACING = 17 +--- Line control color +LINE_COLOR = 18 +--- Background color +BACKGROUND_COLOR = 19 +--- Text spacing between lines +TEXT_LINE_SPACING = 20 +--- Text vertical alignment inside text bounds (after border and padding): 0-Top, 1-Middle, 2-Bottom +TEXT_ALIGNMENT_VERTICAL = 21 +--- Text wrap-mode inside text bounds +TEXT_WRAP_MODE = 22 +--- Not used yet... +EXTPROP08 = 23 ----@enum raylib.GuiSliderProperty -M.GuiSliderProperty = { - SLIDER_WIDTH = 16, - SLIDER_PADDING = 17, -} +---Toggle/ToggleGroup +---@alias GuiToggleProperty +---| `GROUP_PADDING` #ToggleGroup separation between toggles +---| `GROUP_WIDTH_FULL` #ToggleGroup bounds width considers all items: 0-Width per item, 1-Full width +--- ToggleGroup separation between toggles +GROUP_PADDING = 16 +--- ToggleGroup bounds width considers all items: 0-Width per item, 1-Full width +GROUP_WIDTH_FULL = 17 ----@enum raylib.GuiProgressBarProperty -M.GuiProgressBarProperty = { - PROGRESS_PADDING = 16, - PROGRESS_SIDE = 17, -} +---Slider/SliderBar +---@alias GuiSliderProperty +---| `SLIDER_WIDTH` #Slider size of internal bar +---| `SLIDER_PADDING` #Slider/SliderBar internal bar padding +--- Slider size of internal bar +SLIDER_WIDTH = 16 +--- Slider/SliderBar internal bar padding +SLIDER_PADDING = 17 ----@enum raylib.GuiScrollBarProperty -M.GuiScrollBarProperty = { - ARROWS_SIZE = 16, - ARROWS_VISIBLE = 17, - SCROLL_SLIDER_PADDING = 18, - SCROLL_SLIDER_SIZE = 19, - SCROLL_PADDING = 20, - SCROLL_SPEED = 21, -} +---ProgressBar +---@alias GuiProgressBarProperty +---| `PROGRESS_PADDING` #ProgressBar internal padding +---| `PROGRESS_SIDE` #ProgressBar increment side: 0-Left->Right, 1-Right->Left +--- ProgressBar internal padding +PROGRESS_PADDING = 16 +--- ProgressBar increment side: 0-Left->Right, 1-Right->Left +PROGRESS_SIDE = 17 ----@enum raylib.GuiCheckBoxProperty -M.GuiCheckBoxProperty = { - CHECK_PADDING = 16, -} +---ScrollBar +---@alias GuiScrollBarProperty +---| `ARROWS_SIZE` #ScrollBar arrows size +---| `ARROWS_VISIBLE` #ScrollBar arrows visible +---| `SCROLL_SLIDER_PADDING` #ScrollBar slider internal padding +---| `SCROLL_SLIDER_SIZE` #ScrollBar slider size +---| `SCROLL_PADDING` #ScrollBar scroll padding from arrows +---| `SCROLL_SPEED` #ScrollBar scrolling speed +--- ScrollBar arrows size +ARROWS_SIZE = 16 +--- ScrollBar arrows visible +ARROWS_VISIBLE = 17 +--- ScrollBar slider internal padding +SCROLL_SLIDER_PADDING = 18 +--- ScrollBar slider size +SCROLL_SLIDER_SIZE = 19 +--- ScrollBar scroll padding from arrows +SCROLL_PADDING = 20 +--- ScrollBar scrolling speed +SCROLL_SPEED = 21 ----@enum raylib.GuiComboBoxProperty -M.GuiComboBoxProperty = { - COMBO_BUTTON_WIDTH = 16, - COMBO_BUTTON_SPACING = 17, -} +---CheckBox +---@alias GuiCheckBoxProperty +---| `CHECK_PADDING` #CheckBox internal check padding +--- CheckBox internal check padding +CHECK_PADDING = 16 ----@enum raylib.GuiDropdownBoxProperty -M.GuiDropdownBoxProperty = { - ARROW_PADDING = 16, - DROPDOWN_ITEMS_SPACING = 17, - DROPDOWN_ARROW_HIDDEN = 18, - DROPDOWN_ROLL_UP = 19, - DROPDOWN_MAX_HEIGHT = 20, -} +---ComboBox +---@alias GuiComboBoxProperty +---| `COMBO_BUTTON_WIDTH` #ComboBox right button width +---| `COMBO_BUTTON_SPACING` #ComboBox button separation +--- ComboBox right button width +COMBO_BUTTON_WIDTH = 16 +--- ComboBox button separation +COMBO_BUTTON_SPACING = 17 ----@enum raylib.GuiTextBoxProperty -M.GuiTextBoxProperty = { - TEXT_READONLY = 16, -} +---DropdownBox +---@alias GuiDropdownBoxProperty +---| `ARROW_PADDING` #DropdownBox arrow separation from border and items +---| `DROPDOWN_ITEMS_SPACING` #DropdownBox items separation +---| `DROPDOWN_ARROW_HIDDEN` #DropdownBox arrow hidden +---| `DROPDOWN_ROLL_UP` #DropdownBox roll up flag: 0-Roll down, 1-Roll up +---| `DROPDOWN_MAX_HEIGHT` #DropdownBox max height, using scrollbar if required, 0-No limit +--- DropdownBox arrow separation from border and items +ARROW_PADDING = 16 +--- DropdownBox items separation +DROPDOWN_ITEMS_SPACING = 17 +--- DropdownBox arrow hidden +DROPDOWN_ARROW_HIDDEN = 18 +--- DropdownBox roll up flag: 0-Roll down, 1-Roll up +DROPDOWN_ROLL_UP = 19 +--- DropdownBox max height, using scrollbar if required, 0-No limit +DROPDOWN_MAX_HEIGHT = 20 ----@enum raylib.GuiValueBoxProperty -M.GuiValueBoxProperty = { - SPINNER_BUTTON_WIDTH = 16, - SPINNER_BUTTON_SPACING = 17, -} +---TextBox/TextBoxMulti/ValueBox/Spinner +---@alias GuiTextBoxProperty +---| `TEXT_READONLY` #TextBox in read-only mode: 0-Text editable, 1-Text read-only +--- TextBox in read-only mode: 0-Text editable, 1-Text read-only +TEXT_READONLY = 16 ----@enum raylib.GuiTabBarProperty -M.GuiTabBarProperty = { - TAB_ITEMS_WIDTH = 16, - TAB_CLOSE_BUTTON = 17, - TAB_LINE_SIDE = 18, -} +---ValueBox/Spinner +---@alias GuiValueBoxProperty +---| `SPINNER_BUTTON_WIDTH` #Spinner left/right buttons width +---| `SPINNER_BUTTON_SPACING` #Spinner buttons separation +--- Spinner left/right buttons width +SPINNER_BUTTON_WIDTH = 16 +--- Spinner buttons separation +SPINNER_BUTTON_SPACING = 17 ----@enum raylib.GuiListViewProperty -M.GuiListViewProperty = { - LIST_ITEMS_HEIGHT = 16, - LIST_ITEMS_SPACING = 17, - SCROLLBAR_WIDTH = 18, - SCROLLBAR_SIDE = 19, - LIST_ITEMS_BORDER_NORMAL = 20, - LIST_ITEMS_BORDER_WIDTH = 21, -} +---TabBar +---@alias GuiTabBarProperty +---| `TAB_ITEMS_WIDTH` #TabBar tab items width +---| `TAB_CLOSE_BUTTON` #TabBar tab close button: 0-Not shown, 1-Shown +---| `TAB_LINE_SIDE` #TabBar tabs side: 0-Bottom, 1-Top +--- TabBar tab items width +TAB_ITEMS_WIDTH = 16 +--- TabBar tab close button: 0-Not shown, 1-Shown +TAB_CLOSE_BUTTON = 17 +--- TabBar tabs side: 0-Bottom, 1-Top +TAB_LINE_SIDE = 18 ----@enum raylib.GuiColorPickerProperty -M.GuiColorPickerProperty = { - COLOR_SELECTOR_SIZE = 16, - HUEBAR_WIDTH = 17, - HUEBAR_PADDING = 18, - HUEBAR_SELECTOR_HEIGHT = 19, - HUEBAR_SELECTOR_OVERFLOW = 20, -} +--- +---@alias GuiListViewProperty +---| `LIST_ITEMS_HEIGHT` #ListView items height +---| `LIST_ITEMS_SPACING` #ListView items separation +---| `SCROLLBAR_WIDTH` #ListView scrollbar size (usually width) +---| `SCROLLBAR_SIDE` #ListView scrollbar side: 0-Left side, 1-Right Side +---| `LIST_ITEMS_BORDER_NORMAL` #ListView items border enabled in normal state +---| `LIST_ITEMS_BORDER_WIDTH` #ListView items border width +--- ListView items height +LIST_ITEMS_HEIGHT = 16 +--- ListView items separation +LIST_ITEMS_SPACING = 17 +--- ListView scrollbar size (usually width) +SCROLLBAR_WIDTH = 18 +--- ListView scrollbar side: 0-Left side, 1-Right Side +SCROLLBAR_SIDE = 19 +--- ListView items border enabled in normal state +LIST_ITEMS_BORDER_NORMAL = 20 +--- ListView items border width +LIST_ITEMS_BORDER_WIDTH = 21 ----@enum raylib.GuiIconName -M.GuiIconName = { - ICON_NONE = 0, - ICON_FOLDER_FILE_OPEN = 1, - ICON_FILE_SAVE_CLASSIC = 2, - ICON_FOLDER_OPEN = 3, - ICON_FOLDER_SAVE = 4, - ICON_FILE_OPEN = 5, - ICON_FILE_SAVE = 6, - ICON_FILE_EXPORT = 7, - ICON_FILE_ADD = 8, - ICON_FILE_DELETE = 9, - ICON_FILETYPE_TEXT = 10, - ICON_FILETYPE_AUDIO = 11, - ICON_FILETYPE_IMAGE = 12, - ICON_FILETYPE_PLAY = 13, - ICON_FILETYPE_VIDEO = 14, - ICON_FILETYPE_INFO = 15, - ICON_FILE_COPY = 16, - ICON_FILE_CUT = 17, - ICON_FILE_PASTE = 18, - ICON_CURSOR_HAND = 19, - ICON_CURSOR_POINTER = 20, - ICON_CURSOR_CLASSIC = 21, - ICON_PENCIL = 22, - ICON_PENCIL_BIG = 23, - ICON_BRUSH_CLASSIC = 24, - ICON_BRUSH_PAINTER = 25, - ICON_WATER_DROP = 26, - ICON_COLOR_PICKER = 27, - ICON_RUBBER = 28, - ICON_COLOR_BUCKET = 29, - ICON_TEXT_T = 30, - ICON_TEXT_A = 31, - ICON_SCALE = 32, - ICON_RESIZE = 33, - ICON_FILTER_POINT = 34, - ICON_FILTER_BILINEAR = 35, - ICON_CROP = 36, - ICON_CROP_ALPHA = 37, - ICON_SQUARE_TOGGLE = 38, - ICON_SYMMETRY = 39, - ICON_SYMMETRY_HORIZONTAL = 40, - ICON_SYMMETRY_VERTICAL = 41, - ICON_LENS = 42, - ICON_LENS_BIG = 43, - ICON_EYE_ON = 44, - ICON_EYE_OFF = 45, - ICON_FILTER_TOP = 46, - ICON_FILTER = 47, - ICON_TARGET_POINT = 48, - ICON_TARGET_SMALL = 49, - ICON_TARGET_BIG = 50, - ICON_TARGET_MOVE = 51, - ICON_CURSOR_MOVE = 52, - ICON_CURSOR_SCALE = 53, - ICON_CURSOR_SCALE_RIGHT = 54, - ICON_CURSOR_SCALE_LEFT = 55, - ICON_UNDO = 56, - ICON_REDO = 57, - ICON_REREDO = 58, - ICON_MUTATE = 59, - ICON_ROTATE = 60, - ICON_REPEAT = 61, - ICON_SHUFFLE = 62, - ICON_EMPTYBOX = 63, - ICON_TARGET = 64, - ICON_TARGET_SMALL_FILL = 65, - ICON_TARGET_BIG_FILL = 66, - ICON_TARGET_MOVE_FILL = 67, - ICON_CURSOR_MOVE_FILL = 68, - ICON_CURSOR_SCALE_FILL = 69, - ICON_CURSOR_SCALE_RIGHT_FILL = 70, - ICON_CURSOR_SCALE_LEFT_FILL = 71, - ICON_UNDO_FILL = 72, - ICON_REDO_FILL = 73, - ICON_REREDO_FILL = 74, - ICON_MUTATE_FILL = 75, - ICON_ROTATE_FILL = 76, - ICON_REPEAT_FILL = 77, - ICON_SHUFFLE_FILL = 78, - ICON_EMPTYBOX_SMALL = 79, - ICON_BOX = 80, - ICON_BOX_TOP = 81, - ICON_BOX_TOP_RIGHT = 82, - ICON_BOX_RIGHT = 83, - ICON_BOX_BOTTOM_RIGHT = 84, - ICON_BOX_BOTTOM = 85, - ICON_BOX_BOTTOM_LEFT = 86, - ICON_BOX_LEFT = 87, - ICON_BOX_TOP_LEFT = 88, - ICON_BOX_CENTER = 89, - ICON_BOX_CIRCLE_MASK = 90, - ICON_POT = 91, - ICON_ALPHA_MULTIPLY = 92, - ICON_ALPHA_CLEAR = 93, - ICON_DITHERING = 94, - ICON_MIPMAPS = 95, - ICON_BOX_GRID = 96, - ICON_GRID = 97, - ICON_BOX_CORNERS_SMALL = 98, - ICON_BOX_CORNERS_BIG = 99, - ICON_FOUR_BOXES = 100, - ICON_GRID_FILL = 101, - ICON_BOX_MULTISIZE = 102, - ICON_ZOOM_SMALL = 103, - ICON_ZOOM_MEDIUM = 104, - ICON_ZOOM_BIG = 105, - ICON_ZOOM_ALL = 106, - ICON_ZOOM_CENTER = 107, - ICON_BOX_DOTS_SMALL = 108, - ICON_BOX_DOTS_BIG = 109, - ICON_BOX_CONCENTRIC = 110, - ICON_BOX_GRID_BIG = 111, - ICON_OK_TICK = 112, - ICON_CROSS = 113, - ICON_ARROW_LEFT = 114, - ICON_ARROW_RIGHT = 115, - ICON_ARROW_DOWN = 116, - ICON_ARROW_UP = 117, - ICON_ARROW_LEFT_FILL = 118, - ICON_ARROW_RIGHT_FILL = 119, - ICON_ARROW_DOWN_FILL = 120, - ICON_ARROW_UP_FILL = 121, - ICON_AUDIO = 122, - ICON_FX = 123, - ICON_WAVE = 124, - ICON_WAVE_SINUS = 125, - ICON_WAVE_SQUARE = 126, - ICON_WAVE_TRIANGULAR = 127, - ICON_CROSS_SMALL = 128, - ICON_PLAYER_PREVIOUS = 129, - ICON_PLAYER_PLAY_BACK = 130, - ICON_PLAYER_PLAY = 131, - ICON_PLAYER_PAUSE = 132, - ICON_PLAYER_STOP = 133, - ICON_PLAYER_NEXT = 134, - ICON_PLAYER_RECORD = 135, - ICON_MAGNET = 136, - ICON_LOCK_CLOSE = 137, - ICON_LOCK_OPEN = 138, - ICON_CLOCK = 139, - ICON_TOOLS = 140, - ICON_GEAR = 141, - ICON_GEAR_BIG = 142, - ICON_BIN = 143, - ICON_HAND_POINTER = 144, - ICON_LASER = 145, - ICON_COIN = 146, - ICON_EXPLOSION = 147, - ICON_1UP = 148, - ICON_PLAYER = 149, - ICON_PLAYER_JUMP = 150, - ICON_KEY = 151, - ICON_DEMON = 152, - ICON_TEXT_POPUP = 153, - ICON_GEAR_EX = 154, - ICON_CRACK = 155, - ICON_CRACK_POINTS = 156, - ICON_STAR = 157, - ICON_DOOR = 158, - ICON_EXIT = 159, - ICON_MODE_2D = 160, - ICON_MODE_3D = 161, - ICON_CUBE = 162, - ICON_CUBE_FACE_TOP = 163, - ICON_CUBE_FACE_LEFT = 164, - ICON_CUBE_FACE_FRONT = 165, - ICON_CUBE_FACE_BOTTOM = 166, - ICON_CUBE_FACE_RIGHT = 167, - ICON_CUBE_FACE_BACK = 168, - ICON_CAMERA = 169, - ICON_SPECIAL = 170, - ICON_LINK_NET = 171, - ICON_LINK_BOXES = 172, - ICON_LINK_MULTI = 173, - ICON_LINK = 174, - ICON_LINK_BROKE = 175, - ICON_TEXT_NOTES = 176, - ICON_NOTEBOOK = 177, - ICON_SUITCASE = 178, - ICON_SUITCASE_ZIP = 179, - ICON_MAILBOX = 180, - ICON_MONITOR = 181, - ICON_PRINTER = 182, - ICON_PHOTO_CAMERA = 183, - ICON_PHOTO_CAMERA_FLASH = 184, - ICON_HOUSE = 185, - ICON_HEART = 186, - ICON_CORNER = 187, - ICON_VERTICAL_BARS = 188, - ICON_VERTICAL_BARS_FILL = 189, - ICON_LIFE_BARS = 190, - ICON_INFO = 191, - ICON_CROSSLINE = 192, - ICON_HELP = 193, - ICON_FILETYPE_ALPHA = 194, - ICON_FILETYPE_HOME = 195, - ICON_LAYERS_VISIBLE = 196, - ICON_LAYERS = 197, - ICON_WINDOW = 198, - ICON_HIDPI = 199, - ICON_FILETYPE_BINARY = 200, - ICON_HEX = 201, - ICON_SHIELD = 202, - ICON_FILE_NEW = 203, - ICON_FOLDER_ADD = 204, - ICON_ALARM = 205, - ICON_CPU = 206, - ICON_ROM = 207, - ICON_STEP_OVER = 208, - ICON_STEP_INTO = 209, - ICON_STEP_OUT = 210, - ICON_RESTART = 211, - ICON_BREAKPOINT_ON = 212, - ICON_BREAKPOINT_OFF = 213, - ICON_BURGER_MENU = 214, - ICON_CASE_SENSITIVE = 215, - ICON_REG_EXP = 216, - ICON_FOLDER = 217, - ICON_FILE = 218, - ICON_SAND_TIMER = 219, - ICON_WARNING = 220, - ICON_HELP_BOX = 221, - ICON_INFO_BOX = 222, - ICON_PRIORITY = 223, - ICON_LAYERS_ISO = 224, - ICON_LAYERS2 = 225, - ICON_MLAYERS = 226, - ICON_MAPS = 227, - ICON_HOT = 228, - ICON_LABEL = 229, - ICON_NAME_ID = 230, - ICON_SLICING = 231, - ICON_MANUAL_CONTROL = 232, - ICON_COLLISION = 233, - ICON_CIRCLE_ADD = 234, - ICON_CIRCLE_ADD_FILL = 235, - ICON_CIRCLE_WARNING = 236, - ICON_CIRCLE_WARNING_FILL = 237, - ICON_BOX_MORE = 238, - ICON_BOX_MORE_FILL = 239, - ICON_BOX_MINUS = 240, - ICON_BOX_MINUS_FILL = 241, - ICON_UNION = 242, - ICON_INTERSECTION = 243, - ICON_DIFFERENCE = 244, - ICON_SPHERE = 245, - ICON_CYLINDER = 246, - ICON_CONE = 247, - ICON_ELLIPSOID = 248, - ICON_CAPSULE = 249, - ICON_FILETYPE_FONT = 250, - ICON_FILETYPE_3D = 251, - ICON_FILETYPE_CODE_XML = 252, - ICON_FILETYPE_CODE_C = 253, - ICON_FILETYPE_CODE_PYTHON = 254, - ICON_FILETYPE_CODE_JS = 255, - ICON_FILETYPE_ICON = 256, -} +---ColorPicker +---@alias GuiColorPickerProperty +---| `COLOR_SELECTOR_SIZE` #ColorPicker selector square size +---| `HUEBAR_WIDTH` #ColorPicker right hue bar width +---| `HUEBAR_PADDING` #ColorPicker right hue bar separation from panel +---| `HUEBAR_SELECTOR_HEIGHT` #ColorPicker right hue bar selector height +---| `HUEBAR_SELECTOR_OVERFLOW` #ColorPicker right hue bar selector overflow +--- ColorPicker selector square size +COLOR_SELECTOR_SIZE = 16 +--- ColorPicker right hue bar width +HUEBAR_WIDTH = 17 +--- ColorPicker right hue bar separation from panel +HUEBAR_PADDING = 18 +--- ColorPicker right hue bar selector height +HUEBAR_SELECTOR_HEIGHT = 19 +--- ColorPicker right hue bar selector overflow +HUEBAR_SELECTOR_OVERFLOW = 20 ----@type raylib.ConfigFlags -M.FLAG_VSYNC_HINT = M.ConfigFlags.FLAG_VSYNC_HINT ----@type raylib.ConfigFlags -M.FLAG_FULLSCREEN_MODE = M.ConfigFlags.FLAG_FULLSCREEN_MODE ----@type raylib.ConfigFlags -M.FLAG_WINDOW_RESIZABLE = M.ConfigFlags.FLAG_WINDOW_RESIZABLE ----@type raylib.ConfigFlags -M.FLAG_WINDOW_UNDECORATED = M.ConfigFlags.FLAG_WINDOW_UNDECORATED ----@type raylib.ConfigFlags -M.FLAG_WINDOW_HIDDEN = M.ConfigFlags.FLAG_WINDOW_HIDDEN ----@type raylib.ConfigFlags -M.FLAG_WINDOW_MINIMIZED = M.ConfigFlags.FLAG_WINDOW_MINIMIZED ----@type raylib.ConfigFlags -M.FLAG_WINDOW_MAXIMIZED = M.ConfigFlags.FLAG_WINDOW_MAXIMIZED ----@type raylib.ConfigFlags -M.FLAG_WINDOW_UNFOCUSED = M.ConfigFlags.FLAG_WINDOW_UNFOCUSED ----@type raylib.ConfigFlags -M.FLAG_WINDOW_TOPMOST = M.ConfigFlags.FLAG_WINDOW_TOPMOST ----@type raylib.ConfigFlags -M.FLAG_WINDOW_ALWAYS_RUN = M.ConfigFlags.FLAG_WINDOW_ALWAYS_RUN ----@type raylib.ConfigFlags -M.FLAG_WINDOW_TRANSPARENT = M.ConfigFlags.FLAG_WINDOW_TRANSPARENT ----@type raylib.ConfigFlags -M.FLAG_WINDOW_HIGHDPI = M.ConfigFlags.FLAG_WINDOW_HIGHDPI ----@type raylib.ConfigFlags -M.FLAG_WINDOW_MOUSE_PASSTHROUGH = M.ConfigFlags.FLAG_WINDOW_MOUSE_PASSTHROUGH ----@type raylib.ConfigFlags -M.FLAG_BORDERLESS_WINDOWED_MODE = M.ConfigFlags.FLAG_BORDERLESS_WINDOWED_MODE ----@type raylib.ConfigFlags -M.FLAG_MSAA_4X_HINT = M.ConfigFlags.FLAG_MSAA_4X_HINT ----@type raylib.ConfigFlags -M.FLAG_INTERLACED_HINT = M.ConfigFlags.FLAG_INTERLACED_HINT ----@type raylib.TraceLogLevel -M.LOG_ALL = M.TraceLogLevel.LOG_ALL ----@type raylib.TraceLogLevel -M.LOG_TRACE = M.TraceLogLevel.LOG_TRACE ----@type raylib.TraceLogLevel -M.LOG_DEBUG = M.TraceLogLevel.LOG_DEBUG ----@type raylib.TraceLogLevel -M.LOG_INFO = M.TraceLogLevel.LOG_INFO ----@type raylib.TraceLogLevel -M.LOG_WARNING = M.TraceLogLevel.LOG_WARNING ----@type raylib.TraceLogLevel -M.LOG_ERROR = M.TraceLogLevel.LOG_ERROR ----@type raylib.TraceLogLevel -M.LOG_FATAL = M.TraceLogLevel.LOG_FATAL ----@type raylib.TraceLogLevel -M.LOG_NONE = M.TraceLogLevel.LOG_NONE ----@type raylib.KeyboardKey -M.KEY_NULL = M.KeyboardKey.KEY_NULL ----@type raylib.KeyboardKey -M.KEY_APOSTROPHE = M.KeyboardKey.KEY_APOSTROPHE ----@type raylib.KeyboardKey -M.KEY_COMMA = M.KeyboardKey.KEY_COMMA ----@type raylib.KeyboardKey -M.KEY_MINUS = M.KeyboardKey.KEY_MINUS ----@type raylib.KeyboardKey -M.KEY_PERIOD = M.KeyboardKey.KEY_PERIOD ----@type raylib.KeyboardKey -M.KEY_SLASH = M.KeyboardKey.KEY_SLASH ----@type raylib.KeyboardKey -M.KEY_ZERO = M.KeyboardKey.KEY_ZERO ----@type raylib.KeyboardKey -M.KEY_ONE = M.KeyboardKey.KEY_ONE ----@type raylib.KeyboardKey -M.KEY_TWO = M.KeyboardKey.KEY_TWO ----@type raylib.KeyboardKey -M.KEY_THREE = M.KeyboardKey.KEY_THREE ----@type raylib.KeyboardKey -M.KEY_FOUR = M.KeyboardKey.KEY_FOUR ----@type raylib.KeyboardKey -M.KEY_FIVE = M.KeyboardKey.KEY_FIVE ----@type raylib.KeyboardKey -M.KEY_SIX = M.KeyboardKey.KEY_SIX ----@type raylib.KeyboardKey -M.KEY_SEVEN = M.KeyboardKey.KEY_SEVEN ----@type raylib.KeyboardKey -M.KEY_EIGHT = M.KeyboardKey.KEY_EIGHT ----@type raylib.KeyboardKey -M.KEY_NINE = M.KeyboardKey.KEY_NINE ----@type raylib.KeyboardKey -M.KEY_SEMICOLON = M.KeyboardKey.KEY_SEMICOLON ----@type raylib.KeyboardKey -M.KEY_EQUAL = M.KeyboardKey.KEY_EQUAL ----@type raylib.KeyboardKey -M.KEY_A = M.KeyboardKey.KEY_A ----@type raylib.KeyboardKey -M.KEY_B = M.KeyboardKey.KEY_B ----@type raylib.KeyboardKey -M.KEY_C = M.KeyboardKey.KEY_C ----@type raylib.KeyboardKey -M.KEY_D = M.KeyboardKey.KEY_D ----@type raylib.KeyboardKey -M.KEY_E = M.KeyboardKey.KEY_E ----@type raylib.KeyboardKey -M.KEY_F = M.KeyboardKey.KEY_F ----@type raylib.KeyboardKey -M.KEY_G = M.KeyboardKey.KEY_G ----@type raylib.KeyboardKey -M.KEY_H = M.KeyboardKey.KEY_H ----@type raylib.KeyboardKey -M.KEY_I = M.KeyboardKey.KEY_I ----@type raylib.KeyboardKey -M.KEY_J = M.KeyboardKey.KEY_J ----@type raylib.KeyboardKey -M.KEY_K = M.KeyboardKey.KEY_K ----@type raylib.KeyboardKey -M.KEY_L = M.KeyboardKey.KEY_L ----@type raylib.KeyboardKey -M.KEY_M = M.KeyboardKey.KEY_M ----@type raylib.KeyboardKey -M.KEY_N = M.KeyboardKey.KEY_N ----@type raylib.KeyboardKey -M.KEY_O = M.KeyboardKey.KEY_O ----@type raylib.KeyboardKey -M.KEY_P = M.KeyboardKey.KEY_P ----@type raylib.KeyboardKey -M.KEY_Q = M.KeyboardKey.KEY_Q ----@type raylib.KeyboardKey -M.KEY_R = M.KeyboardKey.KEY_R ----@type raylib.KeyboardKey -M.KEY_S = M.KeyboardKey.KEY_S ----@type raylib.KeyboardKey -M.KEY_T = M.KeyboardKey.KEY_T ----@type raylib.KeyboardKey -M.KEY_U = M.KeyboardKey.KEY_U ----@type raylib.KeyboardKey -M.KEY_V = M.KeyboardKey.KEY_V ----@type raylib.KeyboardKey -M.KEY_W = M.KeyboardKey.KEY_W ----@type raylib.KeyboardKey -M.KEY_X = M.KeyboardKey.KEY_X ----@type raylib.KeyboardKey -M.KEY_Y = M.KeyboardKey.KEY_Y ----@type raylib.KeyboardKey -M.KEY_Z = M.KeyboardKey.KEY_Z ----@type raylib.KeyboardKey -M.KEY_LEFT_BRACKET = M.KeyboardKey.KEY_LEFT_BRACKET ----@type raylib.KeyboardKey -M.KEY_BACKSLASH = M.KeyboardKey.KEY_BACKSLASH ----@type raylib.KeyboardKey -M.KEY_RIGHT_BRACKET = M.KeyboardKey.KEY_RIGHT_BRACKET ----@type raylib.KeyboardKey -M.KEY_GRAVE = M.KeyboardKey.KEY_GRAVE ----@type raylib.KeyboardKey -M.KEY_SPACE = M.KeyboardKey.KEY_SPACE ----@type raylib.KeyboardKey -M.KEY_ESCAPE = M.KeyboardKey.KEY_ESCAPE ----@type raylib.KeyboardKey -M.KEY_ENTER = M.KeyboardKey.KEY_ENTER ----@type raylib.KeyboardKey -M.KEY_TAB = M.KeyboardKey.KEY_TAB ----@type raylib.KeyboardKey -M.KEY_BACKSPACE = M.KeyboardKey.KEY_BACKSPACE ----@type raylib.KeyboardKey -M.KEY_INSERT = M.KeyboardKey.KEY_INSERT ----@type raylib.KeyboardKey -M.KEY_DELETE = M.KeyboardKey.KEY_DELETE ----@type raylib.KeyboardKey -M.KEY_RIGHT = M.KeyboardKey.KEY_RIGHT ----@type raylib.KeyboardKey -M.KEY_LEFT = M.KeyboardKey.KEY_LEFT ----@type raylib.KeyboardKey -M.KEY_DOWN = M.KeyboardKey.KEY_DOWN ----@type raylib.KeyboardKey -M.KEY_UP = M.KeyboardKey.KEY_UP ----@type raylib.KeyboardKey -M.KEY_PAGE_UP = M.KeyboardKey.KEY_PAGE_UP ----@type raylib.KeyboardKey -M.KEY_PAGE_DOWN = M.KeyboardKey.KEY_PAGE_DOWN ----@type raylib.KeyboardKey -M.KEY_HOME = M.KeyboardKey.KEY_HOME ----@type raylib.KeyboardKey -M.KEY_END = M.KeyboardKey.KEY_END ----@type raylib.KeyboardKey -M.KEY_CAPS_LOCK = M.KeyboardKey.KEY_CAPS_LOCK ----@type raylib.KeyboardKey -M.KEY_SCROLL_LOCK = M.KeyboardKey.KEY_SCROLL_LOCK ----@type raylib.KeyboardKey -M.KEY_NUM_LOCK = M.KeyboardKey.KEY_NUM_LOCK ----@type raylib.KeyboardKey -M.KEY_PRINT_SCREEN = M.KeyboardKey.KEY_PRINT_SCREEN ----@type raylib.KeyboardKey -M.KEY_PAUSE = M.KeyboardKey.KEY_PAUSE ----@type raylib.KeyboardKey -M.KEY_F1 = M.KeyboardKey.KEY_F1 ----@type raylib.KeyboardKey -M.KEY_F2 = M.KeyboardKey.KEY_F2 ----@type raylib.KeyboardKey -M.KEY_F3 = M.KeyboardKey.KEY_F3 ----@type raylib.KeyboardKey -M.KEY_F4 = M.KeyboardKey.KEY_F4 ----@type raylib.KeyboardKey -M.KEY_F5 = M.KeyboardKey.KEY_F5 ----@type raylib.KeyboardKey -M.KEY_F6 = M.KeyboardKey.KEY_F6 ----@type raylib.KeyboardKey -M.KEY_F7 = M.KeyboardKey.KEY_F7 ----@type raylib.KeyboardKey -M.KEY_F8 = M.KeyboardKey.KEY_F8 ----@type raylib.KeyboardKey -M.KEY_F9 = M.KeyboardKey.KEY_F9 ----@type raylib.KeyboardKey -M.KEY_F10 = M.KeyboardKey.KEY_F10 ----@type raylib.KeyboardKey -M.KEY_F11 = M.KeyboardKey.KEY_F11 ----@type raylib.KeyboardKey -M.KEY_F12 = M.KeyboardKey.KEY_F12 ----@type raylib.KeyboardKey -M.KEY_LEFT_SHIFT = M.KeyboardKey.KEY_LEFT_SHIFT ----@type raylib.KeyboardKey -M.KEY_LEFT_CONTROL = M.KeyboardKey.KEY_LEFT_CONTROL ----@type raylib.KeyboardKey -M.KEY_LEFT_ALT = M.KeyboardKey.KEY_LEFT_ALT ----@type raylib.KeyboardKey -M.KEY_LEFT_SUPER = M.KeyboardKey.KEY_LEFT_SUPER ----@type raylib.KeyboardKey -M.KEY_RIGHT_SHIFT = M.KeyboardKey.KEY_RIGHT_SHIFT ----@type raylib.KeyboardKey -M.KEY_RIGHT_CONTROL = M.KeyboardKey.KEY_RIGHT_CONTROL ----@type raylib.KeyboardKey -M.KEY_RIGHT_ALT = M.KeyboardKey.KEY_RIGHT_ALT ----@type raylib.KeyboardKey -M.KEY_RIGHT_SUPER = M.KeyboardKey.KEY_RIGHT_SUPER ----@type raylib.KeyboardKey -M.KEY_KB_MENU = M.KeyboardKey.KEY_KB_MENU ----@type raylib.KeyboardKey -M.KEY_KP_0 = M.KeyboardKey.KEY_KP_0 ----@type raylib.KeyboardKey -M.KEY_KP_1 = M.KeyboardKey.KEY_KP_1 ----@type raylib.KeyboardKey -M.KEY_KP_2 = M.KeyboardKey.KEY_KP_2 ----@type raylib.KeyboardKey -M.KEY_KP_3 = M.KeyboardKey.KEY_KP_3 ----@type raylib.KeyboardKey -M.KEY_KP_4 = M.KeyboardKey.KEY_KP_4 ----@type raylib.KeyboardKey -M.KEY_KP_5 = M.KeyboardKey.KEY_KP_5 ----@type raylib.KeyboardKey -M.KEY_KP_6 = M.KeyboardKey.KEY_KP_6 ----@type raylib.KeyboardKey -M.KEY_KP_7 = M.KeyboardKey.KEY_KP_7 ----@type raylib.KeyboardKey -M.KEY_KP_8 = M.KeyboardKey.KEY_KP_8 ----@type raylib.KeyboardKey -M.KEY_KP_9 = M.KeyboardKey.KEY_KP_9 ----@type raylib.KeyboardKey -M.KEY_KP_DECIMAL = M.KeyboardKey.KEY_KP_DECIMAL ----@type raylib.KeyboardKey -M.KEY_KP_DIVIDE = M.KeyboardKey.KEY_KP_DIVIDE ----@type raylib.KeyboardKey -M.KEY_KP_MULTIPLY = M.KeyboardKey.KEY_KP_MULTIPLY ----@type raylib.KeyboardKey -M.KEY_KP_SUBTRACT = M.KeyboardKey.KEY_KP_SUBTRACT ----@type raylib.KeyboardKey -M.KEY_KP_ADD = M.KeyboardKey.KEY_KP_ADD ----@type raylib.KeyboardKey -M.KEY_KP_ENTER = M.KeyboardKey.KEY_KP_ENTER ----@type raylib.KeyboardKey -M.KEY_KP_EQUAL = M.KeyboardKey.KEY_KP_EQUAL ----@type raylib.KeyboardKey -M.KEY_BACK = M.KeyboardKey.KEY_BACK ----@type raylib.KeyboardKey -M.KEY_MENU = M.KeyboardKey.KEY_MENU ----@type raylib.KeyboardKey -M.KEY_VOLUME_UP = M.KeyboardKey.KEY_VOLUME_UP ----@type raylib.KeyboardKey -M.KEY_VOLUME_DOWN = M.KeyboardKey.KEY_VOLUME_DOWN ----@type raylib.MouseButton -M.MOUSE_BUTTON_LEFT = M.MouseButton.MOUSE_BUTTON_LEFT ----@type raylib.MouseButton -M.MOUSE_BUTTON_RIGHT = M.MouseButton.MOUSE_BUTTON_RIGHT ----@type raylib.MouseButton -M.MOUSE_BUTTON_MIDDLE = M.MouseButton.MOUSE_BUTTON_MIDDLE ----@type raylib.MouseButton -M.MOUSE_BUTTON_SIDE = M.MouseButton.MOUSE_BUTTON_SIDE ----@type raylib.MouseButton -M.MOUSE_BUTTON_EXTRA = M.MouseButton.MOUSE_BUTTON_EXTRA ----@type raylib.MouseButton -M.MOUSE_BUTTON_FORWARD = M.MouseButton.MOUSE_BUTTON_FORWARD ----@type raylib.MouseButton -M.MOUSE_BUTTON_BACK = M.MouseButton.MOUSE_BUTTON_BACK ----@type raylib.MouseCursor -M.MOUSE_CURSOR_DEFAULT = M.MouseCursor.MOUSE_CURSOR_DEFAULT ----@type raylib.MouseCursor -M.MOUSE_CURSOR_ARROW = M.MouseCursor.MOUSE_CURSOR_ARROW ----@type raylib.MouseCursor -M.MOUSE_CURSOR_IBEAM = M.MouseCursor.MOUSE_CURSOR_IBEAM ----@type raylib.MouseCursor -M.MOUSE_CURSOR_CROSSHAIR = M.MouseCursor.MOUSE_CURSOR_CROSSHAIR ----@type raylib.MouseCursor -M.MOUSE_CURSOR_POINTING_HAND = M.MouseCursor.MOUSE_CURSOR_POINTING_HAND ----@type raylib.MouseCursor -M.MOUSE_CURSOR_RESIZE_EW = M.MouseCursor.MOUSE_CURSOR_RESIZE_EW ----@type raylib.MouseCursor -M.MOUSE_CURSOR_RESIZE_NS = M.MouseCursor.MOUSE_CURSOR_RESIZE_NS ----@type raylib.MouseCursor -M.MOUSE_CURSOR_RESIZE_NWSE = M.MouseCursor.MOUSE_CURSOR_RESIZE_NWSE ----@type raylib.MouseCursor -M.MOUSE_CURSOR_RESIZE_NESW = M.MouseCursor.MOUSE_CURSOR_RESIZE_NESW ----@type raylib.MouseCursor -M.MOUSE_CURSOR_RESIZE_ALL = M.MouseCursor.MOUSE_CURSOR_RESIZE_ALL ----@type raylib.MouseCursor -M.MOUSE_CURSOR_NOT_ALLOWED = M.MouseCursor.MOUSE_CURSOR_NOT_ALLOWED ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_UNKNOWN = M.GamepadButton.GAMEPAD_BUTTON_UNKNOWN ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_FACE_UP = M.GamepadButton.GAMEPAD_BUTTON_LEFT_FACE_UP ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_FACE_RIGHT = M.GamepadButton.GAMEPAD_BUTTON_LEFT_FACE_RIGHT ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_FACE_DOWN = M.GamepadButton.GAMEPAD_BUTTON_LEFT_FACE_DOWN ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_FACE_LEFT = M.GamepadButton.GAMEPAD_BUTTON_LEFT_FACE_LEFT ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_FACE_UP = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_FACE_UP ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_FACE_RIGHT ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_FACE_DOWN = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_FACE_DOWN ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_FACE_LEFT = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_FACE_LEFT ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_TRIGGER_1 = M.GamepadButton.GAMEPAD_BUTTON_LEFT_TRIGGER_1 ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_TRIGGER_2 = M.GamepadButton.GAMEPAD_BUTTON_LEFT_TRIGGER_2 ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_TRIGGER_1 ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_TRIGGER_2 ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_MIDDLE_LEFT = M.GamepadButton.GAMEPAD_BUTTON_MIDDLE_LEFT ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_MIDDLE = M.GamepadButton.GAMEPAD_BUTTON_MIDDLE ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_MIDDLE_RIGHT = M.GamepadButton.GAMEPAD_BUTTON_MIDDLE_RIGHT ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_LEFT_THUMB = M.GamepadButton.GAMEPAD_BUTTON_LEFT_THUMB ----@type raylib.GamepadButton -M.GAMEPAD_BUTTON_RIGHT_THUMB = M.GamepadButton.GAMEPAD_BUTTON_RIGHT_THUMB ----@type raylib.GamepadAxis -M.GAMEPAD_AXIS_LEFT_X = M.GamepadAxis.GAMEPAD_AXIS_LEFT_X ----@type raylib.GamepadAxis -M.GAMEPAD_AXIS_LEFT_Y = M.GamepadAxis.GAMEPAD_AXIS_LEFT_Y ----@type raylib.GamepadAxis -M.GAMEPAD_AXIS_RIGHT_X = M.GamepadAxis.GAMEPAD_AXIS_RIGHT_X ----@type raylib.GamepadAxis -M.GAMEPAD_AXIS_RIGHT_Y = M.GamepadAxis.GAMEPAD_AXIS_RIGHT_Y ----@type raylib.GamepadAxis -M.GAMEPAD_AXIS_LEFT_TRIGGER = M.GamepadAxis.GAMEPAD_AXIS_LEFT_TRIGGER ----@type raylib.GamepadAxis -M.GAMEPAD_AXIS_RIGHT_TRIGGER = M.GamepadAxis.GAMEPAD_AXIS_RIGHT_TRIGGER ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_ALBEDO = M.MaterialMapIndex.MATERIAL_MAP_ALBEDO ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_METALNESS = M.MaterialMapIndex.MATERIAL_MAP_METALNESS ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_NORMAL = M.MaterialMapIndex.MATERIAL_MAP_NORMAL ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_ROUGHNESS = M.MaterialMapIndex.MATERIAL_MAP_ROUGHNESS ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_OCCLUSION = M.MaterialMapIndex.MATERIAL_MAP_OCCLUSION ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_EMISSION = M.MaterialMapIndex.MATERIAL_MAP_EMISSION ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_HEIGHT = M.MaterialMapIndex.MATERIAL_MAP_HEIGHT ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_CUBEMAP = M.MaterialMapIndex.MATERIAL_MAP_CUBEMAP ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_IRRADIANCE = M.MaterialMapIndex.MATERIAL_MAP_IRRADIANCE ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_PREFILTER = M.MaterialMapIndex.MATERIAL_MAP_PREFILTER ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_BRDF = M.MaterialMapIndex.MATERIAL_MAP_BRDF ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_POSITION = M.ShaderLocationIndex.SHADER_LOC_VERTEX_POSITION ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_TEXCOORD01 = M.ShaderLocationIndex.SHADER_LOC_VERTEX_TEXCOORD01 ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_TEXCOORD02 = M.ShaderLocationIndex.SHADER_LOC_VERTEX_TEXCOORD02 ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_NORMAL = M.ShaderLocationIndex.SHADER_LOC_VERTEX_NORMAL ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_TANGENT = M.ShaderLocationIndex.SHADER_LOC_VERTEX_TANGENT ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_COLOR = M.ShaderLocationIndex.SHADER_LOC_VERTEX_COLOR ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MATRIX_MVP = M.ShaderLocationIndex.SHADER_LOC_MATRIX_MVP ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MATRIX_VIEW = M.ShaderLocationIndex.SHADER_LOC_MATRIX_VIEW ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MATRIX_PROJECTION = M.ShaderLocationIndex.SHADER_LOC_MATRIX_PROJECTION ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MATRIX_MODEL = M.ShaderLocationIndex.SHADER_LOC_MATRIX_MODEL ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MATRIX_NORMAL = M.ShaderLocationIndex.SHADER_LOC_MATRIX_NORMAL ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VECTOR_VIEW = M.ShaderLocationIndex.SHADER_LOC_VECTOR_VIEW ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_COLOR_DIFFUSE = M.ShaderLocationIndex.SHADER_LOC_COLOR_DIFFUSE ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_COLOR_SPECULAR = M.ShaderLocationIndex.SHADER_LOC_COLOR_SPECULAR ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_COLOR_AMBIENT = M.ShaderLocationIndex.SHADER_LOC_COLOR_AMBIENT ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_ALBEDO = M.ShaderLocationIndex.SHADER_LOC_MAP_ALBEDO ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_METALNESS = M.ShaderLocationIndex.SHADER_LOC_MAP_METALNESS ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_NORMAL = M.ShaderLocationIndex.SHADER_LOC_MAP_NORMAL ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_ROUGHNESS = M.ShaderLocationIndex.SHADER_LOC_MAP_ROUGHNESS ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_OCCLUSION = M.ShaderLocationIndex.SHADER_LOC_MAP_OCCLUSION ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_EMISSION = M.ShaderLocationIndex.SHADER_LOC_MAP_EMISSION ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_HEIGHT = M.ShaderLocationIndex.SHADER_LOC_MAP_HEIGHT ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_CUBEMAP = M.ShaderLocationIndex.SHADER_LOC_MAP_CUBEMAP ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_IRRADIANCE = M.ShaderLocationIndex.SHADER_LOC_MAP_IRRADIANCE ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_PREFILTER = M.ShaderLocationIndex.SHADER_LOC_MAP_PREFILTER ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_BRDF = M.ShaderLocationIndex.SHADER_LOC_MAP_BRDF ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_BONEIDS = M.ShaderLocationIndex.SHADER_LOC_VERTEX_BONEIDS ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_BONEWEIGHTS = M.ShaderLocationIndex.SHADER_LOC_VERTEX_BONEWEIGHTS ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MATRIX_BONETRANSFORMS = M.ShaderLocationIndex.SHADER_LOC_MATRIX_BONETRANSFORMS ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_VERTEX_INSTANCETRANSFORM = M.ShaderLocationIndex.SHADER_LOC_VERTEX_INSTANCETRANSFORM ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_FLOAT = M.ShaderUniformDataType.SHADER_UNIFORM_FLOAT ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_VEC2 = M.ShaderUniformDataType.SHADER_UNIFORM_VEC2 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_VEC3 = M.ShaderUniformDataType.SHADER_UNIFORM_VEC3 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_VEC4 = M.ShaderUniformDataType.SHADER_UNIFORM_VEC4 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_INT = M.ShaderUniformDataType.SHADER_UNIFORM_INT ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_IVEC2 = M.ShaderUniformDataType.SHADER_UNIFORM_IVEC2 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_IVEC3 = M.ShaderUniformDataType.SHADER_UNIFORM_IVEC3 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_IVEC4 = M.ShaderUniformDataType.SHADER_UNIFORM_IVEC4 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_UINT = M.ShaderUniformDataType.SHADER_UNIFORM_UINT ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_UIVEC2 = M.ShaderUniformDataType.SHADER_UNIFORM_UIVEC2 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_UIVEC3 = M.ShaderUniformDataType.SHADER_UNIFORM_UIVEC3 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_UIVEC4 = M.ShaderUniformDataType.SHADER_UNIFORM_UIVEC4 ----@type raylib.ShaderUniformDataType -M.SHADER_UNIFORM_SAMPLER2D = M.ShaderUniformDataType.SHADER_UNIFORM_SAMPLER2D ----@type raylib.ShaderAttributeDataType -M.SHADER_ATTRIB_FLOAT = M.ShaderAttributeDataType.SHADER_ATTRIB_FLOAT ----@type raylib.ShaderAttributeDataType -M.SHADER_ATTRIB_VEC2 = M.ShaderAttributeDataType.SHADER_ATTRIB_VEC2 ----@type raylib.ShaderAttributeDataType -M.SHADER_ATTRIB_VEC3 = M.ShaderAttributeDataType.SHADER_ATTRIB_VEC3 ----@type raylib.ShaderAttributeDataType -M.SHADER_ATTRIB_VEC4 = M.ShaderAttributeDataType.SHADER_ATTRIB_VEC4 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_GRAYSCALE ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R5G6B5 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R5G6B5 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R8G8B8 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R8G8B8 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R32 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R32 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R32G32B32 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R32G32B32 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R16 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R16 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R16G16B16 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R16G16B16 ----@type raylib.PixelFormat -M.PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = M.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_DXT1_RGB = M.PixelFormat.PIXELFORMAT_COMPRESSED_DXT1_RGB ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_DXT1_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_DXT1_RGBA ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_DXT3_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_DXT3_RGBA ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_DXT5_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_DXT5_RGBA ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_ETC1_RGB = M.PixelFormat.PIXELFORMAT_COMPRESSED_ETC1_RGB ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_ETC2_RGB = M.PixelFormat.PIXELFORMAT_COMPRESSED_ETC2_RGB ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_PVRT_RGB = M.PixelFormat.PIXELFORMAT_COMPRESSED_PVRT_RGB ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_PVRT_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_PVRT_RGBA ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA ----@type raylib.PixelFormat -M.PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = M.PixelFormat.PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA ----@type raylib.TextureFilter -M.TEXTURE_FILTER_POINT = M.TextureFilter.TEXTURE_FILTER_POINT ----@type raylib.TextureFilter -M.TEXTURE_FILTER_BILINEAR = M.TextureFilter.TEXTURE_FILTER_BILINEAR ----@type raylib.TextureFilter -M.TEXTURE_FILTER_TRILINEAR = M.TextureFilter.TEXTURE_FILTER_TRILINEAR ----@type raylib.TextureFilter -M.TEXTURE_FILTER_ANISOTROPIC_4X = M.TextureFilter.TEXTURE_FILTER_ANISOTROPIC_4X ----@type raylib.TextureFilter -M.TEXTURE_FILTER_ANISOTROPIC_8X = M.TextureFilter.TEXTURE_FILTER_ANISOTROPIC_8X ----@type raylib.TextureFilter -M.TEXTURE_FILTER_ANISOTROPIC_16X = M.TextureFilter.TEXTURE_FILTER_ANISOTROPIC_16X ----@type raylib.TextureWrap -M.TEXTURE_WRAP_REPEAT = M.TextureWrap.TEXTURE_WRAP_REPEAT ----@type raylib.TextureWrap -M.TEXTURE_WRAP_CLAMP = M.TextureWrap.TEXTURE_WRAP_CLAMP ----@type raylib.TextureWrap -M.TEXTURE_WRAP_MIRROR_REPEAT = M.TextureWrap.TEXTURE_WRAP_MIRROR_REPEAT ----@type raylib.TextureWrap -M.TEXTURE_WRAP_MIRROR_CLAMP = M.TextureWrap.TEXTURE_WRAP_MIRROR_CLAMP ----@type raylib.CubemapLayout -M.CUBEMAP_LAYOUT_AUTO_DETECT = M.CubemapLayout.CUBEMAP_LAYOUT_AUTO_DETECT ----@type raylib.CubemapLayout -M.CUBEMAP_LAYOUT_LINE_VERTICAL = M.CubemapLayout.CUBEMAP_LAYOUT_LINE_VERTICAL ----@type raylib.CubemapLayout -M.CUBEMAP_LAYOUT_LINE_HORIZONTAL = M.CubemapLayout.CUBEMAP_LAYOUT_LINE_HORIZONTAL ----@type raylib.CubemapLayout -M.CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = M.CubemapLayout.CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR ----@type raylib.CubemapLayout -M.CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = M.CubemapLayout.CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE ----@type raylib.FontType -M.FONT_DEFAULT = M.FontType.FONT_DEFAULT ----@type raylib.FontType -M.FONT_BITMAP = M.FontType.FONT_BITMAP ----@type raylib.FontType -M.FONT_SDF = M.FontType.FONT_SDF ----@type raylib.BlendMode -M.BLEND_ALPHA = M.BlendMode.BLEND_ALPHA ----@type raylib.BlendMode -M.BLEND_ADDITIVE = M.BlendMode.BLEND_ADDITIVE ----@type raylib.BlendMode -M.BLEND_MULTIPLIED = M.BlendMode.BLEND_MULTIPLIED ----@type raylib.BlendMode -M.BLEND_ADD_COLORS = M.BlendMode.BLEND_ADD_COLORS ----@type raylib.BlendMode -M.BLEND_SUBTRACT_COLORS = M.BlendMode.BLEND_SUBTRACT_COLORS ----@type raylib.BlendMode -M.BLEND_ALPHA_PREMULTIPLY = M.BlendMode.BLEND_ALPHA_PREMULTIPLY ----@type raylib.BlendMode -M.BLEND_CUSTOM = M.BlendMode.BLEND_CUSTOM ----@type raylib.BlendMode -M.BLEND_CUSTOM_SEPARATE = M.BlendMode.BLEND_CUSTOM_SEPARATE ----@type raylib.Gesture -M.GESTURE_NONE = M.Gesture.GESTURE_NONE ----@type raylib.Gesture -M.GESTURE_TAP = M.Gesture.GESTURE_TAP ----@type raylib.Gesture -M.GESTURE_DOUBLETAP = M.Gesture.GESTURE_DOUBLETAP ----@type raylib.Gesture -M.GESTURE_HOLD = M.Gesture.GESTURE_HOLD ----@type raylib.Gesture -M.GESTURE_DRAG = M.Gesture.GESTURE_DRAG ----@type raylib.Gesture -M.GESTURE_SWIPE_RIGHT = M.Gesture.GESTURE_SWIPE_RIGHT ----@type raylib.Gesture -M.GESTURE_SWIPE_LEFT = M.Gesture.GESTURE_SWIPE_LEFT ----@type raylib.Gesture -M.GESTURE_SWIPE_UP = M.Gesture.GESTURE_SWIPE_UP ----@type raylib.Gesture -M.GESTURE_SWIPE_DOWN = M.Gesture.GESTURE_SWIPE_DOWN ----@type raylib.Gesture -M.GESTURE_PINCH_IN = M.Gesture.GESTURE_PINCH_IN ----@type raylib.Gesture -M.GESTURE_PINCH_OUT = M.Gesture.GESTURE_PINCH_OUT ----@type raylib.CameraMode -M.CAMERA_CUSTOM = M.CameraMode.CAMERA_CUSTOM ----@type raylib.CameraMode -M.CAMERA_FREE = M.CameraMode.CAMERA_FREE ----@type raylib.CameraMode -M.CAMERA_ORBITAL = M.CameraMode.CAMERA_ORBITAL ----@type raylib.CameraMode -M.CAMERA_FIRST_PERSON = M.CameraMode.CAMERA_FIRST_PERSON ----@type raylib.CameraMode -M.CAMERA_THIRD_PERSON = M.CameraMode.CAMERA_THIRD_PERSON ----@type raylib.CameraProjection -M.CAMERA_PERSPECTIVE = M.CameraProjection.CAMERA_PERSPECTIVE ----@type raylib.CameraProjection -M.CAMERA_ORTHOGRAPHIC = M.CameraProjection.CAMERA_ORTHOGRAPHIC ----@type raylib.NPatchLayout -M.NPATCH_NINE_PATCH = M.NPatchLayout.NPATCH_NINE_PATCH ----@type raylib.NPatchLayout -M.NPATCH_THREE_PATCH_VERTICAL = M.NPatchLayout.NPATCH_THREE_PATCH_VERTICAL ----@type raylib.NPatchLayout -M.NPATCH_THREE_PATCH_HORIZONTAL = M.NPatchLayout.NPATCH_THREE_PATCH_HORIZONTAL ----@type raylib.rlGlVersion -M.RL_OPENGL_SOFTWARE = M.rlGlVersion.RL_OPENGL_SOFTWARE ----@type raylib.rlGlVersion -M.RL_OPENGL_11 = M.rlGlVersion.RL_OPENGL_11 ----@type raylib.rlGlVersion -M.RL_OPENGL_21 = M.rlGlVersion.RL_OPENGL_21 ----@type raylib.rlGlVersion -M.RL_OPENGL_33 = M.rlGlVersion.RL_OPENGL_33 ----@type raylib.rlGlVersion -M.RL_OPENGL_43 = M.rlGlVersion.RL_OPENGL_43 ----@type raylib.rlGlVersion -M.RL_OPENGL_ES_20 = M.rlGlVersion.RL_OPENGL_ES_20 ----@type raylib.rlGlVersion -M.RL_OPENGL_ES_30 = M.rlGlVersion.RL_OPENGL_ES_30 ----@type raylib.rlTraceLogLevel -M.RL_LOG_ALL = M.rlTraceLogLevel.RL_LOG_ALL ----@type raylib.rlTraceLogLevel -M.RL_LOG_TRACE = M.rlTraceLogLevel.RL_LOG_TRACE ----@type raylib.rlTraceLogLevel -M.RL_LOG_DEBUG = M.rlTraceLogLevel.RL_LOG_DEBUG ----@type raylib.rlTraceLogLevel -M.RL_LOG_INFO = M.rlTraceLogLevel.RL_LOG_INFO ----@type raylib.rlTraceLogLevel -M.RL_LOG_WARNING = M.rlTraceLogLevel.RL_LOG_WARNING ----@type raylib.rlTraceLogLevel -M.RL_LOG_ERROR = M.rlTraceLogLevel.RL_LOG_ERROR ----@type raylib.rlTraceLogLevel -M.RL_LOG_FATAL = M.rlTraceLogLevel.RL_LOG_FATAL ----@type raylib.rlTraceLogLevel -M.RL_LOG_NONE = M.rlTraceLogLevel.RL_LOG_NONE ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R32 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R32 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R16 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R16 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = M.rlPixelFormat.RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_DXT1_RGB ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_ETC1_RGB ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_ETC2_RGB ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_PVRT_RGB ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA ----@type raylib.rlPixelFormat -M.RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = M.rlPixelFormat.RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA ----@type raylib.rlTextureFilter -M.RL_TEXTURE_FILTER_POINT = M.rlTextureFilter.RL_TEXTURE_FILTER_POINT ----@type raylib.rlTextureFilter -M.RL_TEXTURE_FILTER_BILINEAR = M.rlTextureFilter.RL_TEXTURE_FILTER_BILINEAR ----@type raylib.rlTextureFilter -M.RL_TEXTURE_FILTER_TRILINEAR = M.rlTextureFilter.RL_TEXTURE_FILTER_TRILINEAR ----@type raylib.rlTextureFilter -M.RL_TEXTURE_FILTER_ANISOTROPIC_4X = M.rlTextureFilter.RL_TEXTURE_FILTER_ANISOTROPIC_4X ----@type raylib.rlTextureFilter -M.RL_TEXTURE_FILTER_ANISOTROPIC_8X = M.rlTextureFilter.RL_TEXTURE_FILTER_ANISOTROPIC_8X ----@type raylib.rlTextureFilter -M.RL_TEXTURE_FILTER_ANISOTROPIC_16X = M.rlTextureFilter.RL_TEXTURE_FILTER_ANISOTROPIC_16X ----@type raylib.rlBlendMode -M.RL_BLEND_ALPHA = M.rlBlendMode.RL_BLEND_ALPHA ----@type raylib.rlBlendMode -M.RL_BLEND_ADDITIVE = M.rlBlendMode.RL_BLEND_ADDITIVE ----@type raylib.rlBlendMode -M.RL_BLEND_MULTIPLIED = M.rlBlendMode.RL_BLEND_MULTIPLIED ----@type raylib.rlBlendMode -M.RL_BLEND_ADD_COLORS = M.rlBlendMode.RL_BLEND_ADD_COLORS ----@type raylib.rlBlendMode -M.RL_BLEND_SUBTRACT_COLORS = M.rlBlendMode.RL_BLEND_SUBTRACT_COLORS ----@type raylib.rlBlendMode -M.RL_BLEND_ALPHA_PREMULTIPLY = M.rlBlendMode.RL_BLEND_ALPHA_PREMULTIPLY ----@type raylib.rlBlendMode -M.RL_BLEND_CUSTOM = M.rlBlendMode.RL_BLEND_CUSTOM ----@type raylib.rlBlendMode -M.RL_BLEND_CUSTOM_SEPARATE = M.rlBlendMode.RL_BLEND_CUSTOM_SEPARATE ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VERTEX_POSITION = M.rlShaderLocationIndex.RL_SHADER_LOC_VERTEX_POSITION ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VERTEX_TEXCOORD01 = M.rlShaderLocationIndex.RL_SHADER_LOC_VERTEX_TEXCOORD01 ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VERTEX_TEXCOORD02 = M.rlShaderLocationIndex.RL_SHADER_LOC_VERTEX_TEXCOORD02 ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VERTEX_NORMAL = M.rlShaderLocationIndex.RL_SHADER_LOC_VERTEX_NORMAL ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VERTEX_TANGENT = M.rlShaderLocationIndex.RL_SHADER_LOC_VERTEX_TANGENT ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VERTEX_COLOR = M.rlShaderLocationIndex.RL_SHADER_LOC_VERTEX_COLOR ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MATRIX_MVP = M.rlShaderLocationIndex.RL_SHADER_LOC_MATRIX_MVP ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MATRIX_VIEW = M.rlShaderLocationIndex.RL_SHADER_LOC_MATRIX_VIEW ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MATRIX_PROJECTION = M.rlShaderLocationIndex.RL_SHADER_LOC_MATRIX_PROJECTION ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MATRIX_MODEL = M.rlShaderLocationIndex.RL_SHADER_LOC_MATRIX_MODEL ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MATRIX_NORMAL = M.rlShaderLocationIndex.RL_SHADER_LOC_MATRIX_NORMAL ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_VECTOR_VIEW = M.rlShaderLocationIndex.RL_SHADER_LOC_VECTOR_VIEW ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_COLOR_DIFFUSE = M.rlShaderLocationIndex.RL_SHADER_LOC_COLOR_DIFFUSE ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_COLOR_SPECULAR = M.rlShaderLocationIndex.RL_SHADER_LOC_COLOR_SPECULAR ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_COLOR_AMBIENT = M.rlShaderLocationIndex.RL_SHADER_LOC_COLOR_AMBIENT ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_ALBEDO = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_ALBEDO ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_METALNESS = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_METALNESS ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_NORMAL = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_NORMAL ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_ROUGHNESS = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_ROUGHNESS ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_OCCLUSION = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_OCCLUSION ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_EMISSION = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_EMISSION ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_HEIGHT = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_HEIGHT ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_CUBEMAP = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_CUBEMAP ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_IRRADIANCE = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_IRRADIANCE ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_PREFILTER = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_PREFILTER ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_BRDF = M.rlShaderLocationIndex.RL_SHADER_LOC_MAP_BRDF ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_FLOAT = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_FLOAT ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_VEC2 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_VEC2 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_VEC3 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_VEC3 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_VEC4 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_VEC4 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_INT = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_INT ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_IVEC2 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_IVEC2 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_IVEC3 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_IVEC3 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_IVEC4 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_IVEC4 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_UINT = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_UINT ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_UIVEC2 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_UIVEC2 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_UIVEC3 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_UIVEC3 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_UIVEC4 = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_UIVEC4 ----@type raylib.rlShaderUniformDataType -M.RL_SHADER_UNIFORM_SAMPLER2D = M.rlShaderUniformDataType.RL_SHADER_UNIFORM_SAMPLER2D ----@type raylib.rlShaderAttributeDataType -M.RL_SHADER_ATTRIB_FLOAT = M.rlShaderAttributeDataType.RL_SHADER_ATTRIB_FLOAT ----@type raylib.rlShaderAttributeDataType -M.RL_SHADER_ATTRIB_VEC2 = M.rlShaderAttributeDataType.RL_SHADER_ATTRIB_VEC2 ----@type raylib.rlShaderAttributeDataType -M.RL_SHADER_ATTRIB_VEC3 = M.rlShaderAttributeDataType.RL_SHADER_ATTRIB_VEC3 ----@type raylib.rlShaderAttributeDataType -M.RL_SHADER_ATTRIB_VEC4 = M.rlShaderAttributeDataType.RL_SHADER_ATTRIB_VEC4 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL0 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL0 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL1 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL1 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL2 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL2 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL3 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL3 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL4 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL4 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL5 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL5 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL6 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL6 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_COLOR_CHANNEL7 = M.rlFramebufferAttachType.RL_ATTACHMENT_COLOR_CHANNEL7 ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_DEPTH = M.rlFramebufferAttachType.RL_ATTACHMENT_DEPTH ----@type raylib.rlFramebufferAttachType -M.RL_ATTACHMENT_STENCIL = M.rlFramebufferAttachType.RL_ATTACHMENT_STENCIL ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_CUBEMAP_POSITIVE_X = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_CUBEMAP_POSITIVE_X ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_CUBEMAP_NEGATIVE_X ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_CUBEMAP_POSITIVE_Y ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_CUBEMAP_POSITIVE_Z ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_TEXTURE2D = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_TEXTURE2D ----@type raylib.rlFramebufferAttachTextureType -M.RL_ATTACHMENT_RENDERBUFFER = M.rlFramebufferAttachTextureType.RL_ATTACHMENT_RENDERBUFFER ----@type raylib.rlCullMode -M.RL_CULL_FACE_FRONT = M.rlCullMode.RL_CULL_FACE_FRONT ----@type raylib.rlCullMode -M.RL_CULL_FACE_BACK = M.rlCullMode.RL_CULL_FACE_BACK ----@type raylib.GuiResult -M.RESULT_NONE = M.GuiResult.RESULT_NONE ----@type raylib.GuiResult -M.RESULT_PRESSED = M.GuiResult.RESULT_PRESSED ----@type raylib.GuiResult -M.RESULT_CHANGED = M.GuiResult.RESULT_CHANGED ----@type raylib.GuiResult -M.RESULT_TAB_CLOSE = M.GuiResult.RESULT_TAB_CLOSE ----@type raylib.GuiState -M.STATE_NORMAL = M.GuiState.STATE_NORMAL ----@type raylib.GuiState -M.STATE_FOCUSED = M.GuiState.STATE_FOCUSED ----@type raylib.GuiState -M.STATE_PRESSED = M.GuiState.STATE_PRESSED ----@type raylib.GuiState -M.STATE_DISABLED = M.GuiState.STATE_DISABLED ----@type raylib.GuiTextAlignment -M.TEXT_ALIGN_LEFT = M.GuiTextAlignment.TEXT_ALIGN_LEFT ----@type raylib.GuiTextAlignment -M.TEXT_ALIGN_CENTER = M.GuiTextAlignment.TEXT_ALIGN_CENTER ----@type raylib.GuiTextAlignment -M.TEXT_ALIGN_RIGHT = M.GuiTextAlignment.TEXT_ALIGN_RIGHT ----@type raylib.GuiTextAlignmentVertical -M.TEXT_ALIGN_TOP = M.GuiTextAlignmentVertical.TEXT_ALIGN_TOP ----@type raylib.GuiTextAlignmentVertical -M.TEXT_ALIGN_MIDDLE = M.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE ----@type raylib.GuiTextAlignmentVertical -M.TEXT_ALIGN_BOTTOM = M.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM ----@type raylib.GuiTextWrapMode -M.TEXT_WRAP_NONE = M.GuiTextWrapMode.TEXT_WRAP_NONE ----@type raylib.GuiTextWrapMode -M.TEXT_WRAP_CHAR = M.GuiTextWrapMode.TEXT_WRAP_CHAR ----@type raylib.GuiTextWrapMode -M.TEXT_WRAP_WORD = M.GuiTextWrapMode.TEXT_WRAP_WORD ----@type raylib.GuiControl -M.DEFAULT = M.GuiControl.DEFAULT ----@type raylib.GuiControl -M.LABEL = M.GuiControl.LABEL ----@type raylib.GuiControl -M.BUTTON = M.GuiControl.BUTTON ----@type raylib.GuiControl -M.TOGGLE = M.GuiControl.TOGGLE ----@type raylib.GuiControl -M.SLIDER = M.GuiControl.SLIDER ----@type raylib.GuiControl -M.PROGRESSBAR = M.GuiControl.PROGRESSBAR ----@type raylib.GuiControl -M.CHECKBOX = M.GuiControl.CHECKBOX ----@type raylib.GuiControl -M.COMBOBOX = M.GuiControl.COMBOBOX ----@type raylib.GuiControl -M.DROPDOWNBOX = M.GuiControl.DROPDOWNBOX ----@type raylib.GuiControl -M.TEXTBOX = M.GuiControl.TEXTBOX ----@type raylib.GuiControl -M.VALUEBOX = M.GuiControl.VALUEBOX ----@type raylib.GuiControl -M.TABBAR = M.GuiControl.TABBAR ----@type raylib.GuiControl -M.LISTVIEW = M.GuiControl.LISTVIEW ----@type raylib.GuiControl -M.COLORPICKER = M.GuiControl.COLORPICKER ----@type raylib.GuiControl -M.SCROLLBAR = M.GuiControl.SCROLLBAR ----@type raylib.GuiControl -M.STATUSBAR = M.GuiControl.STATUSBAR ----@type raylib.GuiControlProperty -M.BORDER_COLOR_NORMAL = M.GuiControlProperty.BORDER_COLOR_NORMAL ----@type raylib.GuiControlProperty -M.BASE_COLOR_NORMAL = M.GuiControlProperty.BASE_COLOR_NORMAL ----@type raylib.GuiControlProperty -M.TEXT_COLOR_NORMAL = M.GuiControlProperty.TEXT_COLOR_NORMAL ----@type raylib.GuiControlProperty -M.BORDER_COLOR_FOCUSED = M.GuiControlProperty.BORDER_COLOR_FOCUSED ----@type raylib.GuiControlProperty -M.BASE_COLOR_FOCUSED = M.GuiControlProperty.BASE_COLOR_FOCUSED ----@type raylib.GuiControlProperty -M.TEXT_COLOR_FOCUSED = M.GuiControlProperty.TEXT_COLOR_FOCUSED ----@type raylib.GuiControlProperty -M.BORDER_COLOR_PRESSED = M.GuiControlProperty.BORDER_COLOR_PRESSED ----@type raylib.GuiControlProperty -M.BASE_COLOR_PRESSED = M.GuiControlProperty.BASE_COLOR_PRESSED ----@type raylib.GuiControlProperty -M.TEXT_COLOR_PRESSED = M.GuiControlProperty.TEXT_COLOR_PRESSED ----@type raylib.GuiControlProperty -M.BORDER_COLOR_DISABLED = M.GuiControlProperty.BORDER_COLOR_DISABLED ----@type raylib.GuiControlProperty -M.BASE_COLOR_DISABLED = M.GuiControlProperty.BASE_COLOR_DISABLED ----@type raylib.GuiControlProperty -M.TEXT_COLOR_DISABLED = M.GuiControlProperty.TEXT_COLOR_DISABLED ----@type raylib.GuiControlProperty -M.BORDER_WIDTH = M.GuiControlProperty.BORDER_WIDTH ----@type raylib.GuiControlProperty -M.TEXT_PADDING = M.GuiControlProperty.TEXT_PADDING ----@type raylib.GuiControlProperty -M.TEXT_ALIGNMENT = M.GuiControlProperty.TEXT_ALIGNMENT ----@type raylib.GuiControlProperty -M.BASEPROP16 = M.GuiControlProperty.BASEPROP16 ----@type raylib.GuiDefaultProperty -M.TEXT_SIZE = M.GuiDefaultProperty.TEXT_SIZE ----@type raylib.GuiDefaultProperty -M.TEXT_SPACING = M.GuiDefaultProperty.TEXT_SPACING ----@type raylib.GuiDefaultProperty -M.LINE_COLOR = M.GuiDefaultProperty.LINE_COLOR ----@type raylib.GuiDefaultProperty -M.BACKGROUND_COLOR = M.GuiDefaultProperty.BACKGROUND_COLOR ----@type raylib.GuiDefaultProperty -M.TEXT_LINE_SPACING = M.GuiDefaultProperty.TEXT_LINE_SPACING ----@type raylib.GuiDefaultProperty -M.TEXT_ALIGNMENT_VERTICAL = M.GuiDefaultProperty.TEXT_ALIGNMENT_VERTICAL ----@type raylib.GuiDefaultProperty -M.TEXT_WRAP_MODE = M.GuiDefaultProperty.TEXT_WRAP_MODE ----@type raylib.GuiDefaultProperty -M.EXTPROP08 = M.GuiDefaultProperty.EXTPROP08 ----@type raylib.GuiToggleProperty -M.GROUP_PADDING = M.GuiToggleProperty.GROUP_PADDING ----@type raylib.GuiToggleProperty -M.GROUP_WIDTH_FULL = M.GuiToggleProperty.GROUP_WIDTH_FULL ----@type raylib.GuiSliderProperty -M.SLIDER_WIDTH = M.GuiSliderProperty.SLIDER_WIDTH ----@type raylib.GuiSliderProperty -M.SLIDER_PADDING = M.GuiSliderProperty.SLIDER_PADDING ----@type raylib.GuiProgressBarProperty -M.PROGRESS_PADDING = M.GuiProgressBarProperty.PROGRESS_PADDING ----@type raylib.GuiProgressBarProperty -M.PROGRESS_SIDE = M.GuiProgressBarProperty.PROGRESS_SIDE ----@type raylib.GuiScrollBarProperty -M.ARROWS_SIZE = M.GuiScrollBarProperty.ARROWS_SIZE ----@type raylib.GuiScrollBarProperty -M.ARROWS_VISIBLE = M.GuiScrollBarProperty.ARROWS_VISIBLE ----@type raylib.GuiScrollBarProperty -M.SCROLL_SLIDER_PADDING = M.GuiScrollBarProperty.SCROLL_SLIDER_PADDING ----@type raylib.GuiScrollBarProperty -M.SCROLL_SLIDER_SIZE = M.GuiScrollBarProperty.SCROLL_SLIDER_SIZE ----@type raylib.GuiScrollBarProperty -M.SCROLL_PADDING = M.GuiScrollBarProperty.SCROLL_PADDING ----@type raylib.GuiScrollBarProperty -M.SCROLL_SPEED = M.GuiScrollBarProperty.SCROLL_SPEED ----@type raylib.GuiCheckBoxProperty -M.CHECK_PADDING = M.GuiCheckBoxProperty.CHECK_PADDING ----@type raylib.GuiComboBoxProperty -M.COMBO_BUTTON_WIDTH = M.GuiComboBoxProperty.COMBO_BUTTON_WIDTH ----@type raylib.GuiComboBoxProperty -M.COMBO_BUTTON_SPACING = M.GuiComboBoxProperty.COMBO_BUTTON_SPACING ----@type raylib.GuiDropdownBoxProperty -M.ARROW_PADDING = M.GuiDropdownBoxProperty.ARROW_PADDING ----@type raylib.GuiDropdownBoxProperty -M.DROPDOWN_ITEMS_SPACING = M.GuiDropdownBoxProperty.DROPDOWN_ITEMS_SPACING ----@type raylib.GuiDropdownBoxProperty -M.DROPDOWN_ARROW_HIDDEN = M.GuiDropdownBoxProperty.DROPDOWN_ARROW_HIDDEN ----@type raylib.GuiDropdownBoxProperty -M.DROPDOWN_ROLL_UP = M.GuiDropdownBoxProperty.DROPDOWN_ROLL_UP ----@type raylib.GuiDropdownBoxProperty -M.DROPDOWN_MAX_HEIGHT = M.GuiDropdownBoxProperty.DROPDOWN_MAX_HEIGHT ----@type raylib.GuiTextBoxProperty -M.TEXT_READONLY = M.GuiTextBoxProperty.TEXT_READONLY ----@type raylib.GuiValueBoxProperty -M.SPINNER_BUTTON_WIDTH = M.GuiValueBoxProperty.SPINNER_BUTTON_WIDTH ----@type raylib.GuiValueBoxProperty -M.SPINNER_BUTTON_SPACING = M.GuiValueBoxProperty.SPINNER_BUTTON_SPACING ----@type raylib.GuiTabBarProperty -M.TAB_ITEMS_WIDTH = M.GuiTabBarProperty.TAB_ITEMS_WIDTH ----@type raylib.GuiTabBarProperty -M.TAB_CLOSE_BUTTON = M.GuiTabBarProperty.TAB_CLOSE_BUTTON ----@type raylib.GuiTabBarProperty -M.TAB_LINE_SIDE = M.GuiTabBarProperty.TAB_LINE_SIDE ----@type raylib.GuiListViewProperty -M.LIST_ITEMS_HEIGHT = M.GuiListViewProperty.LIST_ITEMS_HEIGHT ----@type raylib.GuiListViewProperty -M.LIST_ITEMS_SPACING = M.GuiListViewProperty.LIST_ITEMS_SPACING ----@type raylib.GuiListViewProperty -M.SCROLLBAR_WIDTH = M.GuiListViewProperty.SCROLLBAR_WIDTH ----@type raylib.GuiListViewProperty -M.SCROLLBAR_SIDE = M.GuiListViewProperty.SCROLLBAR_SIDE ----@type raylib.GuiListViewProperty -M.LIST_ITEMS_BORDER_NORMAL = M.GuiListViewProperty.LIST_ITEMS_BORDER_NORMAL ----@type raylib.GuiListViewProperty -M.LIST_ITEMS_BORDER_WIDTH = M.GuiListViewProperty.LIST_ITEMS_BORDER_WIDTH ----@type raylib.GuiColorPickerProperty -M.COLOR_SELECTOR_SIZE = M.GuiColorPickerProperty.COLOR_SELECTOR_SIZE ----@type raylib.GuiColorPickerProperty -M.HUEBAR_WIDTH = M.GuiColorPickerProperty.HUEBAR_WIDTH ----@type raylib.GuiColorPickerProperty -M.HUEBAR_PADDING = M.GuiColorPickerProperty.HUEBAR_PADDING ----@type raylib.GuiColorPickerProperty -M.HUEBAR_SELECTOR_HEIGHT = M.GuiColorPickerProperty.HUEBAR_SELECTOR_HEIGHT ----@type raylib.GuiColorPickerProperty -M.HUEBAR_SELECTOR_OVERFLOW = M.GuiColorPickerProperty.HUEBAR_SELECTOR_OVERFLOW ----@type raylib.GuiIconName -M.ICON_NONE = M.GuiIconName.ICON_NONE ----@type raylib.GuiIconName -M.ICON_FOLDER_FILE_OPEN = M.GuiIconName.ICON_FOLDER_FILE_OPEN ----@type raylib.GuiIconName -M.ICON_FILE_SAVE_CLASSIC = M.GuiIconName.ICON_FILE_SAVE_CLASSIC ----@type raylib.GuiIconName -M.ICON_FOLDER_OPEN = M.GuiIconName.ICON_FOLDER_OPEN ----@type raylib.GuiIconName -M.ICON_FOLDER_SAVE = M.GuiIconName.ICON_FOLDER_SAVE ----@type raylib.GuiIconName -M.ICON_FILE_OPEN = M.GuiIconName.ICON_FILE_OPEN ----@type raylib.GuiIconName -M.ICON_FILE_SAVE = M.GuiIconName.ICON_FILE_SAVE ----@type raylib.GuiIconName -M.ICON_FILE_EXPORT = M.GuiIconName.ICON_FILE_EXPORT ----@type raylib.GuiIconName -M.ICON_FILE_ADD = M.GuiIconName.ICON_FILE_ADD ----@type raylib.GuiIconName -M.ICON_FILE_DELETE = M.GuiIconName.ICON_FILE_DELETE ----@type raylib.GuiIconName -M.ICON_FILETYPE_TEXT = M.GuiIconName.ICON_FILETYPE_TEXT ----@type raylib.GuiIconName -M.ICON_FILETYPE_AUDIO = M.GuiIconName.ICON_FILETYPE_AUDIO ----@type raylib.GuiIconName -M.ICON_FILETYPE_IMAGE = M.GuiIconName.ICON_FILETYPE_IMAGE ----@type raylib.GuiIconName -M.ICON_FILETYPE_PLAY = M.GuiIconName.ICON_FILETYPE_PLAY ----@type raylib.GuiIconName -M.ICON_FILETYPE_VIDEO = M.GuiIconName.ICON_FILETYPE_VIDEO ----@type raylib.GuiIconName -M.ICON_FILETYPE_INFO = M.GuiIconName.ICON_FILETYPE_INFO ----@type raylib.GuiIconName -M.ICON_FILE_COPY = M.GuiIconName.ICON_FILE_COPY ----@type raylib.GuiIconName -M.ICON_FILE_CUT = M.GuiIconName.ICON_FILE_CUT ----@type raylib.GuiIconName -M.ICON_FILE_PASTE = M.GuiIconName.ICON_FILE_PASTE ----@type raylib.GuiIconName -M.ICON_CURSOR_HAND = M.GuiIconName.ICON_CURSOR_HAND ----@type raylib.GuiIconName -M.ICON_CURSOR_POINTER = M.GuiIconName.ICON_CURSOR_POINTER ----@type raylib.GuiIconName -M.ICON_CURSOR_CLASSIC = M.GuiIconName.ICON_CURSOR_CLASSIC ----@type raylib.GuiIconName -M.ICON_PENCIL = M.GuiIconName.ICON_PENCIL ----@type raylib.GuiIconName -M.ICON_PENCIL_BIG = M.GuiIconName.ICON_PENCIL_BIG ----@type raylib.GuiIconName -M.ICON_BRUSH_CLASSIC = M.GuiIconName.ICON_BRUSH_CLASSIC ----@type raylib.GuiIconName -M.ICON_BRUSH_PAINTER = M.GuiIconName.ICON_BRUSH_PAINTER ----@type raylib.GuiIconName -M.ICON_WATER_DROP = M.GuiIconName.ICON_WATER_DROP ----@type raylib.GuiIconName -M.ICON_COLOR_PICKER = M.GuiIconName.ICON_COLOR_PICKER ----@type raylib.GuiIconName -M.ICON_RUBBER = M.GuiIconName.ICON_RUBBER ----@type raylib.GuiIconName -M.ICON_COLOR_BUCKET = M.GuiIconName.ICON_COLOR_BUCKET ----@type raylib.GuiIconName -M.ICON_TEXT_T = M.GuiIconName.ICON_TEXT_T ----@type raylib.GuiIconName -M.ICON_TEXT_A = M.GuiIconName.ICON_TEXT_A ----@type raylib.GuiIconName -M.ICON_SCALE = M.GuiIconName.ICON_SCALE ----@type raylib.GuiIconName -M.ICON_RESIZE = M.GuiIconName.ICON_RESIZE ----@type raylib.GuiIconName -M.ICON_FILTER_POINT = M.GuiIconName.ICON_FILTER_POINT ----@type raylib.GuiIconName -M.ICON_FILTER_BILINEAR = M.GuiIconName.ICON_FILTER_BILINEAR ----@type raylib.GuiIconName -M.ICON_CROP = M.GuiIconName.ICON_CROP ----@type raylib.GuiIconName -M.ICON_CROP_ALPHA = M.GuiIconName.ICON_CROP_ALPHA ----@type raylib.GuiIconName -M.ICON_SQUARE_TOGGLE = M.GuiIconName.ICON_SQUARE_TOGGLE ----@type raylib.GuiIconName -M.ICON_SYMMETRY = M.GuiIconName.ICON_SYMMETRY ----@type raylib.GuiIconName -M.ICON_SYMMETRY_HORIZONTAL = M.GuiIconName.ICON_SYMMETRY_HORIZONTAL ----@type raylib.GuiIconName -M.ICON_SYMMETRY_VERTICAL = M.GuiIconName.ICON_SYMMETRY_VERTICAL ----@type raylib.GuiIconName -M.ICON_LENS = M.GuiIconName.ICON_LENS ----@type raylib.GuiIconName -M.ICON_LENS_BIG = M.GuiIconName.ICON_LENS_BIG ----@type raylib.GuiIconName -M.ICON_EYE_ON = M.GuiIconName.ICON_EYE_ON ----@type raylib.GuiIconName -M.ICON_EYE_OFF = M.GuiIconName.ICON_EYE_OFF ----@type raylib.GuiIconName -M.ICON_FILTER_TOP = M.GuiIconName.ICON_FILTER_TOP ----@type raylib.GuiIconName -M.ICON_FILTER = M.GuiIconName.ICON_FILTER ----@type raylib.GuiIconName -M.ICON_TARGET_POINT = M.GuiIconName.ICON_TARGET_POINT ----@type raylib.GuiIconName -M.ICON_TARGET_SMALL = M.GuiIconName.ICON_TARGET_SMALL ----@type raylib.GuiIconName -M.ICON_TARGET_BIG = M.GuiIconName.ICON_TARGET_BIG ----@type raylib.GuiIconName -M.ICON_TARGET_MOVE = M.GuiIconName.ICON_TARGET_MOVE ----@type raylib.GuiIconName -M.ICON_CURSOR_MOVE = M.GuiIconName.ICON_CURSOR_MOVE ----@type raylib.GuiIconName -M.ICON_CURSOR_SCALE = M.GuiIconName.ICON_CURSOR_SCALE ----@type raylib.GuiIconName -M.ICON_CURSOR_SCALE_RIGHT = M.GuiIconName.ICON_CURSOR_SCALE_RIGHT ----@type raylib.GuiIconName -M.ICON_CURSOR_SCALE_LEFT = M.GuiIconName.ICON_CURSOR_SCALE_LEFT ----@type raylib.GuiIconName -M.ICON_UNDO = M.GuiIconName.ICON_UNDO ----@type raylib.GuiIconName -M.ICON_REDO = M.GuiIconName.ICON_REDO ----@type raylib.GuiIconName -M.ICON_REREDO = M.GuiIconName.ICON_REREDO ----@type raylib.GuiIconName -M.ICON_MUTATE = M.GuiIconName.ICON_MUTATE ----@type raylib.GuiIconName -M.ICON_ROTATE = M.GuiIconName.ICON_ROTATE ----@type raylib.GuiIconName -M.ICON_REPEAT = M.GuiIconName.ICON_REPEAT ----@type raylib.GuiIconName -M.ICON_SHUFFLE = M.GuiIconName.ICON_SHUFFLE ----@type raylib.GuiIconName -M.ICON_EMPTYBOX = M.GuiIconName.ICON_EMPTYBOX ----@type raylib.GuiIconName -M.ICON_TARGET = M.GuiIconName.ICON_TARGET ----@type raylib.GuiIconName -M.ICON_TARGET_SMALL_FILL = M.GuiIconName.ICON_TARGET_SMALL_FILL ----@type raylib.GuiIconName -M.ICON_TARGET_BIG_FILL = M.GuiIconName.ICON_TARGET_BIG_FILL ----@type raylib.GuiIconName -M.ICON_TARGET_MOVE_FILL = M.GuiIconName.ICON_TARGET_MOVE_FILL ----@type raylib.GuiIconName -M.ICON_CURSOR_MOVE_FILL = M.GuiIconName.ICON_CURSOR_MOVE_FILL ----@type raylib.GuiIconName -M.ICON_CURSOR_SCALE_FILL = M.GuiIconName.ICON_CURSOR_SCALE_FILL ----@type raylib.GuiIconName -M.ICON_CURSOR_SCALE_RIGHT_FILL = M.GuiIconName.ICON_CURSOR_SCALE_RIGHT_FILL ----@type raylib.GuiIconName -M.ICON_CURSOR_SCALE_LEFT_FILL = M.GuiIconName.ICON_CURSOR_SCALE_LEFT_FILL ----@type raylib.GuiIconName -M.ICON_UNDO_FILL = M.GuiIconName.ICON_UNDO_FILL ----@type raylib.GuiIconName -M.ICON_REDO_FILL = M.GuiIconName.ICON_REDO_FILL ----@type raylib.GuiIconName -M.ICON_REREDO_FILL = M.GuiIconName.ICON_REREDO_FILL ----@type raylib.GuiIconName -M.ICON_MUTATE_FILL = M.GuiIconName.ICON_MUTATE_FILL ----@type raylib.GuiIconName -M.ICON_ROTATE_FILL = M.GuiIconName.ICON_ROTATE_FILL ----@type raylib.GuiIconName -M.ICON_REPEAT_FILL = M.GuiIconName.ICON_REPEAT_FILL ----@type raylib.GuiIconName -M.ICON_SHUFFLE_FILL = M.GuiIconName.ICON_SHUFFLE_FILL ----@type raylib.GuiIconName -M.ICON_EMPTYBOX_SMALL = M.GuiIconName.ICON_EMPTYBOX_SMALL ----@type raylib.GuiIconName -M.ICON_BOX = M.GuiIconName.ICON_BOX ----@type raylib.GuiIconName -M.ICON_BOX_TOP = M.GuiIconName.ICON_BOX_TOP ----@type raylib.GuiIconName -M.ICON_BOX_TOP_RIGHT = M.GuiIconName.ICON_BOX_TOP_RIGHT ----@type raylib.GuiIconName -M.ICON_BOX_RIGHT = M.GuiIconName.ICON_BOX_RIGHT ----@type raylib.GuiIconName -M.ICON_BOX_BOTTOM_RIGHT = M.GuiIconName.ICON_BOX_BOTTOM_RIGHT ----@type raylib.GuiIconName -M.ICON_BOX_BOTTOM = M.GuiIconName.ICON_BOX_BOTTOM ----@type raylib.GuiIconName -M.ICON_BOX_BOTTOM_LEFT = M.GuiIconName.ICON_BOX_BOTTOM_LEFT ----@type raylib.GuiIconName -M.ICON_BOX_LEFT = M.GuiIconName.ICON_BOX_LEFT ----@type raylib.GuiIconName -M.ICON_BOX_TOP_LEFT = M.GuiIconName.ICON_BOX_TOP_LEFT ----@type raylib.GuiIconName -M.ICON_BOX_CENTER = M.GuiIconName.ICON_BOX_CENTER ----@type raylib.GuiIconName -M.ICON_BOX_CIRCLE_MASK = M.GuiIconName.ICON_BOX_CIRCLE_MASK ----@type raylib.GuiIconName -M.ICON_POT = M.GuiIconName.ICON_POT ----@type raylib.GuiIconName -M.ICON_ALPHA_MULTIPLY = M.GuiIconName.ICON_ALPHA_MULTIPLY ----@type raylib.GuiIconName -M.ICON_ALPHA_CLEAR = M.GuiIconName.ICON_ALPHA_CLEAR ----@type raylib.GuiIconName -M.ICON_DITHERING = M.GuiIconName.ICON_DITHERING ----@type raylib.GuiIconName -M.ICON_MIPMAPS = M.GuiIconName.ICON_MIPMAPS ----@type raylib.GuiIconName -M.ICON_BOX_GRID = M.GuiIconName.ICON_BOX_GRID ----@type raylib.GuiIconName -M.ICON_GRID = M.GuiIconName.ICON_GRID ----@type raylib.GuiIconName -M.ICON_BOX_CORNERS_SMALL = M.GuiIconName.ICON_BOX_CORNERS_SMALL ----@type raylib.GuiIconName -M.ICON_BOX_CORNERS_BIG = M.GuiIconName.ICON_BOX_CORNERS_BIG ----@type raylib.GuiIconName -M.ICON_FOUR_BOXES = M.GuiIconName.ICON_FOUR_BOXES ----@type raylib.GuiIconName -M.ICON_GRID_FILL = M.GuiIconName.ICON_GRID_FILL ----@type raylib.GuiIconName -M.ICON_BOX_MULTISIZE = M.GuiIconName.ICON_BOX_MULTISIZE ----@type raylib.GuiIconName -M.ICON_ZOOM_SMALL = M.GuiIconName.ICON_ZOOM_SMALL ----@type raylib.GuiIconName -M.ICON_ZOOM_MEDIUM = M.GuiIconName.ICON_ZOOM_MEDIUM ----@type raylib.GuiIconName -M.ICON_ZOOM_BIG = M.GuiIconName.ICON_ZOOM_BIG ----@type raylib.GuiIconName -M.ICON_ZOOM_ALL = M.GuiIconName.ICON_ZOOM_ALL ----@type raylib.GuiIconName -M.ICON_ZOOM_CENTER = M.GuiIconName.ICON_ZOOM_CENTER ----@type raylib.GuiIconName -M.ICON_BOX_DOTS_SMALL = M.GuiIconName.ICON_BOX_DOTS_SMALL ----@type raylib.GuiIconName -M.ICON_BOX_DOTS_BIG = M.GuiIconName.ICON_BOX_DOTS_BIG ----@type raylib.GuiIconName -M.ICON_BOX_CONCENTRIC = M.GuiIconName.ICON_BOX_CONCENTRIC ----@type raylib.GuiIconName -M.ICON_BOX_GRID_BIG = M.GuiIconName.ICON_BOX_GRID_BIG ----@type raylib.GuiIconName -M.ICON_OK_TICK = M.GuiIconName.ICON_OK_TICK ----@type raylib.GuiIconName -M.ICON_CROSS = M.GuiIconName.ICON_CROSS ----@type raylib.GuiIconName -M.ICON_ARROW_LEFT = M.GuiIconName.ICON_ARROW_LEFT ----@type raylib.GuiIconName -M.ICON_ARROW_RIGHT = M.GuiIconName.ICON_ARROW_RIGHT ----@type raylib.GuiIconName -M.ICON_ARROW_DOWN = M.GuiIconName.ICON_ARROW_DOWN ----@type raylib.GuiIconName -M.ICON_ARROW_UP = M.GuiIconName.ICON_ARROW_UP ----@type raylib.GuiIconName -M.ICON_ARROW_LEFT_FILL = M.GuiIconName.ICON_ARROW_LEFT_FILL ----@type raylib.GuiIconName -M.ICON_ARROW_RIGHT_FILL = M.GuiIconName.ICON_ARROW_RIGHT_FILL ----@type raylib.GuiIconName -M.ICON_ARROW_DOWN_FILL = M.GuiIconName.ICON_ARROW_DOWN_FILL ----@type raylib.GuiIconName -M.ICON_ARROW_UP_FILL = M.GuiIconName.ICON_ARROW_UP_FILL ----@type raylib.GuiIconName -M.ICON_AUDIO = M.GuiIconName.ICON_AUDIO ----@type raylib.GuiIconName -M.ICON_FX = M.GuiIconName.ICON_FX ----@type raylib.GuiIconName -M.ICON_WAVE = M.GuiIconName.ICON_WAVE ----@type raylib.GuiIconName -M.ICON_WAVE_SINUS = M.GuiIconName.ICON_WAVE_SINUS ----@type raylib.GuiIconName -M.ICON_WAVE_SQUARE = M.GuiIconName.ICON_WAVE_SQUARE ----@type raylib.GuiIconName -M.ICON_WAVE_TRIANGULAR = M.GuiIconName.ICON_WAVE_TRIANGULAR ----@type raylib.GuiIconName -M.ICON_CROSS_SMALL = M.GuiIconName.ICON_CROSS_SMALL ----@type raylib.GuiIconName -M.ICON_PLAYER_PREVIOUS = M.GuiIconName.ICON_PLAYER_PREVIOUS ----@type raylib.GuiIconName -M.ICON_PLAYER_PLAY_BACK = M.GuiIconName.ICON_PLAYER_PLAY_BACK ----@type raylib.GuiIconName -M.ICON_PLAYER_PLAY = M.GuiIconName.ICON_PLAYER_PLAY ----@type raylib.GuiIconName -M.ICON_PLAYER_PAUSE = M.GuiIconName.ICON_PLAYER_PAUSE ----@type raylib.GuiIconName -M.ICON_PLAYER_STOP = M.GuiIconName.ICON_PLAYER_STOP ----@type raylib.GuiIconName -M.ICON_PLAYER_NEXT = M.GuiIconName.ICON_PLAYER_NEXT ----@type raylib.GuiIconName -M.ICON_PLAYER_RECORD = M.GuiIconName.ICON_PLAYER_RECORD ----@type raylib.GuiIconName -M.ICON_MAGNET = M.GuiIconName.ICON_MAGNET ----@type raylib.GuiIconName -M.ICON_LOCK_CLOSE = M.GuiIconName.ICON_LOCK_CLOSE ----@type raylib.GuiIconName -M.ICON_LOCK_OPEN = M.GuiIconName.ICON_LOCK_OPEN ----@type raylib.GuiIconName -M.ICON_CLOCK = M.GuiIconName.ICON_CLOCK ----@type raylib.GuiIconName -M.ICON_TOOLS = M.GuiIconName.ICON_TOOLS ----@type raylib.GuiIconName -M.ICON_GEAR = M.GuiIconName.ICON_GEAR ----@type raylib.GuiIconName -M.ICON_GEAR_BIG = M.GuiIconName.ICON_GEAR_BIG ----@type raylib.GuiIconName -M.ICON_BIN = M.GuiIconName.ICON_BIN ----@type raylib.GuiIconName -M.ICON_HAND_POINTER = M.GuiIconName.ICON_HAND_POINTER ----@type raylib.GuiIconName -M.ICON_LASER = M.GuiIconName.ICON_LASER ----@type raylib.GuiIconName -M.ICON_COIN = M.GuiIconName.ICON_COIN ----@type raylib.GuiIconName -M.ICON_EXPLOSION = M.GuiIconName.ICON_EXPLOSION ----@type raylib.GuiIconName -M.ICON_1UP = M.GuiIconName.ICON_1UP ----@type raylib.GuiIconName -M.ICON_PLAYER = M.GuiIconName.ICON_PLAYER ----@type raylib.GuiIconName -M.ICON_PLAYER_JUMP = M.GuiIconName.ICON_PLAYER_JUMP ----@type raylib.GuiIconName -M.ICON_KEY = M.GuiIconName.ICON_KEY ----@type raylib.GuiIconName -M.ICON_DEMON = M.GuiIconName.ICON_DEMON ----@type raylib.GuiIconName -M.ICON_TEXT_POPUP = M.GuiIconName.ICON_TEXT_POPUP ----@type raylib.GuiIconName -M.ICON_GEAR_EX = M.GuiIconName.ICON_GEAR_EX ----@type raylib.GuiIconName -M.ICON_CRACK = M.GuiIconName.ICON_CRACK ----@type raylib.GuiIconName -M.ICON_CRACK_POINTS = M.GuiIconName.ICON_CRACK_POINTS ----@type raylib.GuiIconName -M.ICON_STAR = M.GuiIconName.ICON_STAR ----@type raylib.GuiIconName -M.ICON_DOOR = M.GuiIconName.ICON_DOOR ----@type raylib.GuiIconName -M.ICON_EXIT = M.GuiIconName.ICON_EXIT ----@type raylib.GuiIconName -M.ICON_MODE_2D = M.GuiIconName.ICON_MODE_2D ----@type raylib.GuiIconName -M.ICON_MODE_3D = M.GuiIconName.ICON_MODE_3D ----@type raylib.GuiIconName -M.ICON_CUBE = M.GuiIconName.ICON_CUBE ----@type raylib.GuiIconName -M.ICON_CUBE_FACE_TOP = M.GuiIconName.ICON_CUBE_FACE_TOP ----@type raylib.GuiIconName -M.ICON_CUBE_FACE_LEFT = M.GuiIconName.ICON_CUBE_FACE_LEFT ----@type raylib.GuiIconName -M.ICON_CUBE_FACE_FRONT = M.GuiIconName.ICON_CUBE_FACE_FRONT ----@type raylib.GuiIconName -M.ICON_CUBE_FACE_BOTTOM = M.GuiIconName.ICON_CUBE_FACE_BOTTOM ----@type raylib.GuiIconName -M.ICON_CUBE_FACE_RIGHT = M.GuiIconName.ICON_CUBE_FACE_RIGHT ----@type raylib.GuiIconName -M.ICON_CUBE_FACE_BACK = M.GuiIconName.ICON_CUBE_FACE_BACK ----@type raylib.GuiIconName -M.ICON_CAMERA = M.GuiIconName.ICON_CAMERA ----@type raylib.GuiIconName -M.ICON_SPECIAL = M.GuiIconName.ICON_SPECIAL ----@type raylib.GuiIconName -M.ICON_LINK_NET = M.GuiIconName.ICON_LINK_NET ----@type raylib.GuiIconName -M.ICON_LINK_BOXES = M.GuiIconName.ICON_LINK_BOXES ----@type raylib.GuiIconName -M.ICON_LINK_MULTI = M.GuiIconName.ICON_LINK_MULTI ----@type raylib.GuiIconName -M.ICON_LINK = M.GuiIconName.ICON_LINK ----@type raylib.GuiIconName -M.ICON_LINK_BROKE = M.GuiIconName.ICON_LINK_BROKE ----@type raylib.GuiIconName -M.ICON_TEXT_NOTES = M.GuiIconName.ICON_TEXT_NOTES ----@type raylib.GuiIconName -M.ICON_NOTEBOOK = M.GuiIconName.ICON_NOTEBOOK ----@type raylib.GuiIconName -M.ICON_SUITCASE = M.GuiIconName.ICON_SUITCASE ----@type raylib.GuiIconName -M.ICON_SUITCASE_ZIP = M.GuiIconName.ICON_SUITCASE_ZIP ----@type raylib.GuiIconName -M.ICON_MAILBOX = M.GuiIconName.ICON_MAILBOX ----@type raylib.GuiIconName -M.ICON_MONITOR = M.GuiIconName.ICON_MONITOR ----@type raylib.GuiIconName -M.ICON_PRINTER = M.GuiIconName.ICON_PRINTER ----@type raylib.GuiIconName -M.ICON_PHOTO_CAMERA = M.GuiIconName.ICON_PHOTO_CAMERA ----@type raylib.GuiIconName -M.ICON_PHOTO_CAMERA_FLASH = M.GuiIconName.ICON_PHOTO_CAMERA_FLASH ----@type raylib.GuiIconName -M.ICON_HOUSE = M.GuiIconName.ICON_HOUSE ----@type raylib.GuiIconName -M.ICON_HEART = M.GuiIconName.ICON_HEART ----@type raylib.GuiIconName -M.ICON_CORNER = M.GuiIconName.ICON_CORNER ----@type raylib.GuiIconName -M.ICON_VERTICAL_BARS = M.GuiIconName.ICON_VERTICAL_BARS ----@type raylib.GuiIconName -M.ICON_VERTICAL_BARS_FILL = M.GuiIconName.ICON_VERTICAL_BARS_FILL ----@type raylib.GuiIconName -M.ICON_LIFE_BARS = M.GuiIconName.ICON_LIFE_BARS ----@type raylib.GuiIconName -M.ICON_INFO = M.GuiIconName.ICON_INFO ----@type raylib.GuiIconName -M.ICON_CROSSLINE = M.GuiIconName.ICON_CROSSLINE ----@type raylib.GuiIconName -M.ICON_HELP = M.GuiIconName.ICON_HELP ----@type raylib.GuiIconName -M.ICON_FILETYPE_ALPHA = M.GuiIconName.ICON_FILETYPE_ALPHA ----@type raylib.GuiIconName -M.ICON_FILETYPE_HOME = M.GuiIconName.ICON_FILETYPE_HOME ----@type raylib.GuiIconName -M.ICON_LAYERS_VISIBLE = M.GuiIconName.ICON_LAYERS_VISIBLE ----@type raylib.GuiIconName -M.ICON_LAYERS = M.GuiIconName.ICON_LAYERS ----@type raylib.GuiIconName -M.ICON_WINDOW = M.GuiIconName.ICON_WINDOW ----@type raylib.GuiIconName -M.ICON_HIDPI = M.GuiIconName.ICON_HIDPI ----@type raylib.GuiIconName -M.ICON_FILETYPE_BINARY = M.GuiIconName.ICON_FILETYPE_BINARY ----@type raylib.GuiIconName -M.ICON_HEX = M.GuiIconName.ICON_HEX ----@type raylib.GuiIconName -M.ICON_SHIELD = M.GuiIconName.ICON_SHIELD ----@type raylib.GuiIconName -M.ICON_FILE_NEW = M.GuiIconName.ICON_FILE_NEW ----@type raylib.GuiIconName -M.ICON_FOLDER_ADD = M.GuiIconName.ICON_FOLDER_ADD ----@type raylib.GuiIconName -M.ICON_ALARM = M.GuiIconName.ICON_ALARM ----@type raylib.GuiIconName -M.ICON_CPU = M.GuiIconName.ICON_CPU ----@type raylib.GuiIconName -M.ICON_ROM = M.GuiIconName.ICON_ROM ----@type raylib.GuiIconName -M.ICON_STEP_OVER = M.GuiIconName.ICON_STEP_OVER ----@type raylib.GuiIconName -M.ICON_STEP_INTO = M.GuiIconName.ICON_STEP_INTO ----@type raylib.GuiIconName -M.ICON_STEP_OUT = M.GuiIconName.ICON_STEP_OUT ----@type raylib.GuiIconName -M.ICON_RESTART = M.GuiIconName.ICON_RESTART ----@type raylib.GuiIconName -M.ICON_BREAKPOINT_ON = M.GuiIconName.ICON_BREAKPOINT_ON ----@type raylib.GuiIconName -M.ICON_BREAKPOINT_OFF = M.GuiIconName.ICON_BREAKPOINT_OFF ----@type raylib.GuiIconName -M.ICON_BURGER_MENU = M.GuiIconName.ICON_BURGER_MENU ----@type raylib.GuiIconName -M.ICON_CASE_SENSITIVE = M.GuiIconName.ICON_CASE_SENSITIVE ----@type raylib.GuiIconName -M.ICON_REG_EXP = M.GuiIconName.ICON_REG_EXP ----@type raylib.GuiIconName -M.ICON_FOLDER = M.GuiIconName.ICON_FOLDER ----@type raylib.GuiIconName -M.ICON_FILE = M.GuiIconName.ICON_FILE ----@type raylib.GuiIconName -M.ICON_SAND_TIMER = M.GuiIconName.ICON_SAND_TIMER ----@type raylib.GuiIconName -M.ICON_WARNING = M.GuiIconName.ICON_WARNING ----@type raylib.GuiIconName -M.ICON_HELP_BOX = M.GuiIconName.ICON_HELP_BOX ----@type raylib.GuiIconName -M.ICON_INFO_BOX = M.GuiIconName.ICON_INFO_BOX ----@type raylib.GuiIconName -M.ICON_PRIORITY = M.GuiIconName.ICON_PRIORITY ----@type raylib.GuiIconName -M.ICON_LAYERS_ISO = M.GuiIconName.ICON_LAYERS_ISO ----@type raylib.GuiIconName -M.ICON_LAYERS2 = M.GuiIconName.ICON_LAYERS2 ----@type raylib.GuiIconName -M.ICON_MLAYERS = M.GuiIconName.ICON_MLAYERS ----@type raylib.GuiIconName -M.ICON_MAPS = M.GuiIconName.ICON_MAPS ----@type raylib.GuiIconName -M.ICON_HOT = M.GuiIconName.ICON_HOT ----@type raylib.GuiIconName -M.ICON_LABEL = M.GuiIconName.ICON_LABEL ----@type raylib.GuiIconName -M.ICON_NAME_ID = M.GuiIconName.ICON_NAME_ID ----@type raylib.GuiIconName -M.ICON_SLICING = M.GuiIconName.ICON_SLICING ----@type raylib.GuiIconName -M.ICON_MANUAL_CONTROL = M.GuiIconName.ICON_MANUAL_CONTROL ----@type raylib.GuiIconName -M.ICON_COLLISION = M.GuiIconName.ICON_COLLISION ----@type raylib.GuiIconName -M.ICON_CIRCLE_ADD = M.GuiIconName.ICON_CIRCLE_ADD ----@type raylib.GuiIconName -M.ICON_CIRCLE_ADD_FILL = M.GuiIconName.ICON_CIRCLE_ADD_FILL ----@type raylib.GuiIconName -M.ICON_CIRCLE_WARNING = M.GuiIconName.ICON_CIRCLE_WARNING ----@type raylib.GuiIconName -M.ICON_CIRCLE_WARNING_FILL = M.GuiIconName.ICON_CIRCLE_WARNING_FILL ----@type raylib.GuiIconName -M.ICON_BOX_MORE = M.GuiIconName.ICON_BOX_MORE ----@type raylib.GuiIconName -M.ICON_BOX_MORE_FILL = M.GuiIconName.ICON_BOX_MORE_FILL ----@type raylib.GuiIconName -M.ICON_BOX_MINUS = M.GuiIconName.ICON_BOX_MINUS ----@type raylib.GuiIconName -M.ICON_BOX_MINUS_FILL = M.GuiIconName.ICON_BOX_MINUS_FILL ----@type raylib.GuiIconName -M.ICON_UNION = M.GuiIconName.ICON_UNION ----@type raylib.GuiIconName -M.ICON_INTERSECTION = M.GuiIconName.ICON_INTERSECTION ----@type raylib.GuiIconName -M.ICON_DIFFERENCE = M.GuiIconName.ICON_DIFFERENCE ----@type raylib.GuiIconName -M.ICON_SPHERE = M.GuiIconName.ICON_SPHERE ----@type raylib.GuiIconName -M.ICON_CYLINDER = M.GuiIconName.ICON_CYLINDER ----@type raylib.GuiIconName -M.ICON_CONE = M.GuiIconName.ICON_CONE ----@type raylib.GuiIconName -M.ICON_ELLIPSOID = M.GuiIconName.ICON_ELLIPSOID ----@type raylib.GuiIconName -M.ICON_CAPSULE = M.GuiIconName.ICON_CAPSULE ----@type raylib.GuiIconName -M.ICON_FILETYPE_FONT = M.GuiIconName.ICON_FILETYPE_FONT ----@type raylib.GuiIconName -M.ICON_FILETYPE_3D = M.GuiIconName.ICON_FILETYPE_3D ----@type raylib.GuiIconName -M.ICON_FILETYPE_CODE_XML = M.GuiIconName.ICON_FILETYPE_CODE_XML ----@type raylib.GuiIconName -M.ICON_FILETYPE_CODE_C = M.GuiIconName.ICON_FILETYPE_CODE_C ----@type raylib.GuiIconName -M.ICON_FILETYPE_CODE_PYTHON = M.GuiIconName.ICON_FILETYPE_CODE_PYTHON ----@type raylib.GuiIconName -M.ICON_FILETYPE_CODE_JS = M.GuiIconName.ICON_FILETYPE_CODE_JS ----@type raylib.GuiIconName -M.ICON_FILETYPE_ICON = M.GuiIconName.ICON_FILETYPE_ICON +--- +---@alias GuiIconName +---| `ICON_NONE` # +---| `ICON_FOLDER_FILE_OPEN` # +---| `ICON_FILE_SAVE_CLASSIC` # +---| `ICON_FOLDER_OPEN` # +---| `ICON_FOLDER_SAVE` # +---| `ICON_FILE_OPEN` # +---| `ICON_FILE_SAVE` # +---| `ICON_FILE_EXPORT` # +---| `ICON_FILE_ADD` # +---| `ICON_FILE_DELETE` # +---| `ICON_FILETYPE_TEXT` # +---| `ICON_FILETYPE_AUDIO` # +---| `ICON_FILETYPE_IMAGE` # +---| `ICON_FILETYPE_PLAY` # +---| `ICON_FILETYPE_VIDEO` # +---| `ICON_FILETYPE_INFO` # +---| `ICON_FILE_COPY` # +---| `ICON_FILE_CUT` # +---| `ICON_FILE_PASTE` # +---| `ICON_CURSOR_HAND` # +---| `ICON_CURSOR_POINTER` # +---| `ICON_CURSOR_CLASSIC` # +---| `ICON_PENCIL` # +---| `ICON_PENCIL_BIG` # +---| `ICON_BRUSH_CLASSIC` # +---| `ICON_BRUSH_PAINTER` # +---| `ICON_WATER_DROP` # +---| `ICON_COLOR_PICKER` # +---| `ICON_RUBBER` # +---| `ICON_COLOR_BUCKET` # +---| `ICON_TEXT_T` # +---| `ICON_TEXT_A` # +---| `ICON_SCALE` # +---| `ICON_RESIZE` # +---| `ICON_FILTER_POINT` # +---| `ICON_FILTER_BILINEAR` # +---| `ICON_CROP` # +---| `ICON_CROP_ALPHA` # +---| `ICON_SQUARE_TOGGLE` # +---| `ICON_SYMMETRY` # +---| `ICON_SYMMETRY_HORIZONTAL` # +---| `ICON_SYMMETRY_VERTICAL` # +---| `ICON_LENS` # +---| `ICON_LENS_BIG` # +---| `ICON_EYE_ON` # +---| `ICON_EYE_OFF` # +---| `ICON_FILTER_TOP` # +---| `ICON_FILTER` # +---| `ICON_TARGET_POINT` # +---| `ICON_TARGET_SMALL` # +---| `ICON_TARGET_BIG` # +---| `ICON_TARGET_MOVE` # +---| `ICON_CURSOR_MOVE` # +---| `ICON_CURSOR_SCALE` # +---| `ICON_CURSOR_SCALE_RIGHT` # +---| `ICON_CURSOR_SCALE_LEFT` # +---| `ICON_UNDO` # +---| `ICON_REDO` # +---| `ICON_REREDO` # +---| `ICON_MUTATE` # +---| `ICON_ROTATE` # +---| `ICON_REPEAT` # +---| `ICON_SHUFFLE` # +---| `ICON_EMPTYBOX` # +---| `ICON_TARGET` # +---| `ICON_TARGET_SMALL_FILL` # +---| `ICON_TARGET_BIG_FILL` # +---| `ICON_TARGET_MOVE_FILL` # +---| `ICON_CURSOR_MOVE_FILL` # +---| `ICON_CURSOR_SCALE_FILL` # +---| `ICON_CURSOR_SCALE_RIGHT_FILL` # +---| `ICON_CURSOR_SCALE_LEFT_FILL` # +---| `ICON_UNDO_FILL` # +---| `ICON_REDO_FILL` # +---| `ICON_REREDO_FILL` # +---| `ICON_MUTATE_FILL` # +---| `ICON_ROTATE_FILL` # +---| `ICON_REPEAT_FILL` # +---| `ICON_SHUFFLE_FILL` # +---| `ICON_EMPTYBOX_SMALL` # +---| `ICON_BOX` # +---| `ICON_BOX_TOP` # +---| `ICON_BOX_TOP_RIGHT` # +---| `ICON_BOX_RIGHT` # +---| `ICON_BOX_BOTTOM_RIGHT` # +---| `ICON_BOX_BOTTOM` # +---| `ICON_BOX_BOTTOM_LEFT` # +---| `ICON_BOX_LEFT` # +---| `ICON_BOX_TOP_LEFT` # +---| `ICON_BOX_CENTER` # +---| `ICON_BOX_CIRCLE_MASK` # +---| `ICON_POT` # +---| `ICON_ALPHA_MULTIPLY` # +---| `ICON_ALPHA_CLEAR` # +---| `ICON_DITHERING` # +---| `ICON_MIPMAPS` # +---| `ICON_BOX_GRID` # +---| `ICON_GRID` # +---| `ICON_BOX_CORNERS_SMALL` # +---| `ICON_BOX_CORNERS_BIG` # +---| `ICON_FOUR_BOXES` # +---| `ICON_GRID_FILL` # +---| `ICON_BOX_MULTISIZE` # +---| `ICON_ZOOM_SMALL` # +---| `ICON_ZOOM_MEDIUM` # +---| `ICON_ZOOM_BIG` # +---| `ICON_ZOOM_ALL` # +---| `ICON_ZOOM_CENTER` # +---| `ICON_BOX_DOTS_SMALL` # +---| `ICON_BOX_DOTS_BIG` # +---| `ICON_BOX_CONCENTRIC` # +---| `ICON_BOX_GRID_BIG` # +---| `ICON_OK_TICK` # +---| `ICON_CROSS` # +---| `ICON_ARROW_LEFT` # +---| `ICON_ARROW_RIGHT` # +---| `ICON_ARROW_DOWN` # +---| `ICON_ARROW_UP` # +---| `ICON_ARROW_LEFT_FILL` # +---| `ICON_ARROW_RIGHT_FILL` # +---| `ICON_ARROW_DOWN_FILL` # +---| `ICON_ARROW_UP_FILL` # +---| `ICON_AUDIO` # +---| `ICON_FX` # +---| `ICON_WAVE` # +---| `ICON_WAVE_SINUS` # +---| `ICON_WAVE_SQUARE` # +---| `ICON_WAVE_TRIANGULAR` # +---| `ICON_CROSS_SMALL` # +---| `ICON_PLAYER_PREVIOUS` # +---| `ICON_PLAYER_PLAY_BACK` # +---| `ICON_PLAYER_PLAY` # +---| `ICON_PLAYER_PAUSE` # +---| `ICON_PLAYER_STOP` # +---| `ICON_PLAYER_NEXT` # +---| `ICON_PLAYER_RECORD` # +---| `ICON_MAGNET` # +---| `ICON_LOCK_CLOSE` # +---| `ICON_LOCK_OPEN` # +---| `ICON_CLOCK` # +---| `ICON_TOOLS` # +---| `ICON_GEAR` # +---| `ICON_GEAR_BIG` # +---| `ICON_BIN` # +---| `ICON_HAND_POINTER` # +---| `ICON_LASER` # +---| `ICON_COIN` # +---| `ICON_EXPLOSION` # +---| `ICON_1UP` # +---| `ICON_PLAYER` # +---| `ICON_PLAYER_JUMP` # +---| `ICON_KEY` # +---| `ICON_DEMON` # +---| `ICON_TEXT_POPUP` # +---| `ICON_GEAR_EX` # +---| `ICON_CRACK` # +---| `ICON_CRACK_POINTS` # +---| `ICON_STAR` # +---| `ICON_DOOR` # +---| `ICON_EXIT` # +---| `ICON_MODE_2D` # +---| `ICON_MODE_3D` # +---| `ICON_CUBE` # +---| `ICON_CUBE_FACE_TOP` # +---| `ICON_CUBE_FACE_LEFT` # +---| `ICON_CUBE_FACE_FRONT` # +---| `ICON_CUBE_FACE_BOTTOM` # +---| `ICON_CUBE_FACE_RIGHT` # +---| `ICON_CUBE_FACE_BACK` # +---| `ICON_CAMERA` # +---| `ICON_SPECIAL` # +---| `ICON_LINK_NET` # +---| `ICON_LINK_BOXES` # +---| `ICON_LINK_MULTI` # +---| `ICON_LINK` # +---| `ICON_LINK_BROKE` # +---| `ICON_TEXT_NOTES` # +---| `ICON_NOTEBOOK` # +---| `ICON_SUITCASE` # +---| `ICON_SUITCASE_ZIP` # +---| `ICON_MAILBOX` # +---| `ICON_MONITOR` # +---| `ICON_PRINTER` # +---| `ICON_PHOTO_CAMERA` # +---| `ICON_PHOTO_CAMERA_FLASH` # +---| `ICON_HOUSE` # +---| `ICON_HEART` # +---| `ICON_CORNER` # +---| `ICON_VERTICAL_BARS` # +---| `ICON_VERTICAL_BARS_FILL` # +---| `ICON_LIFE_BARS` # +---| `ICON_INFO` # +---| `ICON_CROSSLINE` # +---| `ICON_HELP` # +---| `ICON_FILETYPE_ALPHA` # +---| `ICON_FILETYPE_HOME` # +---| `ICON_LAYERS_VISIBLE` # +---| `ICON_LAYERS` # +---| `ICON_WINDOW` # +---| `ICON_HIDPI` # +---| `ICON_FILETYPE_BINARY` # +---| `ICON_HEX` # +---| `ICON_SHIELD` # +---| `ICON_FILE_NEW` # +---| `ICON_FOLDER_ADD` # +---| `ICON_ALARM` # +---| `ICON_CPU` # +---| `ICON_ROM` # +---| `ICON_STEP_OVER` # +---| `ICON_STEP_INTO` # +---| `ICON_STEP_OUT` # +---| `ICON_RESTART` # +---| `ICON_BREAKPOINT_ON` # +---| `ICON_BREAKPOINT_OFF` # +---| `ICON_BURGER_MENU` # +---| `ICON_CASE_SENSITIVE` # +---| `ICON_REG_EXP` # +---| `ICON_FOLDER` # +---| `ICON_FILE` # +---| `ICON_SAND_TIMER` # +---| `ICON_WARNING` # +---| `ICON_HELP_BOX` # +---| `ICON_INFO_BOX` # +---| `ICON_PRIORITY` # +---| `ICON_LAYERS_ISO` # +---| `ICON_LAYERS2` # +---| `ICON_MLAYERS` # +---| `ICON_MAPS` # +---| `ICON_HOT` # +---| `ICON_LABEL` # +---| `ICON_NAME_ID` # +---| `ICON_SLICING` # +---| `ICON_MANUAL_CONTROL` # +---| `ICON_COLLISION` # +---| `ICON_CIRCLE_ADD` # +---| `ICON_CIRCLE_ADD_FILL` # +---| `ICON_CIRCLE_WARNING` # +---| `ICON_CIRCLE_WARNING_FILL` # +---| `ICON_BOX_MORE` # +---| `ICON_BOX_MORE_FILL` # +---| `ICON_BOX_MINUS` # +---| `ICON_BOX_MINUS_FILL` # +---| `ICON_UNION` # +---| `ICON_INTERSECTION` # +---| `ICON_DIFFERENCE` # +---| `ICON_SPHERE` # +---| `ICON_CYLINDER` # +---| `ICON_CONE` # +---| `ICON_ELLIPSOID` # +---| `ICON_CAPSULE` # +---| `ICON_FILETYPE_FONT` # +---| `ICON_FILETYPE_3D` # +---| `ICON_FILETYPE_CODE_XML` # +---| `ICON_FILETYPE_CODE_C` # +---| `ICON_FILETYPE_CODE_PYTHON` # +---| `ICON_FILETYPE_CODE_JS` # +---| `ICON_FILETYPE_ICON` # +ICON_NONE = 0 +ICON_FOLDER_FILE_OPEN = 1 +ICON_FILE_SAVE_CLASSIC = 2 +ICON_FOLDER_OPEN = 3 +ICON_FOLDER_SAVE = 4 +ICON_FILE_OPEN = 5 +ICON_FILE_SAVE = 6 +ICON_FILE_EXPORT = 7 +ICON_FILE_ADD = 8 +ICON_FILE_DELETE = 9 +ICON_FILETYPE_TEXT = 10 +ICON_FILETYPE_AUDIO = 11 +ICON_FILETYPE_IMAGE = 12 +ICON_FILETYPE_PLAY = 13 +ICON_FILETYPE_VIDEO = 14 +ICON_FILETYPE_INFO = 15 +ICON_FILE_COPY = 16 +ICON_FILE_CUT = 17 +ICON_FILE_PASTE = 18 +ICON_CURSOR_HAND = 19 +ICON_CURSOR_POINTER = 20 +ICON_CURSOR_CLASSIC = 21 +ICON_PENCIL = 22 +ICON_PENCIL_BIG = 23 +ICON_BRUSH_CLASSIC = 24 +ICON_BRUSH_PAINTER = 25 +ICON_WATER_DROP = 26 +ICON_COLOR_PICKER = 27 +ICON_RUBBER = 28 +ICON_COLOR_BUCKET = 29 +ICON_TEXT_T = 30 +ICON_TEXT_A = 31 +ICON_SCALE = 32 +ICON_RESIZE = 33 +ICON_FILTER_POINT = 34 +ICON_FILTER_BILINEAR = 35 +ICON_CROP = 36 +ICON_CROP_ALPHA = 37 +ICON_SQUARE_TOGGLE = 38 +ICON_SYMMETRY = 39 +ICON_SYMMETRY_HORIZONTAL = 40 +ICON_SYMMETRY_VERTICAL = 41 +ICON_LENS = 42 +ICON_LENS_BIG = 43 +ICON_EYE_ON = 44 +ICON_EYE_OFF = 45 +ICON_FILTER_TOP = 46 +ICON_FILTER = 47 +ICON_TARGET_POINT = 48 +ICON_TARGET_SMALL = 49 +ICON_TARGET_BIG = 50 +ICON_TARGET_MOVE = 51 +ICON_CURSOR_MOVE = 52 +ICON_CURSOR_SCALE = 53 +ICON_CURSOR_SCALE_RIGHT = 54 +ICON_CURSOR_SCALE_LEFT = 55 +ICON_UNDO = 56 +ICON_REDO = 57 +ICON_REREDO = 58 +ICON_MUTATE = 59 +ICON_ROTATE = 60 +ICON_REPEAT = 61 +ICON_SHUFFLE = 62 +ICON_EMPTYBOX = 63 +ICON_TARGET = 64 +ICON_TARGET_SMALL_FILL = 65 +ICON_TARGET_BIG_FILL = 66 +ICON_TARGET_MOVE_FILL = 67 +ICON_CURSOR_MOVE_FILL = 68 +ICON_CURSOR_SCALE_FILL = 69 +ICON_CURSOR_SCALE_RIGHT_FILL = 70 +ICON_CURSOR_SCALE_LEFT_FILL = 71 +ICON_UNDO_FILL = 72 +ICON_REDO_FILL = 73 +ICON_REREDO_FILL = 74 +ICON_MUTATE_FILL = 75 +ICON_ROTATE_FILL = 76 +ICON_REPEAT_FILL = 77 +ICON_SHUFFLE_FILL = 78 +ICON_EMPTYBOX_SMALL = 79 +ICON_BOX = 80 +ICON_BOX_TOP = 81 +ICON_BOX_TOP_RIGHT = 82 +ICON_BOX_RIGHT = 83 +ICON_BOX_BOTTOM_RIGHT = 84 +ICON_BOX_BOTTOM = 85 +ICON_BOX_BOTTOM_LEFT = 86 +ICON_BOX_LEFT = 87 +ICON_BOX_TOP_LEFT = 88 +ICON_BOX_CENTER = 89 +ICON_BOX_CIRCLE_MASK = 90 +ICON_POT = 91 +ICON_ALPHA_MULTIPLY = 92 +ICON_ALPHA_CLEAR = 93 +ICON_DITHERING = 94 +ICON_MIPMAPS = 95 +ICON_BOX_GRID = 96 +ICON_GRID = 97 +ICON_BOX_CORNERS_SMALL = 98 +ICON_BOX_CORNERS_BIG = 99 +ICON_FOUR_BOXES = 100 +ICON_GRID_FILL = 101 +ICON_BOX_MULTISIZE = 102 +ICON_ZOOM_SMALL = 103 +ICON_ZOOM_MEDIUM = 104 +ICON_ZOOM_BIG = 105 +ICON_ZOOM_ALL = 106 +ICON_ZOOM_CENTER = 107 +ICON_BOX_DOTS_SMALL = 108 +ICON_BOX_DOTS_BIG = 109 +ICON_BOX_CONCENTRIC = 110 +ICON_BOX_GRID_BIG = 111 +ICON_OK_TICK = 112 +ICON_CROSS = 113 +ICON_ARROW_LEFT = 114 +ICON_ARROW_RIGHT = 115 +ICON_ARROW_DOWN = 116 +ICON_ARROW_UP = 117 +ICON_ARROW_LEFT_FILL = 118 +ICON_ARROW_RIGHT_FILL = 119 +ICON_ARROW_DOWN_FILL = 120 +ICON_ARROW_UP_FILL = 121 +ICON_AUDIO = 122 +ICON_FX = 123 +ICON_WAVE = 124 +ICON_WAVE_SINUS = 125 +ICON_WAVE_SQUARE = 126 +ICON_WAVE_TRIANGULAR = 127 +ICON_CROSS_SMALL = 128 +ICON_PLAYER_PREVIOUS = 129 +ICON_PLAYER_PLAY_BACK = 130 +ICON_PLAYER_PLAY = 131 +ICON_PLAYER_PAUSE = 132 +ICON_PLAYER_STOP = 133 +ICON_PLAYER_NEXT = 134 +ICON_PLAYER_RECORD = 135 +ICON_MAGNET = 136 +ICON_LOCK_CLOSE = 137 +ICON_LOCK_OPEN = 138 +ICON_CLOCK = 139 +ICON_TOOLS = 140 +ICON_GEAR = 141 +ICON_GEAR_BIG = 142 +ICON_BIN = 143 +ICON_HAND_POINTER = 144 +ICON_LASER = 145 +ICON_COIN = 146 +ICON_EXPLOSION = 147 +ICON_1UP = 148 +ICON_PLAYER = 149 +ICON_PLAYER_JUMP = 150 +ICON_KEY = 151 +ICON_DEMON = 152 +ICON_TEXT_POPUP = 153 +ICON_GEAR_EX = 154 +ICON_CRACK = 155 +ICON_CRACK_POINTS = 156 +ICON_STAR = 157 +ICON_DOOR = 158 +ICON_EXIT = 159 +ICON_MODE_2D = 160 +ICON_MODE_3D = 161 +ICON_CUBE = 162 +ICON_CUBE_FACE_TOP = 163 +ICON_CUBE_FACE_LEFT = 164 +ICON_CUBE_FACE_FRONT = 165 +ICON_CUBE_FACE_BOTTOM = 166 +ICON_CUBE_FACE_RIGHT = 167 +ICON_CUBE_FACE_BACK = 168 +ICON_CAMERA = 169 +ICON_SPECIAL = 170 +ICON_LINK_NET = 171 +ICON_LINK_BOXES = 172 +ICON_LINK_MULTI = 173 +ICON_LINK = 174 +ICON_LINK_BROKE = 175 +ICON_TEXT_NOTES = 176 +ICON_NOTEBOOK = 177 +ICON_SUITCASE = 178 +ICON_SUITCASE_ZIP = 179 +ICON_MAILBOX = 180 +ICON_MONITOR = 181 +ICON_PRINTER = 182 +ICON_PHOTO_CAMERA = 183 +ICON_PHOTO_CAMERA_FLASH = 184 +ICON_HOUSE = 185 +ICON_HEART = 186 +ICON_CORNER = 187 +ICON_VERTICAL_BARS = 188 +ICON_VERTICAL_BARS_FILL = 189 +ICON_LIFE_BARS = 190 +ICON_INFO = 191 +ICON_CROSSLINE = 192 +ICON_HELP = 193 +ICON_FILETYPE_ALPHA = 194 +ICON_FILETYPE_HOME = 195 +ICON_LAYERS_VISIBLE = 196 +ICON_LAYERS = 197 +ICON_WINDOW = 198 +ICON_HIDPI = 199 +ICON_FILETYPE_BINARY = 200 +ICON_HEX = 201 +ICON_SHIELD = 202 +ICON_FILE_NEW = 203 +ICON_FOLDER_ADD = 204 +ICON_ALARM = 205 +ICON_CPU = 206 +ICON_ROM = 207 +ICON_STEP_OVER = 208 +ICON_STEP_INTO = 209 +ICON_STEP_OUT = 210 +ICON_RESTART = 211 +ICON_BREAKPOINT_ON = 212 +ICON_BREAKPOINT_OFF = 213 +ICON_BURGER_MENU = 214 +ICON_CASE_SENSITIVE = 215 +ICON_REG_EXP = 216 +ICON_FOLDER = 217 +ICON_FILE = 218 +ICON_SAND_TIMER = 219 +ICON_WARNING = 220 +ICON_HELP_BOX = 221 +ICON_INFO_BOX = 222 +ICON_PRIORITY = 223 +ICON_LAYERS_ISO = 224 +ICON_LAYERS2 = 225 +ICON_MLAYERS = 226 +ICON_MAPS = 227 +ICON_HOT = 228 +ICON_LABEL = 229 +ICON_NAME_ID = 230 +ICON_SLICING = 231 +ICON_MANUAL_CONTROL = 232 +ICON_COLLISION = 233 +ICON_CIRCLE_ADD = 234 +ICON_CIRCLE_ADD_FILL = 235 +ICON_CIRCLE_WARNING = 236 +ICON_CIRCLE_WARNING_FILL = 237 +ICON_BOX_MORE = 238 +ICON_BOX_MORE_FILL = 239 +ICON_BOX_MINUS = 240 +ICON_BOX_MINUS_FILL = 241 +ICON_UNION = 242 +ICON_INTERSECTION = 243 +ICON_DIFFERENCE = 244 +ICON_SPHERE = 245 +ICON_CYLINDER = 246 +ICON_CONE = 247 +ICON_ELLIPSOID = 248 +ICON_CAPSULE = 249 +ICON_FILETYPE_FONT = 250 +ICON_FILETYPE_3D = 251 +ICON_FILETYPE_CODE_XML = 252 +ICON_FILETYPE_CODE_C = 253 +ICON_FILETYPE_CODE_PYTHON = 254 +ICON_FILETYPE_CODE_JS = 255 +ICON_FILETYPE_ICON = 256 + + +---Quaternion, 4 components (Vector4 alias) +---@alias Quaternion Vector4 + +---Texture2D, same as Texture +---@alias Texture2D Texture + +---TextureCubemap, same as Texture +---@alias TextureCubemap Texture + +---RenderTexture2D, same as RenderTexture +---@alias RenderTexture2D RenderTexture + +---Camera type fallback, defaults to Camera3D +---@alias Camera Camera3D + +---Anim pose, an array of Transform[] +---@alias ModelAnimPose Transform[] -M.RAYLIB_VERSION_MAJOR = 6 -M.RAYLIB_VERSION_MINOR = 5 -M.RAYLIB_VERSION_PATCH = 0 -M.RAYLIB_VERSION = "6.5-dev" -M.PI = 3.1415926535898 -M.DEG2RAD = 0.017453292519943 -M.RAD2DEG = 57.295779513082 ----@type raylib.Color -M.LIGHTGRAY = ffi.new("Color", { r = 200, g = 200, b = 200, a = 255 }) ----@type raylib.Color -M.GRAY = ffi.new("Color", { r = 130, g = 130, b = 130, a = 255 }) ----@type raylib.Color -M.DARKGRAY = ffi.new("Color", { r = 80, g = 80, b = 80, a = 255 }) ----@type raylib.Color -M.YELLOW = ffi.new("Color", { r = 253, g = 249, b = 0, a = 255 }) ----@type raylib.Color -M.GOLD = ffi.new("Color", { r = 255, g = 203, b = 0, a = 255 }) ----@type raylib.Color -M.ORANGE = ffi.new("Color", { r = 255, g = 161, b = 0, a = 255 }) ----@type raylib.Color -M.PINK = ffi.new("Color", { r = 255, g = 109, b = 194, a = 255 }) ----@type raylib.Color -M.RED = ffi.new("Color", { r = 230, g = 41, b = 55, a = 255 }) ----@type raylib.Color -M.MAROON = ffi.new("Color", { r = 190, g = 33, b = 55, a = 255 }) ----@type raylib.Color -M.GREEN = ffi.new("Color", { r = 0, g = 228, b = 48, a = 255 }) ----@type raylib.Color -M.LIME = ffi.new("Color", { r = 0, g = 158, b = 47, a = 255 }) ----@type raylib.Color -M.DARKGREEN = ffi.new("Color", { r = 0, g = 117, b = 44, a = 255 }) ----@type raylib.Color -M.SKYBLUE = ffi.new("Color", { r = 102, g = 191, b = 255, a = 255 }) ----@type raylib.Color -M.BLUE = ffi.new("Color", { r = 0, g = 121, b = 241, a = 255 }) ----@type raylib.Color -M.DARKBLUE = ffi.new("Color", { r = 0, g = 82, b = 172, a = 255 }) ----@type raylib.Color -M.PURPLE = ffi.new("Color", { r = 200, g = 122, b = 255, a = 255 }) ----@type raylib.Color -M.VIOLET = ffi.new("Color", { r = 135, g = 60, b = 190, a = 255 }) ----@type raylib.Color -M.DARKPURPLE = ffi.new("Color", { r = 112, g = 31, b = 126, a = 255 }) ----@type raylib.Color -M.BEIGE = ffi.new("Color", { r = 211, g = 176, b = 131, a = 255 }) ----@type raylib.Color -M.BROWN = ffi.new("Color", { r = 127, g = 106, b = 79, a = 255 }) ----@type raylib.Color -M.DARKBROWN = ffi.new("Color", { r = 76, g = 63, b = 47, a = 255 }) ----@type raylib.Color -M.WHITE = ffi.new("Color", { r = 255, g = 255, b = 255, a = 255 }) ----@type raylib.Color -M.BLACK = ffi.new("Color", { r = 0, g = 0, b = 0, a = 255 }) ----@type raylib.Color -M.BLANK = ffi.new("Color", { r = 0, g = 0, b = 0, a = 0 }) ----@type raylib.Color -M.MAGENTA = ffi.new("Color", { r = 255, g = 0, b = 255, a = 255 }) ----@type raylib.Color -M.RAYWHITE = ffi.new("Color", { r = 245, g = 245, b = 245, a = 255 }) -M.RLGL_VERSION = "6.0" -M.RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192 -M.RL_DEFAULT_BATCH_BUFFERS = 1 -M.RL_DEFAULT_BATCH_DRAWCALLS = 256 -M.RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4 -M.RL_MAX_MATRIX_STACK_SIZE = 32 -M.RL_MAX_SHADER_LOCATIONS = 32 -M.RL_CULL_DISTANCE_NEAR = 0.05 -M.RL_CULL_DISTANCE_FAR = 4000 -M.RL_TEXTURE_WRAP_S = 10242 -M.RL_TEXTURE_WRAP_T = 10243 -M.RL_TEXTURE_MAG_FILTER = 10240 -M.RL_TEXTURE_MIN_FILTER = 10241 -M.RL_TEXTURE_FILTER_NEAREST = 9728 -M.RL_TEXTURE_FILTER_LINEAR = 9729 -M.RL_TEXTURE_FILTER_MIP_NEAREST = 9984 -M.RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986 -M.RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985 -M.RL_TEXTURE_FILTER_MIP_LINEAR = 9987 -M.RL_TEXTURE_FILTER_ANISOTROPIC = 12288 -M.RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384 -M.RL_TEXTURE_WRAP_REPEAT = 10497 -M.RL_TEXTURE_WRAP_CLAMP = 33071 -M.RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648 -M.RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626 -M.RL_MODELVIEW = 5888 -M.RL_PROJECTION = 5889 -M.RL_TEXTURE = 5890 -M.RL_LINES = 1 -M.RL_TRIANGLES = 4 -M.RL_QUADS = 7 -M.RL_UNSIGNED_BYTE = 5121 -M.RL_FLOAT = 5126 -M.RL_STREAM_DRAW = 35040 -M.RL_STREAM_READ = 35041 -M.RL_STREAM_COPY = 35042 -M.RL_STATIC_DRAW = 35044 -M.RL_STATIC_READ = 35045 -M.RL_STATIC_COPY = 35046 -M.RL_DYNAMIC_DRAW = 35048 -M.RL_DYNAMIC_READ = 35049 -M.RL_DYNAMIC_COPY = 35050 -M.RL_FRAGMENT_SHADER = 35632 -M.RL_VERTEX_SHADER = 35633 -M.RL_COMPUTE_SHADER = 37305 -M.RL_ZERO = 0 -M.RL_ONE = 1 -M.RL_SRC_COLOR = 768 -M.RL_ONE_MINUS_SRC_COLOR = 769 -M.RL_SRC_ALPHA = 770 -M.RL_ONE_MINUS_SRC_ALPHA = 771 -M.RL_DST_ALPHA = 772 -M.RL_ONE_MINUS_DST_ALPHA = 773 -M.RL_DST_COLOR = 774 -M.RL_ONE_MINUS_DST_COLOR = 775 -M.RL_SRC_ALPHA_SATURATE = 776 -M.RL_CONSTANT_COLOR = 32769 -M.RL_ONE_MINUS_CONSTANT_COLOR = 32770 -M.RL_CONSTANT_ALPHA = 32771 -M.RL_ONE_MINUS_CONSTANT_ALPHA = 32772 -M.RL_FUNC_ADD = 32774 -M.RL_MIN = 32775 -M.RL_MAX = 32776 -M.RL_FUNC_SUBTRACT = 32778 -M.RL_FUNC_REVERSE_SUBTRACT = 32779 -M.RL_BLEND_EQUATION = 32777 -M.RL_BLEND_EQUATION_RGB = 32777 -M.RL_BLEND_EQUATION_ALPHA = 34877 -M.RL_BLEND_DST_RGB = 32968 -M.RL_BLEND_SRC_RGB = 32969 -M.RL_BLEND_DST_ALPHA = 32970 -M.RL_BLEND_SRC_ALPHA = 32971 -M.RL_BLEND_COLOR = 32773 -M.RL_READ_FRAMEBUFFER = 36008 -M.RL_DRAW_FRAMEBUFFER = 36009 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION = 0 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD = 1 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL = 2 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR = 3 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT = 4 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 = 5 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES = 6 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES = 7 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS = 8 -M.RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM = 9 -M.EPSILON = 1e-06 -M.RAYGUI_VERSION_MAJOR = 5 -M.RAYGUI_VERSION_MINOR = 1 -M.RAYGUI_VERSION_PATCH = 0 -M.RAYGUI_VERSION = "5.1-dev" -M.SCROLLBAR_LEFT_SIDE = 0 -M.SCROLLBAR_RIGHT_SIDE = 1 -M.RAYGUI_ICON_SIZE = 16 -M.RAYGUI_ICON_MAX_ICONS = 512 -M.RAYGUI_ICON_MAX_FONT_BACKED = 257 -M.RAYGUI_ICON_MAX_NAME_LENGTH = 32 -M.RAYGUI_ICON_FONT_ATLAS_PADDING = 1 -M.RAYGUI_MAX_CONTROLS = 16 -M.RAYGUI_MAX_PROPS_BASE = 16 -M.RAYGUI_MAX_PROPS_EXTENDED = 8 -M.MOUSE_LEFT_BUTTON = 0 -M.RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT = 24 -M.RAYGUI_WINDOWBOX_CLOSEBUTTON_HEIGHT = 18 -M.RAYGUI_GROUPBOX_LINE_THICK = 1 -M.RAYGUI_LINE_MARGIN_TEXT = 12 -M.RAYGUI_LINE_TEXT_PADDING = 4 -M.RAYGUI_PANEL_BORDER_WIDTH = 1 -M.RAYGUI_MIN_SCROLLBAR_WIDTH = 40 -M.RAYGUI_MIN_SCROLLBAR_HEIGHT = 40 -M.RAYGUI_MIN_MOUSE_WHEEL_SPEED = 20 -M.RAYGUI_TOGGLEGROUP_MAX_ITEM_TEXT_SIZE = 256 -M.RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN = 20 -M.RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY = 1 -M.RAYGUI_VALUEBOX_MAX_CHARS = 32 -M.RAYGUI_COLORBARALPHA_CHECKED_SIZE = 10 -M.RAYGUI_MESSAGEBOX_BUTTON_HEIGHT = 24 -M.RAYGUI_MESSAGEBOX_BUTTON_PADDING = 12 -M.RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT = 24 -M.RAYGUI_TEXTINPUTBOX_BUTTON_PADDING = 12 -M.RAYGUI_TEXTINPUTBOX_HEIGHT = 26 -M.RAYGUI_GRID_ALPHA = 0.15 -M.MAX_LINE_BUFFER_SIZE = 256 -M.RAYGUI_ICON_TEXT_PADDING = 4 -M.RAYGUI_MAX_TEXT_LINES = 128 -M.RAYGUI_TEXTSPLIT_MAX_ITEMS = 128 -M.RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE = 1024 -M.RAYGUI_TEXTFORMAT_MAX_SIZE = 256 ----@type raylib.MouseButton -M.MOUSE_LEFT_BUTTON = M.MOUSE_BUTTON_LEFT ----@type raylib.MouseButton -M.MOUSE_RIGHT_BUTTON = M.MOUSE_BUTTON_RIGHT ----@type raylib.MouseButton -M.MOUSE_MIDDLE_BUTTON = M.MOUSE_BUTTON_MIDDLE ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_DIFFUSE = M.MATERIAL_MAP_ALBEDO ----@type raylib.MaterialMapIndex -M.MATERIAL_MAP_SPECULAR = M.MATERIAL_MAP_METALNESS ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_DIFFUSE = M.SHADER_LOC_MAP_ALBEDO ----@type raylib.ShaderLocationIndex -M.SHADER_LOC_MAP_SPECULAR = M.SHADER_LOC_MAP_METALNESS ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_DIFFUSE = M.RL_SHADER_LOC_MAP_ALBEDO ----@type raylib.rlShaderLocationIndex -M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---Vector2, 2 components ----@class raylib.Vector2 +---@class Vector2 ---@field x number Vector x component ---@field y number Vector y component ---Vector3, 3 components ----@class raylib.Vector3 +---@class Vector3 ---@field x number Vector x component ---@field y number Vector y component ---@field z number Vector z component ---Vector4, 4 components ----@class raylib.Vector4 +---@class Vector4 ---@field x number Vector x component ---@field y number Vector y component ---@field z number Vector z component ---@field w number Vector w component ---Matrix, 4x4 components, column major, OpenGL style, right-handed ----@class raylib.Matrix +---@class Matrix ---@field m0 number Matrix first row (4 components) ---@field m4 number Matrix first row (4 components) ---@field m8 number Matrix first row (4 components) @@ -4166,21 +3477,21 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field m15 number Matrix fourth row (4 components) ---Color, 4 components, R8G8B8A8 (32bit) ----@class raylib.Color +---@class Color ---@field r integer Color red value ---@field g integer Color green value ---@field b integer Color blue value ---@field a integer Color alpha value ---Rectangle, 4 components ----@class raylib.Rectangle +---@class Rectangle ---@field x number Rectangle top-left corner position x ---@field y number Rectangle top-left corner position y ---@field width number Rectangle width ---@field height number Rectangle height ---Image, pixel data stored in CPU memory (RAM) ----@class raylib.Image +---@class Image ---@field data ffi.cdata* Image raw data ---@field width integer Image base width ---@field height integer Image base height @@ -4188,7 +3499,7 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field format integer Data format (PixelFormat type) ---Texture, tex data stored in GPU memory (VRAM) ----@class raylib.Texture +---@class Texture ---@field id integer OpenGL texture id ---@field width integer Texture base width ---@field height integer Texture base height @@ -4196,14 +3507,14 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field format integer Data format (PixelFormat type) ---RenderTexture, fbo for texture rendering ----@class raylib.RenderTexture +---@class RenderTexture ---@field id integer OpenGL framebuffer object id ----@field texture raylib.Texture Color buffer attachment texture ----@field depth raylib.Texture Depth buffer attachment texture +---@field texture Texture Color buffer attachment texture +---@field depth Texture Depth buffer attachment texture ---NPatchInfo, n-patch layout info ----@class raylib.NPatchInfo ----@field source raylib.Rectangle Texture source rectangle +---@class NPatchInfo +---@field source Rectangle Texture source rectangle ---@field left integer Left border offset ---@field top integer Top border offset ---@field right integer Right border offset @@ -4211,41 +3522,39 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field layout integer Layout of the n-patch: 3x3, 1x3 or 3x1 ---GlyphInfo, font characters glyphs info ----@class raylib.GlyphInfo +---@class GlyphInfo ---@field value integer Character value (Unicode) ---@field offsetX integer Character offset X when drawing ---@field offsetY integer Character offset Y when drawing ---@field advanceX integer Character advance position X ----@field image raylib.Image Character image data - ----@alias raylib.Texture2D raylib.Texture +---@field image Image Character image data ---Font, font texture and GlyphInfo array data ----@class raylib.Font +---@class Font ---@field baseSize integer Base size (default chars height) ---@field glyphCount integer Number of glyph characters ---@field glyphPadding integer Padding around the glyph characters ----@field texture raylib.Texture2D Texture atlas containing the glyphs ----@field recs raylib.Rectangle[] Rectangles in texture for the glyphs ----@field glyphs raylib.GlyphInfo[] Glyphs info data +---@field texture Texture2D Texture atlas containing the glyphs +---@field recs Rectangle[] Rectangles in texture for the glyphs +---@field glyphs GlyphInfo[] Glyphs info data ---Camera, defines position/orientation in 3d space ----@class raylib.Camera3D ----@field position raylib.Vector3 Camera position ----@field target raylib.Vector3 Camera target it looks-at ----@field up raylib.Vector3 Camera up vector (rotation over its axis) +---@class Camera3D +---@field position Vector3 Camera position +---@field target Vector3 Camera target it looks-at +---@field up Vector3 Camera up vector (rotation over its axis) ---@field fovy number Camera field-of-view aperture in Y (degrees) in perspective, used as near plane height in world units in orthographic ---@field projection integer Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC ---Camera2D, defines position/orientation in 2d space ----@class raylib.Camera2D ----@field offset raylib.Vector2 Camera offset (screen space offset from window origin, unscaled by DPI, real pixel size) ----@field target raylib.Vector2 Camera target (world space target point that is mapped to screen space offset) +---@class Camera2D +---@field offset Vector2 Camera offset (screen space offset from window origin, unscaled by DPI, real pixel size) +---@field target Vector2 Camera target (world space target point that is mapped to screen space offset) ---@field rotation number Camera rotation in degrees (pivots around target) ---@field zoom number Camera zoom (scaling around target), must not be set to 0, set to 1.0f for no scale ---Mesh, vertex data and vao/vbo ----@class raylib.Mesh +---@class Mesh ---@field vertexCount integer Number of vertices stored in arrays ---@field triangleCount integer Number of triangles stored (indexed or not) ---@field vertices number[] Vertex position (XYZ - 3 components per vertex) (shader-location = 0) @@ -4264,81 +3573,77 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field vboId integer[] OpenGL Vertex Buffer Objects id (default vertex data) ---Shader ----@class raylib.Shader +---@class Shader ---@field id integer Shader program id ---@field locs integer[] Shader locations array (RL_MAX_SHADER_LOCATIONS) ---MaterialMap ----@class raylib.MaterialMap ----@field texture raylib.Texture2D Material map texture ----@field color raylib.Color Material map color +---@class MaterialMap +---@field texture Texture2D Material map texture +---@field color Color Material map color ---@field value number Material map value ---Material, includes shader and maps ----@class raylib.Material ----@field shader raylib.Shader Material shader ----@field maps raylib.MaterialMap[] Material maps array (MAX_MATERIAL_MAPS) +---@class Material +---@field shader Shader Material shader +---@field maps MaterialMap[] Material maps array (MAX_MATERIAL_MAPS) ---@field params number[] Material generic parameters (if required) ----@alias raylib.Quaternion raylib.Vector4 - ---Transform, vertex transformation data ----@class raylib.Transform ----@field translation raylib.Vector3 Translation ----@field rotation raylib.Quaternion Rotation ----@field scale raylib.Vector3 Scale +---@class Transform +---@field translation Vector3 Translation +---@field rotation Quaternion Rotation +---@field scale Vector3 Scale ---Bone, skeletal animation bone ----@class raylib.BoneInfo ----@field name raylib.char_buffer Bone name +---@class BoneInfo +---@field name string Bone name ---@field parent integer Bone parent ----@alias raylib.ModelAnimPose ffi.cdata* - ---Skeleton, animation bones hierarchy ----@class raylib.ModelSkeleton +---@class ModelSkeleton ---@field boneCount integer Number of bones ----@field bones raylib.BoneInfo[] Bones information (skeleton) ----@field bindPose raylib.ModelAnimPose Bones base transformation (Transform[]) +---@field bones BoneInfo[] Bones information (skeleton) +---@field bindPose ModelAnimPose Bones base transformation (Transform[]) ---Model, meshes, materials and animation data ----@class raylib.Model ----@field transform raylib.Matrix Local transform matrix +---@class Model +---@field transform Matrix Local transform matrix ---@field meshCount integer Number of meshes ---@field materialCount integer Number of materials ----@field meshes raylib.Mesh[] Meshes array ----@field materials raylib.Material[] Materials array +---@field meshes Mesh[] Meshes array +---@field materials Material[] Materials array ---@field meshMaterial integer[] Mesh material number ----@field skeleton raylib.ModelSkeleton Skeleton for animation ----@field currentPose raylib.ModelAnimPose Current animation pose (Transform[]) ----@field boneMatrices raylib.Matrix[] Bones animated transformation matrices +---@field skeleton ModelSkeleton Skeleton for animation +---@field currentPose ModelAnimPose Current animation pose (Transform[]) +---@field boneMatrices Matrix[] Bones animated transformation matrices ---ModelAnimation, contains a full animation sequence ----@class raylib.ModelAnimation ----@field name raylib.char_buffer Animation name +---@class ModelAnimation +---@field name string Animation name ---@field boneCount integer Number of bones (per pose) ---@field keyframeCount integer Number of animation key frames ----@field keyframePoses raylib.ModelAnimPose[] Animation sequence keyframe poses [keyframe][pose] +---@field keyframePoses ModelAnimPose[] Animation sequence keyframe poses [keyframe][pose] ---Ray, ray for raycasting ----@class raylib.Ray ----@field position raylib.Vector3 Ray position (origin) ----@field direction raylib.Vector3 Ray direction (normalized) +---@class Ray +---@field position Vector3 Ray position (origin) +---@field direction Vector3 Ray direction (normalized) ---RayCollision, ray hit information ----@class raylib.RayCollision +---@class RayCollision ---@field hit boolean Did the ray hit something? ---@field distance number Distance to the nearest hit ----@field point raylib.Vector3 Point of the nearest hit ----@field normal raylib.Vector3 Surface normal of hit +---@field point Vector3 Point of the nearest hit +---@field normal Vector3 Surface normal of hit ---BoundingBox ----@class raylib.BoundingBox ----@field min raylib.Vector3 Minimum vertex box-corner ----@field max raylib.Vector3 Maximum vertex box-corner +---@class BoundingBox +---@field min Vector3 Minimum vertex box-corner +---@field max Vector3 Maximum vertex box-corner ---Wave, audio wave data ----@class raylib.Wave +---@class Wave ---@field frameCount integer Total number of frames (considering channels) ---@field sampleRate integer Frequency (samples per second) ---@field sampleSize integer Bit depth (bits per sample): 8, 16, 32 (24 not supported) @@ -4346,7 +3651,7 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field data ffi.cdata* Buffer data pointer ---AudioStream, custom audio stream ----@class raylib.AudioStream +---@class AudioStream ---@field buffer ffi.cdata* Pointer to internal data used by the audio system ---@field processor ffi.cdata* Pointer to internal data processor, useful for audio effects ---@field sampleRate integer Frequency (samples per second) @@ -4354,20 +3659,20 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field channels integer Number of channels (1-mono, 2-stereo, ...) ---Sound ----@class raylib.Sound ----@field stream raylib.AudioStream Audio stream +---@class Sound +---@field stream AudioStream Audio stream ---@field frameCount integer Total number of frames (considering channels) ---Music, audio stream, anything longer than ~10 seconds should be streamed ----@class raylib.Music ----@field stream raylib.AudioStream Audio stream +---@class Music +---@field stream AudioStream Audio stream ---@field frameCount integer Total number of frames (considering channels) ---@field looping boolean Music looping enable ---@field ctxType integer Type of music context (audio filetype) ---@field ctxData ffi.cdata* Audio context data, depends on type ---VrDeviceInfo, Head-Mounted-Display device parameters ----@class raylib.VrDeviceInfo +---@class VrDeviceInfo ---@field hResolution integer Horizontal resolution in pixels ---@field vResolution integer Vertical resolution in pixels ---@field hScreenSize number Horizontal size in meters @@ -4379,9 +3684,9 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field chromaAbCorrection number[] Chromatic aberration correction parameters ---VrStereoConfig, VR stereo rendering configuration for simulator ----@class raylib.VrStereoConfig ----@field projection raylib.Matrix[] VR projection matrices (per eye) ----@field viewOffset raylib.Matrix[] VR view offset matrices (per eye) +---@class VrStereoConfig +---@field projection Matrix[] VR projection matrices (per eye) +---@field viewOffset Matrix[] VR view offset matrices (per eye) ---@field leftLensCenter number[] VR left lens center ---@field rightLensCenter number[] VR right lens center ---@field leftScreenCenter number[] VR left screen center @@ -4390,30 +3695,24 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field scaleIn number[] VR distortion scale in ---File path list ----@class raylib.FilePathList +---@class FilePathList ---@field count integer Filepaths entries count ----@field paths raylib.cstring_array Filepaths entries +---@field paths string[] Filepaths entries ---Automation event ----@class raylib.AutomationEvent +---@class AutomationEvent ---@field frame integer Event frame ---@field type integer Event type (AutomationEventType) ---@field params integer[] Event parameters (if required) ---Automation event list ----@class raylib.AutomationEventList +---@class AutomationEventList ---@field capacity integer Events max entries (MAX_AUTOMATION_EVENTS) ---@field count integer Events entries count ----@field events raylib.AutomationEvent[] Events entries - ----@alias raylib.TextureCubemap raylib.Texture - ----@alias raylib.RenderTexture2D raylib.RenderTexture - ----@alias raylib.Camera raylib.Camera3D +---@field events AutomationEvent[] Events entries ---Dynamic vertex buffers (position + texcoords + colors + indices arrays) ----@class raylib.rlVertexBuffer +---@class rlVertexBuffer ---@field elementCount integer Number of elements in the buffer (QUADS) ---@field vertices number[] Vertex position (XYZ - 3 components per vertex) (shader-location = 0) ---@field texcoords number[] Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) @@ -4424,503 +3723,465 @@ M.RL_SHADER_LOC_MAP_SPECULAR = M.RL_SHADER_LOC_MAP_METALNESS ---@field vboId integer[] OpenGL Vertex Buffer Objects id (5 types of vertex data) ---of those state-change happens (this is done in core module) ----@class raylib.rlDrawCall +---@class rlDrawCall ---@field mode integer Drawing mode: LINES, TRIANGLES, QUADS ---@field vertexCount integer Number of vertex of the draw ---@field vertexAlignment integer Number of vertex required for index alignment (LINES, TRIANGLES) ---@field textureId integer Texture id to be used on the draw -> Use to create new draw call if changes ---rlRenderBatch type ----@class raylib.rlRenderBatch +---@class rlRenderBatch ---@field bufferCount integer Number of vertex buffers (multi-buffering support) ---@field currentBuffer integer Current buffer tracking in case of multi-buffering ----@field vertexBuffer raylib.rlVertexBuffer[] Dynamic buffer(s) for vertex data ----@field draws raylib.rlDrawCall[] Draw calls array, depends on textureId +---@field vertexBuffer rlVertexBuffer[] Dynamic buffer(s) for vertex data +---@field draws rlDrawCall[] Draw calls array, depends on textureId ---@field drawCounter integer Draw calls counter ---@field currentDepth number Current depth value for next draw ----@class raylib.float3 ----@field v number[] +--- +---@class float3 +---@field v number[] ----@class raylib.float16 ----@field v number[] +--- +---@class float16 +---@field v number[] ---NOTE: Used when exporting style as code for convenience ----@class raylib.GuiStyleProp +---@class GuiStyleProp ---@field controlId integer Control identifier ---@field propertyId integer Property identifier ---@field propertyValue integer Property value ---NOTE: Text style is defined by control ----@class raylib.GuiTextStyle ----@field size integer ----@field charSpacing integer ----@field lineSpacing integer ----@field alignmentH integer ----@field alignmentV integer ----@field padding integer +---@class GuiTextStyle +---@field size integer +---@field charSpacing integer +---@field lineSpacing integer +---@field alignmentH integer +---@field alignmentV integer +---@field padding integer ----@alias raylib.AudioCallback fun(bufferData: ffi.cdata*, frames: integer) ----@alias raylib.LoadFileDataCallback fun(fileName: string, dataSize: integer): ffi.cdata* +---Logging: Redirect trace log messages +---@alias TraceLogCallback fun(logLevel: integer, text: string, args: ffi.cdata*) ----@alias raylib.SaveFileDataCallback fun(fileName: string, data: ffi.cdata*, dataSize: integer): boolean +---FileIO: Load binary data +---@alias LoadFileDataCallback fun(fileName: string, dataSize: integer[]): integer[] ----@alias raylib.LoadFileTextCallback fun(fileName: string): string +---FileIO: Save binary data +---@alias SaveFileDataCallback fun(fileName: string, data: ffi.cdata*, dataSize: integer): boolean + +---FileIO: Load text data +---@alias LoadFileTextCallback fun(fileName: string): string + +---FileIO: Save text data +---@alias SaveFileTextCallback fun(fileName: string, text: string): boolean + +---@alias AudioCallback fun(bufferData: ffi.cdata*, frames: integer) ----@alias raylib.SaveFileTextCallback fun(fileName: string, text: string): boolean ---Initialize window and OpenGL context ---@param width integer ---@param height integer ---@param title string ----@return nil -function M.InitWindow(width, height, title) +function InitWindow(width, height, title) C.InitWindow(width, height, title) end ---Close window and unload OpenGL context ----@return nil -function M.CloseWindow() +function CloseWindow() C.CloseWindow() end ---Check if application should close (KEY_ESCAPE pressed or windows close icon clicked) ---@return boolean -function M.WindowShouldClose() +function WindowShouldClose() return C.WindowShouldClose() end ---Check if window has been initialized successfully ---@return boolean -function M.IsWindowReady() +function IsWindowReady() return C.IsWindowReady() end ---Check if window is currently fullscreen ---@return boolean -function M.IsWindowFullscreen() +function IsWindowFullscreen() return C.IsWindowFullscreen() end ---Check if window is currently hidden ---@return boolean -function M.IsWindowHidden() +function IsWindowHidden() return C.IsWindowHidden() end ---Check if window is currently minimized ---@return boolean -function M.IsWindowMinimized() +function IsWindowMinimized() return C.IsWindowMinimized() end ---Check if window is currently maximized ---@return boolean -function M.IsWindowMaximized() +function IsWindowMaximized() return C.IsWindowMaximized() end ---Check if window is currently focused ---@return boolean -function M.IsWindowFocused() +function IsWindowFocused() return C.IsWindowFocused() end ---Check if window has been resized last frame ---@return boolean -function M.IsWindowResized() +function IsWindowResized() return C.IsWindowResized() end ---Check if one specific window flag is enabled ----@param flag integer +---@param flag ConfigFlags ---@return boolean -function M.IsWindowState(flag) +function IsWindowState(flag) return C.IsWindowState(flag) end ---Set window configuration state using flags ----@param flags integer ----@return nil -function M.SetWindowState(flags) +---@param flags ConfigFlags +function SetWindowState(flags) C.SetWindowState(flags) end ---Clear window configuration state flags ----@param flags integer ----@return nil -function M.ClearWindowState(flags) +---@param flags ConfigFlags +function ClearWindowState(flags) C.ClearWindowState(flags) end ---Toggle window state: fullscreen/windowed, resizes monitor to match window resolution ----@return nil -function M.ToggleFullscreen() +function ToggleFullscreen() C.ToggleFullscreen() end ---Toggle window state: borderless windowed, resizes window to match monitor resolution ----@return nil -function M.ToggleBorderlessWindowed() +function ToggleBorderlessWindowed() C.ToggleBorderlessWindowed() end ---Set window state: maximized, if resizable ----@return nil -function M.MaximizeWindow() +function MaximizeWindow() C.MaximizeWindow() end ---Set window state: minimized, if resizable ----@return nil -function M.MinimizeWindow() +function MinimizeWindow() C.MinimizeWindow() end ---Restore window from being minimized/maximized ----@return nil -function M.RestoreWindow() +function RestoreWindow() C.RestoreWindow() end ---Set icon for window (single image, RGBA 32bit) ----@param image raylib.Image ----@return nil -function M.SetWindowIcon(image) +---@param image Image +function SetWindowIcon(image) C.SetWindowIcon(image) end ---Set icon for window (multiple images, RGBA 32bit) ----@param images raylib.Image +---@param images ffi.cdata* ---@param count integer ----@return raylib.Image -function M.SetWindowIcons(images, count) - local _o1 = ffi.new("Image[1]", images) - C.SetWindowIcons(_o1, count) - return _o1[0] +function SetWindowIcons(images, count) + C.SetWindowIcons(images, count) end ---Set title for window ---@param title string ----@return nil -function M.SetWindowTitle(title) +function SetWindowTitle(title) C.SetWindowTitle(title) end ---Set window position on screen ---@param x integer ---@param y integer ----@return nil -function M.SetWindowPosition(x, y) +function SetWindowPosition(x, y) C.SetWindowPosition(x, y) end ---Set monitor for the current window ---@param monitor integer ----@return nil -function M.SetWindowMonitor(monitor) +function SetWindowMonitor(monitor) C.SetWindowMonitor(monitor) end ---Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) ---@param width integer ---@param height integer ----@return nil -function M.SetWindowMinSize(width, height) +function SetWindowMinSize(width, height) C.SetWindowMinSize(width, height) end ---Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE) ---@param width integer ---@param height integer ----@return nil -function M.SetWindowMaxSize(width, height) +function SetWindowMaxSize(width, height) C.SetWindowMaxSize(width, height) end ---Set window dimensions ---@param width integer ---@param height integer ----@return nil -function M.SetWindowSize(width, height) +function SetWindowSize(width, height) C.SetWindowSize(width, height) end ---Set window opacity [0.0f..1.0f] ---@param opacity number ----@return nil -function M.SetWindowOpacity(opacity) +function SetWindowOpacity(opacity) C.SetWindowOpacity(opacity) end ---Set window focused ----@return nil -function M.SetWindowFocused() +function SetWindowFocused() C.SetWindowFocused() end ---Get native window handle ---@return ffi.cdata* -function M.GetWindowHandle() +function GetWindowHandle() return C.GetWindowHandle() end ---Get current screen width ---@return integer -function M.GetScreenWidth() +function GetScreenWidth() return C.GetScreenWidth() end ---Get current screen height ---@return integer -function M.GetScreenHeight() +function GetScreenHeight() return C.GetScreenHeight() end ---Get current render width (it considers HiDPI) ---@return integer -function M.GetRenderWidth() +function GetRenderWidth() return C.GetRenderWidth() end ---Get current render height (it considers HiDPI) ---@return integer -function M.GetRenderHeight() +function GetRenderHeight() return C.GetRenderHeight() end ---Get number of connected monitors ---@return integer -function M.GetMonitorCount() +function GetMonitorCount() return C.GetMonitorCount() end ---Get current monitor where window is placed ---@return integer -function M.GetCurrentMonitor() +function GetCurrentMonitor() return C.GetCurrentMonitor() end ---Get specified monitor position ---@param monitor integer ----@return raylib.Vector2 -function M.GetMonitorPosition(monitor) +---@return Vector2 +function GetMonitorPosition(monitor) return C.GetMonitorPosition(monitor) end ---Get specified monitor width (current video mode used by monitor) ---@param monitor integer ---@return integer -function M.GetMonitorWidth(monitor) +function GetMonitorWidth(monitor) return C.GetMonitorWidth(monitor) end ---Get specified monitor height (current video mode used by monitor) ---@param monitor integer ---@return integer -function M.GetMonitorHeight(monitor) +function GetMonitorHeight(monitor) return C.GetMonitorHeight(monitor) end ---Get specified monitor physical width in millimetres ---@param monitor integer ---@return integer -function M.GetMonitorPhysicalWidth(monitor) +function GetMonitorPhysicalWidth(monitor) return C.GetMonitorPhysicalWidth(monitor) end ---Get specified monitor physical height in millimetres ---@param monitor integer ---@return integer -function M.GetMonitorPhysicalHeight(monitor) +function GetMonitorPhysicalHeight(monitor) return C.GetMonitorPhysicalHeight(monitor) end ---Get specified monitor refresh rate ---@param monitor integer ---@return integer -function M.GetMonitorRefreshRate(monitor) +function GetMonitorRefreshRate(monitor) return C.GetMonitorRefreshRate(monitor) end ---Get window position XY on monitor ----@return raylib.Vector2 -function M.GetWindowPosition() +---@return Vector2 +function GetWindowPosition() return C.GetWindowPosition() end ---Get window scale DPI factor ----@return raylib.Vector2 -function M.GetWindowScaleDPI() +---@return Vector2 +function GetWindowScaleDPI() return C.GetWindowScaleDPI() end ---Get the human-readable, UTF-8 encoded name of the specified monitor ---@param monitor integer ----@return string|nil -function M.GetMonitorName(monitor) - local _p = C.GetMonitorName(monitor) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetMonitorName(monitor) + local _r = C.GetMonitorName(monitor) + return _r ~= nil and ffi.string(_r) or "" end ---Set clipboard text content ---@param text string ----@return nil -function M.SetClipboardText(text) +function SetClipboardText(text) C.SetClipboardText(text) end ---Get clipboard text content ----@return string|nil -function M.GetClipboardText() - local _p = C.GetClipboardText() - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetClipboardText() + local _r = C.GetClipboardText() + return _r ~= nil and ffi.string(_r) or "" end ---Get clipboard image content ----@return raylib.Image -function M.GetClipboardImage() +---@return Image +function GetClipboardImage() return C.GetClipboardImage() end ---Enable waiting for events on EndDrawing(), no automatic event polling ----@return nil -function M.EnableEventWaiting() +function EnableEventWaiting() C.EnableEventWaiting() end ---Disable waiting for events on EndDrawing(), automatic events polling ----@return nil -function M.DisableEventWaiting() +function DisableEventWaiting() C.DisableEventWaiting() end ---Show cursor ----@return nil -function M.ShowCursor() +function ShowCursor() C.ShowCursor() end ---Hide cursor ----@return nil -function M.HideCursor() +function HideCursor() C.HideCursor() end ---Check if cursor is not visible ---@return boolean -function M.IsCursorHidden() +function IsCursorHidden() return C.IsCursorHidden() end ---Enable cursor (unlock cursor) ----@return nil -function M.EnableCursor() +function EnableCursor() C.EnableCursor() end ---Disable cursor (lock cursor) ----@return nil -function M.DisableCursor() +function DisableCursor() C.DisableCursor() end ---Check if cursor is on the screen ---@return boolean -function M.IsCursorOnScreen() +function IsCursorOnScreen() return C.IsCursorOnScreen() end ---Clear background (framebuffer) to color ----@param color raylib.Color ----@return nil -function M.ClearBackground(color) +---@param color Color +function ClearBackground(color) C.ClearBackground(color) end ---Begin canvas (framebuffer) drawing ----@return nil -function M.BeginDrawing() +function BeginDrawing() C.BeginDrawing() end ---End canvas (framebuffer) drawing and swap buffers (double buffering) ----@return nil -function M.EndDrawing() +function EndDrawing() C.EndDrawing() end ---Begin 2D mode with custom camera (2D) ----@param camera raylib.Camera2D ----@return nil -function M.BeginMode2D(camera) +---@param camera Camera2D +function BeginMode2D(camera) C.BeginMode2D(camera) end ---End 2D mode with custom camera ----@return nil -function M.EndMode2D() +function EndMode2D() C.EndMode2D() end ---Begin 3D mode with custom camera (3D) ----@param camera raylib.Camera3D ----@return nil -function M.BeginMode3D(camera) +---@param camera Camera3D +function BeginMode3D(camera) C.BeginMode3D(camera) end ---End 3D mode and returns to default 2D orthographic mode ----@return nil -function M.EndMode3D() +function EndMode3D() C.EndMode3D() end ---Begin drawing to render texture ----@param target raylib.RenderTexture2D ----@return nil -function M.BeginTextureMode(target) +---@param target RenderTexture2D +function BeginTextureMode(target) C.BeginTextureMode(target) end ---End drawing to render texture ----@return nil -function M.EndTextureMode() +function EndTextureMode() C.EndTextureMode() end ---Begin custom shader drawing ----@param shader raylib.Shader ----@return nil -function M.BeginShaderMode(shader) +---@param shader Shader +function BeginShaderMode(shader) C.BeginShaderMode(shader) end ---End custom shader drawing (use default shader) ----@return nil -function M.EndShaderMode() +function EndShaderMode() C.EndShaderMode() end ---Begin blending mode (alpha, additive, multiplied, subtract, custom) ----@param mode integer ----@return nil -function M.BeginBlendMode(mode) +---@param mode BlendMode +function BeginBlendMode(mode) C.BeginBlendMode(mode) end ---End blending mode (reset to default: alpha blending) ----@return nil -function M.EndBlendMode() +function EndBlendMode() C.EndBlendMode() end @@ -4929,90 +4190,84 @@ end ---@param y integer ---@param width integer ---@param height integer ----@return nil -function M.BeginScissorMode(x, y, width, height) +function BeginScissorMode(x, y, width, height) C.BeginScissorMode(x, y, width, height) end ---End scissor mode ----@return nil -function M.EndScissorMode() +function EndScissorMode() C.EndScissorMode() end ---Begin stereo rendering (requires VR simulator) ----@param config raylib.VrStereoConfig ----@return nil -function M.BeginVrStereoMode(config) +---@param config VrStereoConfig +function BeginVrStereoMode(config) C.BeginVrStereoMode(config) end ---End stereo rendering (requires VR simulator) ----@return nil -function M.EndVrStereoMode() +function EndVrStereoMode() C.EndVrStereoMode() end ---Load VR stereo config for VR simulator device parameters ----@param device raylib.VrDeviceInfo ----@return raylib.VrStereoConfig -function M.LoadVrStereoConfig(device) +---@param device VrDeviceInfo +---@return VrStereoConfig +function LoadVrStereoConfig(device) return C.LoadVrStereoConfig(device) end ---Unload VR stereo config ----@param config raylib.VrStereoConfig ----@return nil -function M.UnloadVrStereoConfig(config) +---@param config VrStereoConfig +function UnloadVrStereoConfig(config) C.UnloadVrStereoConfig(config) end ---Load shader from files and bind default locations ---@param vsFileName string ---@param fsFileName string ----@return raylib.Shader -function M.LoadShader(vsFileName, fsFileName) +---@return Shader +function LoadShader(vsFileName, fsFileName) return C.LoadShader(vsFileName, fsFileName) end ---Load shader from code strings and bind default locations ---@param vsCode string ---@param fsCode string ----@return raylib.Shader -function M.LoadShaderFromMemory(vsCode, fsCode) +---@return Shader +function LoadShaderFromMemory(vsCode, fsCode) return C.LoadShaderFromMemory(vsCode, fsCode) end ---Check if shader is valid (loaded on GPU) ----@param shader raylib.Shader +---@param shader Shader ---@return boolean -function M.IsShaderValid(shader) +function IsShaderValid(shader) return C.IsShaderValid(shader) end ---Get shader uniform location ----@param shader raylib.Shader +---@param shader Shader ---@param uniformName string ---@return integer -function M.GetShaderLocation(shader, uniformName) +function GetShaderLocation(shader, uniformName) return C.GetShaderLocation(shader, uniformName) end ---Get shader attribute location ----@param shader raylib.Shader +---@param shader Shader ---@param attribName string ---@return integer -function M.GetShaderLocationAttrib(shader, attribName) +function GetShaderLocationAttrib(shader, attribName) return C.GetShaderLocationAttrib(shader, attribName) end ---Set shader uniform value ----@param shader raylib.Shader +---@param shader Shader ---@param locIndex integer ----@param value ffi.cdata*|string ----@param uniformType integer ----@return nil -function M.SetShaderValue(shader, locIndex, value, uniformType) +---@param value string|ffi.cdata* +---@param uniformType ShaderUniformDataType +function SetShaderValue(shader, locIndex, value, uniformType) local _a3 if type(value) == "string" then _a3 = ffi.cast("const void *", value) else _a3 = value end @@ -5020,13 +4275,12 @@ function M.SetShaderValue(shader, locIndex, value, uniformType) end ---Set shader uniform value vector ----@param shader raylib.Shader +---@param shader Shader ---@param locIndex integer ----@param value ffi.cdata*|string ----@param uniformType integer +---@param value string|ffi.cdata* +---@param uniformType ShaderUniformDataType ---@param count integer ----@return nil -function M.SetShaderValueV(shader, locIndex, value, uniformType, count) +function SetShaderValueV(shader, locIndex, value, uniformType, count) local _a3 if type(value) == "string" then _a3 = ffi.cast("const void *", value) else _a3 = value end @@ -5034,144 +4288,136 @@ function M.SetShaderValueV(shader, locIndex, value, uniformType, count) end ---Set shader uniform value (matrix 4x4) ----@param shader raylib.Shader +---@param shader Shader ---@param locIndex integer ----@param mat raylib.Matrix ----@return nil -function M.SetShaderValueMatrix(shader, locIndex, mat) +---@param mat Matrix +function SetShaderValueMatrix(shader, locIndex, mat) C.SetShaderValueMatrix(shader, locIndex, mat) end ---Set shader uniform value and bind the texture (sampler2d) ----@param shader raylib.Shader +---@param shader Shader ---@param locIndex integer ----@param texture raylib.Texture2D ----@return nil -function M.SetShaderValueTexture(shader, locIndex, texture) +---@param texture Texture2D +function SetShaderValueTexture(shader, locIndex, texture) C.SetShaderValueTexture(shader, locIndex, texture) end ---Unload shader from GPU memory (VRAM) ----@param shader raylib.Shader ----@return nil -function M.UnloadShader(shader) +---@param shader Shader +function UnloadShader(shader) C.UnloadShader(shader) end ---Get a ray trace from screen position (i.e mouse) ----@param position raylib.Vector2 ----@param camera raylib.Camera ----@return raylib.Ray -function M.GetScreenToWorldRay(position, camera) +---@param position Vector2 +---@param camera Camera +---@return Ray +function GetScreenToWorldRay(position, camera) return C.GetScreenToWorldRay(position, camera) end ---Get a ray trace from screen position (i.e mouse) in a viewport ----@param position raylib.Vector2 ----@param camera raylib.Camera +---@param position Vector2 +---@param camera Camera ---@param width integer ---@param height integer ----@return raylib.Ray -function M.GetScreenToWorldRayEx(position, camera, width, height) +---@return Ray +function GetScreenToWorldRayEx(position, camera, width, height) return C.GetScreenToWorldRayEx(position, camera, width, height) end ---Get screen space position for a 3d world space position ----@param position raylib.Vector3 ----@param camera raylib.Camera ----@return raylib.Vector2 -function M.GetWorldToScreen(position, camera) +---@param position Vector3 +---@param camera Camera +---@return Vector2 +function GetWorldToScreen(position, camera) return C.GetWorldToScreen(position, camera) end ---Get sized screen space position for a 3d world space position ----@param position raylib.Vector3 ----@param camera raylib.Camera +---@param position Vector3 +---@param camera Camera ---@param width integer ---@param height integer ----@return raylib.Vector2 -function M.GetWorldToScreenEx(position, camera, width, height) +---@return Vector2 +function GetWorldToScreenEx(position, camera, width, height) return C.GetWorldToScreenEx(position, camera, width, height) end ---Get screen space position for a 2d camera world space position ----@param position raylib.Vector2 ----@param camera raylib.Camera2D ----@return raylib.Vector2 -function M.GetWorldToScreen2D(position, camera) +---@param position Vector2 +---@param camera Camera2D +---@return Vector2 +function GetWorldToScreen2D(position, camera) return C.GetWorldToScreen2D(position, camera) end ---Get world space position for a 2d camera screen space position ----@param position raylib.Vector2 ----@param camera raylib.Camera2D ----@return raylib.Vector2 -function M.GetScreenToWorld2D(position, camera) +---@param position Vector2 +---@param camera Camera2D +---@return Vector2 +function GetScreenToWorld2D(position, camera) return C.GetScreenToWorld2D(position, camera) end ---Get camera transform matrix (view matrix) ----@param camera raylib.Camera ----@return raylib.Matrix -function M.GetCameraMatrix(camera) +---@param camera Camera +---@return Matrix +function GetCameraMatrix(camera) return C.GetCameraMatrix(camera) end ---Get camera 2d transform matrix ----@param camera raylib.Camera2D ----@return raylib.Matrix -function M.GetCameraMatrix2D(camera) +---@param camera Camera2D +---@return Matrix +function GetCameraMatrix2D(camera) return C.GetCameraMatrix2D(camera) end ---Set target FPS (maximum) ---@param fps integer ----@return nil -function M.SetTargetFPS(fps) +function SetTargetFPS(fps) C.SetTargetFPS(fps) end ---Get time in seconds for last frame drawn (delta time) ---@return number -function M.GetFrameTime() +function GetFrameTime() return C.GetFrameTime() end ---Get elapsed time in seconds since InitWindow() ---@return number -function M.GetTime() +function GetTime() return C.GetTime() end ---Get current FPS ---@return integer -function M.GetFPS() +function GetFPS() return C.GetFPS() end ---Swap back buffer with front buffer (screen drawing) ----@return nil -function M.SwapScreenBuffer() +function SwapScreenBuffer() C.SwapScreenBuffer() end ---Register all input events ----@return nil -function M.PollInputEvents() +function PollInputEvents() C.PollInputEvents() end ---Wait for some time (halt program execution) ---@param seconds number ----@return nil -function M.WaitTime(seconds) +function WaitTime(seconds) C.WaitTime(seconds) end ---Set the seed for the random number generator ---@param seed integer ----@return nil -function M.SetRandomSeed(seed) +function SetRandomSeed(seed) C.SetRandomSeed(seed) end @@ -5179,7 +4425,7 @@ end ---@param min integer ---@param max integer ---@return integer -function M.GetRandomValue(min, max) +function GetRandomValue(min, max) return C.GetRandomValue(min, max) end @@ -5188,51 +4434,46 @@ end ---@param min integer ---@param max integer ---@return ffi.cdata* -function M.LoadRandomSequence(count, min, max) +function LoadRandomSequence(count, min, max) return C.LoadRandomSequence(count, min, max) end ---Unload random values sequence ---@param sequence ffi.cdata* ----@return nil -function M.UnloadRandomSequence(sequence) +function UnloadRandomSequence(sequence) C.UnloadRandomSequence(sequence) end ---Takes a screenshot of current screen (filename extension defines format) ---@param fileName string ----@return nil -function M.TakeScreenshot(fileName) +function TakeScreenshot(fileName) C.TakeScreenshot(fileName) end ---Set init configuration flags (view FLAGS) ----@param flags integer ----@return nil -function M.SetConfigFlags(flags) +---@param flags ConfigFlags +function SetConfigFlags(flags) C.SetConfigFlags(flags) end ---Open URL with default system browser (if available) ---@param url string ----@return nil -function M.OpenURL(url) +function OpenURL(url) C.OpenURL(url) end ---Set the current threshold (minimum) log level ----@param logLevel integer ----@return nil -function M.SetTraceLogLevel(logLevel) +---@param logLevel TraceLogLevel +function SetTraceLogLevel(logLevel) C.SetTraceLogLevel(logLevel) end ---Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) ----@param level integer +---@param level TraceLogLevel ---@param fmt string ---@param ... any ---@return nil -function M.TraceLog(level, fmt, ...) +function TraceLog(level, fmt, ...) if select("#", ...) == 0 then C.TraceLog(level, "%s", fmt) else @@ -5240,55 +4481,53 @@ function M.TraceLog(level, fmt, ...) end end +---Set custom trace log +---@param callback ffi.cdata* +function SetTraceLogCallback(callback) + C.SetTraceLogCallback(callback) +end + ---Internal memory allocator ---@param size integer ---@return ffi.cdata* -function M.MemAlloc(size) +function MemAlloc(size) return C.MemAlloc(size) end ---Internal memory reallocator ----@param ptr ffi.cdata*|string +---@param ptr ffi.cdata* ---@param size integer ---@return ffi.cdata* -function M.MemRealloc(ptr, size) - local _a1 - if type(ptr) == "string" then _a1 = ffi.cast("const void *", ptr) - else _a1 = ptr end - return C.MemRealloc(_a1, size) +function MemRealloc(ptr, size) + return C.MemRealloc(ptr, size) end ---Internal memory free ----@param ptr ffi.cdata*|string ----@return nil -function M.MemFree(ptr) - local _a1 - if type(ptr) == "string" then _a1 = ffi.cast("const void *", ptr) - else _a1 = ptr end - C.MemFree(_a1) +---@param ptr ffi.cdata* +function MemFree(ptr) + C.MemFree(ptr) end ---Load file data as byte array (read) ---@param fileName string ---@param dataSize ffi.cdata* ---@return ffi.cdata* -function M.LoadFileData(fileName, dataSize) +function LoadFileData(fileName, dataSize) return C.LoadFileData(fileName, dataSize) end ---Unload file data allocated by LoadFileData() ---@param data ffi.cdata* ----@return nil -function M.UnloadFileData(data) +function UnloadFileData(data) C.UnloadFileData(data) end ---Save data to file from byte array (write), returns true on success ---@param fileName string ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param dataSize integer ---@return boolean -function M.SaveFileData(fileName, data, dataSize) +function SaveFileData(fileName, data, dataSize) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -5296,11 +4535,11 @@ function M.SaveFileData(fileName, data, dataSize) end ---Export data to code (.h), returns true on success ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@param fileName string ---@return boolean -function M.ExportDataAsCode(data, dataSize, fileName) +function ExportDataAsCode(data, dataSize, fileName) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) @@ -5311,20 +4550,15 @@ end ---Load text data from file (read), returns a '\0' terminated string ---@param fileName string ---@return string|nil -function M.LoadFileText(fileName) - local _p = C.LoadFileText(fileName) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - C.UnloadFileText(_p) - return _s +function LoadFileText(fileName) + local _r = C.LoadFileText(fileName) + if _r == nil then return nil end + return ffi.string(_r) end ---Unload file text data allocated by LoadFileText() ----@param text raylib.char_buffer|string ----@return nil -function M.UnloadFileText(text) +---@param text ffi.cdata* +function UnloadFileText(text) C.UnloadFileText(text) end @@ -5332,54 +4566,46 @@ end ---@param fileName string ---@param text string ---@return boolean -function M.SaveFileText(fileName, text) +function SaveFileText(fileName, text) return C.SaveFileText(fileName, text) end ---Set custom file binary data loader ----@param callback raylib.LoadFileDataCallback ----@return nil -function M.SetLoadFileDataCallback(callback) - local _cb1 = pin("LoadFileDataCallback", callback) - C.SetLoadFileDataCallback(_cb1) +---@param callback ffi.cdata* +function SetLoadFileDataCallback(callback) + C.SetLoadFileDataCallback(callback) end ---Set custom file binary data saver ----@param callback raylib.SaveFileDataCallback ----@return nil -function M.SetSaveFileDataCallback(callback) - local _cb1 = pin("SaveFileDataCallback", callback) - C.SetSaveFileDataCallback(_cb1) +---@param callback ffi.cdata* +function SetSaveFileDataCallback(callback) + C.SetSaveFileDataCallback(callback) end ---Set custom file text data loader ----@param callback raylib.LoadFileTextCallback ----@return nil -function M.SetLoadFileTextCallback(callback) - local _cb1 = pin("LoadFileTextCallback", callback) - C.SetLoadFileTextCallback(_cb1) +---@param callback ffi.cdata* +function SetLoadFileTextCallback(callback) + C.SetLoadFileTextCallback(callback) end ---Set custom file text data saver ----@param callback raylib.SaveFileTextCallback ----@return nil -function M.SetSaveFileTextCallback(callback) - local _cb1 = pin("SaveFileTextCallback", callback) - C.SetSaveFileTextCallback(_cb1) +---@param callback ffi.cdata* +function SetSaveFileTextCallback(callback) + C.SetSaveFileTextCallback(callback) end ---Rename file (if exists), returns 0 on success ---@param fileName string ---@param fileRename string ---@return integer -function M.FileRename(fileName, fileRename) +function FileRename(fileName, fileRename) return C.FileRename(fileName, fileRename) end ---Remove file (if exists), returns 0 on success ---@param fileName string ---@return integer -function M.FileRemove(fileName) +function FileRemove(fileName) return C.FileRemove(fileName) end @@ -5387,7 +4613,7 @@ end ---@param srcPath string ---@param dstPath string ---@return integer -function M.FileCopy(srcPath, dstPath) +function FileCopy(srcPath, dstPath) return C.FileCopy(srcPath, dstPath) end @@ -5395,7 +4621,7 @@ end ---@param srcPath string ---@param dstPath string ---@return integer -function M.FileMove(srcPath, dstPath) +function FileMove(srcPath, dstPath) return C.FileMove(srcPath, dstPath) end @@ -5404,7 +4630,7 @@ end ---@param search string ---@param replacement string ---@return integer -function M.FileTextReplace(fileName, search, replacement) +function FileTextReplace(fileName, search, replacement) return C.FileTextReplace(fileName, search, replacement) end @@ -5412,21 +4638,21 @@ end ---@param fileName string ---@param search string ---@return integer -function M.FileTextFindIndex(fileName, search) +function FileTextFindIndex(fileName, search) return C.FileTextFindIndex(fileName, search) end ---Check if file exists ---@param fileName string ---@return boolean -function M.FileExists(fileName) +function FileExists(fileName) return C.FileExists(fileName) end ---Check if directory path exists ---@param dirPath string ---@return boolean -function M.DirectoryExists(dirPath) +function DirectoryExists(dirPath) return C.DirectoryExists(dirPath) end @@ -5434,159 +4660,131 @@ end ---@param fileName string ---@param ext string ---@return boolean -function M.IsFileExtension(fileName, ext) +function IsFileExtension(fileName, ext) return C.IsFileExtension(fileName, ext) end ---Check if file path (file or directory) is hidden by OS ---@param filePath string ---@return boolean -function M.IsFileHidden(filePath) +function IsFileHidden(filePath) return C.IsFileHidden(filePath) end ---Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) ---@param fileName string ---@return integer -function M.GetFileLength(fileName) +function GetFileLength(fileName) return C.GetFileLength(fileName) end ---Get file modification time (last write time) ---@param fileName string ---@return integer -function M.GetFileModTime(fileName) +function GetFileModTime(fileName) return C.GetFileModTime(fileName) end ---Get pointer to extension for a filename string (includes dot: '.png') ---@param fileName string ----@return string|nil -function M.GetFileExtension(fileName) - local _p = C.GetFileExtension(fileName) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetFileExtension(fileName) + local _r = C.GetFileExtension(fileName) + return _r ~= nil and ffi.string(_r) or "" end ---Get pointer to filename for a path string ---@param filePath string ----@return string|nil -function M.GetFileName(filePath) - local _p = C.GetFileName(filePath) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetFileName(filePath) + local _r = C.GetFileName(filePath) + return _r ~= nil and ffi.string(_r) or "" end ---Get filename string without extension (uses static string) ---@param filePath string ----@return string|nil -function M.GetFileNameWithoutExt(filePath) - local _p = C.GetFileNameWithoutExt(filePath) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetFileNameWithoutExt(filePath) + local _r = C.GetFileNameWithoutExt(filePath) + return _r ~= nil and ffi.string(_r) or "" end ---Get full path for a provided fileName with path (uses static string) ---@param filePath string ----@return string|nil -function M.GetDirectoryPath(filePath) - local _p = C.GetDirectoryPath(filePath) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetDirectoryPath(filePath) + local _r = C.GetDirectoryPath(filePath) + return _r ~= nil and ffi.string(_r) or "" end ---Get previous directory path for a provided path (uses static string) ---@param dirPath string ----@return string|nil -function M.GetPrevDirectoryPath(dirPath) - local _p = C.GetPrevDirectoryPath(dirPath) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetPrevDirectoryPath(dirPath) + local _r = C.GetPrevDirectoryPath(dirPath) + return _r ~= nil and ffi.string(_r) or "" end ---Get current working directory (uses static string) ----@return string|nil -function M.GetWorkingDirectory() - local _p = C.GetWorkingDirectory() - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetWorkingDirectory() + local _r = C.GetWorkingDirectory() + return _r ~= nil and ffi.string(_r) or "" end ---Get the directory of the running application (uses static string) ----@return string|nil -function M.GetApplicationDirectory() - local _p = C.GetApplicationDirectory() - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetApplicationDirectory() + local _r = C.GetApplicationDirectory() + return _r ~= nil and ffi.string(_r) or "" end ---Create directories (including full path requested), returns 0 on success ---@param dirPath string ---@return integer -function M.MakeDirectory(dirPath) +function MakeDirectory(dirPath) return C.MakeDirectory(dirPath) end ---Change working directory, returns 0 on success ---@param dirPath string ---@return integer -function M.ChangeDirectory(dirPath) +function ChangeDirectory(dirPath) return C.ChangeDirectory(dirPath) end ---Check if provided path points to a file ---@param path string ---@return boolean -function M.IsPathFile(path) +function IsPathFile(path) return C.IsPathFile(path) end ---Check if provided path points to a directory ---@param path string ---@return boolean -function M.IsPathDirectory(path) +function IsPathDirectory(path) return C.IsPathDirectory(path) end ---Check if provided path is an absolute path ---@param path string ---@return boolean -function M.IsPathAbsolute(path) +function IsPathAbsolute(path) return C.IsPathAbsolute(path) end ---Check if fileName is valid for the platform/OS ---@param fileName string ---@return boolean -function M.IsFileNameValid(fileName) +function IsFileNameValid(fileName) return C.IsFileNameValid(fileName) end ---Load directory filepaths, files and directories, no subdirs scan ---@param dirPath string ----@return raylib.FilePathList -function M.LoadDirectoryFiles(dirPath) +---@return FilePathList +function LoadDirectoryFiles(dirPath) return C.LoadDirectoryFiles(dirPath) end @@ -5594,41 +4792,39 @@ end ---@param basePath string ---@param filter string ---@param scanSubdirs boolean ----@return raylib.FilePathList -function M.LoadDirectoryFilesEx(basePath, filter, scanSubdirs) +---@return FilePathList +function LoadDirectoryFilesEx(basePath, filter, scanSubdirs) return C.LoadDirectoryFilesEx(basePath, filter, scanSubdirs) end ---Unload filepaths ----@param files raylib.FilePathList ----@return nil -function M.UnloadDirectoryFiles(files) +---@param files FilePathList +function UnloadDirectoryFiles(files) C.UnloadDirectoryFiles(files) end ---Check if file has been dropped into window ---@return boolean -function M.IsFileDropped() +function IsFileDropped() return C.IsFileDropped() end ---Load dropped filepaths ----@return raylib.FilePathList -function M.LoadDroppedFiles() +---@return FilePathList +function LoadDroppedFiles() return C.LoadDroppedFiles() end ---Unload dropped filepaths ----@param files raylib.FilePathList ----@return nil -function M.UnloadDroppedFiles(files) +---@param files FilePathList +function UnloadDroppedFiles(files) C.UnloadDroppedFiles(files) end ---Get the file count in a directory ---@param dirPath string ---@return integer -function M.GetDirectoryFileCount(dirPath) +function GetDirectoryFileCount(dirPath) return C.GetDirectoryFileCount(dirPath) end @@ -5637,16 +4833,16 @@ end ---@param filter string ---@param scanSubdirs boolean ---@return integer -function M.GetDirectoryFileCountEx(basePath, filter, scanSubdirs) +function GetDirectoryFileCountEx(basePath, filter, scanSubdirs) return C.GetDirectoryFileCountEx(basePath, filter, scanSubdirs) end ---Compress data (DEFLATE algorithm), memory must be MemFree() ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@param compDataSize ffi.cdata* ---@return ffi.cdata* -function M.CompressData(data, dataSize, compDataSize) +function CompressData(data, dataSize, compDataSize) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) @@ -5655,11 +4851,11 @@ function M.CompressData(data, dataSize, compDataSize) end ---Decompress data (DEFLATE algorithm), memory must be MemFree() ----@param compData string|integer[] +---@param compData string|integer[]|ffi.cdata* ---@param compDataSize integer ---@param dataSize ffi.cdata* ---@return ffi.cdata* -function M.DecompressData(compData, compDataSize, dataSize) +function DecompressData(compData, compDataSize, dataSize) local _a1 if type(compData) == "string" then _a1 = ffi.cast("const unsigned char *", compData) elseif type(compData) == "table" then _a1 = to_array("unsigned char", compData) @@ -5668,37 +4864,33 @@ function M.DecompressData(compData, compDataSize, dataSize) end ---Encode data to Base64 string (includes NULL terminator), memory must be MemFree() ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@param outputSize ffi.cdata* ---@return string|nil -function M.EncodeDataBase64(data, dataSize, outputSize) +function EncodeDataBase64(data, dataSize, outputSize) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) else _a1 = data end - local _p = C.EncodeDataBase64(_a1, dataSize, outputSize) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - C.MemFree(_p) - return _s + local _r = C.EncodeDataBase64(_a1, dataSize, outputSize) + if _r == nil then return nil end + return ffi.string(_r) end ---Decode Base64 string (expected NULL terminated), memory must be MemFree() ---@param text string ---@param outputSize ffi.cdata* ---@return ffi.cdata* -function M.DecodeDataBase64(text, outputSize) +function DecodeDataBase64(text, outputSize) return C.DecodeDataBase64(text, outputSize) end ---Compute CRC32 hash code ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@return integer -function M.ComputeCRC32(data, dataSize) +function ComputeCRC32(data, dataSize) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) @@ -5707,10 +4899,10 @@ function M.ComputeCRC32(data, dataSize) end ---Compute MD5 hash code, returns static int[4] (16 bytes) ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@return ffi.cdata* -function M.ComputeMD5(data, dataSize) +function ComputeMD5(data, dataSize) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) @@ -5719,10 +4911,10 @@ function M.ComputeMD5(data, dataSize) end ---Compute SHA1 hash code, returns static int[5] (20 bytes) ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@return ffi.cdata* -function M.ComputeSHA1(data, dataSize) +function ComputeSHA1(data, dataSize) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) @@ -5731,10 +4923,10 @@ function M.ComputeSHA1(data, dataSize) end ---Compute SHA256 hash code, returns static int[8] (32 bytes) ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ---@return ffi.cdata* -function M.ComputeSHA256(data, dataSize) +function ComputeSHA256(data, dataSize) local _a1 if type(data) == "string" then _a1 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a1 = to_array("unsigned char", data) @@ -5744,203 +4936,186 @@ end ---Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS ---@param fileName string ----@return raylib.AutomationEventList -function M.LoadAutomationEventList(fileName) +---@return AutomationEventList +function LoadAutomationEventList(fileName) return C.LoadAutomationEventList(fileName) end ---Unload automation events list from file ----@param list raylib.AutomationEventList ----@return nil -function M.UnloadAutomationEventList(list) +---@param list AutomationEventList +function UnloadAutomationEventList(list) C.UnloadAutomationEventList(list) end ---Export automation events list as text file ----@param list raylib.AutomationEventList +---@param list AutomationEventList ---@param fileName string ---@return boolean -function M.ExportAutomationEventList(list, fileName) +function ExportAutomationEventList(list, fileName) return C.ExportAutomationEventList(list, fileName) end ---Set automation event list to record to ----@param list raylib.AutomationEventList ----@return raylib.AutomationEventList -function M.SetAutomationEventList(list) - local _o1 = ffi.new("AutomationEventList[1]", list) - C.SetAutomationEventList(_o1) - return _o1[0] +---@param list ffi.cdata* +function SetAutomationEventList(list) + C.SetAutomationEventList(list) end ---Set automation event internal base frame to start recording ---@param frame integer ----@return nil -function M.SetAutomationEventBaseFrame(frame) +function SetAutomationEventBaseFrame(frame) C.SetAutomationEventBaseFrame(frame) end ---Start recording automation events (AutomationEventList must be set) ----@return nil -function M.StartAutomationEventRecording() +function StartAutomationEventRecording() C.StartAutomationEventRecording() end ---Stop recording automation events ----@return nil -function M.StopAutomationEventRecording() +function StopAutomationEventRecording() C.StopAutomationEventRecording() end ---Play a recorded automation event ----@param event raylib.AutomationEvent ----@return nil -function M.PlayAutomationEvent(event) +---@param event AutomationEvent +function PlayAutomationEvent(event) C.PlayAutomationEvent(event) end ---Check if key has been pressed once ----@param key integer +---@param key KeyboardKey ---@return boolean -function M.IsKeyPressed(key) +function IsKeyPressed(key) return C.IsKeyPressed(key) end ---Check if key has been pressed again ----@param key integer +---@param key KeyboardKey ---@return boolean -function M.IsKeyPressedRepeat(key) +function IsKeyPressedRepeat(key) return C.IsKeyPressedRepeat(key) end ---Check if key is being pressed ----@param key integer +---@param key KeyboardKey ---@return boolean -function M.IsKeyDown(key) +function IsKeyDown(key) return C.IsKeyDown(key) end ---Check if key has been released once ----@param key integer +---@param key KeyboardKey ---@return boolean -function M.IsKeyReleased(key) +function IsKeyReleased(key) return C.IsKeyReleased(key) end ---Check if key is NOT being pressed ----@param key integer +---@param key KeyboardKey ---@return boolean -function M.IsKeyUp(key) +function IsKeyUp(key) return C.IsKeyUp(key) end ---Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty ----@return integer -function M.GetKeyPressed() +---@return KeyboardKey +function GetKeyPressed() return C.GetKeyPressed() end ---Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty ---@return integer -function M.GetCharPressed() +function GetCharPressed() return C.GetCharPressed() end ---Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard) ----@param key integer ----@return string|nil -function M.GetKeyName(key) - local _p = C.GetKeyName(key) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@param key KeyboardKey +---@return string +function GetKeyName(key) + local _r = C.GetKeyName(key) + return _r ~= nil and ffi.string(_r) or "" end ---Set a custom key to exit program (default is ESC) ----@param key integer ----@return nil -function M.SetExitKey(key) +---@param key KeyboardKey +function SetExitKey(key) C.SetExitKey(key) end ---Check if gamepad is available ---@param gamepad integer ---@return boolean -function M.IsGamepadAvailable(gamepad) +function IsGamepadAvailable(gamepad) return C.IsGamepadAvailable(gamepad) end ---Get gamepad internal name id ---@param gamepad integer ----@return string|nil -function M.GetGamepadName(gamepad) - local _p = C.GetGamepadName(gamepad) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GetGamepadName(gamepad) + local _r = C.GetGamepadName(gamepad) + return _r ~= nil and ffi.string(_r) or "" end ---Check if gamepad button has been pressed once ---@param gamepad integer ----@param button integer +---@param button GamepadButton ---@return boolean -function M.IsGamepadButtonPressed(gamepad, button) +function IsGamepadButtonPressed(gamepad, button) return C.IsGamepadButtonPressed(gamepad, button) end ---Check if gamepad button is being pressed ---@param gamepad integer ----@param button integer +---@param button GamepadButton ---@return boolean -function M.IsGamepadButtonDown(gamepad, button) +function IsGamepadButtonDown(gamepad, button) return C.IsGamepadButtonDown(gamepad, button) end ---Check if gamepad button has been released once ---@param gamepad integer ----@param button integer +---@param button GamepadButton ---@return boolean -function M.IsGamepadButtonReleased(gamepad, button) +function IsGamepadButtonReleased(gamepad, button) return C.IsGamepadButtonReleased(gamepad, button) end ---Check if gamepad button is NOT being pressed ---@param gamepad integer ----@param button integer +---@param button GamepadButton ---@return boolean -function M.IsGamepadButtonUp(gamepad, button) +function IsGamepadButtonUp(gamepad, button) return C.IsGamepadButtonUp(gamepad, button) end ---Get the last gamepad button pressed ----@return integer -function M.GetGamepadButtonPressed() +---@return GamepadButton +function GetGamepadButtonPressed() return C.GetGamepadButtonPressed() end ---Get axis count for a gamepad ---@param gamepad integer ---@return integer -function M.GetGamepadAxisCount(gamepad) +function GetGamepadAxisCount(gamepad) return C.GetGamepadAxisCount(gamepad) end ---Get movement value for a gamepad axis ---@param gamepad integer ----@param axis integer +---@param axis GamepadAxis ---@return number -function M.GetGamepadAxisMovement(gamepad, axis) +function GetGamepadAxisMovement(gamepad, axis) return C.GetGamepadAxisMovement(gamepad, axis) end ---Set internal gamepad mappings (SDL_GameControllerDB) ---@param mappings string ---@return integer -function M.SetGamepadMappings(mappings) +function SetGamepadMappings(mappings) return C.SetGamepadMappings(mappings) end @@ -5949,244 +5124,229 @@ end ---@param leftMotor number ---@param rightMotor number ---@param duration number ----@return nil -function M.SetGamepadVibration(gamepad, leftMotor, rightMotor, duration) +function SetGamepadVibration(gamepad, leftMotor, rightMotor, duration) C.SetGamepadVibration(gamepad, leftMotor, rightMotor, duration) end ---Check if mouse button has been pressed once ----@param button integer +---@param button MouseButton ---@return boolean -function M.IsMouseButtonPressed(button) +function IsMouseButtonPressed(button) return C.IsMouseButtonPressed(button) end ---Check if mouse button is being pressed ----@param button integer +---@param button MouseButton ---@return boolean -function M.IsMouseButtonDown(button) +function IsMouseButtonDown(button) return C.IsMouseButtonDown(button) end ---Check if mouse button has been released once ----@param button integer +---@param button MouseButton ---@return boolean -function M.IsMouseButtonReleased(button) +function IsMouseButtonReleased(button) return C.IsMouseButtonReleased(button) end ---Check if mouse button is NOT being pressed ----@param button integer +---@param button MouseButton ---@return boolean -function M.IsMouseButtonUp(button) +function IsMouseButtonUp(button) return C.IsMouseButtonUp(button) end ---Get mouse position X ---@return integer -function M.GetMouseX() +function GetMouseX() return C.GetMouseX() end ---Get mouse position Y ---@return integer -function M.GetMouseY() +function GetMouseY() return C.GetMouseY() end ---Get mouse position XY ----@return raylib.Vector2 -function M.GetMousePosition() +---@return Vector2 +function GetMousePosition() return C.GetMousePosition() end ---Get mouse delta between frames ----@return raylib.Vector2 -function M.GetMouseDelta() +---@return Vector2 +function GetMouseDelta() return C.GetMouseDelta() end ---Set mouse position XY ---@param x integer ---@param y integer ----@return nil -function M.SetMousePosition(x, y) +function SetMousePosition(x, y) C.SetMousePosition(x, y) end ---Set mouse offset ---@param offsetX integer ---@param offsetY integer ----@return nil -function M.SetMouseOffset(offsetX, offsetY) +function SetMouseOffset(offsetX, offsetY) C.SetMouseOffset(offsetX, offsetY) end ---Set mouse scaling ---@param scaleX number ---@param scaleY number ----@return nil -function M.SetMouseScale(scaleX, scaleY) +function SetMouseScale(scaleX, scaleY) C.SetMouseScale(scaleX, scaleY) end ---Get mouse wheel movement for X or Y, whichever is larger ---@return number -function M.GetMouseWheelMove() +function GetMouseWheelMove() return C.GetMouseWheelMove() end ---Get mouse wheel movement for both X and Y ----@return raylib.Vector2 -function M.GetMouseWheelMoveV() +---@return Vector2 +function GetMouseWheelMoveV() return C.GetMouseWheelMoveV() end ---Set mouse cursor ----@param cursor integer ----@return nil -function M.SetMouseCursor(cursor) +---@param cursor MouseCursor +function SetMouseCursor(cursor) C.SetMouseCursor(cursor) end ---Get touch position X for touch point 0 (relative to screen size) ---@return integer -function M.GetTouchX() +function GetTouchX() return C.GetTouchX() end ---Get touch position Y for touch point 0 (relative to screen size) ---@return integer -function M.GetTouchY() +function GetTouchY() return C.GetTouchY() end ---Get touch position XY for a touch point index (relative to screen size) ---@param index integer ----@return raylib.Vector2 -function M.GetTouchPosition(index) +---@return Vector2 +function GetTouchPosition(index) return C.GetTouchPosition(index) end ---Get touch point identifier for provided index ---@param index integer ---@return integer -function M.GetTouchPointId(index) +function GetTouchPointId(index) return C.GetTouchPointId(index) end ---Get number of touch points ---@return integer -function M.GetTouchPointCount() +function GetTouchPointCount() return C.GetTouchPointCount() end ---Enable a set of gestures using flags ----@param flags integer ----@return nil -function M.SetGesturesEnabled(flags) +---@param flags Gesture +function SetGesturesEnabled(flags) C.SetGesturesEnabled(flags) end ---Check if gesture has been detected ----@param gesture integer +---@param gesture Gesture ---@return boolean -function M.IsGestureDetected(gesture) +function IsGestureDetected(gesture) return C.IsGestureDetected(gesture) end ---Get latest detected gesture ----@return integer -function M.GetGestureDetected() +---@return Gesture +function GetGestureDetected() return C.GetGestureDetected() end ---Get gesture hold time in seconds ---@return number -function M.GetGestureHoldDuration() +function GetGestureHoldDuration() return C.GetGestureHoldDuration() end ---Get gesture drag vector ----@return raylib.Vector2 -function M.GetGestureDragVector() +---@return Vector2 +function GetGestureDragVector() return C.GetGestureDragVector() end ---Get gesture drag angle ---@return number -function M.GetGestureDragAngle() +function GetGestureDragAngle() return C.GetGestureDragAngle() end ---Get gesture pinch delta ----@return raylib.Vector2 -function M.GetGesturePinchVector() +---@return Vector2 +function GetGesturePinchVector() return C.GetGesturePinchVector() end ---Get gesture pinch angle ---@return number -function M.GetGesturePinchAngle() +function GetGesturePinchAngle() return C.GetGesturePinchAngle() end ---Update camera position for selected mode ----@param camera raylib.Camera ----@param mode integer ----@return raylib.Camera -function M.UpdateCamera(camera, mode) - local _o1 = ffi.new("Camera[1]", camera) - C.UpdateCamera(_o1, mode) - return _o1[0] +---@param camera ffi.cdata* +---@param mode CameraMode +function UpdateCamera(camera, mode) + C.UpdateCamera(camera, mode) end ---Update camera movement/rotation ----@param camera raylib.Camera ----@param movement raylib.Vector3 ----@param rotation raylib.Vector3 +---@param camera ffi.cdata* +---@param movement Vector3 +---@param rotation Vector3 ---@param zoom number ----@return raylib.Camera -function M.UpdateCameraPro(camera, movement, rotation, zoom) - local _o1 = ffi.new("Camera[1]", camera) - C.UpdateCameraPro(_o1, movement, rotation, zoom) - return _o1[0] +function UpdateCameraPro(camera, movement, rotation, zoom) + C.UpdateCameraPro(camera, movement, rotation, zoom) end ---Set texture and rectangle to be used on shapes drawing ----@param texture raylib.Texture2D ----@param rec raylib.Rectangle ----@return nil -function M.SetShapesTexture(texture, rec) +---@param texture Texture2D +---@param rec Rectangle +function SetShapesTexture(texture, rec) C.SetShapesTexture(texture, rec) end ---Get texture that is used for shapes drawing ----@return raylib.Texture2D -function M.GetShapesTexture() +---@return Texture2D +function GetShapesTexture() return C.GetShapesTexture() end ---Get texture source rectangle that is used for shapes drawing ----@return raylib.Rectangle -function M.GetShapesTextureRectangle() +---@return Rectangle +function GetShapesTextureRectangle() return C.GetShapesTextureRectangle() end ---Draw a pixel using geometry [Can be slow, use with care] ---@param posX integer ---@param posY integer ----@param color raylib.Color ----@return nil -function M.DrawPixel(posX, posY, color) +---@param color Color +function DrawPixel(posX, posY, color) C.DrawPixel(posX, posY, color) end ---Draw a pixel using geometry (Vector version) [Can be slow, use with care] ----@param position raylib.Vector2 ----@param color raylib.Color ----@return nil -function M.DrawPixelV(position, color) +---@param position Vector2 +---@param color Color +function DrawPixelV(position, color) C.DrawPixelV(position, color) end @@ -6195,37 +5355,33 @@ end ---@param startPosY integer ---@param endPosX integer ---@param endPosY integer ----@param color raylib.Color ----@return nil -function M.DrawLine(startPosX, startPosY, endPosX, endPosY, color) +---@param color Color +function DrawLine(startPosX, startPosY, endPosX, endPosY, color) C.DrawLine(startPosX, startPosY, endPosX, endPosY, color) end ---Draw a line (using gl lines) ----@param startPos raylib.Vector2 ----@param endPos raylib.Vector2 ----@param color raylib.Color ----@return nil -function M.DrawLineV(startPos, endPos, color) +---@param startPos Vector2 +---@param endPos Vector2 +---@param color Color +function DrawLineV(startPos, endPos, color) C.DrawLineV(startPos, endPos, color) end ---Draw a line (using triangles/quads) ----@param startPos raylib.Vector2 ----@param endPos raylib.Vector2 +---@param startPos Vector2 +---@param endPos Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawLineEx(startPos, endPos, thick, color) +---@param color Color +function DrawLineEx(startPos, endPos, thick, color) C.DrawLineEx(startPos, endPos, thick, color) end ---Draw lines sequence (using gl lines) ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return nil -function M.DrawLineStrip(points, pointCount, color) +---@param color Color +function DrawLineStrip(points, pointCount, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6233,75 +5389,68 @@ function M.DrawLineStrip(points, pointCount, color) end ---Draw line segment cubic-bezier in-out interpolation ----@param startPos raylib.Vector2 ----@param endPos raylib.Vector2 +---@param startPos Vector2 +---@param endPos Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawLineBezier(startPos, endPos, thick, color) +---@param color Color +function DrawLineBezier(startPos, endPos, thick, color) C.DrawLineBezier(startPos, endPos, thick, color) end ---Draw a dashed line ----@param startPos raylib.Vector2 ----@param endPos raylib.Vector2 +---@param startPos Vector2 +---@param endPos Vector2 ---@param dashSize integer ---@param spaceSize integer ----@param color raylib.Color ----@return nil -function M.DrawLineDashed(startPos, endPos, dashSize, spaceSize, color) +---@param color Color +function DrawLineDashed(startPos, endPos, dashSize, spaceSize, color) C.DrawLineDashed(startPos, endPos, dashSize, spaceSize, color) end ---Draw a color-filled triangle, counter-clockwise vertex order ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 ----@param color raylib.Color ----@return nil -function M.DrawTriangle(v1, v2, v3, color) +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 +---@param color Color +function DrawTriangle(v1, v2, v3, color) C.DrawTriangle(v1, v2, v3, color) end ---Draw triangle with interpolated colors, counter-clockwise vertex/color order ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 ----@param c1 raylib.Color ----@param c2 raylib.Color ----@param c3 raylib.Color ----@return nil -function M.DrawTriangleGradient(v1, v2, v3, c1, c2, c3) +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 +---@param c1 Color +---@param c2 Color +---@param c3 Color +function DrawTriangleGradient(v1, v2, v3, c1, c2, c3) C.DrawTriangleGradient(v1, v2, v3, c1, c2, c3) end ---Draw triangle outline, counter-clockwise vertex order ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 ----@param color raylib.Color ----@return nil -function M.DrawTriangleLines(v1, v2, v3, color) +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 +---@param color Color +function DrawTriangleLines(v1, v2, v3, color) C.DrawTriangleLines(v1, v2, v3, color) end ---Draw triangle outline with line thickness, counter-clockwise vertex order ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawTriangleLinesEx(v1, v2, v3, thick, color) +---@param color Color +function DrawTriangleLinesEx(v1, v2, v3, thick, color) C.DrawTriangleLinesEx(v1, v2, v3, thick, color) end ---Draw a triangle fan defined by points (first vertex is the center) ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return nil -function M.DrawTriangleFan(points, pointCount, color) +---@param color Color +function DrawTriangleFan(points, pointCount, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6309,11 +5458,10 @@ function M.DrawTriangleFan(points, pointCount, color) end ---Draw a triangle strip defined by points ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return nil -function M.DrawTriangleStrip(points, pointCount, color) +---@param color Color +function DrawTriangleStrip(points, pointCount, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6325,36 +5473,32 @@ end ---@param posY integer ---@param width integer ---@param height integer ----@param color raylib.Color ----@return nil -function M.DrawRectangle(posX, posY, width, height, color) +---@param color Color +function DrawRectangle(posX, posY, width, height, color) C.DrawRectangle(posX, posY, width, height, color) end ---Draw a color-filled rectangle (Vector version) ----@param position raylib.Vector2 ----@param size raylib.Vector2 ----@param color raylib.Color ----@return nil -function M.DrawRectangleV(position, size, color) +---@param position Vector2 +---@param size Vector2 +---@param color Color +function DrawRectangleV(position, size, color) C.DrawRectangleV(position, size, color) end ---Draw a color-filled rectangle ----@param rec raylib.Rectangle ----@param color raylib.Color ----@return nil -function M.DrawRectangleRec(rec, color) +---@param rec Rectangle +---@param color Color +function DrawRectangleRec(rec, color) C.DrawRectangleRec(rec, color) end ---Draw a color-filled rectangle with pro parameters ----@param rec raylib.Rectangle ----@param origin raylib.Vector2 +---@param rec Rectangle +---@param origin Vector2 ---@param rotation number ----@param color raylib.Color ----@return nil -function M.DrawRectanglePro(rec, origin, rotation, color) +---@param color Color +function DrawRectanglePro(rec, origin, rotation, color) C.DrawRectanglePro(rec, origin, rotation, color) end @@ -6363,10 +5507,9 @@ end ---@param posY integer ---@param width integer ---@param height integer ----@param top raylib.Color ----@param bottom raylib.Color ----@return nil -function M.DrawRectangleGradientV(posX, posY, width, height, top, bottom) +---@param top Color +---@param bottom Color +function DrawRectangleGradientV(posX, posY, width, height, top, bottom) C.DrawRectangleGradientV(posX, posY, width, height, top, bottom) end @@ -6375,21 +5518,19 @@ end ---@param posY integer ---@param width integer ---@param height integer ----@param left raylib.Color ----@param right raylib.Color ----@return nil -function M.DrawRectangleGradientH(posX, posY, width, height, left, right) +---@param left Color +---@param right Color +function DrawRectangleGradientH(posX, posY, width, height, left, right) C.DrawRectangleGradientH(posX, posY, width, height, left, right) end ---Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order ----@param rec raylib.Rectangle ----@param col1 raylib.Color ----@param col2 raylib.Color ----@param col3 raylib.Color ----@param col4 raylib.Color ----@return nil -function M.DrawRectangleGradientEx(rec, col1, col2, col3, col4) +---@param rec Rectangle +---@param col1 Color +---@param col2 Color +---@param col3 Color +---@param col4 Color +function DrawRectangleGradientEx(rec, col1, col2, col3, col4) C.DrawRectangleGradientEx(rec, col1, col2, col3, col4) end @@ -6398,83 +5539,75 @@ end ---@param posY integer ---@param width integer ---@param height integer ----@param color raylib.Color ----@return nil -function M.DrawRectangleLines(posX, posY, width, height, color) +---@param color Color +function DrawRectangleLines(posX, posY, width, height, color) C.DrawRectangleLines(posX, posY, width, height, color) end ---Draw rectangle outline with line thickness ----@param rec raylib.Rectangle +---@param rec Rectangle ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawRectangleLinesEx(rec, thick, color) +---@param color Color +function DrawRectangleLinesEx(rec, thick, color) C.DrawRectangleLinesEx(rec, thick, color) end ---Draw rectangle with rounded edges ----@param rec raylib.Rectangle +---@param rec Rectangle ---@param roundness number ---@param segments integer ----@param color raylib.Color ----@return nil -function M.DrawRectangleRounded(rec, roundness, segments, color) +---@param color Color +function DrawRectangleRounded(rec, roundness, segments, color) C.DrawRectangleRounded(rec, roundness, segments, color) end ---Draw rectangle lines with rounded edges ----@param rec raylib.Rectangle +---@param rec Rectangle ---@param roundness number ---@param segments integer ----@param color raylib.Color ----@return nil -function M.DrawRectangleRoundedLines(rec, roundness, segments, color) +---@param color Color +function DrawRectangleRoundedLines(rec, roundness, segments, color) C.DrawRectangleRoundedLines(rec, roundness, segments, color) end ---Draw rectangle lines with rounded edges outline and line thickness ----@param rec raylib.Rectangle +---@param rec Rectangle ---@param roundness number ---@param segments integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawRectangleRoundedLinesEx(rec, roundness, segments, thick, color) +---@param color Color +function DrawRectangleRoundedLinesEx(rec, roundness, segments, thick, color) C.DrawRectangleRoundedLinesEx(rec, roundness, segments, thick, color) end ---Draw a polygon of n sides ----@param center raylib.Vector2 +---@param center Vector2 ---@param sides integer ---@param radius number ---@param rotation number ----@param color raylib.Color ----@return nil -function M.DrawPoly(center, sides, radius, rotation, color) +---@param color Color +function DrawPoly(center, sides, radius, rotation, color) C.DrawPoly(center, sides, radius, rotation, color) end ---Draw a polygon outline of n sides ----@param center raylib.Vector2 +---@param center Vector2 ---@param sides integer ---@param radius number ---@param rotation number ----@param color raylib.Color ----@return nil -function M.DrawPolyLines(center, sides, radius, rotation, color) +---@param color Color +function DrawPolyLines(center, sides, radius, rotation, color) C.DrawPolyLines(center, sides, radius, rotation, color) end ---Draw a polygon outline of n sides with line thickness ----@param center raylib.Vector2 +---@param center Vector2 ---@param sides integer ---@param radius number ---@param rotation number ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawPolyLinesEx(center, sides, radius, rotation, thick, color) +---@param color Color +function DrawPolyLinesEx(center, sides, radius, rotation, thick, color) C.DrawPolyLinesEx(center, sides, radius, rotation, thick, color) end @@ -6482,65 +5615,59 @@ end ---@param centerX integer ---@param centerY integer ---@param radius number ----@param color raylib.Color ----@return nil -function M.DrawCircle(centerX, centerY, radius, color) +---@param color Color +function DrawCircle(centerX, centerY, radius, color) C.DrawCircle(centerX, centerY, radius, color) end ---Draw a color-filled circle (Vector version) ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ----@param color raylib.Color ----@return nil -function M.DrawCircleV(center, radius, color) +---@param color Color +function DrawCircleV(center, radius, color) C.DrawCircleV(center, radius, color) end ---Draw a gradient-filled circle ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ----@param inner raylib.Color ----@param outer raylib.Color ----@return nil -function M.DrawCircleGradient(center, radius, inner, outer) +---@param inner Color +---@param outer Color +function DrawCircleGradient(center, radius, inner, outer) C.DrawCircleGradient(center, radius, inner, outer) end ---Draw a piece of a circle ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ---@param startAngle number ---@param endAngle number ---@param segments integer ----@param color raylib.Color ----@return nil -function M.DrawCircleSector(center, radius, startAngle, endAngle, segments, color) +---@param color Color +function DrawCircleSector(center, radius, startAngle, endAngle, segments, color) C.DrawCircleSector(center, radius, startAngle, endAngle, segments, color) end ---Draw circle sector outline ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ---@param startAngle number ---@param endAngle number ---@param segments integer ----@param color raylib.Color ----@return nil -function M.DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color) +---@param color Color +function DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color) C.DrawCircleSectorLines(center, radius, startAngle, endAngle, segments, color) end ---Draw circle sector outline with thickness ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ---@param startAngle number ---@param endAngle number ---@param segments integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawCircleSectorLinesEx(center, radius, startAngle, endAngle, segments, thick, color) +---@param color Color +function DrawCircleSectorLinesEx(center, radius, startAngle, endAngle, segments, thick, color) C.DrawCircleSectorLinesEx(center, radius, startAngle, endAngle, segments, thick, color) end @@ -6548,28 +5675,25 @@ end ---@param centerX integer ---@param centerY integer ---@param radius number ----@param color raylib.Color ----@return nil -function M.DrawCircleLines(centerX, centerY, radius, color) +---@param color Color +function DrawCircleLines(centerX, centerY, radius, color) C.DrawCircleLines(centerX, centerY, radius, color) end ---Draw circle outline (Vector version) ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ----@param color raylib.Color ----@return nil -function M.DrawCircleLinesV(center, radius, color) +---@param color Color +function DrawCircleLinesV(center, radius, color) C.DrawCircleLinesV(center, radius, color) end ---Draw circle outline with line thickness ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawCircleLinesEx(center, radius, thick, color) +---@param color Color +function DrawCircleLinesEx(center, radius, thick, color) C.DrawCircleLinesEx(center, radius, thick, color) end @@ -6578,19 +5702,17 @@ end ---@param centerY integer ---@param radiusH number ---@param radiusV number ----@param color raylib.Color ----@return nil -function M.DrawEllipse(centerX, centerY, radiusH, radiusV, color) +---@param color Color +function DrawEllipse(centerX, centerY, radiusH, radiusV, color) C.DrawEllipse(centerX, centerY, radiusH, radiusV, color) end ---Draw ellipse (Vector version) ----@param center raylib.Vector2 +---@param center Vector2 ---@param radiusH number ---@param radiusV number ----@param color raylib.Color ----@return nil -function M.DrawEllipseV(center, radiusH, radiusV, color) +---@param color Color +function DrawEllipseV(center, radiusH, radiusV, color) C.DrawEllipseV(center, radiusH, radiusV, color) end @@ -6599,80 +5721,73 @@ end ---@param centerY integer ---@param radiusH number ---@param radiusV number ----@param color raylib.Color ----@return nil -function M.DrawEllipseLines(centerX, centerY, radiusH, radiusV, color) +---@param color Color +function DrawEllipseLines(centerX, centerY, radiusH, radiusV, color) C.DrawEllipseLines(centerX, centerY, radiusH, radiusV, color) end ---Draw ellipse outline (Vector version) ----@param center raylib.Vector2 +---@param center Vector2 ---@param radiusH number ---@param radiusV number ----@param color raylib.Color ----@return nil -function M.DrawEllipseLinesV(center, radiusH, radiusV, color) +---@param color Color +function DrawEllipseLinesV(center, radiusH, radiusV, color) C.DrawEllipseLinesV(center, radiusH, radiusV, color) end ---Draw ellipse outline with line thickness ----@param center raylib.Vector2 +---@param center Vector2 ---@param radiusH number ---@param radiusV number ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawEllipseLinesEx(center, radiusH, radiusV, thick, color) +---@param color Color +function DrawEllipseLinesEx(center, radiusH, radiusV, thick, color) C.DrawEllipseLinesEx(center, radiusH, radiusV, thick, color) end ---Draw ring ----@param center raylib.Vector2 +---@param center Vector2 ---@param innerRadius number ---@param outerRadius number ---@param startAngle number ---@param endAngle number ---@param segments integer ----@param color raylib.Color ----@return nil -function M.DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) +---@param color Color +function DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) C.DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) end ---Draw ring outline ----@param center raylib.Vector2 +---@param center Vector2 ---@param innerRadius number ---@param outerRadius number ---@param startAngle number ---@param endAngle number ---@param segments integer ----@param color raylib.Color ----@return nil -function M.DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) +---@param color Color +function DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) C.DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, color) end ---Draw ring outline with line thickness ----@param center raylib.Vector2 +---@param center Vector2 ---@param innerRadius number ---@param outerRadius number ---@param startAngle number ---@param endAngle number ---@param segments integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawRingLinesEx(center, innerRadius, outerRadius, startAngle, endAngle, segments, thick, color) +---@param color Color +function DrawRingLinesEx(center, innerRadius, outerRadius, startAngle, endAngle, segments, thick, color) C.DrawRingLinesEx(center, innerRadius, outerRadius, startAngle, endAngle, segments, thick, color) end ---Draw spline: Linear, minimum 2 points ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineLinear(points, pointCount, thick, color) +---@param color Color +function DrawSplineLinear(points, pointCount, thick, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6680,12 +5795,11 @@ function M.DrawSplineLinear(points, pointCount, thick, color) end ---Draw spline: B-Spline, minimum 4 points ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineBasis(points, pointCount, thick, color) +---@param color Color +function DrawSplineBasis(points, pointCount, thick, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6693,12 +5807,11 @@ function M.DrawSplineBasis(points, pointCount, thick, color) end ---Draw spline: Catmull-Rom, minimum 4 points ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineCatmullRom(points, pointCount, thick, color) +---@param color Color +function DrawSplineCatmullRom(points, pointCount, thick, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6706,12 +5819,11 @@ function M.DrawSplineCatmullRom(points, pointCount, thick, color) end ---Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineBezierQuadratic(points, pointCount, thick, color) +---@param color Color +function DrawSplineBezierQuadratic(points, pointCount, thick, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6719,12 +5831,11 @@ function M.DrawSplineBezierQuadratic(points, pointCount, thick, color) end ---Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] ----@param points raylib.Vector2[] +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineBezierCubic(points, pointCount, thick, color) +---@param color Color +function DrawSplineBezierCubic(points, pointCount, thick, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector2", points) else _a1 = points end @@ -6732,194 +5843,189 @@ function M.DrawSplineBezierCubic(points, pointCount, thick, color) end ---Draw spline segment: Linear, 2 points ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 +---@param p1 Vector2 +---@param p2 Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineSegmentLinear(p1, p2, thick, color) +---@param color Color +function DrawSplineSegmentLinear(p1, p2, thick, color) C.DrawSplineSegmentLinear(p1, p2, thick, color) end ---Draw spline segment: B-Spline, 4 points ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 ----@param p3 raylib.Vector2 ----@param p4 raylib.Vector2 +---@param p1 Vector2 +---@param p2 Vector2 +---@param p3 Vector2 +---@param p4 Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineSegmentBasis(p1, p2, p3, p4, thick, color) +---@param color Color +function DrawSplineSegmentBasis(p1, p2, p3, p4, thick, color) C.DrawSplineSegmentBasis(p1, p2, p3, p4, thick, color) end ---Draw spline segment: Catmull-Rom, 4 points ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 ----@param p3 raylib.Vector2 ----@param p4 raylib.Vector2 +---@param p1 Vector2 +---@param p2 Vector2 +---@param p3 Vector2 +---@param p4 Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineSegmentCatmullRom(p1, p2, p3, p4, thick, color) +---@param color Color +function DrawSplineSegmentCatmullRom(p1, p2, p3, p4, thick, color) C.DrawSplineSegmentCatmullRom(p1, p2, p3, p4, thick, color) end ---Draw spline segment: Quadratic Bezier, 2 points, 1 control point ----@param p1 raylib.Vector2 ----@param c2 raylib.Vector2 ----@param p3 raylib.Vector2 +---@param p1 Vector2 +---@param c2 Vector2 +---@param p3 Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineSegmentBezierQuadratic(p1, c2, p3, thick, color) +---@param color Color +function DrawSplineSegmentBezierQuadratic(p1, c2, p3, thick, color) C.DrawSplineSegmentBezierQuadratic(p1, c2, p3, thick, color) end ---Draw spline segment: Cubic Bezier, 2 points, 2 control points ----@param p1 raylib.Vector2 ----@param c2 raylib.Vector2 ----@param c3 raylib.Vector2 ----@param p4 raylib.Vector2 +---@param p1 Vector2 +---@param c2 Vector2 +---@param c3 Vector2 +---@param p4 Vector2 ---@param thick number ----@param color raylib.Color ----@return nil -function M.DrawSplineSegmentBezierCubic(p1, c2, c3, p4, thick, color) +---@param color Color +function DrawSplineSegmentBezierCubic(p1, c2, c3, p4, thick, color) C.DrawSplineSegmentBezierCubic(p1, c2, c3, p4, thick, color) end ---Get (evaluate) spline point: Linear ----@param startPos raylib.Vector2 ----@param endPos raylib.Vector2 +---@param startPos Vector2 +---@param endPos Vector2 ---@param t number ----@return raylib.Vector2 -function M.GetSplinePointLinear(startPos, endPos, t) +---@return Vector2 +function GetSplinePointLinear(startPos, endPos, t) return C.GetSplinePointLinear(startPos, endPos, t) end ---Get (evaluate) spline point: B-Spline ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 ----@param p3 raylib.Vector2 ----@param p4 raylib.Vector2 +---@param p1 Vector2 +---@param p2 Vector2 +---@param p3 Vector2 +---@param p4 Vector2 ---@param t number ----@return raylib.Vector2 -function M.GetSplinePointBasis(p1, p2, p3, p4, t) +---@return Vector2 +function GetSplinePointBasis(p1, p2, p3, p4, t) return C.GetSplinePointBasis(p1, p2, p3, p4, t) end ---Get (evaluate) spline point: Catmull-Rom ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 ----@param p3 raylib.Vector2 ----@param p4 raylib.Vector2 +---@param p1 Vector2 +---@param p2 Vector2 +---@param p3 Vector2 +---@param p4 Vector2 ---@param t number ----@return raylib.Vector2 -function M.GetSplinePointCatmullRom(p1, p2, p3, p4, t) +---@return Vector2 +function GetSplinePointCatmullRom(p1, p2, p3, p4, t) return C.GetSplinePointCatmullRom(p1, p2, p3, p4, t) end ---Get (evaluate) spline point: Quadratic Bezier ----@param p1 raylib.Vector2 ----@param c2 raylib.Vector2 ----@param p3 raylib.Vector2 +---@param p1 Vector2 +---@param c2 Vector2 +---@param p3 Vector2 ---@param t number ----@return raylib.Vector2 -function M.GetSplinePointBezierQuadratic(p1, c2, p3, t) +---@return Vector2 +function GetSplinePointBezierQuadratic(p1, c2, p3, t) return C.GetSplinePointBezierQuadratic(p1, c2, p3, t) end ---Get (evaluate) spline point: Cubic Bezier ----@param p1 raylib.Vector2 ----@param c2 raylib.Vector2 ----@param c3 raylib.Vector2 ----@param p4 raylib.Vector2 +---@param p1 Vector2 +---@param c2 Vector2 +---@param c3 Vector2 +---@param p4 Vector2 ---@param t number ----@return raylib.Vector2 -function M.GetSplinePointBezierCubic(p1, c2, c3, p4, t) +---@return Vector2 +function GetSplinePointBezierCubic(p1, c2, c3, p4, t) return C.GetSplinePointBezierCubic(p1, c2, c3, p4, t) end ---Check collision between two rectangles ----@param rec1 raylib.Rectangle ----@param rec2 raylib.Rectangle +---@param rec1 Rectangle +---@param rec2 Rectangle ---@return boolean -function M.CheckCollisionRecs(rec1, rec2) +function CheckCollisionRecs(rec1, rec2) return C.CheckCollisionRecs(rec1, rec2) end ---Check collision between two circles ----@param center1 raylib.Vector2 +---@param center1 Vector2 ---@param radius1 number ----@param center2 raylib.Vector2 +---@param center2 Vector2 ---@param radius2 number ---@return boolean -function M.CheckCollisionCircles(center1, radius1, center2, radius2) +function CheckCollisionCircles(center1, radius1, center2, radius2) return C.CheckCollisionCircles(center1, radius1, center2, radius2) end ---Check collision between circle and rectangle ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ----@param rec raylib.Rectangle +---@param rec Rectangle ---@return boolean -function M.CheckCollisionCircleRec(center, radius, rec) +function CheckCollisionCircleRec(center, radius, rec) return C.CheckCollisionCircleRec(center, radius, rec) end ---Check if circle collides with a line created between two points [p1] and [p2] ----@param center raylib.Vector2 +---@param center Vector2 ---@param radius number ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 +---@param p1 Vector2 +---@param p2 Vector2 ---@return boolean -function M.CheckCollisionCircleLine(center, radius, p1, p2) +function CheckCollisionCircleLine(center, radius, p1, p2) return C.CheckCollisionCircleLine(center, radius, p1, p2) end ---Check if point is inside rectangle ----@param point raylib.Vector2 ----@param rec raylib.Rectangle +---@param point Vector2 +---@param rec Rectangle ---@return boolean -function M.CheckCollisionPointRec(point, rec) +function CheckCollisionPointRec(point, rec) return C.CheckCollisionPointRec(point, rec) end ---Check if point is inside circle ----@param point raylib.Vector2 ----@param center raylib.Vector2 +---@param point Vector2 +---@param center Vector2 ---@param radius number ---@return boolean -function M.CheckCollisionPointCircle(point, center, radius) +function CheckCollisionPointCircle(point, center, radius) return C.CheckCollisionPointCircle(point, center, radius) end ---Check if point is inside a triangle ----@param point raylib.Vector2 ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 ----@param p3 raylib.Vector2 +---@param point Vector2 +---@param p1 Vector2 +---@param p2 Vector2 +---@param p3 Vector2 ---@return boolean -function M.CheckCollisionPointTriangle(point, p1, p2, p3) +function CheckCollisionPointTriangle(point, p1, p2, p3) return C.CheckCollisionPointTriangle(point, p1, p2, p3) end ---Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] ----@param point raylib.Vector2 ----@param p1 raylib.Vector2 ----@param p2 raylib.Vector2 +---@param point Vector2 +---@param p1 Vector2 +---@param p2 Vector2 ---@param threshold integer ---@return boolean -function M.CheckCollisionPointLine(point, p1, p2, threshold) +function CheckCollisionPointLine(point, p1, p2, threshold) return C.CheckCollisionPointLine(point, p1, p2, threshold) end ---Check if point is within a polygon described by array of vertices ----@param point raylib.Vector2 ----@param points raylib.Vector2[] +---@param point Vector2 +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ---@return boolean -function M.CheckCollisionPointPoly(point, points, pointCount) +function CheckCollisionPointPoly(point, points, pointCount) local _a2 if type(points) == "table" then _a2 = to_array("Vector2", points) else _a2 = points end @@ -6927,28 +6033,28 @@ function M.CheckCollisionPointPoly(point, points, pointCount) end ---Check the collision between two lines defined by two points each, returns collision point by reference ----@param startPos1 raylib.Vector2 ----@param endPos1 raylib.Vector2 ----@param startPos2 raylib.Vector2 ----@param endPos2 raylib.Vector2 +---@param startPos1 Vector2 +---@param endPos1 Vector2 +---@param startPos2 Vector2 +---@param endPos2 Vector2 ---@param collisionPoint ffi.cdata* ---@return boolean -function M.CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint) +function CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint) return C.CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint) end ---Get collision rectangle for two rectangles collision ----@param rec1 raylib.Rectangle ----@param rec2 raylib.Rectangle ----@return raylib.Rectangle -function M.GetCollisionRec(rec1, rec2) +---@param rec1 Rectangle +---@param rec2 Rectangle +---@return Rectangle +function GetCollisionRec(rec1, rec2) return C.GetCollisionRec(rec1, rec2) end ---Load image from file into CPU memory (RAM) ---@param fileName string ----@return raylib.Image -function M.LoadImage(fileName) +---@return Image +function LoadImage(fileName) return C.LoadImage(fileName) end @@ -6958,26 +6064,26 @@ end ---@param height integer ---@param format integer ---@param headerSize integer ----@return raylib.Image -function M.LoadImageRaw(fileName, width, height, format, headerSize) +---@return Image +function LoadImageRaw(fileName, width, height, format, headerSize) return C.LoadImageRaw(fileName, width, height, format, headerSize) end ---Load image sequence from file (frames appended to image.data) ---@param fileName string ---@param frames ffi.cdata* ----@return raylib.Image -function M.LoadImageAnim(fileName, frames) +---@return Image +function LoadImageAnim(fileName, frames) return C.LoadImageAnim(fileName, frames) end ---Load image sequence from memory buffer ---@param fileType string ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ---@param frames ffi.cdata* ----@return raylib.Image -function M.LoadImageAnimFromMemory(fileType, fileData, dataSize, frames) +---@return Image +function LoadImageAnimFromMemory(fileType, fileData, dataSize, frames) local _a2 if type(fileData) == "string" then _a2 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a2 = to_array("unsigned char", fileData) @@ -6987,10 +6093,10 @@ end ---Load image from memory buffer, fileType refers to extension: i.e. '.png' ---@param fileType string ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ----@return raylib.Image -function M.LoadImageFromMemory(fileType, fileData, dataSize) +---@return Image +function LoadImageFromMemory(fileType, fileData, dataSize) local _a2 if type(fileData) == "string" then _a2 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a2 = to_array("unsigned char", fileData) @@ -6999,63 +6105,62 @@ function M.LoadImageFromMemory(fileType, fileData, dataSize) end ---Load image from GPU texture data ----@param texture raylib.Texture2D ----@return raylib.Image -function M.LoadImageFromTexture(texture) +---@param texture Texture2D +---@return Image +function LoadImageFromTexture(texture) return C.LoadImageFromTexture(texture) end ---Load image from screen buffer (screenshot) ----@return raylib.Image -function M.LoadImageFromScreen() +---@return Image +function LoadImageFromScreen() return C.LoadImageFromScreen() end ---Check if an image is valid (data and parameters) ----@param image raylib.Image +---@param image Image ---@return boolean -function M.IsImageValid(image) +function IsImageValid(image) return C.IsImageValid(image) end ---Unload image from CPU memory (RAM) ----@param image raylib.Image ----@return nil -function M.UnloadImage(image) +---@param image Image +function UnloadImage(image) C.UnloadImage(image) end ---Export image data to file, returns true on success ----@param image raylib.Image +---@param image Image ---@param fileName string ---@return boolean -function M.ExportImage(image, fileName) +function ExportImage(image, fileName) return C.ExportImage(image, fileName) end ---Export image to memory buffer, memory must be MemFree() ----@param image raylib.Image +---@param image Image ---@param fileType string ---@param fileSize ffi.cdata* ---@return ffi.cdata* -function M.ExportImageToMemory(image, fileType, fileSize) +function ExportImageToMemory(image, fileType, fileSize) return C.ExportImageToMemory(image, fileType, fileSize) end ---Export image as code file defining an array of bytes, returns true on success ----@param image raylib.Image +---@param image Image ---@param fileName string ---@return boolean -function M.ExportImageAsCode(image, fileName) +function ExportImageAsCode(image, fileName) return C.ExportImageAsCode(image, fileName) end ---Generate image: plain color ---@param width integer ---@param height integer ----@param color raylib.Color ----@return raylib.Image -function M.GenImageColor(width, height, color) +---@param color Color +---@return Image +function GenImageColor(width, height, color) return C.GenImageColor(width, height, color) end @@ -7063,21 +6168,21 @@ end ---@param width integer ---@param height integer ---@param direction integer ----@param start raylib.Color ----@param end_ raylib.Color ----@return raylib.Image -function M.GenImageGradientLinear(width, height, direction, start, end_) - return C.GenImageGradientLinear(width, height, direction, start, end_) +---@param start Color +---@param _end Color +---@return Image +function GenImageGradientLinear(width, height, direction, start, _end) + return C.GenImageGradientLinear(width, height, direction, start, _end) end ---Generate image: radial gradient ---@param width integer ---@param height integer ---@param density number ----@param inner raylib.Color ----@param outer raylib.Color ----@return raylib.Image -function M.GenImageGradientRadial(width, height, density, inner, outer) +---@param inner Color +---@param outer Color +---@return Image +function GenImageGradientRadial(width, height, density, inner, outer) return C.GenImageGradientRadial(width, height, density, inner, outer) end @@ -7085,10 +6190,10 @@ end ---@param width integer ---@param height integer ---@param density number ----@param inner raylib.Color ----@param outer raylib.Color ----@return raylib.Image -function M.GenImageGradientSquare(width, height, density, inner, outer) +---@param inner Color +---@param outer Color +---@return Image +function GenImageGradientSquare(width, height, density, inner, outer) return C.GenImageGradientSquare(width, height, density, inner, outer) end @@ -7097,10 +6202,10 @@ end ---@param height integer ---@param checksX integer ---@param checksY integer ----@param col1 raylib.Color ----@param col2 raylib.Color ----@return raylib.Image -function M.GenImageChecked(width, height, checksX, checksY, col1, col2) +---@param col1 Color +---@param col2 Color +---@return Image +function GenImageChecked(width, height, checksX, checksY, col1, col2) return C.GenImageChecked(width, height, checksX, checksY, col1, col2) end @@ -7108,8 +6213,8 @@ end ---@param width integer ---@param height integer ---@param factor number ----@return raylib.Image -function M.GenImageWhiteNoise(width, height, factor) +---@return Image +function GenImageWhiteNoise(width, height, factor) return C.GenImageWhiteNoise(width, height, factor) end @@ -7119,8 +6224,8 @@ end ---@param offsetX integer ---@param offsetY integer ---@param scale number ----@return raylib.Image -function M.GenImagePerlinNoise(width, height, offsetX, offsetY, scale) +---@return Image +function GenImagePerlinNoise(width, height, offsetX, offsetY, scale) return C.GenImagePerlinNoise(width, height, offsetX, offsetY, scale) end @@ -7128,8 +6233,8 @@ end ---@param width integer ---@param height integer ---@param tileSize integer ----@return raylib.Image -function M.GenImageCellular(width, height, tileSize) +---@return Image +function GenImageCellular(width, height, tileSize) return C.GenImageCellular(width, height, tileSize) end @@ -7137,797 +6242,627 @@ end ---@param width integer ---@param height integer ---@param text string ----@return raylib.Image -function M.GenImageText(width, height, text) +---@return Image +function GenImageText(width, height, text) return C.GenImageText(width, height, text) end ---Create an image duplicate (useful for transformations) ----@param image raylib.Image ----@return raylib.Image -function M.ImageCopy(image) +---@param image Image +---@return Image +function ImageCopy(image) return C.ImageCopy(image) end ---Create an image from another image piece ----@param image raylib.Image ----@param rec raylib.Rectangle ----@return raylib.Image -function M.ImageFromImage(image, rec) +---@param image Image +---@param rec Rectangle +---@return Image +function ImageFromImage(image, rec) return C.ImageFromImage(image, rec) end ---Create an image from a selected channel of another image (GRAYSCALE) ----@param image raylib.Image +---@param image Image ---@param selectedChannel integer ----@return raylib.Image -function M.ImageFromChannel(image, selectedChannel) +---@return Image +function ImageFromChannel(image, selectedChannel) return C.ImageFromChannel(image, selectedChannel) end ---Create an image from text (default font) ---@param text string ---@param fontSize integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageText(text, fontSize, color) +---@param color Color +---@return Image +function ImageText(text, fontSize, color) return C.ImageText(text, fontSize, color) end ---Create an image from text (custom sprite font) ----@param font raylib.Font +---@param font Font ---@param text string ---@param fontSize number ---@param spacing number ----@param tint raylib.Color ----@return raylib.Image -function M.ImageTextEx(font, text, fontSize, spacing, tint) +---@param tint Color +---@return Image +function ImageTextEx(font, text, fontSize, spacing, tint) return C.ImageTextEx(font, text, fontSize, spacing, tint) end ---Convert image data to desired format ----@param image raylib.Image +---@param image ffi.cdata* ---@param newFormat integer ----@return raylib.Image -function M.ImageFormat(image, newFormat) - local _o1 = ffi.new("Image[1]", image) - C.ImageFormat(_o1, newFormat) - return _o1[0] +function ImageFormat(image, newFormat) + C.ImageFormat(image, newFormat) end ---Convert image to POT (power-of-two) ----@param image raylib.Image ----@param fill raylib.Color ----@return raylib.Image -function M.ImageToPOT(image, fill) - local _o1 = ffi.new("Image[1]", image) - C.ImageToPOT(_o1, fill) - return _o1[0] +---@param image ffi.cdata* +---@param fill Color +function ImageToPOT(image, fill) + C.ImageToPOT(image, fill) end ---Crop an image to a defined rectangle ----@param image raylib.Image ----@param crop raylib.Rectangle ----@return raylib.Image -function M.ImageCrop(image, crop) - local _o1 = ffi.new("Image[1]", image) - C.ImageCrop(_o1, crop) - return _o1[0] +---@param image ffi.cdata* +---@param crop Rectangle +function ImageCrop(image, crop) + C.ImageCrop(image, crop) end ---Crop image depending on alpha value ----@param image raylib.Image +---@param image ffi.cdata* ---@param threshold number ----@return raylib.Image -function M.ImageAlphaCrop(image, threshold) - local _o1 = ffi.new("Image[1]", image) - C.ImageAlphaCrop(_o1, threshold) - return _o1[0] +function ImageAlphaCrop(image, threshold) + C.ImageAlphaCrop(image, threshold) end ---Clear alpha channel to desired color ----@param image raylib.Image ----@param color raylib.Color +---@param image ffi.cdata* +---@param color Color ---@param threshold number ----@return raylib.Image -function M.ImageAlphaClear(image, color, threshold) - local _o1 = ffi.new("Image[1]", image) - C.ImageAlphaClear(_o1, color, threshold) - return _o1[0] +function ImageAlphaClear(image, color, threshold) + C.ImageAlphaClear(image, color, threshold) end ---Apply alpha mask to image ----@param image raylib.Image ----@param alphaMask raylib.Image ----@return raylib.Image -function M.ImageAlphaMask(image, alphaMask) - local _o1 = ffi.new("Image[1]", image) - C.ImageAlphaMask(_o1, alphaMask) - return _o1[0] +---@param image ffi.cdata* +---@param alphaMask Image +function ImageAlphaMask(image, alphaMask) + C.ImageAlphaMask(image, alphaMask) end ---Premultiply alpha channel ----@param image raylib.Image ----@return raylib.Image -function M.ImageAlphaPremultiply(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageAlphaPremultiply(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageAlphaPremultiply(image) + C.ImageAlphaPremultiply(image) end ---Apply Gaussian blur using a box blur approximation ----@param image raylib.Image +---@param image ffi.cdata* ---@param blurSize integer ----@return raylib.Image -function M.ImageBlurGaussian(image, blurSize) - local _o1 = ffi.new("Image[1]", image) - C.ImageBlurGaussian(_o1, blurSize) - return _o1[0] +function ImageBlurGaussian(image, blurSize) + C.ImageBlurGaussian(image, blurSize) end ---Apply custom square convolution kernel to image ----@param image raylib.Image ----@param kernel number[] +---@param image ffi.cdata* +---@param kernel number[]|ffi.cdata* ---@param kernelSize integer ----@return raylib.Image -function M.ImageKernelConvolution(image, kernel, kernelSize) - local _o1 = ffi.new("Image[1]", image) +function ImageKernelConvolution(image, kernel, kernelSize) local _a2 if type(kernel) == "table" then _a2 = to_array("float", kernel) else _a2 = kernel end - C.ImageKernelConvolution(_o1, _a2, kernelSize) - return _o1[0] + C.ImageKernelConvolution(image, _a2, kernelSize) end ---Resize image (Bicubic scaling algorithm) ----@param image raylib.Image +---@param image ffi.cdata* ---@param newWidth integer ---@param newHeight integer ----@return raylib.Image -function M.ImageResize(image, newWidth, newHeight) - local _o1 = ffi.new("Image[1]", image) - C.ImageResize(_o1, newWidth, newHeight) - return _o1[0] +function ImageResize(image, newWidth, newHeight) + C.ImageResize(image, newWidth, newHeight) end ---Resize image (Nearest-Neighbor scaling algorithm) ----@param image raylib.Image +---@param image ffi.cdata* ---@param newWidth integer ---@param newHeight integer ----@return raylib.Image -function M.ImageResizeNN(image, newWidth, newHeight) - local _o1 = ffi.new("Image[1]", image) - C.ImageResizeNN(_o1, newWidth, newHeight) - return _o1[0] +function ImageResizeNN(image, newWidth, newHeight) + C.ImageResizeNN(image, newWidth, newHeight) end ---Resize canvas and fill with color ----@param image raylib.Image +---@param image ffi.cdata* ---@param newWidth integer ---@param newHeight integer ---@param offsetX integer ---@param offsetY integer ----@param fill raylib.Color ----@return raylib.Image -function M.ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill) - local _o1 = ffi.new("Image[1]", image) - C.ImageResizeCanvas(_o1, newWidth, newHeight, offsetX, offsetY, fill) - return _o1[0] +---@param fill Color +function ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill) + C.ImageResizeCanvas(image, newWidth, newHeight, offsetX, offsetY, fill) end ---Compute all mipmap levels for a provided image ----@param image raylib.Image ----@return raylib.Image -function M.ImageMipmaps(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageMipmaps(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageMipmaps(image) + C.ImageMipmaps(image) end ---Dither image data to 16bpp or lower (Floyd-Steinberg dithering) ----@param image raylib.Image +---@param image ffi.cdata* ---@param rBpp integer ---@param gBpp integer ---@param bBpp integer ---@param aBpp integer ----@return raylib.Image -function M.ImageDither(image, rBpp, gBpp, bBpp, aBpp) - local _o1 = ffi.new("Image[1]", image) - C.ImageDither(_o1, rBpp, gBpp, bBpp, aBpp) - return _o1[0] +function ImageDither(image, rBpp, gBpp, bBpp, aBpp) + C.ImageDither(image, rBpp, gBpp, bBpp, aBpp) end ---Flip image vertically ----@param image raylib.Image ----@return raylib.Image -function M.ImageFlipVertical(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageFlipVertical(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageFlipVertical(image) + C.ImageFlipVertical(image) end ---Flip image horizontally ----@param image raylib.Image ----@return raylib.Image -function M.ImageFlipHorizontal(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageFlipHorizontal(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageFlipHorizontal(image) + C.ImageFlipHorizontal(image) end ---Rotate image by input angle in degrees (-359 to 359) ----@param image raylib.Image +---@param image ffi.cdata* ---@param degrees integer ----@return raylib.Image -function M.ImageRotate(image, degrees) - local _o1 = ffi.new("Image[1]", image) - C.ImageRotate(_o1, degrees) - return _o1[0] +function ImageRotate(image, degrees) + C.ImageRotate(image, degrees) end ---Rotate image clockwise 90deg ----@param image raylib.Image ----@return raylib.Image -function M.ImageRotateCW(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageRotateCW(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageRotateCW(image) + C.ImageRotateCW(image) end ---Rotate image counter-clockwise 90deg ----@param image raylib.Image ----@return raylib.Image -function M.ImageRotateCCW(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageRotateCCW(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageRotateCCW(image) + C.ImageRotateCCW(image) end ---Modify image color: tint ----@param image raylib.Image ----@param color raylib.Color ----@return raylib.Image -function M.ImageColorTint(image, color) - local _o1 = ffi.new("Image[1]", image) - C.ImageColorTint(_o1, color) - return _o1[0] +---@param image ffi.cdata* +---@param color Color +function ImageColorTint(image, color) + C.ImageColorTint(image, color) end ---Modify image color: invert ----@param image raylib.Image ----@return raylib.Image -function M.ImageColorInvert(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageColorInvert(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageColorInvert(image) + C.ImageColorInvert(image) end ---Modify image color: grayscale ----@param image raylib.Image ----@return raylib.Image -function M.ImageColorGrayscale(image) - local _o1 = ffi.new("Image[1]", image) - C.ImageColorGrayscale(_o1) - return _o1[0] +---@param image ffi.cdata* +function ImageColorGrayscale(image) + C.ImageColorGrayscale(image) end ---Modify image color: contrast (-100 to 100) ----@param image raylib.Image +---@param image ffi.cdata* ---@param contrast integer ----@return raylib.Image -function M.ImageColorContrast(image, contrast) - local _o1 = ffi.new("Image[1]", image) - C.ImageColorContrast(_o1, contrast) - return _o1[0] +function ImageColorContrast(image, contrast) + C.ImageColorContrast(image, contrast) end ---Modify image color: brightness (-255 to 255) ----@param image raylib.Image +---@param image ffi.cdata* ---@param brightness integer ----@return raylib.Image -function M.ImageColorBrightness(image, brightness) - local _o1 = ffi.new("Image[1]", image) - C.ImageColorBrightness(_o1, brightness) - return _o1[0] +function ImageColorBrightness(image, brightness) + C.ImageColorBrightness(image, brightness) end ---Modify image color: replace color ----@param image raylib.Image ----@param color raylib.Color ----@param replace raylib.Color ----@return raylib.Image -function M.ImageColorReplace(image, color, replace) - local _o1 = ffi.new("Image[1]", image) - C.ImageColorReplace(_o1, color, replace) - return _o1[0] +---@param image ffi.cdata* +---@param color Color +---@param replace Color +function ImageColorReplace(image, color, replace) + C.ImageColorReplace(image, color, replace) end ---Load color data from image as a Color array (RGBA - 32bit) ----@param image raylib.Image +---@param image Image ---@return ffi.cdata* -function M.LoadImageColors(image) +function LoadImageColors(image) return C.LoadImageColors(image) end ---Load colors palette from image as a Color array (RGBA - 32bit) ----@param image raylib.Image +---@param image Image ---@param maxPaletteSize integer ---@param colorCount ffi.cdata* ---@return ffi.cdata* -function M.LoadImagePalette(image, maxPaletteSize, colorCount) +function LoadImagePalette(image, maxPaletteSize, colorCount) return C.LoadImagePalette(image, maxPaletteSize, colorCount) end ---Unload color data loaded with LoadImageColors() ---@param colors ffi.cdata* ----@return nil -function M.UnloadImageColors(colors) +function UnloadImageColors(colors) C.UnloadImageColors(colors) end ---Unload colors palette loaded with LoadImagePalette() ---@param colors ffi.cdata* ----@return nil -function M.UnloadImagePalette(colors) +function UnloadImagePalette(colors) C.UnloadImagePalette(colors) end ---Get image alpha border rectangle ----@param image raylib.Image +---@param image Image ---@param threshold number ----@return raylib.Rectangle -function M.GetImageAlphaBorder(image, threshold) +---@return Rectangle +function GetImageAlphaBorder(image, threshold) return C.GetImageAlphaBorder(image, threshold) end ---Get image pixel color at (x, y) position ----@param image raylib.Image +---@param image Image ---@param x integer ---@param y integer ----@return raylib.Color -function M.GetImageColor(image, x, y) +---@return Color +function GetImageColor(image, x, y) return C.GetImageColor(image, x, y) end ---Clear image background with provided color ----@param dst raylib.Image ----@param color raylib.Color ----@return raylib.Image -function M.ImageClearBackground(dst, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageClearBackground(_o1, color) - return _o1[0] +---@param dst ffi.cdata* +---@param color Color +function ImageClearBackground(dst, color) + C.ImageClearBackground(dst, color) end ---Draw pixel within an image ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param posX integer ---@param posY integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawPixel(dst, posX, posY, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawPixel(_o1, posX, posY, color) - return _o1[0] +---@param color Color +function ImageDrawPixel(dst, posX, posY, color) + C.ImageDrawPixel(dst, posX, posY, color) end ---Draw pixel within an image (Vector version) ----@param dst raylib.Image ----@param position raylib.Vector2 ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawPixelV(dst, position, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawPixelV(_o1, position, color) - return _o1[0] +---@param dst ffi.cdata* +---@param position Vector2 +---@param color Color +function ImageDrawPixelV(dst, position, color) + C.ImageDrawPixelV(dst, position, color) end ---Draw line within an image ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param startPosX integer ---@param startPosY integer ---@param endPosX integer ---@param endPosY integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawLine(_o1, startPosX, startPosY, endPosX, endPosY, color) - return _o1[0] +---@param color Color +function ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color) + C.ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color) end ---Draw line within an image (Vector version) ----@param dst raylib.Image ----@param start raylib.Vector2 ----@param end_ raylib.Vector2 ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawLineV(dst, start, end_, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawLineV(_o1, start, end_, color) - return _o1[0] +---@param dst ffi.cdata* +---@param start Vector2 +---@param _end Vector2 +---@param color Color +function ImageDrawLineV(dst, start, _end, color) + C.ImageDrawLineV(dst, start, _end, color) end ---Draw a line defining thickness within an image ----@param dst raylib.Image ----@param start raylib.Vector2 ----@param end_ raylib.Vector2 +---@param dst ffi.cdata* +---@param start Vector2 +---@param _end Vector2 ---@param thick integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawLineEx(dst, start, end_, thick, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawLineEx(_o1, start, end_, thick, color) - return _o1[0] +---@param color Color +function ImageDrawLineEx(dst, start, _end, thick, color) + C.ImageDrawLineEx(dst, start, _end, thick, color) end ---Draw a lines sequence within an image ----@param dst raylib.Image ----@param points raylib.Vector2[] +---@param dst ffi.cdata* +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawLineStrip(dst, points, pointCount, color) - local _o1 = ffi.new("Image[1]", dst) +---@param color Color +function ImageDrawLineStrip(dst, points, pointCount, color) local _a2 if type(points) == "table" then _a2 = to_array("Vector2", points) else _a2 = points end - C.ImageDrawLineStrip(_o1, _a2, pointCount, color) - return _o1[0] + C.ImageDrawLineStrip(dst, _a2, pointCount, color) end ---Draw triangle within an image ----@param dst raylib.Image ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawTriangle(dst, v1, v2, v3, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawTriangle(_o1, v1, v2, v3, color) - return _o1[0] +---@param dst ffi.cdata* +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 +---@param color Color +function ImageDrawTriangle(dst, v1, v2, v3, color) + C.ImageDrawTriangle(dst, v1, v2, v3, color) end ---Draw triangle with interpolated colors within an image ----@param dst raylib.Image ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 ----@param c1 raylib.Color ----@param c2 raylib.Color ----@param c3 raylib.Color ----@return raylib.Image -function M.ImageDrawTriangleGradient(dst, v1, v2, v3, c1, c2, c3) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawTriangleGradient(_o1, v1, v2, v3, c1, c2, c3) - return _o1[0] +---@param dst ffi.cdata* +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 +---@param c1 Color +---@param c2 Color +---@param c3 Color +function ImageDrawTriangleGradient(dst, v1, v2, v3, c1, c2, c3) + C.ImageDrawTriangleGradient(dst, v1, v2, v3, c1, c2, c3) end ---Draw triangle outline within an image ----@param dst raylib.Image ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@param v3 raylib.Vector2 ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawTriangleLines(dst, v1, v2, v3, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawTriangleLines(_o1, v1, v2, v3, color) - return _o1[0] +---@param dst ffi.cdata* +---@param v1 Vector2 +---@param v2 Vector2 +---@param v3 Vector2 +---@param color Color +function ImageDrawTriangleLines(dst, v1, v2, v3, color) + C.ImageDrawTriangleLines(dst, v1, v2, v3, color) end ---Draw a triangle fan defined by points within an image (first vertex is the center) ----@param dst raylib.Image ----@param points raylib.Vector2[] +---@param dst ffi.cdata* +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawTriangleFan(dst, points, pointCount, color) - local _o1 = ffi.new("Image[1]", dst) +---@param color Color +function ImageDrawTriangleFan(dst, points, pointCount, color) local _a2 if type(points) == "table" then _a2 = to_array("Vector2", points) else _a2 = points end - C.ImageDrawTriangleFan(_o1, _a2, pointCount, color) - return _o1[0] + C.ImageDrawTriangleFan(dst, _a2, pointCount, color) end ---Draw a triangle strip defined by points within an image ----@param dst raylib.Image ----@param points raylib.Vector2[] +---@param dst ffi.cdata* +---@param points Vector2[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawTriangleStrip(dst, points, pointCount, color) - local _o1 = ffi.new("Image[1]", dst) +---@param color Color +function ImageDrawTriangleStrip(dst, points, pointCount, color) local _a2 if type(points) == "table" then _a2 = to_array("Vector2", points) else _a2 = points end - C.ImageDrawTriangleStrip(_o1, _a2, pointCount, color) - return _o1[0] + C.ImageDrawTriangleStrip(dst, _a2, pointCount, color) end ---Draw rectangle within an image ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param posX integer ---@param posY integer ---@param width integer ---@param height integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawRectangle(dst, posX, posY, width, height, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectangle(_o1, posX, posY, width, height, color) - return _o1[0] +---@param color Color +function ImageDrawRectangle(dst, posX, posY, width, height, color) + C.ImageDrawRectangle(dst, posX, posY, width, height, color) end ---Draw rectangle within an image (Vector version) ----@param dst raylib.Image ----@param position raylib.Vector2 ----@param size raylib.Vector2 ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawRectangleV(dst, position, size, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectangleV(_o1, position, size, color) - return _o1[0] +---@param dst ffi.cdata* +---@param position Vector2 +---@param size Vector2 +---@param color Color +function ImageDrawRectangleV(dst, position, size, color) + C.ImageDrawRectangleV(dst, position, size, color) end ---Draw rectangle within an image ----@param dst raylib.Image ----@param rec raylib.Rectangle ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawRectangleRec(dst, rec, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectangleRec(_o1, rec, color) - return _o1[0] +---@param dst ffi.cdata* +---@param rec Rectangle +---@param color Color +function ImageDrawRectangleRec(dst, rec, color) + C.ImageDrawRectangleRec(dst, rec, color) end ---Draw a color-filled rectangle with pro parameters within and image ----@param dst raylib.Image ----@param rec raylib.Rectangle ----@param origin raylib.Vector2 +---@param dst ffi.cdata* +---@param rec Rectangle +---@param origin Vector2 ---@param rotation number ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawRectanglePro(dst, rec, origin, rotation, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectanglePro(_o1, rec, origin, rotation, color) - return _o1[0] +---@param color Color +function ImageDrawRectanglePro(dst, rec, origin, rotation, color) + C.ImageDrawRectanglePro(dst, rec, origin, rotation, color) end ---Draw rectangle lines within an image ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param posX integer ---@param posY integer ---@param width integer ---@param height integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawRectangleLines(dst, posX, posY, width, height, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectangleLines(_o1, posX, posY, width, height, color) - return _o1[0] +---@param color Color +function ImageDrawRectangleLines(dst, posX, posY, width, height, color) + C.ImageDrawRectangleLines(dst, posX, posY, width, height, color) end ---Draw rectangle lines within an image with line thickness ----@param dst raylib.Image ----@param rec raylib.Rectangle +---@param dst ffi.cdata* +---@param rec Rectangle ---@param thick integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawRectangleLinesEx(dst, rec, thick, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectangleLinesEx(_o1, rec, thick, color) - return _o1[0] +---@param color Color +function ImageDrawRectangleLinesEx(dst, rec, thick, color) + C.ImageDrawRectangleLinesEx(dst, rec, thick, color) end ---Draw rectangle with gradient colors within an image, counter-clockwise color order ----@param dst raylib.Image ----@param rec raylib.Rectangle ----@param col1 raylib.Color ----@param col2 raylib.Color ----@param col3 raylib.Color ----@param col4 raylib.Color ----@return raylib.Image -function M.ImageDrawRectangleGradientEx(dst, rec, col1, col2, col3, col4) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawRectangleGradientEx(_o1, rec, col1, col2, col3, col4) - return _o1[0] +---@param dst ffi.cdata* +---@param rec Rectangle +---@param col1 Color +---@param col2 Color +---@param col3 Color +---@param col4 Color +function ImageDrawRectangleGradientEx(dst, rec, col1, col2, col3, col4) + C.ImageDrawRectangleGradientEx(dst, rec, col1, col2, col3, col4) end ---Draw a filled circle within an image ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param centerX integer ---@param centerY integer ---@param radius integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawCircle(dst, centerX, centerY, radius, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawCircle(_o1, centerX, centerY, radius, color) - return _o1[0] +---@param color Color +function ImageDrawCircle(dst, centerX, centerY, radius, color) + C.ImageDrawCircle(dst, centerX, centerY, radius, color) end ---Draw a filled circle within an image (Vector version) ----@param dst raylib.Image ----@param center raylib.Vector2 +---@param dst ffi.cdata* +---@param center Vector2 ---@param radius integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawCircleV(dst, center, radius, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawCircleV(_o1, center, radius, color) - return _o1[0] +---@param color Color +function ImageDrawCircleV(dst, center, radius, color) + C.ImageDrawCircleV(dst, center, radius, color) end ---Draw circle outline within an image ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param centerX integer ---@param centerY integer ---@param radius integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawCircleLines(dst, centerX, centerY, radius, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawCircleLines(_o1, centerX, centerY, radius, color) - return _o1[0] +---@param color Color +function ImageDrawCircleLines(dst, centerX, centerY, radius, color) + C.ImageDrawCircleLines(dst, centerX, centerY, radius, color) end ---Draw circle outline within an image (Vector version) ----@param dst raylib.Image ----@param center raylib.Vector2 +---@param dst ffi.cdata* +---@param center Vector2 ---@param radius integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawCircleLinesV(dst, center, radius, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawCircleLinesV(_o1, center, radius, color) - return _o1[0] +---@param color Color +function ImageDrawCircleLinesV(dst, center, radius, color) + C.ImageDrawCircleLinesV(dst, center, radius, color) end ---Draw a gradient-filled circle within an image ----@param dst raylib.Image ----@param center raylib.Vector2 +---@param dst ffi.cdata* +---@param center Vector2 ---@param radius number ----@param inner raylib.Color ----@param outer raylib.Color ----@return raylib.Image -function M.ImageDrawCircleGradient(dst, center, radius, inner, outer) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawCircleGradient(_o1, center, radius, inner, outer) - return _o1[0] +---@param inner Color +---@param outer Color +function ImageDrawCircleGradient(dst, center, radius, inner, outer) + C.ImageDrawCircleGradient(dst, center, radius, inner, outer) end ---Draw an image within an image ----@param dst raylib.Image ----@param src raylib.Image +---@param dst ffi.cdata* +---@param src Image ---@param posX integer ---@param posY integer ----@param tint raylib.Color ----@return raylib.Image -function M.ImageDrawImage(dst, src, posX, posY, tint) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawImage(_o1, src, posX, posY, tint) - return _o1[0] +---@param tint Color +function ImageDrawImage(dst, src, posX, posY, tint) + C.ImageDrawImage(dst, src, posX, posY, tint) end ---Draw an image with scaling and rotation within an image ----@param dst raylib.Image ----@param src raylib.Image ----@param position raylib.Vector2 +---@param dst ffi.cdata* +---@param src Image +---@param position Vector2 ---@param rotation number ---@param scale number ----@param tint raylib.Color ----@return raylib.Image -function M.ImageDrawImageEx(dst, src, position, rotation, scale, tint) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawImageEx(_o1, src, position, rotation, scale, tint) - return _o1[0] +---@param tint Color +function ImageDrawImageEx(dst, src, position, rotation, scale, tint) + C.ImageDrawImageEx(dst, src, position, rotation, scale, tint) end ---Draw a part of an image defined by a rectangle within an image ----@param dst raylib.Image ----@param src raylib.Image ----@param srcRec raylib.Rectangle ----@param position raylib.Vector2 ----@param tint raylib.Color ----@return raylib.Image -function M.ImageDrawImageRec(dst, src, srcRec, position, tint) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawImageRec(_o1, src, srcRec, position, tint) - return _o1[0] +---@param dst ffi.cdata* +---@param src Image +---@param srcRec Rectangle +---@param position Vector2 +---@param tint Color +function ImageDrawImageRec(dst, src, srcRec, position, tint) + C.ImageDrawImageRec(dst, src, srcRec, position, tint) end ---Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image ----@param dst raylib.Image ----@param src raylib.Image ----@param srcRec raylib.Rectangle ----@param dstRec raylib.Rectangle ----@param origin raylib.Vector2 +---@param dst ffi.cdata* +---@param src Image +---@param srcRec Rectangle +---@param dstRec Rectangle +---@param origin Vector2 ---@param rotation number ----@param tint raylib.Color ----@return raylib.Image -function M.ImageDrawImagePro(dst, src, srcRec, dstRec, origin, rotation, tint) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawImagePro(_o1, src, srcRec, dstRec, origin, rotation, tint) - return _o1[0] +---@param tint Color +function ImageDrawImagePro(dst, src, srcRec, dstRec, origin, rotation, tint) + C.ImageDrawImagePro(dst, src, srcRec, dstRec, origin, rotation, tint) end ---Draw text (using default font) within an image (destination) ----@param dst raylib.Image +---@param dst ffi.cdata* ---@param text string ---@param posX integer ---@param posY integer ---@param fontSize integer ----@param color raylib.Color ----@return raylib.Image -function M.ImageDrawText(dst, text, posX, posY, fontSize, color) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawText(_o1, text, posX, posY, fontSize, color) - return _o1[0] +---@param color Color +function ImageDrawText(dst, text, posX, posY, fontSize, color) + C.ImageDrawText(dst, text, posX, posY, fontSize, color) end ---Draw text (custom sprite font) within an image (destination) ----@param dst raylib.Image ----@param font raylib.Font +---@param dst ffi.cdata* +---@param font Font ---@param text string ----@param position raylib.Vector2 +---@param position Vector2 ---@param fontSize number ---@param spacing number ----@param tint raylib.Color ----@return raylib.Image -function M.ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawTextEx(_o1, font, text, position, fontSize, spacing, tint) - return _o1[0] +---@param tint Color +function ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint) + C.ImageDrawTextEx(dst, font, text, position, fontSize, spacing, tint) end ---Draw text using Font and pro parameters (rotation) ----@param dst raylib.Image ----@param font raylib.Font +---@param dst ffi.cdata* +---@param font Font ---@param text string ----@param position raylib.Vector2 ----@param origin raylib.Vector2 +---@param position Vector2 +---@param origin Vector2 ---@param rotation number ---@param fontSize number ---@param spacing number ----@param tint raylib.Color ----@return raylib.Image -function M.ImageDrawTextPro(dst, font, text, position, origin, rotation, fontSize, spacing, tint) - local _o1 = ffi.new("Image[1]", dst) - C.ImageDrawTextPro(_o1, font, text, position, origin, rotation, fontSize, spacing, tint) - return _o1[0] +---@param tint Color +function ImageDrawTextPro(dst, font, text, position, origin, rotation, fontSize, spacing, tint) + C.ImageDrawTextPro(dst, font, text, position, origin, rotation, fontSize, spacing, tint) end ---Load texture from file into GPU memory (VRAM) ---@param fileName string ----@return raylib.Texture2D -function M.LoadTexture(fileName) +---@return Texture2D +function LoadTexture(fileName) return C.LoadTexture(fileName) end ---Load texture from image data ----@param image raylib.Image ----@return raylib.Texture2D -function M.LoadTextureFromImage(image) +---@param image Image +---@return Texture2D +function LoadTextureFromImage(image) return C.LoadTextureFromImage(image) end ---Load cubemap from image, multiple image cubemap layouts supported ----@param image raylib.Image ----@param layout integer ----@return raylib.TextureCubemap -function M.LoadTextureCubemap(image, layout) +---@param image Image +---@param layout CubemapLayout +---@return TextureCubemap +function LoadTextureCubemap(image, layout) return C.LoadTextureCubemap(image, layout) end ---Load texture for rendering (framebuffer) ---@param width integer ---@param height integer ----@return raylib.RenderTexture2D -function M.LoadRenderTexture(width, height) +---@return RenderTexture2D +function LoadRenderTexture(width, height) return C.LoadRenderTexture(width, height) end @@ -7935,44 +6870,41 @@ end ---@param width integer ---@param height integer ---@param format integer ----@return raylib.RenderTexture2D -function M.LoadRenderTextureEx(width, height, format) +---@return RenderTexture2D +function LoadRenderTextureEx(width, height, format) return C.LoadRenderTextureEx(width, height, format) end ---Check if texture is valid (loaded in GPU) ----@param texture raylib.Texture2D +---@param texture Texture2D ---@return boolean -function M.IsTextureValid(texture) +function IsTextureValid(texture) return C.IsTextureValid(texture) end ---Unload texture from GPU memory (VRAM) ----@param texture raylib.Texture2D ----@return nil -function M.UnloadTexture(texture) +---@param texture Texture2D +function UnloadTexture(texture) C.UnloadTexture(texture) end ---Check if render texture is valid (loaded in GPU) ----@param target raylib.RenderTexture2D +---@param target RenderTexture2D ---@return boolean -function M.IsRenderTextureValid(target) +function IsRenderTextureValid(target) return C.IsRenderTextureValid(target) end ---Unload render texture from GPU memory (VRAM) ----@param target raylib.RenderTexture2D ----@return nil -function M.UnloadRenderTexture(target) +---@param target RenderTexture2D +function UnloadRenderTexture(target) C.UnloadRenderTexture(target) end ---Update GPU texture with new data (pixels should be able to fill texture) ----@param texture raylib.Texture2D ----@param pixels ffi.cdata*|string ----@return nil -function M.UpdateTexture(texture, pixels) +---@param texture Texture2D +---@param pixels string|ffi.cdata* +function UpdateTexture(texture, pixels) local _a2 if type(pixels) == "string" then _a2 = ffi.cast("const void *", pixels) else _a2 = pixels end @@ -7980,11 +6912,10 @@ function M.UpdateTexture(texture, pixels) end ---Update GPU texture rectangle with new data (pixels and rec should fit in texture) ----@param texture raylib.Texture2D ----@param rec raylib.Rectangle ----@param pixels ffi.cdata*|string ----@return nil -function M.UpdateTextureRec(texture, rec, pixels) +---@param texture Texture2D +---@param rec Rectangle +---@param pixels string|ffi.cdata* +function UpdateTextureRec(texture, rec, pixels) local _a3 if type(pixels) == "string" then _a3 = ffi.cast("const void *", pixels) else _a3 = pixels end @@ -7992,135 +6923,124 @@ function M.UpdateTextureRec(texture, rec, pixels) end ---Generate GPU mipmaps for a texture ----@param texture raylib.Texture2D ----@return raylib.Texture2D -function M.GenTextureMipmaps(texture) - local _o1 = ffi.new("Texture2D[1]", texture) - C.GenTextureMipmaps(_o1) - return _o1[0] +---@param texture ffi.cdata* +function GenTextureMipmaps(texture) + C.GenTextureMipmaps(texture) end ---Set texture scaling filter mode ----@param texture raylib.Texture2D ----@param filter integer ----@return nil -function M.SetTextureFilter(texture, filter) +---@param texture Texture2D +---@param filter TextureFilter +function SetTextureFilter(texture, filter) C.SetTextureFilter(texture, filter) end ---Set texture wrapping mode ----@param texture raylib.Texture2D ----@param wrap integer ----@return nil -function M.SetTextureWrap(texture, wrap) +---@param texture Texture2D +---@param wrap TextureWrap +function SetTextureWrap(texture, wrap) C.SetTextureWrap(texture, wrap) end ---Draw a Texture2D ----@param texture raylib.Texture2D +---@param texture Texture2D ---@param posX integer ---@param posY integer ----@param tint raylib.Color ----@return nil -function M.DrawTexture(texture, posX, posY, tint) +---@param tint Color +function DrawTexture(texture, posX, posY, tint) C.DrawTexture(texture, posX, posY, tint) end ---Draw a Texture2D with position defined as Vector2 ----@param texture raylib.Texture2D ----@param position raylib.Vector2 ----@param tint raylib.Color ----@return nil -function M.DrawTextureV(texture, position, tint) +---@param texture Texture2D +---@param position Vector2 +---@param tint Color +function DrawTextureV(texture, position, tint) C.DrawTextureV(texture, position, tint) end ---Draw a Texture2D with rotation and scale ----@param texture raylib.Texture2D ----@param position raylib.Vector2 +---@param texture Texture2D +---@param position Vector2 ---@param rotation number ---@param scale number ----@param tint raylib.Color ----@return nil -function M.DrawTextureEx(texture, position, rotation, scale, tint) +---@param tint Color +function DrawTextureEx(texture, position, rotation, scale, tint) C.DrawTextureEx(texture, position, rotation, scale, tint) end ---Draw a part of a texture defined by a rectangle ----@param texture raylib.Texture2D ----@param rec raylib.Rectangle ----@param position raylib.Vector2 ----@param tint raylib.Color ----@return nil -function M.DrawTextureRec(texture, rec, position, tint) +---@param texture Texture2D +---@param rec Rectangle +---@param position Vector2 +---@param tint Color +function DrawTextureRec(texture, rec, position, tint) C.DrawTextureRec(texture, rec, position, tint) end ---Draw a part of a texture defined by a source rectangle to destination rectangle, with scaling and rotation ----@param texture raylib.Texture2D ----@param srcrec raylib.Rectangle ----@param dstrec raylib.Rectangle ----@param origin raylib.Vector2 +---@param texture Texture2D +---@param srcrec Rectangle +---@param dstrec Rectangle +---@param origin Vector2 ---@param rotation number ----@param tint raylib.Color ----@return nil -function M.DrawTexturePro(texture, srcrec, dstrec, origin, rotation, tint) +---@param tint Color +function DrawTexturePro(texture, srcrec, dstrec, origin, rotation, tint) C.DrawTexturePro(texture, srcrec, dstrec, origin, rotation, tint) end ---Draw a texture (or part of it) that stretches or shrinks nicely ----@param texture raylib.Texture2D ----@param nPatchInfo raylib.NPatchInfo ----@param dstrec raylib.Rectangle ----@param origin raylib.Vector2 +---@param texture Texture2D +---@param nPatchInfo NPatchInfo +---@param dstrec Rectangle +---@param origin Vector2 ---@param rotation number ----@param tint raylib.Color ----@return nil -function M.DrawTextureNPatch(texture, nPatchInfo, dstrec, origin, rotation, tint) +---@param tint Color +function DrawTextureNPatch(texture, nPatchInfo, dstrec, origin, rotation, tint) C.DrawTextureNPatch(texture, nPatchInfo, dstrec, origin, rotation, tint) end ---Check if two colors are equal ----@param col1 raylib.Color ----@param col2 raylib.Color +---@param col1 Color +---@param col2 Color ---@return boolean -function M.ColorIsEqual(col1, col2) +function ColorIsEqual(col1, col2) return C.ColorIsEqual(col1, col2) end ---Get color with alpha applied, alpha goes from 0.0f to 1.0f ----@param color raylib.Color +---@param color Color ---@param alpha number ----@return raylib.Color -function M.Fade(color, alpha) +---@return Color +function Fade(color, alpha) return C.Fade(color, alpha) end ---Get hexadecimal value for a Color (0xRRGGBBAA) ----@param color raylib.Color +---@param color Color ---@return integer -function M.ColorToInt(color) +function ColorToInt(color) return C.ColorToInt(color) end ---Get Color normalized as float [0..1] ----@param color raylib.Color ----@return raylib.Vector4 -function M.ColorNormalize(color) +---@param color Color +---@return Vector4 +function ColorNormalize(color) return C.ColorNormalize(color) end ---Get Color from normalized values [0..1] ----@param normalized raylib.Vector4 ----@return raylib.Color -function M.ColorFromNormalized(normalized) +---@param normalized Vector4 +---@return Color +function ColorFromNormalized(normalized) return C.ColorFromNormalized(normalized) end ---Get HSV values for a Color, hue [0..360], saturation/value [0..1] ----@param color raylib.Color ----@return raylib.Vector3 -function M.ColorToHSV(color) +---@param color Color +---@return Vector3 +function ColorToHSV(color) return C.ColorToHSV(color) end @@ -8128,73 +7048,73 @@ end ---@param hue number ---@param saturation number ---@param value number ----@return raylib.Color -function M.ColorFromHSV(hue, saturation, value) +---@return Color +function ColorFromHSV(hue, saturation, value) return C.ColorFromHSV(hue, saturation, value) end ---Get color multiplied with another color ----@param color raylib.Color ----@param tint raylib.Color ----@return raylib.Color -function M.ColorTint(color, tint) +---@param color Color +---@param tint Color +---@return Color +function ColorTint(color, tint) return C.ColorTint(color, tint) end ---Get color with brightness correction, brightness factor goes from -1.0f to 1.0f ----@param color raylib.Color +---@param color Color ---@param factor number ----@return raylib.Color -function M.ColorBrightness(color, factor) +---@return Color +function ColorBrightness(color, factor) return C.ColorBrightness(color, factor) end ---Get color with contrast correction, contrast values between -1.0f and 1.0f ----@param color raylib.Color +---@param color Color ---@param contrast number ----@return raylib.Color -function M.ColorContrast(color, contrast) +---@return Color +function ColorContrast(color, contrast) return C.ColorContrast(color, contrast) end ---Get color with alpha applied, alpha goes from 0.0f to 1.0f ----@param color raylib.Color +---@param color Color ---@param alpha number ----@return raylib.Color -function M.ColorAlpha(color, alpha) +---@return Color +function ColorAlpha(color, alpha) return C.ColorAlpha(color, alpha) end ---Get src alpha-blended into dst color with tint ----@param dst raylib.Color ----@param src raylib.Color ----@param tint raylib.Color ----@return raylib.Color -function M.ColorAlphaBlend(dst, src, tint) +---@param dst Color +---@param src Color +---@param tint Color +---@return Color +function ColorAlphaBlend(dst, src, tint) return C.ColorAlphaBlend(dst, src, tint) end ---Get color lerp interpolation between two colors, factor [0.0f..1.0f] ----@param color1 raylib.Color ----@param color2 raylib.Color +---@param color1 Color +---@param color2 Color ---@param factor number ----@return raylib.Color -function M.ColorLerp(color1, color2, factor) +---@return Color +function ColorLerp(color1, color2, factor) return C.ColorLerp(color1, color2, factor) end ---Get Color structure from hexadecimal value ---@param hexValue integer ----@return raylib.Color -function M.GetColor(hexValue) +---@return Color +function GetColor(hexValue) return C.GetColor(hexValue) end ---Get Color from a source pixel pointer of certain format ----@param srcPtr ffi.cdata*|string +---@param srcPtr string|ffi.cdata* ---@param format integer ----@return raylib.Color -function M.GetPixelColor(srcPtr, format) +---@return Color +function GetPixelColor(srcPtr, format) local _a1 if type(srcPtr) == "string" then _a1 = ffi.cast("const void *", srcPtr) else _a1 = srcPtr end @@ -8202,15 +7122,11 @@ function M.GetPixelColor(srcPtr, format) end ---Set color formatted into destination pixel pointer ----@param dstPtr ffi.cdata*|string ----@param color raylib.Color +---@param dstPtr ffi.cdata* +---@param color Color ---@param format integer ----@return nil -function M.SetPixelColor(dstPtr, color, format) - local _a1 - if type(dstPtr) == "string" then _a1 = ffi.cast("const void *", dstPtr) - else _a1 = dstPtr end - C.SetPixelColor(_a1, color, format) +function SetPixelColor(dstPtr, color, format) + C.SetPixelColor(dstPtr, color, format) end ---Get pixel data size in bytes for certain format @@ -8218,30 +7134,30 @@ end ---@param height integer ---@param format integer ---@return integer -function M.GetPixelDataSize(width, height, format) +function GetPixelDataSize(width, height, format) return C.GetPixelDataSize(width, height, format) end ---Get the default Font ----@return raylib.Font -function M.GetFontDefault() +---@return Font +function GetFontDefault() return C.GetFontDefault() end ---Load font from file into GPU memory (VRAM) ---@param fileName string ----@return raylib.Font -function M.LoadFont(fileName) +---@return Font +function LoadFont(fileName) return C.LoadFont(fileName) end ---Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height ---@param fileName string ---@param fontSize integer ----@param codepoints integer[] +---@param codepoints integer[]|ffi.cdata* ---@param codepointCount integer ----@return raylib.Font -function M.LoadFontEx(fileName, fontSize, codepoints, codepointCount) +---@return Font +function LoadFontEx(fileName, fontSize, codepoints, codepointCount) local _a3 if type(codepoints) == "table" then _a3 = to_array("int", codepoints) else _a3 = codepoints end @@ -8249,23 +7165,23 @@ function M.LoadFontEx(fileName, fontSize, codepoints, codepointCount) end ---Load font from Image (XNA style) ----@param image raylib.Image ----@param key raylib.Color +---@param image Image +---@param key Color ---@param firstChar integer ----@return raylib.Font -function M.LoadFontFromImage(image, key, firstChar) +---@return Font +function LoadFontFromImage(image, key, firstChar) return C.LoadFontFromImage(image, key, firstChar) end ---Load font from memory buffer, fileType refers to extension: i.e. '.ttf' ---@param fileType string ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ---@param fontSize integer ----@param codepoints integer[] +---@param codepoints integer[]|ffi.cdata* ---@param codepointCount integer ----@return raylib.Font -function M.LoadFontFromMemory(fileType, fileData, dataSize, fontSize, codepoints, codepointCount) +---@return Font +function LoadFontFromMemory(fileType, fileData, dataSize, fontSize, codepoints, codepointCount) local _a2 if type(fileData) == "string" then _a2 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a2 = to_array("unsigned char", fileData) @@ -8277,22 +7193,22 @@ function M.LoadFontFromMemory(fileType, fileData, dataSize, fontSize, codepoints end ---Check if font is valid (font data loaded, WARNING: GPU texture not checked) ----@param font raylib.Font +---@param font Font ---@return boolean -function M.IsFontValid(font) +function IsFontValid(font) return C.IsFontValid(font) end ---Load font data for further use ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ---@param fontSize integer ----@param codepoints integer[] +---@param codepoints integer[]|ffi.cdata* ---@param codepointCount integer ---@param type integer ---@param glyphCount ffi.cdata* ---@return ffi.cdata* -function M.LoadFontData(fileData, dataSize, fontSize, codepoints, codepointCount, type, glyphCount) +function LoadFontData(fileData, dataSize, fontSize, codepoints, codepointCount, type, glyphCount) local _a1 if type(fileData) == "string" then _a1 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a1 = to_array("unsigned char", fileData) @@ -8304,14 +7220,14 @@ function M.LoadFontData(fileData, dataSize, fontSize, codepoints, codepointCount end ---Generate image font atlas using chars info ----@param glyphs raylib.GlyphInfo[] +---@param glyphs GlyphInfo[]|ffi.cdata* ---@param glyphRecs ffi.cdata* ---@param glyphCount integer ---@param fontSize integer ---@param padding integer ---@param packMethod integer ----@return raylib.Image -function M.GenImageFontAtlas(glyphs, glyphRecs, glyphCount, fontSize, padding, packMethod) +---@return Image +function GenImageFontAtlas(glyphs, glyphRecs, glyphCount, fontSize, padding, packMethod) local _a1 if type(glyphs) == "table" then _a1 = to_array("GlyphInfo", glyphs) else _a1 = glyphs end @@ -8321,31 +7237,28 @@ end ---Unload font chars info data (RAM) ---@param glyphs ffi.cdata* ---@param glyphCount integer ----@return nil -function M.UnloadFontData(glyphs, glyphCount) +function UnloadFontData(glyphs, glyphCount) C.UnloadFontData(glyphs, glyphCount) end ---Unload font from GPU memory (VRAM) ----@param font raylib.Font ----@return nil -function M.UnloadFont(font) +---@param font Font +function UnloadFont(font) C.UnloadFont(font) end ---Export font as code file, returns true on success ----@param font raylib.Font +---@param font Font ---@param fileName string ---@return boolean -function M.ExportFontAsCode(font, fileName) +function ExportFontAsCode(font, fileName) return C.ExportFontAsCode(font, fileName) end ---Draw current FPS ---@param posX integer ---@param posY integer ----@return nil -function M.DrawFPS(posX, posY) +function DrawFPS(posX, posY) C.DrawFPS(posX, posY) end @@ -8354,59 +7267,54 @@ end ---@param posX integer ---@param posY integer ---@param fontSize integer ----@param color raylib.Color ----@return nil -function M.DrawText(text, posX, posY, fontSize, color) +---@param color Color +function DrawText(text, posX, posY, fontSize, color) C.DrawText(text, posX, posY, fontSize, color) end ---Draw text using font and additional parameters ----@param font raylib.Font +---@param font Font ---@param text string ----@param position raylib.Vector2 +---@param position Vector2 ---@param fontSize number ---@param spacing number ----@param tint raylib.Color ----@return nil -function M.DrawTextEx(font, text, position, fontSize, spacing, tint) +---@param tint Color +function DrawTextEx(font, text, position, fontSize, spacing, tint) C.DrawTextEx(font, text, position, fontSize, spacing, tint) end ---Draw text using Font and pro parameters (rotation) ----@param font raylib.Font +---@param font Font ---@param text string ----@param position raylib.Vector2 ----@param origin raylib.Vector2 +---@param position Vector2 +---@param origin Vector2 ---@param rotation number ---@param fontSize number ---@param spacing number ----@param tint raylib.Color ----@return nil -function M.DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint) +---@param tint Color +function DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint) C.DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint) end ---Draw one character (codepoint) ----@param font raylib.Font +---@param font Font ---@param codepoint integer ----@param position raylib.Vector2 +---@param position Vector2 ---@param fontSize number ----@param tint raylib.Color ----@return nil -function M.DrawTextCodepoint(font, codepoint, position, fontSize, tint) +---@param tint Color +function DrawTextCodepoint(font, codepoint, position, fontSize, tint) C.DrawTextCodepoint(font, codepoint, position, fontSize, tint) end ---Draw multiple characters (codepoint) ----@param font raylib.Font ----@param codepoints integer[] +---@param font Font +---@param codepoints integer[]|ffi.cdata* ---@param codepointCount integer ----@param position raylib.Vector2 +---@param position Vector2 ---@param fontSize number ---@param spacing number ----@param tint raylib.Color ----@return nil -function M.DrawTextCodepoints(font, codepoints, codepointCount, position, fontSize, spacing, tint) +---@param tint Color +function DrawTextCodepoints(font, codepoints, codepointCount, position, fontSize, spacing, tint) local _a2 if type(codepoints) == "table" then _a2 = to_array("int", codepoints) else _a2 = codepoints end @@ -8415,8 +7323,7 @@ end ---Set vertical line spacing when drawing with line-breaks ---@param spacing integer ----@return nil -function M.SetTextLineSpacing(spacing) +function SetTextLineSpacing(spacing) C.SetTextLineSpacing(spacing) end @@ -8424,28 +7331,28 @@ end ---@param text string ---@param fontSize integer ---@return integer -function M.MeasureText(text, fontSize) +function MeasureText(text, fontSize) return C.MeasureText(text, fontSize) end ---Measure string size for Font ----@param font raylib.Font +---@param font Font ---@param text string ---@param fontSize number ---@param spacing number ----@return raylib.Vector2 -function M.MeasureTextEx(font, text, fontSize, spacing) +---@return Vector2 +function MeasureTextEx(font, text, fontSize, spacing) return C.MeasureTextEx(font, text, fontSize, spacing) end ---Measure string size for an existing array of codepoints for Font ----@param font raylib.Font ----@param codepoints integer[] +---@param font Font +---@param codepoints integer[]|ffi.cdata* ---@param length integer ---@param fontSize number ---@param spacing number ----@return raylib.Vector2 -function M.MeasureTextCodepoints(font, codepoints, length, fontSize, spacing) +---@return Vector2 +function MeasureTextCodepoints(font, codepoints, length, fontSize, spacing) local _a2 if type(codepoints) == "table" then _a2 = to_array("int", codepoints) else _a2 = codepoints end @@ -8453,50 +7360,45 @@ function M.MeasureTextCodepoints(font, codepoints, length, fontSize, spacing) end ---Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found ----@param font raylib.Font +---@param font Font ---@param codepoint integer ---@return integer -function M.GetGlyphIndex(font, codepoint) +function GetGlyphIndex(font, codepoint) return C.GetGlyphIndex(font, codepoint) end ---Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found ----@param font raylib.Font +---@param font Font ---@param codepoint integer ----@return raylib.GlyphInfo -function M.GetGlyphInfo(font, codepoint) +---@return GlyphInfo +function GetGlyphInfo(font, codepoint) return C.GetGlyphInfo(font, codepoint) end ---Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found ----@param font raylib.Font +---@param font Font ---@param codepoint integer ----@return raylib.Rectangle -function M.GetGlyphAtlasRec(font, codepoint) +---@return Rectangle +function GetGlyphAtlasRec(font, codepoint) return C.GetGlyphAtlasRec(font, codepoint) end ---Load UTF-8 text encoded from codepoints array ----@param codepoints integer[] +---@param codepoints integer[]|ffi.cdata* ---@param length integer ---@return string|nil -function M.LoadUTF8(codepoints, length) +function LoadUTF8(codepoints, length) local _a1 if type(codepoints) == "table" then _a1 = to_array("int", codepoints) else _a1 = codepoints end - local _p = C.LoadUTF8(_a1, length) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - C.UnloadUTF8(_p) - return _s + local _r = C.LoadUTF8(_a1, length) + if _r == nil then return nil end + return ffi.string(_r) end ---Unload UTF-8 text encoded from codepoints array ----@param text raylib.char_buffer|string ----@return nil -function M.UnloadUTF8(text) +---@param text ffi.cdata* +function UnloadUTF8(text) C.UnloadUTF8(text) end @@ -8504,21 +7406,20 @@ end ---@param text string ---@param count ffi.cdata* ---@return ffi.cdata* -function M.LoadCodepoints(text, count) +function LoadCodepoints(text, count) return C.LoadCodepoints(text, count) end ---Unload codepoints data from memory ---@param codepoints ffi.cdata* ----@return nil -function M.UnloadCodepoints(codepoints) +function UnloadCodepoints(codepoints) C.UnloadCodepoints(codepoints) end ---Get total number of codepoints in a UTF-8 encoded string ---@param text string ---@return integer -function M.GetCodepointCount(text) +function GetCodepointCount(text) return C.GetCodepointCount(text) end @@ -8526,7 +7427,7 @@ end ---@param text string ---@param codepointSize ffi.cdata* ---@return integer -function M.GetCodepoint(text, codepointSize) +function GetCodepoint(text, codepointSize) return C.GetCodepoint(text, codepointSize) end @@ -8534,7 +7435,7 @@ end ---@param text string ---@param codepointSize ffi.cdata* ---@return integer -function M.GetCodepointNext(text, codepointSize) +function GetCodepointNext(text, codepointSize) return C.GetCodepointNext(text, codepointSize) end @@ -8542,33 +7443,31 @@ end ---@param text string ---@param codepointSize ffi.cdata* ---@return integer -function M.GetCodepointPrevious(text, codepointSize) +function GetCodepointPrevious(text, codepointSize) return C.GetCodepointPrevious(text, codepointSize) end ---Encode one codepoint into UTF-8 byte array (array length returned as parameter) ---@param codepoint integer ----@return string|nil -function M.CodepointToUTF8(codepoint) - local size = ffi.new("int[1]") - local p = C.CodepointToUTF8(codepoint, size) - if p == nil then return nil end - return ffi_string(p, size[0]) +---@param utf8Size ffi.cdata* +---@return string +function CodepointToUTF8(codepoint, utf8Size) + local _r = C.CodepointToUTF8(codepoint, utf8Size) + return _r ~= nil and ffi.string(_r) or "" end ---Load text as separate lines ('\n') ---@param text string ---@param count ffi.cdata* ---@return ffi.cdata* -function M.LoadTextLines(text, count) +function LoadTextLines(text, count) return C.LoadTextLines(text, count) end ---Unload text lines ----@param text string[]|raylib.cstring_array +---@param text string[]|ffi.cdata* ---@param lineCount integer ----@return nil -function M.UnloadTextLines(text, lineCount) +function UnloadTextLines(text, lineCount) local _a1 if type(text) == "table" then _a1 = ffi.cast("char **", to_array("const char *", text)) else _a1 = text end @@ -8576,10 +7475,10 @@ function M.UnloadTextLines(text, lineCount) end ---Copy one string to another, returns bytes copied ----@param dst raylib.char_buffer|string +---@param dst ffi.cdata* ---@param src string ---@return integer -function M.TextCopy(dst, src) +function TextCopy(dst, src) return C.TextCopy(dst, src) end @@ -8587,14 +7486,14 @@ end ---@param text1 string ---@param text2 string ---@return boolean -function M.TextIsEqual(text1, text2) +function TextIsEqual(text1, text2) return C.TextIsEqual(text1, text2) end ---Get text length, checks for '\0' ending ---@param text string ---@return integer -function M.TextLength(text) +function TextLength(text) return C.TextLength(text) end @@ -8602,7 +7501,7 @@ end ---@param fmt string ---@param ... any ---@return string -function M.TextFormat(fmt, ...) +function TextFormat(fmt, ...) if select("#", ...) == 0 then return fmt end @@ -8613,40 +7512,29 @@ end ---@param text string ---@param position integer ---@param length integer ----@return string|nil -function M.TextSubtext(text, position, length) - local _p = C.TextSubtext(text, position, length) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function TextSubtext(text, position, length) + local _r = C.TextSubtext(text, position, length) + return _r ~= nil and ffi.string(_r) or "" end ---Remove text spaces, concat words ---@param text string ----@return string|nil -function M.TextRemoveSpaces(text) - local _p = C.TextRemoveSpaces(text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function TextRemoveSpaces(text) + local _r = C.TextRemoveSpaces(text) + return _r ~= nil and ffi.string(_r) or "" end ---Get text between two strings ---@param text string ---@param begin string ----@param end_ string +---@param _end string ---@return string|nil -function M.GetTextBetween(text, begin, end_) - local _p = C.GetTextBetween(text, begin, end_) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function GetTextBetween(text, begin, _end) + local _r = C.GetTextBetween(text, begin, _end) + if _r == nil then return nil end + return ffi.string(_r) end ---Replace text string with new string @@ -8654,13 +7542,10 @@ end ---@param search string ---@param replacement string ---@return string|nil -function M.TextReplace(text, search, replacement) - local _p = C.TextReplace(text, search, replacement) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextReplace(text, search, replacement) + local _r = C.TextReplace(text, search, replacement) + if _r == nil then return nil end + return ffi.string(_r) end ---Replace text string with new string, memory must be MemFree() @@ -8668,45 +7553,34 @@ end ---@param search string ---@param replacement string ---@return string|nil -function M.TextReplaceAlloc(text, search, replacement) - local _p = C.TextReplaceAlloc(text, search, replacement) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - C.MemFree(_p) - return _s +function TextReplaceAlloc(text, search, replacement) + local _r = C.TextReplaceAlloc(text, search, replacement) + if _r == nil then return nil end + return ffi.string(_r) end ---Replace text between two specific strings ---@param text string ---@param begin string ----@param end_ string +---@param _end string ---@param replacement string ---@return string|nil -function M.TextReplaceBetween(text, begin, end_, replacement) - local _p = C.TextReplaceBetween(text, begin, end_, replacement) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextReplaceBetween(text, begin, _end, replacement) + local _r = C.TextReplaceBetween(text, begin, _end, replacement) + if _r == nil then return nil end + return ffi.string(_r) end ---Replace text between two specific strings, memory must be MemFree() ---@param text string ---@param begin string ----@param end_ string +---@param _end string ---@param replacement string ---@return string|nil -function M.TextReplaceBetweenAlloc(text, begin, end_, replacement) - local _p = C.TextReplaceBetweenAlloc(text, begin, end_, replacement) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - C.MemFree(_p) - return _s +function TextReplaceBetweenAlloc(text, begin, _end, replacement) + local _r = C.TextReplaceBetweenAlloc(text, begin, _end, replacement) + if _r == nil then return nil end + return ffi.string(_r) end ---Insert text in a defined byte position @@ -8714,13 +7588,10 @@ end ---@param insert string ---@param position integer ---@return string|nil -function M.TextInsert(text, insert, position) - local _p = C.TextInsert(text, insert, position) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextInsert(text, insert, position) + local _r = C.TextInsert(text, insert, position) + if _r == nil then return nil end + return ffi.string(_r) end ---Insert text in a defined byte position, memory must be MemFree() @@ -8728,31 +7599,24 @@ end ---@param insert string ---@param position integer ---@return string|nil -function M.TextInsertAlloc(text, insert, position) - local _p = C.TextInsertAlloc(text, insert, position) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - C.MemFree(_p) - return _s +function TextInsertAlloc(text, insert, position) + local _r = C.TextInsertAlloc(text, insert, position) + if _r == nil then return nil end + return ffi.string(_r) end ---Join text strings with delimiter ----@param textList string[]|raylib.cstring_array +---@param textList string[]|ffi.cdata* ---@param count integer ---@param delimiter string ---@return string|nil -function M.TextJoin(textList, count, delimiter) +function TextJoin(textList, count, delimiter) local _a1 if type(textList) == "table" then _a1 = ffi.cast("char **", to_array("const char *", textList)) else _a1 = textList end - local _p = C.TextJoin(_a1, count, delimiter) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s + local _r = C.TextJoin(_a1, count, delimiter) + if _r == nil then return nil end + return ffi.string(_r) end ---Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings @@ -8760,16 +7624,15 @@ end ---@param delimiter integer ---@param count ffi.cdata* ---@return ffi.cdata* -function M.TextSplit(text, delimiter, count) +function TextSplit(text, delimiter, count) return C.TextSplit(text, delimiter, count) end ---Append text at specific position and move cursor ----@param text raylib.char_buffer|string +---@param text ffi.cdata* ---@param append string ---@param position ffi.cdata* ----@return nil -function M.TextAppend(text, append, position) +function TextAppend(text, append, position) C.TextAppend(text, append, position) end @@ -8777,128 +7640,108 @@ end ---@param text string ---@param search string ---@return integer -function M.TextFindIndex(text, search) +function TextFindIndex(text, search) return C.TextFindIndex(text, search) end ---Get upper case version of provided string ---@param text string ---@return string|nil -function M.TextToUpper(text) - local _p = C.TextToUpper(text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextToUpper(text) + local _r = C.TextToUpper(text) + if _r == nil then return nil end + return ffi.string(_r) end ---Get lower case version of provided string ---@param text string ---@return string|nil -function M.TextToLower(text) - local _p = C.TextToLower(text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextToLower(text) + local _r = C.TextToLower(text) + if _r == nil then return nil end + return ffi.string(_r) end ---Get Pascal case notation version of provided string ---@param text string ---@return string|nil -function M.TextToPascal(text) - local _p = C.TextToPascal(text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextToPascal(text) + local _r = C.TextToPascal(text) + if _r == nil then return nil end + return ffi.string(_r) end ---Get Snake case notation version of provided string ---@param text string ---@return string|nil -function M.TextToSnake(text) - local _p = C.TextToSnake(text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextToSnake(text) + local _r = C.TextToSnake(text) + if _r == nil then return nil end + return ffi.string(_r) end ---Get Camel case notation version of provided string ---@param text string ---@return string|nil -function M.TextToCamel(text) - local _p = C.TextToCamel(text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +function TextToCamel(text) + local _r = C.TextToCamel(text) + if _r == nil then return nil end + return ffi.string(_r) end ---Get integer value from text ---@param text string ---@return integer -function M.TextToInteger(text) +function TextToInteger(text) return C.TextToInteger(text) end ---Get float value from text ---@param text string ---@return number -function M.TextToFloat(text) +function TextToFloat(text) return C.TextToFloat(text) end ---Draw a line in 3D world space ----@param startPos raylib.Vector3 ----@param endPos raylib.Vector3 ----@param color raylib.Color ----@return nil -function M.DrawLine3D(startPos, endPos, color) +---@param startPos Vector3 +---@param endPos Vector3 +---@param color Color +function DrawLine3D(startPos, endPos, color) C.DrawLine3D(startPos, endPos, color) end ---Draw a point in 3D space, actually a small line ----@param position raylib.Vector3 ----@param color raylib.Color ----@return nil -function M.DrawPoint3D(position, color) +---@param position Vector3 +---@param color Color +function DrawPoint3D(position, color) C.DrawPoint3D(position, color) end ---Draw a circle in 3D world space ----@param center raylib.Vector3 +---@param center Vector3 ---@param radius number ----@param rotationAxis raylib.Vector3 +---@param rotationAxis Vector3 ---@param rotationAngle number ----@param color raylib.Color ----@return nil -function M.DrawCircle3D(center, radius, rotationAxis, rotationAngle, color) +---@param color Color +function DrawCircle3D(center, radius, rotationAxis, rotationAngle, color) C.DrawCircle3D(center, radius, rotationAxis, rotationAngle, color) end ---Draw a color-filled triangle, counter-clockwise vertex order ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@param v3 raylib.Vector3 ----@param color raylib.Color ----@return nil -function M.DrawTriangle3D(v1, v2, v3, color) +---@param v1 Vector3 +---@param v2 Vector3 +---@param v3 Vector3 +---@param color Color +function DrawTriangle3D(v1, v2, v3, color) C.DrawTriangle3D(v1, v2, v3, color) end ---Draw a triangle strip defined by points ----@param points raylib.Vector3[] +---@param points Vector3[]|ffi.cdata* ---@param pointCount integer ----@param color raylib.Color ----@return nil -function M.DrawTriangleStrip3D(points, pointCount, color) +---@param color Color +function DrawTriangleStrip3D(points, pointCount, color) local _a1 if type(points) == "table" then _a1 = to_array("Vector3", points) else _a1 = points end @@ -8906,316 +7749,287 @@ function M.DrawTriangleStrip3D(points, pointCount, color) end ---Draw cube ----@param position raylib.Vector3 +---@param position Vector3 ---@param width number ---@param height number ---@param length number ----@param color raylib.Color ----@return nil -function M.DrawCube(position, width, height, length, color) +---@param color Color +function DrawCube(position, width, height, length, color) C.DrawCube(position, width, height, length, color) end ---Draw cube (Vector version) ----@param position raylib.Vector3 ----@param size raylib.Vector3 ----@param color raylib.Color ----@return nil -function M.DrawCubeV(position, size, color) +---@param position Vector3 +---@param size Vector3 +---@param color Color +function DrawCubeV(position, size, color) C.DrawCubeV(position, size, color) end ---Draw cube wires ----@param position raylib.Vector3 +---@param position Vector3 ---@param width number ---@param height number ---@param length number ----@param color raylib.Color ----@return nil -function M.DrawCubeWires(position, width, height, length, color) +---@param color Color +function DrawCubeWires(position, width, height, length, color) C.DrawCubeWires(position, width, height, length, color) end ---Draw cube wires (Vector version) ----@param position raylib.Vector3 ----@param size raylib.Vector3 ----@param color raylib.Color ----@return nil -function M.DrawCubeWiresV(position, size, color) +---@param position Vector3 +---@param size Vector3 +---@param color Color +function DrawCubeWiresV(position, size, color) C.DrawCubeWiresV(position, size, color) end ---Draw sphere ----@param centerPos raylib.Vector3 +---@param centerPos Vector3 ---@param radius number ----@param color raylib.Color ----@return nil -function M.DrawSphere(centerPos, radius, color) +---@param color Color +function DrawSphere(centerPos, radius, color) C.DrawSphere(centerPos, radius, color) end ---Draw sphere with defined rings and slices ----@param centerPos raylib.Vector3 +---@param centerPos Vector3 ---@param radius number ---@param rings integer ---@param slices integer ----@param color raylib.Color ----@return nil -function M.DrawSphereEx(centerPos, radius, rings, slices, color) +---@param color Color +function DrawSphereEx(centerPos, radius, rings, slices, color) C.DrawSphereEx(centerPos, radius, rings, slices, color) end ---Draw sphere wires ----@param centerPos raylib.Vector3 +---@param centerPos Vector3 ---@param radius number ---@param rings integer ---@param slices integer ----@param color raylib.Color ----@return nil -function M.DrawSphereWires(centerPos, radius, rings, slices, color) +---@param color Color +function DrawSphereWires(centerPos, radius, rings, slices, color) C.DrawSphereWires(centerPos, radius, rings, slices, color) end ---Draw a cylinder/cone ----@param position raylib.Vector3 +---@param position Vector3 ---@param radiusTop number ---@param radiusBottom number ---@param height number ---@param sides integer ----@param color raylib.Color ----@return nil -function M.DrawCylinder(position, radiusTop, radiusBottom, height, sides, color) +---@param color Color +function DrawCylinder(position, radiusTop, radiusBottom, height, sides, color) C.DrawCylinder(position, radiusTop, radiusBottom, height, sides, color) end ---Draw a cylinder with base at startPos and top at endPos ----@param startPos raylib.Vector3 ----@param endPos raylib.Vector3 +---@param startPos Vector3 +---@param endPos Vector3 ---@param startRadius number ---@param endRadius number ---@param sides integer ----@param color raylib.Color ----@return nil -function M.DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color) +---@param color Color +function DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color) C.DrawCylinderEx(startPos, endPos, startRadius, endRadius, sides, color) end ---Draw a cylinder/cone wires ----@param position raylib.Vector3 +---@param position Vector3 ---@param radiusTop number ---@param radiusBottom number ---@param height number ---@param sides integer ----@param color raylib.Color ----@return nil -function M.DrawCylinderWires(position, radiusTop, radiusBottom, height, sides, color) +---@param color Color +function DrawCylinderWires(position, radiusTop, radiusBottom, height, sides, color) C.DrawCylinderWires(position, radiusTop, radiusBottom, height, sides, color) end ---Draw a cylinder wires with base at startPos and top at endPos ----@param startPos raylib.Vector3 ----@param endPos raylib.Vector3 +---@param startPos Vector3 +---@param endPos Vector3 ---@param startRadius number ---@param endRadius number ---@param sides integer ----@param color raylib.Color ----@return nil -function M.DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color) +---@param color Color +function DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color) C.DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color) end ---Draw a capsule with the center of its sphere caps at startPos and endPos ----@param startPos raylib.Vector3 ----@param endPos raylib.Vector3 +---@param startPos Vector3 +---@param endPos Vector3 ---@param radius number ---@param rings integer ---@param slices integer ----@param color raylib.Color ----@return nil -function M.DrawCapsule(startPos, endPos, radius, rings, slices, color) +---@param color Color +function DrawCapsule(startPos, endPos, radius, rings, slices, color) C.DrawCapsule(startPos, endPos, radius, rings, slices, color) end ---Draw capsule wireframe with the center of its sphere caps at startPos and endPos ----@param startPos raylib.Vector3 ----@param endPos raylib.Vector3 +---@param startPos Vector3 +---@param endPos Vector3 ---@param radius number ---@param rings integer ---@param slices integer ----@param color raylib.Color ----@return nil -function M.DrawCapsuleWires(startPos, endPos, radius, rings, slices, color) +---@param color Color +function DrawCapsuleWires(startPos, endPos, radius, rings, slices, color) C.DrawCapsuleWires(startPos, endPos, radius, rings, slices, color) end ---Draw a plane XZ ----@param centerPos raylib.Vector3 ----@param size raylib.Vector2 ----@param color raylib.Color ----@return nil -function M.DrawPlane(centerPos, size, color) +---@param centerPos Vector3 +---@param size Vector2 +---@param color Color +function DrawPlane(centerPos, size, color) C.DrawPlane(centerPos, size, color) end ---Draw a ray line ----@param ray raylib.Ray ----@param color raylib.Color ----@return nil -function M.DrawRay(ray, color) +---@param ray Ray +---@param color Color +function DrawRay(ray, color) C.DrawRay(ray, color) end ---Draw a grid (centered at (0, 0, 0)) ---@param slices integer ---@param spacing number ----@return nil -function M.DrawGrid(slices, spacing) +function DrawGrid(slices, spacing) C.DrawGrid(slices, spacing) end ---Load model from files (meshes and materials) ---@param fileName string ----@return raylib.Model -function M.LoadModel(fileName) +---@return Model +function LoadModel(fileName) return C.LoadModel(fileName) end ---Load model from generated mesh (default material) ----@param mesh raylib.Mesh ----@return raylib.Model -function M.LoadModelFromMesh(mesh) +---@param mesh Mesh +---@return Model +function LoadModelFromMesh(mesh) return C.LoadModelFromMesh(mesh) end ---Check if model is valid (loaded in GPU, VAO/VBOs) ----@param model raylib.Model +---@param model Model ---@return boolean -function M.IsModelValid(model) +function IsModelValid(model) return C.IsModelValid(model) end ---Unload model (including meshes) from memory (RAM and/or VRAM) ----@param model raylib.Model ----@return nil -function M.UnloadModel(model) +---@param model Model +function UnloadModel(model) C.UnloadModel(model) end ---Compute model bounding box limits (considers all meshes) ----@param model raylib.Model ----@return raylib.BoundingBox -function M.GetModelBoundingBox(model) +---@param model Model +---@return BoundingBox +function GetModelBoundingBox(model) return C.GetModelBoundingBox(model) end ---Draw a model (with texture if set) ----@param model raylib.Model ----@param position raylib.Vector3 +---@param model Model +---@param position Vector3 ---@param scale number ----@param tint raylib.Color ----@return nil -function M.DrawModel(model, position, scale, tint) +---@param tint Color +function DrawModel(model, position, scale, tint) C.DrawModel(model, position, scale, tint) end ---Draw a model with custom transform ----@param model raylib.Model ----@param position raylib.Vector3 ----@param rotationAxis raylib.Vector3 +---@param model Model +---@param position Vector3 +---@param rotationAxis Vector3 ---@param rotationAngle number ----@param scale raylib.Vector3 ----@param tint raylib.Color ----@return nil -function M.DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint) +---@param scale Vector3 +---@param tint Color +function DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint) C.DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint) end ---Draw a model wires (with texture if set) ----@param model raylib.Model ----@param position raylib.Vector3 +---@param model Model +---@param position Vector3 ---@param scale number ----@param tint raylib.Color ----@return nil -function M.DrawModelWires(model, position, scale, tint) +---@param tint Color +function DrawModelWires(model, position, scale, tint) C.DrawModelWires(model, position, scale, tint) end ---Draw a model wires with custom transform ----@param model raylib.Model ----@param position raylib.Vector3 ----@param rotationAxis raylib.Vector3 +---@param model Model +---@param position Vector3 +---@param rotationAxis Vector3 ---@param rotationAngle number ----@param scale raylib.Vector3 ----@param tint raylib.Color ----@return nil -function M.DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint) +---@param scale Vector3 +---@param tint Color +function DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint) C.DrawModelWiresEx(model, position, rotationAxis, rotationAngle, scale, tint) end ---Draw bounding box (wires) ----@param box raylib.BoundingBox ----@param color raylib.Color ----@return nil -function M.DrawBoundingBox(box, color) +---@param box BoundingBox +---@param color Color +function DrawBoundingBox(box, color) C.DrawBoundingBox(box, color) end ---Draw a billboard texture ----@param camera raylib.Camera ----@param texture raylib.Texture2D ----@param position raylib.Vector3 +---@param camera Camera +---@param texture Texture2D +---@param position Vector3 ---@param scale number ----@param tint raylib.Color ----@return nil -function M.DrawBillboard(camera, texture, position, scale, tint) +---@param tint Color +function DrawBillboard(camera, texture, position, scale, tint) C.DrawBillboard(camera, texture, position, scale, tint) end ---Draw a billboard texture defined by rectangle ----@param camera raylib.Camera ----@param texture raylib.Texture2D ----@param rec raylib.Rectangle ----@param position raylib.Vector3 ----@param size raylib.Vector2 ----@param tint raylib.Color ----@return nil -function M.DrawBillboardRec(camera, texture, rec, position, size, tint) +---@param camera Camera +---@param texture Texture2D +---@param rec Rectangle +---@param position Vector3 +---@param size Vector2 +---@param tint Color +function DrawBillboardRec(camera, texture, rec, position, size, tint) C.DrawBillboardRec(camera, texture, rec, position, size, tint) end ---Draw a billboard texture defined by source rectangle with scaling and rotation ----@param camera raylib.Camera ----@param texture raylib.Texture2D ----@param rec raylib.Rectangle ----@param position raylib.Vector3 ----@param up raylib.Vector3 ----@param size raylib.Vector2 ----@param origin raylib.Vector2 +---@param camera Camera +---@param texture Texture2D +---@param rec Rectangle +---@param position Vector3 +---@param up Vector3 +---@param size Vector2 +---@param origin Vector2 ---@param rotation number ----@param tint raylib.Color ----@return nil -function M.DrawBillboardPro(camera, texture, rec, position, up, size, origin, rotation, tint) +---@param tint Color +function DrawBillboardPro(camera, texture, rec, position, up, size, origin, rotation, tint) C.DrawBillboardPro(camera, texture, rec, position, up, size, origin, rotation, tint) end ---Upload mesh vertex data in GPU and provide VAO/VBO ids ----@param mesh raylib.Mesh +---@param mesh ffi.cdata* ---@param dynamic boolean ----@return raylib.Mesh -function M.UploadMesh(mesh, dynamic) - local _o1 = ffi.new("Mesh[1]", mesh) - C.UploadMesh(_o1, dynamic) - return _o1[0] +function UploadMesh(mesh, dynamic) + C.UploadMesh(mesh, dynamic) end ---Update mesh vertex data in GPU for a specific buffer index ----@param mesh raylib.Mesh +---@param mesh Mesh ---@param index integer ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param dataSize integer ---@param offset integer ----@return nil -function M.UpdateMeshBuffer(mesh, index, data, dataSize, offset) +function UpdateMeshBuffer(mesh, index, data, dataSize, offset) local _a3 if type(data) == "string" then _a3 = ffi.cast("const void *", data) else _a3 = data end @@ -9223,28 +8037,25 @@ function M.UpdateMeshBuffer(mesh, index, data, dataSize, offset) end ---Unload mesh data from CPU and GPU ----@param mesh raylib.Mesh ----@return nil -function M.UnloadMesh(mesh) +---@param mesh Mesh +function UnloadMesh(mesh) C.UnloadMesh(mesh) end ---Draw a 3d mesh with material and transform ----@param mesh raylib.Mesh ----@param material raylib.Material ----@param transform raylib.Matrix ----@return nil -function M.DrawMesh(mesh, material, transform) +---@param mesh Mesh +---@param material Material +---@param transform Matrix +function DrawMesh(mesh, material, transform) C.DrawMesh(mesh, material, transform) end ---Draw multiple mesh instances with material and different transforms ----@param mesh raylib.Mesh ----@param material raylib.Material ----@param transforms raylib.Matrix[] +---@param mesh Mesh +---@param material Material +---@param transforms Matrix[]|ffi.cdata* ---@param instances integer ----@return nil -function M.DrawMeshInstanced(mesh, material, transforms, instances) +function DrawMeshInstanced(mesh, material, transforms, instances) local _a3 if type(transforms) == "table" then _a3 = to_array("Matrix", transforms) else _a3 = transforms end @@ -9252,42 +8063,39 @@ function M.DrawMeshInstanced(mesh, material, transforms, instances) end ---Compute mesh bounding box limits ----@param mesh raylib.Mesh ----@return raylib.BoundingBox -function M.GetMeshBoundingBox(mesh) +---@param mesh Mesh +---@return BoundingBox +function GetMeshBoundingBox(mesh) return C.GetMeshBoundingBox(mesh) end ---Compute mesh tangents ----@param mesh raylib.Mesh ----@return raylib.Mesh -function M.GenMeshTangents(mesh) - local _o1 = ffi.new("Mesh[1]", mesh) - C.GenMeshTangents(_o1) - return _o1[0] +---@param mesh ffi.cdata* +function GenMeshTangents(mesh) + C.GenMeshTangents(mesh) end ---Export mesh data to file, returns true on success ----@param mesh raylib.Mesh +---@param mesh Mesh ---@param fileName string ---@return boolean -function M.ExportMesh(mesh, fileName) +function ExportMesh(mesh, fileName) return C.ExportMesh(mesh, fileName) end ---Export mesh as code file (.h) defining multiple arrays of vertex attributes ----@param mesh raylib.Mesh +---@param mesh Mesh ---@param fileName string ---@return boolean -function M.ExportMeshAsCode(mesh, fileName) +function ExportMeshAsCode(mesh, fileName) return C.ExportMeshAsCode(mesh, fileName) end ---Generate polygonal mesh ---@param sides integer ---@param radius number ----@return raylib.Mesh -function M.GenMeshPoly(sides, radius) +---@return Mesh +function GenMeshPoly(sides, radius) return C.GenMeshPoly(sides, radius) end @@ -9296,8 +8104,8 @@ end ---@param length number ---@param resX integer ---@param resZ integer ----@return raylib.Mesh -function M.GenMeshPlane(width, length, resX, resZ) +---@return Mesh +function GenMeshPlane(width, length, resX, resZ) return C.GenMeshPlane(width, length, resX, resZ) end @@ -9305,8 +8113,8 @@ end ---@param width number ---@param height number ---@param length number ----@return raylib.Mesh -function M.GenMeshCube(width, height, length) +---@return Mesh +function GenMeshCube(width, height, length) return C.GenMeshCube(width, height, length) end @@ -9314,8 +8122,8 @@ end ---@param radius number ---@param rings integer ---@param slices integer ----@return raylib.Mesh -function M.GenMeshSphere(radius, rings, slices) +---@return Mesh +function GenMeshSphere(radius, rings, slices) return C.GenMeshSphere(radius, rings, slices) end @@ -9323,8 +8131,8 @@ end ---@param radius number ---@param rings integer ---@param slices integer ----@return raylib.Mesh -function M.GenMeshHemiSphere(radius, rings, slices) +---@return Mesh +function GenMeshHemiSphere(radius, rings, slices) return C.GenMeshHemiSphere(radius, rings, slices) end @@ -9332,8 +8140,8 @@ end ---@param radius number ---@param height number ---@param slices integer ----@return raylib.Mesh -function M.GenMeshCylinder(radius, height, slices) +---@return Mesh +function GenMeshCylinder(radius, height, slices) return C.GenMeshCylinder(radius, height, slices) end @@ -9341,8 +8149,8 @@ end ---@param radius number ---@param height number ---@param slices integer ----@return raylib.Mesh -function M.GenMeshCone(radius, height, slices) +---@return Mesh +function GenMeshCone(radius, height, slices) return C.GenMeshCone(radius, height, slices) end @@ -9351,8 +8159,8 @@ end ---@param size number ---@param radSeg integer ---@param sides integer ----@return raylib.Mesh -function M.GenMeshTorus(radius, size, radSeg, sides) +---@return Mesh +function GenMeshTorus(radius, size, radSeg, sides) return C.GenMeshTorus(radius, size, radSeg, sides) end @@ -9361,24 +8169,24 @@ end ---@param size number ---@param radSeg integer ---@param sides integer ----@return raylib.Mesh -function M.GenMeshKnot(radius, size, radSeg, sides) +---@return Mesh +function GenMeshKnot(radius, size, radSeg, sides) return C.GenMeshKnot(radius, size, radSeg, sides) end ---Generate heightmap mesh from image data ----@param heightmap raylib.Image ----@param size raylib.Vector3 ----@return raylib.Mesh -function M.GenMeshHeightmap(heightmap, size) +---@param heightmap Image +---@param size Vector3 +---@return Mesh +function GenMeshHeightmap(heightmap, size) return C.GenMeshHeightmap(heightmap, size) end ---Generate cubes-based map mesh from image data ----@param cubicmap raylib.Image ----@param cubeSize raylib.Vector3 ----@return raylib.Mesh -function M.GenMeshCubicmap(cubicmap, cubeSize) +---@param cubicmap Image +---@param cubeSize Vector3 +---@return Mesh +function GenMeshCubicmap(cubicmap, cubeSize) return C.GenMeshCubicmap(cubicmap, cubeSize) end @@ -9386,215 +8194,202 @@ end ---@param fileName string ---@param materialCount ffi.cdata* ---@return ffi.cdata* -function M.LoadMaterials(fileName, materialCount) +function LoadMaterials(fileName, materialCount) return C.LoadMaterials(fileName, materialCount) end ---Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) ----@return raylib.Material -function M.LoadMaterialDefault() +---@return Material +function LoadMaterialDefault() return C.LoadMaterialDefault() end ---Check if material is valid (shader assigned, map textures loaded in GPU) ----@param material raylib.Material +---@param material Material ---@return boolean -function M.IsMaterialValid(material) +function IsMaterialValid(material) return C.IsMaterialValid(material) end ---Unload material from GPU memory (VRAM) ----@param material raylib.Material ----@return nil -function M.UnloadMaterial(material) +---@param material Material +function UnloadMaterial(material) C.UnloadMaterial(material) end ---Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) ----@param material raylib.Material ----@param mapType integer ----@param texture raylib.Texture2D ----@return raylib.Material -function M.SetMaterialTexture(material, mapType, texture) - local _o1 = ffi.new("Material[1]", material) - C.SetMaterialTexture(_o1, mapType, texture) - return _o1[0] +---@param material ffi.cdata* +---@param mapType MaterialMapIndex +---@param texture Texture2D +function SetMaterialTexture(material, mapType, texture) + C.SetMaterialTexture(material, mapType, texture) end ---Set material for a mesh ----@param model raylib.Model +---@param model ffi.cdata* ---@param meshId integer ---@param materialId integer ----@return raylib.Model -function M.SetModelMeshMaterial(model, meshId, materialId) - local _o1 = ffi.new("Model[1]", model) - C.SetModelMeshMaterial(_o1, meshId, materialId) - return _o1[0] +function SetModelMeshMaterial(model, meshId, materialId) + C.SetModelMeshMaterial(model, meshId, materialId) end ---Load model animations from file ---@param fileName string ---@param animCount ffi.cdata* ---@return ffi.cdata* -function M.LoadModelAnimations(fileName, animCount) +function LoadModelAnimations(fileName, animCount) return C.LoadModelAnimations(fileName, animCount) end ---Update model animation pose (vertex buffers and bone matrices) ----@param model raylib.Model ----@param anim raylib.ModelAnimation +---@param model Model +---@param anim ModelAnimation ---@param frame number ----@return nil -function M.UpdateModelAnimation(model, anim, frame) +function UpdateModelAnimation(model, anim, frame) C.UpdateModelAnimation(model, anim, frame) end ---Update model animation pose, blending two animations ----@param model raylib.Model ----@param animA raylib.ModelAnimation +---@param model Model +---@param animA ModelAnimation ---@param frameA number ----@param animB raylib.ModelAnimation +---@param animB ModelAnimation ---@param frameB number ---@param blend number ----@return nil -function M.UpdateModelAnimationEx(model, animA, frameA, animB, frameB, blend) +function UpdateModelAnimationEx(model, animA, frameA, animB, frameB, blend) C.UpdateModelAnimationEx(model, animA, frameA, animB, frameB, blend) end ---Unload animation array data ---@param animations ffi.cdata* ---@param animCount integer ----@return nil -function M.UnloadModelAnimations(animations, animCount) +function UnloadModelAnimations(animations, animCount) C.UnloadModelAnimations(animations, animCount) end ---Check model animation skeleton match ----@param model raylib.Model ----@param anim raylib.ModelAnimation +---@param model Model +---@param anim ModelAnimation ---@return boolean -function M.IsModelAnimationValid(model, anim) +function IsModelAnimationValid(model, anim) return C.IsModelAnimationValid(model, anim) end ---Check collision between two spheres ----@param center1 raylib.Vector3 +---@param center1 Vector3 ---@param radius1 number ----@param center2 raylib.Vector3 +---@param center2 Vector3 ---@param radius2 number ---@return boolean -function M.CheckCollisionSpheres(center1, radius1, center2, radius2) +function CheckCollisionSpheres(center1, radius1, center2, radius2) return C.CheckCollisionSpheres(center1, radius1, center2, radius2) end ---Check collision between two bounding boxes ----@param box1 raylib.BoundingBox ----@param box2 raylib.BoundingBox +---@param box1 BoundingBox +---@param box2 BoundingBox ---@return boolean -function M.CheckCollisionBoxes(box1, box2) +function CheckCollisionBoxes(box1, box2) return C.CheckCollisionBoxes(box1, box2) end ---Check collision between box and sphere ----@param box raylib.BoundingBox ----@param center raylib.Vector3 +---@param box BoundingBox +---@param center Vector3 ---@param radius number ---@return boolean -function M.CheckCollisionBoxSphere(box, center, radius) +function CheckCollisionBoxSphere(box, center, radius) return C.CheckCollisionBoxSphere(box, center, radius) end ---Get collision info between ray and sphere ----@param ray raylib.Ray ----@param center raylib.Vector3 +---@param ray Ray +---@param center Vector3 ---@param radius number ----@return raylib.RayCollision -function M.GetRayCollisionSphere(ray, center, radius) +---@return RayCollision +function GetRayCollisionSphere(ray, center, radius) return C.GetRayCollisionSphere(ray, center, radius) end ---Get collision info between ray and box ----@param ray raylib.Ray ----@param box raylib.BoundingBox ----@return raylib.RayCollision -function M.GetRayCollisionBox(ray, box) +---@param ray Ray +---@param box BoundingBox +---@return RayCollision +function GetRayCollisionBox(ray, box) return C.GetRayCollisionBox(ray, box) end ---Get collision info between ray and mesh ----@param ray raylib.Ray ----@param mesh raylib.Mesh ----@param transform raylib.Matrix ----@return raylib.RayCollision -function M.GetRayCollisionMesh(ray, mesh, transform) +---@param ray Ray +---@param mesh Mesh +---@param transform Matrix +---@return RayCollision +function GetRayCollisionMesh(ray, mesh, transform) return C.GetRayCollisionMesh(ray, mesh, transform) end ---Get collision info between ray and triangle ----@param ray raylib.Ray ----@param p1 raylib.Vector3 ----@param p2 raylib.Vector3 ----@param p3 raylib.Vector3 ----@return raylib.RayCollision -function M.GetRayCollisionTriangle(ray, p1, p2, p3) +---@param ray Ray +---@param p1 Vector3 +---@param p2 Vector3 +---@param p3 Vector3 +---@return RayCollision +function GetRayCollisionTriangle(ray, p1, p2, p3) return C.GetRayCollisionTriangle(ray, p1, p2, p3) end ---Get collision info between ray and quad ----@param ray raylib.Ray ----@param p1 raylib.Vector3 ----@param p2 raylib.Vector3 ----@param p3 raylib.Vector3 ----@param p4 raylib.Vector3 ----@return raylib.RayCollision -function M.GetRayCollisionQuad(ray, p1, p2, p3, p4) +---@param ray Ray +---@param p1 Vector3 +---@param p2 Vector3 +---@param p3 Vector3 +---@param p4 Vector3 +---@return RayCollision +function GetRayCollisionQuad(ray, p1, p2, p3, p4) return C.GetRayCollisionQuad(ray, p1, p2, p3, p4) end ---Initialize audio device and context ----@return nil -function M.InitAudioDevice() +function InitAudioDevice() C.InitAudioDevice() end ---Close the audio device and context ----@return nil -function M.CloseAudioDevice() +function CloseAudioDevice() C.CloseAudioDevice() end ---Check if audio device has been initialized successfully ---@return boolean -function M.IsAudioDeviceReady() +function IsAudioDeviceReady() return C.IsAudioDeviceReady() end ---Set master volume (listener) ---@param volume number ----@return nil -function M.SetMasterVolume(volume) +function SetMasterVolume(volume) C.SetMasterVolume(volume) end ---Get master volume (listener) ---@return number -function M.GetMasterVolume() +function GetMasterVolume() return C.GetMasterVolume() end ---Load wave data from file ---@param fileName string ----@return raylib.Wave -function M.LoadWave(fileName) +---@return Wave +function LoadWave(fileName) return C.LoadWave(fileName) end ---Load wave from memory buffer, fileType refers to extension: i.e. '.wav' ---@param fileType string ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ----@return raylib.Wave -function M.LoadWaveFromMemory(fileType, fileData, dataSize) +---@return Wave +function LoadWaveFromMemory(fileType, fileData, dataSize) local _a2 if type(fileData) == "string" then _a2 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a2 = to_array("unsigned char", fileData) @@ -9603,46 +8398,45 @@ function M.LoadWaveFromMemory(fileType, fileData, dataSize) end ---Check if wave data is valid (data loaded and parameters) ----@param wave raylib.Wave +---@param wave Wave ---@return boolean -function M.IsWaveValid(wave) +function IsWaveValid(wave) return C.IsWaveValid(wave) end ---Load sound from file ---@param fileName string ----@return raylib.Sound -function M.LoadSound(fileName) +---@return Sound +function LoadSound(fileName) return C.LoadSound(fileName) end ---Load sound from wave data ----@param wave raylib.Wave ----@return raylib.Sound -function M.LoadSoundFromWave(wave) +---@param wave Wave +---@return Sound +function LoadSoundFromWave(wave) return C.LoadSoundFromWave(wave) end ---Load sound alias, new sound that shares the same sample data as the source sound, does not own the sound data ----@param source raylib.Sound ----@return raylib.Sound -function M.LoadSoundAlias(source) +---@param source Sound +---@return Sound +function LoadSoundAlias(source) return C.LoadSoundAlias(source) end ---Check if sound is valid (data loaded and buffers initialized) ----@param sound raylib.Sound +---@param sound Sound ---@return boolean -function M.IsSoundValid(sound) +function IsSoundValid(sound) return C.IsSoundValid(sound) end ---Update sound buffer with new data (default data format: 32 bit float, stereo) ----@param sound raylib.Sound ----@param data ffi.cdata*|string +---@param sound Sound +---@param data string|ffi.cdata* ---@param frameCount integer ----@return nil -function M.UpdateSound(sound, data, frameCount) +function UpdateSound(sound, data, frameCount) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -9650,158 +8444,141 @@ function M.UpdateSound(sound, data, frameCount) end ---Unload wave data ----@param wave raylib.Wave ----@return nil -function M.UnloadWave(wave) +---@param wave Wave +function UnloadWave(wave) C.UnloadWave(wave) end ---Unload sound ----@param sound raylib.Sound ----@return nil -function M.UnloadSound(sound) +---@param sound Sound +function UnloadSound(sound) C.UnloadSound(sound) end ---Unload sound alias (does not deallocate sample data) ----@param alias raylib.Sound ----@return nil -function M.UnloadSoundAlias(alias) +---@param alias Sound +function UnloadSoundAlias(alias) C.UnloadSoundAlias(alias) end ---Export wave data to file, returns true on success ----@param wave raylib.Wave +---@param wave Wave ---@param fileName string ---@return boolean -function M.ExportWave(wave, fileName) +function ExportWave(wave, fileName) return C.ExportWave(wave, fileName) end ---Export wave sample data to code (.h), returns true on success ----@param wave raylib.Wave +---@param wave Wave ---@param fileName string ---@return boolean -function M.ExportWaveAsCode(wave, fileName) +function ExportWaveAsCode(wave, fileName) return C.ExportWaveAsCode(wave, fileName) end ---Play a sound ----@param sound raylib.Sound ----@return nil -function M.PlaySound(sound) +---@param sound Sound +function PlaySound(sound) C.PlaySound(sound) end ---Stop playing a sound ----@param sound raylib.Sound ----@return nil -function M.StopSound(sound) +---@param sound Sound +function StopSound(sound) C.StopSound(sound) end ---Pause a sound ----@param sound raylib.Sound ----@return nil -function M.PauseSound(sound) +---@param sound Sound +function PauseSound(sound) C.PauseSound(sound) end ---Resume a paused sound ----@param sound raylib.Sound ----@return nil -function M.ResumeSound(sound) +---@param sound Sound +function ResumeSound(sound) C.ResumeSound(sound) end ---Check if sound is currently playing ----@param sound raylib.Sound +---@param sound Sound ---@return boolean -function M.IsSoundPlaying(sound) +function IsSoundPlaying(sound) return C.IsSoundPlaying(sound) end ---Set volume for a sound (1.0 is max level) ----@param sound raylib.Sound +---@param sound Sound ---@param volume number ----@return nil -function M.SetSoundVolume(sound, volume) +function SetSoundVolume(sound, volume) C.SetSoundVolume(sound, volume) end ---Set pitch for a sound (1.0 is base level) ----@param sound raylib.Sound +---@param sound Sound ---@param pitch number ----@return nil -function M.SetSoundPitch(sound, pitch) +function SetSoundPitch(sound, pitch) C.SetSoundPitch(sound, pitch) end ---Set pan for a sound (-1.0 left, 0.0 center, 1.0 right) ----@param sound raylib.Sound +---@param sound Sound ---@param pan number ----@return nil -function M.SetSoundPan(sound, pan) +function SetSoundPan(sound, pan) C.SetSoundPan(sound, pan) end ---Copy a wave to a new wave ----@param wave raylib.Wave ----@return raylib.Wave -function M.WaveCopy(wave) +---@param wave Wave +---@return Wave +function WaveCopy(wave) return C.WaveCopy(wave) end ---Crop a wave to defined frames range ----@param wave raylib.Wave +---@param wave ffi.cdata* ---@param initFrame integer ---@param finalFrame integer ----@return raylib.Wave -function M.WaveCrop(wave, initFrame, finalFrame) - local _o1 = ffi.new("Wave[1]", wave) - C.WaveCrop(_o1, initFrame, finalFrame) - return _o1[0] +function WaveCrop(wave, initFrame, finalFrame) + C.WaveCrop(wave, initFrame, finalFrame) end ---Convert wave data to desired format ----@param wave raylib.Wave +---@param wave ffi.cdata* ---@param sampleRate integer ---@param sampleSize integer ---@param channels integer ----@return raylib.Wave -function M.WaveFormat(wave, sampleRate, sampleSize, channels) - local _o1 = ffi.new("Wave[1]", wave) - C.WaveFormat(_o1, sampleRate, sampleSize, channels) - return _o1[0] +function WaveFormat(wave, sampleRate, sampleSize, channels) + C.WaveFormat(wave, sampleRate, sampleSize, channels) end ---Load samples data from wave as a 32bit float data array ----@param wave raylib.Wave +---@param wave Wave ---@return ffi.cdata* -function M.LoadWaveSamples(wave) +function LoadWaveSamples(wave) return C.LoadWaveSamples(wave) end ---Unload samples data loaded with LoadWaveSamples() ---@param samples ffi.cdata* ----@return nil -function M.UnloadWaveSamples(samples) +function UnloadWaveSamples(samples) C.UnloadWaveSamples(samples) end ---Load music stream from file ---@param fileName string ----@return raylib.Music -function M.LoadMusicStream(fileName) +---@return Music +function LoadMusicStream(fileName) return C.LoadMusicStream(fileName) end ---Load music stream from data ---@param fileType string ----@param data string|integer[] +---@param data string|integer[]|ffi.cdata* ---@param dataSize integer ----@return raylib.Music -function M.LoadMusicStreamFromMemory(fileType, data, dataSize) +---@return Music +function LoadMusicStreamFromMemory(fileType, data, dataSize) local _a2 if type(data) == "string" then _a2 = ffi.cast("const unsigned char *", data) elseif type(data) == "table" then _a2 = to_array("unsigned char", data) @@ -9810,104 +8587,94 @@ function M.LoadMusicStreamFromMemory(fileType, data, dataSize) end ---Check if music stream is valid (context and buffers initialized) ----@param music raylib.Music +---@param music Music ---@return boolean -function M.IsMusicValid(music) +function IsMusicValid(music) return C.IsMusicValid(music) end ---Unload music stream ----@param music raylib.Music ----@return nil -function M.UnloadMusicStream(music) +---@param music Music +function UnloadMusicStream(music) C.UnloadMusicStream(music) end ---Start music playing ----@param music raylib.Music ----@return nil -function M.PlayMusicStream(music) +---@param music Music +function PlayMusicStream(music) C.PlayMusicStream(music) end ---Check if music is playing ----@param music raylib.Music +---@param music Music ---@return boolean -function M.IsMusicStreamPlaying(music) +function IsMusicStreamPlaying(music) return C.IsMusicStreamPlaying(music) end ---Update buffers for music streaming ----@param music raylib.Music ----@return nil -function M.UpdateMusicStream(music) +---@param music Music +function UpdateMusicStream(music) C.UpdateMusicStream(music) end ---Stop music playing ----@param music raylib.Music ----@return nil -function M.StopMusicStream(music) +---@param music Music +function StopMusicStream(music) C.StopMusicStream(music) end ---Pause music playing ----@param music raylib.Music ----@return nil -function M.PauseMusicStream(music) +---@param music Music +function PauseMusicStream(music) C.PauseMusicStream(music) end ---Resume playing paused music ----@param music raylib.Music ----@return nil -function M.ResumeMusicStream(music) +---@param music Music +function ResumeMusicStream(music) C.ResumeMusicStream(music) end ---Seek music to a position (in seconds) ----@param music raylib.Music +---@param music Music ---@param position number ----@return nil -function M.SeekMusicStream(music, position) +function SeekMusicStream(music, position) C.SeekMusicStream(music, position) end ---Set volume for music (1.0 is max level) ----@param music raylib.Music +---@param music Music ---@param volume number ----@return nil -function M.SetMusicVolume(music, volume) +function SetMusicVolume(music, volume) C.SetMusicVolume(music, volume) end ---Set pitch for music (1.0 is base level) ----@param music raylib.Music +---@param music Music ---@param pitch number ----@return nil -function M.SetMusicPitch(music, pitch) +function SetMusicPitch(music, pitch) C.SetMusicPitch(music, pitch) end ---Set pan for music (-1.0 left, 0.0 center, 1.0 right) ----@param music raylib.Music +---@param music Music ---@param pan number ----@return nil -function M.SetMusicPan(music, pan) +function SetMusicPan(music, pan) C.SetMusicPan(music, pan) end ---Get music time length (in seconds) ----@param music raylib.Music +---@param music Music ---@return number -function M.GetMusicTimeLength(music) +function GetMusicTimeLength(music) return C.GetMusicTimeLength(music) end ---Get current music time played (in seconds) ----@param music raylib.Music +---@param music Music ---@return number -function M.GetMusicTimePlayed(music) +function GetMusicTimePlayed(music) return C.GetMusicTimePlayed(music) end @@ -9915,31 +8682,29 @@ end ---@param sampleRate integer ---@param sampleSize integer ---@param channels integer ----@return raylib.AudioStream -function M.LoadAudioStream(sampleRate, sampleSize, channels) +---@return AudioStream +function LoadAudioStream(sampleRate, sampleSize, channels) return C.LoadAudioStream(sampleRate, sampleSize, channels) end ---Check if an audio stream is valid (buffers initialized) ----@param stream raylib.AudioStream +---@param stream AudioStream ---@return boolean -function M.IsAudioStreamValid(stream) +function IsAudioStreamValid(stream) return C.IsAudioStreamValid(stream) end ---Unload audio stream and free memory ----@param stream raylib.AudioStream ----@return nil -function M.UnloadAudioStream(stream) +---@param stream AudioStream +function UnloadAudioStream(stream) C.UnloadAudioStream(stream) end ---Update audio stream buffers with data ----@param stream raylib.AudioStream ----@param data ffi.cdata*|string +---@param stream AudioStream +---@param data string|ffi.cdata* ---@param frameCount integer ----@return nil -function M.UpdateAudioStream(stream, data, frameCount) +function UpdateAudioStream(stream, data, frameCount) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -9947,143 +8712,121 @@ function M.UpdateAudioStream(stream, data, frameCount) end ---Check if any audio stream buffers requires refill ----@param stream raylib.AudioStream +---@param stream AudioStream ---@return boolean -function M.IsAudioStreamProcessed(stream) +function IsAudioStreamProcessed(stream) return C.IsAudioStreamProcessed(stream) end ---Play audio stream ----@param stream raylib.AudioStream ----@return nil -function M.PlayAudioStream(stream) +---@param stream AudioStream +function PlayAudioStream(stream) C.PlayAudioStream(stream) end ---Pause audio stream ----@param stream raylib.AudioStream ----@return nil -function M.PauseAudioStream(stream) +---@param stream AudioStream +function PauseAudioStream(stream) C.PauseAudioStream(stream) end ---Resume audio stream ----@param stream raylib.AudioStream ----@return nil -function M.ResumeAudioStream(stream) +---@param stream AudioStream +function ResumeAudioStream(stream) C.ResumeAudioStream(stream) end ---Check if audio stream is playing ----@param stream raylib.AudioStream +---@param stream AudioStream ---@return boolean -function M.IsAudioStreamPlaying(stream) +function IsAudioStreamPlaying(stream) return C.IsAudioStreamPlaying(stream) end ---Stop audio stream ----@param stream raylib.AudioStream ----@return nil -function M.StopAudioStream(stream) +---@param stream AudioStream +function StopAudioStream(stream) C.StopAudioStream(stream) end ---Set volume for audio stream (1.0 is max level) ----@param stream raylib.AudioStream +---@param stream AudioStream ---@param volume number ----@return nil -function M.SetAudioStreamVolume(stream, volume) +function SetAudioStreamVolume(stream, volume) C.SetAudioStreamVolume(stream, volume) end ---Set pitch for audio stream (1.0 is base level) ----@param stream raylib.AudioStream +---@param stream AudioStream ---@param pitch number ----@return nil -function M.SetAudioStreamPitch(stream, pitch) +function SetAudioStreamPitch(stream, pitch) C.SetAudioStreamPitch(stream, pitch) end ---Set pan for audio stream (-1.0 left, 0.0 center, 1.0 right) ----@param stream raylib.AudioStream +---@param stream AudioStream ---@param pan number ----@return nil -function M.SetAudioStreamPan(stream, pan) +function SetAudioStreamPan(stream, pan) C.SetAudioStreamPan(stream, pan) end ---Default size for new audio streams ---@param size integer ----@return nil -function M.SetAudioStreamBufferSizeDefault(size) +function SetAudioStreamBufferSizeDefault(size) C.SetAudioStreamBufferSizeDefault(size) end ---Audio thread callback to request new data ----@param stream raylib.AudioStream ----@param callback raylib.AudioCallback ----@return nil -function M.SetAudioStreamCallback(stream, callback) - local _cb2 = pin("AudioCallback", callback) - C.SetAudioStreamCallback(stream, _cb2) +---@param stream AudioStream +---@param callback ffi.cdata* +function SetAudioStreamCallback(stream, callback) + C.SetAudioStreamCallback(stream, callback) end ---Attach audio stream processor to stream, receives frames x 2 samples as 'float' (stereo) ----@param stream raylib.AudioStream ----@param processor raylib.AudioCallback ----@return nil -function M.AttachAudioStreamProcessor(stream, processor) - local _cb2 = pin("AudioCallback", processor) - C.AttachAudioStreamProcessor(stream, _cb2) +---@param stream AudioStream +---@param processor ffi.cdata* +function AttachAudioStreamProcessor(stream, processor) + C.AttachAudioStreamProcessor(stream, processor) end ---Detach audio stream processor from stream ----@param stream raylib.AudioStream ----@param processor raylib.AudioCallback ----@return nil -function M.DetachAudioStreamProcessor(stream, processor) - local _cb2 = pin("AudioCallback", processor) - C.DetachAudioStreamProcessor(stream, _cb2) +---@param stream AudioStream +---@param processor ffi.cdata* +function DetachAudioStreamProcessor(stream, processor) + C.DetachAudioStreamProcessor(stream, processor) end ---Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo) ----@param processor raylib.AudioCallback ----@return nil -function M.AttachAudioMixedProcessor(processor) - local _cb1 = pin("AudioCallback", processor) - C.AttachAudioMixedProcessor(_cb1) +---@param processor ffi.cdata* +function AttachAudioMixedProcessor(processor) + C.AttachAudioMixedProcessor(processor) end ---Detach audio stream processor from the entire audio pipeline ----@param processor raylib.AudioCallback ----@return nil -function M.DetachAudioMixedProcessor(processor) - local _cb1 = pin("AudioCallback", processor) - C.DetachAudioMixedProcessor(_cb1) +---@param processor ffi.cdata* +function DetachAudioMixedProcessor(processor) + C.DetachAudioMixedProcessor(processor) end ---Choose the current matrix to be transformed ---@param mode integer ----@return nil -function M.rlMatrixMode(mode) +function rlMatrixMode(mode) C.rlMatrixMode(mode) end ---Push the current matrix to stack ----@return nil -function M.rlPushMatrix() +function rlPushMatrix() C.rlPushMatrix() end ---Pop latest inserted matrix from stack ----@return nil -function M.rlPopMatrix() +function rlPopMatrix() C.rlPopMatrix() end ---Reset current matrix to identity matrix ----@return nil -function M.rlLoadIdentity() +function rlLoadIdentity() C.rlLoadIdentity() end @@ -10091,8 +8834,7 @@ end ---@param x number ---@param y number ---@param z number ----@return nil -function M.rlTranslatef(x, y, z) +function rlTranslatef(x, y, z) C.rlTranslatef(x, y, z) end @@ -10101,8 +8843,7 @@ end ---@param x number ---@param y number ---@param z number ----@return nil -function M.rlRotatef(angle, x, y, z) +function rlRotatef(angle, x, y, z) C.rlRotatef(angle, x, y, z) end @@ -10110,40 +8851,38 @@ end ---@param x number ---@param y number ---@param z number ----@return nil -function M.rlScalef(x, y, z) +function rlScalef(x, y, z) C.rlScalef(x, y, z) end ---Multiply the current matrix by another matrix ----@param matf number[] ----@return nil -function M.rlMultMatrixf(matf) +---@param matf number[]|ffi.cdata* +function rlMultMatrixf(matf) local _a1 if type(matf) == "table" then _a1 = to_array("float", matf) else _a1 = matf end C.rlMultMatrixf(_a1) end +--- ---@param left number ---@param right number ---@param bottom number ---@param top number ---@param znear number ---@param zfar number ----@return nil -function M.rlFrustum(left, right, bottom, top, znear, zfar) +function rlFrustum(left, right, bottom, top, znear, zfar) C.rlFrustum(left, right, bottom, top, znear, zfar) end +--- ---@param left number ---@param right number ---@param bottom number ---@param top number ---@param znear number ---@param zfar number ----@return nil -function M.rlOrtho(left, right, bottom, top, znear, zfar) +function rlOrtho(left, right, bottom, top, znear, zfar) C.rlOrtho(left, right, bottom, top, znear, zfar) end @@ -10152,57 +8891,51 @@ end ---@param y integer ---@param width integer ---@param height integer ----@return nil -function M.rlViewport(x, y, width, height) +function rlViewport(x, y, width, height) C.rlViewport(x, y, width, height) end ---Set clip planes distances ---@param nearPlane number ---@param farPlane number ----@return nil -function M.rlSetClipPlanes(nearPlane, farPlane) +function rlSetClipPlanes(nearPlane, farPlane) C.rlSetClipPlanes(nearPlane, farPlane) end ---Get cull plane distance near ---@return number -function M.rlGetCullDistanceNear() +function rlGetCullDistanceNear() return C.rlGetCullDistanceNear() end ---Get cull plane distance far ---@return number -function M.rlGetCullDistanceFar() +function rlGetCullDistanceFar() return C.rlGetCullDistanceFar() end ---Initialize drawing mode (how to organize vertex) ---@param mode integer ----@return nil -function M.rlBegin(mode) +function rlBegin(mode) C.rlBegin(mode) end ---Finish vertex providing ----@return nil -function M.rlEnd() +function rlEnd() C.rlEnd() end ---Define one vertex (position) - 2 int ---@param x integer ---@param y integer ----@return nil -function M.rlVertex2i(x, y) +function rlVertex2i(x, y) C.rlVertex2i(x, y) end ---Define one vertex (position) - 2 float ---@param x number ---@param y number ----@return nil -function M.rlVertex2f(x, y) +function rlVertex2f(x, y) C.rlVertex2f(x, y) end @@ -10210,16 +8943,14 @@ end ---@param x number ---@param y number ---@param z number ----@return nil -function M.rlVertex3f(x, y, z) +function rlVertex3f(x, y, z) C.rlVertex3f(x, y, z) end ---Define one vertex (texture coordinate) - 2 float ---@param x number ---@param y number ----@return nil -function M.rlTexCoord2f(x, y) +function rlTexCoord2f(x, y) C.rlTexCoord2f(x, y) end @@ -10227,8 +8958,7 @@ end ---@param x number ---@param y number ---@param z number ----@return nil -function M.rlNormal3f(x, y, z) +function rlNormal3f(x, y, z) C.rlNormal3f(x, y, z) end @@ -10237,8 +8967,7 @@ end ---@param g integer ---@param b integer ---@param a integer ----@return nil -function M.rlColor4ub(r, g, b, a) +function rlColor4ub(r, g, b, a) C.rlColor4ub(r, g, b, a) end @@ -10246,8 +8975,7 @@ end ---@param x number ---@param y number ---@param z number ----@return nil -function M.rlColor3f(x, y, z) +function rlColor3f(x, y, z) C.rlColor3f(x, y, z) end @@ -10256,112 +8984,94 @@ end ---@param y number ---@param z number ---@param w number ----@return nil -function M.rlColor4f(x, y, z, w) +function rlColor4f(x, y, z, w) C.rlColor4f(x, y, z, w) end ---Enable vertex array (VAO, if supported) ---@param vaoId integer ---@return boolean -function M.rlEnableVertexArray(vaoId) +function rlEnableVertexArray(vaoId) return C.rlEnableVertexArray(vaoId) end ---Disable vertex array (VAO, if supported) ----@return nil -function M.rlDisableVertexArray() +function rlDisableVertexArray() C.rlDisableVertexArray() end ---Enable vertex buffer (VBO) ---@param id integer ----@return nil -function M.rlEnableVertexBuffer(id) +function rlEnableVertexBuffer(id) C.rlEnableVertexBuffer(id) end ---Disable vertex buffer (VBO) ----@return nil -function M.rlDisableVertexBuffer() +function rlDisableVertexBuffer() C.rlDisableVertexBuffer() end ---Enable vertex buffer element (VBO element) ---@param id integer ----@return nil -function M.rlEnableVertexBufferElement(id) +function rlEnableVertexBufferElement(id) C.rlEnableVertexBufferElement(id) end ---Disable vertex buffer element (VBO element) ----@return nil -function M.rlDisableVertexBufferElement() +function rlDisableVertexBufferElement() C.rlDisableVertexBufferElement() end ---Enable vertex attribute index ---@param index integer ----@return nil -function M.rlEnableVertexAttribute(index) +function rlEnableVertexAttribute(index) C.rlEnableVertexAttribute(index) end ---Disable vertex attribute index ---@param index integer ----@return nil -function M.rlDisableVertexAttribute(index) +function rlDisableVertexAttribute(index) C.rlDisableVertexAttribute(index) end ---Enable attribute state pointer ---@param vertexAttribType integer ----@param buffer ffi.cdata*|string ----@return nil -function M.rlEnableStatePointer(vertexAttribType, buffer) - local _a2 - if type(buffer) == "string" then _a2 = ffi.cast("const void *", buffer) - else _a2 = buffer end - C.rlEnableStatePointer(vertexAttribType, _a2) +---@param buffer ffi.cdata* +function rlEnableStatePointer(vertexAttribType, buffer) + C.rlEnableStatePointer(vertexAttribType, buffer) end ---Disable attribute state pointer ---@param vertexAttribType integer ----@return nil -function M.rlDisableStatePointer(vertexAttribType) +function rlDisableStatePointer(vertexAttribType) C.rlDisableStatePointer(vertexAttribType) end ---Select and active a texture slot ---@param slot integer ----@return nil -function M.rlActiveTextureSlot(slot) +function rlActiveTextureSlot(slot) C.rlActiveTextureSlot(slot) end ---Enable texture ---@param id integer ----@return nil -function M.rlEnableTexture(id) +function rlEnableTexture(id) C.rlEnableTexture(id) end ---Disable texture ----@return nil -function M.rlDisableTexture() +function rlDisableTexture() C.rlDisableTexture() end ---Enable texture cubemap ---@param id integer ----@return nil -function M.rlEnableTextureCubemap(id) +function rlEnableTextureCubemap(id) C.rlEnableTextureCubemap(id) end ---Disable texture cubemap ----@return nil -function M.rlDisableTextureCubemap() +function rlDisableTextureCubemap() C.rlDisableTextureCubemap() end @@ -10369,8 +9079,7 @@ end ---@param id integer ---@param param integer ---@param value integer ----@return nil -function M.rlTextureParameters(id, param, value) +function rlTextureParameters(id, param, value) C.rlTextureParameters(id, param, value) end @@ -10378,47 +9087,41 @@ end ---@param id integer ---@param param integer ---@param value integer ----@return nil -function M.rlCubemapParameters(id, param, value) +function rlCubemapParameters(id, param, value) C.rlCubemapParameters(id, param, value) end ---Enable shader program ---@param id integer ----@return nil -function M.rlEnableShader(id) +function rlEnableShader(id) C.rlEnableShader(id) end ---Disable shader program ----@return nil -function M.rlDisableShader() +function rlDisableShader() C.rlDisableShader() end ---Enable render texture (fbo) ---@param id integer ----@return nil -function M.rlEnableFramebuffer(id) +function rlEnableFramebuffer(id) C.rlEnableFramebuffer(id) end ---Disable render texture (fbo), return to default framebuffer ----@return nil -function M.rlDisableFramebuffer() +function rlDisableFramebuffer() C.rlDisableFramebuffer() end ---Get the currently active render texture (fbo), 0 for default framebuffer ---@return integer -function M.rlGetActiveFramebuffer() +function rlGetActiveFramebuffer() return C.rlGetActiveFramebuffer() end ---Activate multiple draw color buffers ---@param count integer ----@return nil -function M.rlActiveDrawBuffers(count) +function rlActiveDrawBuffers(count) C.rlActiveDrawBuffers(count) end @@ -10432,64 +9135,54 @@ end ---@param dstWidth integer ---@param dstHeight integer ---@param bufferMask integer ----@return nil -function M.rlBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask) +function rlBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask) C.rlBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask) end ---Bind framebuffer (FBO) ---@param target integer ---@param framebuffer integer ----@return nil -function M.rlBindFramebuffer(target, framebuffer) +function rlBindFramebuffer(target, framebuffer) C.rlBindFramebuffer(target, framebuffer) end ---Enable color blending ----@return nil -function M.rlEnableColorBlend() +function rlEnableColorBlend() C.rlEnableColorBlend() end ---Disable color blending ----@return nil -function M.rlDisableColorBlend() +function rlDisableColorBlend() C.rlDisableColorBlend() end ---Enable depth test ----@return nil -function M.rlEnableDepthTest() +function rlEnableDepthTest() C.rlEnableDepthTest() end ---Disable depth test ----@return nil -function M.rlDisableDepthTest() +function rlDisableDepthTest() C.rlDisableDepthTest() end ---Enable depth write ----@return nil -function M.rlEnableDepthMask() +function rlEnableDepthMask() C.rlEnableDepthMask() end ---Disable depth write ----@return nil -function M.rlDisableDepthMask() +function rlDisableDepthMask() C.rlDisableDepthMask() end ---Enable backface culling ----@return nil -function M.rlEnableBackfaceCulling() +function rlEnableBackfaceCulling() C.rlEnableBackfaceCulling() end ---Disable backface culling ----@return nil -function M.rlDisableBackfaceCulling() +function rlDisableBackfaceCulling() C.rlDisableBackfaceCulling() end @@ -10498,27 +9191,23 @@ end ---@param g boolean ---@param b boolean ---@param a boolean ----@return nil -function M.rlColorMask(r, g, b, a) +function rlColorMask(r, g, b, a) C.rlColorMask(r, g, b, a) end ---Set face culling mode ---@param mode integer ----@return nil -function M.rlSetCullFace(mode) +function rlSetCullFace(mode) C.rlSetCullFace(mode) end ---Enable scissor test ----@return nil -function M.rlEnableScissorTest() +function rlEnableScissorTest() C.rlEnableScissorTest() end ---Disable scissor test ----@return nil -function M.rlDisableScissorTest() +function rlDisableScissorTest() C.rlDisableScissorTest() end @@ -10527,88 +9216,77 @@ end ---@param y integer ---@param width integer ---@param height integer ----@return nil -function M.rlScissor(x, y, width, height) +function rlScissor(x, y, width, height) C.rlScissor(x, y, width, height) end ---Enable point mode ----@return nil -function M.rlEnablePointMode() +function rlEnablePointMode() C.rlEnablePointMode() end ---Disable point mode ----@return nil -function M.rlDisablePointMode() +function rlDisablePointMode() C.rlDisablePointMode() end ---Set the point drawing size ---@param size number ----@return nil -function M.rlSetPointSize(size) +function rlSetPointSize(size) C.rlSetPointSize(size) end ---Get the point drawing size ---@return number -function M.rlGetPointSize() +function rlGetPointSize() return C.rlGetPointSize() end ---Enable wire mode ----@return nil -function M.rlEnableWireMode() +function rlEnableWireMode() C.rlEnableWireMode() end ---Disable wire mode ----@return nil -function M.rlDisableWireMode() +function rlDisableWireMode() C.rlDisableWireMode() end ---Set the line drawing width ---@param width number ----@return nil -function M.rlSetLineWidth(width) +function rlSetLineWidth(width) C.rlSetLineWidth(width) end ---Get the line drawing width ---@return number -function M.rlGetLineWidth() +function rlGetLineWidth() return C.rlGetLineWidth() end ---Enable line aliasing ----@return nil -function M.rlEnableSmoothLines() +function rlEnableSmoothLines() C.rlEnableSmoothLines() end ---Disable line aliasing ----@return nil -function M.rlDisableSmoothLines() +function rlDisableSmoothLines() C.rlDisableSmoothLines() end ---Enable stereo rendering ----@return nil -function M.rlEnableStereoRender() +function rlEnableStereoRender() C.rlEnableStereoRender() end ---Disable stereo rendering ----@return nil -function M.rlDisableStereoRender() +function rlDisableStereoRender() C.rlDisableStereoRender() end ---Check if stereo render is enabled ---@return boolean -function M.rlIsStereoRenderEnabled() +function rlIsStereoRenderEnabled() return C.rlIsStereoRenderEnabled() end @@ -10617,27 +9295,23 @@ end ---@param g integer ---@param b integer ---@param a integer ----@return nil -function M.rlClearColor(r, g, b, a) +function rlClearColor(r, g, b, a) C.rlClearColor(r, g, b, a) end ---Clear used screen buffers (color and depth) ----@return nil -function M.rlClearScreenBuffers() +function rlClearScreenBuffers() C.rlClearScreenBuffers() end ---Check and log OpenGL error codes ----@return nil -function M.rlCheckErrors() +function rlCheckErrors() C.rlCheckErrors() end ---Set blending mode ---@param mode integer ----@return nil -function M.rlSetBlendMode(mode) +function rlSetBlendMode(mode) C.rlSetBlendMode(mode) end @@ -10645,8 +9319,7 @@ end ---@param glSrcFactor integer ---@param glDstFactor integer ---@param glEquation integer ----@return nil -function M.rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation) +function rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation) C.rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation) end @@ -10657,153 +9330,139 @@ end ---@param glDstAlpha integer ---@param glEqRGB integer ---@param glEqAlpha integer ----@return nil -function M.rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha) +function rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha) C.rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha) end ---Initialize rlgl (buffers, shaders, textures, states) ---@param width integer ---@param height integer ----@return nil -function M.rlglInit(width, height) +function rlglInit(width, height) C.rlglInit(width, height) end ---De-initialize rlgl (buffers, shaders, textures) ----@return nil -function M.rlglClose() +function rlglClose() C.rlglClose() end ---Load OpenGL extensions (loader function required) ----@param loader ffi.cdata*|string ----@return nil -function M.rlLoadExtensions(loader) - local _a1 - if type(loader) == "string" then _a1 = ffi.cast("const void *", loader) - else _a1 = loader end - C.rlLoadExtensions(_a1) +---@param loader ffi.cdata* +function rlLoadExtensions(loader) + C.rlLoadExtensions(loader) end ---Get OpenGL procedure address ---@param procName string ---@return ffi.cdata* -function M.rlGetProcAddress(procName) +function rlGetProcAddress(procName) return C.rlGetProcAddress(procName) end ---Get current OpenGL version ---@return integer -function M.rlGetVersion() +function rlGetVersion() return C.rlGetVersion() end ---Set current framebuffer width ---@param width integer ----@return nil -function M.rlSetFramebufferWidth(width) +function rlSetFramebufferWidth(width) C.rlSetFramebufferWidth(width) end ---Get default framebuffer width ---@return integer -function M.rlGetFramebufferWidth() +function rlGetFramebufferWidth() return C.rlGetFramebufferWidth() end ---Set current framebuffer height ---@param height integer ----@return nil -function M.rlSetFramebufferHeight(height) +function rlSetFramebufferHeight(height) C.rlSetFramebufferHeight(height) end ---Get default framebuffer height ---@return integer -function M.rlGetFramebufferHeight() +function rlGetFramebufferHeight() return C.rlGetFramebufferHeight() end ---Get default texture id ---@return integer -function M.rlGetTextureIdDefault() +function rlGetTextureIdDefault() return C.rlGetTextureIdDefault() end ---Get default shader id ---@return integer -function M.rlGetShaderIdDefault() +function rlGetShaderIdDefault() return C.rlGetShaderIdDefault() end ---Get default shader locations ---@return ffi.cdata* -function M.rlGetShaderLocsDefault() +function rlGetShaderLocsDefault() return C.rlGetShaderLocsDefault() end ---Load a render batch system ---@param numBuffers integer ---@param bufferElements integer ----@return raylib.rlRenderBatch -function M.rlLoadRenderBatch(numBuffers, bufferElements) +---@return rlRenderBatch +function rlLoadRenderBatch(numBuffers, bufferElements) return C.rlLoadRenderBatch(numBuffers, bufferElements) end ---Unload render batch system ----@param batch raylib.rlRenderBatch ----@return nil -function M.rlUnloadRenderBatch(batch) +---@param batch rlRenderBatch +function rlUnloadRenderBatch(batch) C.rlUnloadRenderBatch(batch) end ---Draw render batch data (Update->Draw->Reset) ---@param batch ffi.cdata* ----@return nil -function M.rlDrawRenderBatch(batch) +function rlDrawRenderBatch(batch) C.rlDrawRenderBatch(batch) end ---Set the active render batch for rlgl (NULL for default internal) ---@param batch ffi.cdata* ----@return nil -function M.rlSetRenderBatchActive(batch) +function rlSetRenderBatchActive(batch) C.rlSetRenderBatchActive(batch) end ---Update and draw internal render batch ----@return nil -function M.rlDrawRenderBatchActive() +function rlDrawRenderBatchActive() C.rlDrawRenderBatchActive() end ---Check internal buffer overflow for a given number of vertex ---@param vCount integer ---@return boolean -function M.rlCheckRenderBatchLimit(vCount) +function rlCheckRenderBatchLimit(vCount) return C.rlCheckRenderBatchLimit(vCount) end ---Set current texture for render batch and check buffers limits ---@param id integer ----@return nil -function M.rlSetTexture(id) +function rlSetTexture(id) C.rlSetTexture(id) end ---Load vertex array (vao) if supported ---@return integer -function M.rlLoadVertexArray() +function rlLoadVertexArray() return C.rlLoadVertexArray() end ---Load a vertex buffer object ----@param buffer ffi.cdata*|string +---@param buffer string|ffi.cdata* ---@param size integer ---@param dynamic boolean ---@return integer -function M.rlLoadVertexBuffer(buffer, size, dynamic) +function rlLoadVertexBuffer(buffer, size, dynamic) local _a1 if type(buffer) == "string" then _a1 = ffi.cast("const void *", buffer) else _a1 = buffer end @@ -10811,11 +9470,11 @@ function M.rlLoadVertexBuffer(buffer, size, dynamic) end ---Load vertex buffer elements object ----@param buffer ffi.cdata*|string +---@param buffer string|ffi.cdata* ---@param size integer ---@param dynamic boolean ---@return integer -function M.rlLoadVertexBufferElement(buffer, size, dynamic) +function rlLoadVertexBufferElement(buffer, size, dynamic) local _a1 if type(buffer) == "string" then _a1 = ffi.cast("const void *", buffer) else _a1 = buffer end @@ -10824,11 +9483,10 @@ end ---Update vertex buffer object data on GPU buffer ---@param bufferId integer ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param dataSize integer ---@param offset integer ----@return nil -function M.rlUpdateVertexBuffer(bufferId, data, dataSize, offset) +function rlUpdateVertexBuffer(bufferId, data, dataSize, offset) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -10837,11 +9495,10 @@ end ---Update vertex buffer elements data on GPU buffer ---@param id integer ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param dataSize integer ---@param offset integer ----@return nil -function M.rlUpdateVertexBufferElements(id, data, dataSize, offset) +function rlUpdateVertexBufferElements(id, data, dataSize, offset) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -10850,15 +9507,13 @@ end ---Unload vertex array (vao) ---@param vaoId integer ----@return nil -function M.rlUnloadVertexArray(vaoId) +function rlUnloadVertexArray(vaoId) C.rlUnloadVertexArray(vaoId) end ---Unload vertex buffer object ---@param vboId integer ----@return nil -function M.rlUnloadVertexBuffer(vboId) +function rlUnloadVertexBuffer(vboId) C.rlUnloadVertexBuffer(vboId) end @@ -10869,26 +9524,23 @@ end ---@param normalized boolean ---@param stride integer ---@param offset integer ----@return nil -function M.rlSetVertexAttribute(index, compSize, type, normalized, stride, offset) +function rlSetVertexAttribute(index, compSize, type, normalized, stride, offset) C.rlSetVertexAttribute(index, compSize, type, normalized, stride, offset) end ---Set vertex attribute data divisor ---@param index integer ---@param divisor integer ----@return nil -function M.rlSetVertexAttributeDivisor(index, divisor) +function rlSetVertexAttributeDivisor(index, divisor) C.rlSetVertexAttributeDivisor(index, divisor) end ---Set vertex attribute default value, when attribute to provided ---@param locIndex integer ----@param value ffi.cdata*|string +---@param value string|ffi.cdata* ---@param attribType integer ---@param count integer ----@return nil -function M.rlSetVertexAttributeDefault(locIndex, value, attribType, count) +function rlSetVertexAttributeDefault(locIndex, value, attribType, count) local _a2 if type(value) == "string" then _a2 = ffi.cast("const void *", value) else _a2 = value end @@ -10898,17 +9550,15 @@ end ---Draw vertex array (currently active vao) ---@param offset integer ---@param count integer ----@return nil -function M.rlDrawVertexArray(offset, count) +function rlDrawVertexArray(offset, count) C.rlDrawVertexArray(offset, count) end ---Draw vertex array elements ---@param offset integer ---@param count integer ----@param buffer ffi.cdata*|string ----@return nil -function M.rlDrawVertexArrayElements(offset, count, buffer) +---@param buffer string|ffi.cdata* +function rlDrawVertexArrayElements(offset, count, buffer) local _a3 if type(buffer) == "string" then _a3 = ffi.cast("const void *", buffer) else _a3 = buffer end @@ -10919,18 +9569,16 @@ end ---@param offset integer ---@param count integer ---@param instances integer ----@return nil -function M.rlDrawVertexArrayInstanced(offset, count, instances) +function rlDrawVertexArrayInstanced(offset, count, instances) C.rlDrawVertexArrayInstanced(offset, count, instances) end ---Draw vertex array elements with instancing ---@param offset integer ---@param count integer ----@param buffer ffi.cdata*|string +---@param buffer string|ffi.cdata* ---@param instances integer ----@return nil -function M.rlDrawVertexArrayElementsInstanced(offset, count, buffer, instances) +function rlDrawVertexArrayElementsInstanced(offset, count, buffer, instances) local _a3 if type(buffer) == "string" then _a3 = ffi.cast("const void *", buffer) else _a3 = buffer end @@ -10938,13 +9586,13 @@ function M.rlDrawVertexArrayElementsInstanced(offset, count, buffer, instances) end ---Load texture data ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param width integer ---@param height integer ---@param format integer ---@param mipmapCount integer ---@return integer -function M.rlLoadTexture(data, width, height, format, mipmapCount) +function rlLoadTexture(data, width, height, format, mipmapCount) local _a1 if type(data) == "string" then _a1 = ffi.cast("const void *", data) else _a1 = data end @@ -10956,17 +9604,17 @@ end ---@param height integer ---@param useRenderBuffer boolean ---@return integer -function M.rlLoadTextureDepth(width, height, useRenderBuffer) +function rlLoadTextureDepth(width, height, useRenderBuffer) return C.rlLoadTextureDepth(width, height, useRenderBuffer) end ---Load texture cubemap data ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param size integer ---@param format integer ---@param mipmapCount integer ---@return integer -function M.rlLoadTextureCubemap(data, size, format, mipmapCount) +function rlLoadTextureCubemap(data, size, format, mipmapCount) local _a1 if type(data) == "string" then _a1 = ffi.cast("const void *", data) else _a1 = data end @@ -10980,9 +9628,8 @@ end ---@param width integer ---@param height integer ---@param format integer ----@param data ffi.cdata*|string ----@return nil -function M.rlUpdateTexture(id, offsetX, offsetY, width, height, format, data) +---@param data string|ffi.cdata* +function rlUpdateTexture(id, offsetX, offsetY, width, height, format, data) local _a7 if type(data) == "string" then _a7 = ffi.cast("const void *", data) else _a7 = data end @@ -10994,27 +9641,21 @@ end ---@param glInternalFormat ffi.cdata* ---@param glFormat ffi.cdata* ---@param glType ffi.cdata* ----@return nil -function M.rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType) +function rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType) C.rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType) end ---Get name string for pixel format ---@param format integer ----@return string|nil -function M.rlGetPixelFormatName(format) - local _p = C.rlGetPixelFormatName(format) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function rlGetPixelFormatName(format) + local _r = C.rlGetPixelFormatName(format) + return _r ~= nil and ffi.string(_r) or "" end ---Unload texture from GPU memory ---@param id integer ----@return nil -function M.rlUnloadTexture(id) +function rlUnloadTexture(id) C.rlUnloadTexture(id) end @@ -11024,8 +9665,7 @@ end ---@param height integer ---@param format integer ---@param mipmaps ffi.cdata* ----@return nil -function M.rlGenTextureMipmaps(id, width, height, format, mipmaps) +function rlGenTextureMipmaps(id, width, height, format, mipmaps) C.rlGenTextureMipmaps(id, width, height, format, mipmaps) end @@ -11035,7 +9675,7 @@ end ---@param height integer ---@param format integer ---@return ffi.cdata* -function M.rlReadTexturePixels(id, width, height, format) +function rlReadTexturePixels(id, width, height, format) return C.rlReadTexturePixels(id, width, height, format) end @@ -11043,13 +9683,13 @@ end ---@param width integer ---@param height integer ---@return ffi.cdata* -function M.rlReadScreenPixels(width, height) +function rlReadScreenPixels(width, height) return C.rlReadScreenPixels(width, height) end ---Load an empty framebuffer ---@return integer -function M.rlLoadFramebuffer() +function rlLoadFramebuffer() return C.rlLoadFramebuffer() end @@ -11059,22 +9699,20 @@ end ---@param attachType integer ---@param texType integer ---@param mipLevel integer ----@return nil -function M.rlFramebufferAttach(id, texId, attachType, texType, mipLevel) +function rlFramebufferAttach(id, texId, attachType, texType, mipLevel) C.rlFramebufferAttach(id, texId, attachType, texType, mipLevel) end ---Verify framebuffer is complete ---@param id integer ---@return boolean -function M.rlFramebufferComplete(id) +function rlFramebufferComplete(id) return C.rlFramebufferComplete(id) end ---Delete framebuffer from GPU ---@param id integer ----@return nil -function M.rlUnloadFramebuffer(id) +function rlUnloadFramebuffer(id) C.rlUnloadFramebuffer(id) end @@ -11084,20 +9722,15 @@ end ---@param width integer ---@param height integer ---@param format integer ----@param pixels ffi.cdata*|string ----@return nil -function M.rlCopyFramebuffer(x, y, width, height, format, pixels) - local _a6 - if type(pixels) == "string" then _a6 = ffi.cast("const void *", pixels) - else _a6 = pixels end - C.rlCopyFramebuffer(x, y, width, height, format, _a6) +---@param pixels ffi.cdata* +function rlCopyFramebuffer(x, y, width, height, format, pixels) + C.rlCopyFramebuffer(x, y, width, height, format, pixels) end ---Resize internal framebuffer ---@param width integer ---@param height integer ----@return nil -function M.rlResizeFramebuffer(width, height) +function rlResizeFramebuffer(width, height) C.rlResizeFramebuffer(width, height) end @@ -11105,7 +9738,7 @@ end ---@param code string ---@param type integer ---@return integer -function M.rlLoadShader(code, type) +function rlLoadShader(code, type) return C.rlLoadShader(code, type) end @@ -11113,7 +9746,7 @@ end ---@param vsCode string ---@param fsCode string ---@return integer -function M.rlLoadShaderProgram(vsCode, fsCode) +function rlLoadShaderProgram(vsCode, fsCode) return C.rlLoadShaderProgram(vsCode, fsCode) end @@ -11121,28 +9754,26 @@ end ---@param vsId integer ---@param fsId integer ---@return integer -function M.rlLoadShaderProgramEx(vsId, fsId) +function rlLoadShaderProgramEx(vsId, fsId) return C.rlLoadShaderProgramEx(vsId, fsId) end ---Load compute shader program ---@param csId integer ---@return integer -function M.rlLoadShaderProgramCompute(csId) +function rlLoadShaderProgramCompute(csId) return C.rlLoadShaderProgramCompute(csId) end ---Unload shader, loaded with rlLoadShader() ---@param id integer ----@return nil -function M.rlUnloadShader(id) +function rlUnloadShader(id) C.rlUnloadShader(id) end ---Unload shader program ---@param id integer ----@return nil -function M.rlUnloadShaderProgram(id) +function rlUnloadShaderProgram(id) C.rlUnloadShaderProgram(id) end @@ -11150,7 +9781,7 @@ end ---@param id integer ---@param uniformName string ---@return integer -function M.rlGetLocationUniform(id, uniformName) +function rlGetLocationUniform(id, uniformName) return C.rlGetLocationUniform(id, uniformName) end @@ -11158,17 +9789,16 @@ end ---@param id integer ---@param attribName string ---@return integer -function M.rlGetLocationAttrib(id, attribName) +function rlGetLocationAttrib(id, attribName) return C.rlGetLocationAttrib(id, attribName) end ---Set shader value uniform ---@param locIndex integer ----@param value ffi.cdata*|string ----@param uniformType integer +---@param value string|ffi.cdata* +---@param uniformType ShaderUniformDataType ---@param count integer ----@return nil -function M.rlSetUniform(locIndex, value, uniformType, count) +function rlSetUniform(locIndex, value, uniformType, count) local _a2 if type(value) == "string" then _a2 = ffi.cast("const void *", value) else _a2 = value end @@ -11177,18 +9807,16 @@ end ---Set shader value matrix ---@param locIndex integer ----@param mat raylib.Matrix ----@return nil -function M.rlSetUniformMatrix(locIndex, mat) +---@param mat Matrix +function rlSetUniformMatrix(locIndex, mat) C.rlSetUniformMatrix(locIndex, mat) end ---Set shader value matrices ---@param locIndex integer ----@param mat raylib.Matrix[] +---@param mat Matrix[]|ffi.cdata* ---@param count integer ----@return nil -function M.rlSetUniformMatrices(locIndex, mat, count) +function rlSetUniformMatrices(locIndex, mat, count) local _a2 if type(mat) == "table" then _a2 = to_array("Matrix", mat) else _a2 = mat end @@ -11198,16 +9826,14 @@ end ---Set shader value sampler ---@param locIndex integer ---@param textureId integer ----@return nil -function M.rlSetUniformSampler(locIndex, textureId) +function rlSetUniformSampler(locIndex, textureId) C.rlSetUniformSampler(locIndex, textureId) end ---Set shader currently active (id and locations) ---@param id integer ---@param locs ffi.cdata* ----@return nil -function M.rlSetShader(id, locs) +function rlSetShader(id, locs) C.rlSetShader(id, locs) end @@ -11215,17 +9841,16 @@ end ---@param groupX integer ---@param groupY integer ---@param groupZ integer ----@return nil -function M.rlComputeShaderDispatch(groupX, groupY, groupZ) +function rlComputeShaderDispatch(groupX, groupY, groupZ) C.rlComputeShaderDispatch(groupX, groupY, groupZ) end ---Load shader storage buffer object (SSBO) ---@param size integer ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param usageHint integer ---@return integer -function M.rlLoadShaderBuffer(size, data, usageHint) +function rlLoadShaderBuffer(size, data, usageHint) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -11234,18 +9859,16 @@ end ---Unload shader storage buffer object (SSBO) ---@param ssboId integer ----@return nil -function M.rlUnloadShaderBuffer(ssboId) +function rlUnloadShaderBuffer(ssboId) C.rlUnloadShaderBuffer(ssboId) end ---Update SSBO buffer data ---@param id integer ----@param data ffi.cdata*|string +---@param data string|ffi.cdata* ---@param dataSize integer ---@param offset integer ----@return nil -function M.rlUpdateShaderBuffer(id, data, dataSize, offset) +function rlUpdateShaderBuffer(id, data, dataSize, offset) local _a2 if type(data) == "string" then _a2 = ffi.cast("const void *", data) else _a2 = data end @@ -11255,22 +9878,17 @@ end ---Bind SSBO buffer ---@param id integer ---@param index integer ----@return nil -function M.rlBindShaderBuffer(id, index) +function rlBindShaderBuffer(id, index) C.rlBindShaderBuffer(id, index) end ---Read SSBO buffer data (GPU->CPU) ---@param id integer ----@param dest ffi.cdata*|string +---@param dest ffi.cdata* ---@param count integer ---@param offset integer ----@return nil -function M.rlReadShaderBuffer(id, dest, count, offset) - local _a2 - if type(dest) == "string" then _a2 = ffi.cast("const void *", dest) - else _a2 = dest end - C.rlReadShaderBuffer(id, _a2, count, offset) +function rlReadShaderBuffer(id, dest, count, offset) + C.rlReadShaderBuffer(id, dest, count, offset) end ---Copy SSBO data between buffers @@ -11279,15 +9897,14 @@ end ---@param destOffset integer ---@param srcOffset integer ---@param count integer ----@return nil -function M.rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count) +function rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count) C.rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count) end ---Get SSBO buffer size ---@param id integer ---@return integer -function M.rlGetShaderBufferSize(id) +function rlGetShaderBufferSize(id) return C.rlGetShaderBufferSize(id) end @@ -11296,1177 +9913,1297 @@ end ---@param index integer ---@param format integer ---@param readonly boolean ----@return nil -function M.rlBindImageTexture(id, index, format, readonly) +function rlBindImageTexture(id, index, format, readonly) C.rlBindImageTexture(id, index, format, readonly) end ---Get internal modelview matrix ----@return raylib.Matrix -function M.rlGetMatrixModelview() +---@return Matrix +function rlGetMatrixModelview() return C.rlGetMatrixModelview() end ---Get internal projection matrix ----@return raylib.Matrix -function M.rlGetMatrixProjection() +---@return Matrix +function rlGetMatrixProjection() return C.rlGetMatrixProjection() end ---Get internal accumulated transform matrix ----@return raylib.Matrix -function M.rlGetMatrixTransform() +---@return Matrix +function rlGetMatrixTransform() return C.rlGetMatrixTransform() end ---Get internal projection matrix for stereo render (selected eye) ---@param eye integer ----@return raylib.Matrix -function M.rlGetMatrixProjectionStereo(eye) +---@return Matrix +function rlGetMatrixProjectionStereo(eye) return C.rlGetMatrixProjectionStereo(eye) end ---Get internal view offset matrix for stereo render (selected eye) ---@param eye integer ----@return raylib.Matrix -function M.rlGetMatrixViewOffsetStereo(eye) +---@return Matrix +function rlGetMatrixViewOffsetStereo(eye) return C.rlGetMatrixViewOffsetStereo(eye) end ---Set a custom projection matrix (replaces internal projection matrix) ----@param proj raylib.Matrix ----@return nil -function M.rlSetMatrixProjection(proj) +---@param proj Matrix +function rlSetMatrixProjection(proj) C.rlSetMatrixProjection(proj) end ---Set a custom modelview matrix (replaces internal modelview matrix) ----@param view raylib.Matrix ----@return nil -function M.rlSetMatrixModelview(view) +---@param view Matrix +function rlSetMatrixModelview(view) C.rlSetMatrixModelview(view) end ---Set eyes projection matrices for stereo rendering ----@param right raylib.Matrix ----@param left raylib.Matrix ----@return nil -function M.rlSetMatrixProjectionStereo(right, left) +---@param right Matrix +---@param left Matrix +function rlSetMatrixProjectionStereo(right, left) C.rlSetMatrixProjectionStereo(right, left) end ---Set eyes view offsets matrices for stereo rendering ----@param right raylib.Matrix ----@param left raylib.Matrix ----@return nil -function M.rlSetMatrixViewOffsetStereo(right, left) +---@param right Matrix +---@param left Matrix +function rlSetMatrixViewOffsetStereo(right, left) C.rlSetMatrixViewOffsetStereo(right, left) end ---Load and draw a cube ----@return nil -function M.rlLoadDrawCube() +function rlLoadDrawCube() C.rlLoadDrawCube() end ---Load and draw a quad ----@return nil -function M.rlLoadDrawQuad() +function rlLoadDrawQuad() C.rlLoadDrawQuad() end +--- ---@param value number ---@param min number ---@param max number ---@return number -function M.Clamp(value, min, max) +function Clamp(value, min, max) return C.Clamp(value, min, max) end +--- ---@param start number ----@param end_ number +---@param _end number ---@param amount number ---@return number -function M.Lerp(start, end_, amount) - return C.Lerp(start, end_, amount) +function Lerp(start, _end, amount) + return C.Lerp(start, _end, amount) end +--- ---@param value number ---@param start number ----@param end_ number +---@param _end number ---@return number -function M.Normalize(value, start, end_) - return C.Normalize(value, start, end_) +function Normalize(value, start, _end) + return C.Normalize(value, start, _end) end +--- ---@param value number ---@param inputStart number ---@param inputEnd number ---@param outputStart number ---@param outputEnd number ---@return number -function M.Remap(value, inputStart, inputEnd, outputStart, outputEnd) +function Remap(value, inputStart, inputEnd, outputStart, outputEnd) return C.Remap(value, inputStart, inputEnd, outputStart, outputEnd) end +--- ---@param value number ---@param min number ---@param max number ---@return number -function M.Wrap(value, min, max) +function Wrap(value, min, max) return C.Wrap(value, min, max) end +--- ---@param x number ---@param y number ---@return integer -function M.FloatEquals(x, y) +function FloatEquals(x, y) return C.FloatEquals(x, y) end ----@return raylib.Vector2 -function M.Vector2Zero() +--- +---@return Vector2 +function Vector2Zero() return C.Vector2Zero() end ----@return raylib.Vector2 -function M.Vector2One() +--- +---@return Vector2 +function Vector2One() return C.Vector2One() end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Add(v1, v2) +--- +---@param v1 Vector2 +---@param v2 Vector2 +---@return Vector2 +function Vector2Add(v1, v2) return C.Vector2Add(v1, v2) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@param add number ----@return raylib.Vector2 -function M.Vector2AddValue(v, add) +---@return Vector2 +function Vector2AddValue(v, add) return C.Vector2AddValue(v, add) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Subtract(v1, v2) +--- +---@param v1 Vector2 +---@param v2 Vector2 +---@return Vector2 +function Vector2Subtract(v1, v2) return C.Vector2Subtract(v1, v2) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@param sub number ----@return raylib.Vector2 -function M.Vector2SubtractValue(v, sub) +---@return Vector2 +function Vector2SubtractValue(v, sub) return C.Vector2SubtractValue(v, sub) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@return number -function M.Vector2Length(v) +function Vector2Length(v) return C.Vector2Length(v) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@return number -function M.Vector2LengthSqr(v) +function Vector2LengthSqr(v) return C.Vector2LengthSqr(v) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 +--- +---@param v1 Vector2 +---@param v2 Vector2 ---@return number -function M.Vector2DotProduct(v1, v2) +function Vector2DotProduct(v1, v2) return C.Vector2DotProduct(v1, v2) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 +--- +---@param v1 Vector2 +---@param v2 Vector2 ---@return number -function M.Vector2CrossProduct(v1, v2) +function Vector2CrossProduct(v1, v2) return C.Vector2CrossProduct(v1, v2) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 +--- +---@param v1 Vector2 +---@param v2 Vector2 ---@return number -function M.Vector2Distance(v1, v2) +function Vector2Distance(v1, v2) return C.Vector2Distance(v1, v2) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 +--- +---@param v1 Vector2 +---@param v2 Vector2 ---@return number -function M.Vector2DistanceSqr(v1, v2) +function Vector2DistanceSqr(v1, v2) return C.Vector2DistanceSqr(v1, v2) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 +--- +---@param v1 Vector2 +---@param v2 Vector2 ---@return number -function M.Vector2Angle(v1, v2) +function Vector2Angle(v1, v2) return C.Vector2Angle(v1, v2) end ----@param start raylib.Vector2 ----@param end_ raylib.Vector2 +--- +---@param start Vector2 +---@param _end Vector2 ---@return number -function M.Vector2LineAngle(start, end_) - return C.Vector2LineAngle(start, end_) +function Vector2LineAngle(start, _end) + return C.Vector2LineAngle(start, _end) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@param scale number ----@return raylib.Vector2 -function M.Vector2Scale(v, scale) +---@return Vector2 +function Vector2Scale(v, scale) return C.Vector2Scale(v, scale) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Multiply(v1, v2) +--- +---@param v1 Vector2 +---@param v2 Vector2 +---@return Vector2 +function Vector2Multiply(v1, v2) return C.Vector2Multiply(v1, v2) end ----@param v raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Negate(v) +--- +---@param v Vector2 +---@return Vector2 +function Vector2Negate(v) return C.Vector2Negate(v) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Divide(v1, v2) +--- +---@param v1 Vector2 +---@param v2 Vector2 +---@return Vector2 +function Vector2Divide(v1, v2) return C.Vector2Divide(v1, v2) end ----@param v raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Normalize(v) +--- +---@param v Vector2 +---@return Vector2 +function Vector2Normalize(v) return C.Vector2Normalize(v) end ----@param v raylib.Vector2 ----@param mat raylib.Matrix ----@return raylib.Vector2 -function M.Vector2Transform(v, mat) +--- +---@param v Vector2 +---@param mat Matrix +---@return Vector2 +function Vector2Transform(v, mat) return C.Vector2Transform(v, mat) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 +--- +---@param v1 Vector2 +---@param v2 Vector2 ---@param amount number ----@return raylib.Vector2 -function M.Vector2Lerp(v1, v2, amount) +---@return Vector2 +function Vector2Lerp(v1, v2, amount) return C.Vector2Lerp(v1, v2, amount) end ----@param v raylib.Vector2 ----@param normal raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Reflect(v, normal) +--- +---@param v Vector2 +---@param normal Vector2 +---@return Vector2 +function Vector2Reflect(v, normal) return C.Vector2Reflect(v, normal) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Min(v1, v2) +--- +---@param v1 Vector2 +---@param v2 Vector2 +---@return Vector2 +function Vector2Min(v1, v2) return C.Vector2Min(v1, v2) end ----@param v1 raylib.Vector2 ----@param v2 raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Max(v1, v2) +--- +---@param v1 Vector2 +---@param v2 Vector2 +---@return Vector2 +function Vector2Max(v1, v2) return C.Vector2Max(v1, v2) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@param angle number ----@return raylib.Vector2 -function M.Vector2Rotate(v, angle) +---@return Vector2 +function Vector2Rotate(v, angle) return C.Vector2Rotate(v, angle) end ----@param v raylib.Vector2 ----@param target raylib.Vector2 +--- +---@param v Vector2 +---@param target Vector2 ---@param maxDistance number ----@return raylib.Vector2 -function M.Vector2MoveTowards(v, target, maxDistance) +---@return Vector2 +function Vector2MoveTowards(v, target, maxDistance) return C.Vector2MoveTowards(v, target, maxDistance) end ----@param v raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Invert(v) +--- +---@param v Vector2 +---@return Vector2 +function Vector2Invert(v) return C.Vector2Invert(v) end ----@param v raylib.Vector2 ----@param min raylib.Vector2 ----@param max raylib.Vector2 ----@return raylib.Vector2 -function M.Vector2Clamp(v, min, max) +--- +---@param v Vector2 +---@param min Vector2 +---@param max Vector2 +---@return Vector2 +function Vector2Clamp(v, min, max) return C.Vector2Clamp(v, min, max) end ----@param v raylib.Vector2 +--- +---@param v Vector2 ---@param min number ---@param max number ----@return raylib.Vector2 -function M.Vector2ClampValue(v, min, max) +---@return Vector2 +function Vector2ClampValue(v, min, max) return C.Vector2ClampValue(v, min, max) end ----@param p raylib.Vector2 ----@param q raylib.Vector2 +--- +---@param p Vector2 +---@param q Vector2 ---@return integer -function M.Vector2Equals(p, q) +function Vector2Equals(p, q) return C.Vector2Equals(p, q) end ----@param v raylib.Vector2 ----@param n raylib.Vector2 +--- +---@param v Vector2 +---@param n Vector2 ---@param r number ----@return raylib.Vector2 -function M.Vector2Refract(v, n, r) +---@return Vector2 +function Vector2Refract(v, n, r) return C.Vector2Refract(v, n, r) end ----@return raylib.Vector3 -function M.Vector3Zero() +--- +---@return Vector3 +function Vector3Zero() return C.Vector3Zero() end ----@return raylib.Vector3 -function M.Vector3One() +--- +---@return Vector3 +function Vector3One() return C.Vector3One() end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Add(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Add(v1, v2) return C.Vector3Add(v1, v2) end ----@param v raylib.Vector3 +--- +---@param v Vector3 ---@param add number ----@return raylib.Vector3 -function M.Vector3AddValue(v, add) +---@return Vector3 +function Vector3AddValue(v, add) return C.Vector3AddValue(v, add) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Subtract(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Subtract(v1, v2) return C.Vector3Subtract(v1, v2) end ----@param v raylib.Vector3 +--- +---@param v Vector3 ---@param sub number ----@return raylib.Vector3 -function M.Vector3SubtractValue(v, sub) +---@return Vector3 +function Vector3SubtractValue(v, sub) return C.Vector3SubtractValue(v, sub) end ----@param v raylib.Vector3 +--- +---@param v Vector3 ---@param scalar number ----@return raylib.Vector3 -function M.Vector3Scale(v, scalar) +---@return Vector3 +function Vector3Scale(v, scalar) return C.Vector3Scale(v, scalar) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Multiply(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Multiply(v1, v2) return C.Vector3Multiply(v1, v2) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3CrossProduct(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3CrossProduct(v1, v2) return C.Vector3CrossProduct(v1, v2) end ----@param v raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Perpendicular(v) +--- +---@param v Vector3 +---@return Vector3 +function Vector3Perpendicular(v) return C.Vector3Perpendicular(v) end ----@param v raylib.Vector3 +--- +---@param v Vector3 ---@return number -function M.Vector3Length(v) +function Vector3Length(v) return C.Vector3Length(v) end ----@param v raylib.Vector3 +--- +---@param v Vector3 ---@return number -function M.Vector3LengthSqr(v) +function Vector3LengthSqr(v) return C.Vector3LengthSqr(v) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 +--- +---@param v1 Vector3 +---@param v2 Vector3 ---@return number -function M.Vector3DotProduct(v1, v2) +function Vector3DotProduct(v1, v2) return C.Vector3DotProduct(v1, v2) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 +--- +---@param v1 Vector3 +---@param v2 Vector3 ---@return number -function M.Vector3Distance(v1, v2) +function Vector3Distance(v1, v2) return C.Vector3Distance(v1, v2) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 +--- +---@param v1 Vector3 +---@param v2 Vector3 ---@return number -function M.Vector3DistanceSqr(v1, v2) +function Vector3DistanceSqr(v1, v2) return C.Vector3DistanceSqr(v1, v2) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 +--- +---@param v1 Vector3 +---@param v2 Vector3 ---@return number -function M.Vector3Angle(v1, v2) +function Vector3Angle(v1, v2) return C.Vector3Angle(v1, v2) end ----@param v raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Negate(v) +--- +---@param v Vector3 +---@return Vector3 +function Vector3Negate(v) return C.Vector3Negate(v) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Divide(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Divide(v1, v2) return C.Vector3Divide(v1, v2) end ----@param v raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Normalize(v) +--- +---@param v Vector3 +---@return Vector3 +function Vector3Normalize(v) return C.Vector3Normalize(v) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Project(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Project(v1, v2) return C.Vector3Project(v1, v2) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Reject(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Reject(v1, v2) return C.Vector3Reject(v1, v2) end +--- ---@param v1 ffi.cdata* ---@param v2 ffi.cdata* ----@return nil -function M.Vector3OrthoNormalize(v1, v2) +function Vector3OrthoNormalize(v1, v2) C.Vector3OrthoNormalize(v1, v2) end ----@param v raylib.Vector3 ----@param mat raylib.Matrix ----@return raylib.Vector3 -function M.Vector3Transform(v, mat) +--- +---@param v Vector3 +---@param mat Matrix +---@return Vector3 +function Vector3Transform(v, mat) return C.Vector3Transform(v, mat) end ----@param v raylib.Vector3 ----@param q raylib.Quaternion ----@return raylib.Vector3 -function M.Vector3RotateByQuaternion(v, q) +--- +---@param v Vector3 +---@param q Quaternion +---@return Vector3 +function Vector3RotateByQuaternion(v, q) return C.Vector3RotateByQuaternion(v, q) end ----@param v raylib.Vector3 ----@param axis raylib.Vector3 +--- +---@param v Vector3 +---@param axis Vector3 ---@param angle number ----@return raylib.Vector3 -function M.Vector3RotateByAxisAngle(v, axis, angle) +---@return Vector3 +function Vector3RotateByAxisAngle(v, axis, angle) return C.Vector3RotateByAxisAngle(v, axis, angle) end ----@param v raylib.Vector3 ----@param target raylib.Vector3 +--- +---@param v Vector3 +---@param target Vector3 ---@param maxDistance number ----@return raylib.Vector3 -function M.Vector3MoveTowards(v, target, maxDistance) +---@return Vector3 +function Vector3MoveTowards(v, target, maxDistance) return C.Vector3MoveTowards(v, target, maxDistance) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 +--- +---@param v1 Vector3 +---@param v2 Vector3 ---@param amount number ----@return raylib.Vector3 -function M.Vector3Lerp(v1, v2, amount) +---@return Vector3 +function Vector3Lerp(v1, v2, amount) return C.Vector3Lerp(v1, v2, amount) end ----@param v1 raylib.Vector3 ----@param tangent1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@param tangent2 raylib.Vector3 +--- +---@param v1 Vector3 +---@param tangent1 Vector3 +---@param v2 Vector3 +---@param tangent2 Vector3 ---@param amount number ----@return raylib.Vector3 -function M.Vector3CubicHermite(v1, tangent1, v2, tangent2, amount) +---@return Vector3 +function Vector3CubicHermite(v1, tangent1, v2, tangent2, amount) return C.Vector3CubicHermite(v1, tangent1, v2, tangent2, amount) end ----@param v raylib.Vector3 ----@param normal raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Reflect(v, normal) +--- +---@param v Vector3 +---@param normal Vector3 +---@return Vector3 +function Vector3Reflect(v, normal) return C.Vector3Reflect(v, normal) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Min(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Min(v1, v2) return C.Vector3Min(v1, v2) end ----@param v1 raylib.Vector3 ----@param v2 raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Max(v1, v2) +--- +---@param v1 Vector3 +---@param v2 Vector3 +---@return Vector3 +function Vector3Max(v1, v2) return C.Vector3Max(v1, v2) end ----@param p raylib.Vector3 ----@param a raylib.Vector3 ----@param b raylib.Vector3 ----@param c raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Barycenter(p, a, b, c) +--- +---@param p Vector3 +---@param a Vector3 +---@param b Vector3 +---@param c Vector3 +---@return Vector3 +function Vector3Barycenter(p, a, b, c) return C.Vector3Barycenter(p, a, b, c) end ----@param source raylib.Vector3 ----@param projection raylib.Matrix ----@param view raylib.Matrix ----@return raylib.Vector3 -function M.Vector3Unproject(source, projection, view) +--- +---@param source Vector3 +---@param projection Matrix +---@param view Matrix +---@return Vector3 +function Vector3Unproject(source, projection, view) return C.Vector3Unproject(source, projection, view) end ----@param v raylib.Vector3 ----@return raylib.float3 -function M.Vector3ToFloatV(v) +--- +---@param v Vector3 +---@return float3 +function Vector3ToFloatV(v) return C.Vector3ToFloatV(v) end ----@param v raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Invert(v) +--- +---@param v Vector3 +---@return Vector3 +function Vector3Invert(v) return C.Vector3Invert(v) end ----@param v raylib.Vector3 ----@param min raylib.Vector3 ----@param max raylib.Vector3 ----@return raylib.Vector3 -function M.Vector3Clamp(v, min, max) +--- +---@param v Vector3 +---@param min Vector3 +---@param max Vector3 +---@return Vector3 +function Vector3Clamp(v, min, max) return C.Vector3Clamp(v, min, max) end ----@param v raylib.Vector3 +--- +---@param v Vector3 ---@param min number ---@param max number ----@return raylib.Vector3 -function M.Vector3ClampValue(v, min, max) +---@return Vector3 +function Vector3ClampValue(v, min, max) return C.Vector3ClampValue(v, min, max) end ----@param p raylib.Vector3 ----@param q raylib.Vector3 +--- +---@param p Vector3 +---@param q Vector3 ---@return integer -function M.Vector3Equals(p, q) +function Vector3Equals(p, q) return C.Vector3Equals(p, q) end ----@param v raylib.Vector3 ----@param n raylib.Vector3 +--- +---@param v Vector3 +---@param n Vector3 ---@param r number ----@return raylib.Vector3 -function M.Vector3Refract(v, n, r) +---@return Vector3 +function Vector3Refract(v, n, r) return C.Vector3Refract(v, n, r) end ----@return raylib.Vector4 -function M.Vector4Zero() +--- +---@return Vector4 +function Vector4Zero() return C.Vector4Zero() end ----@return raylib.Vector4 -function M.Vector4One() +--- +---@return Vector4 +function Vector4One() return C.Vector4One() end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Add(v1, v2) +--- +---@param v1 Vector4 +---@param v2 Vector4 +---@return Vector4 +function Vector4Add(v1, v2) return C.Vector4Add(v1, v2) end ----@param v raylib.Vector4 +--- +---@param v Vector4 ---@param add number ----@return raylib.Vector4 -function M.Vector4AddValue(v, add) +---@return Vector4 +function Vector4AddValue(v, add) return C.Vector4AddValue(v, add) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Subtract(v1, v2) +--- +---@param v1 Vector4 +---@param v2 Vector4 +---@return Vector4 +function Vector4Subtract(v1, v2) return C.Vector4Subtract(v1, v2) end ----@param v raylib.Vector4 +--- +---@param v Vector4 ---@param add number ----@return raylib.Vector4 -function M.Vector4SubtractValue(v, add) +---@return Vector4 +function Vector4SubtractValue(v, add) return C.Vector4SubtractValue(v, add) end ----@param v raylib.Vector4 +--- +---@param v Vector4 ---@return number -function M.Vector4Length(v) +function Vector4Length(v) return C.Vector4Length(v) end ----@param v raylib.Vector4 +--- +---@param v Vector4 ---@return number -function M.Vector4LengthSqr(v) +function Vector4LengthSqr(v) return C.Vector4LengthSqr(v) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 +--- +---@param v1 Vector4 +---@param v2 Vector4 ---@return number -function M.Vector4DotProduct(v1, v2) +function Vector4DotProduct(v1, v2) return C.Vector4DotProduct(v1, v2) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 +--- +---@param v1 Vector4 +---@param v2 Vector4 ---@return number -function M.Vector4Distance(v1, v2) +function Vector4Distance(v1, v2) return C.Vector4Distance(v1, v2) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 +--- +---@param v1 Vector4 +---@param v2 Vector4 ---@return number -function M.Vector4DistanceSqr(v1, v2) +function Vector4DistanceSqr(v1, v2) return C.Vector4DistanceSqr(v1, v2) end ----@param v raylib.Vector4 +--- +---@param v Vector4 ---@param scale number ----@return raylib.Vector4 -function M.Vector4Scale(v, scale) +---@return Vector4 +function Vector4Scale(v, scale) return C.Vector4Scale(v, scale) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Multiply(v1, v2) +--- +---@param v1 Vector4 +---@param v2 Vector4 +---@return Vector4 +function Vector4Multiply(v1, v2) return C.Vector4Multiply(v1, v2) end ----@param v raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Negate(v) +--- +---@param v Vector4 +---@return Vector4 +function Vector4Negate(v) return C.Vector4Negate(v) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Divide(v1, v2) +--- +---@param v1 Vector4 +---@param v2 Vector4 +---@return Vector4 +function Vector4Divide(v1, v2) return C.Vector4Divide(v1, v2) end ----@param v raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Normalize(v) +--- +---@param v Vector4 +---@return Vector4 +function Vector4Normalize(v) return C.Vector4Normalize(v) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Min(v1, v2) +--- +---@param v1 Vector4 +---@param v2 Vector4 +---@return Vector4 +function Vector4Min(v1, v2) return C.Vector4Min(v1, v2) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Max(v1, v2) +--- +---@param v1 Vector4 +---@param v2 Vector4 +---@return Vector4 +function Vector4Max(v1, v2) return C.Vector4Max(v1, v2) end ----@param v1 raylib.Vector4 ----@param v2 raylib.Vector4 +--- +---@param v1 Vector4 +---@param v2 Vector4 ---@param amount number ----@return raylib.Vector4 -function M.Vector4Lerp(v1, v2, amount) +---@return Vector4 +function Vector4Lerp(v1, v2, amount) return C.Vector4Lerp(v1, v2, amount) end ----@param v raylib.Vector4 ----@param target raylib.Vector4 +--- +---@param v Vector4 +---@param target Vector4 ---@param maxDistance number ----@return raylib.Vector4 -function M.Vector4MoveTowards(v, target, maxDistance) +---@return Vector4 +function Vector4MoveTowards(v, target, maxDistance) return C.Vector4MoveTowards(v, target, maxDistance) end ----@param v raylib.Vector4 ----@return raylib.Vector4 -function M.Vector4Invert(v) +--- +---@param v Vector4 +---@return Vector4 +function Vector4Invert(v) return C.Vector4Invert(v) end ----@param p raylib.Vector4 ----@param q raylib.Vector4 +--- +---@param p Vector4 +---@param q Vector4 ---@return integer -function M.Vector4Equals(p, q) +function Vector4Equals(p, q) return C.Vector4Equals(p, q) end ----@param mat raylib.Matrix +--- +---@param mat Matrix ---@return number -function M.MatrixDeterminant(mat) +function MatrixDeterminant(mat) return C.MatrixDeterminant(mat) end ----@param mat raylib.Matrix +--- +---@param mat Matrix ---@return number -function M.MatrixTrace(mat) +function MatrixTrace(mat) return C.MatrixTrace(mat) end ----@param mat raylib.Matrix ----@return raylib.Matrix -function M.MatrixTranspose(mat) +--- +---@param mat Matrix +---@return Matrix +function MatrixTranspose(mat) return C.MatrixTranspose(mat) end ----@param mat raylib.Matrix ----@return raylib.Matrix -function M.MatrixInvert(mat) +--- +---@param mat Matrix +---@return Matrix +function MatrixInvert(mat) return C.MatrixInvert(mat) end ----@return raylib.Matrix -function M.MatrixIdentity() +--- +---@return Matrix +function MatrixIdentity() return C.MatrixIdentity() end ----@param left raylib.Matrix ----@param right raylib.Matrix ----@return raylib.Matrix -function M.MatrixAdd(left, right) +--- +---@param left Matrix +---@param right Matrix +---@return Matrix +function MatrixAdd(left, right) return C.MatrixAdd(left, right) end ----@param left raylib.Matrix ----@param right raylib.Matrix ----@return raylib.Matrix -function M.MatrixSubtract(left, right) +--- +---@param left Matrix +---@param right Matrix +---@return Matrix +function MatrixSubtract(left, right) return C.MatrixSubtract(left, right) end ----@param left raylib.Matrix ----@param right raylib.Matrix ----@return raylib.Matrix -function M.MatrixMultiply(left, right) +--- +---@param left Matrix +---@param right Matrix +---@return Matrix +function MatrixMultiply(left, right) return C.MatrixMultiply(left, right) end ----@param left raylib.Matrix +--- +---@param left Matrix ---@param value number ----@return raylib.Matrix -function M.MatrixMultiplyValue(left, value) +---@return Matrix +function MatrixMultiplyValue(left, value) return C.MatrixMultiplyValue(left, value) end +--- ---@param x number ---@param y number ---@param z number ----@return raylib.Matrix -function M.MatrixTranslate(x, y, z) +---@return Matrix +function MatrixTranslate(x, y, z) return C.MatrixTranslate(x, y, z) end ----@param axis raylib.Vector3 +--- +---@param axis Vector3 ---@param angle number ----@return raylib.Matrix -function M.MatrixRotate(axis, angle) +---@return Matrix +function MatrixRotate(axis, angle) return C.MatrixRotate(axis, angle) end +--- ---@param angle number ----@return raylib.Matrix -function M.MatrixRotateX(angle) +---@return Matrix +function MatrixRotateX(angle) return C.MatrixRotateX(angle) end +--- ---@param angle number ----@return raylib.Matrix -function M.MatrixRotateY(angle) +---@return Matrix +function MatrixRotateY(angle) return C.MatrixRotateY(angle) end +--- ---@param angle number ----@return raylib.Matrix -function M.MatrixRotateZ(angle) +---@return Matrix +function MatrixRotateZ(angle) return C.MatrixRotateZ(angle) end ----@param angle raylib.Vector3 ----@return raylib.Matrix -function M.MatrixRotateXYZ(angle) +--- +---@param angle Vector3 +---@return Matrix +function MatrixRotateXYZ(angle) return C.MatrixRotateXYZ(angle) end ----@param angle raylib.Vector3 ----@return raylib.Matrix -function M.MatrixRotateZYX(angle) +--- +---@param angle Vector3 +---@return Matrix +function MatrixRotateZYX(angle) return C.MatrixRotateZYX(angle) end +--- ---@param x number ---@param y number ---@param z number ----@return raylib.Matrix -function M.MatrixScale(x, y, z) +---@return Matrix +function MatrixScale(x, y, z) return C.MatrixScale(x, y, z) end +--- ---@param left number ---@param right number ---@param bottom number ---@param top number ---@param nearPlane number ---@param farPlane number ----@return raylib.Matrix -function M.MatrixFrustum(left, right, bottom, top, nearPlane, farPlane) +---@return Matrix +function MatrixFrustum(left, right, bottom, top, nearPlane, farPlane) return C.MatrixFrustum(left, right, bottom, top, nearPlane, farPlane) end +--- ---@param fovY number ---@param aspect number ---@param nearPlane number ---@param farPlane number ----@return raylib.Matrix -function M.MatrixPerspective(fovY, aspect, nearPlane, farPlane) +---@return Matrix +function MatrixPerspective(fovY, aspect, nearPlane, farPlane) return C.MatrixPerspective(fovY, aspect, nearPlane, farPlane) end +--- ---@param left number ---@param right number ---@param bottom number ---@param top number ---@param nearPlane number ---@param farPlane number ----@return raylib.Matrix -function M.MatrixOrtho(left, right, bottom, top, nearPlane, farPlane) +---@return Matrix +function MatrixOrtho(left, right, bottom, top, nearPlane, farPlane) return C.MatrixOrtho(left, right, bottom, top, nearPlane, farPlane) end ----@param eye raylib.Vector3 ----@param target raylib.Vector3 ----@param up raylib.Vector3 ----@return raylib.Matrix -function M.MatrixLookAt(eye, target, up) +--- +---@param eye Vector3 +---@param target Vector3 +---@param up Vector3 +---@return Matrix +function MatrixLookAt(eye, target, up) return C.MatrixLookAt(eye, target, up) end ----@param mat raylib.Matrix ----@return raylib.float16 -function M.MatrixToFloatV(mat) +--- +---@param mat Matrix +---@return float16 +function MatrixToFloatV(mat) return C.MatrixToFloatV(mat) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion ----@return raylib.Quaternion -function M.QuaternionAdd(q1, q2) +--- +---@param q1 Quaternion +---@param q2 Quaternion +---@return Quaternion +function QuaternionAdd(q1, q2) return C.QuaternionAdd(q1, q2) end ----@param q raylib.Quaternion +--- +---@param q Quaternion ---@param add number ----@return raylib.Quaternion -function M.QuaternionAddValue(q, add) +---@return Quaternion +function QuaternionAddValue(q, add) return C.QuaternionAddValue(q, add) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion ----@return raylib.Quaternion -function M.QuaternionSubtract(q1, q2) +--- +---@param q1 Quaternion +---@param q2 Quaternion +---@return Quaternion +function QuaternionSubtract(q1, q2) return C.QuaternionSubtract(q1, q2) end ----@param q raylib.Quaternion +--- +---@param q Quaternion ---@param sub number ----@return raylib.Quaternion -function M.QuaternionSubtractValue(q, sub) +---@return Quaternion +function QuaternionSubtractValue(q, sub) return C.QuaternionSubtractValue(q, sub) end ----@return raylib.Quaternion -function M.QuaternionIdentity() +--- +---@return Quaternion +function QuaternionIdentity() return C.QuaternionIdentity() end ----@param q raylib.Quaternion +--- +---@param q Quaternion ---@return number -function M.QuaternionLength(q) +function QuaternionLength(q) return C.QuaternionLength(q) end ----@param q raylib.Quaternion ----@return raylib.Quaternion -function M.QuaternionNormalize(q) +--- +---@param q Quaternion +---@return Quaternion +function QuaternionNormalize(q) return C.QuaternionNormalize(q) end ----@param q raylib.Quaternion ----@return raylib.Quaternion -function M.QuaternionInvert(q) +--- +---@param q Quaternion +---@return Quaternion +function QuaternionInvert(q) return C.QuaternionInvert(q) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion ----@return raylib.Quaternion -function M.QuaternionMultiply(q1, q2) +--- +---@param q1 Quaternion +---@param q2 Quaternion +---@return Quaternion +function QuaternionMultiply(q1, q2) return C.QuaternionMultiply(q1, q2) end ----@param q raylib.Quaternion +--- +---@param q Quaternion ---@param mul number ----@return raylib.Quaternion -function M.QuaternionScale(q, mul) +---@return Quaternion +function QuaternionScale(q, mul) return C.QuaternionScale(q, mul) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion ----@return raylib.Quaternion -function M.QuaternionDivide(q1, q2) +--- +---@param q1 Quaternion +---@param q2 Quaternion +---@return Quaternion +function QuaternionDivide(q1, q2) return C.QuaternionDivide(q1, q2) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion +--- +---@param q1 Quaternion +---@param q2 Quaternion ---@param amount number ----@return raylib.Quaternion -function M.QuaternionLerp(q1, q2, amount) +---@return Quaternion +function QuaternionLerp(q1, q2, amount) return C.QuaternionLerp(q1, q2, amount) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion +--- +---@param q1 Quaternion +---@param q2 Quaternion ---@param amount number ----@return raylib.Quaternion -function M.QuaternionNlerp(q1, q2, amount) +---@return Quaternion +function QuaternionNlerp(q1, q2, amount) return C.QuaternionNlerp(q1, q2, amount) end ----@param q1 raylib.Quaternion ----@param q2 raylib.Quaternion +--- +---@param q1 Quaternion +---@param q2 Quaternion ---@param amount number ----@return raylib.Quaternion -function M.QuaternionSlerp(q1, q2, amount) +---@return Quaternion +function QuaternionSlerp(q1, q2, amount) return C.QuaternionSlerp(q1, q2, amount) end ----@param q1 raylib.Quaternion ----@param outTangent1 raylib.Quaternion ----@param q2 raylib.Quaternion ----@param inTangent2 raylib.Quaternion +--- +---@param q1 Quaternion +---@param outTangent1 Quaternion +---@param q2 Quaternion +---@param inTangent2 Quaternion ---@param t number ----@return raylib.Quaternion -function M.QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t) +---@return Quaternion +function QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t) return C.QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t) end ----@param from raylib.Vector3 ----@param to raylib.Vector3 ----@return raylib.Quaternion -function M.QuaternionFromVector3ToVector3(from, to) +--- +---@param from Vector3 +---@param to Vector3 +---@return Quaternion +function QuaternionFromVector3ToVector3(from, to) return C.QuaternionFromVector3ToVector3(from, to) end ----@param mat raylib.Matrix ----@return raylib.Quaternion -function M.QuaternionFromMatrix(mat) +--- +---@param mat Matrix +---@return Quaternion +function QuaternionFromMatrix(mat) return C.QuaternionFromMatrix(mat) end ----@param q raylib.Quaternion ----@return raylib.Matrix -function M.QuaternionToMatrix(q) +--- +---@param q Quaternion +---@return Matrix +function QuaternionToMatrix(q) return C.QuaternionToMatrix(q) end ----@param axis raylib.Vector3 +--- +---@param axis Vector3 ---@param angle number ----@return raylib.Quaternion -function M.QuaternionFromAxisAngle(axis, angle) +---@return Quaternion +function QuaternionFromAxisAngle(axis, angle) return C.QuaternionFromAxisAngle(axis, angle) end ----@param q raylib.Quaternion +--- +---@param q Quaternion ---@param outAxis ffi.cdata* ---@param outAngle ffi.cdata* ----@return nil -function M.QuaternionToAxisAngle(q, outAxis, outAngle) +function QuaternionToAxisAngle(q, outAxis, outAngle) C.QuaternionToAxisAngle(q, outAxis, outAngle) end +--- ---@param pitch number ---@param yaw number ---@param roll number ----@return raylib.Quaternion -function M.QuaternionFromEuler(pitch, yaw, roll) +---@return Quaternion +function QuaternionFromEuler(pitch, yaw, roll) return C.QuaternionFromEuler(pitch, yaw, roll) end ----@param q raylib.Quaternion ----@return raylib.Vector3 -function M.QuaternionToEuler(q) +--- +---@param q Quaternion +---@return Vector3 +function QuaternionToEuler(q) return C.QuaternionToEuler(q) end ----@param q raylib.Quaternion ----@param mat raylib.Matrix ----@return raylib.Quaternion -function M.QuaternionTransform(q, mat) +--- +---@param q Quaternion +---@param mat Matrix +---@return Quaternion +function QuaternionTransform(q, mat) return C.QuaternionTransform(q, mat) end ----@param p raylib.Quaternion ----@param q raylib.Quaternion +--- +---@param p Quaternion +---@param q Quaternion ---@return integer -function M.QuaternionEquals(p, q) +function QuaternionEquals(p, q) return C.QuaternionEquals(p, q) end ----@param translation raylib.Vector3 ----@param rotation raylib.Quaternion ----@param scale raylib.Vector3 ----@return raylib.Matrix -function M.MatrixCompose(translation, rotation, scale) +--- +---@param translation Vector3 +---@param rotation Quaternion +---@param scale Vector3 +---@return Matrix +function MatrixCompose(translation, rotation, scale) return C.MatrixCompose(translation, rotation, scale) end ----@param mat raylib.Matrix ----@param translation? raylib.Vector3 ----@param rotation? raylib.Quaternion ----@param scale? raylib.Vector3 ----@return raylib.Vector3 ----@return raylib.Quaternion ----@return raylib.Vector3 -function M.MatrixDecompose(mat, translation, rotation, scale) - local _o2 = ffi.new("Vector3[1]") - if translation ~= nil then _o2[0] = translation end - local _o3 = ffi.new("Quaternion[1]") - if rotation ~= nil then _o3[0] = rotation end - local _o4 = ffi.new("Vector3[1]") - if scale ~= nil then _o4[0] = scale end - C.MatrixDecompose(mat, _o2, _o3, _o4) - return _o2[0], _o3[0], _o4[0] +--- +---@param mat Matrix +---@param translation ffi.cdata* +---@param rotation ffi.cdata* +---@param scale ffi.cdata* +function MatrixDecompose(mat, translation, rotation, scale) + C.MatrixDecompose(mat, translation, rotation, scale) end ---Enable gui controls (global state) ----@return nil -function M.GuiEnable() +function GuiEnable() C.GuiEnable() end ---Disable gui controls (global state) ----@return nil -function M.GuiDisable() +function GuiDisable() C.GuiDisable() end ---Lock gui controls (global state) ----@return nil -function M.GuiLock() +function GuiLock() C.GuiLock() end ---Unlock gui controls (global state) ----@return nil -function M.GuiUnlock() +function GuiUnlock() C.GuiUnlock() end ---Check if gui is locked (global state) ---@return boolean -function M.GuiIsLocked() +function GuiIsLocked() return C.GuiIsLocked() end ---Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f ---@param alpha number ----@return nil -function M.GuiSetAlpha(alpha) +function GuiSetAlpha(alpha) C.GuiSetAlpha(alpha) end ---Set gui state (global state) ---@param state integer ----@return nil -function M.GuiSetState(state) +function GuiSetState(state) C.GuiSetState(state) end ---Get gui state (global state) ---@return integer -function M.GuiGetState() +function GuiGetState() return C.GuiGetState() end ---Set gui custom font (global state) ----@param font raylib.Font ----@return nil -function M.GuiSetFont(font) +---@param font Font +function GuiSetFont(font) C.GuiSetFont(font) end ---Get gui custom font (global state) ----@return raylib.Font -function M.GuiGetFont() +---@return Font +function GuiGetFont() return C.GuiGetFont() end @@ -12474,8 +11211,7 @@ end ---@param control integer ---@param property integer ---@param value integer ----@return nil -function M.GuiSetStyle(control, property, value) +function GuiSetStyle(control, property, value) C.GuiSetStyle(control, property, value) end @@ -12483,22 +11219,20 @@ end ---@param control integer ---@param property integer ---@return integer -function M.GuiGetStyle(control, property) +function GuiGetStyle(control, property) return C.GuiGetStyle(control, property) end ---Load style file over global style variable (.rgs) ---@param fileName string ----@return nil -function M.GuiLoadStyle(fileName) +function GuiLoadStyle(fileName) C.GuiLoadStyle(fileName) end ---Load style from memory (binary only) ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ----@return nil -function M.GuiLoadStyleFromMemory(fileData, dataSize) +function GuiLoadStyleFromMemory(fileData, dataSize) local _a1 if type(fileData) == "string" then _a1 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a1 = to_array("unsigned char", fileData) @@ -12507,53 +11241,44 @@ function M.GuiLoadStyleFromMemory(fileData, dataSize) end ---Load style default over global style ----@return nil -function M.GuiLoadStyleDefault() +function GuiLoadStyleDefault() C.GuiLoadStyleDefault() end ---Enable gui tooltips (global state) ----@return nil -function M.GuiEnableTooltip() +function GuiEnableTooltip() C.GuiEnableTooltip() end ---Disable gui tooltips (global state) ----@return nil -function M.GuiDisableTooltip() +function GuiDisableTooltip() C.GuiDisableTooltip() end ---Set tooltip string ---@param tooltip string ----@return nil -function M.GuiSetTooltip(tooltip) +function GuiSetTooltip(tooltip) C.GuiSetTooltip(tooltip) end ---Get text with icon id prepended (if supported) ---@param iconId integer ---@param text string ----@return string|nil -function M.GuiIconText(iconId, text) - local _p = C.GuiIconText(iconId, text) - if _p == nil then - return nil - end - local _s = ffi_string(_p) - return _s +---@return string +function GuiIconText(iconId, text) + local _r = C.GuiIconText(iconId, text) + return _r ~= nil and ffi.string(_r) or "" end ---Set default icon drawing size ---@param scale integer ----@return nil -function M.GuiSetIconScale(scale) +function GuiSetIconScale(scale) C.GuiSetIconScale(scale) end ---Get raygui icons data pointer ---@return ffi.cdata* -function M.GuiGetIcons() +function GuiGetIcons() return C.GuiGetIcons() end @@ -12561,16 +11286,16 @@ end ---@param fileName string ---@param loadIconsName boolean ---@return ffi.cdata* -function M.GuiLoadIcons(fileName, loadIconsName) +function GuiLoadIcons(fileName, loadIconsName) return C.GuiLoadIcons(fileName, loadIconsName) end ---Load raygui icons file (.rgi) from memory into internal icons data ----@param fileData string|integer[] +---@param fileData string|integer[]|ffi.cdata* ---@param dataSize integer ---@param loadIconsName boolean ---@return ffi.cdata* -function M.GuiLoadIconsFromMemory(fileData, dataSize, loadIconsName) +function GuiLoadIconsFromMemory(fileData, dataSize, loadIconsName) local _a1 if type(fileData) == "string" then _a1 = ffi.cast("const unsigned char *", fileData) elseif type(fileData) == "table" then _a1 = to_array("unsigned char", fileData) @@ -12583,268 +11308,267 @@ end ---@param posX integer ---@param posY integer ---@param pixelSize integer ----@param color raylib.Color ----@return nil -function M.GuiDrawIcon(iconId, posX, posY, pixelSize, color) +---@param color Color +function GuiDrawIcon(iconId, posX, posY, pixelSize, color) C.GuiDrawIcon(iconId, posX, posY, pixelSize, color) end ---Get text width considering gui style and icon size (if required) ---@param text string ---@return integer -function M.GuiGetTextWidth(text) +function GuiGetTextWidth(text) return C.GuiGetTextWidth(text) end ---Window Box control, shows a window that can be closed ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param title string ---@return integer -function M.GuiWindowBox(bounds, title) +function GuiWindowBox(bounds, title) return C.GuiWindowBox(bounds, title) end ---Group Box control with text name ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiGroupBox(bounds, text) +function GuiGroupBox(bounds, text) return C.GuiGroupBox(bounds, text) end ---Line separator control, could contain text ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiLine(bounds, text) +function GuiLine(bounds, text) return C.GuiLine(bounds, text) end ---Panel control, useful to group controls ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiPanel(bounds, text) +function GuiPanel(bounds, text) return C.GuiPanel(bounds, text) end ---Scroll Panel control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ----@param content raylib.Rectangle +---@param content Rectangle ---@param scroll ffi.cdata* ---@param view ffi.cdata* ---@return integer -function M.GuiScrollPanel(bounds, text, content, scroll, view) +function GuiScrollPanel(bounds, text, content, scroll, view) return C.GuiScrollPanel(bounds, text, content, scroll, view) end ---Label control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiLabel(bounds, text) +function GuiLabel(bounds, text) return C.GuiLabel(bounds, text) end ---Button control, returns true when clicked ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiButton(bounds, text) +function GuiButton(bounds, text) return C.GuiButton(bounds, text) end ---Label button control, returns true when clicked ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiLabelButton(bounds, text) +function GuiLabelButton(bounds, text) return C.GuiLabelButton(bounds, text) end ---Toggle Button control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param active ffi.cdata* ---@return integer -function M.GuiToggle(bounds, text, active) +function GuiToggle(bounds, text, active) return C.GuiToggle(bounds, text, active) end ---Toggle Group control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param active ffi.cdata* ---@return integer -function M.GuiToggleGroup(bounds, text, active) +function GuiToggleGroup(bounds, text, active) return C.GuiToggleGroup(bounds, text, active) end ---Toggle Slider control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param active ffi.cdata* ---@return integer -function M.GuiToggleSlider(bounds, text, active) +function GuiToggleSlider(bounds, text, active) return C.GuiToggleSlider(bounds, text, active) end ---Check Box control, returns true when active ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param checked ffi.cdata* ---@return integer -function M.GuiCheckBox(bounds, text, checked) +function GuiCheckBox(bounds, text, checked) return C.GuiCheckBox(bounds, text, checked) end ---Combo Box control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param active ffi.cdata* ---@return integer -function M.GuiComboBox(bounds, text, active) +function GuiComboBox(bounds, text, active) return C.GuiComboBox(bounds, text, active) end ---Dropdown Box control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param active ffi.cdata* ---@param editMode boolean ---@return integer -function M.GuiDropdownBox(bounds, text, active, editMode) +function GuiDropdownBox(bounds, text, active, editMode) return C.GuiDropdownBox(bounds, text, active, editMode) end ---Spinner control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param value ffi.cdata* ---@param minValue integer ---@param maxValue integer ---@param editMode boolean ---@return integer -function M.GuiSpinner(bounds, text, value, minValue, maxValue, editMode) +function GuiSpinner(bounds, text, value, minValue, maxValue, editMode) return C.GuiSpinner(bounds, text, value, minValue, maxValue, editMode) end ---Value Box control, updates input text with numbers ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param value ffi.cdata* ---@param minValue integer ---@param maxValue integer ---@param editMode boolean ---@return integer -function M.GuiValueBox(bounds, text, value, minValue, maxValue, editMode) +function GuiValueBox(bounds, text, value, minValue, maxValue, editMode) return C.GuiValueBox(bounds, text, value, minValue, maxValue, editMode) end ---Value box control for float values ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ----@param textValue raylib.char_buffer|string +---@param textValue ffi.cdata* ---@param value ffi.cdata* ---@param editMode boolean ---@return integer -function M.GuiValueBoxFloat(bounds, text, textValue, value, editMode) +function GuiValueBoxFloat(bounds, text, textValue, value, editMode) return C.GuiValueBoxFloat(bounds, text, textValue, value, editMode) end ---Text Box control, updates input text ----@param bounds raylib.Rectangle ----@param text raylib.char_buffer|string +---@param bounds Rectangle +---@param text ffi.cdata* ---@param textSize integer ---@param editMode boolean ---@return integer -function M.GuiTextBox(bounds, text, textSize, editMode) +function GuiTextBox(bounds, text, textSize, editMode) return C.GuiTextBox(bounds, text, textSize, editMode) end ---Slider control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param textLeft string ---@param textRight string ---@param value ffi.cdata* ---@param minValue number ---@param maxValue number ---@return integer -function M.GuiSlider(bounds, textLeft, textRight, value, minValue, maxValue) +function GuiSlider(bounds, textLeft, textRight, value, minValue, maxValue) return C.GuiSlider(bounds, textLeft, textRight, value, minValue, maxValue) end ---Slider Bar control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param textLeft string ---@param textRight string ---@param value ffi.cdata* ---@param minValue number ---@param maxValue number ---@return integer -function M.GuiSliderBar(bounds, textLeft, textRight, value, minValue, maxValue) +function GuiSliderBar(bounds, textLeft, textRight, value, minValue, maxValue) return C.GuiSliderBar(bounds, textLeft, textRight, value, minValue, maxValue) end ---Progress Bar control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param textLeft string ---@param textRight string ---@param value ffi.cdata* ---@param minValue number ---@param maxValue number ---@return integer -function M.GuiProgressBar(bounds, textLeft, textRight, value, minValue, maxValue) +function GuiProgressBar(bounds, textLeft, textRight, value, minValue, maxValue) return C.GuiProgressBar(bounds, textLeft, textRight, value, minValue, maxValue) end ---Status Bar control, shows info text ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiStatusBar(bounds, text) +function GuiStatusBar(bounds, text) return C.GuiStatusBar(bounds, text) end ---Dummy control for placeholders ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@return integer -function M.GuiDummyRec(bounds, text) +function GuiDummyRec(bounds, text) return C.GuiDummyRec(bounds, text) end ---Grid control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param spacing number ---@param subdivs integer ---@param mouseCell ffi.cdata* ---@return integer -function M.GuiGrid(bounds, text, spacing, subdivs, mouseCell) +function GuiGrid(bounds, text, spacing, subdivs, mouseCell) return C.GuiGrid(bounds, text, spacing, subdivs, mouseCell) end ---List View control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param scrollIndex ffi.cdata* ---@param active ffi.cdata* ---@return integer -function M.GuiListView(bounds, text, scrollIndex, active) +function GuiListView(bounds, text, scrollIndex, active) return C.GuiListView(bounds, text, scrollIndex, active) end ---List View control, using text entries list and returning focus entry ----@param bounds raylib.Rectangle ----@param text string[]|raylib.cstring_array +---@param bounds Rectangle +---@param text string[]|ffi.cdata* ---@param count integer ---@param scrollIndex ffi.cdata* ---@param active ffi.cdata* ---@param focus ffi.cdata* ---@return integer -function M.GuiListViewEx(bounds, text, count, scrollIndex, active, focus) +function GuiListViewEx(bounds, text, count, scrollIndex, active, focus) local _a2 if type(text) == "table" then _a2 = ffi.cast("char **", to_array("const char *", text)) else _a2 = text end @@ -12852,24 +11576,24 @@ function M.GuiListViewEx(bounds, text, count, scrollIndex, active, focus) end ---Tab Bar control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param hscroll ffi.cdata* ---@param active ffi.cdata* ---@return integer -function M.GuiTabBar(bounds, text, hscroll, active) +function GuiTabBar(bounds, text, hscroll, active) return C.GuiTabBar(bounds, text, hscroll, active) end ---Tab Bar control, using text entries list and returning focus entry ----@param bounds raylib.Rectangle ----@param text string[]|raylib.cstring_array +---@param bounds Rectangle +---@param text string[]|ffi.cdata* ---@param count integer ---@param hscroll ffi.cdata* ---@param active ffi.cdata* ---@param focus ffi.cdata* ---@return integer -function M.GuiTabBarEx(bounds, text, count, hscroll, active, focus) +function GuiTabBarEx(bounds, text, count, hscroll, active, focus) local _a2 if type(text) == "table" then _a2 = ffi.cast("char **", to_array("const char *", text)) else _a2 = text end @@ -12877,82 +11601,81 @@ function M.GuiTabBarEx(bounds, text, count, hscroll, active, focus) end ---Message Box control, displays a message ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param title string ---@param message string ---@param btnText string ---@param btnActive ffi.cdata* ---@return integer -function M.GuiMessageBox(bounds, title, message, btnText, btnActive) +function GuiMessageBox(bounds, title, message, btnText, btnActive) return C.GuiMessageBox(bounds, title, message, btnText, btnActive) end ---Text Input Box control, ask for text, supports secret ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param title string ---@param message string ----@param text raylib.char_buffer|string +---@param text ffi.cdata* ---@param textSize integer ---@param btnText string ---@param btnActive ffi.cdata* ---@param secretViewActive ffi.cdata* ---@return integer -function M.GuiTextInputBox(bounds, title, message, text, textSize, btnText, btnActive, secretViewActive) +function GuiTextInputBox(bounds, title, message, text, textSize, btnText, btnActive, secretViewActive) return C.GuiTextInputBox(bounds, title, message, text, textSize, btnText, btnActive, secretViewActive) end ---Color Picker control, includes Color bar controls ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param color ffi.cdata* ---@return integer -function M.GuiColorPicker(bounds, text, color) +function GuiColorPicker(bounds, text, color) return C.GuiColorPicker(bounds, text, color) end ---Color Panel control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param color ffi.cdata* ---@return integer -function M.GuiColorPanel(bounds, text, color) +function GuiColorPanel(bounds, text, color) return C.GuiColorPanel(bounds, text, color) end ---Color Bar Alpha control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param alpha ffi.cdata* ---@return integer -function M.GuiColorBarAlpha(bounds, text, alpha) +function GuiColorBarAlpha(bounds, text, alpha) return C.GuiColorBarAlpha(bounds, text, alpha) end ---Color Bar Hue control ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param value ffi.cdata* ---@return integer -function M.GuiColorBarHue(bounds, text, value) +function GuiColorBarHue(bounds, text, value) return C.GuiColorBarHue(bounds, text, value) end ---Color Picker control, using Hue-Saturation-Value color data, includes Color bar controls ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param colorHsv ffi.cdata* ---@return integer -function M.GuiColorPickerHSV(bounds, text, colorHsv) +function GuiColorPickerHSV(bounds, text, colorHsv) return C.GuiColorPickerHSV(bounds, text, colorHsv) end ---Color Panel control, using Hue-Saturation-Value color data ----@param bounds raylib.Rectangle +---@param bounds Rectangle ---@param text string ---@param colorHsv ffi.cdata* ---@return integer -function M.GuiColorPanelHSV(bounds, text, colorHsv) +function GuiColorPanelHSV(bounds, text, colorHsv) return C.GuiColorPanelHSV(bounds, text, colorHsv) end -return M