/
bitmap_lock.h
45 lines (34 loc) · 1.13 KB
/
bitmap_lock.h
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
39
40
41
42
43
44
45
#ifndef __al_included_allegro5_bitmap_lock_h
#define __al_included_allegro5_bitmap_lock_h
#include "allegro5/bitmap.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Locking flags
*/
enum {
ALLEGRO_LOCK_READWRITE = 0,
ALLEGRO_LOCK_READONLY = 1,
ALLEGRO_LOCK_WRITEONLY = 2
};
/* Type: ALLEGRO_LOCKED_REGION
*/
typedef struct ALLEGRO_LOCKED_REGION ALLEGRO_LOCKED_REGION;
struct ALLEGRO_LOCKED_REGION {
void *data;
int format;
int pitch;
int pixel_size;
};
AL_FUNC(ALLEGRO_LOCKED_REGION*, al_lock_bitmap, (ALLEGRO_BITMAP *bitmap, int format, int flags));
AL_FUNC(ALLEGRO_LOCKED_REGION*, al_lock_bitmap_region, (ALLEGRO_BITMAP *bitmap, int x, int y, int width, int height, int format, int flags));
AL_FUNC(ALLEGRO_LOCKED_REGION*, al_lock_bitmap_blocked, (ALLEGRO_BITMAP *bitmap, int flags));
AL_FUNC(ALLEGRO_LOCKED_REGION*, al_lock_bitmap_region_blocked, (ALLEGRO_BITMAP *bitmap, int x_block, int y_block,
int width_block, int height_block, int flags));
AL_FUNC(void, al_unlock_bitmap, (ALLEGRO_BITMAP *bitmap));
AL_FUNC(bool, al_is_bitmap_locked, (ALLEGRO_BITMAP *bitmap));
#ifdef __cplusplus
}
#endif
#endif