1al_register_bitmap_identifier(3)              al_register_bitmap_identifier(3)
2
3
4

NAME

6       al_register_bitmap_identifier - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              bool al_register_bitmap_identifier(const char *extension,
12                 bool (*identifier)(ALLEGRO_FILE *f))
13

DESCRIPTION

15       Register  an  identify  handler  for  al_identify_bitmap(3).  The given
16       function will be used to detect files for the given extension.  It will
17       be  called  with  a  single argument of type ALLEGRO_FILE(3) which is a
18       file handle opened for reading and located at the  first  byte  of  the
19       file.   The  handler  should  try  to  read as few bytes as possible to
20       safely determine if the given file contents correspond to the type with
21       the  extension and return true in that case, false otherwise.  The file
22       handle must not be closed but there is no  need  to  reset  it  to  the
23       beginning.
24
25       The  extension should include the leading dot ('.') character.  It will
26       be matched case-insensitively.
27
28       The identifier argument may be NULL to unregister an entry.
29
30       Returns true on success, false on error.  Returns false if  unregisterā€
31       ing an entry that doesn't exist.
32

SINCE

34       5.1.12
35

SEE ALSO

37       al_identify_bitmap(3)
38
39
40
41Allegro reference manual                      al_register_bitmap_identifier(3)
Impressum