Release 941122
[wine/multimedia.git] / include / win.h
blob8e093bafe1c6f46fa86e917e4be11bed74794a30
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 "class.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 WNDPROC 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 HANDLE hVScroll; /* Vertical scroll-bar info */
46 HANDLE hHScroll; /* Horizontal scroll-bar info */
47 WORD wIDmenu; /* ID or hmenu (from CreateWindow) */
48 HANDLE hText; /* Handle of window text */
49 WORD flags; /* Misc. flags (see below) */
50 Window window; /* X window (only for top-level windows) */
51 RECT rectClientSave; /* where client rect is saved when icon*/
52 HMENU hSysMenu; /* window's copy of System Menu */
53 HANDLE hProp; /* Handle of Properties List */
54 HTASK hTask; /* Task Handle of the owner */
55 WORD wExtra[1]; /* Window extra bytes */
56 } WND;
58 /* WND flags values */
59 #define WIN_ERASE_UPDATERGN 0x01 /* Update region needs erasing */
60 #define WIN_NEEDS_BEGINPAINT 0x02 /* WM_PAINT sent to window */
61 #define WIN_GOT_SIZEMSG 0x04 /* WM_SIZE has been sent to the window */
62 #define WIN_RESTORE_MAX 0x08 /* Maximize when restoring */
63 #define WIN_INTERNAL_PAINT 0x10 /* Internal WM_PAINT message pending */
64 #define WIN_NO_REDRAW 0x20 /* WM_SETREDRAW called for this window */
66 #define WIN_CLASS_INFO(wndPtr) (CLASS_FindClassPtr((wndPtr)->hClass)->wc)
67 #define WIN_CLASS_STYLE(wndPtr) (WIN_CLASS_INFO(wndPtr).style)
69 /* Window functions */
70 WND *WIN_FindWndPtr( HWND hwnd );
71 Window WIN_GetXWindow( HWND hwnd );
72 BOOL WIN_UnlinkWindow( HWND hwnd );
73 BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
74 HWND WIN_FindWinToRepaint( HWND hwnd );
75 BOOL WINPOS_IsAnActiveWindow( HWND hwnd );
76 void WINPOS_ActivateChild( HWND hwnd );
78 extern Display * display;
79 extern Screen * screen;
80 extern Window rootWindow;
82 #endif /* WIN_H */