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 HWND owner
; /* Window owner */
29 struct tagCLASS
*class; /* Window class */
30 HWINDOWPROC winproc
; /* Window procedure */
31 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
32 DWORD tid
; /* Owner thread id */
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 HRGN 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 UINT 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 void *pDriverData
; /* Window driver data */
57 DWORD wExtra
[1]; /* Window extra bytes */
66 } INTERNALPOS
, *LPINTERNALPOS
;
68 /* WND flags values */
69 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
70 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
71 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
72 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
73 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
74 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
75 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
76 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
77 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
78 #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
79 #define WIN_NEEDS_INTERNALSOP 0x1000 /* Window was hidden by WIN_InternalShowOwnedPopups */
81 /* Window functions */
82 extern int WIN_SuspendWndsLock( void );
83 extern void WIN_RestoreWndsLock(int ipreviousLock
);
84 extern WND
* WIN_FindWndPtr( HWND hwnd
);
85 extern WND
* WIN_LockWndPtr(WND
*wndPtr
);
86 extern void WIN_ReleaseWndPtr(WND
*wndPtr
);
87 extern void WIN_UpdateWndPtr(WND
**oldPtr
,WND
*newPtr
);
88 extern HWND
WIN_Handle32( HWND16 hwnd16
);
89 extern void WIN_LinkWindow( HWND hwnd
, HWND parent
, HWND hwndInsertAfter
);
90 extern void WIN_UnlinkWindow( HWND hwnd
);
91 extern HWND
WIN_FindWinToRepaint( HWND hwnd
);
92 extern void WIN_DestroyThreadWindows( HWND hwnd
);
93 extern BOOL
WIN_CreateDesktopWindow(void);
94 extern BOOL
WIN_IsWindowDrawable(WND
*, BOOL
);
95 extern HWND
*WIN_ListParents( HWND hwnd
);
96 extern HWND
*WIN_ListChildren( HWND hwnd
);
97 extern BOOL
WIN_InternalShowOwnedPopups( HWND owner
, BOOL fShow
, BOOL unmanagedOnly
);
99 inline static HWND
WIN_GetFullHandle( HWND hwnd
)
101 if (!HIWORD(hwnd
) && hwnd
) hwnd
= WIN_Handle32( LOWORD(hwnd
) );
105 inline static HWND16
WIN_Handle16( HWND hwnd
)
110 inline static WND
*WIN_FindWndPtr16( HWND16 hwnd
)
112 /* don't bother with full conversion */
113 return WIN_FindWndPtr( (HWND
)(ULONG_PTR
)hwnd
);
116 extern HWND
CARET_GetHwnd(void);
117 extern void CARET_GetRect(LPRECT lprc
); /* windows/caret.c */
119 extern BOOL16
DRAG_QueryUpdate( HWND
, SEGPTR
, BOOL
);
120 extern HBRUSH
DEFWND_ControlColor( HDC hDC
, UINT ctlType
); /* windows/defwnd.c */
122 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
124 /* Classes functions */
125 struct tagCLASS
; /* opaque structure */
126 struct builtin_class_descr
;
127 extern ATOM
CLASS_RegisterBuiltinClass( const struct builtin_class_descr
*descr
);
128 extern struct tagCLASS
*CLASS_AddWindow( ATOM atom
, HINSTANCE inst
, WINDOWPROCTYPE type
,
129 INT
*winExtra
, WNDPROC
*winproc
,
130 DWORD
*style
, struct tagDCE
**dce
);
131 extern void CLASS_RemoveWindow( struct tagCLASS
*cls
);
132 extern void CLASS_FreeModuleClasses( HMODULE16 hModule
);
134 /* windows/focus.c */
135 extern void FOCUS_SwitchFocus( struct tagMESSAGEQUEUE
*pMsgQ
, HWND
, HWND
);
137 #endif /* __WINE_WIN_H */