4 * Copyright 1993 Alexandre Julliard
15 #define WND_MAGIC 0x444e4957 /* 'WIND' */
17 /* Built-in class names (see _Undocumented_Windows_ p.418) */
18 #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
19 #define DESKTOP_CLASS_NAME "#32769" /* Desktop */
20 #define DIALOG_CLASS_NAME "#32770" /* Dialog */
21 #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
22 #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
24 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
25 #define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
26 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
27 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
28 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
30 /* Built-in 32-bit classes */
48 /* PAINT_RedrawWindow() control flags */
49 #define RDW_EX_USEHRGN 0x0001
50 #define RDW_EX_DELETEHRGN 0x0002
51 #define RDW_EX_XYWINDOW 0x0004
52 #define RDW_EX_TOPFRAME 0x0010
53 #define RDW_EX_DELAY_NCPAINT 0x0020
58 struct tagMESSAGEQUEUE
;
63 struct tagWND
*next
; /* Next sibling */
64 struct tagWND
*child
; /* First child */
65 struct tagWND
*parent
; /* Window parent (from CreateWindow) */
66 struct tagWND
*owner
; /* Window owner */
67 struct tagCLASS
*class; /* Window class */
68 HWINDOWPROC winproc
; /* Window procedure */
69 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
70 HWND hwndSelf
; /* Handle of this window */
71 HINSTANCE hInstance
; /* Window hInstance (from CreateWindow) */
72 RECT rectClient
; /* Client area rel. to parent client area */
73 RECT rectWindow
; /* Whole window rel. to parent client area */
74 LPWSTR text
; /* Window text */
75 void *pVScroll
; /* Vertical scroll-bar info */
76 void *pHScroll
; /* Horizontal scroll-bar info */
77 void *pProp
; /* Pointer to properties list */
78 struct tagDCE
*dce
; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
79 HGLOBAL16 hmemTaskQ
; /* Task queue global memory handle */
80 HRGN16 hrgnUpdate
; /* Update region */
81 HRGN hrgnWnd
; /* window's region */
82 HWND hwndLastActive
;/* Last active popup hwnd */
83 DWORD dwStyle
; /* Window style (from CreateWindow) */
84 DWORD dwExStyle
; /* Extended style (from CreateWindowEx) */
85 UINT wIDmenu
; /* ID or hmenu (from CreateWindow) */
86 DWORD helpContext
; /* Help context ID */
87 WORD flags
; /* Misc. flags (see below) */
88 HMENU16 hSysMenu
; /* window's copy of System Menu */
89 int irefCount
; /* window's reference count*/
90 DWORD userdata
; /* User private data */
91 struct tagWND_DRIVER
*pDriver
; /* Window driver */
92 void *pDriverData
; /* Window driver data */
93 DWORD wExtra
[1]; /* Window extra bytes */
98 #define HAK_BITGRAVITY 1
99 #define HAK_ACCEPTFOCUS 2
100 #define HAK_ICONICSTATE 3
106 #define BGNorthWest 1
108 #define BGNorthEast 3
112 #define BGSouthWest 7
114 #define BGSouthEast 9
117 typedef struct tagWND_DRIVER
119 void (*pInitialize
)(WND
*);
120 void (*pFinalize
)(WND
*);
121 BOOL (*pCreateDesktopWindow
)(WND
*, struct tagCLASS
*, BOOL
);
122 BOOL (*pCreateWindow
)(WND
*, struct tagCLASS
*, CREATESTRUCTA
*, BOOL
);
123 BOOL (*pDestroyWindow
)(WND
*);
124 WND
* (*pSetParent
)(WND
*, WND
*);
125 void (*pForceWindowRaise
)(WND
*);
126 void (*pSetWindowPos
)(WND
*, const WINDOWPOS
*, BOOL
);
127 void (*pSetText
)(WND
*, LPCWSTR
);
128 void (*pSetFocus
)(WND
*);
129 void (*pPreSizeMove
)(WND
*);
130 void (*pPostSizeMove
)(WND
*);
131 void (*pSurfaceCopy
)(WND
*, struct tagDC
*, INT
, INT
, const RECT
*, BOOL
);
132 void (*pSetDrawable
)(WND
*, struct tagDC
*, WORD
, BOOL
);
133 BOOL (*pSetHostAttr
)(WND
*, INT haKey
, INT value
);
134 BOOL (*pIsSelfClipping
)(WND
*);
135 void (*pSetWindowRgn
)(WND
*, const HRGN
);
138 extern WND_DRIVER
*WND_Driver
;
145 HWND16 hwndIconTitle
;
146 } INTERNALPOS
, *LPINTERNALPOS
;
148 /* WND flags values */
149 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
150 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
151 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
152 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
153 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
154 #define WIN_NATIVE 0x0020 /* Directly mapped to the window provided by the driver */
155 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
156 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
157 #define WIN_MANAGED 0x0100 /* Window managed by the window system */
158 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
159 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
160 #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
162 /* BuildWinArray() flags */
163 #define BWA_SKIPDISABLED 0x0001
164 #define BWA_SKIPHIDDEN 0x0002
165 #define BWA_SKIPOWNED 0x0004
166 #define BWA_SKIPICONIC 0x0008
168 /* WIN_UpdateNCRgn() flags */
169 #define UNC_CHECK 0x0001
170 #define UNC_ENTIRE 0x0002
171 #define UNC_REGION 0x0004
172 #define UNC_UPDATE 0x0008
173 #define UNC_DELAY_NCPAINT 0x0010
174 #define UNC_IN_BEGINPAINT 0x0020
176 /* Window functions */
177 extern void WIN_Init( void );
178 extern void WIN_LockWnds( void );
179 extern void WIN_UnlockWnds( void );
180 extern int WIN_SuspendWndsLock( void );
181 extern void WIN_RestoreWndsLock(int ipreviousLock
);
182 extern WND
* WIN_FindWndPtr( HWND hwnd
);
183 extern WND
* WIN_LockWndPtr(WND
*wndPtr
);
184 extern void WIN_ReleaseWndPtr(WND
*wndPtr
);
185 extern void WIN_UpdateWndPtr(WND
**oldPtr
,WND
*newPtr
);
186 extern WND
* WIN_GetDesktop(void);
187 extern void WIN_ReleaseDesktop(void);
188 extern void WIN_DumpWindow( HWND hwnd
);
189 extern void WIN_WalkWindows( HWND hwnd
, int indent
);
190 extern BOOL
WIN_UnlinkWindow( HWND hwnd
);
191 extern BOOL
WIN_LinkWindow( HWND hwnd
, HWND hwndInsertAfter
);
192 extern HWND
WIN_FindWinToRepaint( HWND hwnd
, HQUEUE16 hQueue
);
193 extern BOOL
WIN_ResetQueueWindows( WND
* wnd
, HQUEUE16 hQueue
, HQUEUE16 hNew
);
194 extern BOOL
WIN_CreateDesktopWindow(void);
195 extern HWND
WIN_GetTopParent( HWND hwnd
);
196 extern WND
* WIN_GetTopParentPtr( WND
* pWnd
);
197 extern BOOL
WIN_IsWindowDrawable(WND
*, BOOL
);
198 extern WND
** WIN_BuildWinArray( WND
*wndPtr
, UINT bwa
, UINT
* pnum
);
199 extern void WIN_ReleaseWinArray(WND
**wndArray
);
201 extern HICON16
NC_IconForWindow( WND
*wndPtr
);
203 extern HWND
CARET_GetHwnd(void);
204 extern void CARET_GetRect(LPRECT lprc
); /* windows/caret.c */
206 extern BOOL16
DRAG_QueryUpdate( HWND
, SEGPTR
, BOOL
);
207 extern void DEFWND_SetTextA( WND
*wndPtr
, LPCSTR text
);
208 extern void DEFWND_SetTextW( WND
*wndPtr
, LPCWSTR text
);
209 extern HBRUSH
DEFWND_ControlColor( HDC hDC
, UINT16 ctlType
); /* windows/defwnd.c */
211 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
213 extern BOOL
PAINT_RedrawWindow( HWND hwnd
, const RECT
*rectUpdate
,
214 HRGN hrgnUpdate
, UINT flags
,
215 UINT control
); /* windows/painting.c */
216 extern HRGN
WIN_UpdateNCRgn(WND
* wnd
, HRGN hRgn
, UINT flags
); /* windows/painting.c */
218 /* controls/widgets.c */
219 extern BOOL
WIDGETS_Init( void );
220 extern BOOL
WIDGETS_IsControl( WND
* pWnd
, BUILTIN_CLASS32 cls
);
222 /* controls/icontitle.c */
223 extern LRESULT WINAPI
IconTitleWndProc( HWND hWnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
);
225 extern HWND
ICONTITLE_Create( WND
* );
226 extern BOOL
ICONTITLE_Init( void );
228 /* windows/focus.c */
229 extern void FOCUS_SwitchFocus( struct tagMESSAGEQUEUE
*pMsgQ
, HWND
, HWND
);
232 extern LRESULT WINAPI
EditWndProc( HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
);
234 /* windows/listbox.c */
235 extern LRESULT WINAPI
ListBoxWndProc( HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
);
236 extern LRESULT WINAPI
ComboLBWndProc( HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
);
238 /* generic method that returns TRUE if the window properties ask for a
239 window manager type of border */
240 extern BOOL
WIN_WindowNeedsWMBorder( DWORD style
, DWORD exStyle
);
242 #endif /* __WINE_WIN_H */