added worldarea -> will be responsible for world map rendering
[dboe.git] / types.h
blob3982a0cd050fcc2e5f7b19f5bb56e484f33e56ef
1 #ifndef TYPES_H_DEFINED
2 #define TYPES_H_DEFINED
4 #include <gtk/gtk.h>
6 typedef char Boolean;
8 typedef struct rect {
9 int left,top,right,bottom;
10 } RECT;
12 typedef void* HWND;
13 typedef void* HDC;
14 typedef void* HBITMAP;
15 typedef void* HFILE;
17 typedef struct point {
18 int x,y;
19 } POINT;
21 typedef unsigned int UINT;
22 typedef long int LONG;
23 typedef unsigned char BYTE;
24 typedef unsigned short WORD;
25 typedef unsigned long DWORD;
27 //#define FALSE 1
28 //#define TRUE 0
30 #define GFSR_GDIRESOURCES 0
31 #define GFSR_USERRESOURCES 1
32 #define HMENU void*
33 #define MF_BYCOMMAND 4
34 #define MF_ENABLED 5
35 #define MF_GRAYED 6
36 #define MK_CONTROL 7
37 #define VK_DOWN 8
38 #define VK_ESCAPE 8
39 #define VK_LEFT 10
40 #define VK_NUMPAD0 11
41 #define VK_NUMPAD1 12
42 #define VK_NUMPAD2 13
43 #define VK_NUMPAD3 14
44 #define VK_NUMPAD4 15
45 #define VK_NUMPAD5 16
46 #define VK_NUMPAD6 17
47 #define VK_NUMPAD7 18
48 #define VK_NUMPAD8 19
49 #define VK_NUMPAD9 20
50 #define VK_RIGHT 21
51 #define VK_UP 22
52 #define WM_CHAR 23
53 #define WM_COMMAND 24
54 #define WM_KEYDOWN 25
55 #define WM_LBUTTONDOWN 26
56 #define WM_PAINT 27
57 #define WM_RBUTTONDOWN 28
58 #define SB_CTL 29
61 //actions.cc
62 DrawMenuBar
63 EnableMenuItem
64 GetFreeSpace
65 GetFreeSystemResources
66 GetMenu
67 GetScrollPos
68 InvertRect
69 PtInRect
70 SetFocus
71 SetViewportOrg
72 #define LOWORD 0
73 #define MAKEPOINT 1
76 void OffsetRect(RECT *r, int dx, int dy) {
77 r->right += dx;
78 r->left += dx;
79 r->top += dy;
80 r->bottom += dy;
83 Boolean PtInRect(const RECT *r, const POINT p) {
84 return (p.x >= r->left && p.x <= r->right &&
85 p.y >= r->bottom && p.y <= r->top);
88 void SetFocus(HWND hwnd) {
91 int GetScrollPos(HWND hwnd, int flags) {
92 return 0;
95 #define MAKEPOINT(wrd) (POINT p; p.x = wrd&0xFFFF; p.y = wrd >> 8;)
97 HDC GetDC(HWND hwnd) {
98 return NULL;
101 #endif