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>
18 WinPosSetupInternalPos(VOID
);
20 typedef struct _INTERNALPOS
25 } INTERNALPOS
, *PINTERNALPOS
;
27 typedef struct _WINDOW_OBJECT
29 /* Pointer to the window class. */
30 PWNDCLASS_OBJECT Class
;
34 UNICODE_STRING WindowName
;
39 /* system menu handle. */
41 /* Handle of the module that created the window. */
43 /* Entry in the thread's list of windows. */
45 /* Pointer to the extra data associated with the window. */
47 /* Size of the extra data associated with the window. */
49 /* Position of the window. */
51 /* Position of the window's client area. */
53 /* Handle for the window. */
57 /* Window menu handle or window id */
59 /* Handle of region of the window to be updated. */
61 /* Handle of the window region. */
63 /* Pointer to the owning thread's message queue. */
64 PUSER_MESSAGE_QUEUE MessageQueue
;
65 struct _WINDOW_OBJECT
* FirstChild
;
66 struct _WINDOW_OBJECT
* LastChild
;
67 struct _WINDOW_OBJECT
* NextSibling
;
68 struct _WINDOW_OBJECT
* PrevSibling
;
69 /* Entry in the list of thread windows. */
70 LIST_ENTRY ThreadListEntry
;
71 /* Handle to the parent window. */
72 struct _WINDOW_OBJECT
* Parent
;
73 /* Handle to the owner window. */
75 /* DC Entries (DCE) */
77 /* Property list head.*/
78 LIST_ENTRY PropListHead
;
81 PWINDOW_SCROLLINFO Scroll
;
87 HWND hWndLastPopup
; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
88 PINTERNALPOS InternalPos
;
90 /* counter for tiled child windows */
93 LIST_ENTRY WndObjListHead
;
94 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
97 #define WINDOWOBJECT_NEED_SIZE (0x00000001)
98 #define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002)
99 #define WINDOWOBJECT_NEED_NCPAINT (0x00000004)
100 #define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008)
101 #define WINDOWOBJECT_RESTOREMAX (0x00000020)
103 #define WINDOWSTATUS_DESTROYING (0x1)
104 #define WINDOWSTATUS_DESTROYED (0x2)
106 #define HAS_DLGFRAME(Style, ExStyle) \
107 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
108 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
110 #define HAS_THICKFRAME(Style, ExStyle) \
111 (((Style) & WS_THICKFRAME) && \
112 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
114 #define HAS_THINFRAME(Style, ExStyle) \
115 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
117 #define IntIsDesktopWindow(WndObj) \
118 (WndObj->Parent == NULL)
120 #define IntIsBroadcastHwnd(hWnd) \
121 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
124 #define IntWndBelongsToThread(WndObj, W32Thread) \
125 (((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
126 (WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
128 #define IntGetWndThreadId(WndObj) \
129 WndObj->OwnerThread->Cid.UniqueThread
131 #define IntGetWndProcessId(WndObj) \
132 WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
136 IntIsWindow(HWND hWnd
);
139 IntWinListChildren(PWINDOW_OBJECT Window
);
142 InitWindowImpl (VOID
);
145 CleanupWindowImpl (VOID
);
148 IntGetClientRect (PWINDOW_OBJECT WindowObject
, PRECT Rect
);
151 IntGetActiveWindow (VOID
);
154 IntIsWindowVisible (PWINDOW_OBJECT Window
);
157 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
160 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
163 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
165 PWINDOW_OBJECT FASTCALL
166 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
168 PWINDOW_OBJECT FASTCALL
169 IntGetParent(PWINDOW_OBJECT Wnd
);
171 PWINDOW_OBJECT FASTCALL
172 IntGetOwner(PWINDOW_OBJECT Wnd
);
176 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
179 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECT
*Rect
);
182 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
185 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
191 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
193 DWORD
IntRemoveWndProcHandle(WNDPROC Handle
);
194 DWORD
IntRemoveProcessWndProcHandles(HANDLE ProcessID
);
195 DWORD
IntAddWndProcHandle(WNDPROC WindowProc
, BOOL IsUnicode
);
198 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
200 #endif /* _WIN32K_WINDOW_H */