4 * Copyright 1993 Alexandre Julliard
16 #define WND_MAGIC 0x444e4957 /* 'WIND' */
18 /* Built-in class names (see _Undocumented_Windows_ p.418) */
19 #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
20 #define DESKTOP_CLASS_NAME "#32769" /* Desktop */
21 #define DIALOG_CLASS_NAME "#32770" /* Dialog */
22 #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
23 #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
25 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
26 #define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
27 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
28 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
29 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
31 /* PAINT_RedrawWindow() control flags */
32 #define RDW_C_USEHRGN 0x0001
33 #define RDW_C_DELETEHRGN 0x0002
37 struct tagWND
*next
; /* Next sibling */
38 struct tagWND
*child
; /* First child */
39 struct tagWND
*parent
; /* Window parent (from CreateWindow) */
40 struct tagWND
*owner
; /* Window owner */
41 CLASS
*class; /* Window class */
42 HWINDOWPROC winproc
; /* Window procedure */
43 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
44 HWND16 hwndSelf
; /* Handle of this window */
45 HINSTANCE16 hInstance
; /* Window hInstance (from CreateWindow) */
46 RECT16 rectClient
; /* Client area rel. to parent client area */
47 RECT16 rectWindow
; /* Whole window rel. to parent client area */
48 RECT16 rectNormal
; /* Window rect. when in normal state */
49 POINT16 ptIconPos
; /* Icon position */
50 POINT16 ptMaxPos
; /* Maximized window position */
51 LPSTR text
; /* Window text */
52 void *pVScroll
; /* Vertical scroll-bar info */
53 void *pHScroll
; /* Horizontal scroll-bar info */
54 void *pProp
; /* Pointer to properties list */
55 HGLOBAL16 hmemTaskQ
; /* Task queue global memory handle */
56 HRGN16 hrgnUpdate
; /* Update region */
57 HWND16 hwndLastActive
;/* Last active popup hwnd */
58 DWORD dwStyle
; /* Window style (from CreateWindow) */
59 DWORD dwExStyle
; /* Extended style (from CreateWindowEx) */
60 HANDLE16 hdce
; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
61 UINT16 wIDmenu
; /* ID or hmenu (from CreateWindow) */
62 WORD flags
; /* Misc. flags (see below) */
63 Window window
; /* X window (only for top-level windows) */
64 HMENU16 hSysMenu
; /* window's copy of System Menu */
65 DWORD userdata
; /* User private data */
66 DWORD wExtra
[1]; /* Window extra bytes */
69 /* WND flags values */
70 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
71 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
72 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
73 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
74 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
75 #define WIN_NO_REDRAW 0x0020 /* WM_SETREDRAW called for this window */
76 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
77 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
78 #define WIN_MANAGED 0x0100 /* Window managed by the X wm */
79 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
81 /* Window functions */
82 extern WND
*WIN_FindWndPtr( HWND32 hwnd
);
83 extern WND
*WIN_GetDesktop(void);
84 extern void WIN_DumpWindow( HWND32 hwnd
);
85 extern void WIN_WalkWindows( HWND32 hwnd
, int indent
);
86 extern Window
WIN_GetXWindow( HWND32 hwnd
);
87 extern BOOL32
WIN_UnlinkWindow( HWND32 hwnd
);
88 extern BOOL32
WIN_LinkWindow( HWND32 hwnd
, HWND32 hwndInsertAfter
);
89 extern HWND32
WIN_FindWinToRepaint( HWND32 hwnd
, HQUEUE16 hQueue
);
90 extern void WIN_SendParentNotify( HWND32 hwnd
, WORD event
,
91 WORD idChild
, LPARAM lValue
);
92 extern BOOL32
WIN_CreateDesktopWindow(void);
93 extern HWND32
WIN_GetTopParent( HWND32 hwnd
);
94 extern BOOL32
WIN_IsWindowDrawable(WND
*, BOOL32
);
95 extern HINSTANCE16
WIN_GetWindowInstance( HWND32 hwnd
);
96 extern WND
**WIN_BuildWinArray( WND
*wndPtr
);
98 extern void DEFWND_SetText( WND
*wndPtr
, LPCSTR text
); /* windows/defwnd.c */
100 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
102 extern BOOL32
PAINT_RedrawWindow( HWND32 hwnd
, const RECT32
*rectUpdate
,
103 HRGN32 hrgnUpdate
, UINT32 flags
,
104 UINT32 control
); /* windows/painting.c */
106 extern Display
* display
;
107 extern Screen
* screen
;
108 extern Window rootWindow
;