Release 940201
[wine.git] / include / win.h
blob371b03682499f6362e3b4b75a1087ad62ad3bf8b
1 /*
2 * Window definitions
4 * Copyright 1993 Alexandre Julliard
5 */
7 #ifndef WIN_H
8 #define WIN_H
10 #include <X11/Xlib.h>
12 #include "windows.h"
13 #include "menu.h"
15 #define WND_MAGIC 0x444e4957 /* 'WIND' */
18 typedef struct tagWND
20 HWND hwndNext; /* Next sibling */
21 HWND hwndChild; /* First child */
22 DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
23 HWND hwndParent; /* Window parent (from CreateWindow) */
24 HWND hwndOwner; /* Window owner */
25 HCLASS hClass; /* Window class */
26 HANDLE hInstance; /* Window hInstance (from CreateWindow) */
27 RECT rectClient; /* Client area rel. to parent client area */
28 RECT rectWindow; /* Whole window rel. to parent client area */
29 RECT rectNormal; /* Window rect. when in normal state */
30 POINT ptIconPos; /* Icon position */
31 POINT ptMaxPos; /* Maximized window position */
32 HANDLE hmemTaskQ; /* Task queue global memory handle */
33 HRGN hrgnUpdate; /* Update region */
34 HWND hwndLastActive; /* Last active popup hwnd */
35 FARPROC lpfnWndProc; /* Window procedure */
36 DWORD dwStyle; /* Window style (from CreateWindow) */
37 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
38 HANDLE hdce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
39 HMENU hmenuSystem; /* System menu */
40 HCURSOR hCursor; /* Window Current Cursor */
41 void *VScroll; /* Vertical ScrollBar Struct Pointer */
42 void *HScroll; /* Horizontal ScrollBar Struct Pointer */
43 WORD wIDmenu; /* ID or hmenu (from CreateWindow) */
44 HANDLE hText; /* Handle of window text */
45 WORD flags; /* Misc. flags */
46 Window window; /* X window */
47 LPMENUBAR menuBarPtr; /* Menu bar */
48 HMENU hSysMenu; /* window's copy of System Menu */
49 HWND hWndMenuBar; /* Menu bar */
50 WORD wExtra[1]; /* Window extra bytes */
51 } WND;
53 /* WND flags values */
54 #define WIN_ERASE_UPDATERGN 0x01 /* Update region needs erasing */
55 #define WIN_NEEDS_BEGINPAINT 0x02 /* WM_PAINT sent to window */
56 #define WIN_GOT_SIZEMSG 0x04 /* WM_SIZE has been sent to the window */
57 #define WIN_OWN_DC 0x08 /* Win class has style CS_OWNDC */
58 #define WIN_CLASS_DC 0x10 /* Win class has style CS_CLASSDC */
59 #define WIN_DOUBLE_CLICKS 0x20 /* Win class has style CS_DBLCLKS */
60 #define WIN_RESTORE_MAX 0x40 /* Maximize when restoring */
62 /* First top-level window */
63 extern HWND firstWindow;
65 /* Window functions */
66 WND *WIN_FindWndPtr( HWND hwnd );
67 BOOL WIN_UnlinkWindow( HWND hwnd );
68 BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
69 HWND WIN_FindWinToRepaint( HWND hwnd );
72 #endif /* WIN_H */