forked from deividAlfa/UGUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ugui_image.h
51 lines (44 loc) · 2.2 KB
/
ugui_image.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
46
47
48
49
50
51
#ifndef __UGUI_IMAGE_H
#define __UGUI_IMAGE_H
#include "ugui.h"
/* -------------------------------------------------------------------------------- */
/* -- IMAGE OBJECT -- */
/* -------------------------------------------------------------------------------- */
/* Image structure */
typedef struct
{
void* img;
UG_U8 type;
} UG_IMAGE;
/* Object type */
#define OBJ_TYPE_IMAGE 3
/* Default image IDs */
#define IMG_ID_0 OBJ_ID_0
#define IMG_ID_1 OBJ_ID_1
#define IMG_ID_2 OBJ_ID_2
#define IMG_ID_3 OBJ_ID_3
#define IMG_ID_4 OBJ_ID_4
#define IMG_ID_5 OBJ_ID_5
#define IMG_ID_6 OBJ_ID_6
#define IMG_ID_7 OBJ_ID_7
#define IMG_ID_8 OBJ_ID_8
#define IMG_ID_9 OBJ_ID_9
#define IMG_ID_10 OBJ_ID_10
#define IMG_ID_11 OBJ_ID_11
#define IMG_ID_12 OBJ_ID_12
#define IMG_ID_13 OBJ_ID_13
#define IMG_ID_14 OBJ_ID_14
#define IMG_ID_15 OBJ_ID_15
#define IMG_ID_16 OBJ_ID_16
#define IMG_ID_17 OBJ_ID_17
#define IMG_ID_18 OBJ_ID_18
#define IMG_ID_19 OBJ_ID_19
/* Image types */
#define IMG_TYPE_BMP (1<<0)
/* Image functions */
UG_RESULT UG_ImageCreate( UG_WINDOW* wnd, UG_IMAGE* img, UG_U8 id, UG_S16 xs, UG_S16 ys, UG_S16 xe, UG_S16 ye );
UG_RESULT UG_ImageDelete( UG_WINDOW* wnd, UG_U8 id );
UG_RESULT UG_ImageShow( UG_WINDOW* wnd, UG_U8 id );
UG_RESULT UG_ImageHide( UG_WINDOW* wnd, UG_U8 id );
UG_RESULT UG_ImageSetBMP( UG_WINDOW* wnd, UG_U8 id, const UG_BMP* bmp );
#endif // __UGUI_IMAGE_H