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