Release 941017
[wine/gsoc-2012-control.git] / include / win.h
blob2af959af0a93eac45b941a03048e5b664596bc32
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 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 (only for top-level windows) */
52 RECT rectClientSave; /* where client rect is saved when icon*/
53 HMENU hSysMenu; /* window's copy of System Menu */
54 HANDLE hProp; /* Handle of Properties List */
55 HTASK hTask; /* Task Handle of the owner */
56 WORD wExtra[1]; /* Window extra bytes */
57 } WND;
59 /* WND flags values */
60 #define WIN_ERASE_UPDATERGN 0x01 /* Update region needs erasing */
61 #define WIN_NEEDS_BEGINPAINT 0x02 /* WM_PAINT sent to window */
62 #define WIN_GOT_SIZEMSG 0x04 /* WM_SIZE has been sent to the window */
63 #define WIN_RESTORE_MAX 0x08 /* Maximize when restoring */
64 #define WIN_INTERNAL_PAINT 0x10 /* Internal WM_PAINT message pending */
65 #define WIN_NO_REDRAW 0x20 /* WM_SETREDRAW called for this window */
67 #define WIN_CLASS_INFO(wndPtr) (CLASS_FindClassPtr((wndPtr)->hClass)->wc)
68 #define WIN_CLASS_STYLE(wndPtr) (WIN_CLASS_INFO(wndPtr).style)
70 /* Window functions */
71 WND *WIN_FindWndPtr( HWND hwnd );
72 Window WIN_GetXWindow( HWND hwnd );
73 BOOL WIN_UnlinkWindow( HWND hwnd );
74 BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
75 HWND WIN_FindWinToRepaint( HWND hwnd );
76 BOOL WINPOS_IsAnActiveWindow( HWND hwnd );
77 void WINPOS_ActivateChild( HWND hwnd );
79 extern Display * display;
80 extern Screen * screen;
81 extern Window rootWindow;
83 #endif /* WIN_H */