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 */
30 /* Pointer to the desktop */
32 /* system menu handle. */
34 /* Entry in the thread's list of windows. */
36 /* Handle for the window. */
40 /* Handle of region of the window to be updated. */
42 /* Handle of the window region. */
44 /* Pointer to the owning thread's message queue. */
45 PUSER_MESSAGE_QUEUE MessageQueue
;
46 struct _WINDOW_OBJECT
* FirstChild
;
47 struct _WINDOW_OBJECT
* LastChild
;
48 struct _WINDOW_OBJECT
* NextSibling
;
49 struct _WINDOW_OBJECT
* PrevSibling
;
50 /* Entry in the list of thread windows. */
51 LIST_ENTRY ThreadListEntry
;
52 /* Handle to the parent window. */
53 struct _WINDOW_OBJECT
* Parent
;
54 /* Handle to the owner window. */
56 /* DC Entries (DCE) */
59 PWINDOW_SCROLLINFO Scroll
;
61 HWND hWndLastPopup
; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
63 /* counter for tiled child windows */
66 LIST_ENTRY WndObjListHead
;
67 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
70 #define WINDOWOBJECT_NEED_SIZE (0x00000001) // WNDS_SENDSIZEMOVEMSGS?
71 #define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002) // WNDS_ERASEBACKGROUND
72 #define WINDOWOBJECT_NEED_NCPAINT (0x00000004) // WNDS_SENDNCPAINT
73 #define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008) // WNDS_INTERNALPAINT
74 #define WINDOWOBJECT_RESTOREMAX (0x00000020)
76 #define WINDOWSTATUS_DESTROYING (0x1) // WNDS2_INDESTROY
77 #define WINDOWSTATUS_DESTROYED (0x2) // WNDS_DESTROYED
79 #define HAS_DLGFRAME(Style, ExStyle) \
80 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
81 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
83 #define HAS_THICKFRAME(Style, ExStyle) \
84 (((Style) & WS_THICKFRAME) && \
85 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
87 #define HAS_THINFRAME(Style, ExStyle) \
88 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
90 #define IntIsDesktopWindow(WndObj) \
91 (WndObj->Parent == NULL)
93 #define IntIsBroadcastHwnd(hWnd) \
94 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
97 #define IntWndBelongsToThread(WndObj, W32Thread) \
98 (((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
99 (WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
101 #define IntGetWndThreadId(WndObj) \
102 WndObj->OwnerThread->Cid.UniqueThread
104 #define IntGetWndProcessId(WndObj) \
105 WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
109 IntIsWindow(HWND hWnd
);
112 IntWinListChildren(PWINDOW_OBJECT Window
);
115 InitWindowImpl (VOID
);
118 CleanupWindowImpl (VOID
);
121 IntGetClientRect (PWINDOW_OBJECT WindowObject
, RECTL
*Rect
);
124 IntGetActiveWindow (VOID
);
127 IntIsWindowVisible (PWINDOW_OBJECT Window
);
130 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
133 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
136 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
138 PWINDOW_OBJECT FASTCALL
139 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
141 PWINDOW_OBJECT FASTCALL
142 IntGetParent(PWINDOW_OBJECT Wnd
);
144 PWINDOW_OBJECT FASTCALL
145 IntGetOwner(PWINDOW_OBJECT Wnd
);
149 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
152 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECTL
*Rect
);
155 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
158 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
164 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
167 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
170 IntDefWindowProc( PWINDOW_OBJECT Window
, UINT Msg
, WPARAM wParam
, LPARAM lParam
, BOOL Ansi
);
172 VOID FASTCALL
IntNotifyWinEvent(DWORD
, PWND
, LONG
, LONG
);
174 PWND APIENTRY
co_IntCreateWindowEx(DWORD
,PUNICODE_STRING
,PUNICODE_STRING
,DWORD
,LONG
,LONG
,LONG
,LONG
,HWND
,HMENU
,HINSTANCE
,LPVOID
,DWORD
,BOOL
);
175 WNDPROC FASTCALL
IntGetWindowProc(PWND
,BOOL
);
177 #endif /* _WIN32K_WINDOW_H */