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 extern ATOM AtomMessage
;
18 BOOL FASTCALL
UserUpdateUiState(PWND Wnd
, WPARAM wParam
);
20 typedef struct _WINDOW_OBJECT
22 /* NOTE: Do *NOT* Move this pointer anywhere in this structure! This
23 is a pointer to the WINDOW structure that eventually replaces
24 the WINDOW_OBJECT structure! USER32 expects this pointer to
25 be here until WINDOW_OBJECT has completely been superseded! */
28 /* Pointer to the thread information */
29 PTHREADINFO pti
; // Use Wnd->head.pti
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
* spwndChild
;
45 struct _WINDOW_OBJECT
* LastChild
;
46 struct _WINDOW_OBJECT
* spwndNext
;
47 struct _WINDOW_OBJECT
* spwndPrev
;
48 /* Entry in the list of thread windows. */
49 LIST_ENTRY ThreadListEntry
;
50 /* Handle to the parent window. */
51 struct _WINDOW_OBJECT
* spwndParent
;
52 /* Handle to the owner window. */
53 HWND hOwner
; // Use spwndOwner
54 /* DC Entries (DCE) */
57 PWINDOW_SCROLLINFO Scroll
;
58 PETHREAD OwnerThread
; // Use Wnd->head.pti
59 HWND hWndLastPopup
; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
60 /* counter for tiled child windows */
63 LIST_ENTRY WndObjListHead
;
64 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
67 #define WINDOWOBJECT_NEED_SIZE WNDS_SENDSIZEMOVEMSGS
68 #define WINDOWOBJECT_NEED_ERASEBKGND WNDS_ERASEBACKGROUND
69 #define WINDOWOBJECT_NEED_NCPAINT WNDS_SENDNCPAINT
70 #define WINDOWOBJECT_NEED_INTERNALPAINT WNDS_INTERNALPAINT
71 #define WINDOWOBJECT_RESTOREMAX (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
73 #define WINDOWSTATUS_DESTROYING WNDS2_INDESTROY
74 #define WINDOWSTATUS_DESTROYED WNDS_DESTROYED
76 #define HAS_DLGFRAME(Style, ExStyle) \
77 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
78 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
80 #define HAS_THICKFRAME(Style, ExStyle) \
81 (((Style) & WS_THICKFRAME) && \
82 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
84 #define HAS_THINFRAME(Style, ExStyle) \
85 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
87 #define IntIsDesktopWindow(WndObj) \
88 (WndObj->spwndParent == NULL)
90 #define IntIsBroadcastHwnd(hWnd) \
91 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
94 #define IntWndBelongsToThread(WndObj, W32Thread) \
95 (((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
96 (WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
98 #define IntGetWndThreadId(WndObj) \
99 WndObj->OwnerThread->Cid.UniqueThread
101 #define IntGetWndProcessId(WndObj) \
102 WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
106 IntIsWindow(HWND hWnd
);
109 IntWinListChildren(PWINDOW_OBJECT Window
);
112 InitWindowImpl (VOID
);
115 CleanupWindowImpl (VOID
);
118 IntGetClientRect (PWINDOW_OBJECT WindowObject
, RECTL
*Rect
);
121 IntGetActiveWindow (VOID
);
124 IntIsWindowVisible (PWINDOW_OBJECT Window
);
127 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
130 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
133 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
135 PWINDOW_OBJECT FASTCALL
136 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
138 PWINDOW_OBJECT FASTCALL
139 IntGetParent(PWINDOW_OBJECT Wnd
);
141 PWINDOW_OBJECT FASTCALL
142 IntGetOwner(PWINDOW_OBJECT Wnd
);
146 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
149 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECTL
*Rect
);
152 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
155 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
161 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
164 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
167 IntDefWindowProc( PWINDOW_OBJECT Window
, UINT Msg
, WPARAM wParam
, LPARAM lParam
, BOOL Ansi
);
169 VOID FASTCALL
IntNotifyWinEvent(DWORD
, PWND
, LONG
, LONG
);
171 PWND APIENTRY
co_IntCreateWindowEx(DWORD
,PUNICODE_STRING
,PUNICODE_STRING
,DWORD
,LONG
,LONG
,LONG
,LONG
,HWND
,HMENU
,HINSTANCE
,LPVOID
,DWORD
,BOOL
);
172 WNDPROC FASTCALL
IntGetWindowProc(PWND
,BOOL
);
174 #endif /* _WIN32K_WINDOW_H */