mirror of
https://github.com/Starpelly/raylib-beef.git
synced 2025-06-10 07:42:19 +02:00
Initial commit
This commit is contained in:
commit
b49ad727ee
93 changed files with 57538 additions and 0 deletions
140
generator/API.cs
Normal file
140
generator/API.cs
Normal file
|
@ -0,0 +1,140 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace RaylibBeefGenerator
|
||||
{
|
||||
// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
|
||||
public class Alias
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Callback
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("returnType")]
|
||||
public string ReturnType { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("params")]
|
||||
public List<Param> Params { get; set; } = new();
|
||||
}
|
||||
|
||||
public class Define
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("value")]
|
||||
public object Value { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Enum
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("values")]
|
||||
public List<Value> Values { get; set; } = new();
|
||||
}
|
||||
|
||||
public class Field
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Function
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("returnType")]
|
||||
public string ReturnType { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("params")]
|
||||
public List<Param> Params { get; set; } = new();
|
||||
}
|
||||
|
||||
public class Param
|
||||
{
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonProperty("defines")]
|
||||
public List<Define> Defines { get; set; } = new();
|
||||
|
||||
[JsonProperty("structs")]
|
||||
public List<Struct> Structs { get; set; } = new();
|
||||
|
||||
[JsonProperty("aliases")]
|
||||
public List<Alias> Aliases { get; set; } = new();
|
||||
|
||||
[JsonProperty("enums")]
|
||||
public List<Enum> Enums { get; set; } = new();
|
||||
|
||||
[JsonProperty("callbacks")]
|
||||
public List<Callback> Callbacks { get; set; } = new();
|
||||
|
||||
[JsonProperty("functions")]
|
||||
public List<Function> Functions { get; set; } = new();
|
||||
}
|
||||
|
||||
public class Struct
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("fields")]
|
||||
public List<Field> Fields { get; set; } = new();
|
||||
}
|
||||
|
||||
public class Value
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("value")]
|
||||
public int? Value_ { get; set; } = 0;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue