Record ALLEGRO_FILE_INTERFACE

Hierarchy
Methods
Properties

Unit

Declaration

type ALLEGRO_FILE_INTERFACE = record

Description

A structure containing function pointers to handle a type of "file", real or virtual. See the full discussion in al_set_new_file_interface.

The fi_open function must allocate memory for whatever userdata structure it needs. The pointer to that memory must be returned; it will then be associated with the file. The other functions can access that data by calling al_get_file_userdata on the file handle. If fi_open returns Nil then al_fopen will also return Nil.

The fi_fclose function must clean up and free the userdata, but Allegro will free the ALLEGRO_FILEptr handle.

If fi_fungetc is Nil, then Allegro's default implementation of a 16 char long buffer will be used.

See also
al_set_new_file_interface
Sets the ALLEGRO_FILE_INTERFACE table for the calling thread.
al_fopen_interface
Opens a file using the specified interface, instead of the interface set with al_set_new_file_interface.
al_get_file_userdata
Returns a pointer to the custom userdata that is attached to the file handle.

Overview

Fields

fi_open: function(const path, mode: AL_STR): AL_POINTER; CDECL;
fi_fclose: function(handle: ALLEGRO_FILEptr): AL_BOOL; CDECL;
fi_fread: function(f: ALLEGRO_FILEptr; ptr: AL_POINTER; size: AL_SIZE_T): AL_SIZE_T; CDECL;
fi_fwrite: function(f: ALLEGRO_FILEptr; const ptr: AL_POINTER; size: AL_SIZE_T): AL_SIZE_T; CDECL;
fi_fflush: function(f: ALLEGRO_FILEptr): AL_BOOL; CDECL;
fi_ftell: function(f: ALLEGRO_FILEptr): AL_INT64; CDECL;
fi_fseek: function(f: ALLEGRO_FILEptr; offset: AL_INT64; whence: AL_INT): AL_BOOL; CDECL;
fi_feof: function(f: ALLEGRO_FILEptr): AL_BOOL; CDECL;
fi_ferror: function(f: ALLEGRO_FILEptr): AL_INT; CDECL;
fi_ferrmsg: function(f: ALLEGRO_FILEptr): AL_STRptr; CDECL;
fi_fclearerr: procedure(f: ALLEGRO_FILEptr); CDECL;
fi_fungetc: function(f: ALLEGRO_FILEptr; c: AL_INT): AL_INT; CDECL;
fi_fsize: function(f: ALLEGRO_FILEptr): AL_OFF_T; CDECL;

Description

Fields

fi_open: function(const path, mode: AL_STR): AL_POINTER; CDECL;
 
fi_fclose: function(handle: ALLEGRO_FILEptr): AL_BOOL; CDECL;
 
fi_fread: function(f: ALLEGRO_FILEptr; ptr: AL_POINTER; size: AL_SIZE_T): AL_SIZE_T; CDECL;
 
fi_fwrite: function(f: ALLEGRO_FILEptr; const ptr: AL_POINTER; size: AL_SIZE_T): AL_SIZE_T; CDECL;
 
fi_fflush: function(f: ALLEGRO_FILEptr): AL_BOOL; CDECL;
 
fi_ftell: function(f: ALLEGRO_FILEptr): AL_INT64; CDECL;
 
fi_fseek: function(f: ALLEGRO_FILEptr; offset: AL_INT64; whence: AL_INT): AL_BOOL; CDECL;
 
fi_feof: function(f: ALLEGRO_FILEptr): AL_BOOL; CDECL;
 
fi_ferror: function(f: ALLEGRO_FILEptr): AL_INT; CDECL;
 
fi_ferrmsg: function(f: ALLEGRO_FILEptr): AL_STRptr; CDECL;
 
fi_fclearerr: procedure(f: ALLEGRO_FILEptr); CDECL;
 
fi_fungetc: function(f: ALLEGRO_FILEptr; c: AL_INT): AL_INT; CDECL;
 
fi_fsize: function(f: ALLEGRO_FILEptr): AL_OFF_T; CDECL;
 

Generated by PasDoc 0.15.0. Generated on 2024-11-10 15:15:06.