Skip to content

Commit 54ce16e

Browse files
SimonNSiegeLord
authored andcommitted
Fix #53: in X* -> const(X)* for DMD 2.104.0
The D keyword "in" for function parameters means "scope const ref" and DMD 2.104.0, released 2023-06-01, is beginning to warn about using "in" during extern(C). More information: https://dlang.org/changelog/2.104.0.html#dmd.in-externd DMD 2.104.0 Release Notes: Using in parameters with non-extern(D)/extern(C++) functions is deprecated https://dlang.org/changelog/2.101.0.html#dmd.previewInLink DMD 2.101.0 Release Notes: -preview=in disabled for non-D-non-C++ linkage: in "is D centric, as it is an enhanced version of "scope const ref". As non-extern(D) functions usually are expected to match a specific ABI, using in is hardly a good idea." This is an automatic conversion of all function parameters of form "in X* " or "in X *" without quotes to "const(X)* " without quotes. I've reviewed each change myself.
1 parent 147ca7f commit 54ce16e

27 files changed

+270
-270
lines changed

allegro5/al_debug.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module allegro5.al_debug;
22

33
nothrow @nogc extern (C)
44
{
5-
void al_register_assert_handler(void function(in char* expr, in char* file, int line, in char* func) handler);
6-
void al_register_trace_handler(void function(in char*) handler);
5+
void al_register_assert_handler(void function(const(char)* expr, const(char)* file, int line, const(char)* func) handler);
6+
void al_register_trace_handler(void function(const(char)*) handler);
77
}

allegro5/allegro_audio.d

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,27 @@ nothrow @nogc extern (C)
109109
ALLEGRO_SAMPLE_INSTANCE* al_create_sample_instance(ALLEGRO_SAMPLE* data);
110110
void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE* spl);
111111

112-
uint al_get_sample_frequency(in ALLEGRO_SAMPLE* spl);
113-
uint al_get_sample_length(in ALLEGRO_SAMPLE* spl);
114-
ALLEGRO_AUDIO_DEPTH al_get_sample_depth(in ALLEGRO_SAMPLE* spl);
115-
ALLEGRO_CHANNEL_CONF al_get_sample_channels(in ALLEGRO_SAMPLE* spl);
116-
void* al_get_sample_data(in ALLEGRO_SAMPLE* spl);
112+
uint al_get_sample_frequency(const(ALLEGRO_SAMPLE)* spl);
113+
uint al_get_sample_length(const(ALLEGRO_SAMPLE)* spl);
114+
ALLEGRO_AUDIO_DEPTH al_get_sample_depth(const(ALLEGRO_SAMPLE)* spl);
115+
ALLEGRO_CHANNEL_CONF al_get_sample_channels(const(ALLEGRO_SAMPLE)* spl);
116+
void* al_get_sample_data(const(ALLEGRO_SAMPLE)* spl);
117117

118-
uint al_get_sample_instance_frequency(in ALLEGRO_SAMPLE_INSTANCE* spl);
119-
uint al_get_sample_instance_length(in ALLEGRO_SAMPLE_INSTANCE* spl);
120-
uint al_get_sample_instance_position(in ALLEGRO_SAMPLE_INSTANCE* spl);
118+
uint al_get_sample_instance_frequency(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
119+
uint al_get_sample_instance_length(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
120+
uint al_get_sample_instance_position(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
121121

122-
float al_get_sample_instance_speed(in ALLEGRO_SAMPLE_INSTANCE* spl);
123-
float al_get_sample_instance_gain(in ALLEGRO_SAMPLE_INSTANCE* spl);
124-
float al_get_sample_instance_pan(in ALLEGRO_SAMPLE_INSTANCE* spl);
125-
float al_get_sample_instance_time(in ALLEGRO_SAMPLE_INSTANCE* spl);
122+
float al_get_sample_instance_speed(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
123+
float al_get_sample_instance_gain(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
124+
float al_get_sample_instance_pan(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
125+
float al_get_sample_instance_time(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
126126

127-
ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(in ALLEGRO_SAMPLE_INSTANCE* spl);
128-
ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels(in ALLEGRO_SAMPLE_INSTANCE* spl);
129-
ALLEGRO_PLAYMODE al_get_sample_instance_playmode(in ALLEGRO_SAMPLE_INSTANCE* spl);
127+
ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
128+
ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
129+
ALLEGRO_PLAYMODE al_get_sample_instance_playmode(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
130130

131-
bool al_get_sample_instance_playing(in ALLEGRO_SAMPLE_INSTANCE* spl);
132-
bool al_get_sample_instance_attached(in ALLEGRO_SAMPLE_INSTANCE* spl);
131+
bool al_get_sample_instance_playing(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
132+
bool al_get_sample_instance_attached(const(ALLEGRO_SAMPLE_INSTANCE)* spl);
133133

134134
bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE* spl, uint val);
135135
bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE* spl, uint val);
@@ -154,24 +154,24 @@ nothrow @nogc extern (C)
154154
void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM* stream);
155155
void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM* stream);
156156

157-
uint al_get_audio_stream_frequency(in ALLEGRO_AUDIO_STREAM* stream);
158-
uint al_get_audio_stream_length(in ALLEGRO_AUDIO_STREAM* stream);
159-
uint al_get_audio_stream_fragments(in ALLEGRO_AUDIO_STREAM* stream);
160-
uint al_get_available_audio_stream_fragments(in ALLEGRO_AUDIO_STREAM* stream);
157+
uint al_get_audio_stream_frequency(const(ALLEGRO_AUDIO_STREAM)* stream);
158+
uint al_get_audio_stream_length(const(ALLEGRO_AUDIO_STREAM)* stream);
159+
uint al_get_audio_stream_fragments(const(ALLEGRO_AUDIO_STREAM)* stream);
160+
uint al_get_available_audio_stream_fragments(const(ALLEGRO_AUDIO_STREAM)* stream);
161161

162-
float al_get_audio_stream_speed(in ALLEGRO_AUDIO_STREAM* stream);
163-
float al_get_audio_stream_gain(in ALLEGRO_AUDIO_STREAM* stream);
164-
float al_get_audio_stream_pan(in ALLEGRO_AUDIO_STREAM* stream);
162+
float al_get_audio_stream_speed(const(ALLEGRO_AUDIO_STREAM)* stream);
163+
float al_get_audio_stream_gain(const(ALLEGRO_AUDIO_STREAM)* stream);
164+
float al_get_audio_stream_pan(const(ALLEGRO_AUDIO_STREAM)* stream);
165165

166-
ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels(in ALLEGRO_AUDIO_STREAM* stream);
167-
ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth(in ALLEGRO_AUDIO_STREAM* stream);
168-
ALLEGRO_PLAYMODE al_get_audio_stream_playmode(in ALLEGRO_AUDIO_STREAM* stream);
166+
ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels(const(ALLEGRO_AUDIO_STREAM)* stream);
167+
ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth(const(ALLEGRO_AUDIO_STREAM)* stream);
168+
ALLEGRO_PLAYMODE al_get_audio_stream_playmode(const(ALLEGRO_AUDIO_STREAM)* stream);
169169

170-
bool al_get_audio_stream_playing(in ALLEGRO_AUDIO_STREAM* spl);
171-
bool al_get_audio_stream_attached(in ALLEGRO_AUDIO_STREAM* spl);
172-
ulong al_get_audio_stream_played_samples(in ALLEGRO_AUDIO_STREAM* stream);
170+
bool al_get_audio_stream_playing(const(ALLEGRO_AUDIO_STREAM)* spl);
171+
bool al_get_audio_stream_attached(const(ALLEGRO_AUDIO_STREAM)* spl);
172+
ulong al_get_audio_stream_played_samples(const(ALLEGRO_AUDIO_STREAM)* stream);
173173

174-
void* al_get_audio_stream_fragment(in ALLEGRO_AUDIO_STREAM* stream);
174+
void* al_get_audio_stream_fragment(const(ALLEGRO_AUDIO_STREAM)* stream);
175175

176176
bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM* stream, float val);
177177
bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM* stream, float val);
@@ -200,13 +200,13 @@ nothrow @nogc extern (C)
200200
bool al_attach_mixer_to_mixer(ALLEGRO_MIXER* stream, ALLEGRO_MIXER* mixer);
201201
bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER* mixer, void function(void* buf, uint samples, void* data) cb, void* data);
202202

203-
uint al_get_mixer_frequency(in ALLEGRO_MIXER* mixer);
204-
ALLEGRO_CHANNEL_CONF al_get_mixer_channels(in ALLEGRO_MIXER* mixer);
205-
ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(in ALLEGRO_MIXER* mixer);
206-
ALLEGRO_MIXER_QUALITY al_get_mixer_quality(in ALLEGRO_MIXER* mixer);
207-
float al_get_mixer_gain(in ALLEGRO_MIXER *mixer);
208-
bool al_get_mixer_playing(in ALLEGRO_MIXER* mixer);
209-
bool al_get_mixer_attached(in ALLEGRO_MIXER* mixer);
203+
uint al_get_mixer_frequency(const(ALLEGRO_MIXER)* mixer);
204+
ALLEGRO_CHANNEL_CONF al_get_mixer_channels(const(ALLEGRO_MIXER)* mixer);
205+
ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(const(ALLEGRO_MIXER)* mixer);
206+
ALLEGRO_MIXER_QUALITY al_get_mixer_quality(const(ALLEGRO_MIXER)* mixer);
207+
float al_get_mixer_gain(const(ALLEGRO_MIXER)* mixer);
208+
bool al_get_mixer_playing(const(ALLEGRO_MIXER)* mixer);
209+
bool al_get_mixer_attached(const(ALLEGRO_MIXER)* mixer);
210210
bool al_set_mixer_frequency(ALLEGRO_MIXER* mixer, uint val);
211211
bool al_set_mixer_quality(ALLEGRO_MIXER* mixer, ALLEGRO_MIXER_QUALITY val);
212212
bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float gain);
@@ -224,11 +224,11 @@ nothrow @nogc extern (C)
224224
ALLEGRO_VOICE* voice);
225225
void al_detach_voice(ALLEGRO_VOICE* voice);
226226

227-
uint al_get_voice_frequency(in ALLEGRO_VOICE* voice);
228-
uint al_get_voice_position(in ALLEGRO_VOICE* voice);
229-
ALLEGRO_CHANNEL_CONF al_get_voice_channels(in ALLEGRO_VOICE* voice);
230-
ALLEGRO_AUDIO_DEPTH al_get_voice_depth(in ALLEGRO_VOICE* voice);
231-
bool al_get_voice_playing(in ALLEGRO_VOICE* voice);
227+
uint al_get_voice_frequency(const(ALLEGRO_VOICE)* voice);
228+
uint al_get_voice_position(const(ALLEGRO_VOICE)* voice);
229+
ALLEGRO_CHANNEL_CONF al_get_voice_channels(const(ALLEGRO_VOICE)* voice);
230+
ALLEGRO_AUDIO_DEPTH al_get_voice_depth(const(ALLEGRO_VOICE)* voice);
231+
bool al_get_voice_playing(const(ALLEGRO_VOICE)* voice);
232232
bool al_set_voice_position(ALLEGRO_VOICE* voice, uint val);
233233
bool al_set_voice_playing(ALLEGRO_VOICE* voice, bool val);
234234

@@ -255,21 +255,21 @@ nothrow @nogc extern (C)
255255
void al_set_default_voice(ALLEGRO_VOICE* voice);
256256

257257
/* File type handlers */
258-
bool al_register_sample_loader(in char* ext, ALLEGRO_SAMPLE* function(in char* filename) loader);
259-
bool al_register_sample_saver(in char* ext, bool function(in char* filename, ALLEGRO_SAMPLE* spl) saver);
260-
bool al_register_audio_stream_loader(in char* ext, ALLEGRO_AUDIO_STREAM* function(in char* filename, size_t buffer_count, uint samples) stream_loader);
258+
bool al_register_sample_loader(const(char)* ext, ALLEGRO_SAMPLE* function(const(char)* filename) loader);
259+
bool al_register_sample_saver(const(char)* ext, bool function(const(char)* filename, ALLEGRO_SAMPLE* spl) saver);
260+
bool al_register_audio_stream_loader(const(char)* ext, ALLEGRO_AUDIO_STREAM* function(const(char)* filename, size_t buffer_count, uint samples) stream_loader);
261261

262-
bool al_register_sample_loader_f(in char* ext, ALLEGRO_SAMPLE* function(ALLEGRO_FILE* fp) loader);
263-
bool al_register_sample_saver_f(in char* ext, bool function(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE* spl) saver);
264-
bool al_register_audio_stream_loader_f(in char* ext, ALLEGRO_AUDIO_STREAM* function(ALLEGRO_FILE* fp, size_t buffer_count, uint samples) stream_loader);
262+
bool al_register_sample_loader_f(const(char)* ext, ALLEGRO_SAMPLE* function(ALLEGRO_FILE* fp) loader);
263+
bool al_register_sample_saver_f(const(char)* ext, bool function(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE* spl) saver);
264+
bool al_register_audio_stream_loader_f(const(char)* ext, ALLEGRO_AUDIO_STREAM* function(ALLEGRO_FILE* fp, size_t buffer_count, uint samples) stream_loader);
265265

266-
ALLEGRO_SAMPLE* al_load_sample(in char* filename);
267-
bool al_save_sample(in char* filename, ALLEGRO_SAMPLE* spl);
268-
ALLEGRO_AUDIO_STREAM* al_load_audio_stream(in char* filename, size_t buffer_count, uint samples);
266+
ALLEGRO_SAMPLE* al_load_sample(const(char)* filename);
267+
bool al_save_sample(const(char)* filename, ALLEGRO_SAMPLE* spl);
268+
ALLEGRO_AUDIO_STREAM* al_load_audio_stream(const(char)* filename, size_t buffer_count, uint samples);
269269

270-
ALLEGRO_SAMPLE* al_load_sample_f(ALLEGRO_FILE* fp, in char* ident);
271-
bool al_save_sample_f(ALLEGRO_FILE* fp, in char* ident, ALLEGRO_SAMPLE* spl);
272-
ALLEGRO_AUDIO_STREAM * al_load_audio_stream_f(ALLEGRO_FILE* fp, in char* ident, size_t buffer_count, uint samples);
270+
ALLEGRO_SAMPLE* al_load_sample_f(ALLEGRO_FILE* fp, const(char)* ident);
271+
bool al_save_sample_f(ALLEGRO_FILE* fp, const(char)* ident, ALLEGRO_SAMPLE* spl);
272+
ALLEGRO_AUDIO_STREAM * al_load_audio_stream_f(ALLEGRO_FILE* fp, const(char)* ident, size_t buffer_count, uint samples);
273273

274274
/* Recording functions */
275275
version (AllegroAudioUnstable)

allegro5/allegro_color.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ nothrow @nogc extern (C)
1717
void al_color_rgb_to_hsl(float red, float green, float blue, float* hue, float* saturation, float* lightness);
1818
void al_color_rgb_to_hsv(float red, float green, float blue, float* hue, float* saturation, float* value);
1919
void al_color_hsl_to_rgb(float hue, float saturation, float lightness, float* red, float* green, float* blue);
20-
int al_color_name_to_rgb(in char* name, float* r, float* g, float* b);
20+
int al_color_name_to_rgb(const(char)* name, float* r, float* g, float* b);
2121
const(char)* al_color_rgb_to_name(float r, float g, float b);
2222
void al_color_cmyk_to_rgb(float cyan, float magenta, float yellow, float key, float* red, float* green, float* blue);
2323
void al_color_rgb_to_cmyk(float red, float green, float blue, float* cyan, float* magenta, float* yellow, float* key);
2424
void al_color_yuv_to_rgb(float y, float u, float v, float* red, float* green, float* blue);
2525
void al_color_rgb_to_yuv(float red, float green, float blue, float* y, float* u, float* v);
2626
void al_color_rgb_to_html(float red, float green, float blue, char* string);
27-
void al_color_html_to_rgb(in char* string, float* red, float* green, float* blue);
27+
void al_color_html_to_rgb(const(char)* string, float* red, float* green, float* blue);
2828
}
2929

3030
static import allegro5.allegro_color_ret;
@@ -33,6 +33,6 @@ mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_yuv", "float y, flo
3333
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_cmyk", "float c, float m, float y, float k", "c, m, y, k"));
3434
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_hsl", "float h, float s, float l", "h, s, l"));
3535
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_hsv", "float h, float s, float v", "h, s, v"));
36-
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_name", "in char* name", "name"));
37-
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_html", "in char* string", "string"));
36+
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_name", "const(char)* name", "name"));
37+
mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_html", "const(char)* string", "string"));
3838

allegro5/allegro_color_ret.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ nothrow @nogc extern(C)
88
ALLEGRO_COLOR al_color_cmyk(float c, float m, float y, float k);
99
ALLEGRO_COLOR al_color_hsl(float h, float s, float l);
1010
ALLEGRO_COLOR al_color_hsv(float h, float s, float v);
11-
ALLEGRO_COLOR al_color_name(in char* name);
12-
ALLEGRO_COLOR al_color_html(in char* string);
11+
ALLEGRO_COLOR al_color_name(const(char)* name);
12+
ALLEGRO_COLOR al_color_html(const(char)* string);
1313
}

allegro5/allegro_font.d

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ nothrow @nogc extern (C)
2020

2121
struct ALLEGRO_FONT_VTABLE
2222
{
23-
int function(in ALLEGRO_FONT* f) font_height;
24-
int function(in ALLEGRO_FONT* f, int ch) char_length;
25-
int function(in ALLEGRO_FONT* f, in ALLEGRO_USTR* text) text_length;
26-
int function(in ALLEGRO_FONT* f, int ch, int x, int y) render_char;
27-
int function(in ALLEGRO_FONT* f, in ALLEGRO_USTR* text, int x, int y) render;
23+
int function(const(ALLEGRO_FONT)* f) font_height;
24+
int function(const(ALLEGRO_FONT)* f, int ch) char_length;
25+
int function(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* text) text_length;
26+
int function(const(ALLEGRO_FONT)* f, int ch, int x, int y) render_char;
27+
int function(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* text, int x, int y) render;
2828
void function(ALLEGRO_FONT* f) destroy;
29-
void function(in ALLEGRO_FONT* f,
30-
in ALLEGRO_USTR* text, int* bbx, int* bby, int* bbw,
29+
void function(const(ALLEGRO_FONT)* f,
30+
const(ALLEGRO_USTR)* text, int* bbx, int* bby, int* bbw,
3131
int* bbh, int* ascent, int* descent) get_text_dimensions;
3232
int function (ALLEGRO_FONT* font, int ranges_count, int* ranges) get_font_ranges;
3333
bool function(const ALLEGRO_FONT *f, int codepoint, int *bbx, int *bby, int *bbw, int *bbh) get_glyph_dimensions;
@@ -44,28 +44,28 @@ nothrow @nogc extern (C)
4444
ALLEGRO_ALIGN_INTEGER = 4,
4545
}
4646

47-
bool al_register_font_loader(in char* ext, ALLEGRO_FONT* function(in char* filename, int size, int flags) load);
48-
ALLEGRO_FONT* al_load_bitmap_font(in char* filename);
49-
ALLEGRO_FONT* al_load_bitmap_font_flags(in char* filename, int flags);
50-
ALLEGRO_FONT* al_load_font(in char* filename, int size, int flags);
47+
bool al_register_font_loader(const(char)* ext, ALLEGRO_FONT* function(const(char)* filename, int size, int flags) load);
48+
ALLEGRO_FONT* al_load_bitmap_font(const(char)* filename);
49+
ALLEGRO_FONT* al_load_bitmap_font_flags(const(char)* filename, int flags);
50+
ALLEGRO_FONT* al_load_font(const(char)* filename, int size, int flags);
5151

52-
ALLEGRO_FONT* al_grab_font_from_bitmap(ALLEGRO_BITMAP* bmp, int n, in int* ranges);
52+
ALLEGRO_FONT* al_grab_font_from_bitmap(ALLEGRO_BITMAP* bmp, int n, const(int)* ranges);
5353
ALLEGRO_FONT* al_create_builtin_font();
5454

55-
void al_draw_ustr(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, in ALLEGRO_USTR* ustr);
56-
void al_draw_text(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, in char* text);
57-
void al_draw_justified_text(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, in char* text);
58-
void al_draw_justified_ustr(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, in ALLEGRO_USTR* text);
59-
void al_draw_textf(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, in char* format, ...);
60-
void al_draw_justified_textf(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, in char* format, ...);
61-
int al_get_text_width(in ALLEGRO_FONT* f, in char* str);
62-
int al_get_ustr_width(in ALLEGRO_FONT* f, in ALLEGRO_USTR* ustr);
63-
int al_get_font_line_height(in ALLEGRO_FONT* f);
64-
int al_get_font_ascent(in ALLEGRO_FONT* f);
65-
int al_get_font_descent(in ALLEGRO_FONT* f);
55+
void al_draw_ustr(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x, float y, int flags, const(ALLEGRO_USTR)* ustr);
56+
void al_draw_text(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x, float y, int flags, const(char)* text);
57+
void al_draw_justified_text(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, const(char)* text);
58+
void al_draw_justified_ustr(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, const(ALLEGRO_USTR)* text);
59+
void al_draw_textf(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x, float y, int flags, const(char)* format, ...);
60+
void al_draw_justified_textf(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, const(char)* format, ...);
61+
int al_get_text_width(const(ALLEGRO_FONT)* f, const(char)* str);
62+
int al_get_ustr_width(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* ustr);
63+
int al_get_font_line_height(const(ALLEGRO_FONT)* f);
64+
int al_get_font_ascent(const(ALLEGRO_FONT)* f);
65+
int al_get_font_descent(const(ALLEGRO_FONT)* f);
6666
void al_destroy_font(ALLEGRO_FONT* f);
67-
void al_get_ustr_dimensions(in ALLEGRO_FONT* f, in ALLEGRO_USTR* text, int* bbx, int* bby, int* bbw, int* bbh);
68-
void al_get_text_dimensions(in ALLEGRO_FONT* f, in char* text, int* bbx, int* bby, int* bbw, int* bbh);
67+
void al_get_ustr_dimensions(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* text, int* bbx, int* bby, int* bbw, int* bbh);
68+
void al_get_text_dimensions(const(ALLEGRO_FONT)* f, const(char)* text, int* bbx, int* bby, int* bbw, int* bbh);
6969
bool al_init_font_addon();
7070
void al_shutdown_font_addon();
7171
uint al_get_allegro_font_version();

allegro5/allegro_memfile.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import allegro5.allegro;
1010

1111
nothrow @nogc extern (C)
1212
{
13-
ALLEGRO_FILE* al_open_memfile(void* mem, long size, in char* mode);
13+
ALLEGRO_FILE* al_open_memfile(void* mem, long size, const(char)* mode);
1414
uint al_get_allegro_memfile_version();
1515
}

0 commit comments

Comments
 (0)