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
;
17 extern ATOM AtomWndObj
; /* WNDOBJ list */
19 BOOL FASTCALL
UserUpdateUiState(PWND Wnd
, WPARAM wParam
);
21 typedef struct _WINDOW_OBJECT
26 /* Pointer to the thread information */
27 PTHREADINFO pti
; // Use Wnd->head.pti
28 /* system menu handle. */
30 /* Handle for the window. */
31 HWND hSelf
; // Use Wnd->head.h
34 /* Handle of region of the window to be updated. */
36 /* Handle of the window region. */
38 struct _WINDOW_OBJECT
* spwndChild
;
39 struct _WINDOW_OBJECT
* spwndNext
;
40 struct _WINDOW_OBJECT
* spwndPrev
;
41 /* Handle to the parent window. */
42 struct _WINDOW_OBJECT
* spwndParent
;
43 /* Handle to the owner window. */
44 HWND hOwner
; // Use spwndOwner
48 PSBINFOEX pSBInfo
; // convert to PSBINFO
49 /* Entry in the list of thread windows. */
50 LIST_ENTRY ThreadListEntry
;
51 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
54 #define WINDOWOBJECT_NEED_SIZE WNDS_SENDSIZEMOVEMSGS
55 #define WINDOWOBJECT_NEED_ERASEBKGND WNDS_ERASEBACKGROUND
56 #define WINDOWOBJECT_NEED_NCPAINT WNDS_SENDNCPAINT
57 #define WINDOWOBJECT_RESTOREMAX (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
59 #define WINDOWSTATUS_DESTROYING WNDS2_INDESTROY
60 #define WINDOWSTATUS_DESTROYED WNDS_DESTROYED
62 #define HAS_DLGFRAME(Style, ExStyle) \
63 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
64 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
66 #define HAS_THICKFRAME(Style, ExStyle) \
67 (((Style) & WS_THICKFRAME) && \
68 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
70 #define HAS_THINFRAME(Style, ExStyle) \
71 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
73 #define IntIsDesktopWindow(WndObj) \
74 (WndObj->spwndParent == NULL)
76 #define IntIsBroadcastHwnd(hWnd) \
77 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
80 #define IntWndBelongsToThread(WndObj, W32Thread) \
81 (((WndObj->pti->pEThread && WndObj->pti->pEThread->Tcb.Win32Thread)) && \
82 (WndObj->pti->pEThread->Tcb.Win32Thread == W32Thread))
83 // ((WndObj->head.pti) && (WndObj->head.pti == W32Thread))
85 #define IntGetWndThreadId(WndObj) \
86 WndObj->pti->pEThread->Cid.UniqueThread
87 // WndObj->head.pti->pEThread->Cid.UniqueThread
89 #define IntGetWndProcessId(WndObj) \
90 WndObj->pti->pEThread->ThreadsProcess->UniqueProcessId
91 // WndObj->head.pti->pEThread->ThreadsProcess->UniqueProcessId
94 IntIsWindow(HWND hWnd
);
97 IntWinListChildren(PWINDOW_OBJECT Window
);
100 InitWindowImpl (VOID
);
103 CleanupWindowImpl (VOID
);
106 IntGetClientRect (PWINDOW_OBJECT WindowObject
, RECTL
*Rect
);
109 IntGetActiveWindow (VOID
);
112 IntIsWindowVisible (PWINDOW_OBJECT Window
);
115 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
118 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
121 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
123 PWINDOW_OBJECT FASTCALL
124 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
126 PWINDOW_OBJECT FASTCALL
127 IntGetParent(PWINDOW_OBJECT Wnd
);
129 PWINDOW_OBJECT FASTCALL
130 IntGetOwner(PWINDOW_OBJECT Wnd
);
134 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
137 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECTL
*Rect
);
140 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
143 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
149 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
152 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
155 IntDefWindowProc( PWINDOW_OBJECT Window
, UINT Msg
, WPARAM wParam
, LPARAM lParam
, BOOL Ansi
);
157 VOID FASTCALL
IntNotifyWinEvent(DWORD
, PWND
, LONG
, LONG
);
159 PWND APIENTRY
co_IntCreateWindowEx(DWORD
,PUNICODE_STRING
,PUNICODE_STRING
,DWORD
,LONG
,LONG
,LONG
,LONG
,HWND
,HMENU
,HINSTANCE
,LPVOID
,DWORD
,BOOL
);
160 WNDPROC FASTCALL
IntGetWindowProc(PWND
,BOOL
);
162 #endif /* _WIN32K_WINDOW_H */