mt-lang 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/AUTHORS +3 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +82 -0
- data/LICENSE +21 -0
- data/README.md +1208 -0
- data/Rakefile +332 -0
- data/bin/mtc +8 -0
- data/bin/profile-mtc-checks +133 -0
- data/bin/tracy-profiler +0 -0
- data/docs/build-guide.md +536 -0
- data/docs/index.html +2778 -0
- data/docs/language-design.md +1519 -0
- data/docs/language-manual.md +1534 -0
- data/lib/milk_tea/base.rb +49 -0
- data/lib/milk_tea/bindings/bindgen/ast_parser.rb +398 -0
- data/lib/milk_tea/bindings/bindgen/declaration.rb +319 -0
- data/lib/milk_tea/bindings/bindgen/emitter.rb +387 -0
- data/lib/milk_tea/bindings/bindgen/overrides.rb +134 -0
- data/lib/milk_tea/bindings/bindgen/type_mapper.rb +622 -0
- data/lib/milk_tea/bindings/bindgen.rb +207 -0
- data/lib/milk_tea/bindings/cli.rb +121 -0
- data/lib/milk_tea/bindings/imported_bindings/defaults.rb +210 -0
- data/lib/milk_tea/bindings/imported_bindings/generator.rb +1114 -0
- data/lib/milk_tea/bindings/imported_bindings/method_source.rb +190 -0
- data/lib/milk_tea/bindings/imported_bindings/naming.rb +286 -0
- data/lib/milk_tea/bindings/imported_bindings.rb +215 -0
- data/lib/milk_tea/bindings/opengl_registry.rb +547 -0
- data/lib/milk_tea/bindings/raw_bindings/defaults.rb +1338 -0
- data/lib/milk_tea/bindings/raw_bindings.rb +269 -0
- data/lib/milk_tea/bindings/steamworks.rb +629 -0
- data/lib/milk_tea/bindings/upstream_sources.rb +352 -0
- data/lib/milk_tea/bindings/vendored_box2d.rb +79 -0
- data/lib/milk_tea/bindings/vendored_c_library.rb +322 -0
- data/lib/milk_tea/bindings/vendored_cjson.rb +52 -0
- data/lib/milk_tea/bindings/vendored_flecs.rb +78 -0
- data/lib/milk_tea/bindings/vendored_glfw.rb +77 -0
- data/lib/milk_tea/bindings/vendored_libuv.rb +75 -0
- data/lib/milk_tea/bindings/vendored_pcre2.rb +84 -0
- data/lib/milk_tea/bindings/vendored_raylib.rb +131 -0
- data/lib/milk_tea/bindings/vendored_sdl3.rb +78 -0
- data/lib/milk_tea/bindings/vendored_steamworks.rb +71 -0
- data/lib/milk_tea/bindings/vendored_tool.rb +71 -0
- data/lib/milk_tea/bindings/vendored_tools.rb +23 -0
- data/lib/milk_tea/bindings/vendored_tracy.rb +37 -0
- data/lib/milk_tea/bindings.rb +23 -0
- data/lib/milk_tea/core/ast.rb +311 -0
- data/lib/milk_tea/core/async_runtime_installer.rb +28 -0
- data/lib/milk_tea/core/binding_types.rb +18 -0
- data/lib/milk_tea/core/bindings/attribute_binding.rb +58 -0
- data/lib/milk_tea/core/bindings/function_binding.rb +5 -0
- data/lib/milk_tea/core/bindings/module_binding.rb +58 -0
- data/lib/milk_tea/core/bindings/value_binding.rb +21 -0
- data/lib/milk_tea/core/c_backend/aggregate_utils.rb +103 -0
- data/lib/milk_tea/core/c_backend/control_flow_emission.rb +412 -0
- data/lib/milk_tea/core/c_backend/expressions.rb +468 -0
- data/lib/milk_tea/core/c_backend/feature_detection.rb +483 -0
- data/lib/milk_tea/core/c_backend/reachability.rb +398 -0
- data/lib/milk_tea/core/c_backend/reinterpret.rb +226 -0
- data/lib/milk_tea/core/c_backend/runtime_helpers.rb +1080 -0
- data/lib/milk_tea/core/c_backend/statements.rb +563 -0
- data/lib/milk_tea/core/c_backend/type_collectors.rb +1545 -0
- data/lib/milk_tea/core/c_backend/type_declaration.rb +223 -0
- data/lib/milk_tea/core/c_backend/type_system.rb +345 -0
- data/lib/milk_tea/core/c_backend.rb +287 -0
- data/lib/milk_tea/core/compatibility_helpers.rb +79 -0
- data/lib/milk_tea/core/compile_time/const_eval.rb +187 -0
- data/lib/milk_tea/core/compile_time.rb +329 -0
- data/lib/milk_tea/core/control_flow/builder.rb +582 -0
- data/lib/milk_tea/core/control_flow/constant_propagation.rb +143 -0
- data/lib/milk_tea/core/control_flow/dataflow.rb +74 -0
- data/lib/milk_tea/core/control_flow/definite_assignment.rb +79 -0
- data/lib/milk_tea/core/control_flow/graph.rb +90 -0
- data/lib/milk_tea/core/control_flow/liveness.rb +24 -0
- data/lib/milk_tea/core/control_flow/nullability_flow.rb +43 -0
- data/lib/milk_tea/core/control_flow/reachability.rb +22 -0
- data/lib/milk_tea/core/control_flow/termination.rb +31 -0
- data/lib/milk_tea/core/control_flow.rb +34 -0
- data/lib/milk_tea/core/cst.rb +48 -0
- data/lib/milk_tea/core/cst_builder.rb +19 -0
- data/lib/milk_tea/core/ir.rb +85 -0
- data/lib/milk_tea/core/keywords.rb +97 -0
- data/lib/milk_tea/core/lexer/character_classes.rb +60 -0
- data/lib/milk_tea/core/lexer/format_strings.rb +225 -0
- data/lib/milk_tea/core/lexer/heredocs.rb +199 -0
- data/lib/milk_tea/core/lexer/indentation.rb +62 -0
- data/lib/milk_tea/core/lexer/numbers.rb +96 -0
- data/lib/milk_tea/core/lexer/recovery.rb +32 -0
- data/lib/milk_tea/core/lexer/strings.rb +167 -0
- data/lib/milk_tea/core/lexer/symbols.rb +71 -0
- data/lib/milk_tea/core/lexer/trivia.rb +53 -0
- data/lib/milk_tea/core/lexer.rb +430 -0
- data/lib/milk_tea/core/lowering/artifacts.rb +26 -0
- data/lib/milk_tea/core/lowering/async/analysis.rb +245 -0
- data/lib/milk_tea/core/lowering/async/lowering.rb +1399 -0
- data/lib/milk_tea/core/lowering/async/normalization.rb +459 -0
- data/lib/milk_tea/core/lowering/async.rb +714 -0
- data/lib/milk_tea/core/lowering/block.rb +1052 -0
- data/lib/milk_tea/core/lowering/calls.rb +1565 -0
- data/lib/milk_tea/core/lowering/declarations.rb +214 -0
- data/lib/milk_tea/core/lowering/dyn.rb +206 -0
- data/lib/milk_tea/core/lowering/events.rb +1054 -0
- data/lib/milk_tea/core/lowering/expressions.rb +1645 -0
- data/lib/milk_tea/core/lowering/foreign_cstr.rb +206 -0
- data/lib/milk_tea/core/lowering/functions.rb +242 -0
- data/lib/milk_tea/core/lowering/loops.rb +1087 -0
- data/lib/milk_tea/core/lowering/lowering_context.rb +80 -0
- data/lib/milk_tea/core/lowering/proc.rb +419 -0
- data/lib/milk_tea/core/lowering/resolve.rb +2516 -0
- data/lib/milk_tea/core/lowering/scans.rb +220 -0
- data/lib/milk_tea/core/lowering/str_buffer.rb +125 -0
- data/lib/milk_tea/core/lowering/utils.rb +1453 -0
- data/lib/milk_tea/core/lowering.rb +378 -0
- data/lib/milk_tea/core/module_binder.rb +181 -0
- data/lib/milk_tea/core/module_loader/errors.rb +21 -0
- data/lib/milk_tea/core/module_loader.rb +479 -0
- data/lib/milk_tea/core/module_path_resolver.rb +153 -0
- data/lib/milk_tea/core/module_roots.rb +88 -0
- data/lib/milk_tea/core/parser/attributes.rb +71 -0
- data/lib/milk_tea/core/parser/blocks.rb +119 -0
- data/lib/milk_tea/core/parser/declarations.rb +749 -0
- data/lib/milk_tea/core/parser/expressions.rb +624 -0
- data/lib/milk_tea/core/parser/recovery.rb +131 -0
- data/lib/milk_tea/core/parser/statements.rb +756 -0
- data/lib/milk_tea/core/parser/types.rb +271 -0
- data/lib/milk_tea/core/parser.rb +400 -0
- data/lib/milk_tea/core/prelude_installer.rb +29 -0
- data/lib/milk_tea/core/pretty_printer/ast_formatter.rb +917 -0
- data/lib/milk_tea/core/pretty_printer/base_formatter.rb +87 -0
- data/lib/milk_tea/core/pretty_printer/ir_formatter.rb +300 -0
- data/lib/milk_tea/core/pretty_printer.rb +17 -0
- data/lib/milk_tea/core/semantic_analyzer/analysis_context.rb +314 -0
- data/lib/milk_tea/core/semantic_analyzer/attributes.rb +184 -0
- data/lib/milk_tea/core/semantic_analyzer/calls.rb +992 -0
- data/lib/milk_tea/core/semantic_analyzer/expressions.rb +1735 -0
- data/lib/milk_tea/core/semantic_analyzer/flow_refinement.rb +355 -0
- data/lib/milk_tea/core/semantic_analyzer/foreign_functions.rb +155 -0
- data/lib/milk_tea/core/semantic_analyzer/function_binding.rb +354 -0
- data/lib/milk_tea/core/semantic_analyzer/generics.rb +383 -0
- data/lib/milk_tea/core/semantic_analyzer/interface_conformance.rb +78 -0
- data/lib/milk_tea/core/semantic_analyzer/module_context.rb +35 -0
- data/lib/milk_tea/core/semantic_analyzer/name_resolution.rb +1438 -0
- data/lib/milk_tea/core/semantic_analyzer/nullability.rb +421 -0
- data/lib/milk_tea/core/semantic_analyzer/statements.rb +1308 -0
- data/lib/milk_tea/core/semantic_analyzer/top_level.rb +588 -0
- data/lib/milk_tea/core/semantic_analyzer/type_compatibility.rb +307 -0
- data/lib/milk_tea/core/semantic_analyzer/type_declaration.rb +851 -0
- data/lib/milk_tea/core/semantic_analyzer.rb +327 -0
- data/lib/milk_tea/core/token.rb +26 -0
- data/lib/milk_tea/core/token_stream.rb +30 -0
- data/lib/milk_tea/core/types/layout.rb +243 -0
- data/lib/milk_tea/core/types/predicates.rb +609 -0
- data/lib/milk_tea/core/types/registry.rb +83 -0
- data/lib/milk_tea/core/types/types.rb +1696 -0
- data/lib/milk_tea/core/types/visitor.rb +442 -0
- data/lib/milk_tea/core.rb +25 -0
- data/lib/milk_tea/dap/backends/lldb_dap.rb +158 -0
- data/lib/milk_tea/dap/protocol.rb +58 -0
- data/lib/milk_tea/dap/server/breakpoints.rb +66 -0
- data/lib/milk_tea/dap/server/debug_map.rb +291 -0
- data/lib/milk_tea/dap/server/handlers.rb +374 -0
- data/lib/milk_tea/dap/server/launch.rb +261 -0
- data/lib/milk_tea/dap/server/lldb_backend.rb +380 -0
- data/lib/milk_tea/dap/server/pause_diagnostics.rb +109 -0
- data/lib/milk_tea/dap/server/utilities.rb +160 -0
- data/lib/milk_tea/dap/server/wire.rb +55 -0
- data/lib/milk_tea/dap/server.rb +131 -0
- data/lib/milk_tea/dap/session.rb +152 -0
- data/lib/milk_tea/dap.rb +6 -0
- data/lib/milk_tea/lsp/dependency_resolution.rb +52 -0
- data/lib/milk_tea/lsp/diagnostics.rb +611 -0
- data/lib/milk_tea/lsp/protocol.rb +104 -0
- data/lib/milk_tea/lsp/server/call_hierarchy.rb +274 -0
- data/lib/milk_tea/lsp/server/code_actions.rb +446 -0
- data/lib/milk_tea/lsp/server/code_lens.rb +97 -0
- data/lib/milk_tea/lsp/server/completion.rb +1099 -0
- data/lib/milk_tea/lsp/server/configuration.rb +167 -0
- data/lib/milk_tea/lsp/server/debug_info.rb +45 -0
- data/lib/milk_tea/lsp/server/definition.rb +779 -0
- data/lib/milk_tea/lsp/server/diagnostics_scheduling.rb +239 -0
- data/lib/milk_tea/lsp/server/execute_command.rb +25 -0
- data/lib/milk_tea/lsp/server/folding_range.rb +153 -0
- data/lib/milk_tea/lsp/server/formatting.rb +575 -0
- data/lib/milk_tea/lsp/server/hover.rb +1465 -0
- data/lib/milk_tea/lsp/server/inlay_hints.rb +204 -0
- data/lib/milk_tea/lsp/server/lifecycle.rb +234 -0
- data/lib/milk_tea/lsp/server/linked_editing_range.rb +43 -0
- data/lib/milk_tea/lsp/server/on_type_formatting.rb +73 -0
- data/lib/milk_tea/lsp/server/progress.rb +47 -0
- data/lib/milk_tea/lsp/server/references.rb +433 -0
- data/lib/milk_tea/lsp/server/rename.rb +598 -0
- data/lib/milk_tea/lsp/server/selection_range.rb +130 -0
- data/lib/milk_tea/lsp/server/semantic_tokens.rb +1745 -0
- data/lib/milk_tea/lsp/server/signature_help.rb +200 -0
- data/lib/milk_tea/lsp/server/text_documents.rb +125 -0
- data/lib/milk_tea/lsp/server/type_hierarchy.rb +167 -0
- data/lib/milk_tea/lsp/server/utilities.rb +520 -0
- data/lib/milk_tea/lsp/server.rb +415 -0
- data/lib/milk_tea/lsp/workspace/analysis.rb +209 -0
- data/lib/milk_tea/lsp/workspace/caches.rb +260 -0
- data/lib/milk_tea/lsp/workspace/collection.rb +98 -0
- data/lib/milk_tea/lsp/workspace/definition_index.rb +184 -0
- data/lib/milk_tea/lsp/workspace/dependency_graph.rb +282 -0
- data/lib/milk_tea/lsp/workspace/store.rb +154 -0
- data/lib/milk_tea/lsp/workspace/utilities.rb +490 -0
- data/lib/milk_tea/lsp/workspace.rb +127 -0
- data/lib/milk_tea/lsp.rb +13 -0
- data/lib/milk_tea/packages/atomic_write.rb +63 -0
- data/lib/milk_tea/packages/dependency_solver.rb +194 -0
- data/lib/milk_tea/packages/graph.rb +139 -0
- data/lib/milk_tea/packages/lock.rb +421 -0
- data/lib/milk_tea/packages/manager_cli.rb +485 -0
- data/lib/milk_tea/packages/manifest.rb +356 -0
- data/lib/milk_tea/packages/manifest_editor.rb +134 -0
- data/lib/milk_tea/packages/registry_metadata_provider.rb +34 -0
- data/lib/milk_tea/packages/registry_store.rb +420 -0
- data/lib/milk_tea/packages/services.rb +41 -0
- data/lib/milk_tea/packages/source_cache.rb +71 -0
- data/lib/milk_tea/packages/source_fetcher.rb +124 -0
- data/lib/milk_tea/packages/source_resolver.rb +389 -0
- data/lib/milk_tea/packages/version.rb +164 -0
- data/lib/milk_tea/packages.rb +16 -0
- data/lib/milk_tea/tooling/asset_pack.rb +141 -0
- data/lib/milk_tea/tooling/build.rb +1124 -0
- data/lib/milk_tea/tooling/build_cache.rb +240 -0
- data/lib/milk_tea/tooling/cli.rb +2688 -0
- data/lib/milk_tea/tooling/cst_formatter.rb +13 -0
- data/lib/milk_tea/tooling/debug_info_formatter.rb +456 -0
- data/lib/milk_tea/tooling/debug_map.rb +248 -0
- data/lib/milk_tea/tooling/docs_app.rb +369 -0
- data/lib/milk_tea/tooling/error_formatter.rb +86 -0
- data/lib/milk_tea/tooling/formatter.rb +787 -0
- data/lib/milk_tea/tooling/linter/doc_tags.rb +212 -0
- data/lib/milk_tea/tooling/linter/fix_engine.rb +237 -0
- data/lib/milk_tea/tooling/linter/flow_rules.rb +380 -0
- data/lib/milk_tea/tooling/linter/imports_platform.rb +841 -0
- data/lib/milk_tea/tooling/linter/release_rules.rb +744 -0
- data/lib/milk_tea/tooling/linter/reserved_names.rb +199 -0
- data/lib/milk_tea/tooling/linter/rules.rb +593 -0
- data/lib/milk_tea/tooling/linter/source_helpers.rb +407 -0
- data/lib/milk_tea/tooling/linter/trailing_comma.rb +139 -0
- data/lib/milk_tea/tooling/linter/visitors.rb +1286 -0
- data/lib/milk_tea/tooling/linter.rb +798 -0
- data/lib/milk_tea/tooling/project_scaffold.rb +82 -0
- data/lib/milk_tea/tooling/public/css/docs.css +166 -0
- data/lib/milk_tea/tooling/public/js/docs.js +94 -0
- data/lib/milk_tea/tooling/run.rb +408 -0
- data/lib/milk_tea/tooling/templates/wasm_shell.html +48 -0
- data/lib/milk_tea/tooling/toolchain_cli.rb +157 -0
- data/lib/milk_tea/tooling/views/404.erb +7 -0
- data/lib/milk_tea/tooling/views/index.erb +87 -0
- data/lib/milk_tea/tooling/views/layout.erb +69 -0
- data/lib/milk_tea/tooling/views/module.erb +97 -0
- data/lib/milk_tea/tooling/views/stdlib.erb +21 -0
- data/lib/milk_tea/tooling.rb +20 -0
- data/lib/milk_tea.rb +8 -0
- metadata +426 -0
|
@@ -0,0 +1,1338 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MilkTea
|
|
4
|
+
module RawBindings
|
|
5
|
+
def self.default_bindings(root: MilkTea.root)
|
|
6
|
+
vendored_raylib = MilkTea::VendoredRaylib
|
|
7
|
+
vendored_raylib_library = vendored_raylib.library(root:)
|
|
8
|
+
vendored_sdl3 = MilkTea::VendoredSDL3
|
|
9
|
+
vendored_sdl3_library = vendored_sdl3.library(root:)
|
|
10
|
+
vendored_glfw = MilkTea::VendoredGLFW
|
|
11
|
+
vendored_glfw_library = vendored_glfw.library(root:)
|
|
12
|
+
vendored_box2d = MilkTea::VendoredBox2D
|
|
13
|
+
vendored_box2d_library = vendored_box2d.library(root:)
|
|
14
|
+
vendored_cjson = MilkTea::VendoredCJSON
|
|
15
|
+
vendored_cjson_library = vendored_cjson.library(root:)
|
|
16
|
+
vendored_flecs = MilkTea::VendoredFlecs
|
|
17
|
+
vendored_flecs_library = vendored_flecs.library(root:)
|
|
18
|
+
vendored_libuv = MilkTea::VendoredLibUV
|
|
19
|
+
vendored_libuv_library = vendored_libuv.library(root:)
|
|
20
|
+
vendored_pcre2 = MilkTea::VendoredPCRE2
|
|
21
|
+
vendored_pcre2_library = vendored_pcre2.library(root:)
|
|
22
|
+
vendored_tracy = MilkTea::VendoredTracy
|
|
23
|
+
vendored_tracy_library = vendored_tracy.library(root:)
|
|
24
|
+
|
|
25
|
+
raylib_field_type_overrides = {
|
|
26
|
+
"Mesh" => { "indices" => "ptr[ushort]?" },
|
|
27
|
+
}.freeze
|
|
28
|
+
|
|
29
|
+
libuv_fs_callback_functions = %w[
|
|
30
|
+
uv_fs_close
|
|
31
|
+
uv_fs_open
|
|
32
|
+
uv_fs_read
|
|
33
|
+
uv_fs_unlink
|
|
34
|
+
uv_fs_write
|
|
35
|
+
uv_fs_copyfile
|
|
36
|
+
uv_fs_mkdir
|
|
37
|
+
uv_fs_mkdtemp
|
|
38
|
+
uv_fs_mkstemp
|
|
39
|
+
uv_fs_rmdir
|
|
40
|
+
uv_fs_scandir
|
|
41
|
+
uv_fs_opendir
|
|
42
|
+
uv_fs_readdir
|
|
43
|
+
uv_fs_closedir
|
|
44
|
+
uv_fs_stat
|
|
45
|
+
uv_fs_fstat
|
|
46
|
+
uv_fs_rename
|
|
47
|
+
uv_fs_fsync
|
|
48
|
+
uv_fs_fdatasync
|
|
49
|
+
uv_fs_ftruncate
|
|
50
|
+
uv_fs_sendfile
|
|
51
|
+
uv_fs_access
|
|
52
|
+
uv_fs_chmod
|
|
53
|
+
uv_fs_utime
|
|
54
|
+
uv_fs_futime
|
|
55
|
+
uv_fs_lutime
|
|
56
|
+
uv_fs_lstat
|
|
57
|
+
uv_fs_link
|
|
58
|
+
uv_fs_symlink
|
|
59
|
+
uv_fs_readlink
|
|
60
|
+
uv_fs_realpath
|
|
61
|
+
uv_fs_fchmod
|
|
62
|
+
uv_fs_chown
|
|
63
|
+
uv_fs_fchown
|
|
64
|
+
uv_fs_lchown
|
|
65
|
+
uv_fs_statfs
|
|
66
|
+
].freeze
|
|
67
|
+
|
|
68
|
+
libuv_fs_param_overrides = libuv_fs_callback_functions.each_with_object({}) do |function_name, overrides|
|
|
69
|
+
overrides[function_name] = {
|
|
70
|
+
"loop" => "ptr[uv_loop_t]?",
|
|
71
|
+
"cb" => "uv_fs_cb?",
|
|
72
|
+
}
|
|
73
|
+
end.freeze
|
|
74
|
+
|
|
75
|
+
libuv_field_type_overrides = {
|
|
76
|
+
"uv_fs_s" => {
|
|
77
|
+
"loop" => "ptr[uv_loop_t]?",
|
|
78
|
+
"cb" => "uv_fs_cb?",
|
|
79
|
+
},
|
|
80
|
+
}.freeze
|
|
81
|
+
|
|
82
|
+
libuv_function_param_overrides = {
|
|
83
|
+
"uv_getaddrinfo" => {
|
|
84
|
+
"node" => "cstr?",
|
|
85
|
+
"service" => "cstr?",
|
|
86
|
+
"hints" => "const_ptr[addrinfo]?",
|
|
87
|
+
},
|
|
88
|
+
"uv_udp_send" => { "addr" => "const_ptr[sockaddr]?" },
|
|
89
|
+
"uv_udp_try_send" => { "addr" => "const_ptr[sockaddr]?" },
|
|
90
|
+
"uv_freeaddrinfo" => { "ai" => "ptr[addrinfo]?" },
|
|
91
|
+
}.merge(libuv_fs_param_overrides).freeze
|
|
92
|
+
|
|
93
|
+
libuv_function_return_overrides = {
|
|
94
|
+
"uv_default_loop" => "ptr[uv_loop_t]?",
|
|
95
|
+
"uv_loop_new" => "ptr[uv_loop_t]?",
|
|
96
|
+
"uv_handle_get_data" => "ptr[void]?",
|
|
97
|
+
"uv_req_get_data" => "ptr[void]?",
|
|
98
|
+
"uv_dlerror" => "cstr?",
|
|
99
|
+
"uv_key_get" => "ptr[void]?",
|
|
100
|
+
"uv_loop_get_data" => "ptr[void]?",
|
|
101
|
+
}.freeze
|
|
102
|
+
|
|
103
|
+
raylib_function_param_overrides = {
|
|
104
|
+
"LoadAutomationEventList" => { "fileName" => "cstr?" },
|
|
105
|
+
"LoadFontEx" => { "codepoints" => "ptr[int]?" },
|
|
106
|
+
"LoadFontFromMemory" => { "codepoints" => "ptr[int]?" },
|
|
107
|
+
"LoadFontData" => { "codepoints" => "ptr[int]?" },
|
|
108
|
+
"LoadShader" => {
|
|
109
|
+
"vsFileName" => "cstr?",
|
|
110
|
+
"fsFileName" => "cstr?",
|
|
111
|
+
},
|
|
112
|
+
"LoadShaderFromMemory" => {
|
|
113
|
+
"vsCode" => "cstr?",
|
|
114
|
+
"fsCode" => "cstr?",
|
|
115
|
+
},
|
|
116
|
+
}.freeze
|
|
117
|
+
|
|
118
|
+
raylib_function_return_overrides = {
|
|
119
|
+
"LoadRandomSequence" => "ptr[int]?",
|
|
120
|
+
"MemAlloc" => "ptr[void]?",
|
|
121
|
+
"MemRealloc" => "ptr[void]?",
|
|
122
|
+
"LoadFileData" => "ptr[ubyte]?",
|
|
123
|
+
"LoadFileText" => "ptr[char]?",
|
|
124
|
+
"CompressData" => "ptr[ubyte]?",
|
|
125
|
+
"DecompressData" => "ptr[ubyte]?",
|
|
126
|
+
"EncodeDataBase64" => "ptr[char]?",
|
|
127
|
+
"DecodeDataBase64" => "ptr[ubyte]?",
|
|
128
|
+
"ExportImageToMemory" => "ptr[ubyte]?",
|
|
129
|
+
"LoadImageColors" => "ptr[Color]?",
|
|
130
|
+
"LoadImagePalette" => "ptr[Color]?",
|
|
131
|
+
"LoadUTF8" => "ptr[char]?",
|
|
132
|
+
"LoadCodepoints" => "ptr[int]?",
|
|
133
|
+
"LoadMaterials" => "ptr[Material]?",
|
|
134
|
+
"LoadModelAnimations" => "ptr[ModelAnimation]?",
|
|
135
|
+
"LoadWaveSamples" => "ptr[float]?",
|
|
136
|
+
}.freeze
|
|
137
|
+
|
|
138
|
+
raygui_function_return_overrides = raylib_function_return_overrides.merge(
|
|
139
|
+
"GuiLoadIcons" => "ptr[ptr[char]]?",
|
|
140
|
+
).freeze
|
|
141
|
+
|
|
142
|
+
sdl3_documented_function_param_overrides = {
|
|
143
|
+
"SDL_AcquireGPUSwapchainTexture" => {
|
|
144
|
+
"swapchain_texture_width" => "ptr[uint]?",
|
|
145
|
+
"swapchain_texture_height" => "ptr[uint]?",
|
|
146
|
+
},
|
|
147
|
+
"SDL_BeginGPURenderPass" => { "depth_stencil_target_info" => "const_ptr[SDL_GPUDepthStencilTargetInfo]?" },
|
|
148
|
+
"SDL_BlitSurface" => {
|
|
149
|
+
"srcrect" => "const_ptr[SDL_Rect]?",
|
|
150
|
+
"dstrect" => "const_ptr[SDL_Rect]?",
|
|
151
|
+
},
|
|
152
|
+
"SDL_BlitSurface9Grid" => {
|
|
153
|
+
"srcrect" => "const_ptr[SDL_Rect]?",
|
|
154
|
+
"dstrect" => "const_ptr[SDL_Rect]?",
|
|
155
|
+
},
|
|
156
|
+
"SDL_BlitSurfaceScaled" => {
|
|
157
|
+
"srcrect" => "const_ptr[SDL_Rect]?",
|
|
158
|
+
"dstrect" => "const_ptr[SDL_Rect]?",
|
|
159
|
+
},
|
|
160
|
+
"SDL_BlitSurfaceTiled" => {
|
|
161
|
+
"srcrect" => "const_ptr[SDL_Rect]?",
|
|
162
|
+
"dstrect" => "const_ptr[SDL_Rect]?",
|
|
163
|
+
},
|
|
164
|
+
"SDL_BlitSurfaceTiledWithScale" => {
|
|
165
|
+
"srcrect" => "const_ptr[SDL_Rect]?",
|
|
166
|
+
"dstrect" => "const_ptr[SDL_Rect]?",
|
|
167
|
+
},
|
|
168
|
+
"SDL_ConvertSurfaceAndColorspace" => { "palette" => "ptr[SDL_Palette]?" },
|
|
169
|
+
"SDL_CreateGPUDevice" => { "name" => "cstr?" },
|
|
170
|
+
"SDL_CreateGPURenderer" => {
|
|
171
|
+
"device" => "ptr[SDL_GPUDevice]?",
|
|
172
|
+
"window" => "ptr[SDL_Window]?",
|
|
173
|
+
},
|
|
174
|
+
"SDL_CreateRenderer" => { "name" => "cstr?" },
|
|
175
|
+
"SDL_CreateWindowAndRenderer" => {
|
|
176
|
+
"window" => "ptr[ptr[SDL_Window]]?",
|
|
177
|
+
"renderer" => "ptr[ptr[SDL_Renderer]]?",
|
|
178
|
+
},
|
|
179
|
+
"SDL_EnumerateStorageDirectory" => { "path" => "cstr?" },
|
|
180
|
+
"SDL_GL_LoadLibrary" => { "path" => "cstr?" },
|
|
181
|
+
"SDL_GPUSupportsShaderFormats" => { "name" => "cstr?" },
|
|
182
|
+
"SDL_GetAudioPlaybackDevices" => { "count" => "ptr[int]?" },
|
|
183
|
+
"SDL_GetAudioRecordingDevices" => { "count" => "ptr[int]?" },
|
|
184
|
+
"SDL_GetCameraSupportedFormats" => { "count" => "ptr[int]?" },
|
|
185
|
+
"SDL_GetCameras" => { "count" => "ptr[int]?" },
|
|
186
|
+
"SDL_GetClipboardMimeTypes" => { "num_mime_types" => "ptr[ptr_uint]?" },
|
|
187
|
+
"SDL_GetDateTimeLocalePreferences" => {
|
|
188
|
+
"dateFormat" => "ptr[SDL_DateFormat]?",
|
|
189
|
+
"timeFormat" => "ptr[SDL_TimeFormat]?",
|
|
190
|
+
},
|
|
191
|
+
"SDL_GetDisplays" => { "count" => "ptr[int]?" },
|
|
192
|
+
"SDL_GetFullscreenDisplayModes" => { "count" => "ptr[int]?" },
|
|
193
|
+
"SDL_GetGamepadPowerInfo" => { "percent" => "ptr[int]?" },
|
|
194
|
+
"SDL_GetGamepadTouchpadFinger" => {
|
|
195
|
+
"down" => "ptr[bool]?",
|
|
196
|
+
"x" => "ptr[float]?",
|
|
197
|
+
"y" => "ptr[float]?",
|
|
198
|
+
"pressure" => "ptr[float]?",
|
|
199
|
+
},
|
|
200
|
+
"SDL_GetGamepads" => { "count" => "ptr[int]?" },
|
|
201
|
+
"SDL_GetHaptics" => { "count" => "ptr[int]?" },
|
|
202
|
+
"SDL_GetJoystickPowerInfo" => { "percent" => "ptr[int]?" },
|
|
203
|
+
"SDL_GetJoysticks" => { "count" => "ptr[int]?" },
|
|
204
|
+
"SDL_GetKeyboards" => { "count" => "ptr[int]?" },
|
|
205
|
+
"SDL_GetMice" => { "count" => "ptr[int]?" },
|
|
206
|
+
"SDL_GetPathInfo" => { "info" => "ptr[SDL_PathInfo]?" },
|
|
207
|
+
"SDL_GetPowerInfo" => {
|
|
208
|
+
"seconds" => "ptr[int]?",
|
|
209
|
+
"percent" => "ptr[int]?",
|
|
210
|
+
},
|
|
211
|
+
"SDL_GetPreferredLocales" => { "count" => "ptr[int]?" },
|
|
212
|
+
"SDL_GetRGB" => {
|
|
213
|
+
"palette" => "const_ptr[SDL_Palette]?",
|
|
214
|
+
"r" => "ptr[Uint8]?",
|
|
215
|
+
"g" => "ptr[Uint8]?",
|
|
216
|
+
"b" => "ptr[Uint8]?",
|
|
217
|
+
},
|
|
218
|
+
"SDL_GetRGBA" => {
|
|
219
|
+
"palette" => "const_ptr[SDL_Palette]?",
|
|
220
|
+
"r" => "ptr[Uint8]?",
|
|
221
|
+
"g" => "ptr[Uint8]?",
|
|
222
|
+
"b" => "ptr[Uint8]?",
|
|
223
|
+
"a" => "ptr[Uint8]?",
|
|
224
|
+
},
|
|
225
|
+
"SDL_GetRectEnclosingPoints" => { "clip" => "const_ptr[SDL_Rect]?" },
|
|
226
|
+
"SDL_GetRectEnclosingPointsFloat" => { "clip" => "const_ptr[SDL_FRect]?" },
|
|
227
|
+
"SDL_GetRenderLogicalPresentationRect" => { "rect" => "ptr[SDL_FRect]?" },
|
|
228
|
+
"SDL_GetRenderTextureAddressMode" => {
|
|
229
|
+
"u_mode" => "ptr[SDL_TextureAddressMode]?",
|
|
230
|
+
"v_mode" => "ptr[SDL_TextureAddressMode]?",
|
|
231
|
+
},
|
|
232
|
+
"SDL_GetScancodeFromKey" => { "modstate" => "ptr[SDL_Keymod]?" },
|
|
233
|
+
"SDL_GetSensors" => { "count" => "ptr[int]?" },
|
|
234
|
+
"SDL_GetStoragePathInfo" => { "info" => "ptr[SDL_PathInfo]?" },
|
|
235
|
+
"SDL_GetSurfaceImages" => { "count" => "ptr[int]?" },
|
|
236
|
+
"SDL_GetTextInputArea" => {
|
|
237
|
+
"rect" => "ptr[SDL_Rect]?",
|
|
238
|
+
"cursor" => "ptr[int]?",
|
|
239
|
+
},
|
|
240
|
+
"SDL_GetTouchDevices" => { "count" => "ptr[int]?" },
|
|
241
|
+
"SDL_GetWindowAspectRatio" => {
|
|
242
|
+
"min_aspect" => "ptr[float]?",
|
|
243
|
+
"max_aspect" => "ptr[float]?",
|
|
244
|
+
},
|
|
245
|
+
"SDL_GetWindowBordersSize" => {
|
|
246
|
+
"top" => "ptr[int]?",
|
|
247
|
+
"left" => "ptr[int]?",
|
|
248
|
+
"bottom" => "ptr[int]?",
|
|
249
|
+
"right" => "ptr[int]?",
|
|
250
|
+
},
|
|
251
|
+
"SDL_GetWindowMaximumSize" => {
|
|
252
|
+
"w" => "ptr[int]?",
|
|
253
|
+
"h" => "ptr[int]?",
|
|
254
|
+
},
|
|
255
|
+
"SDL_GetWindowMinimumSize" => {
|
|
256
|
+
"w" => "ptr[int]?",
|
|
257
|
+
"h" => "ptr[int]?",
|
|
258
|
+
},
|
|
259
|
+
"SDL_GetWindowPosition" => {
|
|
260
|
+
"x" => "ptr[int]?",
|
|
261
|
+
"y" => "ptr[int]?",
|
|
262
|
+
},
|
|
263
|
+
"SDL_GetWindowSize" => {
|
|
264
|
+
"w" => "ptr[int]?",
|
|
265
|
+
"h" => "ptr[int]?",
|
|
266
|
+
},
|
|
267
|
+
"SDL_GetWindowSizeInPixels" => {
|
|
268
|
+
"w" => "ptr[int]?",
|
|
269
|
+
"h" => "ptr[int]?",
|
|
270
|
+
},
|
|
271
|
+
"SDL_GetWindows" => { "count" => "ptr[int]?" },
|
|
272
|
+
"SDL_GlobStorageDirectory" => {
|
|
273
|
+
"path" => "cstr?",
|
|
274
|
+
"pattern" => "cstr?",
|
|
275
|
+
},
|
|
276
|
+
"SDL_InsertTrayEntryAt" => { "label" => "cstr?" },
|
|
277
|
+
"SDL_LoadFile_IO" => { "datasize" => "ptr[ptr_uint]?" },
|
|
278
|
+
"SDL_OpenFileStorage" => { "path" => "cstr?" },
|
|
279
|
+
"SDL_PeepEvents" => { "events" => "ptr[SDL_Event]?" },
|
|
280
|
+
"SDL_PollEvent" => { "event" => "ptr[SDL_Event]?" },
|
|
281
|
+
"SDL_ReadProcess" => {
|
|
282
|
+
"datasize" => "ptr[ptr_uint]?",
|
|
283
|
+
"exitcode" => "ptr[int]?",
|
|
284
|
+
},
|
|
285
|
+
"SDL_ReadSurfacePixel" => {
|
|
286
|
+
"r" => "ptr[ubyte]?",
|
|
287
|
+
"g" => "ptr[ubyte]?",
|
|
288
|
+
"b" => "ptr[ubyte]?",
|
|
289
|
+
"a" => "ptr[ubyte]?",
|
|
290
|
+
},
|
|
291
|
+
"SDL_ReadSurfacePixelFloat" => {
|
|
292
|
+
"r" => "ptr[float]?",
|
|
293
|
+
"g" => "ptr[float]?",
|
|
294
|
+
"b" => "ptr[float]?",
|
|
295
|
+
"a" => "ptr[float]?",
|
|
296
|
+
},
|
|
297
|
+
"SDL_RenderFillRect" => { "rect" => "const_ptr[SDL_FRect]?" },
|
|
298
|
+
"SDL_RenderGeometryRaw" => { "indices" => "const_ptr[void]?" },
|
|
299
|
+
"SDL_RenderRect" => { "rect" => "const_ptr[SDL_FRect]?" },
|
|
300
|
+
"SDL_RenderTexture9Grid" => {
|
|
301
|
+
"srcrect" => "const_ptr[SDL_FRect]?",
|
|
302
|
+
"dstrect" => "const_ptr[SDL_FRect]?",
|
|
303
|
+
},
|
|
304
|
+
"SDL_RenderTexture9GridTiled" => {
|
|
305
|
+
"srcrect" => "const_ptr[SDL_FRect]?",
|
|
306
|
+
"dstrect" => "const_ptr[SDL_FRect]?",
|
|
307
|
+
},
|
|
308
|
+
"SDL_RenderTextureAffine" => {
|
|
309
|
+
"origin" => "const_ptr[SDL_FPoint]?",
|
|
310
|
+
"right" => "const_ptr[SDL_FPoint]?",
|
|
311
|
+
"down" => "const_ptr[SDL_FPoint]?",
|
|
312
|
+
},
|
|
313
|
+
"SDL_RenderTextureRotated" => {
|
|
314
|
+
"dstrect" => "const_ptr[SDL_FRect]?",
|
|
315
|
+
"center" => "const_ptr[SDL_FPoint]?",
|
|
316
|
+
},
|
|
317
|
+
"SDL_RenderTextureTiled" => {
|
|
318
|
+
"srcrect" => "const_ptr[SDL_FRect]?",
|
|
319
|
+
"dstrect" => "const_ptr[SDL_FRect]?",
|
|
320
|
+
},
|
|
321
|
+
"SDL_RunApp" => { "argv" => "ptr[ptr[char]]?" },
|
|
322
|
+
"SDL_SaveFile" => { "data" => "const_ptr[void]?" },
|
|
323
|
+
"SDL_SaveFile_IO" => { "data" => "const_ptr[void]?" },
|
|
324
|
+
"SDL_SetAppMetadataProperty" => { "value" => "cstr?" },
|
|
325
|
+
"SDL_SetAssertionHandler" => { "handler" => "SDL_AssertionHandler?" },
|
|
326
|
+
"SDL_SetGPURenderState" => { "state" => "ptr[SDL_GPURenderState]?" },
|
|
327
|
+
"SDL_SetGamepadMapping" => { "mapping" => "cstr?" },
|
|
328
|
+
"SDL_SetLogPriorityPrefix" => { "prefix" => "cstr?" },
|
|
329
|
+
"SDL_SetPointerProperty" => { "value" => "ptr[void]?" },
|
|
330
|
+
"SDL_SetPointerPropertyWithCleanup" => { "value" => "ptr[void]?" },
|
|
331
|
+
"SDL_SetRelativeMouseTransform" => { "callback" => "SDL_MouseMotionTransformCallback?" },
|
|
332
|
+
"SDL_SetStringProperty" => { "value" => "cstr?" },
|
|
333
|
+
"SDL_SetSurfaceClipRect" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
334
|
+
"SDL_SetTextInputArea" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
335
|
+
"SDL_SetWindowMouseRect" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
336
|
+
"SDL_SetWindowShape" => { "shape" => "ptr[SDL_Surface]?" },
|
|
337
|
+
"SDL_ShowOpenFileDialog" => {
|
|
338
|
+
"window" => "ptr[SDL_Window]?",
|
|
339
|
+
"filters" => "const_ptr[SDL_DialogFileFilter]?",
|
|
340
|
+
"default_location" => "cstr?",
|
|
341
|
+
},
|
|
342
|
+
"SDL_ShowOpenFolderDialog" => {
|
|
343
|
+
"window" => "ptr[SDL_Window]?",
|
|
344
|
+
"default_location" => "cstr?",
|
|
345
|
+
},
|
|
346
|
+
"SDL_ShowSaveFileDialog" => {
|
|
347
|
+
"window" => "ptr[SDL_Window]?",
|
|
348
|
+
"filters" => "const_ptr[SDL_DialogFileFilter]?",
|
|
349
|
+
"default_location" => "cstr?",
|
|
350
|
+
},
|
|
351
|
+
"SDL_ShowSimpleMessageBox" => { "window" => "ptr[SDL_Window]?" },
|
|
352
|
+
"SDL_StretchSurface" => {
|
|
353
|
+
"srcrect" => "const_ptr[SDL_Rect]?",
|
|
354
|
+
"dstrect" => "const_ptr[SDL_Rect]?",
|
|
355
|
+
},
|
|
356
|
+
"SDL_UpdateNVTexture" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
357
|
+
"SDL_UpdateYUVTexture" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
358
|
+
"SDL_WaitAndAcquireGPUSwapchainTexture" => {
|
|
359
|
+
"swapchain_texture_width" => "ptr[uint]?",
|
|
360
|
+
"swapchain_texture_height" => "ptr[uint]?",
|
|
361
|
+
},
|
|
362
|
+
"SDL_WaitEvent" => { "event" => "ptr[SDL_Event]?" },
|
|
363
|
+
"SDL_WaitEventTimeout" => { "event" => "ptr[SDL_Event]?" },
|
|
364
|
+
"SDL_WaitProcess" => { "exitcode" => "ptr[int]?" },
|
|
365
|
+
"SDL_WaitThread" => { "status" => "ptr[int]?" },
|
|
366
|
+
"SDL_WarpMouseInWindow" => { "window" => "ptr[SDL_Window]?" },
|
|
367
|
+
"SDL_aligned_free" => { "mem" => "ptr[void]?" },
|
|
368
|
+
"SDL_free" => { "mem" => "ptr[void]?" },
|
|
369
|
+
"SDL_realloc" => { "mem" => "ptr[void]?" },
|
|
370
|
+
"SDL_strtok_r" => { "str" => "ptr[char]?" },
|
|
371
|
+
}.freeze
|
|
372
|
+
|
|
373
|
+
sdl3_function_param_overrides = {
|
|
374
|
+
"SDL_RunApp" => { "reserved" => "ptr[void]?" },
|
|
375
|
+
"SDL_OpenAudioDevice" => { "spec" => "const_ptr[SDL_AudioSpec]?" },
|
|
376
|
+
"SDL_CreateAudioStream" => { "dst_spec" => "const_ptr[SDL_AudioSpec]?" },
|
|
377
|
+
"SDL_OpenAudioDeviceStream" => { "userdata" => "ptr[void]?" },
|
|
378
|
+
"SDL_PutAudioStreamPlanarData" => { "channel_buffers" => "const_ptr[const_ptr[void]?]" },
|
|
379
|
+
"SDL_StepUTF8" => { "pslen" => "ptr[ptr_uint]?" },
|
|
380
|
+
"SDL_MapRGB" => { "palette" => "const_ptr[SDL_Palette]?" },
|
|
381
|
+
"SDL_MapRGBA" => { "palette" => "const_ptr[SDL_Palette]?" },
|
|
382
|
+
"SDL_FillSurfaceRect" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
383
|
+
"SDL_UpdateTexture" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
384
|
+
"SDL_LockTextureToSurface" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
385
|
+
"SDL_SetRenderViewport" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
386
|
+
"SDL_SetRenderClipRect" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
387
|
+
"SDL_OpenCamera" => { "spec" => "const_ptr[SDL_CameraSpec]?" },
|
|
388
|
+
"SDL_SetRenderTarget" => { "texture" => "ptr[SDL_Texture]?" },
|
|
389
|
+
"SDL_RenderTexture" => {
|
|
390
|
+
"srcrect" => "const_ptr[SDL_FRect]?",
|
|
391
|
+
"dstrect" => "const_ptr[SDL_FRect]?",
|
|
392
|
+
},
|
|
393
|
+
"SDL_RenderTextureRotated" => { "srcrect" => "const_ptr[SDL_FRect]?" },
|
|
394
|
+
"SDL_RenderTextureAffine" => { "srcrect" => "const_ptr[SDL_FRect]?" },
|
|
395
|
+
"SDL_RenderGeometry" => {
|
|
396
|
+
"texture" => "ptr[SDL_Texture]?",
|
|
397
|
+
"indices" => "const_ptr[int]?",
|
|
398
|
+
},
|
|
399
|
+
"SDL_RenderReadPixels" => { "rect" => "const_ptr[SDL_Rect]?" },
|
|
400
|
+
}.merge(sdl3_documented_function_param_overrides) { |_function_name, current, documented| current.merge(documented) }.freeze
|
|
401
|
+
|
|
402
|
+
sdl3_documented_function_return_overrides = {
|
|
403
|
+
"SDL_AcquireGPUCommandBuffer" => "ptr[SDL_GPUCommandBuffer]?",
|
|
404
|
+
"SDL_AsyncIOFromFile" => "ptr[SDL_AsyncIO]?",
|
|
405
|
+
"SDL_ConvertSurfaceAndColorspace" => "ptr[SDL_Surface]?",
|
|
406
|
+
"SDL_CreateAsyncIOQueue" => "ptr[SDL_AsyncIOQueue]?",
|
|
407
|
+
"SDL_CreateColorCursor" => "ptr[SDL_Cursor]?",
|
|
408
|
+
"SDL_CreateCondition" => "ptr[SDL_Condition]?",
|
|
409
|
+
"SDL_CreateCursor" => "ptr[SDL_Cursor]?",
|
|
410
|
+
"SDL_CreateEnvironment" => "ptr[SDL_Environment]?",
|
|
411
|
+
"SDL_CreateGPUBuffer" => "ptr[SDL_GPUBuffer]?",
|
|
412
|
+
"SDL_CreateGPUComputePipeline" => "ptr[SDL_GPUComputePipeline]?",
|
|
413
|
+
"SDL_CreateGPUDevice" => "ptr[SDL_GPUDevice]?",
|
|
414
|
+
"SDL_CreateGPUDeviceWithProperties" => "ptr[SDL_GPUDevice]?",
|
|
415
|
+
"SDL_CreateGPUGraphicsPipeline" => "ptr[SDL_GPUGraphicsPipeline]?",
|
|
416
|
+
"SDL_CreateGPURenderState" => "ptr[SDL_GPURenderState]?",
|
|
417
|
+
"SDL_CreateGPURenderer" => "ptr[SDL_Renderer]?",
|
|
418
|
+
"SDL_CreateGPUSampler" => "ptr[SDL_GPUSampler]?",
|
|
419
|
+
"SDL_CreateGPUShader" => "ptr[SDL_GPUShader]?",
|
|
420
|
+
"SDL_CreateGPUTexture" => "ptr[SDL_GPUTexture]?",
|
|
421
|
+
"SDL_CreateGPUTransferBuffer" => "ptr[SDL_GPUTransferBuffer]?",
|
|
422
|
+
"SDL_CreateMutex" => "ptr[SDL_Mutex]?",
|
|
423
|
+
"SDL_CreatePalette" => "ptr[SDL_Palette]?",
|
|
424
|
+
"SDL_CreatePopupWindow" => "ptr[SDL_Window]?",
|
|
425
|
+
"SDL_CreateProcess" => "ptr[SDL_Process]?",
|
|
426
|
+
"SDL_CreateProcessWithProperties" => "ptr[SDL_Process]?",
|
|
427
|
+
"SDL_CreateRWLock" => "ptr[SDL_RWLock]?",
|
|
428
|
+
"SDL_CreateRenderer" => "ptr[SDL_Renderer]?",
|
|
429
|
+
"SDL_CreateRendererWithProperties" => "ptr[SDL_Renderer]?",
|
|
430
|
+
"SDL_CreateSemaphore" => "ptr[SDL_Semaphore]?",
|
|
431
|
+
"SDL_CreateSoftwareRenderer" => "ptr[SDL_Renderer]?",
|
|
432
|
+
"SDL_CreateSurface" => "ptr[SDL_Surface]?",
|
|
433
|
+
"SDL_CreateSurfaceFrom" => "ptr[SDL_Surface]?",
|
|
434
|
+
"SDL_CreateSurfacePalette" => "ptr[SDL_Palette]?",
|
|
435
|
+
"SDL_CreateSystemCursor" => "ptr[SDL_Cursor]?",
|
|
436
|
+
"SDL_CreateTextureWithProperties" => "ptr[SDL_Texture]?",
|
|
437
|
+
"SDL_CreateThreadRuntime" => "ptr[SDL_Thread]?",
|
|
438
|
+
"SDL_CreateThreadWithPropertiesRuntime" => "ptr[SDL_Thread]?",
|
|
439
|
+
"SDL_CreateWindow" => "ptr[SDL_Window]?",
|
|
440
|
+
"SDL_CreateWindowWithProperties" => "ptr[SDL_Window]?",
|
|
441
|
+
"SDL_DuplicateSurface" => "ptr[SDL_Surface]?",
|
|
442
|
+
"SDL_EGL_GetCurrentConfig" => "SDL_EGLConfig?",
|
|
443
|
+
"SDL_EGL_GetCurrentDisplay" => "SDL_EGLDisplay?",
|
|
444
|
+
"SDL_EGL_GetWindowSurface" => "SDL_EGLSurface?",
|
|
445
|
+
"SDL_GL_CreateContext" => "SDL_GLContext?",
|
|
446
|
+
"SDL_GetAssertionReport" => "const_ptr[SDL_AssertData]?",
|
|
447
|
+
"SDL_GetAudioDeviceName" => "cstr?",
|
|
448
|
+
"SDL_GetAudioDriver" => "cstr?",
|
|
449
|
+
"SDL_GetAudioPlaybackDevices" => "ptr[SDL_AudioDeviceID]?",
|
|
450
|
+
"SDL_GetAudioRecordingDevices" => "ptr[SDL_AudioDeviceID]?",
|
|
451
|
+
"SDL_GetCameraDriver" => "cstr?",
|
|
452
|
+
"SDL_GetCameraName" => "cstr?",
|
|
453
|
+
"SDL_GetCameraSupportedFormats" => "ptr[ptr[SDL_CameraSpec]]?",
|
|
454
|
+
"SDL_GetClipboardData" => "ptr[void]?",
|
|
455
|
+
"SDL_GetClipboardMimeTypes" => "ptr[ptr[char]]?",
|
|
456
|
+
"SDL_GetCurrentAudioDriver" => "cstr?",
|
|
457
|
+
"SDL_GetCurrentCameraDriver" => "cstr?",
|
|
458
|
+
"SDL_GetCurrentVideoDriver" => "cstr?",
|
|
459
|
+
"SDL_GetCursor" => "ptr[SDL_Cursor]?",
|
|
460
|
+
"SDL_GetDefaultCursor" => "ptr[SDL_Cursor]?",
|
|
461
|
+
"SDL_GetEnvironment" => "ptr[SDL_Environment]?",
|
|
462
|
+
"SDL_GetEnvironmentVariable" => "cstr?",
|
|
463
|
+
"SDL_GetEnvironmentVariables" => "ptr[ptr[char]]?",
|
|
464
|
+
"SDL_GetGPUDeviceDriver" => "cstr?",
|
|
465
|
+
"SDL_GetGPURendererDevice" => "ptr[SDL_GPUDevice]?",
|
|
466
|
+
"SDL_GetGamepadAppleSFSymbolsNameForAxis" => "cstr?",
|
|
467
|
+
"SDL_GetGamepadAppleSFSymbolsNameForButton" => "cstr?",
|
|
468
|
+
"SDL_GetGamepadBindings" => "ptr[ptr[SDL_GamepadBinding]]?",
|
|
469
|
+
"SDL_GetGamepadJoystick" => "ptr[SDL_Joystick]?",
|
|
470
|
+
"SDL_GetGamepadSerial" => "cstr?",
|
|
471
|
+
"SDL_GetGamepadStringForAxis" => "cstr?",
|
|
472
|
+
"SDL_GetGamepadStringForButton" => "cstr?",
|
|
473
|
+
"SDL_GetGamepadStringForType" => "cstr?",
|
|
474
|
+
"SDL_GetGrabbedWindow" => "ptr[SDL_Window]?",
|
|
475
|
+
"SDL_GetHapticFromID" => "ptr[SDL_Haptic]?",
|
|
476
|
+
"SDL_GetHapticName" => "cstr?",
|
|
477
|
+
"SDL_GetHapticNameForID" => "cstr?",
|
|
478
|
+
"SDL_GetHaptics" => "ptr[SDL_HapticID]?",
|
|
479
|
+
"SDL_GetHint" => "cstr?",
|
|
480
|
+
"SDL_GetPixelFormatDetails" => "const_ptr[SDL_PixelFormatDetails]?",
|
|
481
|
+
"SDL_GetProcessInput" => "ptr[SDL_IOStream]?",
|
|
482
|
+
"SDL_GetProcessOutput" => "ptr[SDL_IOStream]?",
|
|
483
|
+
"SDL_GetRenderDriver" => "cstr?",
|
|
484
|
+
"SDL_GetRenderMetalCommandEncoder" => "ptr[void]?",
|
|
485
|
+
"SDL_GetRenderMetalLayer" => "ptr[void]?",
|
|
486
|
+
"SDL_GetRenderTarget" => "ptr[SDL_Texture]?",
|
|
487
|
+
"SDL_GetRenderWindow" => "ptr[SDL_Window]?",
|
|
488
|
+
"SDL_GetRenderer" => "ptr[SDL_Renderer]?",
|
|
489
|
+
"SDL_GetRendererFromTexture" => "ptr[SDL_Renderer]?",
|
|
490
|
+
"SDL_GetRendererName" => "cstr?",
|
|
491
|
+
"SDL_GetSurfaceImages" => "ptr[ptr[SDL_Surface]]?",
|
|
492
|
+
"SDL_GetSurfacePalette" => "ptr[SDL_Palette]?",
|
|
493
|
+
"SDL_GetTLS" => "ptr[void]?",
|
|
494
|
+
"SDL_GetTexturePalette" => "ptr[SDL_Palette]?",
|
|
495
|
+
"SDL_GetTrayEntries" => "ptr[const_ptr[SDL_TrayEntry]]?",
|
|
496
|
+
"SDL_GetTrayMenuParentEntry" => "ptr[SDL_TrayEntry]?",
|
|
497
|
+
"SDL_GetTrayMenuParentTray" => "ptr[SDL_Tray]?",
|
|
498
|
+
"SDL_GetVideoDriver" => "cstr?",
|
|
499
|
+
"SDL_GetWindowFromEvent" => "ptr[SDL_Window]?",
|
|
500
|
+
"SDL_GetWindowFromID" => "ptr[SDL_Window]?",
|
|
501
|
+
"SDL_GetWindowFullscreenMode" => "const_ptr[SDL_DisplayMode]?",
|
|
502
|
+
"SDL_GetWindowMouseRect" => "const_ptr[SDL_Rect]?",
|
|
503
|
+
"SDL_GetWindowParent" => "ptr[SDL_Window]?",
|
|
504
|
+
"SDL_GetWindowSurface" => "ptr[SDL_Surface]?",
|
|
505
|
+
"SDL_GlobDirectory" => "ptr[ptr[char]]?",
|
|
506
|
+
"SDL_GlobStorageDirectory" => "ptr[ptr[char]]?",
|
|
507
|
+
"SDL_IOFromConstMem" => "ptr[SDL_IOStream]?",
|
|
508
|
+
"SDL_IOFromDynamicMem" => "ptr[SDL_IOStream]?",
|
|
509
|
+
"SDL_IOFromFile" => "ptr[SDL_IOStream]?",
|
|
510
|
+
"SDL_IOFromMem" => "ptr[SDL_IOStream]?",
|
|
511
|
+
"SDL_InsertTrayEntryAt" => "ptr[SDL_TrayEntry]?",
|
|
512
|
+
"SDL_LoadBMP" => "ptr[SDL_Surface]?",
|
|
513
|
+
"SDL_LoadBMP_IO" => "ptr[SDL_Surface]?",
|
|
514
|
+
"SDL_LoadFile_IO" => "ptr[void]?",
|
|
515
|
+
"SDL_LoadPNG_IO" => "ptr[SDL_Surface]?",
|
|
516
|
+
"SDL_LoadSurface" => "ptr[SDL_Surface]?",
|
|
517
|
+
"SDL_LoadSurface_IO" => "ptr[SDL_Surface]?",
|
|
518
|
+
"SDL_MapGPUTransferBuffer" => "ptr[void]?",
|
|
519
|
+
"SDL_malloc" => "ptr[void]?",
|
|
520
|
+
"SDL_OpenFileStorage" => "ptr[SDL_Storage]?",
|
|
521
|
+
"SDL_OpenHaptic" => "ptr[SDL_Haptic]?",
|
|
522
|
+
"SDL_OpenHapticFromJoystick" => "ptr[SDL_Haptic]?",
|
|
523
|
+
"SDL_OpenHapticFromMouse" => "ptr[SDL_Haptic]?",
|
|
524
|
+
"SDL_OpenIO" => "ptr[SDL_IOStream]?",
|
|
525
|
+
"SDL_OpenStorage" => "ptr[SDL_Storage]?",
|
|
526
|
+
"SDL_OpenTitleStorage" => "ptr[SDL_Storage]?",
|
|
527
|
+
"SDL_OpenUserStorage" => "ptr[SDL_Storage]?",
|
|
528
|
+
"SDL_ReadProcess" => "ptr[void]?",
|
|
529
|
+
"SDL_RotateSurface" => "ptr[SDL_Surface]?",
|
|
530
|
+
"SDL_ScaleSurface" => "ptr[SDL_Surface]?",
|
|
531
|
+
"SDL_SubmitGPUCommandBufferAndAcquireFence" => "ptr[SDL_GPUFence]?",
|
|
532
|
+
"SDL_aligned_alloc" => "ptr[void]?",
|
|
533
|
+
"SDL_bsearch" => "ptr[void]?",
|
|
534
|
+
"SDL_bsearch_r" => "ptr[void]?",
|
|
535
|
+
"SDL_calloc" => "ptr[void]?",
|
|
536
|
+
"SDL_getenv" => "cstr?",
|
|
537
|
+
"SDL_getenv_unsafe" => "cstr?",
|
|
538
|
+
"SDL_hid_get_device_info" => "ptr[SDL_hid_device_info]?",
|
|
539
|
+
"SDL_hid_open" => "ptr[SDL_hid_device]?",
|
|
540
|
+
"SDL_hid_open_path" => "ptr[SDL_hid_device]?",
|
|
541
|
+
"SDL_iconv_string" => "ptr[char]?",
|
|
542
|
+
"SDL_realloc" => "ptr[void]?",
|
|
543
|
+
"SDL_strcasestr" => "ptr[char]?",
|
|
544
|
+
"SDL_strnstr" => "ptr[char]?",
|
|
545
|
+
"SDL_strrchr" => "ptr[char]?",
|
|
546
|
+
"SDL_strstr" => "ptr[char]?",
|
|
547
|
+
"SDL_strtok_r" => "ptr[char]?",
|
|
548
|
+
"SDL_wcsnstr" => "ptr[int]?",
|
|
549
|
+
"SDL_wcsstr" => "ptr[int]?",
|
|
550
|
+
}.freeze
|
|
551
|
+
|
|
552
|
+
sdl3_function_return_overrides = {
|
|
553
|
+
"SDL_LoadPNG" => "ptr[SDL_Surface]?",
|
|
554
|
+
"SDL_ConvertSurface" => "ptr[SDL_Surface]?",
|
|
555
|
+
"SDL_CreateTexture" => "ptr[SDL_Texture]?",
|
|
556
|
+
"SDL_CreateTextureFromSurface" => "ptr[SDL_Texture]?",
|
|
557
|
+
"SDL_CreateAudioStream" => "ptr[SDL_AudioStream]?",
|
|
558
|
+
"SDL_GL_GetProcAddress" => "SDL_FunctionPointer?",
|
|
559
|
+
"SDL_EGL_GetProcAddress" => "SDL_FunctionPointer?",
|
|
560
|
+
"SDL_strdup" => "ptr[char]?",
|
|
561
|
+
"SDL_LoadFile" => "ptr[void]?",
|
|
562
|
+
"SDL_strchr" => "ptr[char]?",
|
|
563
|
+
"SDL_GetClipboardText" => "ptr[char]?",
|
|
564
|
+
"SDL_GetPrimarySelectionText" => "ptr[char]?",
|
|
565
|
+
"SDL_GetPreferredLocales" => "ptr[ptr[SDL_Locale]]?",
|
|
566
|
+
"SDL_GetBasePath" => "cstr?",
|
|
567
|
+
"SDL_GetDisplays" => "ptr[SDL_DisplayID]?",
|
|
568
|
+
"SDL_GetDisplayName" => "cstr?",
|
|
569
|
+
"SDL_GetFullscreenDisplayModes" => "ptr[ptr[SDL_DisplayMode]]?",
|
|
570
|
+
"SDL_GetDesktopDisplayMode" => "const_ptr[SDL_DisplayMode]?",
|
|
571
|
+
"SDL_GetCurrentDisplayMode" => "const_ptr[SDL_DisplayMode]?",
|
|
572
|
+
"SDL_GetWindowICCProfile" => "ptr[void]?",
|
|
573
|
+
"SDL_GetWindows" => "ptr[ptr[SDL_Window]]?",
|
|
574
|
+
"SDL_LoadObject" => "ptr[SDL_SharedObject]?",
|
|
575
|
+
"SDL_LoadFunction" => "SDL_FunctionPointer?",
|
|
576
|
+
"SDL_GL_GetCurrentWindow" => "ptr[SDL_Window]?",
|
|
577
|
+
"SDL_GL_GetCurrentContext" => "SDL_GLContext?",
|
|
578
|
+
"SDL_OpenAudioDeviceStream" => "ptr[SDL_AudioStream]?",
|
|
579
|
+
"SDL_GetKeyboards" => "ptr[SDL_KeyboardID]?",
|
|
580
|
+
"SDL_GetKeyboardNameForID" => "cstr?",
|
|
581
|
+
"SDL_GetMice" => "ptr[SDL_MouseID]?",
|
|
582
|
+
"SDL_GetMouseNameForID" => "cstr?",
|
|
583
|
+
"SDL_GetTouchDevices" => "ptr[SDL_TouchID]?",
|
|
584
|
+
"SDL_GetTouchDeviceName" => "cstr?",
|
|
585
|
+
"SDL_GetTouchFingers" => "ptr[ptr[SDL_Finger]]?",
|
|
586
|
+
"SDL_GetSensors" => "ptr[SDL_SensorID]?",
|
|
587
|
+
"SDL_GetSensorNameForID" => "cstr?",
|
|
588
|
+
"SDL_OpenSensor" => "ptr[SDL_Sensor]?",
|
|
589
|
+
"SDL_GetSensorFromID" => "ptr[SDL_Sensor]?",
|
|
590
|
+
"SDL_GetSensorName" => "cstr?",
|
|
591
|
+
"SDL_GetCameras" => "ptr[SDL_CameraID]?",
|
|
592
|
+
"SDL_OpenCamera" => "ptr[SDL_Camera]?",
|
|
593
|
+
"SDL_AcquireCameraFrame" => "ptr[SDL_Surface]?",
|
|
594
|
+
"SDL_GetJoysticks" => "ptr[SDL_JoystickID]?",
|
|
595
|
+
"SDL_OpenJoystick" => "ptr[SDL_Joystick]?",
|
|
596
|
+
"SDL_GetJoystickFromID" => "ptr[SDL_Joystick]?",
|
|
597
|
+
"SDL_GetJoystickNameForID" => "cstr?",
|
|
598
|
+
"SDL_GetJoystickName" => "cstr?",
|
|
599
|
+
"SDL_GetJoystickPathForID" => "cstr?",
|
|
600
|
+
"SDL_GetJoystickFromPlayerIndex" => "ptr[SDL_Joystick]?",
|
|
601
|
+
"SDL_GetJoystickPath" => "cstr?",
|
|
602
|
+
"SDL_GetJoystickSerial" => "cstr?",
|
|
603
|
+
"SDL_GetGamepadMappings" => "ptr[ptr[char]]?",
|
|
604
|
+
"SDL_GetGamepads" => "ptr[SDL_JoystickID]?",
|
|
605
|
+
"SDL_OpenGamepad" => "ptr[SDL_Gamepad]?",
|
|
606
|
+
"SDL_GetGamepadFromID" => "ptr[SDL_Gamepad]?",
|
|
607
|
+
"SDL_GetGamepadNameForID" => "cstr?",
|
|
608
|
+
"SDL_GetGamepadName" => "cstr?",
|
|
609
|
+
"SDL_GetGamepadPathForID" => "cstr?",
|
|
610
|
+
"SDL_GetGamepadPath" => "cstr?",
|
|
611
|
+
"SDL_GetGamepadMapping" => "ptr[char]?",
|
|
612
|
+
"SDL_GetGamepadMappingForGUID" => "ptr[char]?",
|
|
613
|
+
"SDL_GetGamepadMappingForID" => "ptr[char]?",
|
|
614
|
+
"SDL_RenderReadPixels" => "ptr[SDL_Surface]?",
|
|
615
|
+
}.merge(sdl3_documented_function_return_overrides).freeze
|
|
616
|
+
|
|
617
|
+
glfw_function_param_overrides = {
|
|
618
|
+
"glfwGetError" => { "description" => "ptr[cstr]?" },
|
|
619
|
+
"glfwSetErrorCallback" => { "callback" => "GLFWerrorfun?" },
|
|
620
|
+
"glfwSetMonitorCallback" => { "callback" => "GLFWmonitorfun?" },
|
|
621
|
+
"glfwCreateWindow" => {
|
|
622
|
+
"monitor" => "ptr[GLFWmonitor]?",
|
|
623
|
+
"share" => "ptr[GLFWwindow]?",
|
|
624
|
+
},
|
|
625
|
+
"glfwSetWindowPosCallback" => { "callback" => "GLFWwindowposfun?" },
|
|
626
|
+
"glfwSetWindowSizeCallback" => { "callback" => "GLFWwindowsizefun?" },
|
|
627
|
+
"glfwSetWindowCloseCallback" => { "callback" => "GLFWwindowclosefun?" },
|
|
628
|
+
"glfwSetWindowRefreshCallback" => { "callback" => "GLFWwindowrefreshfun?" },
|
|
629
|
+
"glfwSetWindowFocusCallback" => { "callback" => "GLFWwindowfocusfun?" },
|
|
630
|
+
"glfwSetWindowIconifyCallback" => { "callback" => "GLFWwindowiconifyfun?" },
|
|
631
|
+
"glfwSetWindowMaximizeCallback" => { "callback" => "GLFWwindowmaximizefun?" },
|
|
632
|
+
"glfwSetFramebufferSizeCallback" => { "callback" => "GLFWframebuffersizefun?" },
|
|
633
|
+
"glfwSetWindowContentScaleCallback" => { "callback" => "GLFWwindowcontentscalefun?" },
|
|
634
|
+
"glfwGetCursorPos" => {
|
|
635
|
+
"xpos" => "ptr[double]?",
|
|
636
|
+
"ypos" => "ptr[double]?",
|
|
637
|
+
},
|
|
638
|
+
"glfwSetCursor" => { "cursor" => "ptr[GLFWcursor]?" },
|
|
639
|
+
"glfwSetKeyCallback" => { "callback" => "GLFWkeyfun?" },
|
|
640
|
+
"glfwSetCharCallback" => { "callback" => "GLFWcharfun?" },
|
|
641
|
+
"glfwSetCharModsCallback" => { "callback" => "GLFWcharmodsfun?" },
|
|
642
|
+
"glfwSetMouseButtonCallback" => { "callback" => "GLFWmousebuttonfun?" },
|
|
643
|
+
"glfwSetCursorPosCallback" => { "callback" => "GLFWcursorposfun?" },
|
|
644
|
+
"glfwSetCursorEnterCallback" => { "callback" => "GLFWcursorenterfun?" },
|
|
645
|
+
"glfwSetScrollCallback" => { "callback" => "GLFWscrollfun?" },
|
|
646
|
+
"glfwSetDropCallback" => { "callback" => "GLFWdropfun?" },
|
|
647
|
+
"glfwSetJoystickCallback" => { "callback" => "GLFWjoystickfun?" },
|
|
648
|
+
"glfwMakeContextCurrent" => { "window" => "ptr[GLFWwindow]?" },
|
|
649
|
+
}.freeze
|
|
650
|
+
|
|
651
|
+
glfw_function_return_overrides = {
|
|
652
|
+
"glfwSetErrorCallback" => "GLFWerrorfun?",
|
|
653
|
+
"glfwGetMonitors" => "ptr[ptr[GLFWmonitor]]?",
|
|
654
|
+
"glfwGetPrimaryMonitor" => "ptr[GLFWmonitor]?",
|
|
655
|
+
"glfwGetMonitorName" => "cstr?",
|
|
656
|
+
"glfwGetMonitorUserPointer" => "ptr[void]?",
|
|
657
|
+
"glfwSetMonitorCallback" => "GLFWmonitorfun?",
|
|
658
|
+
"glfwGetVideoModes" => "const_ptr[GLFWvidmode]?",
|
|
659
|
+
"glfwGetVideoMode" => "const_ptr[GLFWvidmode]?",
|
|
660
|
+
"glfwGetGammaRamp" => "const_ptr[GLFWgammaramp]?",
|
|
661
|
+
"glfwCreateWindow" => "ptr[GLFWwindow]?",
|
|
662
|
+
"glfwGetWindowTitle" => "cstr?",
|
|
663
|
+
"glfwGetWindowMonitor" => "ptr[GLFWmonitor]?",
|
|
664
|
+
"glfwGetWindowUserPointer" => "ptr[void]?",
|
|
665
|
+
"glfwSetWindowPosCallback" => "GLFWwindowposfun?",
|
|
666
|
+
"glfwSetWindowSizeCallback" => "GLFWwindowsizefun?",
|
|
667
|
+
"glfwSetWindowCloseCallback" => "GLFWwindowclosefun?",
|
|
668
|
+
"glfwSetWindowRefreshCallback" => "GLFWwindowrefreshfun?",
|
|
669
|
+
"glfwSetWindowFocusCallback" => "GLFWwindowfocusfun?",
|
|
670
|
+
"glfwSetWindowIconifyCallback" => "GLFWwindowiconifyfun?",
|
|
671
|
+
"glfwSetWindowMaximizeCallback" => "GLFWwindowmaximizefun?",
|
|
672
|
+
"glfwSetFramebufferSizeCallback" => "GLFWframebuffersizefun?",
|
|
673
|
+
"glfwSetWindowContentScaleCallback" => "GLFWwindowcontentscalefun?",
|
|
674
|
+
"glfwGetKeyName" => "cstr?",
|
|
675
|
+
"glfwCreateCursor" => "ptr[GLFWcursor]?",
|
|
676
|
+
"glfwCreateStandardCursor" => "ptr[GLFWcursor]?",
|
|
677
|
+
"glfwSetKeyCallback" => "GLFWkeyfun?",
|
|
678
|
+
"glfwSetCharCallback" => "GLFWcharfun?",
|
|
679
|
+
"glfwSetCharModsCallback" => "GLFWcharmodsfun?",
|
|
680
|
+
"glfwSetMouseButtonCallback" => "GLFWmousebuttonfun?",
|
|
681
|
+
"glfwSetCursorPosCallback" => "GLFWcursorposfun?",
|
|
682
|
+
"glfwSetCursorEnterCallback" => "GLFWcursorenterfun?",
|
|
683
|
+
"glfwSetScrollCallback" => "GLFWscrollfun?",
|
|
684
|
+
"glfwSetDropCallback" => "GLFWdropfun?",
|
|
685
|
+
"glfwGetJoystickAxes" => "const_ptr[float]?",
|
|
686
|
+
"glfwGetJoystickButtons" => "const_ptr[ubyte]?",
|
|
687
|
+
"glfwGetJoystickHats" => "const_ptr[ubyte]?",
|
|
688
|
+
"glfwGetJoystickName" => "cstr?",
|
|
689
|
+
"glfwGetJoystickGUID" => "cstr?",
|
|
690
|
+
"glfwGetJoystickUserPointer" => "ptr[void]?",
|
|
691
|
+
"glfwSetJoystickCallback" => "GLFWjoystickfun?",
|
|
692
|
+
"glfwGetGamepadName" => "cstr?",
|
|
693
|
+
"glfwGetClipboardString" => "cstr?",
|
|
694
|
+
"glfwGetCurrentContext" => "ptr[GLFWwindow]?",
|
|
695
|
+
"glfwGetProcAddress" => "GLFWglproc?",
|
|
696
|
+
"glfwGetRequiredInstanceExtensions" => "ptr[cstr]?",
|
|
697
|
+
}.freeze
|
|
698
|
+
|
|
699
|
+
[
|
|
700
|
+
Binding.new(
|
|
701
|
+
name: "raylib",
|
|
702
|
+
module_name: "std.c.raylib",
|
|
703
|
+
binding_path: root.join("std/c/raylib.mt"),
|
|
704
|
+
include_directives: ["raylib.h"],
|
|
705
|
+
link_libraries: ["raylib"],
|
|
706
|
+
vendored_library: vendored_raylib_library,
|
|
707
|
+
compiler_flags: ["-DMT_LANG_GL_REGISTRY_HAVE_RAYLIB"],
|
|
708
|
+
header_candidates: [
|
|
709
|
+
vendored_raylib.source_root(root:).join("raylib.h").to_s,
|
|
710
|
+
],
|
|
711
|
+
field_type_overrides: raylib_field_type_overrides,
|
|
712
|
+
function_param_type_overrides: raylib_function_param_overrides,
|
|
713
|
+
function_return_type_overrides: raylib_function_return_overrides,
|
|
714
|
+
),
|
|
715
|
+
Binding.new(
|
|
716
|
+
name: "raymath",
|
|
717
|
+
module_name: "std.c.raymath",
|
|
718
|
+
binding_path: root.join("std/c/raymath.mt"),
|
|
719
|
+
include_directives: ["raylib.h", "raymath.h"],
|
|
720
|
+
bindgen_defines: ["RAYMATH_STATIC_INLINE"],
|
|
721
|
+
bindgen_include_directives: ["raylib.h"],
|
|
722
|
+
module_imports: [{ module_name: "std.c.raylib", alias: "rl" }],
|
|
723
|
+
link_libraries: ["m"],
|
|
724
|
+
clang_args: ["-I#{vendored_raylib.source_root}", "-include", "raylib.h"],
|
|
725
|
+
compiler_flags: ["-DRAYMATH_STATIC_INLINE"],
|
|
726
|
+
excluded_declaration_names: ["double_t"],
|
|
727
|
+
type_name_overrides: {
|
|
728
|
+
"float3" => "Float3Array",
|
|
729
|
+
"float16" => "Float16Array",
|
|
730
|
+
},
|
|
731
|
+
type_overrides: {
|
|
732
|
+
"Vector2" => "rl.Vector2",
|
|
733
|
+
"Vector3" => "rl.Vector3",
|
|
734
|
+
"Vector4" => "rl.Vector4",
|
|
735
|
+
"Matrix" => "rl.Matrix",
|
|
736
|
+
"Quaternion" => "rl.Quaternion",
|
|
737
|
+
},
|
|
738
|
+
header_candidates: [
|
|
739
|
+
vendored_raylib.source_root.join("raymath.h").to_s,
|
|
740
|
+
],
|
|
741
|
+
allow_static_inline_functions: true,
|
|
742
|
+
),
|
|
743
|
+
Binding.new(
|
|
744
|
+
name: "raygui",
|
|
745
|
+
module_name: "std.c.raygui",
|
|
746
|
+
binding_path: root.join("std/c/raygui.mt"),
|
|
747
|
+
include_directives: ["raygui.h"],
|
|
748
|
+
link_libraries: ["raylib", "m"],
|
|
749
|
+
vendored_library: vendored_raylib_library,
|
|
750
|
+
compiler_flags: ["-DGRAPHICS_API_OPENGL_43"],
|
|
751
|
+
implementation_defines: ["RAYGUI_IMPLEMENTATION"],
|
|
752
|
+
prepare: lambda do |_binding, **|
|
|
753
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "raygui" }&.bootstrap!
|
|
754
|
+
end,
|
|
755
|
+
header_candidates: [
|
|
756
|
+
MilkTea.data_root.join("third_party/raygui-upstream/src/raygui.h").to_s,
|
|
757
|
+
],
|
|
758
|
+
function_param_type_overrides: raylib_function_param_overrides,
|
|
759
|
+
function_return_type_overrides: raygui_function_return_overrides,
|
|
760
|
+
),
|
|
761
|
+
Binding.new(
|
|
762
|
+
name: "rlgl",
|
|
763
|
+
module_name: "std.c.rlgl",
|
|
764
|
+
binding_path: root.join("std/c/rlgl.mt"),
|
|
765
|
+
include_directives: ["rlgl.h"],
|
|
766
|
+
link_libraries: ["raylib"],
|
|
767
|
+
vendored_library: vendored_raylib_library,
|
|
768
|
+
compiler_flags: ["-DMT_LANG_GL_REGISTRY_HAVE_RAYLIB", "-DGRAPHICS_API_OPENGL_43"],
|
|
769
|
+
function_param_type_overrides: {
|
|
770
|
+
"rlLoadTexture" => { "data" => "const_ptr[void]?" },
|
|
771
|
+
"rlLoadTextureCubemap" => { "data" => "const_ptr[void]?" },
|
|
772
|
+
"rlLoadShaderBuffer" => { "data" => "const_ptr[void]?" },
|
|
773
|
+
"rlSetRenderBatchActive" => { "batch" => "ptr[rlRenderBatch]?" },
|
|
774
|
+
"rlLoadShaderProgram" => {
|
|
775
|
+
"vsCode" => "cstr?",
|
|
776
|
+
"fsCode" => "cstr?",
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
function_return_type_overrides: {
|
|
780
|
+
"rlGetProcAddress" => "ptr[void]?",
|
|
781
|
+
},
|
|
782
|
+
header_candidates: [
|
|
783
|
+
vendored_raylib.source_root.join("rlgl.h").to_s,
|
|
784
|
+
],
|
|
785
|
+
),
|
|
786
|
+
Binding.new(
|
|
787
|
+
name: "libc",
|
|
788
|
+
module_name: "std.c.libc",
|
|
789
|
+
binding_path: root.join("std/c/libc.mt"),
|
|
790
|
+
include_directives: ["stdlib.h"],
|
|
791
|
+
compiler_flags: ["-D_GNU_SOURCE"],
|
|
792
|
+
env_var: "LIBC_HEADER",
|
|
793
|
+
function_param_type_overrides: {
|
|
794
|
+
"strtod" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
795
|
+
"strtof" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
796
|
+
"strtol" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
797
|
+
"strtoul" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
798
|
+
"strtoq" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
799
|
+
"strtouq" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
800
|
+
"strtoll" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
801
|
+
"strtoull" => { "__endptr" => "ptr[ptr[char]]?" },
|
|
802
|
+
"realloc" => { "__ptr" => "ptr[void]?" },
|
|
803
|
+
"reallocarray" => { "__ptr" => "ptr[void]?" },
|
|
804
|
+
"free" => { "__ptr" => "ptr[void]?" },
|
|
805
|
+
},
|
|
806
|
+
function_return_type_overrides: {
|
|
807
|
+
"malloc" => "ptr[void]?",
|
|
808
|
+
"calloc" => "ptr[void]?",
|
|
809
|
+
"realloc" => "ptr[void]?",
|
|
810
|
+
"reallocarray" => "ptr[void]?",
|
|
811
|
+
"aligned_alloc" => "ptr[void]?",
|
|
812
|
+
},
|
|
813
|
+
header_candidates: [
|
|
814
|
+
"/usr/include/stdlib.h",
|
|
815
|
+
"/usr/local/include/stdlib.h",
|
|
816
|
+
],
|
|
817
|
+
),
|
|
818
|
+
Binding.new(
|
|
819
|
+
name: "ctype",
|
|
820
|
+
module_name: "std.c.ctype",
|
|
821
|
+
binding_path: root.join("std/c/ctype.mt"),
|
|
822
|
+
declaration_name_prefixes: ["mt_ctype_"],
|
|
823
|
+
include_directives: ["ctype_bindgen.h"],
|
|
824
|
+
allow_static_inline_functions: true,
|
|
825
|
+
header_candidates: [
|
|
826
|
+
root.join("std/c/ctype_bindgen.h").to_s,
|
|
827
|
+
],
|
|
828
|
+
),
|
|
829
|
+
Binding.new(
|
|
830
|
+
name: "errno",
|
|
831
|
+
module_name: "std.c.errno",
|
|
832
|
+
binding_path: root.join("std/c/errno.mt"),
|
|
833
|
+
declaration_name_prefixes: ["MT_ERRNO_", "mt_errno_"],
|
|
834
|
+
include_directives: ["errno_bindgen.h"],
|
|
835
|
+
allow_static_inline_functions: true,
|
|
836
|
+
function_return_type_overrides: {
|
|
837
|
+
"mt_errno_strerror" => "cstr?",
|
|
838
|
+
},
|
|
839
|
+
header_candidates: [
|
|
840
|
+
root.join("std/c/errno_bindgen.h").to_s,
|
|
841
|
+
],
|
|
842
|
+
),
|
|
843
|
+
Binding.new(
|
|
844
|
+
name: "math",
|
|
845
|
+
module_name: "std.c.math",
|
|
846
|
+
binding_path: root.join("std/c/math.mt"),
|
|
847
|
+
declaration_name_prefixes: ["mt_math_"],
|
|
848
|
+
include_directives: ["math_bindgen.h"],
|
|
849
|
+
allow_static_inline_functions: true,
|
|
850
|
+
link_libraries: ["m"],
|
|
851
|
+
header_candidates: [
|
|
852
|
+
root.join("std/c/math_bindgen.h").to_s,
|
|
853
|
+
],
|
|
854
|
+
),
|
|
855
|
+
Binding.new(
|
|
856
|
+
name: "string",
|
|
857
|
+
module_name: "std.c.string",
|
|
858
|
+
binding_path: root.join("std/c/string.mt"),
|
|
859
|
+
declaration_name_prefixes: ["mt_string_"],
|
|
860
|
+
include_directives: ["string_bindgen.h"],
|
|
861
|
+
allow_static_inline_functions: true,
|
|
862
|
+
function_return_type_overrides: {
|
|
863
|
+
"mt_string_memchr" => "ptr[void]?",
|
|
864
|
+
"mt_string_strchr" => "ptr[char]?",
|
|
865
|
+
"mt_string_strrchr" => "ptr[char]?",
|
|
866
|
+
"mt_string_strstr" => "ptr[char]?",
|
|
867
|
+
},
|
|
868
|
+
header_candidates: [
|
|
869
|
+
root.join("std/c/string_bindgen.h").to_s,
|
|
870
|
+
],
|
|
871
|
+
),
|
|
872
|
+
Binding.new(
|
|
873
|
+
name: "sdl3",
|
|
874
|
+
module_name: "std.c.sdl3",
|
|
875
|
+
binding_path: root.join("std/c/sdl3.mt"),
|
|
876
|
+
include_directives: ["SDL3/SDL.h", "SDL3/SDL_main.h"],
|
|
877
|
+
bindgen_defines: ["SDL_MAIN_HANDLED=1"],
|
|
878
|
+
bindgen_include_directives: ["SDL3/SDL_main.h"],
|
|
879
|
+
link_libraries: ["SDL3"],
|
|
880
|
+
prepare: lambda do |_binding, **|
|
|
881
|
+
vendored_sdl3.source(root:).bootstrap!
|
|
882
|
+
end,
|
|
883
|
+
vendored_library: vendored_sdl3_library,
|
|
884
|
+
clang_args: vendored_sdl3.include_flags(root:),
|
|
885
|
+
compiler_flags: ["-DSDL_MAIN_HANDLED=1", "-DMT_LANG_GL_REGISTRY_HAVE_SDL3", *vendored_sdl3.include_flags(root:)],
|
|
886
|
+
tracked_header_paths: [
|
|
887
|
+
vendored_sdl3.header_root(root:).join("SDL.h").to_s,
|
|
888
|
+
vendored_sdl3.header_root(root:).join("SDL_main.h").to_s,
|
|
889
|
+
],
|
|
890
|
+
tracked_header_prefixes: [
|
|
891
|
+
vendored_sdl3.header_root(root:).to_s,
|
|
892
|
+
],
|
|
893
|
+
declaration_name_prefixes: ["SDL_", "Sint", "Uint"],
|
|
894
|
+
function_param_type_overrides: sdl3_function_param_overrides,
|
|
895
|
+
function_return_type_overrides: sdl3_function_return_overrides,
|
|
896
|
+
header_candidates: [
|
|
897
|
+
vendored_sdl3.header_root(root:).join("SDL.h").to_s,
|
|
898
|
+
],
|
|
899
|
+
),
|
|
900
|
+
Binding.new(
|
|
901
|
+
name: "glfw",
|
|
902
|
+
module_name: "std.c.glfw",
|
|
903
|
+
binding_path: root.join("std/c/glfw.mt"),
|
|
904
|
+
include_directives: ["GLFW/glfw3.h"],
|
|
905
|
+
link_libraries: ["glfw3"],
|
|
906
|
+
prepare: lambda do |_binding, **|
|
|
907
|
+
vendored_glfw.source(root:).bootstrap!
|
|
908
|
+
end,
|
|
909
|
+
vendored_library: vendored_glfw_library,
|
|
910
|
+
clang_args: vendored_glfw.include_flags(root:),
|
|
911
|
+
compiler_flags: ["-DMT_LANG_GL_REGISTRY_HAVE_GLFW", *vendored_glfw.include_flags(root:)],
|
|
912
|
+
tracked_header_paths: [
|
|
913
|
+
vendored_glfw.header_root(root:).join("glfw3.h").to_s,
|
|
914
|
+
],
|
|
915
|
+
tracked_header_prefixes: [
|
|
916
|
+
vendored_glfw.header_root(root:).to_s,
|
|
917
|
+
],
|
|
918
|
+
declaration_name_prefixes: ["GLFW", "glfw"],
|
|
919
|
+
function_param_type_overrides: glfw_function_param_overrides,
|
|
920
|
+
function_return_type_overrides: glfw_function_return_overrides,
|
|
921
|
+
header_candidates: [
|
|
922
|
+
vendored_glfw.header_root(root:).join("glfw3.h").to_s,
|
|
923
|
+
],
|
|
924
|
+
),
|
|
925
|
+
Binding.new(
|
|
926
|
+
name: "gl",
|
|
927
|
+
module_name: "std.c.gl",
|
|
928
|
+
binding_path: root.join("std/c/gl.mt"),
|
|
929
|
+
include_directives: ["gl_registry_helpers.h"],
|
|
930
|
+
link_libraries: [],
|
|
931
|
+
implementation_defines: [MilkTea::OpenGLRegistry::IMPLEMENTATION_DEFINE],
|
|
932
|
+
tracked_header_paths: [
|
|
933
|
+
MilkTea::OpenGLRegistry.helper_header_path(root:).to_s,
|
|
934
|
+
],
|
|
935
|
+
declaration_name_prefixes: ["GL", "gl", "mt_gl_"],
|
|
936
|
+
header_candidates: [
|
|
937
|
+
MilkTea::OpenGLRegistry.helper_header_path(root:).to_s,
|
|
938
|
+
],
|
|
939
|
+
prepare: lambda do |_binding, **|
|
|
940
|
+
MilkTea::OpenGLRegistry.prepare!(root:)
|
|
941
|
+
end,
|
|
942
|
+
),
|
|
943
|
+
Binding.new(
|
|
944
|
+
name: "box2d",
|
|
945
|
+
module_name: "std.c.box2d",
|
|
946
|
+
binding_path: root.join("std/c/box2d.mt"),
|
|
947
|
+
include_directives: ["box2d/box2d.h"],
|
|
948
|
+
link_libraries: ["box2d"],
|
|
949
|
+
vendored_library: vendored_box2d_library,
|
|
950
|
+
clang_args: vendored_box2d.include_flags(root:),
|
|
951
|
+
compiler_flags: vendored_box2d.include_flags(root:),
|
|
952
|
+
tracked_header_paths: [
|
|
953
|
+
vendored_box2d.header_root(root:).join("box2d.h").to_s,
|
|
954
|
+
],
|
|
955
|
+
tracked_header_prefixes: [
|
|
956
|
+
vendored_box2d.header_root(root:).to_s,
|
|
957
|
+
],
|
|
958
|
+
declaration_name_prefixes: ["b2", "B2_"],
|
|
959
|
+
header_candidates: [
|
|
960
|
+
vendored_box2d.header_root(root:).join("box2d.h").to_s,
|
|
961
|
+
],
|
|
962
|
+
),
|
|
963
|
+
Binding.new(
|
|
964
|
+
name: "cjson",
|
|
965
|
+
module_name: "std.c.cjson",
|
|
966
|
+
binding_path: root.join("std/c/cjson.mt"),
|
|
967
|
+
include_directives: ["cJSON.h"],
|
|
968
|
+
link_libraries: ["cjson"],
|
|
969
|
+
vendored_library: vendored_cjson_library,
|
|
970
|
+
declaration_name_prefixes: ["cJSON", "CJSON_"],
|
|
971
|
+
function_return_type_overrides: {
|
|
972
|
+
"cJSON_Parse" => "ptr[cJSON]?",
|
|
973
|
+
"cJSON_ParseWithLength" => "ptr[cJSON]?",
|
|
974
|
+
"cJSON_ParseWithOpts" => "ptr[cJSON]?",
|
|
975
|
+
"cJSON_ParseWithLengthOpts" => "ptr[cJSON]?",
|
|
976
|
+
"cJSON_Print" => "ptr[char]?",
|
|
977
|
+
"cJSON_PrintUnformatted" => "ptr[char]?",
|
|
978
|
+
"cJSON_PrintBuffered" => "ptr[char]?",
|
|
979
|
+
"cJSON_GetErrorPtr" => "cstr?",
|
|
980
|
+
"cJSON_GetStringValue" => "cstr?",
|
|
981
|
+
"cJSON_GetArrayItem" => "ptr[cJSON]?",
|
|
982
|
+
"cJSON_GetObjectItem" => "ptr[cJSON]?",
|
|
983
|
+
"cJSON_GetObjectItemCaseSensitive" => "ptr[cJSON]?",
|
|
984
|
+
"cJSON_DetachItemViaPointer" => "ptr[cJSON]?",
|
|
985
|
+
"cJSON_DetachItemFromArray" => "ptr[cJSON]?",
|
|
986
|
+
"cJSON_DetachItemFromObject" => "ptr[cJSON]?",
|
|
987
|
+
"cJSON_DetachItemFromObjectCaseSensitive" => "ptr[cJSON]?",
|
|
988
|
+
"cJSON_CreateNull" => "ptr[cJSON]?",
|
|
989
|
+
"cJSON_CreateTrue" => "ptr[cJSON]?",
|
|
990
|
+
"cJSON_CreateFalse" => "ptr[cJSON]?",
|
|
991
|
+
"cJSON_CreateBool" => "ptr[cJSON]?",
|
|
992
|
+
"cJSON_CreateNumber" => "ptr[cJSON]?",
|
|
993
|
+
"cJSON_CreateString" => "ptr[cJSON]?",
|
|
994
|
+
"cJSON_CreateRaw" => "ptr[cJSON]?",
|
|
995
|
+
"cJSON_CreateArray" => "ptr[cJSON]?",
|
|
996
|
+
"cJSON_CreateObject" => "ptr[cJSON]?",
|
|
997
|
+
"cJSON_CreateStringReference" => "ptr[cJSON]?",
|
|
998
|
+
"cJSON_CreateObjectReference" => "ptr[cJSON]?",
|
|
999
|
+
"cJSON_CreateArrayReference" => "ptr[cJSON]?",
|
|
1000
|
+
"cJSON_AddNullToObject" => "ptr[cJSON]?",
|
|
1001
|
+
"cJSON_AddTrueToObject" => "ptr[cJSON]?",
|
|
1002
|
+
"cJSON_AddFalseToObject" => "ptr[cJSON]?",
|
|
1003
|
+
"cJSON_AddBoolToObject" => "ptr[cJSON]?",
|
|
1004
|
+
"cJSON_AddNumberToObject" => "ptr[cJSON]?",
|
|
1005
|
+
"cJSON_AddStringToObject" => "ptr[cJSON]?",
|
|
1006
|
+
"cJSON_AddRawToObject" => "ptr[cJSON]?",
|
|
1007
|
+
"cJSON_AddObjectToObject" => "ptr[cJSON]?",
|
|
1008
|
+
"cJSON_AddArrayToObject" => "ptr[cJSON]?",
|
|
1009
|
+
},
|
|
1010
|
+
header_candidates: [
|
|
1011
|
+
vendored_cjson.source_root.join("cJSON.h").to_s,
|
|
1012
|
+
],
|
|
1013
|
+
),
|
|
1014
|
+
Binding.new(
|
|
1015
|
+
name: "flecs",
|
|
1016
|
+
module_name: "std.c.flecs",
|
|
1017
|
+
binding_path: root.join("std/c/flecs.mt"),
|
|
1018
|
+
include_directives: ["flecs.h"],
|
|
1019
|
+
link_libraries: ["flecs"],
|
|
1020
|
+
vendored_library: vendored_flecs_library,
|
|
1021
|
+
clang_args: vendored_flecs.include_flags(root:),
|
|
1022
|
+
compiler_flags: vendored_flecs.include_flags(root:),
|
|
1023
|
+
type_overrides: {
|
|
1024
|
+
"FILE" => "ptr[void]",
|
|
1025
|
+
},
|
|
1026
|
+
tracked_header_paths: [
|
|
1027
|
+
vendored_flecs.header_path(root:).to_s,
|
|
1028
|
+
],
|
|
1029
|
+
tracked_header_prefixes: [
|
|
1030
|
+
vendored_flecs.include_root(root:).to_s,
|
|
1031
|
+
],
|
|
1032
|
+
declaration_name_prefixes: ["ecs_", "Ecs", "ECS_", "FLECS_"],
|
|
1033
|
+
header_candidates: [
|
|
1034
|
+
vendored_flecs.header_path(root:).to_s,
|
|
1035
|
+
],
|
|
1036
|
+
),
|
|
1037
|
+
Binding.new(
|
|
1038
|
+
name: "libuv",
|
|
1039
|
+
module_name: "std.c.libuv",
|
|
1040
|
+
binding_path: root.join("std/c/libuv.mt"),
|
|
1041
|
+
include_directives: ["uv.h"],
|
|
1042
|
+
link_libraries: ["uv"],
|
|
1043
|
+
prepare: lambda do |_binding, **|
|
|
1044
|
+
vendored_libuv.source(root:).bootstrap!
|
|
1045
|
+
end,
|
|
1046
|
+
vendored_library: vendored_libuv_library,
|
|
1047
|
+
clang_args: vendored_libuv.include_flags(root:),
|
|
1048
|
+
compiler_flags: vendored_libuv.include_flags(root:),
|
|
1049
|
+
tracked_header_paths: [
|
|
1050
|
+
vendored_libuv.header_path(root:).to_s,
|
|
1051
|
+
],
|
|
1052
|
+
tracked_header_prefixes: [
|
|
1053
|
+
vendored_libuv.include_root(root:).to_s,
|
|
1054
|
+
],
|
|
1055
|
+
declaration_name_prefixes: ["uv_", "UV_"],
|
|
1056
|
+
type_overrides: {
|
|
1057
|
+
"cc_t" => "ubyte",
|
|
1058
|
+
"DIR" => "void",
|
|
1059
|
+
"in_addr" => "uint",
|
|
1060
|
+
"in6_addr" => "array[ubyte, 16]",
|
|
1061
|
+
"speed_t" => "uint",
|
|
1062
|
+
"tcflag_t" => "uint",
|
|
1063
|
+
"termios" => "void",
|
|
1064
|
+
},
|
|
1065
|
+
function_param_type_overrides: libuv_function_param_overrides,
|
|
1066
|
+
function_return_type_overrides: libuv_function_return_overrides,
|
|
1067
|
+
field_type_overrides: libuv_field_type_overrides,
|
|
1068
|
+
header_candidates: [
|
|
1069
|
+
vendored_libuv.header_path(root:).to_s,
|
|
1070
|
+
],
|
|
1071
|
+
),
|
|
1072
|
+
Binding.new(
|
|
1073
|
+
name: "enet",
|
|
1074
|
+
module_name: "std.c.enet",
|
|
1075
|
+
binding_path: root.join("std/c/enet.mt"),
|
|
1076
|
+
include_directives: ["enet/enet.h"],
|
|
1077
|
+
link_libraries: ["enet"],
|
|
1078
|
+
declaration_name_prefixes: ["enet_", "ENET_", "ENet", "_ENet"],
|
|
1079
|
+
tracked_header_paths: [
|
|
1080
|
+
"/usr/include/enet/enet.h",
|
|
1081
|
+
"/usr/local/include/enet/enet.h",
|
|
1082
|
+
],
|
|
1083
|
+
tracked_header_prefixes: [
|
|
1084
|
+
"/usr/include/enet",
|
|
1085
|
+
"/usr/local/include/enet",
|
|
1086
|
+
],
|
|
1087
|
+
header_candidates: [
|
|
1088
|
+
"/usr/include/enet/enet.h",
|
|
1089
|
+
"/usr/local/include/enet/enet.h",
|
|
1090
|
+
],
|
|
1091
|
+
),
|
|
1092
|
+
Binding.new(
|
|
1093
|
+
name: "zstd",
|
|
1094
|
+
module_name: "std.c.zstd",
|
|
1095
|
+
binding_path: root.join("std/c/zstd.mt"),
|
|
1096
|
+
include_directives: ["zstd.h"],
|
|
1097
|
+
link_libraries: ["zstd"],
|
|
1098
|
+
declaration_name_prefixes: ["ZSTD_", "ZSTD", "ZDICTLIB_", "ZDICT_", "HUF_", "FSE_"],
|
|
1099
|
+
tracked_header_paths: [
|
|
1100
|
+
"/usr/include/zstd.h",
|
|
1101
|
+
"/usr/include/zstd_errors.h",
|
|
1102
|
+
"/usr/local/include/zstd.h",
|
|
1103
|
+
"/usr/local/include/zstd_errors.h",
|
|
1104
|
+
],
|
|
1105
|
+
header_candidates: [
|
|
1106
|
+
"/usr/include/zstd.h",
|
|
1107
|
+
"/usr/local/include/zstd.h",
|
|
1108
|
+
],
|
|
1109
|
+
),
|
|
1110
|
+
Binding.new(
|
|
1111
|
+
name: "sqlite3",
|
|
1112
|
+
module_name: "std.c.sqlite3",
|
|
1113
|
+
binding_path: root.join("std/c/sqlite3.mt"),
|
|
1114
|
+
include_directives: ["sqlite3.h"],
|
|
1115
|
+
bindgen_defines: ["SQLITE_OMIT_LOAD_EXTENSION"],
|
|
1116
|
+
link_libraries: ["sqlite3"],
|
|
1117
|
+
declaration_name_prefixes: ["sqlite3", "SQLITE_"],
|
|
1118
|
+
header_candidates: [
|
|
1119
|
+
"/usr/include/sqlite3.h",
|
|
1120
|
+
"/usr/local/include/sqlite3.h",
|
|
1121
|
+
],
|
|
1122
|
+
),
|
|
1123
|
+
Binding.new(
|
|
1124
|
+
name: "curl",
|
|
1125
|
+
module_name: "std.c.curl",
|
|
1126
|
+
binding_path: root.join("std/c/curl.mt"),
|
|
1127
|
+
include_directives: ["curl/curl.h"],
|
|
1128
|
+
link_libraries: ["curl"],
|
|
1129
|
+
declaration_name_prefixes: ["curl_", "curlfiletype", "CURL", "CURLOPT_", "CURLINFO_", "CURLM", "CURLSH"],
|
|
1130
|
+
type_overrides: {
|
|
1131
|
+
"curlfiletype" => "int",
|
|
1132
|
+
"curl_easytype" => "int",
|
|
1133
|
+
"CURLUcode" => "int",
|
|
1134
|
+
},
|
|
1135
|
+
field_type_overrides: {
|
|
1136
|
+
"curl_fileinfo" => { "filetype" => "int" },
|
|
1137
|
+
"curl_easyoption" => { "type" => "int" },
|
|
1138
|
+
},
|
|
1139
|
+
header_candidates: [
|
|
1140
|
+
"/usr/include/curl/curl.h",
|
|
1141
|
+
"/usr/local/include/curl/curl.h",
|
|
1142
|
+
],
|
|
1143
|
+
),
|
|
1144
|
+
Binding.new(
|
|
1145
|
+
name: "pcre2",
|
|
1146
|
+
module_name: "std.c.pcre2",
|
|
1147
|
+
binding_path: root.join("std/c/pcre2.mt"),
|
|
1148
|
+
include_directives: ["pcre2.h"],
|
|
1149
|
+
bindgen_defines: ["PCRE2_CODE_UNIT_WIDTH=8"],
|
|
1150
|
+
link_libraries: ["pcre2-8"],
|
|
1151
|
+
prepare: lambda do |_binding, **|
|
|
1152
|
+
vendored_pcre2.source(root:).bootstrap!
|
|
1153
|
+
end,
|
|
1154
|
+
vendored_library: vendored_pcre2_library,
|
|
1155
|
+
clang_args: vendored_pcre2.include_flags(root:),
|
|
1156
|
+
compiler_flags: ["-DPCRE2_CODE_UNIT_WIDTH=8", *vendored_pcre2.include_flags(root:)],
|
|
1157
|
+
tracked_header_paths: [
|
|
1158
|
+
vendored_pcre2.header_path(root:).to_s,
|
|
1159
|
+
],
|
|
1160
|
+
tracked_header_prefixes: [
|
|
1161
|
+
vendored_pcre2.include_root(root:).to_s,
|
|
1162
|
+
],
|
|
1163
|
+
declaration_name_prefixes: ["pcre2_", "PCRE2_"],
|
|
1164
|
+
header_candidates: [
|
|
1165
|
+
vendored_pcre2.header_path(root:).to_s,
|
|
1166
|
+
],
|
|
1167
|
+
),
|
|
1168
|
+
Binding.new(
|
|
1169
|
+
name: "steamworks",
|
|
1170
|
+
module_name: "std.c.steamworks",
|
|
1171
|
+
binding_path: root.join("std/c/steamworks.mt"),
|
|
1172
|
+
include_directives: ["steamworks.h"],
|
|
1173
|
+
link_libraries: MilkTea::Steamworks.default_link_libraries,
|
|
1174
|
+
allow_static_inline_functions: true,
|
|
1175
|
+
vendored_library: MilkTea::VendoredSteamworks.library(root:),
|
|
1176
|
+
tracked_header_paths: [
|
|
1177
|
+
MilkTea::Steamworks.helper_header_path(root:).to_s,
|
|
1178
|
+
],
|
|
1179
|
+
header_candidates: [
|
|
1180
|
+
MilkTea::Steamworks.helper_header_path(root:).to_s,
|
|
1181
|
+
],
|
|
1182
|
+
prepare: lambda do |_binding, env:, **|
|
|
1183
|
+
MilkTea::Steamworks.prepare!(root:, env:)
|
|
1184
|
+
end,
|
|
1185
|
+
),
|
|
1186
|
+
Binding.new(
|
|
1187
|
+
name: "miniaudio",
|
|
1188
|
+
module_name: "std.c.miniaudio",
|
|
1189
|
+
binding_path: root.join("std/c/miniaudio.mt"),
|
|
1190
|
+
include_directives: ["miniaudio.h"],
|
|
1191
|
+
bindgen_defines: ["MA_NO_FLAC", "MA_NO_MP3"],
|
|
1192
|
+
implementation_defines: ["MINIAUDIO_IMPLEMENTATION", "MA_NO_FLAC", "MA_NO_MP3"],
|
|
1193
|
+
link_libraries: ["dl", "pthread", "m"],
|
|
1194
|
+
declaration_name_prefixes: ["ma_", "MA_"],
|
|
1195
|
+
header_candidates: [
|
|
1196
|
+
MilkTea.data_root.join("third_party/miniaudio-upstream/miniaudio.h").to_s,
|
|
1197
|
+
],
|
|
1198
|
+
),
|
|
1199
|
+
Binding.new(
|
|
1200
|
+
name: "tracy",
|
|
1201
|
+
module_name: "std.c.tracy",
|
|
1202
|
+
binding_path: root.join("std/c/tracy.mt"),
|
|
1203
|
+
include_directives: ["TracyC.h"],
|
|
1204
|
+
link_libraries: ["tracyclient", "stdc++"],
|
|
1205
|
+
implementation_defines: ["TRACY_ENABLE"],
|
|
1206
|
+
vendored_library: vendored_tracy_library,
|
|
1207
|
+
prepare: lambda do |_binding, env:, cc:, **|
|
|
1208
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "tracy" }&.bootstrap!
|
|
1209
|
+
MilkTea::VendoredTracy.library(root:).prepare!(env:, cc:)
|
|
1210
|
+
end,
|
|
1211
|
+
header_candidates: [
|
|
1212
|
+
MilkTea.data_root.join("third_party/tracy-upstream/public/tracy/TracyC.h").to_s,
|
|
1213
|
+
],
|
|
1214
|
+
generator: lambda do |binding, env:, header_path:|
|
|
1215
|
+
File.read(binding.binding_path)
|
|
1216
|
+
end,
|
|
1217
|
+
),
|
|
1218
|
+
Binding.new(
|
|
1219
|
+
name: "rres",
|
|
1220
|
+
module_name: "std.c.rres",
|
|
1221
|
+
binding_path: root.join("std/c/rres.mt"),
|
|
1222
|
+
include_directives: ["rres.h"],
|
|
1223
|
+
declaration_name_prefixes: ["rres", "RRES_"],
|
|
1224
|
+
header_candidates: [
|
|
1225
|
+
MilkTea.data_root.join("third_party/rres-upstream/src/rres.h").to_s,
|
|
1226
|
+
],
|
|
1227
|
+
prepare: lambda do |_binding, **|
|
|
1228
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "rres" }&.bootstrap!
|
|
1229
|
+
end,
|
|
1230
|
+
),
|
|
1231
|
+
Binding.new(
|
|
1232
|
+
name: "rpng",
|
|
1233
|
+
module_name: "std.c.rpng",
|
|
1234
|
+
binding_path: root.join("std/c/rpng.mt"),
|
|
1235
|
+
include_directives: ["rpng.h"],
|
|
1236
|
+
declaration_name_prefixes: ["rpng", "RPNG_"],
|
|
1237
|
+
header_candidates: [
|
|
1238
|
+
MilkTea.data_root.join("third_party/rpng-upstream/src/rpng.h").to_s,
|
|
1239
|
+
],
|
|
1240
|
+
prepare: lambda do |_binding, **|
|
|
1241
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "rpng" }&.bootstrap!
|
|
1242
|
+
end,
|
|
1243
|
+
),
|
|
1244
|
+
Binding.new(
|
|
1245
|
+
name: "stb_image",
|
|
1246
|
+
module_name: "std.c.stb_image",
|
|
1247
|
+
binding_path: root.join("std/c/stb_image.mt"),
|
|
1248
|
+
include_directives: ["stb_image.h"],
|
|
1249
|
+
declaration_name_prefixes: ["stbi_", "STBI_"],
|
|
1250
|
+
header_candidates: [
|
|
1251
|
+
MilkTea.data_root.join("third_party/stb-upstream/stb_image.h").to_s,
|
|
1252
|
+
],
|
|
1253
|
+
prepare: lambda do |_binding, **|
|
|
1254
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "stb" }&.bootstrap!
|
|
1255
|
+
end,
|
|
1256
|
+
),
|
|
1257
|
+
Binding.new(
|
|
1258
|
+
name: "stb_truetype",
|
|
1259
|
+
module_name: "std.c.stb_truetype",
|
|
1260
|
+
binding_path: root.join("std/c/stb_truetype.mt"),
|
|
1261
|
+
include_directives: ["stb_truetype.h"],
|
|
1262
|
+
declaration_name_prefixes: ["stbtt_", "STBTT_"],
|
|
1263
|
+
header_candidates: [
|
|
1264
|
+
MilkTea.data_root.join("third_party/stb-upstream/stb_truetype.h").to_s,
|
|
1265
|
+
],
|
|
1266
|
+
prepare: lambda do |_binding, **|
|
|
1267
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "stb" }&.bootstrap!
|
|
1268
|
+
end,
|
|
1269
|
+
),
|
|
1270
|
+
Binding.new(
|
|
1271
|
+
name: "stb_image_write",
|
|
1272
|
+
module_name: "std.c.stb_image_write",
|
|
1273
|
+
binding_path: root.join("std/c/stb_image_write.mt"),
|
|
1274
|
+
include_directives: ["stb_image_write.h"],
|
|
1275
|
+
declaration_name_prefixes: ["stbi_write_", "stbi_flip_", "stbiw_", "stbi_zlib_"],
|
|
1276
|
+
header_candidates: [
|
|
1277
|
+
MilkTea.data_root.join("third_party/stb-upstream/stb_image_write.h").to_s,
|
|
1278
|
+
],
|
|
1279
|
+
prepare: lambda do |_binding, **|
|
|
1280
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "stb" }&.bootstrap!
|
|
1281
|
+
end,
|
|
1282
|
+
),
|
|
1283
|
+
Binding.new(
|
|
1284
|
+
name: "stb_image_resize2",
|
|
1285
|
+
module_name: "std.c.stb_image_resize2",
|
|
1286
|
+
binding_path: root.join("std/c/stb_image_resize2.mt"),
|
|
1287
|
+
include_directives: ["stb_image_resize2.h"],
|
|
1288
|
+
declaration_name_prefixes: ["stbir_", "STBIR_"],
|
|
1289
|
+
header_candidates: [
|
|
1290
|
+
MilkTea.data_root.join("third_party/stb-upstream/stb_image_resize2.h").to_s,
|
|
1291
|
+
],
|
|
1292
|
+
prepare: lambda do |_binding, **|
|
|
1293
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "stb" }&.bootstrap!
|
|
1294
|
+
end,
|
|
1295
|
+
),
|
|
1296
|
+
Binding.new(
|
|
1297
|
+
name: "stb_rect_pack",
|
|
1298
|
+
module_name: "std.c.stb_rect_pack",
|
|
1299
|
+
binding_path: root.join("std/c/stb_rect_pack.mt"),
|
|
1300
|
+
include_directives: ["stb_rect_pack.h"],
|
|
1301
|
+
declaration_name_prefixes: ["stbrp_", "STBRP_"],
|
|
1302
|
+
header_candidates: [
|
|
1303
|
+
MilkTea.data_root.join("third_party/stb-upstream/stb_rect_pack.h").to_s,
|
|
1304
|
+
],
|
|
1305
|
+
prepare: lambda do |_binding, **|
|
|
1306
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "stb" }&.bootstrap!
|
|
1307
|
+
end,
|
|
1308
|
+
),
|
|
1309
|
+
Binding.new(
|
|
1310
|
+
name: "stb_vorbis",
|
|
1311
|
+
module_name: "std.c.stb_vorbis",
|
|
1312
|
+
binding_path: root.join("std/c/stb_vorbis.mt"),
|
|
1313
|
+
include_directives: ["stb_vorbis.c"],
|
|
1314
|
+
declaration_name_prefixes: ["stb_vorbis_", "STB_VORBIS_"],
|
|
1315
|
+
header_candidates: [
|
|
1316
|
+
MilkTea.data_root.join("third_party/stb-upstream/stb_vorbis.c").to_s,
|
|
1317
|
+
],
|
|
1318
|
+
prepare: lambda do |_binding, **|
|
|
1319
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "stb" }&.bootstrap!
|
|
1320
|
+
end,
|
|
1321
|
+
),
|
|
1322
|
+
Binding.new(
|
|
1323
|
+
name: "cgltf",
|
|
1324
|
+
module_name: "std.c.cgltf",
|
|
1325
|
+
binding_path: root.join("std/c/cgltf.mt"),
|
|
1326
|
+
include_directives: ["cgltf.h"],
|
|
1327
|
+
declaration_name_prefixes: ["cgltf_"],
|
|
1328
|
+
header_candidates: [
|
|
1329
|
+
MilkTea.data_root.join("third_party/cgltf-upstream/cgltf.h").to_s,
|
|
1330
|
+
],
|
|
1331
|
+
prepare: lambda do |_binding, **|
|
|
1332
|
+
UpstreamSources.default_sources(root:).find { |source| source.name == "cgltf" }&.bootstrap!
|
|
1333
|
+
end,
|
|
1334
|
+
),
|
|
1335
|
+
]
|
|
1336
|
+
end
|
|
1337
|
+
end
|
|
1338
|
+
end
|