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 /* Built-in 32-bit classes */
49 /* PAINT_RedrawWindow() control flags */
50 #define RDW_C_USEHRGN 0x0001
51 #define RDW_C_DELETEHRGN 0x0002
57 struct tagWND
*next
; /* Next sibling */
58 struct tagWND
*child
; /* First child */
59 struct tagWND
*parent
; /* Window parent (from CreateWindow) */
60 struct tagWND
*owner
; /* Window owner */
61 CLASS
*class; /* Window class */
62 HWINDOWPROC winproc
; /* Window procedure */
63 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
64 HWND32 hwndSelf
; /* Handle of this window */
65 HINSTANCE32 hInstance
; /* Window hInstance (from CreateWindow) */
66 RECT32 rectClient
; /* Client area rel. to parent client area */
67 RECT32 rectWindow
; /* Whole window rel. to parent client area */
68 LPSTR text
; /* Window text */
69 void *pVScroll
; /* Vertical scroll-bar info */
70 void *pHScroll
; /* Horizontal scroll-bar info */
71 void *pProp
; /* Pointer to properties list */
72 struct tagDCE
*dce
; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
73 HGLOBAL16 hmemTaskQ
; /* Task queue global memory handle */
74 HRGN16 hrgnUpdate
; /* Update region */
75 HWND32 hwndLastActive
;/* Last active popup hwnd */
76 DWORD dwStyle
; /* Window style (from CreateWindow) */
77 DWORD dwExStyle
; /* Extended style (from CreateWindowEx) */
78 UINT32 wIDmenu
; /* ID or hmenu (from CreateWindow) */
79 WORD flags
; /* Misc. flags (see below) */
80 Window window
; /* X window (only for top-level windows) */
81 HMENU16 hSysMenu
; /* window's copy of System Menu */
82 DWORD userdata
; /* User private data */
83 DWORD wExtra
[1]; /* Window extra bytes */
92 } INTERNALPOS
, *LPINTERNALPOS
;
94 /* WND flags values */
95 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
96 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
97 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
98 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
99 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
100 /* Used to have WIN_NO_REDRAW 0x0020 here */
101 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
102 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
103 #define WIN_MANAGED 0x0100 /* Window managed by the X wm */
104 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
105 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
106 #define WIN_SAVEUNDER_OVERRIDE 0x0800
108 /* BuildWinArray() flags */
109 #define BWA_SKIPDISABLED 0x0001
110 #define BWA_SKIPHIDDEN 0x0002
111 #define BWA_SKIPOWNED 0x0004
112 #define BWA_SKIPICONIC 0x0008
114 /* Window functions */
115 extern WND
* WIN_FindWndPtr( HWND32 hwnd
);
116 extern WND
* WIN_GetDesktop(void);
117 extern void WIN_DumpWindow( HWND32 hwnd
);
118 extern void WIN_WalkWindows( HWND32 hwnd
, int indent
);
119 extern Window
WIN_GetXWindow( HWND32 hwnd
);
120 extern BOOL32
WIN_UnlinkWindow( HWND32 hwnd
);
121 extern BOOL32
WIN_LinkWindow( HWND32 hwnd
, HWND32 hwndInsertAfter
);
122 extern HWND32
WIN_FindWinToRepaint( HWND32 hwnd
, HQUEUE16 hQueue
);
123 extern BOOL32
WIN_ResetQueueWindows( WND
* wnd
, HQUEUE16 hQueue
, HQUEUE16 hNew
);
124 extern BOOL32
WIN_CreateDesktopWindow(void);
125 extern HWND32
WIN_GetTopParent( HWND32 hwnd
);
126 extern WND
* WIN_GetTopParentPtr( WND
* pWnd
);
127 extern BOOL32
WIN_IsWindowDrawable(WND
*, BOOL32
);
128 extern HINSTANCE32
WIN_GetWindowInstance( HWND32 hwnd
);
129 extern WND
** WIN_BuildWinArray( WND
*wndPtr
, UINT32 bwa
, UINT32
* pnum
);
131 extern void DEFWND_SetText( WND
*wndPtr
, LPCSTR text
);
132 extern HBRUSH32
DEFWND_ControlColor( HDC32 hDC
, UINT16 ctlType
); /* windows/defwnd.c */
134 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
136 extern BOOL32
PAINT_RedrawWindow( HWND32 hwnd
, const RECT32
*rectUpdate
,
137 HRGN32 hrgnUpdate
, UINT32 flags
,
138 UINT32 control
); /* windows/painting.c */
140 extern BOOL32
WIDGETS_IsControl32( WND
* pWnd
, BUILTIN_CLASS32 cls
); /* controls/widgets.c */
142 extern HWND32
ICONTITLE_Create( WND
* ); /* controls/icontitle.c */
144 extern Display
* display
;
145 extern Screen
* screen
;
146 extern Window rootWindow
;
148 #endif /* __WINE_WIN_H */