forked from linux-source-tools/gimp-plugin-vtf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtf.h
67 lines (55 loc) · 1.68 KB
/
vtf.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef __VTF_H__
#define __VTF_H__
#include <stdio.h>
#include <glib.h>
/* Format */
#define VTF_FORMAT_NONE -1
#define VTF_FORMAT_RGBA8888 0
#define VTF_FORMAT_ABGR8888 1
#define VTF_FORMAT_RGB888 2
#define VTF_FORMAT_BGR888 3
#define VTF_FORMAT_RGB565 4
#define VTF_FORMAT_I8 5
#define VTF_FORMAT_IA88 6
#define VTF_FORMAT_P8 7
#define VTF_FORMAT_A8 8
#define VTF_FORMAT_RGB888_BLUESCREEN 9
#define VTF_FORMAT_BGR888_BLUESCREEN 10
#define VTF_FORMAT_ARGB8888 11
#define VTF_FORMAT_BGRA8888 12
#define VTF_FORMAT_DXT1 13
#define VTF_FORMAT_DXT3 14
#define VTF_FORMAT_DXT5 15
#define VTF_FORMAT_BGRX8888 16
#define VTF_FORMAT_BGR565 17
#define VTF_FORMAT_BGRX5551 18
#define VTF_FORMAT_BGRA4444 19
#define VTF_FORMAT_DXT1_ONEBITALPHA 20
#define VTF_FORMAT_BGRA5551 21
#define VTF_FORMAT_UV88 22
#define VTF_FORMAT_UVWQ8888 23
#define VTF_FORMAT_RGBA16161616F 24
#define VTF_FORMAT_RGBA16161616 25
#define VTF_FORMAT_UVLX8888 26
#define VTF_ERROR vtf_error_quark ()
typedef enum {
VTF_ERROR_INVALID,
VTF_ERROR_UNSUPPORTED,
VTF_ERROR_DIMENTION,
VTF_ERROR_FORMAT,
VTF_ERROR_RESOURCE
} VtfErrorEnum;
typedef struct _Vtf Vtf;
Vtf *vtf_open (const gchar *fname, GError **error);
Vtf *vtf_open_fd (FILE *fd, GError **error);
Vtf *vtf_open_mem (gpointer data, gsize length, GError **error);
void vtf_close (Vtf *vtf);
guint vtf_get_width (Vtf *vtf);
guint vtf_get_height (Vtf *vtf);
guint vtf_get_format (Vtf *vtf);
const gchar *vtf_get_format_name (gint format);
guint vtf_get_frame_count (Vtf *vtf);
void *vtf_get_image (Vtf *vtf, int frame);
void *vtf_get_image_rgba (Vtf *vtf, int frame);
GQuark vtf_error_quark (void);
#endif