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_NEED_INTERNALPAINT WNDS_INTERNALPAINT
58 #define WINDOWOBJECT_RESTOREMAX (0x00000020) // Set/Clr WS_MAXIMIZE && Clr/Set WS_EX2_VERTICALLYMAXIMIZEDLEFT/RIGHT
60 #define WINDOWSTATUS_DESTROYING WNDS2_INDESTROY
61 #define WINDOWSTATUS_DESTROYED WNDS_DESTROYED
63 #define HAS_DLGFRAME(Style, ExStyle) \
64 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
65 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
67 #define HAS_THICKFRAME(Style, ExStyle) \
68 (((Style) & WS_THICKFRAME) && \
69 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
71 #define HAS_THINFRAME(Style, ExStyle) \
72 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
74 #define IntIsDesktopWindow(WndObj) \
75 (WndObj->spwndParent == NULL)
77 #define IntIsBroadcastHwnd(hWnd) \
78 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
81 #define IntWndBelongsToThread(WndObj, W32Thread) \
82 (((WndObj->pti->pEThread && WndObj->pti->pEThread->Tcb.Win32Thread)) && \
83 (WndObj->pti->pEThread->Tcb.Win32Thread == W32Thread))
84 // ((WndObj->head.pti) && (WndObj->head.pti == W32Thread))
86 #define IntGetWndThreadId(WndObj) \
87 WndObj->pti->pEThread->Cid.UniqueThread
88 // WndObj->head.pti->pEThread->Cid.UniqueThread
90 #define IntGetWndProcessId(WndObj) \
91 WndObj->pti->pEThread->ThreadsProcess->UniqueProcessId
92 // WndObj->head.pti->pEThread->ThreadsProcess->UniqueProcessId
95 IntIsWindow(HWND hWnd
);
98 IntWinListChildren(PWINDOW_OBJECT Window
);
101 InitWindowImpl (VOID
);
104 CleanupWindowImpl (VOID
);
107 IntGetClientRect (PWINDOW_OBJECT WindowObject
, RECTL
*Rect
);
110 IntGetActiveWindow (VOID
);
113 IntIsWindowVisible (PWINDOW_OBJECT Window
);
116 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
119 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
122 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
124 PWINDOW_OBJECT FASTCALL
125 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
127 PWINDOW_OBJECT FASTCALL
128 IntGetParent(PWINDOW_OBJECT Wnd
);
130 PWINDOW_OBJECT FASTCALL
131 IntGetOwner(PWINDOW_OBJECT Wnd
);
135 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
138 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECTL
*Rect
);
141 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
144 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
150 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
153 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
156 IntDefWindowProc( PWINDOW_OBJECT Window
, UINT Msg
, WPARAM wParam
, LPARAM lParam
, BOOL Ansi
);
158 VOID FASTCALL
IntNotifyWinEvent(DWORD
, PWND
, LONG
, LONG
);
160 PWND APIENTRY
co_IntCreateWindowEx(DWORD
,PUNICODE_STRING
,PUNICODE_STRING
,DWORD
,LONG
,LONG
,LONG
,LONG
,HWND
,HMENU
,HINSTANCE
,LPVOID
,DWORD
,BOOL
);
161 WNDPROC FASTCALL
IntGetWindowProc(PWND
,BOOL
);
163 #endif /* _WIN32K_WINDOW_H */