Release 0.6
[wine] / include / win.h
1 /*
2  * Window definitions
3  *
4  * Copyright 1993 Alexandre Julliard
5  */
6
7 #ifndef WIN_H
8 #define WIN_H
9
10 #include <X11/Xlib.h>
11
12 #include "windows.h"
13 #include "menu.h"
14
15 #define WND_MAGIC     0x444e4957  /* 'WIND' */
16
17
18 typedef struct tagWND
19 {
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     HANDLE       hmemTaskQ;      /* Task queue global memory handle */
30     HRGN         hrgnUpdate;     /* Update region */
31     HWND         hwndLastActive; /* Last active popup hwnd */
32     FARPROC      lpfnWndProc;    /* Window procedure */
33     DWORD        dwStyle;        /* Window style (from CreateWindow) */
34     DWORD        dwExStyle;      /* Extended style (from CreateWindowEx) */
35     HANDLE       hdce;           /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
36     HMENU        hmenuSystem;    /* System menu */
37     HCURSOR      hCursor;        /* Window Current Cursor */
38     HWND         hWndVScroll;    /* Verti. ScrollBar handle of the window */
39     HWND         hWndHScroll;    /* Horiz. ScrollBar handle of the window */
40     WORD         wIDmenu;        /* ID or hmenu (from CreateWindow) */
41     HANDLE       hText;          /* Handle of window text */
42     WORD         flags;          /* Misc. flags */
43     Window       window;         /* X window */
44     LPMENUBAR    menuBarPtr;     /* Menu bar */
45     HWND         hWndMenuBar;    /* Menu bar */
46     HWND         hWndCaption;    /* Caption bar */
47     WORD         wExtra[1];      /* Window extra bytes */
48 } WND;
49
50   /* WND flags values */
51 #define WIN_ERASE_UPDATERGN     0x01  /* Update region needs erasing */
52 #define WIN_NEEDS_BEGINPAINT    0x02  /* WM_PAINT sent to window */
53 #define WIN_GOT_SIZEMSG         0x04  /* WM_SIZE has been sent to the window */
54 #define WIN_OWN_DC              0x08  /* Win class has style CS_OWNDC */
55 #define WIN_CLASS_DC            0x10  /* Win class has style CS_CLASSDC */
56 #define WIN_DOUBLE_CLICKS       0x20  /* Win class has style CS_DBLCLKS */
57
58   /* Window functions */
59 WND *WIN_FindWndPtr( HWND hwnd );
60 BOOL WIN_UnlinkWindow( HWND hwnd );
61 BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
62 HWND WIN_FindWinToRepaint( HWND hwnd );
63
64
65 #endif  /* WIN_H */