1 #ifndef _WIN32K_WINDOW_H
2 #define _WIN32K_WINDOW_H
6 typedef struct _WINDOW_OBJECT
*PWINDOW_OBJECT
;
8 #include <include/object.h>
9 #include <include/class.h>
10 #include <include/msgqueue.h>
11 #include <include/winsta.h>
12 #include <include/dce.h>
13 #include <include/prop.h>
14 #include <include/scroll.h>
16 BOOL FASTCALL
UserUpdateUiState(PWINDOW Wnd
, WPARAM wParam
);
18 typedef struct _WINDOW_OBJECT
20 /* NOTE: Do *NOT* Move this pointer anywhere in this structure! This
21 is a pointer to the WINDOW structure that eventually replaces
22 the WINDOW_OBJECT structure! USER32 expects this pointer to
23 be here until WINDOW_OBJECT has completely been superseded! */
26 /* Pointer to the thread information */
28 /* Pointer to the desktop */
30 /* system menu handle. */
32 /* Entry in the thread's list of windows. */
34 /* Handle for the window. */
38 /* Handle of region of the window to be updated. */
40 /* Handle of the window region. */
42 /* Pointer to the owning thread's message queue. */
43 PUSER_MESSAGE_QUEUE MessageQueue
;
44 struct _WINDOW_OBJECT
* FirstChild
;
45 struct _WINDOW_OBJECT
* LastChild
;
46 struct _WINDOW_OBJECT
* NextSibling
;
47 struct _WINDOW_OBJECT
* PrevSibling
;
48 /* Entry in the list of thread windows. */
49 LIST_ENTRY ThreadListEntry
;
50 /* Handle to the parent window. */
51 struct _WINDOW_OBJECT
* Parent
;
52 /* Handle to the owner window. */
54 /* DC Entries (DCE) */
57 PWINDOW_SCROLLINFO Scroll
;
59 HWND hWndLastPopup
; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
61 /* counter for tiled child windows */
64 LIST_ENTRY WndObjListHead
;
65 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
68 #define WINDOWOBJECT_NEED_SIZE (0x00000001)
69 #define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002)
70 #define WINDOWOBJECT_NEED_NCPAINT (0x00000004)
71 #define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008)
72 #define WINDOWOBJECT_RESTOREMAX (0x00000020)
74 #define WINDOWSTATUS_DESTROYING (0x1)
75 #define WINDOWSTATUS_DESTROYED (0x2)
77 #define HAS_DLGFRAME(Style, ExStyle) \
78 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
79 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
81 #define HAS_THICKFRAME(Style, ExStyle) \
82 (((Style) & WS_THICKFRAME) && \
83 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
85 #define HAS_THINFRAME(Style, ExStyle) \
86 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
88 #define IntIsDesktopWindow(WndObj) \
89 (WndObj->Parent == NULL)
91 #define IntIsBroadcastHwnd(hWnd) \
92 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
95 #define IntWndBelongsToThread(WndObj, W32Thread) \
96 (((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
97 (WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
99 #define IntGetWndThreadId(WndObj) \
100 WndObj->OwnerThread->Cid.UniqueThread
102 #define IntGetWndProcessId(WndObj) \
103 WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
107 IntIsWindow(HWND hWnd
);
110 IntWinListChildren(PWINDOW_OBJECT Window
);
113 InitWindowImpl (VOID
);
116 CleanupWindowImpl (VOID
);
119 IntGetClientRect (PWINDOW_OBJECT WindowObject
, PRECT Rect
);
122 IntGetActiveWindow (VOID
);
125 IntIsWindowVisible (PWINDOW_OBJECT Window
);
128 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
131 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
134 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
136 PWINDOW_OBJECT FASTCALL
137 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
139 PWINDOW_OBJECT FASTCALL
140 IntGetParent(PWINDOW_OBJECT Wnd
);
142 PWINDOW_OBJECT FASTCALL
143 IntGetOwner(PWINDOW_OBJECT Wnd
);
147 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
150 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECT
*Rect
);
153 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
156 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
162 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
165 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
168 IntDefWindowProc( PWINDOW_OBJECT Window
, UINT Msg
, WPARAM wParam
, LPARAM lParam
, BOOL Ansi
);
170 VOID FASTCALL
IntNotifyWinEvent(DWORD
, PWINDOW_OBJECT
, LONG
, LONG
);
172 #endif /* _WIN32K_WINDOW_H */