source: project/wiki/eggref/5/allegro @ 37247

Last change on this file since 37247 was 37247, checked in by svnwiki, 4 months ago

Anonymous wiki edit for IP [69.172.150.121]:

File size: 105.0 KB
Line 
1[[tags: allegro game]]
2
3== allegro
4
5[[http://alleg.sourceforge.net/readme.html|Allegro 5.0 bindings for Chicken.]]
6
7[[toc:]]
8
9== Author
10
11Dan Leslie (dan@ironoxide.ca)
12== Repository
13
14The main repository can be found on [[https://github.com/dleslie/allegro-egg|GitHub]].
15
16== Supported Versions
17
18Allegro versions 5.0.x up to 5.2.x are supported.
19
20Future version support will likely be added in the future. Patches are welcome!
21
22== Examples
23
24A growing number of examples can be found on [[https://github.com/dleslie/allegro-examples|GitHub]].
25
26Please contribute!
27
28== Windows Extras
29
30Since building all your packages on windows is a bit of a pain in the ass I've written the Egg with the assumption that you're using the pre-built Allegro libraries.
31The only extra step you'll need to do, after installing the prebuilt Allegro bins to your MingW32 directory should be:
32
33<enscript hilight="bash">
34# cd /MingW/lib
35# cp liballegro-INSTALLED_VERSION-monolith-md.a liballegro.a
36</enscript>
37
38Assuming, of course, that you've installed MingW32 to C:\Mingw
39
40== Naming Key
41
42In general, the naming is fairly indicative of the function's behaviour.
43
44The gist is something like this:
45
46; make-type : Constructs a type (Not always available)
47; make-type* : Constructs a type, returning a value which must be manually destructed
48; free-type! : Manually destructs a type (Not available for internally managed types)
49; type-noun : Accessor for value "noun" on a specific type
50; type-noun-set! : Mutator for value "noun" on a specific type
51; type-verb : Method which requires a specific type to operate
52; type-verb! : Method which modifies an object of a specific type
53; verbage : Function which operates on the global state
54; verbage* : Function which operates on the global state, but also returns a value which must be manually destructed
55
56If a function begins with a type name then you can be assured that the first parameter will be an object of that specific type.
57
58== Audio
59
60=== Constants
61
62* audio-pan-none
63
64=== Enums
65
66==== audio-depth
67
68<procedure>(audio-depth->int audio-depth)</procedure>
69
70{{{audio-depth}} may be one of the following symbols:
71* int8
72* int16
73* int24
74* float32
75* unsigned
76* uint8
77* uint16
78* uint24
79
80<procedure>(int->audio-depth integer)</procedure>
81
82==== channel-configuration
83
84<procedure>(channel-configuration->int channel-configuration)</procedure>
85
86{{channel-configuration}} may be one of the following symbols:
87* one
88* two
89* three
90* four
91* five-one
92* six-one
93* seven-one
94
95<procedure>(int->channel-configuration integer)</procedure>
96
97==== mixer-quality
98
99<procedure>(mixer-quality->int mixer-quality)</procedure>
100
101{{mixer-quality}} may be one of the following symbols:
102* point
103* linear
104
105<procedure>(int->mixer-quality integer)</procedure>
106
107==== playmode
108
109<procedure>(playmode->int playmode)</procedure>
110
111{{playmode}} may be one of the following symbols:
112* once
113* loop
114* bidirectional
115
116<procedure>(int->playmode integer)</procedure>
117
118=== Records
119
120==== audio-stream
121
122<record>audio-stream</record>
123
124==== mixer
125
126<record>mixer</record>
127
128==== sample
129
130<record>sample</record>
131
132==== sample-id
133
134<record>sample-id</record>
135
136==== sample-instance
137
138<record>sample-instance</record>
139
140==== voice
141
142<record>voice</record>
143
144=== Functions
145
146==== Audio
147
148<procedure>(make-sample* (blob buffer) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration (bool free-buffer))</procedure>
149
150Implements al_create_sample.
151
152<procedure>(make-sample (blob buffer) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration (bool free-buffer))</procedure>
153
154Implements al_create_sample, with (free-sample!) declared as a finalizer.
155
156<procedure>(free-sample! sample)</procedure>
157
158Implements al_destroy_sample.
159
160<procedure>(make-sample-instance* sample)</procedure>
161
162Implements al_create_sample_instance.
163
164<procedure>(make-sample-instance sample)</procedure>
165
166Implements al_create_sample_instance, with (free-sample-instance!) declared as a finalizer.
167
168<procedure>(free-sample-instance! sample)</procedure>
169
170Implements al_destroy_sample_instance.
171
172<procedure>(sample-frequency sample)</procedure>
173
174Implements al_get_sample_frequenecy.
175
176<procedure>(sample-length sample)</procedure>
177
178Implements al_get_sample_length.
179
180<procedure>(sample-depth sample)</procedure>
181
182Implements al_get_sample_depth.
183
184<procedure>(sample-channels sample)</procedure>
185
186Implements al_get_sample_channels.
187
188<procedure>(sample-instance-frequency sample-instance)</procedure>
189
190Implements al_get_sample_instance_frequency.
191
192<procedure>(sample-instance-length sample-instance)</procedure>
193
194Implements al_get_sample_instance_length.
195
196<procedure>(sample-instance-position sample-instance)</procedure>
197
198Implements al_get_sample_instance-position.
199
200<procedure>(sample-instance-speed sample-instance)</procedure>
201
202Implements al_get_sample_instance_speed.
203
204<procedure>(sample-instance-gain sample-instance)</procedure>
205
206Implements al_get_sample_instance_gain.
207
208<procedure>(sample-instance-pan sample-instance)</procedure>
209
210Implements al_get_sample_instance_pan.
211
212<procedure>(sample-instance-time sample-instance)</procedure>
213
214Implements al_get_sample_instance_time.
215
216<procedure>(sample-instance-depth sample-instance)</procedure>
217
218Implements al_get_sample_instance_depth.
219
220<procedure>(sample-instance-channels sample-instance)</procedure>
221
222Implements al_get_sample_instance_channels.
223
224<procedure>(sample-instance-playmode sample-instance)</procedure>
225
226Implements al_get_sample_instance_playmode.
227
228<procedure>(sample-instance-playing? sample-instance)</procedure>
229
230Implements al_get_sample_instance_playing.
231
232<procedure>(sample-instance-attached? sample-instance)</procedure>
233
234Implements al_get_sample_instance_attached.
235
236<procedure>(sample-instance-position-set! sample-instance unsigned-integer)</procedure>
237
238Implements al_set_sample_instance_position.
239
240<procedure>(sample-instance-length-set! sample-instance unsigned-integer)</procedure>
241
242Implements al_set_sample_instance_length.
243
244<procedure>(sample-instance-speed-set! sample-instance float)</procedure>
245
246Implements al_set_sample_instance_speed.
247
248<procedure>(sample-instance-gain-set! sample-instance float)</procedure>
249
250Implements al_set_sample_instance_gain.
251
252<procedure>(sample-instance-pan-set! sample-instance float)</procedure>
253
254Implements al_set_sample_instance_pan.
255
256<procedure>(sample-instance-playmode-set! sample-instance playmode)</procedure>
257
258Implements al_set_sample_instance_playmode.
259
260<procedure>(sample-instance-playing-set! sample-instance bool)</procedure>
261
262Implements al_set_sample_instance_playing.
263
264<procedure>(sample-instance-detach! sample-instance)</procedure>
265
266Implements al_detach_sample_instance.
267
268<procedure>(sample-instance-sample sample-instance)</procedure>
269
270Implements al_get_sample.
271
272<procedure>(sample-instance-sample-set! sample-instance sample)</procedure>
273
274Implements al_set_sample
275
276<procedure>(sample-instance-play sample-instance)</procedure>
277
278Implements al_play_sample_instance.
279
280<procedure>(sample-instance-stop sample-instance)</procedure>
281
282Implements al_stop_sample_instance.
283
284<procedure>(make-audio-stream* (integer buffer-count) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration)</procedure>
285
286Implements al_create_audio_stream.
287
288<procedure>(make-audio-stream (integer buffer-count) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration)</procedure>
289
290Implements al_create_audio_stream, with (free-audio-stream!) declared as a finalizer.
291
292<procedure>(free-audio-stream! audio-stream)</procedure>
293
294Implements al_destroy_audio_stream.
295
296<procedure>(audio-stram-drain audio-stream)</procedure>
297
298Implements al_drain_audio_stream.
299
300<procedure>(audio-stream-frequency audio-stream)</procedure>
301
302Implements al_get_audio_stream_frequency.
303
304<procedure>(audio-stream-length audio-stream)</procedure>
305
306Implements al_get_audio_stream_length.
307
308<procedure>(audio-stream-fragments audio-stream)</procedure>
309
310Implements al_get_available_audio_stream_fragments.
311
312<procedure>(audio-stream-available-fragments audio-stream)</procedure>
313
314Implements al_get_available_audio_stream_fragments.
315
316<procedure>(audio-stream-speed audio-stream)</procedure>
317
318Implements al_get_audio_stream_speed.
319
320<procedure>(audio-stream-gain audio-stream)</procedure>
321
322Implements al_get_audio_stream_gain.
323
324<procedure>(audio-stream-channels audio-stream)</procedure>
325
326Implements al_get_audio_stream_channels.
327
328<procedure>(audio-stream-depth audio-stream)</procedure>
329
330Implements al_get_audio_stream_depth.
331
332<procedure>(audio-stream-playmode audio-stream)</procedure>
333
334Implements al_get_audio_stream_playmode.
335
336<procedure>(audio-stream-playing? audio-stream)</procedure>
337
338Implements al_get_audio_stream_playing.
339
340<procedure>(audio-stream-attached? audio-stream)</procedure>
341
342Implements al_get_audio_stream_attached.
343
344<procedure>(audio-stream-fragment audio-stream)</procedure>
345
346Implements al_get_audio_stream_fragment.
347
348<procedure>(audio-stream-speed-set! audio-stream float)</procedure>
349
350Implements al_set_audio_stream_speed.
351
352<procedure>(audio-stream-gain-set! audio-stream float)</procedure>
353
354Implements al_set_audio_stream_gain.
355
356<procedure>(audio-stream-pan-set! audio-stream float)</procedure>
357
358Implements al_set_audio_stream_pan.
359
360<procedure>(audio-stream-playmode-set! audio-stream playmode)</procedure>
361
362Implements al_set_audio_stream_playmode.
363
364<procedure>(audio-stream-playing-set! audio-stream bool)</procedure>
365
366Implements al_set_audio_stream_playing.
367
368<procedure>(audio-stream-detach! audio-stream)</procedure>
369
370Implements al_detach_audio_stream.
371
372<procedure>(audio-stream-fragment-set! audio-stream c-pointer)</procedure>
373
374Implements al_set_audio_stream_fragment.
375
376<procedure>(audio-stream-rewind! audio-stream)</procedure>
377
378Implements al_rewind_audio_stream.
379
380<procedure>(audio-stream-seek-seconds! audio-stream double)</procedure>
381
382Implements al_seek_audio_stream_secs.
383
384<procedure>(audio-stream-position-seconds audio-stream)</procedure>
385
386Impements al_get_audio_stream_position_secs.
387
388<procedure>(audio-stream-length-seconds audio-stream)</procedure>
389
390Implements al_get_audio_length_secs.
391
392<procedure>(audio-stream-loop-set! audio-stream (double start-seconds) (double end-seconds))</procedure>
393
394Implements al_set_audio_stream_loop_secs.
395
396<procedure>(audio-stream-event-source audio-stream)</procedure>
397
398Implements al_get_audio_stream_event_source.
399
400<procedure>(make-mixer* (unsigned-integer frequency) audio-depth channel-configuration)</procedure>
401
402Implements al_create_mixer.
403
404<procedure>(make-mixer (unsigned-integer frequency) audio-depth channel-configuration)</procedure>
405
406Implements al_create_mixer, with (free-mixer!) declared as a finalizer.
407
408<procedure>(free-mixer! mixer)</procedure>
409
410Implements al_destroy_mixer.
411
412<procedure>(sample-instance-attach-to-mixer! sample-instance mixer)</procedure>
413
414Implements al_attach_sample_instance_to_mixer.
415
416<procedure>(audio-stream-attach-to-mixer! audio-stream mixer)</procedure>
417
418Implements al_attach_audio_stram_to_mixer.
419
420<procedure>(mixer-attach-to-mixer! mixer mixer)</procedure>
421
422Implements al_attach_mixer_to_mixer.
423
424<procedure>(mixer-postprocess-callback-set! mixer (function void (c-pointer unsigned-integer32 c-pointer)) (c-pointer data))</procedure>
425
426Implements al_set_mixer_postprocess_callback.
427
428<procedure>(mixer-frequency mixer)</procedure>
429
430Implements al_get_mixer_frequency.
431
432<procedure>(mixer-channels mixer)</procedure>
433
434Implements al_get_mixer_channels.
435
436<procedure>(mixer-depth mixer)</procedure>
437
438Implements al_get_mixer_depth.
439
440<procedure>(mixer-quality mixer)</procedure>
441
442Implements al_get_mixer_quality.
443
444<procedure>(mixer-playing? mixer)</procedure>
445
446Implements al_get_mixer_playing.
447
448<procedure>(mixer-attached? mixer)</procedure>
449
450Implements al_get_mixer_attached.
451
452<procedure>(mixer-frequency-set! mixer unsigned-integer)</procedure>
453
454Implements al_set_mixer_frequency.
455
456<procedure>(mixer-quality-set! mixer mixer-quality)</procedure>
457
458Implements al_set_mixer_quality.
459
460<procedure>(mixer-playing-set! mixer bool)</procedure>
461
462Implements al_set_mixer_playing.
463
464<procedure>(mixer-detach! mixer)</procedure>
465
466Implements al_detach_mixer.
467
468<procedure>(make-voice* (unsigned-integer frequency) audio-depth channel-configuration)</procedure>
469
470Implements al_create_voice.
471
472<procedure>(make-voice (unsigned-integer frequency) audio-depth channel-configuration)</procedure>
473
474Implements al_create_voice, with (free-voice!) declared as a finalizer.
475
476<procedure>(free-voice! voice)</procedure>
477
478Implements al_destroy_voice.
479
480<procedure>(sample-instance-attach-to-voice! sample-instance voice)</procedure>
481
482Implements al_attach_sample_instance_to_voice.
483
484<procedure>(audio-stream-attach-to-voice! audio-stram voice)</procedure>
485
486Implements al_attach_audio_stream_to_voice.
487
488<procedure>(mixer-attach-to-voice! mixer voice)</procedure>
489
490Implements al_attach_mixer_to_voice.
491
492<procedure>(voice-detach! voice)</procedure>
493
494Implements al_detach_voice.
495
496<procedure>(voice-frequency voice)</procedure>
497
498Implements al_get_voice_frequency.
499
500<procedure>(voice-position voice)</procedure>
501
502Implements al_get_voice_position voice)</procedure>
503
504<procedure>(voice-channels voice)</procedure>
505
506Implements al_get_voice_channels.
507
508<procedure>(voice-depth voice)</procedure>
509
510Implements al_get_voice_depth.
511
512<procedure>(voice-playing? voice)</procedure>
513
514Implements al_get_voice_playing.
515
516<procedure>(voice-position-set! voice unsigned-integer)</procedure>
517
518Implements al_set_voice_position.
519
520<procedure>(voice-playing-set! voice bool)</procedure>
521
522Implements al_set_voice_playing.
523
524<procedure>(audio-addon-install)</procedure>
525
526Implements al_install_audio.
527
528<procedure>(audio-addon-uninstall)</procedure>
529
530Implements al_uninstall_audio.
531
532<procedure>(audio-addon-installed?)</procedure>
533
534Implements al_is_audio_installed.
535
536<procedure>(audio-addon-version)</procedure>
537
538Implements al_get_allegro_audio_version.
539
540<procedure>(channel-configuration-count channel-configuration)</procedure>
541
542Implements al_get_channel_count.
543
544<procedure>(audio-depth-size audio-depth)</procedure>
545
546Implements al_get_audio_depth_size.
547
548<procedure>(default-mixer)</procedure>
549
550Implements al_get_default_mixer.
551
552<procedure>(default-mixer-set! mixer)</procedure>
553
554Implements al_set_default_mixer.
555
556<procedure>(default-mixer-restore!)</procedure>
557
558Implements al_restore_default_mixer.
559
560<procedure>(sample-play sample (float gain) (float pan) (float speed) playmode sample-id)</procedure>
561
562Implements al_play_sample.
563
564The Sample ID is written to the provided sample-id struct.
565
566<procedure>(sample-stop sample-id)</procedure>
567
568Implements al_stop_sample.
569
570<procedure>(reserve-samples integer)</procedure>
571
572Implements al_reserve_samples.
573
574<procedure>(stop-all-samples)</procedure>
575
576Implements al_stop_samples.
577
578<procedure>(register-sample-loader (string extension) (function sample ((const string))))</procedure>
579
580Implements al_register_sample_loader.
581
582<procedure>(register-sample-saver (string extension) (function bool ((const c-string) sample)))</procedure>
583
584Implements al_register_sample_saver.
585
586<procedure>(register-audio-stream-loader (string extension) (function audio-stream ((const string) size_t unsigned-integer32)))</procedure>
587
588Implements al_register_audio_stream_loader.
589
590<procedure>(register-sample-file-loader (string extension) (function sample (file)))</procedure>
591
592Implements al_register_sample_loader_f.
593
594<procedure>(register-sample-file-saver (string extension) (function bool (file sample)))</procedure>
595
596Implements al_register_sample_saver_f.
597
598<procedure>(register-audio-stream-file-loader (string extension) (function audio-stream (file size_t unsigned-integer)))</procedure>
599
600Implements al_register_audio_stream_loader_f.
601
602<procedure>(load-sample* string)</procedure>
603
604Implements al_load_sample.
605
606<procedure>(load-sample string)</procedure>
607
608Implements al_load_sample, with (free-sample!) declared as a finalizer.
609
610<procedure>(load-audio-stream* string (integer buffer-count) (unsigned-integer samples))</procedure>
611
612Implements al_load_audio_stream.
613
614<procedure>(load-audio-stream string (integer buffer-count) (unsigned-integer samples))</procedure>
615
616Implements al_load_audio_stream, with (free-audio-stream!) declared as a finalizer.
617
618<procedure>(load-audio-stream-from-file* file (string identity) (integer buffer-count) (unsigned-integer samples))</procedure>
619
620Implements al_load_audio_straem_from_file.
621
622<procedure>(load-audio-stream-from-file file (string identity) (integer buffer-count) (unsigned-integer samples))</procedure>
623
624Implements al_load_audio_straem_from_file, with (free-audio-stream!) declared as a finalizer.
625
626<procedure>(load-sample-from-file* file (string identity))</procedure>
627
628Implements al_load_sample_f.
629
630<procedure>(load-sample-from-file file (string identity))</procedure>
631
632Implements al_load_sample_f, with (free-sample!) declared as a finalizer.
633
634<procedure>(sample-save-to-file sample file (string identity))</procedure>
635
636Implements al_save_sample_f.
637
638<procedure>(sample-save sample (string filename))</procedure>
639
640Implements al_save_sample.
641
642
643==== Audio Codec Addon
644
645<procedure>(acodec-addon-init)</procedure>
646
647Implements al_init_acodec_addon.
648
649<procedure>(acodec-addon-version)</procedure>
650
651Implements al_get_allegro_acodec_version.
652
653
654== Bitmaps
655
656=== Enums
657
658==== bitmap-flag
659
660<procedure>(bitmap-flag->int bitmap-flag)</procedure>
661
662{{bitmap-flag}} may be one of the following symbols:
663* memory-bitmap
664* keep-bitmap-format
665* force-locking
666* no-preserve-texture
667* alpha-test
668* min-linear
669* mag-linear
670* mipmap
671* no-premultiplied-alpha
672* video-bitmap
673
674<procedure>(int->bitmap-flag integer)</procedure>
675
676==== blend-operation
677
678<procedure>(blend-operation->int blend-operation)</procedure>
679
680{{blend-operation}} may be one of the following symbols:
681* add
682* source-minus-destination
683* destination-minus-source
684
685<procedure>(int->blend-operation integer)</procedure>
686
687==== blending-mode
688
689<procedure>(blending-mode->int blending-mode)</procedure>
690
691{{blending-mode}} may be one of the following symbols:
692* zero
693* one
694* alpha
695* inverse-alpha
696
697<procedure>(int->blending-mode integer)</procedure>
698
699==== blitting-flag
700
701<procedure>(blitting-flag->int blitting-flag)</procedure>
702
703{{blitting-flag}} may be one of the following symbols:
704* flip-horizontal
705* flip-vertical
706
707<procedure>(int->blitting-flag integer)</procedure>
708
709==== locking-flag
710
711<procedure>(locking-flag->int locking-flag)</procedure>
712
713{{locking-flag}} may be one of the following symbols:
714* read-write
715* read-only
716* write-only
717
718<procedure>(int->locking-flag integer)</procedure>
719
720==== pixel-format
721
722<procedure>(pixel-format->int pixel-format)</procedure>
723
724{{pixel-format}} may be one of the following symbols:
725* any
726* any-no-alpha
727* any-with-alpha
728* any-15-no-alpha
729* any-16-no-alpha
730* any-16-with-alpha
731* any-24-no-alpha
732* any-32-no-alpha
733* any-32-with-alpha
734* argb-8888
735* rgba-8888
736* argb-4444
737* rgb-888
738* rgb-565
739* rgb555
740* rgba-5551
741* argb-1555
742* abgr-8888
743* xbgr-8888
744* bgr-888
745* bgr-565
746* bgr-555
747* rgbx-8888
748* xrgb-8888
749* abgr-f32
750* abgr-8888-le
751* rgba-4444
752
753<procedure>(int->pixel-format integer)</procedure>
754
755=== Records
756
757==== bitmap
758
759<record>bitmap</record>
760
761==== locked-region
762
763<record>locked-region</record>
764<procedure>(free-locked-region! locked-region)</procedure>
765<procedure>(locked-region-data locked-region)</procedure>
766<procedure>(locked-region-format locked-region)</procedure>
767<procedure>(locked-region-pitch locked-region)</procedure>
768<procedure>(locked-region-pixel-size locked-region)</procedure>
769
770=== Functions
771
772==== Bitmap
773
774<procedure>(new-bitmap-format-set! pixel-format)</procedure>
775
776Implements al_set_new_bitmap_format.
777
778<procedure>(new-bitmap-format)</procedure>
779
780Implements al_get_new_bitmap_flags.
781
782<procedure>(new-bitmap-flags-set! bitmap-flag)</procedure>
783
784Implements al_set_new_bitmap_flags.
785
786<procedure>(new-bitmap-flags)</procedure>
787
788Implements al_get_new_bitmap_flags.
789
790<procedure>(new-bitmap-add-flag bitmap-flag)</procedure>
791
792Implements al_add_new_bitmap_flag.
793
794<procedure>(make-bitmap* (integer width) (integer height))</procedure>
795
796Implements al_create_bitmap.
797
798<procedure>(make-bitmap (integer width) (integer height))</procedure>
799
800Implements al_create_bitmap, with (free-bitmap!) declared as a finalizer.
801
802<procedure>(bitmap-draw bitmap (float dx) (float dy) bitmap-flag)</procedure>
803
804Implements al_draw_bitmap.
805
806<procedure>(draw-bitmap bitmap (float dx) (float dy) bitmap-flag)</procedure>
807
808Implements al_draw_bitmap.
809
810<procedure>(bitmap-draw-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))</procedure>
811
812Implements al_draw_bitmap_region.
813
814<procedure>(draw-bitmap-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))</procedure>
815
816Implements al_draw_bitmap_region.
817
818<procedure>(bitmap-draw-scaled bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))</procedure>
819
820Implements al_draw_scaled_bitmap.
821
822<procedure>(draw-scaled-bitmap bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))</procedure>
823
824Implements al_draw_scaled_bitmap.
825
826<procedure>(bitmap-draw-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))</procedure>
827
828Implements al_draw_rotated_bitmap.
829
830<procedure>(draw-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))</procedure>
831
832Implements al_draw_rotated_bitmap.
833
834<procedure>(bitmap-draw-scaled-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))</procedure>
835
836Implements al_draw_scaled_rotated_bitmap.
837
838<procedure>(draw-scaled-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))</procedure>
839
840Implements al_draw_scaled_rotated_bitmap.
841
842<procedure>(bitmap-draw-tinted (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))</procedure>
843
844Implements al_draw_tinted_bitmap.
845
846<procedure>(draw-tinted-bitmap (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))</procedure>
847
848Implements al_draw_tinted_bitmap.
849
850<procedure>(bitmap-draw-tinted-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))</procedure>
851
852Implements al_draw_tinted_bitmap_region.
853
854<procedure>(draw-tinted-bitmap-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))</procedure>
855
856Implements al_draw_tinted_bitmap_region.
857
858<procedure>(bitmap-draw-tinted-scaled (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer flags))</procedure>
859
860Implements al_draw_tinted_scale_bitmap.
861
862<procedure>(draw-tinted-scaled-bitmap (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer flags))</procedure>
863
864Implements al_draw_tinted_scale_bitmap.
865
866<procedure>(bitmap-draw-tinted-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))</procedure>
867
868Implements al_draw_tinted_rotated_bitmap.
869
870<procedure>(draw-tinted-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))</procedure>
871
872Implements al_draw_tinted_rotated_bitmap.
873
874<procedure>(bitmap-draw-tinted-scaled-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer flags))</procedure>
875
876Implements al_draw_tinted_scaled_rotated_bitmap.
877
878<procedure>(draw-tinted-scaled-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer flags))</procedure>
879
880Implements al_draw_tinted_scaled_rotated_bitmap.
881
882<procedure>(bitmap-lock*! bitmap pixel-format (integer locking-flag))</procedure>
883
884Implements al_lock_bitmap.
885
886<procedure>(lock-bitmap*! bitmap pixel-format (integer locking-flag))</procedure>
887
888Implements al_lock_bitmap.
889
890<procedure>(bitmap-lock-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))</procedure>
891
892Implements al_lock_bitmap_region.
893
894<procedure>(lock-bitmap-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))</procedure>
895
896Implements al_lock_bitmap_region.
897
898<procedure>(bitmap-unlock! bitmap)</procedure>
899
900Implements al_unlock_bitmap.
901
902<procedure>(unlock-bitmap! bitmap)</procedure>
903
904Implements al_unlock_bitmap.
905
906<procedure>(bitmap-lock! bitmap pixel-format (integer bitmap-flags))</procedure>
907
908Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
909
910<procedure>(lock-bitmap! bitmap pixel-format (integer bitmap-flags))</procedure>
911
912Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
913
914<procedure>(bitmap-lock-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))</procedure>
915
916Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
917
918<procedure>(lock-bitmap-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))</procedure>
919
920Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
921
922<procedure>(bitmap-pixel! (bitmap bmp) (int x) (int y) (color c))</procedure>
923
924Sets the provided color struct to the color value at the given coordinates.
925
926<procedure>(bitmap-pixel* (bitmap bmp) (int x) (int y))</procedure>
927
928Returns a new color struct of the color value at the given coordinates.
929
930<procedure>(bitmap-pixel (bitmap bmp) (int x) (int y))</procedure>
931
932Returns a new color struct of the color value at the given coordinates, with (free-color!) declared as a finalizer.
933
934<procedure>(bitmap-width bitmap)</procedure>
935
936Implements al_get_bitmap_width.
937
938<procedure>(bitmap-height bitmap)</procedure>
939
940Implements al_get_bitmap_height.
941
942<procedure>(bitmap-format bitmap)</procedure>
943
944Implements al_get_bitmap_format.
945
946<procedure>(bitmap-flags bitmap)</procedure>
947
948Implements al_get_bitmap_flags.
949
950<procedure>(bitmap-mask->alpha! bitmap color)</procedure>
951
952Implements al_convert_mask_to_alpha.
953
954<procedure>(bitmap-clone* bitmap)</procedure>
955
956Implements al_clone_bitmap.
957
958<procedure>(bitmap-clone bitmap)</procedure>
959
960Implements al_clone_bitmap, with (free-bitmap!) declared as a finalizer.
961
962<procedure>(bitmap-locked? bitmap)</procedure>
963
964Implements al_is_bitmap_locked.
965
966<procedure>(bitmap-put-pixel! bitmap (integer x) (integer y) (color c))</procedure>
967
968Implements _al_put_pixel.
969
970<procedure>(make-sub-bitmap* bitmap (integer x) (integer y) (integer width) (integer height))</procedure>
971
972Implements al_create_sub_bitmap.
973
974<procedure>(make-sub-bitmap bitmap (integer x) (integer y) (integer width) (integer height))</procedure>
975
976Implements al_create_sub_bitmap, with (free-bitmap!) declared as a finalizer.
977
978<procedure>(sub-bitmap? bitmap)</procedure>
979
980Implements al_is_sub_bitmap.
981
982<procedure>(put-pixel (integer x) (integer y) (color c))</procedure>
983
984Implements al_put_pixel.
985
986<procedure>(put-blended-pixel (integer x) (integer y) (color c))</procedure>
987
988Implements al_put_blended_pixel.
989
990<procedure>(pixel-size pixel-format)</procedure>
991
992Implements al_get_pixel_size.
993
994<procedure>(color-map-rgb! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))</procedure>
995
996Maps rgb values onto the provided color struct, implementing al_map_rgb.
997
998<procedure>(color-map-rgba! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))</procedure>
999
1000Maps rgba values onto the provided color struct, implementing al_map_rgba.
1001
1002<procedure>(color-map-rgb-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))</procedure>
1003
1004Maps rgb values onto the provided color struct, implementing al_map_rgb_f.
1005
1006<procedure>(color-map-rgba-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))</procedure>
1007
1008Maps rgba values onto the provided color struct, implementing al_map_rgba_f.
1009
1010<procedure>(map-rgb* r g b)</procedure>
1011
1012Returns a new color struct mapped to the given rgb values.
1013
1014<procedure>(map-rgb r g b)</procedure>
1015
1016Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.
1017
1018<procedure>(map-rgba* r g b a)</procedure>
1019
1020Prodcues a new color struct mapped to the given rgba values.
1021
1022<procedure>(map-rgba r g b a)</procedure>
1023
1024Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.
1025
1026<procedure>(map-rgb-float* r g b)</procedure>
1027
1028Returns a new color struct mapped to the given rgb values.
1029
1030<procedure>(map-rgb-float r g b)</procedure>
1031
1032Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.
1033
1034<procedure>(map-rgba-float* r g b a)</procedure>
1035
1036Returns a new color struct mapped to the given rgba values.
1037
1038<procedure>(map-rgba-float r g b a)</procedure>
1039
1040Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.
1041
1042<procedure>(color-unmap-rgb color)</procedure>
1043
1044Returns a 3-element list of the rgb values representing a given color struct.
1045
1046<procedure>(color-unmap-rgba color)</procedure>
1047
1048Returns a 4-element list of the rgba values representing a given color struct.
1049
1050<procedure>(color-unmap-rgb-float color)</procedure>
1051
1052Returns a 3-element list of the rgb values representing a given color struct.
1053
1054<procedure>(color-unmap-rgba-float color)</procedure>
1055
1056Returns a 4-element list of the rgb values representing a given color struct.
1057
1058<procedure>(pixel-format-bits pixel-format)</procedure>
1059
1060Implements al_get_pixel_format_bits.
1061
1062<procedure>(clipping-rectangle)</procedure>
1063
1064Returns a 4-element list of the x, y, width and height values of the current clipping rectangle.
1065
1066<procedure>(clippingle-rectangle-set! (integer x) (integer y) (integer width) (integer height))</procedure>
1067
1068Sets the current clipping rectangle.
1069
1070<procedure>(blender)</procedure>
1071
1072Returns a 3-element list of the op, source and destination of the current blender.
1073
1074<procedure>(blender-set! (blend-operation op) (integer source) (integer destination))</procedure>
1075
1076Implements al_set_blender.
1077
1078<procedure>(separate-blender)</procedure>
1079
1080Returns a 6-element list of the op, source, destination, alpha op, alpha source, and alpha destination.
1081
1082<procedure>(separate-blender-set! (blend-operation op) (integer src) (integer destination) (integer alpha-op) (integer alpha-source) (integer alpha-destination))</procedure>
1083
1084Implements al_set_separate_blender.
1085
1086==== Bitmap I/O
1087
1088<procedure>(register-bitmap-loader (string extension) (function bitmap ((const c-string))))</procedure>
1089
1090Implements al_register_bitmap_loader.
1091
1092<procedure>(register-bitmap-file-loader (string extension) (function bitmap (file)))</procedure>
1093
1094Implements al_register_bitmap_loader_f.
1095
1096<procedure>(register-bitmap-saver (string extension) ((function bool ((const c-string) bitmap)) saver))</procedure>
1097
1098Implements al_register_bitmap_saver.
1099
1100<procedure>(register-bitmap-file-saver (string extension) ((function bool (file bitmap)) saver))</procedure>
1101
1102Implements al_register_bitmap_saver_f.
1103
1104<procedure>(load-bitmap* string)</procedure>
1105
1106Implements al_load_bitmap.
1107
1108<procedure>(load-bitmap string)</procedure>
1109
1110Implements al_load_bitmap, with (free-bitmap!) declared as a finalizer.
1111
1112<procedure>(load-bitmap-from-file* file string)</procedure>
1113
1114Implements al_load_bitmap_f.
1115
1116<procedure>(load-bitmap-from-file file string)</procedure>
1117
1118Implements al_load_bitmap_f, with (free-bitmap!) declared as a finalizer.
1119
1120<procedure>(bitmap-save bitmap string)</procedure>
1121
1122Implements al_save_bitmap.
1123
1124<procedure>(bitmap-save-to-file bitmap file string)</procedure>
1125
1126Implements al_save_bitmap_f.
1127
1128
1129== Colors
1130
1131=== Records
1132
1133==== color
1134
1135<record>color</record>
1136<procedure>(make-color*)</procedure>
1137<procedure>(make-color)</procedure>
1138<procedure>(free-color! color)</procedure>
1139<procedure>(color-red color)</procedure>
1140<procedure>(color-green color)</procedure>
1141<procedure>(color-blue color)</procedure>
1142<procedure>(color-alpha color)</procedure>
1143
1144=== Functions
1145
1146==== Color
1147
1148<procedure>(color-addon-version)</procedure>
1149
1150Implements al_get_allegro_color_version.
1151
1152<procedure>(hsv->rgb (float h) (float s) (float v))</procedure>
1153
1154Returns a 3-element list consisting of the rgb elements.
1155
1156<procedure>(rgb->hsl (float red) (float green) (float blue))</procedure>
1157
1158Returns a 3-element list consisting of the hsl elements.
1159
1160<procedure>(hsl->rgb (float hue) (float saturation) (float lightness))</procedure>
1161
1162Returns a 3-element list consisting of the rgb elements.
1163
1164<procedure>(name->rgb string)</procedure>
1165
1166Returns a 3-element list consisting of the rgb elements.
1167
1168<procedure>(rgb->name (float red) (float green) (float blue))</procedure>
1169
1170Returns a string representation of the rgb elements.
1171
1172<procedure>(cmyk->rgb (float cyan) (float magenta) (float yellow) (float key))</procedure>
1173
1174Returns a 3-element list consisting of the rgb elements.
1175
1176<procedure>(rgb->cmyk (float red) (float green) (float blue))</procedure>
1177
1178Returns a 4-element list consisting of the cmyk elements.
1179
1180<procedure>(yuv->rgb (float y) (float u) (float v))</procedure>
1181
1182Returns a 3-element list consisting of the rgb elements.
1183
1184<procedure>(rgb->yuv (float red) (float green) (float blue))</procedure>
1185
1186Returns a 3-element list consisting of the yuv elements.
1187
1188<procedure>(rgb->html (float red) (float green) (float blue))</procedure>
1189
1190Returns a string consisting of the html representation.
1191
1192<procedure>(html->rgb string)</procedure>
1193
1194Returns a 3-element list consisting of the rgb elements.
1195
1196<procedure>(make-color-rgb* (integer r) (integer g) (integer b))</procedure>
1197
1198Creates a color struct from rgb elements.
1199
1200<procedure>(make-color-rgb (integer r) (integer g) (integer b))</procedure>
1201
1202Creates a color struct from rgb elements, with (free-color!) declared as a finalizer.
1203
1204<procedure>(make-color-rgba*(integer r) (integer g) (integer b) (integer a))</procedure>
1205
1206Creates a color struct from rgba elements.
1207
1208<procedure>(make-color-rgba (integer r) (integer g) (integer b) (integer a))</procedure>
1209
1210Creates a color struct from rgba elements, with (free-color!) declared as a finalizer.
1211
1212<procedure>(make-color-yuv* (integer y) (integer u) (integer v))</procedure>
1213
1214Creates a color struct from yuv elements.
1215
1216<procedure>(make-color-yuv (integer y) (integer u) (integer v))</procedure>
1217
1218Creates a color struct from yuv elements, with (free-color!) declared as a finalizer.
1219
1220<procedure>(make-color-cmyk* (integer c) (integer m) (integer y) (integer k))</procedure>
1221
1222Creates a color struct from cmyk elements.
1223
1224<procedure>(make-color-cmyk  (integer c) (integer m) (integer y) (integer k))</procedure>
1225
1226Creates a color struct from cmyk elements, with (free-color!) declared as a finalizer.
1227
1228<procedure>(make-color-hsl*(integer h) (integer s) (integer l))</procedure>
1229
1230Creates a color struct from hsl elements.
1231
1232<procedure>(make-color-hsl  (integer h) (integer s) (integer l))</procedure>
1233
1234Creates a color struct from hsl elements, with (free-color!) declared as a finalizer.
1235
1236<procedure>(make-color-hsv*(integer h) (integer s) (integer v))</procedure>
1237
1238Creates a color struct from hsv elements.
1239
1240<procedure>(make-color-hsv  (integer h) (integer s) (integer v))</procedure>
1241
1242Creates a color struct from hsv elements, with (free-color!) declared as a finalizer.
1243
1244<procedure>(make-color-name* string)</procedure>
1245
1246Creates a color struct from a string name.
1247
1248<procedure>(make-color-name string)</procedure>
1249
1250Creates a color struct from a string name, with (free-color!) declared as a finalizer.
1251
1252<procedure>(make-color-html* string)</procedure>
1253
1254Creates a color struct from a html representation.
1255
1256<procedure>(make-color-html string)</procedure>
1257
1258Creates a color struct from a html representation, with (free-color!) declared as a finalizer.
1259
1260<procedure>(color-yuv! color (float y) (float u) (float v))</procedure>
1261
1262Maps yuv elements to a color struct.
1263
1264<procedure>(color-cmyk! color (float c) (float m) (float y) (float k))</procedure>
1265
1266Maps cmyk elements to a color struct.
1267
1268<procedure>(color-hsl! color (float h) (float s) (float l))</procedure>
1269
1270Maps hsl elements to a color struct.
1271
1272<procedure>(color-hsv! color (float h) (float s) (float v))</procedure>
1273
1274Maps hsv elements to a color struct.
1275
1276<procedure>(color-name! color string)</procedure>
1277
1278Maps a color name to a color struct.
1279
1280<procedure>(color-html! color string)</procedure>
1281
1282Maps a html representation to a color struct.
1283
1284
1285== Config
1286
1287=== Records
1288
1289==== config
1290
1291<record>config</record>
1292
1293==== config-entry
1294
1295<record>config-entry</config>
1296
1297==== config-section
1298
1299<record>config-section</record>
1300
1301=== Functions
1302
1303==== Config Files
1304
1305<procedure>(make-config*)</procedure>
1306
1307Implements al_create_config.
1308
1309<procedure>(make-config)</procedure>
1310
1311Implements al_create_config, with (free-config!) declared as a finalizer.
1312
1313<procedure>(free-config! config)</procedure>
1314
1315Implements al_destroy_config.
1316
1317<procedure>(config-section-add! config string)</procedure>
1318
1319Implements al_add_config_section.
1320
1321<procedure>(config-value-set! config (string section) (string key) (string value))</procedure>
1322
1323Implements al_set_config_value.
1324
1325<procedure>(config-comment-add! config (string section) (string comment))</procedure>
1326
1327Implements al_add_config_comment.
1328
1329<procedure>(config-value config (string section) (string key))</procedure>
1330
1331Implements al_get_config_value.
1332
1333<procedure>(load-config* string)</procedure>
1334
1335Implements al_load_config_file.
1336
1337<procedure>(load-config string)</procedure>
1338
1339Implements al_load_config_file, with (free-config!) decalred as a finalizer.
1340
1341<procedure>(load-config-from-file* file)</procedure>
1342
1343Implements al_load_config_file_f.
1344
1345<procedure>(load-config-from-file file)</procedure>
1346
1347Implements al_load_config_file_f, with (free-config!) declared as a finalizer.
1348
1349<procedure>(config-save config string)</procedure>
1350
1351Implements al_save_config_file.
1352
1353<procedure>(config-save-to-file config file)</procedure>
1354
1355Implements al_save_config_file_f.
1356
1357<procedure>(config-merge! config config)</procedure>
1358
1359Implements al_merge_config_into.
1360
1361<procedure>(config-merge config config)</procedure>
1362
1363Implements al_merge_config.
1364
1365<procedure>(config-sections config)</procedure>
1366
1367Creates an iterator that covers the sections of the given config.
1368
1369Returns values of the form (list config-section promise).
1370
1371(force) the promise to get the next section.
1372
1373Needs testing!
1374
1375<procedure>(config-entries config config-section)</procedure>
1376
1377Creates an iterator that covers the entries of the given config and config-section.
1378
1379Returns values of the form (list config-entry promise).
1380
1381(force) the promise to get the next entry.
1382
1383Needs testing!
1384
1385
1386== Debugging
1387
1388== Functions
1389
1390=== Debugging
1391
1392<procedure>(trace-prefix (string channel) (int level) (string file) (int line) (string function))</procedure>
1393
1394Implements _al_trace_prefix.
1395
1396<procedure>(trace-level-debug)</procedure>
1397
1398Implements ALLEGRO_DEBUG.
1399
1400<procedure>(trace-level-info)</procedure>
1401
1402Implements ALLEGRO_INFO.
1403
1404<procedure>(trace-level-warn)</procedure>
1405
1406Implements ALLEGRO_WARN.
1407
1408<procedure>(trace-level-error)</procedure>
1409
1410Implements ALLEGRO_ERROR.
1411
1412<procedure>(debug-assert bool)</procedure>
1413
1414Implements ALLEGRO_ASSERT.
1415
1416=== Errors
1417
1418<procedure>(error-number)</procedure>
1419
1420Implements al_get_errno.
1421
1422<procedure>(error-number-set!)</procedure>
1423
1424Implements al_set_errno.
1425
1426
1427== Displays
1428
1429=== Constants
1430
1431* default-display-adapter
1432* vertex-cache-size
1433
1434=== Enums
1435
1436==== display-flag
1437
1438<procedure>(display-flag->int display-flag)</procedure>
1439
1440{{display-flag}} may be one of the following symbols:
1441* windowed
1442* fullscreen
1443* opengl
1444* direct3d-internal
1445* resizable
1446* noframe
1447* generate-expose-events
1448* opengl3
1449* opengl-forward-compatible
1450* fullscreen-window
1451* minimized
1452
1453<procedure>(int->display-flag integer)</procedure>
1454
1455==== display-option
1456
1457<procedure>(display-option->int display-option)</procedure>
1458
1459{{display-option}} may be one of the following symbols:
1460* red-size
1461* green-size
1462* blue-size
1463* alpha-size
1464* red-shift
1465* green-shift
1466* blue-shift
1467* alpha-shift
1468* acc-red-size
1469* acc-green-size
1470* acc-blue-size
1471* acc-alpha-size
1472* stereo
1473* aux-buffers
1474* color-size
1475* depth-size
1476* stencil-size
1477* sample-buffers
1478* samples
1479* render-method
1480* float-color
1481* float-depth
1482* single-buffer
1483* swap-method
1484* compatible-display
1485* update-display-region
1486* vsync
1487* max-bitmap-size
1488* support-npot-bitmap
1489* can-draw-into-bitmap
1490* support-separate-alpha
1491
1492<procedure>(int->display-option integer)</procedure>
1493
1494==== display-option-importance
1495
1496<procedure>(display-option-importance->int display-option-importance)</procedure>
1497
1498{{display-option-importance}} may be one of the following symbols:
1499* dont-care
1500* require
1501* suggest
1502
1503<procedure>(int->display-option-importance integer)</procedure>
1504
1505==== display-orientation
1506
1507<procedure>(display-orientation->int display-orientation)</procedure>
1508
1509{{display-orientation}} may be one of the following symbols:
1510* degrees-0
1511* degrees-90
1512* degrees-180
1513* degrees-270
1514* face-up
1515* face-down
1516
1517<procedure>(int->display-oprientation integer)</procedure>
1518
1519
1520==== gl-variant
1521
1522<procedure>(gl-variant->int gl-variant)</procedure>
1523
1524{{gl-variant}} may be one of the following symbols:
1525* opengl
1526* opengl-es
1527
1528<procedure>(int->gl-variant integer)</procedure>
1529
1530=== Records
1531==== display
1532
1533<record>display</record>
1534
1535==== display-mode
1536
1537<record>display-mode</record>
1538<procedure>(make-display-mode*)</procedure>
1539<procedure>(make-display-mode)</procedure>
1540<procedure>(free-display-mode! display-mode)</procedure>
1541<procedure>(display-mode-width display-mode)</procedure>
1542<setter>(display-mode-width-set! display-mode integer)</setter>
1543<procedure>(display-mode-height display-mode)</procedure>
1544<setter>(display-mode-height-set! display-mode integer)</setter>
1545<procedure>(display-mode-format display-mode)</procedure>
1546<setter>(display-mode-format-set! display-mode pixel-format)</setter>
1547<procedure>(display-mode-refresh-rate display-mode)</procedure>
1548<setter>(display-mode-refresh-rate-set! display-mode integer)</setter>
1549
1550==== monitor
1551
1552<record>monitor</record>
1553<procedure>(make-monitor*)</procedure>
1554<procedure>(make-monitor)</procedure>
1555<procedure>(free-monitor! monitor)</procedure>
1556<procedure>(monitor-x1 monitor)</procedure>
1557<procedure>(monitor-y1 monitor)</procedure>
1558<procedure>(monitor-x2 monitor)</procedure>
1559<procedure>(monitor-y2 monitor)</procedure>
1560
1561=== Functions
1562
1563==== Display
1564
1565<procedure>(new-display-refresh-rate)</procedure>
1566
1567Implements al_get_new_display_refresh_rate.
1568
1569<procedure>(new-display-refresh-rate-set! integer)</procedure>
1570
1571Implements al_set_new_display_refresh_rate.
1572
1573<procedure>(new-display-flags)</procedure>
1574
1575Implements al_get_new_display_flags.
1576
1577<procedure>(new-display-flags-set! integer)</procedure>
1578
1579Implements al_set_new_display_flags.
1580
1581<procedure>(new-display-adapter)</procedure>
1582
1583Implements al_get_new_display_adapter.
1584
1585<procedure>(new-display-adapter-set! integer)</procedure>
1586
1587Implements al_set_new_display_adpater.
1588
1589<procedure>(new-display-window-position)</procedure>
1590
1591Returns a 2-element list consisting of the new display coordinates.
1592
1593<procedure>(new-display-window-position-set! (integer x) (integer y))</procedure>
1594
1595Sets the a new display's window position.
1596
1597<procedure>(new-display-option-value display-option)</procedure>
1598
1599Retrieves the value for a particular display-option for newly created displays.
1600
1601<procedure>(new-display-option-importance display-option)</procedure>
1602
1603Retrieves the importance for a particular display-option for newly created dispalys.
1604
1605<procedure>(new-display-option-set! display-option (integer value) display-option-importance)</procedure>
1606
1607Implements al_set_new_display_option.
1608
1609<procedure>(new-display-reset-options)</procedure>
1610
1611Implements al_reset_new_display_options.
1612
1613<procedure>(make-display* (integer width) (integer height))</procedure>
1614
1615Implements al_create_display.
1616
1617<procedure>(make-display (integer width) (integer height))</procedure>
1618
1619Implements al_create_display, with (free-display!) declared as a finalizer.
1620
1621<procedure>(make-display/mode* display-mode (integer adapter) (integer flags))</procedure>
1622
1623Creates a new display, taking the refresh rate, width and height from a display-mode struct.
1624
1625<procedure>(make-display/mode display-mode (integer adapter) (integer flags))</procedure>
1626
1627Creates a new display, taking the refresh rate, width and height from a display-mode struct, with (free-display-mode!) declared as a finalizer.
1628
1629<procedure>(free-display! display)</procedure>
1630
1631Implements al_destroy_display.
1632
1633<procedure>(current-display)</procedure>
1634
1635Implements al_get_current_display.
1636
1637<procedure>(display-mode-count)</procedure>
1638
1639Implements al_get_num_display_modes.
1640
1641<procedure>(display-mode-init! display-mode (integer index))</procedure>
1642
1643Implements al_get_display_mode, returning #f if unsuccessful.
1644
1645<procedure>(update-display-region! (integer x) (integer y) (integer width) (integer height))</procedure>
1646
1647Implements al_update_display_region.
1648
1649<procedure>(compatible-bitmap? bitmap)</procedure>
1650
1651Implements al_is_compatible_bitmap.
1652
1653<procedure>(wait-for-vsync)</procedure>
1654
1655Implements al_wait_for_vsync.
1656
1657<procedure>(draw-pixel (float x) (floay y) color)</procedure>
1658
1659Implements al_draw_pixel.
1660
1661<procedure>(video-adapter-count)</procedure>
1662
1663Implements al_get_num_video_adapters.
1664
1665<procedure>(monitor-init! monitor (integer adapter))</procedure>
1666
1667Implements al_get_monitor_info.
1668
1669<procedure>(display-option display display-option)</procedure>
1670
1671Implements al_get_display_option.
1672
1673<setter>(display-hold-bitmap-drawing! bool)</setter>
1674
1675Implements al_hold_bitmap_drawing.
1676
1677<procedure>(display-bitmap-drawing-held?)</procedure>
1678
1679Implements al_is_bitmap_drawing_help.
1680
1681<procedure>(display-window-title-set! display string)</procedure>
1682
1683Implements al_set_window_title.
1684
1685<procedure>(display-width display)</procedure>
1686
1687Implements al_get_display_width.
1688
1689<procedure>(display-height display)</procedure>
1690
1691Implements al_get_display_height.
1692
1693<procedure>(display-format display)</procedure>
1694
1695Implements al_get_display_format.
1696
1697<procedure>(display-refresh-rate display)</procedure>
1698
1699Implements al_get_display_refresh_rate.
1700
1701<procedure>(display-flags display)</procedure>
1702
1703Implements al_get_display_flags.
1704
1705<procedure>(display-toggle-flag! display display-flag bool)</procedure>
1706
1707Implements al_toggle_display_flag.
1708
1709<procedure>(display-backbuffer display)</procedure>
1710
1711Implements al_get_backbuffer.
1712
1713<procedure>(display-acknowledge-resize display)</procedure>
1714
1715Implements al_acknowledge_resize.
1716
1717<procedure>(display-resize! display (integer width) (integer height))</procedure>
1718
1719Implements al_resize_display.
1720
1721<procedure>(display-event-source display)</procedure>
1722
1723Implements al_get_display_event_source.
1724
1725<procedure>(display-iconset! display bitmap)</procedure>
1726
1727Implements al_set_display_icon.
1728
1729<procedure>(clear-to-color color)</procedure>
1730
1731Implements al_clear_to_color.
1732
1733<procedure>(target-bitmap)</procedure>
1734
1735Implements al_get_target_bitmap.
1736
1737<procedure>(target-bitmap-set! bitmap)</procedure>
1738
1739Implements al_set_target_bitmap.
1740
1741<procedure>(target-backbuffer-set! display)</procedure>
1742
1743Implements al_set_target_backbuffer.
1744
1745<procedure>(flip-display)</procedure>
1746
1747Implements al_flip_display.
1748
1749==== Direct3D
1750
1751<procedure>(d3d-non-pow2-texture-support?)</procedure>
1752
1753Implements al_have_d3d_non_pow2_texture_support.
1754
1755<procedure>(d3d-non-square-texture-support?)</procedure>
1756
1757Implements al_have_d3d_non_square_texture_support.
1758
1759====== Bitmap Specific
1760
1761<procedure>(bitmap-d3d-system-texture bitmap)</procedure>
1762
1763Implements al_get_d3d_system_texture.
1764
1765<procedure>(bitmap-d3d-video-texture bitmap)</procedure>
1766
1767Implements al_get_d3d_video_texture.
1768
1769<procedure>(bitmap-d3d-texture-position bitmap)</procedure>
1770
1771Returns a 2-element list consisting of a u, v pair.
1772
1773====== Display Specific
1774
1775<procedure>(display-d3d-device-lost? display)</procedure>
1776
1777Implements al_is_d3d_device_lost.
1778
1779<procedure>(display-d3d-device display)</procedure>
1780
1781Implements al_get_d3d_device.
1782
1783
1784==== OpenGL
1785
1786<procedure>(opengl-addon-version)</procedure>
1787
1788Implements al_get_opengl_version.
1789
1790<procedure>(opengl-extension-exists? string)</procedure>
1791
1792Implements al_have_opengl_extension.
1793
1794<procedure>(opengl-proc-address string)</procedure>
1795
1796Implements al_get_opengl_proc_address.
1797
1798<procedure>(opengl-texture bitmap)</procedure>
1799
1800Implements al_get_opengl_texture.
1801
1802<procedure>(opengl-remove-fbo! bitmap)</procedure>
1803
1804Implements al_remove_opengl_fbo.
1805
1806<procedure>(opengl-fbo bitmap)</procedure>
1807
1808Implements al_get_opengl_fbo.
1809
1810<procedure>(opengl-texture-size bitmap)</procedure>
1811
1812Returns a 2-element list of the width and height of the opengl texture for the given bitmap.
1813
1814<procedure>(opengl-texture-position bitmap)</procedure>
1815
1816Returns a 2-element list of the u,v position of the opengl texture for the given bitmap.
1817
1818<procedure>(opengl-context-set! display)</procedure>
1819
1820Implements al_set_current_opengl_context.
1821
1822<procedure>(opengl-variant)</procedure>
1823
1824Implements al_get_opengl_variant.
1825
1826==== Windows
1827
1828<procedure>(windows-window-handle)</procedure>
1829
1830Implements al_get_win_window_handle.
1831
1832
1833== Drawing
1834
1835=== Constants
1836
1837* primitive-quality
1838
1839=== Enums
1840
1841==== primitive-attribute
1842
1843<procedure>(primitive-attribute->int primitive-attribute)</procedure>
1844
1845{{primitive-attribute}} may be one of the following symbols:
1846* position
1847* color
1848* texture-coordinate
1849* texture-pixel-coordinate
1850
1851<procedure>(int->primitive-attribute integer)</procedure>
1852
1853==== primitive-type
1854
1855<procedure>(primitive-type->int primitive-type)</procedure>
1856
1857{{primitive-type}} may be one of the following symbols:
1858* line-list
1859* line-strip
1860* line-loop
1861* triangle-list
1862* triangle-strip
1863* point-list
1864
1865<procedure>(int->primitive-type integer)</procedure>
1866
1867==== primitive-storage
1868
1869<procedure>(primitive-storage->int primitive-storage)</procedure>
1870
1871{{primitive-storage}} may be one of the following symbols:
1872* float-2
1873* float-3
1874* short-2
1875
1876<procedure>(int->primitive-storage integer)</procedure>
1877
1878=== Records
1879
1880==== transform
1881
1882<record>transform</record>
1883<procedure>(make-transform*)</procedure>
1884<procedure>(make-transform)</procedure>
1885<procedure>(free-transform! transform)</procedure>
1886<procedure>(transform-value transform i j)</procedure>
1887
1888==== vertex
1889
1890<record>vertex</record>
1891<procedure>(make-vertex*)</procedure>
1892<procedure>(make-vertex)</procedure>
1893<procedure>(free-vertex! vertex)</procedure>
1894<procedure>(vertex-x vertex)</procedure>
1895<setter>(vertex-x-set! vertex float)</setter>
1896<procedure>(vertex-y vertex)</procedure>
1897<setter>(vertex-y-set! vertex float)</setter>
1898<procedure>(vertex-z vertex)</procedure>
1899<setter>(vertex-z-set! vertex float)</setter>
1900<procedure>(vertex-u vertex)</procedure>
1901<setter>(vertex-u-set! vertex float)</setter>
1902<procedure>(vertex-v vertex)</procedure>
1903<setter>(vertex-v-set! vertex float)</setter>
1904
1905==== vertex-declaration
1906
1907<record>vertex-declaration</record>
1908
1909==== vertex-element
1910
1911<record>vertex-element</record>
1912<procedure>(make-vertex-element*)</procedure>
1913<procedure>(make-vertex-element)</procedure>
1914<procedure>(free-vertex-element! vertex-element)</procedure>
1915<procedure>(vertex-element-attribute vertex-element)</procedure>
1916<setter>(vertex-element-attribute-set! vertex-element primitive-attribute)</setter>
1917<procedure>(vertex-element-storage vertex-element)</procedure>
1918<setter>(vertex-element-storage-set! vertex-element primitive-storage)</setter>
1919<procedure>(vertex-element-offset vertex-element)</procedure>
1920<setter>(vertex-element-offset-set! vertex-element integer)</setter>
1921
1922=== Functions
1923
1924==== Image Formats
1925
1926<procedure>(image-addon-install)</procedure>
1927
1928Implements al_init_image_addon.
1929
1930<procedure>(image-addon-uninstall)</procedure>
1931
1932Implements al_shutdown_image_addon.
1933
1934<procedure>(image-addon-version)</procedure>
1935
1936Implements al_get_allegro_image_version.
1937
1938==== Primitives
1939
1940<procedure>(primitives-addon-version)</primitives>
1941
1942Implements al_get_allegro_primitives_version.
1943
1944<procedure>(primitives-addon-install)</primitives>
1945
1946Implements al_init_primitives_addon.
1947
1948<procedure>(primitives-addon-uninstall)</primitives>
1949
1950Implements al_shutdown_primitives_addon.
1951
1952<procedure>(make-vertex-declaration* vertex-element integer)</procedure>
1953
1954Implements al_create_vertex_decl.
1955
1956<procedure>(make-vertex-declaration vertex-element integer)</procedure>
1957
1958Implements al_create_vertex_decl, with (free-vertex-declaration!) declared as a finalizer.
1959
1960<procedure>(free-vertex-declaration! vertex-declaration)</procedure>
1961
1962Implements al_destroy_vertex_decl.
1963
1964<procedure>(draw-primitive (c-pointer vertices) vertex-declaration bitmap (integer start) (integer end) primitive-type)</procedure>
1965
1966Implements al_draw_prim.
1967
1968<procedure>(draw-indexed-primitive (c-pointer vertices) vertex-declaration bitmap (s32-vector indices) (integer count) primitive-type)</procedure>
1969
1970Implements al_draw_indexed_prim.
1971
1972<procedure>(draw-soft-triangle (vertex v1) (vertex v2) (vertex v3) (uintptr state)
1973                                                 ((function void (uintptr vertex vertex vertex)) init)
1974                                                 ((function void (uintptr int int int int)) first)
1975                                                 ((function void (uintptr int)) step)
1976                                                 ((function void (uintptr int int int)) draw))</procedure>
1977
1978Implements al_draw_soft_triangle.
1979
1980<procedure>(draw-soft-line (vertex v1) (vertex v2) (uintptr state)
1981                                              ((function void (uintptr int int vertex vertex)) first)
1982                                              ((function void (uintptr int)) step)
1983                                              ((function void (uintptr int int)) draw))</procedure>
1984
1985Implements al_draw_soft_line.
1986
1987<procedure>(draw-line (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))</procedure>
1988
1989Implements al_draw_line.
1990
1991<procedure>(draw-triangle (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c) (float thickness))</procedure>
1992
1993Implements al_draw_triangle.
1994
1995<procedure>(draw-rectangle (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))</procedure>
1996
1997Implements al_draw_rectangle.
1998
1999<procedure>(draw-rounded-rectangle (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c) (float thickness))</procedure>
2000
2001Implements al_draw_rounded_rectangle.
2002
2003<procedure>(draw-circle (float cx) (float cy) (float r) (color c) (float thickness))</procedure>
2004
2005Implements al_draw_circle.
2006
2007<procedure>(draw-ellipse (float cx) (float cy) (float rx) (float ry) (color c) (float thickness))</procedure>
2008
2009Implements al_draw_ellipse.
2010
2011<procedure>(draw-arc (float cx) (float cy) (float r) (float start_theta) (float delta_theta) (color c) (float thickness))</procedure>
2012
2013Implements al_draw_arc.
2014
2015<procedure>(draw-spline (f32vector points) (color c) (float thickness))</procedure>
2016
2017Implements al_draw_spline.
2018
2019<procedure>(draw-ribbon (f32vector points) (integer32 stride) (color c) (float thickness) (integer32 num_segments))</procedure>
2020
2021Implements al_draw_ribbon.
2022
2023<procedure>(draw-triangle/fill (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c))</procedure>
2024
2025Implements al_draw_filled_triangle.
2026
2027<procedure>(draw-rectangle/fill (float x1) (float y1) (float x2) (float y2) (color c))</procedure>
2028
2029Implements al_draw_filled_rectangle.
2030
2031<procedure>(draw-rounded-rectangle/fill (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c))</procedure>
2032
2033Implements al_draw_filled_rounded_rectangle.
2034
2035<procedure>(draw-circle/fill (float cx) (float cy) (float r) (color c))</procedure>
2036
2037Implements al_draw_filled_circle.
2038
2039<procedure>(draw-ellipse/fill (float cx) (float cy) (float rx) (float ry) (color c))</procedure>
2040
2041Implements al_draw_filled_ellipse.
2042
2043<procedure>(calculate-arc (integer32 stride) (float cx) (float cy) (float rx) (float ry) (float start_theta) (float delta_theta) (float thickness) (integer32 num_segments))</procedure>
2044
2045Implements al_calculate_arc.
2046
2047<procedure>(calculate-spline (integer32 stride) (f32vector points) (float thickness) (int num_segments))</procedure>
2048
2049Implements al_calculate_spline.
2050
2051<procedure>(calculate-ribbon (integer32 dest_stride) ((const f32vector) points) (integer32 points_stride) (float thickness) (integer32 num_segments))</procedure>
2052
2053Implements al_calculate_ribbon.
2054
2055
2056==== Transformations
2057
2058<procedure>(transform-use transform)</procedure>
2059
2060Implements al_use_transform.
2061
2062<procedure>(transform-copy! transform transform)</procedure>
2063
2064Implements al_copy_transform.
2065
2066<procedure>(transform-identity! transform)</procedure>
2067
2068Implements al_identity_transform.
2069
2070<procedure>(transform-build! transform (float x) (float y) (float sx) (float sy) (float theta))</procedure>
2071
2072Implements al_build_transform.
2073
2074<procedure>(transform-translate! transform (float x) (float y))</procedure>
2075
2076Implements al_translate_transform.
2077
2078<procedure>(transform-scale! transform (float sx) (float sy))</procedure>
2079
2080Implements al_scale_transform.
2081
2082<procedure>(transform-coordinates transform (float x) (float y))</procedure>
2083
2084Implements al_transform_coordinates; returns a 2-element list of the transformed coordinate pair.
2085
2086<procedure>(transform-compose! transform transform)</procedure>
2087
2088Implements al_compose_transform.
2089
2090<procedure>(transform-invert! transform)</procedure>
2091
2092Implements al_invert_transform.
2093
2094<procedure>(transform-check-inverse transform float)</procedure>
2095
2096Implements al_check_inverse.
2097
2098<procedure>(current-transform)</procedure>
2099
2100Implements al_get_current_transform.
2101
2102
2103== Events
2104
2105=== Enums
2106
2107==== event-type
2108
2109<procedure>(event-type->int event-type)</procedure>
2110
2111{{event-type}} may be one of the following symbols:
2112* joystick-axis
2113* joystick-button-down
2114* joystick-button-up
2115* joystick-configuration
2116* key-down
2117* key-char
2118* key-up
2119* mouse-axes
2120* mouse-button-down
2121* mouse-button-up
2122* mouse-enter-display
2123* mouse-leave-display
2124* mouse-warped
2125* timer
2126* display-expose
2127* display-resize
2128* display-close
2129* display-lost
2130* display-found
2131* display-switch-in
2132* display-switch-out
2133* display-orientation
2134* audio-stream-fragment
2135* audio-stream-finished
2136
2137<procedure>(int->event-type integer)</procedure>
2138
2139=== Records
2140
2141==== any-event
2142
2143<record>any-event</record>
2144<procedure>(any-event-type any-event)</procedure>
2145<procedure>(any-event-source any-event)</procedure>
2146<procedure>(any-event-timestamp any-event)</procedure>
2147
2148==== display-event
2149
2150<record>display-event</record>
2151<procedure>(display-event-type display-event)</procedure>
2152<procedure>(display-event-source display-event)</procedure>
2153<procedure>(display-event-timestamp display-event)</procedure>
2154<procedure>(display-event-x display-event)</procedure>
2155<procedure>(display-event-y display-event)</procedure>
2156<procedure>(display-event-width display-event)</procedure>
2157<procedure>(display-event-height display-event)</procedure>
2158<procedure>(display-event-orientation display-event)</procedure>
2159
2160==== event
2161
2162<record>event</record>
2163<procedure>(make-event)</procedure>
2164<procedure>(make-event*)</procedure>
2165<procedure>(free-event! event)</procedure>
2166
2167==== event-source
2168
2169<record>event-source</record>
2170
2171==== event-queue
2172
2173<record>event-queue</record>
2174
2175==== joystick-event
2176
2177<record>joystick-event</record>
2178<procedure>(joystick-event-type joystick-event)</procedure>
2179<procedure>(joystick-event-source joystick-event)</procedure>
2180<procedure>(joystick-event-timestamp joystick-event)</procedure>
2181<procedure>(joystick-event-id joystick-event)</procedure>
2182<procedure>(joystick-event-stick joystick-event)</procedure>
2183<procedure>(joystick-event-axis joystick-event)</procedure>
2184<procedure>(joystick-event-position joystick-event)</procedure>
2185<procedure>(joystick-event-button joystick-event)</procedure>
2186
2187==== keyboard-event
2188
2189<record>keyboard-event</record>
2190<procedure>(keyboard-event-type keyboard-event)</procedure>
2191<procedure>(keyboard-event-source keyboard-event)</procedure>
2192<procedure>(keyboard-event-timestamp keyboard-event)</procedure>
2193<procedure>(keyboard-event-display keyboard-event)</procedure>
2194<procedure>(keyboard-event-keycode keyboard-event)</procedure>
2195<procedure>(keyboard-event-unichar keyboard-event)</procedure>
2196<procedure>(keyboard-event-modifiers keyboard-event)</procedure>
2197<procedure>(keyboard-event-repeat keyboard-event)</procedure>
2198
2199==== mouse-event
2200
2201<record>mouse-event</record>
2202<procedure>(mouse-event-type mouse-event)</procedure>
2203<procedure>(mouse-event-source mouse-event)</procedure>
2204<procedure>(mouse-event-timestamp mouse-event)</procedure>
2205<procedure>(mouse-event-display mouse-event)</procedure>
2206<procedure>(mouse-event-x mouse-event)</procedure>
2207<procedure>(mouse-event-y mouse-event)</procedure>
2208<procedure>(mouse-event-z mouse-event)</procedure>
2209<procedure>(mouse-event-w mouse-event)</procedure>
2210<procedure>(mouse-event-dx mouse-event)</procedure>
2211<procedure>(mouse-event-dy mouse-event)</procedure>
2212<procedure>(mouse-event-dz mouse-event)</procedure>
2213<procedure>(mouse-event-dw mouse-event)</procedure>
2214<procedure>(mouse-event-button mouse-event)</procedure>
2215<procedure>(mouse-event-pressure mouse-event)</procedure>
2216
2217==== timer-event
2218
2219<record>timer-event</record>
2220<procedure>(timer-event-type timer-event)</procedure>
2221<procedure>(timer-event-source timer-event)</procedure>
2222<procedure>(timer-event-timestamp timer-event)</procedure>
2223<procedure>(timer-event-count timer-event)</procedure>
2224<procedure>(timer-event-error timer-event)</procedure>
2225
2226==== user-event
2227
2228<record>user-event</record>
2229<procedure>(user-event-type user-event)</procedure>
2230<procedure>(user-event-source user-event)</procedure>
2231<procedure>(user-event-timestamp user-event)</procedure>
2232<procedure>(user-event-data1 user-event)</procedure>
2233<setter>(user-event-data1-set! user-event integer)</setter>
2234<procedure>(user-event-data2 user-event)</procedure>
2235<setter>(user-event-data2-set! user-event integer)</setter>
2236<procedure>(user-event-data3 user-event)</procedure>
2237<setter>(user-event-data3-set! user-event integer)</setter>
2238<procedure>(user-event-data4 user-event)</procedure>
2239<setter>(user-event-data4-set! user-event integer)</setter>
2240
2241=== Functions
2242
2243<procedure>(user-event-type? integer)</procedure>
2244
2245Implements ALLEGRO_EVENT_TYPE_IS_USER.
2246
2247<procedure>(make-event-type (integer a) (integer b) (integer c) (integer d))</procedure>
2248
2249Implements ALLEGRO_GET_EVENT_TYPE.
2250
2251<procedure>(event-type event)</procedure>
2252
2253Returns the type of a given event struct.
2254
2255<procedure>(event->any-event event)</procedure>
2256
2257Converts an event to an any-event.
2258
2259<procedure>(event->display-event event)</procedure>
2260
2261Converts an event to a display-event.
2262
2263<procedure>(event->joystick-event event)</procedure>
2264
2265Converts an event to a joystick-event.
2266
2267<procedure>(event->keyboard-event event)</procedure>
2268
2269Converts an event to a keyboard-event.
2270
2271<procedure>(event->mouse-event event)</procedure>
2272
2273Converts an event to a mouse-event.
2274
2275<procedure>(event->timer-event event)</procedure>
2276
2277Converts an event to a timer-event.
2278
2279<procedure>(event->user-event event)</procedure>
2280
2281Converts an event to a user-event.
2282
2283<procedure>(user-event-source-init! event-source)</procedure>
2284
2285Implements al_init_user_event_source.
2286
2287<procedure>(free-user-event-source! event-source)</procedure>
2288
2289Implements al_destroy_user_event_source.
2290
2291<procedure>(emit-user-event! event-source event (function void (user-event)))</procedure>
2292
2293Implements al_emit_user_event.
2294
2295<procedure>(user-event-unref! user-event)</procedure>
2296
2297Implements al_unref_user_event.
2298
2299<procedure>(event-source-data event-source)</procedure>
2300
2301Implements al_get_event_source_data.
2302
2303<procedure>(event-source-data-set! event-source integer)</procedure>
2304
2305Implements al_set_event_source_data.
2306
2307<procedure>(make-event-queue*)</procedure>
2308
2309Implements al_create_event_queue.
2310
2311<procedure>(make-event-queue)</procedure>
2312
2313Implements al_create_event_queue, with (free-event-queue!) declared as a finalizer.
2314
2315<procedure>(free-event-queue! event-queue)</procedure>
2316
2317Implements al_destroy_event_queue.
2318
2319<procedure>(event-queue-register-source! event-queue event-source)</procedure>
2320
2321Implements al_register_event_source.
2322
2323<procedure>(event-queue-unregister-source! event-queue event-source)</procedure>
2324
2325Implements al_unregister_event_source.
2326
2327<procedure>(event-queue-empty? event-queue)</procedure>
2328
2329Implements al_is_event_queue_empty.
2330
2331<procedure>(event-queue-next! event-queue event)</procedure>
2332
2333Implements al_get_next_event.
2334
2335<procedure>(event-queue-peek! event-queue event)</procedure>
2336
2337Implements al_peek_next_event.
2338
2339<procedure>(event-queue-drop-next! event-queue)</procedure>
2340
2341Implements al_drop_next_event_queue.
2342
2343<procedure>(event-queue-flush! event-queue)</procedure>
2344
2345Implements al_drop_next_event.
2346
2347<procedure>(event-queue-wait! event-queue event)</procedure>
2348
2349Implements al_wait_for_event.
2350
2351<procedure>(event-queue-timed-wait! event-queue event float)</procedure>
2352
2353Implements al_wait_for_event_timed.
2354
2355<procedure>(event-queue-wait-until! event-queue event timeout)</procedure>
2356
2357Implements al_wait_for_event_until.
2358
2359
2360== Files
2361
2362=== Constants
2363
2364* eof
2365
2366=== Enums
2367
2368==== file-mode
2369
2370<procedure>(file-mode->int file-mode)</procedure>
2371
2372{{file-mode}} may be one of the following symbols:
2373* read
2374* write
2375* execute
2376* hidden
2377* file
2378* directory
2379
2380<procedure>(int->file-mode integer)</procedure>
2381
2382==== seek-flag
2383
2384<procedure>(seek-flag->int seek-flag)</procedure>
2385
2386{{seek-flag}} may be one of the following symbols:
2387* set
2388* current
2389* end
2390
2391<procedure>(int->seek-flag integer)</procedure>
2392
2393=== Records
2394
2395==== file
2396
2397<record>file</record>
2398
2399==== file-interface
2400
2401<record>file-interface</record>
2402
2403==== fs-entry
2404
2405<record>fs-entry</record>
2406<procedure>(fs-entry-vtable fs-entry)</procedure>
2407
2408==== fs-interface
2409
2410<record>fs-interface</record>
2411<procedure>(free-fs-interface! fs-interface)</procedure>
2412<procedure>(fs-interface-create-entry fs-interface)</procedure>
2413<procedure>(fs-interface-entry-name fs-interface)</procedure>
2414<procedure>(fs-interface-update-entry fs-interface)</procedure>
2415<procedure>(fs-interface-entry-mode fs-interface)</procedure>
2416<procedure>(fs-interface-atime fs-interface)</procedure>
2417<procedure>(fs-interface-mtime fs-interface)</procedure>
2418<procedure>(fs-interface-ctime fs-interface)</procedure>
2419<procedure>(fs-interface-entry-size fs-interface)</procedure>
2420<procedure>(fs-interface-entry-exists? fs-interface)</procedure>
2421<procedure>(fs-interface-remove-entry fs-interface)</procedure>
2422<procedure>(fs-interface-open-directory fs-interface)</procedure>
2423<procedure>(fs-interface-read-directory fs-interface)</procedure>
2424<procedure>(fs-interface-close-directory fs-interface)</procedure>
2425<procedure>(fs-interface-current-directory fs-interface)</procedure>
2426<procedure>(fs-interface-make-directory fs-interface)</procedure>
2427<procedure>(fs-interface-filename-exists? fs-interface)</procedure>
2428<procedure>(fs-interface-remove-filename fs-interface)</procedure>
2429<procedure>(fs-interface-open-file fs-interface)</procedure>
2430
2431==== path
2432
2433<record>path</record>
2434
2435
2436=== Functions
2437
2438==== File Operations
2439
2440<procedure>(make-temp-file* (string template) ((c-pointer path) out_path))</procedure>
2441
2442Implements al_make_temp_file.
2443
2444<procedure>(make-temp-file (string template) ((c-pointer path) out_path))</procedure>
2445
2446Implements al_make_temp_file, with (free&close-file!) declared as a finalizer.
2447
2448<procedure>(file-open* (string path) (string mode))</procedure>
2449
2450Implements al_fopen.
2451
2452<procedure>(file-open (string path) (string mode))</procedure>
2453
2454Implements al_fopen, with (free&close-file!) declared as a finalizer.
2455
2456<procedure>(file-open-fd* (integer file-descriptor) (string mode))</procedure>
2457
2458Implements al_fopen_fd.
2459
2460<procedure>(file-open-fd (integer file-descriptor) (string mode))</procedure>
2461
2462Implements al_fopen_fd, with (free&close-file!) declared as a finalizer.
2463
2464<procedure>(free&close-file! file)</procedure>
2465
2466Closes a file with (file-close!), then uses (free!) to clear the file struct from memory.
2467
2468<procedure>(file-close! file)</procedure>
2469
2470Implements al_fclose.
2471
2472<procedure>(file-read! file blob (integer size))</procedure>
2473
2474Implements al_fread.
2475
2476<procedure>(file-write! file blob (integer size))</procedure>
2477
2478Implements al_fwrite.
2479
2480<procedure>(file-tell file)</procedure.
2481
2482Implements al_ftell.
2483
2484<procedure>(file-seek! file (integer offset) (integer whence))</procedure>
2485
2486Implements al_fseek.
2487
2488<procedure>(file-eof? file)</procedure>
2489
2490Implements al_feof.
2491
2492<procedure>(file-error? file)</procedure>
2493
2494Implements al_ferror.
2495
2496<procedure>(file-clear-error! file)</procedure>
2497
2498Implements al_fclearerr.
2499
2500<procedure>(file-unget-chars! file (integer count))</procedure>
2501
2502Implements al_fungetc.
2503
2504<procedure>(file-size file)</procedure>
2505
2506Implements al_fsize.
2507
2508<procedure>(file-get-char! file)</procedure>
2509
2510Implements al_fgetc.
2511
2512<procedure>(file-put-char! file (integer character))</procedure>
2513
2514Implements al_fputc.
2515
2516<procedure>(file-read-16le! file)</procedure>
2517
2518Implements al_fread16le.
2519
2520<procedure>(file-read-16be! file)</procedure>
2521
2522Implements al_fread16be.
2523
2524<procedure>(file-write-16le! file integer)</procedure>
2525
2526Implements al_fwrite16le.
2527
2528<procedure>(file-read-32le! file)</procedure>
2529
2530Implements al_fread32le.
2531
2532<procedure>(file-read-32be! file)</procedure>
2533
2534Implements al_fread32be.
2535
2536<procedure>(file-write-32le! file integer)</procedure>
2537
2538Implements al_fwrite32le.
2539
2540<procedure>(file-write-32be! file integer)</procedure>
2541
2542Implements al_fwrite32be.
2543
2544<procedure>(file-get-string! file blob (integer max))</procedure>
2545
2546Implements al_fgets.
2547
2548<procedure>(file-get-utf-string*! file)</procedure>
2549
2550Implements al_get_ustr.
2551
2552<procedure>(file-get-utf-string! file)</procedure>
2553
2554Implements al_get_ustr, with (free-utf-string!) declared as a finalizer.
2555
2556<procedure>(file-put-string! file string)</procedure>
2557
2558Implements al_fputs.
2559
2560<procedure>(file-userdata file)</procedure>
2561
2562Implements al_get_file_userdata.
2563
2564<procedure>(new-file-interface-set! file-interface)</procedure>
2565
2566Implements al_set_new_file_interface.
2567
2568<procedure>(file-interface-open* file-interface (string path) (string mode))</procedure>
2569
2570Implements al_fopen_interface.
2571
2572<procedure>(file-interface-open file-interface (string path) (string mode))</procedure>
2573
2574Implements al_fopen_interface, with (free&close-file!) declared as a finalizer.
2575
2576<procedure>(make-file-handle* file-interface (c-pointer userdata))</procedure>
2577
2578Implements al_create_file_handle.
2579
2580<procedure>(make-file-handle file-interface (c-pointer userdata))</procedure>
2581
2582Implements al_create_file_handle, with (free&close-file!) decalred as a finalizer.
2583
2584==== File System Hooks
2585
2586<procedure>(make-fs-entry* string)</procedure>
2587
2588Implements al_create_fs_entry.
2589
2590<procedure>(make-fs-entry string)</procedure>
2591
2592Implements al_create_fs_entry, with (free-fs-entry!) declared as a finalizer.
2593
2594<procedure>(free-fs-entry! fs-entry)</procedure>
2595
2596Implements al_destroy_fs_entry.
2597
2598<procedure>(fs-entry-name fs-entry)</procedure>
2599
2600Implements al_get_fs_entry_name.
2601
2602<procedure>(fs-entry-update! fs-entry)</procedure>
2603
2604Implements al_update_fs_entry.
2605
2606<procedure>(fs-entry-mode fs-entry)</procedure>
2607
2608Implements al_get_fs_entry_mode.
2609
2610<procedure>(fs-entry-atime fs-entry)</procedure>
2611
2612Implements al_get_fs_entry_atime.
2613
2614<procedure>(fs-entry-mtime fs-entry)</procedure>
2615
2616Implements al_get_fs_entry_mtime.
2617
2618<procedure>(fs-entry-ctime fs-entry)</procedure>
2619
2620Implements al_get_fs_entry_ctime.
2621
2622<procedure>(fs-entry-size fs-entry)</procedure>
2623
2624Implements al_get_fs_entry_size.
2625
2626<procedure>(fs-entry-exists? fs-entry)</procedure>
2627
2628Implements al_fs_entry_exists.
2629
2630<procedure>(fs-entry-remove! fs-entry)</procedure>
2631
2632Implements al_remove_fs_entry.
2633
2634<procedure>(fs-entry-open fs-enty string)</procedure>
2635
2636Implements al_open_fs_entry.
2637
2638<procedure>(fs-entry-directory-open! fs-entry)</procedure>
2639
2640Implements al_open_directory.
2641
2642<procedure>(fs-entry-directory-read fs-entry)<procedure>
2643
2644Implements al_read_directory.
2645
2646<procedure>(fs-entry-directory-close! fs-entry)</procedure>
2647
2648Implements al_close_directory.
2649
2650<procedure>(current-directory)</procedure>
2651
2652Implements al_get_current_directory.
2653
2654<procedure>(change-directory string)</procedure>
2655
2656Implements al_change_directory.
2657
2658<procedure>(make-directory string)</procedure>
2659
2660Implements al_make_directory.
2661
2662<procedure>(filename-exists? string)</procedure>
2663
2664Implements al_filename_exists.
2665
2666<procedure>(filename-remove! string)</procedure>
2667
2668Implements al_remove_filename.
2669
2670<procedure>(new-file-interface)</procedure>
2671
2672Implements al_get_new_file_interface.
2673
2674<procedure>(current-fs-interface)</procedure>
2675
2676Implements al_get_fs_interface.
2677
2678<setter>(current-fs-interface-set!)</setter>
2679
2680Implements al_set_fs_interface.
2681
2682<setter>(standard-fs-interface-set!)</setter>
2683
2684Implements al_set_standard_fs_interface.
2685
2686==== Paths
2687
2688<procedure>(make-path* string)</procedure>
2689
2690Implements al_create_path.
2691
2692<procedure>(make-path string)<procedure>
2693
2694Implements al_create_path, with (free-path!) declared as a finalizer.
2695
2696<procedure>(make-path-for-directory* string)</procedure>
2697
2698Implements al_create_path_for_directory.
2699
2700<procedure>(make-path-for-directory string)</procedure>
2701
2702Implements al_create_path_for_directory, with (free-path!) declared as a finalizer.
2703
2704<procedure>(free-path! path)</procedure>
2705
2706Implements al_destroy_path.
2707
2708<procedure>(path->string path (char separator))</procedure>
2709
2710Implements al_path_cstr.
2711
2712<procedure>(path-component-count path)</procedure>
2713
2714Implements al_get_path_num_components.
2715
2716<procedure>(path-component path integer)</procedure>
2717
2718Implements al_get_path_compoenent.
2719
2720<setter>(path-component-set! path integer string)</setter>
2721
2722Implements al_replace_path_component.
2723
2724<procedure>(path-component-remove! path integer)</procedure>
2725
2726Implements al_remove_path_component.
2727
2728<procedure>(path-component-insert! path integer string)</procedure>
2729
2730Implements al_insert_path_component.
2731
2732<procedure>(path-clone path)</procedure>
2733
2734Implements al_clone_path.
2735
2736<procedure>(path-tail path)</procedure>
2737
2738Implements al_get_path_tail.
2739
2740<procedure>(path-drop-tail! path)</procedure>
2741
2742Implements al_drop_path_tail.
2743
2744<procedure>(path-append! path string)</procedure>
2745
2746Implements al_append_path_component.
2747
2748<procedure>(path-join! path path)</procedure>
2749
2750Implements al_join_paths.
2751
2752<procedure>(path-rebase! path path)</procedure>
2753
2754Implements al_rebase_path.
2755
2756<procedure>(path-drive path)</procedure>
2757
2758Implements al_get_path_drive.
2759
2760<setter>(path-drive-set! path string)</setter>
2761
2762Implements al_set_path_drive.
2763
2764<procedure>(path-filename path)</procedure>
2765
2766Implements al_get_path_filename.
2767
2768<setter>(path-filename-set! path string)</setter>
2769
2770Implements al_set_path_filename.
2771
2772<procedure>(path-extension path)</procedure>
2773
2774Implements al_get_path_extension.
2775
2776<setter>(path-extension-set! path string)</setter>
2777
2778Implements al_set_path_extension.
2779
2780<procedure>(path-basename path)</procedure>
2781
2782Implements al_get_path_basename.
2783
2784<procedure>(path-make-canonical! path)</procedure>
2785
2786Implements al_make_path_canonical.
2787
2788==== PhysicsFS
2789
2790See also: the [[physfs]] egg.
2791
2792<procedure>(enable-physfs-file-interface)</procedure>
2793
2794Implements al_set_physfs_file_interface.
2795
2796<procedure>(physfs-addon-version)</procedure>
2797
2798Implements al_get_allegro_physfs_version.
2799
2800
2801== Fonts
2802
2803=== Enums
2804
2805==== font-align
2806
2807<procedure>(font-align->int font-align)</procedure>
2808
2809{{font-align}} may be one of the following symbols:
2810* left
2811* center
2812* right
2813
2814<procedure>(int->font-align integer)</procedure>
2815
2816=== Records
2817
2818==== font
2819
2820<record>font</record>
2821<procedure>(font-data font)</procedure>
2822<procedure>(font-height font)</procedure>
2823
2824==== utf-string
2825
2826<record>utf-string</record>
2827
2828=== Functions
2829
2830==== Fonts
2831
2832<procedure>(register-font-loader (string extension) (function font (string integer integer)))</procedure>
2833
2834Implements al_register_font_loader.
2835
2836<procedure>(load-bitmap-font* string)</procedure>
2837
2838Implements al_load_bitmap_font.
2839
2840<procedure>(load-bitmap-font string)</procedure>
2841
2842Implements al_load_bitmap_font, with (free-font!) declared as a finalizer.
2843
2844<procedure>(load-font* string (integer size) (integer flags))</procedure>
2845
2846Implements al_load_font.
2847
2848<procedure>(load-font string (integer size) (integer flags))</procedure>
2849
2850Implements al_load_font, with (free-font!) declared as a finalizer.
2851
2852<procedure>(make-font-from-bitmap* bitmap (integer n) (s32vector ranges))</procedure>
2853
2854Implements al_grab_font_from_bitmap.
2855
2856<procedure>(make-font-from-bitmap bitmap (integer n) (s32vector ranges))</procedure>
2857
2858Implements al_grab_font_from_bitmap, with (free-font!) declared as a finalizer.
2859
2860<procedure>(free-font! font)</procedure>
2861
2862Implements al_destroy_font.
2863
2864<procedure>(font-draw-utf (font f) (color c) (float x) (float y) (font-align flags) (utf-string ustr))</procedure>
2865
2866Implements al_draw_ustr.
2867
2868<procedure>(font-draw-string (font f) (color c) (float x) (float y) (font-align flags) (string text))</procedure>
2869
2870Implements al_draw_text.
2871
2872<procedure>(font-draw-justified-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (c-string text))</procedure>
2873
2874Implements al_draw_justified_text.
2875
2876<procedure>(font-draw-justified-utf-string (font f) (color c) (float x1) (float x2) (float y) (float diff)  (font-align flags) (utf-string text))</procedure>
2877
2878Implements al_draw_justified_ustr.
2879
2880<procedure>(font-width font string)</procedure>
2881
2882Implements al_get_text_width.
2883
2884<procedure>(font-utf-width font utf-string)</procedure>
2885
2886Implements al_get_ustr_width.
2887
2888<procedure>(font-line-height font)</procedure>
2889
2890Implements al_get_font_line_height.
2891
2892<procedure>(font-ascent font)</procedure>
2893
2894Implements al_get_font_ascent.
2895
2896<procedure>(font-descent font)</procedure>
2897
2898Implements al_get_font_descent.
2899
2900<procedure>(font-utf-dimensions (font f) (utf-string text))</procedure>
2901
2902Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
2903
2904<procedure>(font-dimensions (font f) (string text))</procedure>
2905
2906Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
2907
2908<procedure>(font-addon-install)</procedure>
2909
2910Implements al_init_font_addon.
2911
2912<procedure>(font-addon-uninstall)</procedure>
2913
2914Implements al_shutdown_font_addon.
2915
2916<procedure>(font-addon-version)</procedure>
2917
2918Implements al_get_allegro_font_version.
2919
2920==== True Type Font Support
2921
2922<procedure>(load-ttf* (string filename) (integer size) (integer flags))</procedure>
2923
2924Implements al_load_ttf_font.
2925
2926<procedure>(load-ttf (string filename) (integer size) (integer flags))</procedure>
2927
2928Implements al_load_ttf_font, with (free-font!) declared as a finalizer.
2929
2930<procedure>(load-ttf-from-file* (file f) (string filename) (integer size) (integer flags))</procedure>
2931
2932Implements al_load_ttf_font_f.
2933
2934<procedure>(load-ttf-from-file (file f) (string filename) (integer size) (integer flags))</procedure>
2935
2936Implements al_load_ttf_font_f, with (free-font!) declared as a finalizer.
2937
2938<procedure>(ttf-addon-install)</procedure>
2939
2940Implements al_init_ttf_addon.
2941
2942<procedure>(ttf-addon-uninstall)</procedure>
2943
2944Implements al_shutdown_ttf_addon.
2945
2946<procedure>(ttf-addon-version)</procedure>
2947
2948Implements al_get_allegro_ttf_version.
2949
2950==== UTF Strings
2951
2952<procedure>(make-utf-string* string)</procedure>
2953
2954Implements al_ustr_new.
2955
2956<procedure>(make-utf-string string)</procedure>
2957
2958Implements al_ustr_new, with (free-utf-string!) declared as a finalizer.
2959
2960<procedure>(make-utf-string-from-buffer* blob)</procedure>
2961
2962Given a blob, produces a new utf-string.
2963
2964<procedure>(make-utf-string-from-buffer blob)</procedure>
2965
2966Given a blob, produces a new utf-string, with (free-utf-string!) declared as a finalizer.
2967
2968<procedure>(free-utf-string! utf-string)</procedure>
2969
2970Implements al_ustr_free.
2971
2972<procedure>(utf->string utf-string)</procedure>
2973
2974Implements al_cstr.
2975
2976<procedure>(utf->buffer! utf-string blob)</procedure>
2977
2978Implements al_ustr_to_buffer.
2979
2980<procedure>(utf->string-copy utf-string)</procedure>
2981
2982Implements al_cstr_dup.
2983
2984<procedure>(utf-copy* utf-string)</procedure>
2985
2986Implements al_ustr_dup.
2987
2988<procedure>(utf-copy utf-string)</procedure>
2989
2990Implements al_ustr_dup, with (free-utf-string!) declared as a finalizer.
2991
2992<procedure>(utf-substring* utf-string (integer start) (integer end))</procedure>
2993
2994Implements al_ustr_dup_substr.
2995
2996<procedure>(utf-substring utf-string (integer start) (integer end))</procedure>
2997
2998Implements al_ustr_dup_substr, with (free-utf-string!) declared as a finalizer.
2999
3000<procedure>(utf-empty-string)</procedure>
3001
3002Implements al_ustr_empty_string.
3003
3004<procedure>(make-utf-null-string*)</procedure>
3005
3006Makes an empty utf-string struct, where the string pointer is unset.
3007
3008<procedure>(make-utf-null-string)</procedure>
3009
3010Makes an empty utf-string struct, where the string pointer is unset, with (free-utf-string!) declared as a finalizer.
3011
3012<procedure>(utf-reference-cstr* string)</procedure>
3013
3014Implements al_ref_cstr.
3015
3016<procedure>(utf-reference-cstr string)</procedure>
3017
3018Implements al_ref_cstr, with (free-utf-string!) declared as a finalizer.
3019
3020<procedure>(utf-reference-buffer* blob)</procedure>
3021
3022Implements al_ref_buffer.
3023
3024<procedure>(utf-reference-buffer blob)</procedure>
3025
3026Implements al_ref_buffer, with (free-utf-string!) declared as a finalizer.
3027
3028<procedure>(utf-reference-utf-string* utf-string (integer start) (integer end))</procedure>
3029
3030Implements al_ref_ustr.
3031
3032<procedure>(utf-reference-utf-string utf-string (integer start) (integer end))</procedure>
3033
3034Implements al_ref_ustr, with (free-utf-string!) declared as a finalizer.
3035
3036<procedure>(utf-size utf-string)</procedure>
3037
3038Implements al_ustr_size.
3039
3040<procedure>(utf-length utf-string)</procedure>
3041
3042Implements al_ustr_length.
3043
3044<procedure>(utf-offset utf-string integer)</procedure>
3045
3046Implements al_ustr_offset.
3047
3048<procedure>(utf-next utf-string integer)</procedure>
3049
3050Implements al_ustr_next, modified to return #f at the end of the string.
3051
3052<procedure>(utf-previous utf-string integer)</procedure>
3053
3054Implements al_ustr_prev, modified to return #f at the end of the string.
3055
3056<procedure>(utf-get utf-string integer)</procedure>
3057
3058Implements al_ustr_get.
3059
3060<procedure>(utf-get-next utf-string integer)</procedure>
3061
3062Returns a 2-element list consisting of the next code and its position, or #f if at the end of the string.
3063
3064<procedure>(utf-get-prev utf-string integer)</procedure>
3065
3066Returns a 2-element list consisting of the previous code and its position, or #f if at the start of the string.
3067
3068<procedure>(utf-remove-char! utf-string integer)</procedure>
3069
3070Implements al_ustr_remove_chr.
3071
3072<procedure>(utf-remove-range! utf-string (integer start) (integer end))</procedure>
3073
3074Implements al_ustr_remove_range.
3075
3076<procedure>(utf-truncate! utf-string integer)</procedure>
3077
3078Implements al_ustr_truncate.
3079
3080<procedure>(utf-ltrim! utf-string)</procedure>
3081
3082Implements al_ustr_ltrim_ws.
3083
3084<procedure>(utf-rtrim! utf-string)</procedure>
3085
3086Implements al_ustr_rtrim_ws.
3087
3088<procedure>(utf-trim! utf-string)</procedure>
3089
3090Implements al_ustr_trim_ws.
3091
3092<procedure>(utf-assign! utf-string utf-string)</procedure>
3093
3094Implements al_ustr_assign.
3095
3096<procedure>(utf-assign-substring! utf-string utf-string (integer start) (integer end))</procedure>
3097
3098Implements al_ustr_assign_substr.
3099
3100<procedure>(utf-assign-string! utf-string string)</procedure>
3101
3102Implements al_ustr_assign_cstr.
3103
3104<procedure>(utf-set-char! utf-string (integer pos) (integer char))</procedure>
3105
3106Implements al_ustr_set_chr.
3107
3108<procedure>(utf-replace-range! utf-string (integer start) (integer end) utf-string)</procedure>
3109
3110Implements al_ustr_replace_range.
3111
3112<procedure>(utf-find utf-string (integer start) utf-string)</procedure>
3113
3114Implements al_ustr_find_str.
3115
3116<procedure>(utf-find-string utf-string (integer start) string)</procedure>
3117
3118Implements al_ustr_find_cstr.
3119
3120<procedure>(utf-find-char utf-string (integer start) (integer char))</procedure>
3121
3122Implements al_ustr_find_chr.
3123
3124<procedure>(utf-find-set utf-string (integer start) utf-string)</procedure>
3125
3126Implements al_ustr_find_set.
3127
3128<procedure>(utf-find-set-string utf-string integer string)</procedure>
3129
3130Implements al_ustr_find_set_cstr.
3131
3132<procedure>(utf-find-cset utf-string integer utf-string)</procedure>
3133
3134Implements al_ustr_find_cset.
3135
3136<procedure>(utf-find-cset-string utf-string integer string)</procedure>
3137
3138Implements al_ustr_find_set_cstr.
3139
3140<procedure>(utf-rfind utf-string integer utf-string)</procedure>
3141
3142Implements al_ustr_rfind_str.
3143
3144<procedure>(utf-rfind-char utf-string integer (integer char))</procedure>
3145
3146Implements al_ustr_rfind_char.
3147
3148<procedure>(utf-rfind-string utf-string integer string)</procedure>
3149
3150Implements al_ustr_rfind_cstr.
3151
3152<procedure>(utf-find&replace! utf-string integer utf-string utf-string)</procedure>
3153
3154Implements al_ustr_find_replace.
3155
3156<procedure>(utf-find&replace-string! utf-string integer string string)</procedure>
3157
3158Implements al_ustr_find_replace_cstr.
3159
3160<procedure>(utf-equal? utf-string utf-string)</procedure>
3161
3162Implements al_ustr_equal.
3163
3164<procedure>(utf-compare utf-string utf-string)</procedure>
3165
3166Implements al_ustr_compare.
3167
3168<procedure>(utf-ncompare utf-string utf-string integer)</procedure>
3169
3170Implements al_ustr_ncompare.
3171
3172<procedure>(utf-prefix? utf-string utf-string)</procedure>
3173
3174Implements al_ustr_has_prefix.
3175
3176<procedure>(utf-prefix-string? utf-string string)</procedure>
3177
3178Implements al_ustr_has_prefix_cstr.
3179
3180<procedure>(utf-suffix? utf-string utf-string)</procedure>
3181
3182Implements al_ustr_has_prefix.
3183
3184<procedure>(utf-suffix-string? utf-string string)</procedure>
3185
3186Implements al_ustr_has_suffix_cstr.
3187
3188<procedure>(utf8-width integer32)</procedure>
3189
3190Implements al_utf8_width.
3191
3192<procedure>(utf8-encode! blob integer32)</procedure>
3193
3194Implements al_utf8_encode.
3195
3196<procedure>(utf-string-utf16-size utf-string)</procedure>
3197
3198Implements al_ustr_size_utf16.
3199
3200<procedure>(utf-string-utf16-encode utf-string blob integer)</procedure>
3201
3202Implements al_ustr_encode_utf16.
3203
3204<procedure>(utf16-width integer)</procedure>
3205
3206Implements al_utf16_width.
3207
3208<procedure>(utf16-encode u16vector integer32)</procedure>
3209
3210Implements al_utf16_encode.
3211
3212
3213== Input
3214
3215=== Constants
3216
3217* joystick-max-axes
3218* jostick-max-sticks
3219* joystick-max-buttons
3220* mouse-max-extra-axis
3221
3222=== Enums
3223
3224==== cursor-type
3225
3226<procedure>(cursor-type->int cursor-type)</procedure>
3227
3228{{cursor-type}} may be one of the following symbols:
3229* none
3230* default
3231* arrow
3232* busy
3233* question
3234* edit
3235* move
3236* resize-north
3237* resize-west
3238* resize-south
3239* resize-east
3240* resize-northwest
3241* resize-southwest
3242* resize-southeast
3243* resize-northeast
3244* progress
3245* precision
3246* link
3247* alt-select
3248* unavailable
3249
3250<procedure>(int->cursor-type integer)</procedure>
3251
3252==== joystick-flag
3253
3254<procedure>(joystick-flag->int joystick-flag)</procedure>
3255
3256{{joystick-flag}} may be one of the following symbols:
3257* digital
3258* analog
3259
3260<procedure>(int->joystick-flag integer)</procedure>
3261
3262==== key
3263
3264<procedure>(key->int key)</procedure>
3265
3266{{key}} may be one of the following symbols:
3267* a
3268* b
3269* c
3270* d
3271* e
3272* f
3273* g
3274* h
3275* i
3276* j
3277* k
3278* l
3279* m
3280* n
3281* o
3282* p
3283* q
3284* r
3285* s
3286* t
3287* u
3288* v
3289* w
3290* x
3291* y
3292* z
3293* one
3294* two
3295* three
3296* four
3297* five
3298* six
3299* seven
3300* eight
3301* nine
3302* zero
3303* pad-one
3304* pad-two
3305* pad-three
3306* pad-four
3307* pad-five
3308* pad-six
3309* pad-seven
3310* pad-eight
3311* pad-nine
3312* pad-zerp
3313* f1
3314* f2
3315* f3
3316* f4
3317* f5
3318* f6
3319* f7
3320* f9
3321* f9
3322* f10
3323* f11
3324* f12
3325* escape
3326* tilde
3327* minus
3328* equals
3329* backspace
3330* tab
3331* openbrace
3332* enter
3333* semicolon
3334* quote
3335* backslash
3336* backslash2
3337* comma
3338* fullstop
3339* slash
3340* space
3341* insert
3342* delete
3343* home
3344* end
3345* pgup
3346* pgdn
3347* left
3348* right
3349* up
3350* down
3351* pad-slash
3352* pad-asterisk
3353* pad-minus
3354* pad-plus
3355* pad-delete
3356* pad-enter
3357* printscreen
3358* pause
3359* abnt-c1
3360* yen
3361* kana
3362* convert
3363* noconvert
3364* at
3365* circumflex
3366* colon2
3367* kanji
3368* pad-equals
3369* backquote
3370* semicolon2
3371* command
3372* unknown
3373* lshift
3374* rshift
3375* lctrl
3376* rctrl
3377* alt
3378* altgr
3379* lwin
3380* rwin
3381* menu
3382* scrolllock
3383* numlock
3384* capslock
3385
3386<procedure>(int->key integer)</procedure>
3387
3388==== keymod
3389
3390<procedure>(keymod->int keymod)</procedure>
3391
3392{{keymod}} may be one of the following symbols:
3393* shift
3394* ctrl
3395* alt
3396* lwin
3397* rwin
3398* menu
3399* altgr
3400* command
3401* scrolllock
3402* numlock
3403* capslock
3404* inaltseq
3405* accent1
3406* accent2
3407* accent3
3408* accent4
3409
3410<procedure>(int->keymod integer)</procedure>
3411
3412=== Records
3413
3414==== cursor
3415
3416<record>cursor</record>
3417
3418==== joystick
3419
3420<record>joystick</record>
3421
3422==== joystick-state
3423
3424<record>joystick-state</record>
3425<procedure>(make-joystick-state*)</procedure>
3426<procedure>(make-joystick-state)</procedure>
3427<procedure>(free-joystick-state! joystick-state)</procedure>
3428<procedure>(joystick-state-button int)</procedure>
3429
3430==== keyboard
3431
3432<record>keyboard</record>
3433
3434==== keyboard-state
3435
3436<record>keyboard-state</record>
3437<procedure>(make-keyboard-state*)</procedure>
3438<procedure>(make-keyboard-state)</procedure>
3439<procedure>(free-keyboard-state! keyboard-state)</procedure>
3440<procedure>(keyboard-state-display)</procedure>
3441
3442==== mouse
3443
3444<record>mouse</record>
3445
3446==== mouse-cursor
3447
3448<record>mouse-cursor</record>
3449
3450==== mouse-state
3451
3452<record>mouse-state</record>
3453<procedure>(make-mouse-state)</procedure>
3454<procedure>(make-mouse-state*)</procedure>
3455<procedure>(free-mouse-state! mouse-state)</procedure>
3456<procedure>(mouse-state-x mouse-state)</procedure>
3457<procedure>(mouse-state-y mouse-state)</procedure>
3458<procedure>(mouse-state-z mouse-state)</procedure>
3459<procedure>(mouse-state-w mouse-state)</procedure>
3460<procedure>(mouse-state-buttons mouse-state)</procedure>
3461<procedure>(mouse-state-pressure mouse-state)</procedure>
3462<procedure>(mouse-state-axis mouse-state integer)</procedure>
3463<procedure>(mouse-state-display mouse-state)</procedure>
3464
3465=== Functions
3466
3467==== Joystick
3468
3469<procedure>(joystick-addon-install)</procedure>
3470
3471Implements al_install_joystick.
3472
3473<procedure>(joystick-addon-uninstall)</procedure>
3474
3475Implements al_uninstall_joystick.
3476
3477<procedure>(joystick-addon-installed?)<procedure>
3478
3479Implements al_is_joystick_installed.
3480
3481<procedure>(joystick-addon-reconfigure)</procedure>
3482
3483Implements al_reconfigure_joysticks.
3484
3485<procedure>(joystick-event-source)<procedure>
3486
3487Implements al_get_joystick_event_source.
3488
3489<procedure>(joystick-count)</procedure>
3490
3491Implements al_get_num_joysticks.
3492
3493<procedure>(joystick-ref integer)</procedure>
3494
3495Implements al_get_joystick.
3496
3497<procedure>(joystick-release joystick)</procedure>
3498
3499Implements al_release_joystick.
3500
3501<procedure>(joystick-active? joystick)</procedure>
3502
3503Implements al_get_joystick_active.
3504
3505<procedure>(joystick-name joystick)</procedure>
3506
3507Implements al_get_joystick_name.
3508
3509<procedure>(joystick-axes-count joystick (integer stick))</procedure>
3510
3511Implements al_get_joystick_num_axes.
3512
3513<procedure>(joystick-button-count joystick)</procedure>
3514
3515Implements al_get_joystick_num_buttons.
3516
3517<procedure>(joystick-button-name joystick (integer button))</procedure>
3518
3519Implements al_get_joystick_button_name.
3520
3521<procedure>(joystick-state-init! joystick-state joystick)</procedure>
3522
3523Implements al_get_joystick_state.
3524
3525<procedure>(joystick-state-axis joystick-state (integer stick) (integer axis))</procedure>
3526
3527Retrieves desired axis value for a particular stick; #f if either stick or axis is out of available bounds.
3528
3529==== Keyboard
3530
3531<procedure>(keyboard-addon-installed?)</procedure>
3532
3533Implements al_is_keyboard_installed.
3534
3535<procedure>(keyboard-addon-install)</procedure>
3536
3537Implements al_install_keyboard.
3538
3539<procedure>(keyboard-addon-uninstall)</procedure>
3540
3541Implements al_uninstall_keyboard.
3542
3543<procedure>(keycode->string key)</procedure>
3544
3545Implements al_keycode_to_name. Not strictly necessary, since the enums are symbols which can easily be converted to strings.
3546
3547<procedure>(keyboard-event-source)</procedure>
3548
3549Implements al_get_keyboard_event_source.
3550
3551<procedure>(keyboard-led-set! integer)</procedure>
3552
3553Implements al_set_keyboard_leds.
3554
3555<procedure>(keyboard-state-init! keyboard-state)</procedure>
3556
3557Implements al_get_keyboard_state.
3558
3559<procedure>(keyboard-state-key-down? keyboard-state key)</procedure>
3560
3561Implements al_key_down.
3562
3563<procedure>(keyboard-three-finger-flag?)</procedure>
3564
3565Wraps _al_three_finger_flag.
3566
3567<procedure>(keyboard-led-flag?)</procedure>
3568
3569Wraps _al_key_led_flag.
3570
3571==== Mouse
3572
3573<procedure>(mouse-addon-installed?)</procedure>
3574
3575Implements al_is_mouse_installed.
3576
3577<procedure>(mouse-addon-install)</procedure>
3578
3579Implements al_install_mouse.
3580
3581<procedure>(mouse-addon-uninstall)</procedure>
3582
3583Implements al_uninstall_mouse.
3584
3585<procedure>(mouse-button-count)</procedure>
3586
3587Implements al_get_mouse_num_buttons.
3588
3589<procedure>(mouse-axes-count)</procedure>
3590
3591Implements al_get_mouse_num_axes.
3592
3593<procedure>(mouse-xy-set! display (integer x) (integer y))</procedure>
3594
3595Implements al_set_mouse_xy.
3596
3597<procedure>(mouse-z-set! display integer)</procedure>
3598
3599Implements al_set_mouse_z.
3600
3601<procedure>(mouse-w-set! display integer)</procedure>
3602
3603Implements al_set_mouse_w.
3604
3605<procedure>(mouse-event-source)</procedure>
3606
3607Implements al_get_mouse_event_source.
3608
3609<procedure>(mouse-state-init! mouse-state)</procedure.
3610
3611Implements al_get_mouse_state.
3612
3613<procedure>(mouse-state-button-down mouse-state (integer button))</procedure>
3614
3615Implements al_mouse_button_down.
3616
3617<procedure>(mouse-state-axis mouse-state (integer axis))</procedure>
3618
3619Implements al_get_mouse_state_axis.
3620
3621<procedure>(mouse-axis-set! (integer axis) (integer value))</procedure>
3622
3623Implements al_set_mouse_axis.
3624
3625<procedure>(make-cursor* (bitmap sprite) (integer xfocus) (integer yfocus))</procedure>
3626
3627Implements al_create_mouse_cursor.
3628
3629<procedure>(make-cursor (bitmap sprite) (integer xfocus) (integer yfocus))</procedure>
3630
3631Implements al_create_mouse_cursor, with (free-cursor!) declared as a finalizer.
3632
3633<procedure>(free-cursor! cursor)</procedure>
3634
3635Implements al_destroy_mouse_cursor.
3636
3637<procedure>(mouse-cursor-position)</procedure>
3638
3639Returns a 2-element list consisting of the x and y position of the mouse cursor.
3640
3641<procedure>(mouse-ungrab)</procedure>
3642
3643Implements al_ungrab_mouse.
3644
3645<procedure>(display-grab-mouse! display)</procedure>
3646
3647Implements al_grab_mouse.
3648
3649<procedure>(display-cursor-set! display mouse-cursor)</procedure>
3650
3651Implements al_set_mouse_cursor.
3652
3653<procedure>(display-hide-cursor! display)</procedure>
3654
3655Implements al_hide_mouse_cursor.
3656
3657<procedure>(display-system-mouse-cursor-set! display cursor-type)</procedure>
3658
3659Implements al_set_system_mouse_cursor.
3660
3661
3662== Math
3663
3664=== Functions
3665
3666==== Fixed Math
3667
3668<procedure>(fix-to-rad integer)</procedure>
3669
3670Implements al_fixtorad_r.
3671
3672<procedure>(rad-to-fix integer)</procedure>
3673
3674Implements al_radtofix_r.
3675
3676<procedure>(fixed-sqrt integer)</procedure>
3677
3678Implements al_fixsqrt.
3679
3680<procedure>(fixed-hypot integer)</procedure>
3681
3682Implements al_fixhypot.
3683
3684<procedure>(fixed-atan integer)</procedure>
3685
3686Implements al_fixatan.
3687
3688<procedure>(fixed-atan2 integer)</procedure>
3689
3690Implements al_fixatan2.
3691
3692<procedure>(fixed-cos integer)</procedure>
3693
3694Wraps _al_fix_cos_tbl.
3695
3696<procedure>(fixed-tan integer)</procedure>
3697
3698Wraps _al_fix_tan_tbl.
3699
3700<procedure>(fixed-acos integer)</procedure>
3701
3702Wraps _al_fix_acos_tbl.
3703
3704
3705== Memory
3706
3707=== Records
3708
3709==== memory-interface
3710
3711<record>memory-interface</record>
3712<procedure>(make-memory-interface*)</procedure>
3713<procedure>(make-memory-interface)</procedure>
3714<procedure>(free-memory-interface! memory-interface)</procedure>
3715<procedure>(memory-interface-malloc memory-interface)</procedure>
3716<setter>(memory-interface-malloc-set! memory-interface (function c-pointer (integer32 integer (const c-string) (const c-string))))</setter>
3717<procedure>(memory-interface-realloc memory-interface)</procedure>
3718<setter>(memory-interface-realloc-set! memory-interface (function void      (c-pointer integer (const c-string) (const c-string))))</setter>
3719<procedure>(memory-interface-calloc memory-interface)</procedure>
3720<setter>(memory-interface-calloc-set! memory-interface (function c-pointer (c-pointer integer32 integer (const c-string) (const c-string))))</setter>
3721<procedure>(memory-interface-free memory-interface)</procedure>
3722<setter>(memory-interface-free-set! memory-interface (function c-pointer (integer32 integer32 integer (const c-string) (const c-string))))</setter>
3723
3724=== Functions
3725
3726==== Memory
3727
3728<procedure>(memory-interface-set! memory-interface)</procedure>
3729
3730Implements al_set_memory_interface.
3731
3732<procedure>(malloc* integer)</procedure>
3733
3734Implements al_malloc.
3735
3736<procedure>(malloc integer)</procedure>
3737
3738Implements al_malloc, with (free!) declared as a finalizer.
3739
3740<procedure>(free! ptr)</procedure>
3741
3742Implements al_free.
3743
3744<procedure>(realloc* ptr integer)</procedure>
3745
3746Implements al_realloc.
3747
3748<procedure>(realloc ptr integer)</procedure>
3749
3750Implements al_realloc, with (free!) declared as a finalizer.
3751
3752<procedure>(calloc* integer integer)</procedure>
3753
3754Implements al_calloc.
3755
3756<procedure>(calloc integer integer)</procedure>
3757
3758Implements al_calloc, with (free!) declared as a finalizer.
3759
3760<procedure>(malloc/context* (int size) (int line) (string file) (string function))</procedure>
3761
3762Implements al_malloc_with_context.
3763
3764<procedure>(malloc/context (int size) (int line) (string file) (string function))</procedure>
3765
3766Implements al_malloc_with_context, with (free/context!) declared as a finalizer.
3767
3768<procedure>(free/context! ptr (int line) (string file) (string function))</procedure>
3769
3770Implements al_free_with_context.
3771
3772<procedure>(realloc/context* ptr (int size) (int line) (string file) (string function))</procedure>
3773
3774Implements al_realloc_with_context.
3775
3776<procedure>(realloc/context ptr (int size) (int line) (string file) (string function))</procedure>
3777
3778Implements al_realloc_with_context, with (free/context!) declared as a finalizer.
3779
3780<procedure>(calloc/context* (int count) (int size) (int line) (string file) (string function))</procedure>
3781
3782Implements al_calloc_with_context.
3783
3784<procedure>(calloc/context (int count) (int size) (int line) (string file) (string function))</procedure>
3785
3786Implements al_calloc_with_context, with (free/context!) declared as a finalizer.
3787
3788==== Memory Files
3789
3790<procedure>(open-memfile* (c-pointer mem) (unsigned-integer size) (string mode))</procedure>
3791
3792Implements al_open_memfile.
3793
3794<procedure>(open-memfile (c-pointer mem) (unsigned-integer size) (string mode))</procedure>
3795
3796Implements al_open_memfile, with (free&close-file!) declared as a finalizer.
3797
3798<procedure>(memfile-version)</procedure>
3799
3800Implements al_get_allegro_memfile_version.
3801
3802==== Miscellaneous
3803
3804<procedure>(combine-flags converter flags)</procedure>
3805
3806For combining enum flags together, ie:
3807
3808<enscript highlight="scheme">
3809(combine-flags display-flag->int '(windowed opengl resizable generate-expose-events))
3810</enscript>
3811
3812<procedure>(make-id a b c d)</procedure>
3813
3814Implements AL_ID.
3815
3816<procedure>(run-main argc argv (function integer (integer (c-pointer c-string))))</procedure>
3817
3818Implements al_run_main.
3819
3820<procedure>(init-everything)</procedure>
3821
3822Initializes all sub-systems.
3823
3824<procedure>(init-symbol s)</procedure>
3825
3826Initializes sub-systems by symbol-name. Valid symbols are: allegro, audio, font, image, joystick, keyboard, mouse, primitives, and ttf.
3827
3828<procedure>(init-this arg)</procedure>
3829
3830Initializes sub-systems either by a single symbol or by a list of symbols. Ie:
3831
3832<enscript highlight="scheme">
3833(init-this (list 'allegro 'audio 'font 'image 'joystick 'keyboard 'mouse 'primitives 'ttf))
3834</enscript>
3835
3836<procedure>(uninstall-everything)</procedure>
3837
3838Attempts to uninitialize all loaded sub-systems.
3839
3840<procedure>(uninstall-this arg)</procedure>
3841
3842Attempts to uninitialize sub-systems by either a single symbol or by a list of symbols. Ie:
3843
3844<enscript highlight="scheme">
3845(uninstall-this (list 'system 'audio 'font 'image 'joystick 'keyboard 'mouse 'primitives 'ttf))
3846</enscript>
3847
3848
3849== System
3850
3851=== Constants
3852
3853* build-version
3854* pi
3855
3856=== Enums
3857
3858==== state-flag
3859
3860<procedure>(state-flag->int state-flag)</procedure>
3861
3862{{state-flag}} may be one of the following symbols:
3863* new-display-parameters
3864* new-bitmap-parameters
3865* display
3866* target-bitmap
3867* blender
3868* new-file-interface
3869* transform
3870* bitmap
3871* all
3872
3873<procedure>(int->state-flag integer)</procedure>
3874
3875==== system-path
3876
3877<procedure>(system-path->int system-path)</procedure>
3878
3879{{system-path}} may be one of the following symbols:
3880* resources-path
3881* temp-path
3882* user-data-path
3883* user-home-path
3884* user-settings-path
3885* user-documents-path
3886* exename-path
3887* last-path
3888
3889=== Records
3890
3891==== condition
3892
3893<record>condition</record>
3894
3895==== driver
3896
3897<record>driver</record>
3898<procedure>(free-driver!)</procedure>
3899<procedure>(driver-id driver)</procedure>
3900<procedure>(driver-ptr driver)</procedure>
3901<procedure>(driver-autodetect driver)</procedure>
3902
3903==== mutex
3904
3905<record>mutex</record>
3906
3907==== state
3908
3909<record>state</record>
3910<procedure>(make-state*)</procedure>
3911<procedure>(make-state)</procedure>
3912<procedure>(free-state! state)</procedure>
3913
3914==== system
3915
3916<record>system</record>
3917
3918==== thread
3919
3920<record>thread</record>
3921
3922==== timer
3923
3924<record>timer</record>
3925
3926==== timeout
3927
3928<record>timeout</record>
3929<procedure>(make-timeout*)</procedure>
3930<procedure>(make-timeout)</procedure>
3931<procedure>(free-timeout! timeout)</procedure>
3932
3933==== version
3934
3935<record>version</record>
3936
3937<procedure>(version-major version)</procedure>
3938<procedure>(version-sub version)</procedure>
3939<procedure>(version-wip version)</procedure>
3940<procedure>(version-release-number version)</procedure>
3941<procedure>(version-string version)</procedure>
3942<procedure>(version-date-string version)</procedure>
3943<procedure>(version-date version)</procedure>
3944<procedure>(version-int version)</procedure>
3945
3946=== Functions
3947
3948==== System
3949
3950<procedure>(init)</procedure>
3951
3952Implements al_init.
3953
3954<procedure>(inhibit-screensaver bool)</procedure>
3955
3956Implements al_inhibit_screensaver.
3957
3958<procedure>(org-name)</procedure>
3959
3960Implements al_get_org_name.
3961
3962<setter>(org-name-set! string)</setter>
3963
3964Implements al_set_org_name.
3965
3966<procedure>(app-name)</procedure>
3967
3968Implements al_get_app_name.
3969
3970<setter>(app-name-set! string)</procedure>
3971
3972Implements al_set_app_name.
3973
3974<procedure>(system-addon-uninstall)</procedure>
3975
3976Implements al_uninstall_system.
3977
3978<procedure>(system-addon-installed?)</procedure>
3979
3980Implements al_is_system_installed.
3981
3982<procedure>(system-driver)</procedure>
3983
3984Implements al_get_system_driver.
3985
3986<procedure>(system-config)</procedure>
3987
3988Implements al_get_system_config.
3989
3990<procedure>(standard-path system-path)</procedure>
3991
3992Implements al_get_standard_path.
3993
3994==== Threads
3995
3996WARNING: Untested, may not interact well with Chicken.
3997
3998Please, please tell me about your successes and workarounds. I'll fix the egg as called for.
3999
4000<procedure>(make-thread* (function c-pointer (thread c-pointer)) c-pointer)</procedure>
4001
4002Implements al_create_thread.
4003
4004<procedure>(make-thread (function c-pointer (thread c-pointer)) c-pointer)</procedure>
4005
4006Implements al_create_thread, with (free-thread!) declared as a finalizer.
4007
4008<procedure>(free-thread! thread)</procedure>
4009
4010Implements al_destroy_thread.
4011
4012<proceudre>(run-detached-thread (function c-pointer (c-pointer)) c-pointer)</procedure>
4013
4014Implements al_run_detached_thread.
4015
4016<procedure>(thread-start! thread)</procedure>
4017
4018Implements al_start_thread.
4019
4020<procedure>(thread-join! thread ((c-pointer c-pointer) ret_value))</procedure>
4021
4022Implements al_join_thread.
4023
4024<procedure>(thread-should-stop? thread)</procedure>
4025
4026Implements al_get_thread_should_stop.
4027
4028<setter>(thread-should-stop-set! thread)</setter>
4029
4030Implements al_set_thread_should_stop.
4031
4032<procedure>(make-mutex*)</procedure>
4033
4034Implements al_create_mutex.
4035
4036<procedure>(make-mutex)</procedure>
4037
4038Implements al_create_mutex, with (free-mutex!) declared as a finalizer.
4039
4040<procedure>(free-mutex! mutex)</procedure>
4041
4042Implements al_destroy_mutex.
4043
4044<procedure>(make-mutex-recursive*)</procedure>
4045
4046Implements al_create_mutex_recursive.
4047
4048<procedure>(make-mutex-recursive)</procedure>
4049
4050Implements al_create_mutex_recursive, with (free-mutex!) declared as a finalizer.
4051
4052<procedure>(mutex-lock! mutex)</procedure>
4053
4054Implements al_lock_mutex.
4055
4056<procedure>(mutex-unlock! mutex)</procedure>
4057
4058Implements al_unlock_mutex.
4059
4060<procedure>(make-condition*)</procedure>
4061
4062Implements al_create_cond.
4063
4064<procedure>(make-condition)</procedure>
4065
4066Implements al_create_cond, with (free-condition!) declared as a finalizer.
4067
4068<procedure>(free-condition! condition)</procedure>
4069
4070Implements al_destroy_cond.
4071
4072<procedure>(condition-wait condition mutex)</procedure>
4073
4074Implements al_wait_cond.
4075
4076<procedure>(condition-wait-until condition mutex timeout)</procedure>
4077
4078Implements al_wait_cond_until.
4079
4080<procedure>(condition-broadcast condition)</procedure>
4081
4082Implements al_broadcast_cond.
4083
4084<procedure>(condition-signal condition)</procedure>
4085
4086Implements al_signal_cond.
4087
4088==== Thread Local Storage
4089
4090<procedure>(state-store! state state-flag)</procedure>
4091
4092Implements al_store_state.
4093
4094<procedure>(state-restore state)</procedure>
4095
4096Implements al_restore_state.
4097
4098==== Time
4099
4100<procedure>(current-time)</procedure>
4101
4102Implements al_get_time.
4103
4104<procedure>(rest double)</procedure>
4105
4106Implements al_rest.
4107
4108<procedure>(timeout-init! timeout double)</procedure>
4109
4110Implements al_init_timeout.
4111
4112==== Timer
4113
4114<procedure>(make-timer* double)</procedure>
4115
4116Implements al_create_timer.
4117
4118<procedure>(make-timer double)</procedure>
4119
4120Implements al_create_timer, with (free-timer!) declared as a finalizer.
4121
4122<procedure>(free-timer! timer)</procedure>
4123
4124Implements al_destroy_timer.
4125
4126<procedure>(usec->sec double)</procedure>
4127
4128Implements ALLEGRO_USECS_TO_SECS.
4129
4130<procedure>(msec->sec double)</procedure>
4131
4132Implements ALLEGRO_MSECS_TO_SECS.
4133
4134<procedure>(bps->sec double)</procedure>
4135
4136Implements ALLEGRO_BPS_TO_SECS.
4137
4138<procedure>(bpm->sec double)</procedure>
4139
4140Implements ALLEGRO_BPM_TO_SECS.
4141
4142<procedure>(timer-start! timer)</procedure>
4143
4144Implements al_start_timer.
4145
4146<procedure>(timer-stop! timer)</procedure>
4147
4148Implements al_stop_timer.
4149
4150<procedure>(timer-started? timer)</procedure>
4151
4152Implements al_get_timer_started.
4153
4154<procedure>(timer-speed timer)</procedure>
4155
4156Implements al_get_timer_speed.
4157
4158<setter>(timer-speed-set! timer double)</procedure>
4159
4160Implements al_set_timer_speed.
4161
4162<procedure>(timer-count timer)</procedure>
4163
4164Implements al_get_timer_count.
4165
4166<setter>(timer-count-set! timer integer)</procedure>
4167
4168Implements al_set_timer_count.
4169
4170<procedure>(timer-count-add! timer integer)</procedure>
4171
4172Implements al_add_timer_count.
4173
4174<procedure>(timer-source timer)</procedure>
4175
4176Implements al_get_timer_event_source.
4177
4178==== C Utilities
4179
4180Found in the allegro-c-util module.
4181
4182====== (make-c-string-list obj)
4183
4184The obj parameter can either be a single string or list of strings. Returns a managed pointer to a NULL-terminated (char **) list suitable for use with GL extension methods.
4185
4186
4187
4188
4189
4190== License
4191
4192 Copyright 2012-2019 Daniel J. Leslie. All rights reserved.
4193 
4194 Redistribution and use in source and binary forms, with or without modification, are
4195permitted provided that the following conditions are met:
4196
4197   1. Redistributions of source code must retain the above copyright notice, this list of
4198      conditions and the following disclaimer.
4199
4200   2. Redistributions in binary form must reproduce the above copyright notice, this list
4201      of conditions and the following disclaimer in the documentation and/or other materials
4202      provided with the distribution.
4203
4204 THIS SOFTWARE IS PROVIDED BY DANIEL J. LESLIE ''AS IS'' AND ANY EXPRESS OR IMPLIED
4205 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4206 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DANIEL J. LESLIE OR
4207 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
4208 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4209 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
4210 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
4211 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
4212 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4213
4214 The views and conclusions contained in the software and documentation are those of the
4215 authors and should not be interpreted as representing official policies, either expressed
4216 or implied, of Daniel J. Leslie.
Note: See TracBrowser for help on using the repository browser.