Release 940912
[wine/multimedia.git] / include / win.h
blob22290ddc1e0ade2d97bc315b335ca22f6c030066
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"
14 #define WND_MAGIC 0x444e4957 /* 'WIND' */
16 /* Built-in class names (see _Undocumented_Windows_ p.418) */
17 #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
18 #define DESKTOP_CLASS_NAME "#32769" /* Desktop */
19 #define DIALOG_CLASS_NAME "#32770" /* Dialog */
20 #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
21 #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
23 typedef struct tagWND
25 HWND hwndNext; /* Next sibling */
26 HWND hwndChild; /* First child */
27 DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
28 HWND hwndParent; /* Window parent (from CreateWindow) */
29 HWND hwndOwner; /* Window owner */
30 HCLASS hClass; /* Window class */
31 HANDLE hInstance; /* Window hInstance (from CreateWindow) */
32 RECT rectClient; /* Client area rel. to parent client area */
33 RECT rectWindow; /* Whole window rel. to parent client area */
34 RECT rectNormal; /* Window rect. when in normal state */
35 POINT ptIconPos; /* Icon position */
36 POINT ptMaxPos; /* Maximized window position */
37 HANDLE hmemTaskQ; /* Task queue global memory handle */
38 HRGN hrgnUpdate; /* Update region */
39 HWND hwndPrevActive; /* Previous active top-level window */
40 HWND hwndLastActive; /* Last active popup hwnd */
41 FARPROC lpfnWndProc; /* Window procedure */
42 DWORD dwStyle; /* Window style (from CreateWindow) */
43 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
44 HANDLE hdce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
45 void *VScroll; /* Vertical ScrollBar Struct Pointer */
46 void *HScroll; /* Horizontal ScrollBar Struct Pointer */
47 WORD scroll_flags; /* scrolls flags (vert & horz visible) */
48 WORD wIDmenu; /* ID or hmenu (from CreateWindow) */
49 HANDLE hText; /* Handle of window text */
50 WORD flags; /* Misc. flags (see below) */
51 Window window; /* X window */
52 HICON hIcon; /* icon's MS-windows handle */
53 WORD iconWidth; /* width of icon */
54 WORD iconHeight; /* height of icon */
55 RECT rectClientSave; /* where client rect is saved when icon*/
56 HMENU hSysMenu; /* window's copy of System Menu */
57 HANDLE hProp; /* Handle of Properties List */
58 HTASK hTask; /* Task Handle of the owner */
59 WORD wExtra[1]; /* Window extra bytes */
60 } WND;
62 /* WND flags values */
63 #define WIN_ERASE_UPDATERGN 0x01 /* Update region needs erasing */
64 #define WIN_NEEDS_BEGINPAINT 0x02 /* WM_PAINT sent to window */
65 #define WIN_GOT_SIZEMSG 0x04 /* WM_SIZE has been sent to the window */
66 #define WIN_OWN_DC 0x08 /* Win class has style CS_OWNDC */
67 #define WIN_CLASS_DC 0x10 /* Win class has style CS_CLASSDC */
68 #define WIN_DOUBLE_CLICKS 0x20 /* Win class has style CS_DBLCLKS */
69 #define WIN_RESTORE_MAX 0x40 /* Maximize when restoring */
70 #define WIN_INTERNAL_PAINT 0x80 /* Internal WM_PAINT message pending */
72 /* Window functions */
73 WND *WIN_FindWndPtr( HWND hwnd );
74 BOOL WIN_UnlinkWindow( HWND hwnd );
75 BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
76 HWND WIN_FindWinToRepaint( HWND hwnd );
77 BOOL WINPOS_IsAnActiveWindow( HWND hwnd );
78 void WINPOS_ActivateChild( HWND hwnd );
80 extern Display * display;
81 extern Screen * screen;
82 extern Window rootWindow;
84 #endif /* WIN_H */