summaryrefslogtreecommitdiff
path: root/utils/wpseditor/libwps/src/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/wpseditor/libwps/src/defs.h')
-rw-r--r--utils/wpseditor/libwps/src/defs.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/utils/wpseditor/libwps/src/defs.h b/utils/wpseditor/libwps/src/defs.h
new file mode 100644
index 0000000000..810c8da238
--- /dev/null
+++ b/utils/wpseditor/libwps/src/defs.h
@@ -0,0 +1,41 @@
1#ifndef DEFS_H_INCLUDED
2#define DEFS_H_INCLUDED
3
4typedef int (*pfdebugf)(const char* fmt,...);
5extern pfdebugf dbgf;
6
7#ifdef BUILD_DLL
8# define EXPORT __declspec(dllexport)
9#else
10# define EXPORT
11#endif
12
13#ifndef MIN
14# define MIN(a, b) (((a)<(b))?(a):(b))
15#endif
16
17#ifndef MAX
18# define MAX(a, b) (((a)>(b))?(a):(b))
19#endif
20
21#define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \
22 ((unsigned short)(x) << 8)))
23
24#define SWAP_32(x) ((typeof(x))(unsigned long)( ((unsigned long)(x) >> 24) | \
25 (((unsigned long)(x) & 0xff0000ul) >> 8) | \
26 (((unsigned long)(x) & 0xff00ul) << 8) | \
27 ((unsigned long)(x) << 24)))
28
29#define PLAYMODES_NUM 5
30enum api_playmode {
31 API_STATUS_PLAY,
32 API_STATUS_STOP,
33 API_STATUS_PAUSE,
34 API_STATUS_FASTFORWARD,
35 API_STATUS_FASTBACKWARD
36};
37
38extern enum api_playmode playmodes[PLAYMODES_NUM];
39extern const char *playmodeNames[];
40
41#endif // DEFS_H_INCLUDED