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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
/* SPDX-FileCopyrightText: © 2025 Decompollaborate */
/* SPDX-License-Identifier: MIT */
//! Override default macro arguments.
//!
//! Callbacks can be registered that will be executed when an argument of a
//! certain type is encountered.
//!
//! The default argument handler [`gfxd_arg_dflt`] will execute callbacks as
//! needed using [`gfxd_arg_callbacks`].
//!
//! If a callback returns non-zero, [`gfxd_arg_dflt`] will not output anything.
//!
//! This is to allow callbacks to override the default argument output.
//! Otherwise, [`gfxd_arg_dflt`] will output the argument value after the
//! callback function's output.
//!
//! [`gfxd_arg_dflt`]: crate::handlers::gfxd_arg_dflt
use NonZeroU32;
use crateffi;
extern "C"
/// The argument type is [`gfxd_Tlut`].
/// The palette index is in `idx` and the number of colors in `count`.
///
/// [`gfxd_Tlut`]: crate::arg_type::ArgType::gfxd_Tlut
pub type gfxd_tlut_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Timg`].
/// The image format is in `fmt` and `siz`, the dimensions in `width` and
/// `height`, and the palette index in `pal`.
///
/// [`gfxd_Timg`]: crate::arg_type::ArgType::gfxd_Timg
pub type gfxd_timg_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Cimg`].
/// The image format is in `fmt` and `siz`, and the horizontal resolution
/// in `width`.
///
/// [`gfxd_Cimg`]: crate::arg_type::ArgType::gfxd_Cimg
pub type gfxd_cimg_fn_t =
unsafe extern "C" fn ;
/// The argument type is [`gfxd_Zimg`].
///
/// [`gfxd_Zimg`]: crate::arg_type::ArgType::gfxd_Zimg
pub type gfxd_zimg_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Dl`].
///
/// [`gfxd_Dl`]: crate::arg_type::ArgType::gfxd_Dl
pub type gfxd_dl_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Mtxptr`].
///
/// [`gfxd_Mtxptr`]: crate::arg_type::ArgType::gfxd_Mtxptr
pub type gfxd_mtx_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Lookatptr`].
/// The number of lookat structures (1 or 2) is in `count`.
///
/// [`gfxd_Lookatptr`]: crate::arg_type::ArgType::gfxd_Lookatptr
pub type gfxd_lookat_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Lightptr`].
///
/// [`gfxd_Lightptr`]: crate::arg_type::ArgType::gfxd_Lightptr
pub type gfxd_light_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Lightsn`].
/// The number of diffuse lights used is in `num`.
///
/// [`gfxd_Lightsn`]: crate::arg_type::ArgType::gfxd_Lightsn
pub type gfxd_lightsn_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Segptr`].
/// The segment number is in `num`.
///
/// [`gfxd_Segptr`]: crate::arg_type::ArgType::gfxd_Segptr
pub type gfxd_seg_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Vtxptr`].
/// The number of vertex structures is in `num`.
///
/// [`gfxd_Vtxptr`]: crate::arg_type::ArgType::gfxd_Vtxptr
pub type gfxd_vtx_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Vpptr`].
///
/// [`gfxd_Vpptr`]: crate::arg_type::ArgType::gfxd_Vpptr
pub type gfxd_vp_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Uctext`].
/// The size of the text segment is in `size`.
///
/// [`gfxd_Uctext`]: crate::arg_type::ArgType::gfxd_Uctext
pub type gfxd_uctext_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Ucdata`].
/// The size of the data segment is in `size`.
///
/// [`gfxd_Ucdata`]: crate::arg_type::ArgType::gfxd_Ucdata
pub type gfxd_ucdata_fn_t = unsafe extern "C" fn ;
/// The argument type is [`gfxd_Dram`].
/// The size of the data is in `size`.
///
/// [`gfxd_Dram`]: crate::arg_type::ArgType::gfxd_Dram
pub type gfxd_dram_fn_t = unsafe extern "C" fn ;