1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2014 by SiegeLord
//
// All rights reserved. Distributed under ZLib. For full terms see the file LICENSE.

use libc::*;

use allegro_util::c_bool;
use bitmap::*;
use file::*;

pub type ALLEGRO_IIO_LOADER_FUNCTION = extern "C" fn(arg1: *const c_char) -> *mut ALLEGRO_BITMAP;
pub type ALLEGRO_IIO_FS_LOADER_FUNCTION =
	extern "C" fn(arg1: *mut ALLEGRO_FILE) -> *mut ALLEGRO_BITMAP;
pub type ALLEGRO_IIO_SAVER_FUNCTION =
	extern "C" fn(arg1: *const c_char, arg2: *mut ALLEGRO_BITMAP) -> c_bool;
pub type ALLEGRO_IIO_FS_SAVER_FUNCTION =
	extern "C" fn(arg1: *mut ALLEGRO_FILE, arg2: *mut ALLEGRO_BITMAP) -> c_bool;

extern "C" {
	pub fn al_register_bitmap_loader(
		ext: *const c_char, loader: ALLEGRO_IIO_LOADER_FUNCTION,
	) -> c_bool;
	pub fn al_register_bitmap_saver(
		ext: *const c_char, saver: ALLEGRO_IIO_SAVER_FUNCTION,
	) -> c_bool;
	pub fn al_register_bitmap_loader_f(
		ext: *const c_char, fs_loader: ALLEGRO_IIO_FS_LOADER_FUNCTION,
	) -> c_bool;
	pub fn al_register_bitmap_saver_f(
		ext: *const c_char, fs_saver: ALLEGRO_IIO_FS_SAVER_FUNCTION,
	) -> c_bool;
	pub fn al_load_bitmap(filename: *const c_char) -> *mut ALLEGRO_BITMAP;
	pub fn al_load_bitmap_f(fp: *mut ALLEGRO_FILE, ident: *const c_char) -> *mut ALLEGRO_BITMAP;
	pub fn al_save_bitmap(filename: *const c_char, bitmap: *mut ALLEGRO_BITMAP) -> c_bool;
	pub fn al_save_bitmap_f(
		fp: *mut ALLEGRO_FILE, ident: *const c_char, bitmap: *mut ALLEGRO_BITMAP,
	) -> c_bool;
}