1use crate::bitmap::*;
6use crate::file::*;
7
8use allegro_util::c_bool;
9use libc::*;
10
11pub const ALLEGRO_KEEP_INDEX: u32 = 0x0800;
12
13pub type ALLEGRO_IIO_LOADER_FUNCTION = extern "C" fn(arg1: *const c_char) -> *mut ALLEGRO_BITMAP;
14pub type ALLEGRO_IIO_FS_LOADER_FUNCTION =
15 extern "C" fn(arg1: *mut ALLEGRO_FILE) -> *mut ALLEGRO_BITMAP;
16pub type ALLEGRO_IIO_SAVER_FUNCTION =
17 extern "C" fn(arg1: *const c_char, arg2: *mut ALLEGRO_BITMAP) -> c_bool;
18pub type ALLEGRO_IIO_FS_SAVER_FUNCTION =
19 extern "C" fn(arg1: *mut ALLEGRO_FILE, arg2: *mut ALLEGRO_BITMAP) -> c_bool;
20
21unsafe extern "C" {
22 pub fn al_register_bitmap_loader(
23 ext: *const c_char, loader: ALLEGRO_IIO_LOADER_FUNCTION,
24 ) -> c_bool;
25 pub fn al_register_bitmap_saver(
26 ext: *const c_char, saver: ALLEGRO_IIO_SAVER_FUNCTION,
27 ) -> c_bool;
28 pub fn al_register_bitmap_loader_f(
29 ext: *const c_char, fs_loader: ALLEGRO_IIO_FS_LOADER_FUNCTION,
30 ) -> c_bool;
31 pub fn al_register_bitmap_saver_f(
32 ext: *const c_char, fs_saver: ALLEGRO_IIO_FS_SAVER_FUNCTION,
33 ) -> c_bool;
34 pub fn al_load_bitmap(filename: *const c_char) -> *mut ALLEGRO_BITMAP;
35 pub fn al_load_bitmap_flags(filename: *const c_char, flags: c_int) -> *mut ALLEGRO_BITMAP;
36 pub fn al_load_bitmap_f(fp: *mut ALLEGRO_FILE, ident: *const c_char) -> *mut ALLEGRO_BITMAP;
37 pub fn al_load_bitmap_flags_f(
38 fp: *mut ALLEGRO_FILE, ident: *const c_char, flags: c_int,
39 ) -> *mut ALLEGRO_BITMAP;
40 pub fn al_save_bitmap(filename: *const c_char, bitmap: *mut ALLEGRO_BITMAP) -> c_bool;
41 pub fn al_save_bitmap_f(
42 fp: *mut ALLEGRO_FILE, ident: *const c_char, bitmap: *mut ALLEGRO_BITMAP,
43 ) -> c_bool;
44}