-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDL3_Image.cs
213 lines (145 loc) · 7.63 KB
/
SDL3_Image.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
using System.Runtime.InteropServices;
namespace DeafMan1983.Interop.SDL3
{
public unsafe partial struct IMG_Animation
{
public int w;
public int h;
public int count;
public SDL_Surface** frames;
public int* delays;
}
public static unsafe partial class SDL3
{
private const string libSDL3_image = "SDL3_image";
[NativeTypeName("unsigned int")]
public enum IMG_InitFlags : uint
{
}
public const IMG_InitFlags IMG_INIT_JPG = (IMG_InitFlags)0x00000001,
IMG_INIT_PNG = (IMG_InitFlags)0x00000002,
IMG_INIT_TIF = (IMG_InitFlags)0x00000004,
IMG_INIT_WEBP = (IMG_InitFlags)0x00000008,
IMG_INIT_JXL = (IMG_InitFlags)0x00000010,
IMG_INIT_AVIF = (IMG_InitFlags)0x00000020;
[DllImport(libSDL3_image)]
[return: NativeTypeName("const SDL_version *")]
public static extern SDL_version* IMG_Linked_Version();
[DllImport(libSDL3_image)]
public static extern bool IMG_Init(IMG_InitFlags flags);
[DllImport(libSDL3_image)]
public static extern void IMG_Quit();
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadTyped_RW(SDL_RWops* src, int freesrc, [NativeTypeName("const char *")] sbyte* type);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_Load([NativeTypeName("const char *")] sbyte* file);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_Load_RW(SDL_RWops* src, int freesrc);
[DllImport(libSDL3_image)]
public static extern SDL_Texture* IMG_LoadTexture(SDL_Renderer* renderer, [NativeTypeName("const char *")] sbyte* file);
[DllImport(libSDL3_image)]
public static extern SDL_Texture* IMG_LoadTexture_RW(SDL_Renderer* renderer, SDL_RWops* src, int freesrc);
[DllImport(libSDL3_image)]
public static extern SDL_Texture* IMG_LoadTextureTyped_RW(SDL_Renderer* renderer, SDL_RWops* src, int freesrc, [NativeTypeName("const char *")] sbyte* type);
[DllImport(libSDL3_image)]
public static extern int IMG_isAVIF(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isICO(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isCUR(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isBMP(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isGIF(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isJPG(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isJXL(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isLBM(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isPCX(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isPNG(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isPNM(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isSVG(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isQOI(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isTIF(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isXCF(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isXPM(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isXV(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern int IMG_isWEBP(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadAVIF_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadICO_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadCUR_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadBMP_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadGIF_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadJPG_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadJXL_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadLBM_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadPCX_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadPNG_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadPNM_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadSVG_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadQOI_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadTGA_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadXCF_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadXPM_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadXV_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadWEBP_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_LoadSizedSVG_RW(SDL_RWops* src, int width, int height);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_ReadXPMFromArray([NativeTypeName("char **")] sbyte** xpm);
[DllImport(libSDL3_image)]
public static extern SDL_Surface* IMG_ReadXPMFromArrayToRGB888([NativeTypeName("char **")] sbyte** xpm);
[DllImport(libSDL3_image)]
public static extern int IMG_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] sbyte* file);
[DllImport(libSDL3_image)]
public static extern int IMG_SavePNG_RW(SDL_Surface* surface, SDL_RWops* dst, int freedst);
[DllImport(libSDL3_image)]
public static extern int IMG_SaveJPG(SDL_Surface* surface, [NativeTypeName("const char *")] sbyte* file, int quality);
[DllImport(libSDL3_image)]
public static extern int IMG_SaveJPG_RW(SDL_Surface* surface, SDL_RWops* dst, int freedst, int quality);
[DllImport(libSDL3_image)]
public static extern IMG_Animation* IMG_LoadAnimation([NativeTypeName("const char *")] sbyte* file);
[DllImport(libSDL3_image)]
public static extern IMG_Animation* IMG_LoadAnimation_RW(SDL_RWops* src, int freesrc);
[DllImport(libSDL3_image)]
public static extern IMG_Animation* IMG_LoadAnimationTyped_RW(SDL_RWops* src, int freesrc, [NativeTypeName("const char *")] sbyte* type);
[DllImport(libSDL3_image)]
public static extern void IMG_FreeAnimation(IMG_Animation* anim);
[DllImport(libSDL3_image)]
public static extern IMG_Animation* IMG_LoadGIFAnimation_RW(SDL_RWops* src);
[DllImport(libSDL3_image)]
public static extern IMG_Animation* IMG_LoadWEBPAnimation_RW(SDL_RWops* src);
}
}