config.odin (3424B)
1 package bindgen2 2 3 // This is populated from a `bindgen.sjson` file 4 Config :: struct { 5 // Inputs can be folders or files. If you provide a folder name, then the generator will look for 6 // header (.h) files inside it. The bindings will be based on those headers. For each header, 7 // you can create a `header_footer.odin` file with some additional code to append to the finished 8 // bindings. If the header is called `raylib.h` then the footer would be `raylib_footer.odin`. 9 inputs: []string, 10 11 // Output folder. In there you'll find one .odin file per processed header. 12 output_folder: string, 13 14 // Remove this prefix from types names (structs, enums, etc) 15 remove_type_prefix: string, 16 17 // Remove this prefix from macro names 18 remove_macro_prefix: string, 19 20 // Remove this prefix from function names (and add it as link_prefix) to the foreign group 21 remove_function_prefix: string, 22 23 // Remove this suffix from type names (structs, enum, etc) 24 remove_type_suffix: string, 25 26 // Set to true translate type names to Ada_Case 27 force_ada_case_types: bool, 28 29 // Single lib file to import. Will be ignored if `imports_file` is set. 30 import_lib: string, 31 32 // The filename of a file that contains the foreign import declarations. In it you can do 33 // platform-specific library imports etc. The contents of it will be placed near the top of the 34 // file. 35 imports_file: string, 36 37 // `package something` to put at top of each generated Odin binding file. 38 package_name: string, 39 40 // "Old_Name" = "New_Name" 41 rename: map[string]string, 42 43 // Turns an enum into a bit_set. Converts the values of the enum into appropriate values for a 44 // bit_set (translates the enum values using a log2 procedure). 45 // 46 // Note that the enum will be turned into a bit_set type. There will be a new type created that 47 // contains the actual enum, which the bit_set then references. 48 bit_setify: map[string]string, 49 50 // Completely override the definition of a type. 51 type_overrides: map[string]string, 52 53 // Override the type of a struct field. 54 // 55 // You can also use `[^]` to augment an already existing type. 56 struct_field_overrides: map[string]string, 57 58 // Put these tags on the specified struct field 59 struct_field_tags: map[string]string, 60 61 // Remove a specific enum member. Write the C name of the member. You can also use wildcards 62 // such as *_Count 63 remove_enum_members: []string, 64 65 // Overrides the type of a procedure parameter or return value. For a parameter use the key 66 // Proc_Name.parameter_name. For a return value use the key Proc_Name. 67 // 68 // You can also use `[^]`, `#by_ptr` and `#any_int` to augment an already existing type. 69 procedure_type_overrides: map[string]string, 70 71 // Add in a default value to a procedure parameter. Use `Proc_Name.parameter_name` as key and 72 // write the plain-text Odin value as value. 73 // 74 // You can also add defaults for proc parameters within structs. In that case you do: 75 // `Struct_Name.proc_field.parameter_name` -- This does not currently support nested structs. 76 procedure_parameter_defaults: map[string]string, 77 78 // Put the names of declarations in here to remove them. 79 remove: []string, 80 81 // Group all procedures at the end of the file. 82 procedures_at_end: bool, 83 84 // Additional include paths to send into clang. While generating the bindings clang will look into 85 // this path in search for included headers. 86 clang_include_paths: []string, 87 clang_defines: map[string]string, 88 }