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
;
31 /* entry in the window list of the class object */
32 LIST_ENTRY ClassListEntry
;
36 UNICODE_STRING WindowName
;
41 /* system menu handle. */
43 /* Handle of the module that created the window. */
45 /* Entry in the thread's list of windows. */
47 /* Pointer to the extra data associated with the window. */
49 /* Size of the extra data associated with the window. */
51 /* Position of the window. */
53 /* Position of the window's client area. */
55 /* Handle for the window. */
59 /* Window menu handle or window id */
61 /* Handle of region of the window to be updated. */
63 /* Handle of the window region. */
65 /* Pointer to the owning thread's message queue. */
66 PUSER_MESSAGE_QUEUE MessageQueue
;
67 struct _WINDOW_OBJECT
* FirstChild
;
68 struct _WINDOW_OBJECT
* LastChild
;
69 struct _WINDOW_OBJECT
* NextSibling
;
70 struct _WINDOW_OBJECT
* PrevSibling
;
71 /* Entry in the list of thread windows. */
72 LIST_ENTRY ThreadListEntry
;
73 /* Handle to the parent window. */
74 struct _WINDOW_OBJECT
* Parent
;
75 /* Handle to the owner window. */
77 /* DC Entries (DCE) */
79 /* Property list head.*/
80 LIST_ENTRY PropListHead
;
83 PWINDOW_SCROLLINFO Scroll
;
89 HWND hWndLastPopup
; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
90 PINTERNALPOS InternalPos
;
92 /* counter for tiled child windows */
95 LIST_ENTRY WndObjListHead
;
96 } WINDOW_OBJECT
; /* PWINDOW_OBJECT already declared at top of file */
99 #define WINDOWOBJECT_NEED_SIZE (0x00000001)
100 #define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002)
101 #define WINDOWOBJECT_NEED_NCPAINT (0x00000004)
102 #define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008)
103 #define WINDOWOBJECT_RESTOREMAX (0x00000020)
105 #define WINDOWSTATUS_DESTROYING (0x1)
106 #define WINDOWSTATUS_DESTROYED (0x2)
108 #define HAS_DLGFRAME(Style, ExStyle) \
109 (((ExStyle) & WS_EX_DLGMODALFRAME) || \
110 (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
112 #define HAS_THICKFRAME(Style, ExStyle) \
113 (((Style) & WS_THICKFRAME) && \
114 (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
116 #define HAS_THINFRAME(Style, ExStyle) \
117 (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
119 #define IntIsDesktopWindow(WndObj) \
120 (WndObj->Parent == NULL)
122 #define IntIsBroadcastHwnd(hWnd) \
123 (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
126 #define IntWndBelongsToThread(WndObj, W32Thread) \
127 (((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
128 (WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
130 #define IntGetWndThreadId(WndObj) \
131 WndObj->OwnerThread->Cid.UniqueThread
133 #define IntGetWndProcessId(WndObj) \
134 WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
138 IntIsWindow(HWND hWnd
);
141 IntWinListChildren(PWINDOW_OBJECT Window
);
144 InitWindowImpl (VOID
);
147 CleanupWindowImpl (VOID
);
150 IntGetClientRect (PWINDOW_OBJECT WindowObject
, PRECT Rect
);
153 IntGetActiveWindow (VOID
);
156 IntIsWindowVisible (PWINDOW_OBJECT Window
);
159 IntIsChildWindow (PWINDOW_OBJECT Parent
, PWINDOW_OBJECT Child
);
162 IntUnlinkWindow(PWINDOW_OBJECT Wnd
);
165 IntLinkWindow(PWINDOW_OBJECT Wnd
, PWINDOW_OBJECT WndParent
, PWINDOW_OBJECT WndPrevSibling
);
167 PWINDOW_OBJECT FASTCALL
168 IntGetAncestor(PWINDOW_OBJECT Wnd
, UINT Type
);
170 PWINDOW_OBJECT FASTCALL
171 IntGetParent(PWINDOW_OBJECT Wnd
);
173 PWINDOW_OBJECT FASTCALL
174 IntGetOwner(PWINDOW_OBJECT Wnd
);
178 IntGetWindowRgn(PWINDOW_OBJECT Window
, HRGN hRgn
);
181 IntGetWindowRgnBox(PWINDOW_OBJECT Window
, RECT
*Rect
);
184 IntGetWindowInfo(PWINDOW_OBJECT WindowObject
, PWINDOWINFO pwi
);
187 IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject
, UINT
*cx
, UINT
*cy
);
193 IntIsWindowInDestroy(PWINDOW_OBJECT Window
);
195 DWORD
IntRemoveWndProcHandle(WNDPROC Handle
);
196 DWORD
IntRemoveProcessWndProcHandles(HANDLE ProcessID
);
197 DWORD
IntAddWndProcHandle(WNDPROC WindowProc
, BOOL IsUnicode
);
200 IntShowOwnedPopups( PWINDOW_OBJECT owner
, BOOL fShow
);
202 #endif /* _WIN32K_WINDOW_H */