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
* spwndNext
;
46 struct _WINDOW_OBJECT
* spwndPrev
;
47 /* Entry in the list of thread windows. */
48 LIST_ENTRY ThreadListEntry
;
49 /* Handle to the parent window. */
50 struct _WINDOW_OBJECT
* spwndParent
;
51 /* Handle to the owner window. */
52 HWND hOwner
; // Use spwndOwner
53 /* DC Entries (DCE) */
56 PWINDOW_SCROLLINFO Scroll
;
57 PETHREAD OwnerThread
; // Use Wnd->head.pti
58 HWND hWndLastPopup
; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
59 /* counter for tiled child windows */
62 LIST_ENTRY WndObjListHead
;
63 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
66 #define WINDOWOBJECT_NEED_SIZE WNDS_SENDSIZEMOVEMSGS
67 #define WINDOWOBJECT_NEED_ERASEBKGND WNDS_ERASEBACKGROUND
68 #define WINDOWOBJECT_NEED_NCPAINT WNDS_SENDNCPAINT
69 #define WINDOWOBJECT_NEED_INTERNALPAINT WNDS_INTERNALPAINT
70 #define WINDOWOBJECT_RESTOREMAX (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
72 #define WINDOWSTATUS_DESTROYING WNDS2_INDESTROY
73 #define WINDOWSTATUS_DESTROYED WNDS_DESTROYED
75 #define HAS_DLGFRAME(Style, ExStyle) \
76 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
77 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
79 #define HAS_THICKFRAME(Style, ExStyle) \
80 (((Style) & WS_THICKFRAME) && \
81 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
83 #define HAS_THINFRAME(Style, ExStyle) \
84 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
86 #define IntIsDesktopWindow(WndObj) \
87 (WndObj->spwndParent == NULL)
89 #define IntIsBroadcastHwnd(hWnd) \
90 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
93 #define IntWndBelongsToThread(WndObj, W32Thread) \
94 (((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
95 (WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
97 #define IntGetWndThreadId(WndObj) \
98 WndObj->OwnerThread->Cid.UniqueThread
100 #define IntGetWndProcessId(WndObj) \
101 WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
105 IntIsWindow(HWND hWnd
);
108 IntWinListChildren(PWINDOW_OBJECT Window
);
111 InitWindowImpl (VOID
);
114 CleanupWindowImpl (VOID
);
117 IntGetClientRect (PWINDOW_OBJECT WindowObject
, RECTL
*Rect
);
120 IntGetActiveWindow (VOID
);
123 IntIsWindowVisible (PWINDOW_OBJECT Window
);
126 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
129 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
132 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
134 PWINDOW_OBJECT FASTCALL
135 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
137 PWINDOW_OBJECT FASTCALL
138 IntGetParent(PWINDOW_OBJECT Wnd
);
140 PWINDOW_OBJECT FASTCALL
141 IntGetOwner(PWINDOW_OBJECT Wnd
);
145 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
148 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECTL
*Rect
);
151 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
154 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
160 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
163 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
166 IntDefWindowProc( PWINDOW_OBJECT Window
, UINT Msg
, WPARAM wParam
, LPARAM lParam
, BOOL Ansi
);
168 VOID FASTCALL
IntNotifyWinEvent(DWORD
, PWND
, LONG
, LONG
);
170 PWND APIENTRY
co_IntCreateWindowEx(DWORD
,PUNICODE_STRING
,PUNICODE_STRING
,DWORD
,LONG
,LONG
,LONG
,LONG
,HWND
,HMENU
,HINSTANCE
,LPVOID
,DWORD
,BOOL
);
171 WNDPROC FASTCALL
IntGetWindowProc(PWND
,BOOL
);
173 #endif /* _WIN32K_WINDOW_H */