1 |
|
2 |
|
3 |
#ifndef __NTDEF |
4 |
#define __NTDEF |
5 |
#include <windows.h> |
6 |
|
7 |
#define INVALID_HANDLE ((HANDLE) -2) |
8 |
#define NONMAPPED_HANDLE ((HANDLE) -3) |
9 |
#define VALID_WINDOW(x) (x && (((NT_window *)x)->w != INVALID_HANDLE)) |
10 |
#define xtrace |
11 |
#define cjh_printf |
12 |
|
13 |
#define CNUMTORGB(x) x |
14 |
/* #define printf(x) *//* x */ |
15 |
/* #define SetSystemPaletteUse(x) *//* x */ |
16 |
|
17 |
/* Windows NT Special event aliases */ |
18 |
|
19 |
#define USR_MapNotify 0x0401 |
20 |
#define USR_EnterNotify 0x0402 |
21 |
#define USR_LeaveNotify 0x0403 |
22 |
#define USR_Expose 0x0404 |
23 |
#define USR_ResizeRequest 0x0405 |
24 |
#define USR_WakeUp 0x0406 |
25 |
#define USR_ConvertSelection 0x0407 |
26 |
|
27 |
struct NT_child |
28 |
{ |
29 |
struct NT_window *w; |
30 |
struct NT_child *next; |
31 |
} NT_child; |
32 |
|
33 |
typedef struct NT_window |
34 |
{ |
35 |
HWND w; |
36 |
HBRUSH bg; |
37 |
int parentRelative; |
38 |
struct NT_window *parent; /* parent of this window */ |
39 |
struct NT_window *next; /* next window in list */ |
40 |
struct NT_child *child; /* points to list of children */ |
41 |
int x, y; /* Position */ |
42 |
unsigned int wdth, hght; /* Dimensions */ |
43 |
char *title_text; |
44 |
struct NT_prop_list *props; /* linked list of properties.*/ |
45 |
HDC hDC; |
46 |
HBITMAP hBitmap; |
47 |
int min; |
48 |
int minx, miny; /* minimum window size */ |
49 |
int top_flag; |
50 |
long mask; /* selectInputMask */ |
51 |
} NT_window; |
52 |
|
53 |
/* Routine declarations */ |
54 |
|
55 |
struct NT_window *NT_find_window_from_id(); |
56 |
int NT_delete_window(); |
57 |
|
58 |
struct NT_window *NT_new_window(); |
59 |
int NT_add_child(NT_window *parent,NT_window *child); |
60 |
struct NT_window *NT_find_child(NT_window *w,unsigned long mask, |
61 |
unsigned long val); |
62 |
int NT_del_child(NT_window *parent,NT_window *child); |
63 |
void freeMemory(void *p); |
64 |
void *allocateMemory(int s); |
65 |
void initQ(); |
66 |
void catchNextDestroyClipboard(); |
67 |
|
68 |
void NT_SetAtom(ATOM class); |
69 |
HWND NT_create_window(char *title,DWORD style,int x,int y,int w, int h,HWND parent); |
70 |
LONG NT_handleMsg(HWND hWnd,UINT message,UINT wParam,LONG lParam); |
71 |
HBITMAP NT_getWallpaper(); |
72 |
void NT_moveWindow(NT_window *ntw, BOOL repaint); |
73 |
#endif |