4 * Copyright 1993 Alexandre Julliard
13 #define WND_MAGIC 0x444e4957 /* 'WIND' */
15 /* Built-in class names (see _Undocumented_Windows_ p.418) */
16 #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
17 #define DESKTOP_CLASS_NAME "#32769" /* Desktop */
18 #define DIALOG_CLASS_NAME "#32770" /* Dialog */
19 #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
20 #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
22 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
23 #define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
24 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
25 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
26 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
28 /* Built-in 32-bit classes */
46 /* PAINT_RedrawWindow() control flags */
47 #define RDW_C_USEHRGN 0x0001
48 #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 struct tagCLASS
*class; /* Window class */
62 HWINDOWPROC winproc
; /* Window procedure */
63 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
64 HWND hwndSelf
; /* Handle of this window */
65 HINSTANCE hInstance
; /* Window hInstance (from CreateWindow) */
66 RECT rectClient
; /* Client area rel. to parent client area */
67 RECT 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 HWND hwndLastActive
;/* Last active popup hwnd */
76 DWORD dwStyle
; /* Window style (from CreateWindow) */
77 DWORD dwExStyle
; /* Extended style (from CreateWindowEx) */
78 UINT wIDmenu
; /* ID or hmenu (from CreateWindow) */
79 DWORD helpContext
; /* Help context ID */
80 WORD flags
; /* Misc. flags (see below) */
81 HMENU16 hSysMenu
; /* window's copy of System Menu */
82 int irefCount
; /* window's reference count*/
83 DWORD userdata
; /* User private data */
84 struct _WND_DRIVER
*pDriver
; /* Window driver */
85 void *pDriverData
; /* Window driver data */
86 DWORD wExtra
[1]; /* Window extra bytes */
89 typedef struct _WND_DRIVER
91 void (*pInitialize
)(WND
*);
92 void (*pFinalize
)(WND
*);
93 BOOL (*pCreateDesktopWindow
)(WND
*, struct tagCLASS
*, BOOL
);
94 BOOL (*pCreateWindow
)(WND
*, struct tagCLASS
*, CREATESTRUCTA
*, BOOL
);
95 BOOL (*pDestroyWindow
)(WND
*);
96 WND
* (*pSetParent
)(WND
*, WND
*);
97 void (*pForceWindowRaise
)(WND
*);
98 void (*pSetWindowPos
)(WND
*, const WINDOWPOS
*, BOOL
);
99 void (*pSetText
)(WND
*, LPCSTR
);
100 void (*pSetFocus
)(WND
*);
101 void (*pPreSizeMove
)(WND
*);
102 void (*pPostSizeMove
)(WND
*);
103 void (*pScrollWindow
)(WND
*, struct tagDC
*, INT
, INT
, const RECT
*, BOOL
);
104 void (*pSetDrawable
)(WND
*, struct tagDC
*, WORD
, BOOL
);
105 BOOL (*pIsSelfClipping
)(WND
*);
113 HWND16 hwndIconTitle
;
114 } INTERNALPOS
, *LPINTERNALPOS
;
116 /* WND flags values */
117 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
118 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
119 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
120 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
121 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
122 /* Used to have WIN_NO_REDRAW 0x0020 here */
123 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
124 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
125 #define WIN_MANAGED 0x0100 /* Window managed by the X wm */
126 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
127 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
128 #define WIN_SAVEUNDER_OVERRIDE 0x0800
130 /* BuildWinArray() flags */
131 #define BWA_SKIPDISABLED 0x0001
132 #define BWA_SKIPHIDDEN 0x0002
133 #define BWA_SKIPOWNED 0x0004
134 #define BWA_SKIPICONIC 0x0008
136 /* Window functions */
137 extern void WIN_LockWnds();
138 extern void WIN_UnlockWnds();
139 extern int WIN_SuspendWndsLock();
140 extern void WIN_RestoreWndsLock(int ipreviousLock
);
141 extern WND
* WIN_FindWndPtr( HWND hwnd
);
142 extern void WIN_ReleaseWndPtr(WND
*wndPtr
);
143 extern WND
* WIN_GetDesktop(void);
144 extern void WIN_DumpWindow( HWND hwnd
);
145 extern void WIN_WalkWindows( HWND hwnd
, int indent
);
146 extern BOOL
WIN_UnlinkWindow( HWND hwnd
);
147 extern BOOL
WIN_LinkWindow( HWND hwnd
, HWND hwndInsertAfter
);
148 extern HWND
WIN_FindWinToRepaint( HWND hwnd
, HQUEUE16 hQueue
);
149 extern BOOL
WIN_ResetQueueWindows( WND
* wnd
, HQUEUE16 hQueue
, HQUEUE16 hNew
);
150 extern BOOL
WIN_CreateDesktopWindow(void);
151 extern HWND
WIN_GetTopParent( HWND hwnd
);
152 extern WND
* WIN_GetTopParentPtr( WND
* pWnd
);
153 extern BOOL
WIN_IsWindowDrawable(WND
*, BOOL
);
154 extern HINSTANCE
WIN_GetWindowInstance( HWND hwnd
);
155 extern WND
** WIN_BuildWinArray( WND
*wndPtr
, UINT bwa
, UINT
* pnum
);
157 extern HWND
CARET_GetHwnd(void);
158 extern void CARET_GetRect(LPRECT lprc
); /* windows/caret.c */
160 extern BOOL16
DRAG_QueryUpdate( HWND
, SEGPTR
, BOOL
);
161 extern void DEFWND_SetText( WND
*wndPtr
, LPCSTR text
);
162 extern HBRUSH
DEFWND_ControlColor( HDC hDC
, UINT16 ctlType
); /* windows/defwnd.c */
164 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
166 extern BOOL
PAINT_RedrawWindow( HWND hwnd
, const RECT
*rectUpdate
,
167 HRGN hrgnUpdate
, UINT flags
,
168 UINT control
); /* windows/painting.c */
170 /* controls/widgets.c */
171 extern BOOL
WIDGETS_Init( void );
172 extern BOOL
WIDGETS_IsControl( WND
* pWnd
, BUILTIN_CLASS32 cls
);
174 /* controls/icontitle.c */
175 extern HWND
ICONTITLE_Create( WND
* );
176 extern BOOL
ICONTITLE_Init( void );
178 /* windows/focus.c */
179 extern void FOCUS_SwitchFocus( MESSAGEQUEUE
*pMsgQ
, HWND
, HWND
);
181 #endif /* __WINE_WIN_H */