Difference between revisions of "Blitz:Includes"

From Amiga Coding
Jump to: navigation, search
(Common Includes)
Line 39: Line 39:
  
 
[[Category:Blitz Basic / AmiBlitz|Blitz]]
 
[[Category:Blitz Basic / AmiBlitz|Blitz]]
 +
[[Category:Advancing With Blitz|Advancing With Blitz]]

Revision as of 17:34, 21 August 2015

AmiBlitz is distributed with a range of "Include" files in addition to the standard Blitz binary libraries. These includes contain numerous functions that can be integrated into your own source. Each include can be added to your source using the following code:

XInclude "image.include.ab3"

The XInclude command will only include the given source file if it has not already been included previously. This is important as some include files depend on others and so also contain XInclude statements. Including an include file more than once will most likely cause errors.

The supplied includes generally contain an example of their usage at the end of the code. To see and try this code, simply load the include itself into the editor and compile it.


Common Includes

Some of the more important include files are as follows:

asl.include.ab3
Contains functions for setting up and using the standard ASL requesters, including file, drawer, screenmode and font requesters.


dos.include.ab3
Contains many dos.library functions used for obtaining information on files, drawers, volumes and so on, and for simple manipulation of filesystem paths, for example adding a filename string to a path string without worrying about trailing slashes, colons etc.


file.include.ab3
Contains functions for reading and writing files and other file-related activities.


file-audio.include.ab3
Contains functions for reading and writing audio data, including support for different audio file formats, format conversion and streaming from disc.


image.include.ab3
Contains functions for loading, saving, manipulating and displaying graphic files in a system-friendly manner.


intuition.include.ab3
Contains functions for handling intuition messages, events etc. in a system-friendly and flexible manner.


screen.include.ab3
Contains functions for handling and configuring intuition screens.