4 * Copyright 1993 Alexandre Julliard
15 #include "wine/windef16.h"
17 #define WND_MAGIC 0x444e4957 /* 'WIND' */
21 struct tagMESSAGEQUEUE
;
25 struct tagWND
*next
; /* Next sibling */
26 struct tagWND
*child
; /* First child */
27 struct tagWND
*parent
; /* Window parent (from CreateWindow) */
28 struct tagWND
*owner
; /* Window owner */
29 struct tagCLASS
*class; /* Window class */
30 HWINDOWPROC winproc
; /* Window procedure */
31 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
32 HWND hwndSelf
; /* Handle of this window */
33 HINSTANCE hInstance
; /* Window hInstance (from CreateWindow) */
34 RECT rectClient
; /* Client area rel. to parent client area */
35 RECT rectWindow
; /* Whole window rel. to parent client area */
36 LPWSTR text
; /* Window text */
37 void *pVScroll
; /* Vertical scroll-bar info */
38 void *pHScroll
; /* Horizontal scroll-bar info */
39 void *pProp
; /* Pointer to properties list */
40 struct tagDCE
*dce
; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
41 HGLOBAL16 hmemTaskQ
; /* Task queue global memory handle */
42 HRGN hrgnUpdate
; /* Update region */
43 HRGN hrgnWnd
; /* window's region */
44 HWND hwndLastActive
;/* Last active popup hwnd */
45 DWORD dwStyle
; /* Window style (from CreateWindow) */
46 DWORD dwExStyle
; /* Extended style (from CreateWindowEx) */
47 DWORD clsStyle
; /* Class style at window creation */
48 UINT wIDmenu
; /* ID or hmenu (from CreateWindow) */
49 DWORD helpContext
; /* Help context ID */
50 UINT flags
; /* Misc. flags (see below) */
51 HMENU16 hSysMenu
; /* window's copy of System Menu */
52 int cbWndExtra
; /* class cbWndExtra at window creation */
53 int irefCount
; /* window's reference count*/
54 DWORD userdata
; /* User private data */
55 void *pDriverData
; /* Window driver data */
56 DWORD wExtra
[1]; /* Window extra bytes */
65 } INTERNALPOS
, *LPINTERNALPOS
;
67 /* WND flags values */
68 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
69 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
70 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
71 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
72 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
73 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
74 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
75 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
76 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
77 #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
78 #define WIN_NEEDS_INTERNALSOP 0x1000 /* Window was hidden by WIN_InternalShowOwnedPopups */
80 /* Window functions */
81 extern int WIN_SuspendWndsLock( void );
82 extern void WIN_RestoreWndsLock(int ipreviousLock
);
83 extern WND
* WIN_FindWndPtr( HWND hwnd
);
84 extern WND
* WIN_LockWndPtr(WND
*wndPtr
);
85 extern void WIN_ReleaseWndPtr(WND
*wndPtr
);
86 extern void WIN_UpdateWndPtr(WND
**oldPtr
,WND
*newPtr
);
87 extern WND
* WIN_GetDesktop(void);
88 extern void WIN_ReleaseDesktop(void);
89 extern void WIN_DumpWindow( HWND hwnd
);
90 extern void WIN_WalkWindows( HWND hwnd
, int indent
);
91 extern BOOL
WIN_UnlinkWindow( HWND hwnd
);
92 extern BOOL
WIN_LinkWindow( HWND hwnd
, HWND hwndInsertAfter
);
93 extern HWND
WIN_FindWinToRepaint( HWND hwnd
);
94 extern BOOL
WIN_DestroyThreadWindows( HWND hwnd
);
95 extern BOOL
WIN_CreateDesktopWindow(void);
96 extern HWND
WIN_GetTopParent( HWND hwnd
);
97 extern WND
* WIN_GetTopParentPtr( WND
* pWnd
);
98 extern BOOL
WIN_IsWindowDrawable(WND
*, BOOL
);
99 extern HWND
*WIN_BuildWinArray( HWND hwnd
);
100 extern void WIN_ReleaseWinArray( HWND
*wndArray
);
101 extern BOOL
WIN_InternalShowOwnedPopups( HWND owner
, BOOL fShow
, BOOL unmanagedOnly
);
103 extern HWND
CARET_GetHwnd(void);
104 extern void CARET_GetRect(LPRECT lprc
); /* windows/caret.c */
106 extern BOOL16
DRAG_QueryUpdate( HWND
, SEGPTR
, BOOL
);
107 extern HBRUSH
DEFWND_ControlColor( HDC hDC
, UINT ctlType
); /* windows/defwnd.c */
109 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
111 /* Classes functions */
112 struct tagCLASS
; /* opaque structure */
113 struct builtin_class_descr
;
114 extern ATOM
CLASS_RegisterBuiltinClass( const struct builtin_class_descr
*descr
);
115 extern struct tagCLASS
*CLASS_AddWindow( ATOM atom
, HINSTANCE inst
, WINDOWPROCTYPE type
,
116 INT
*winExtra
, WNDPROC
*winproc
,
117 DWORD
*style
, struct tagDCE
**dce
);
118 extern void CLASS_RemoveWindow( struct tagCLASS
*cls
);
119 extern void CLASS_FreeModuleClasses( HMODULE16 hModule
);
121 /* windows/focus.c */
122 extern void FOCUS_SwitchFocus( struct tagMESSAGEQUEUE
*pMsgQ
, HWND
, HWND
);
124 #endif /* __WINE_WIN_H */