#ifndef __WIN32K_WINDOW_H
#define __WIN32K_WINDOW_H
+struct _PROPERTY;
+struct _WINDOW_OBJECT;
+
#include <windows.h>
#include <ddk/ntddk.h>
#include <include/class.h>
#include <include/msgqueue.h>
#include <include/winsta.h>
#include <include/dce.h>
+#include <include/prop.h>
typedef struct _PROPERTY
{
ATOM Atom;
} PROPERTY, *PPROPERTY;
-VOID
+VOID FASTCALL
WinPosSetupInternalPos(VOID);
typedef struct _WINDOW_OBJECT
INT y;
INT Width;
INT Height;
+ /* Context help id */
+ DWORD ContextHelpId;
/* Parent window handle. */
HWND ParentHandle;
- /* Window menu handle. */
- HMENU Menu;
+ /* system menu handle. */
+ HMENU SystemMenu;
/* Handle of the module that created the window. */
HINSTANCE Instance;
/* Unknown. */
LPVOID Parameters;
/* Entry in the thread's list of windows. */
LIST_ENTRY ListEntry;
- /* Entry in the global list of windows. */
- LIST_ENTRY DesktopListEntry;
/* Pointer to the extra data associated with the window. */
PULONG ExtraData;
/* Size of the extra data associated with the window. */
HANDLE Self;
/* Window flags. */
ULONG Flags;
- /* FIXME: Don't know. */
+ /* Window menu handle or window id */
UINT IDMenu;
/* Handle of region of the window to be updated. */
HANDLE UpdateRegion;
- /* Pointer to the message queue associated with the window. */
+ /* Pointer to the owning thread's message queue. */
PUSER_MESSAGE_QUEUE MessageQueue;
- /* Head of the list of child windows. */
- LIST_ENTRY ChildrenListHead;
+ struct _WINDOW_OBJECT* FirstChild;
+ struct _WINDOW_OBJECT* LastChild;
/* Lock for the list of child windows. */
FAST_MUTEX ChildrenListLock;
- /* Entry in the parent's list of child windows. */
- LIST_ENTRY SiblingListEntry;
+ struct _WINDOW_OBJECT* NextSibling;
+ struct _WINDOW_OBJECT* PrevSibling;
/* Entry in the list of thread windows. */
LIST_ENTRY ThreadListEntry;
/* Pointer to the parent window. */
PSCROLLBARINFO pHScroll;
PSCROLLBARINFO pVScroll;
PSCROLLBARINFO wExtra;
+ LONG UserData;
+ BOOL Unicode;
+ WNDPROC WndProcA;
+ WNDPROC WndProcW;
+ PETHREAD OwnerThread;
+ HWND hWndOwner; /* handle to the owner window (wine doesn't use pointer, for unk. reason)*/
+ HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
} WINDOW_OBJECT, *PWINDOW_OBJECT;
/* Window flags. */
#define WINDOWOBJECT_NEED_SIZE (0x00000001)
-#define WINDOWOBJECT_NEED_BEGINPAINT (0x00000002)
+/* Not used anymore: define WINDOWOBJECT_NEED_BEGINPAINT (0x00000002) */
#define WINDOWOBJECT_NEED_ERASEBACKGRD (0x00000004)
#define WINDOWOBJECT_NEED_NCPAINT (0x00000008)
#define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000010)
#define WINDOWOBJECT_RESTOREMAX (0x00000020)
-NTSTATUS
-InitWindowImpl(VOID);
-NTSTATUS
-CleanupWindowImpl(VOID);
-VOID
-W32kGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect);
-PWINDOW_OBJECT
-W32kGetWindowObject(HWND hWnd);
-VOID
-W32kReleaseWindowObject(PWINDOW_OBJECT Window);
+inline BOOL IntIsDesktopWindow(PWINDOW_OBJECT WindowObject);
+
+inline BOOL IntIsBroadcastHwnd( HWND hwnd );
+
+BOOLEAN FASTCALL
+IntWndBelongsToThread(PWINDOW_OBJECT Window, PW32THREAD ThreadData);
+
+NTSTATUS FASTCALL
+InitWindowImpl (VOID);
+
+NTSTATUS FASTCALL
+CleanupWindowImpl (VOID);
+
+VOID FASTCALL
+IntGetClientRect (PWINDOW_OBJECT WindowObject, PRECT Rect);
+
+PWINDOW_OBJECT FASTCALL
+IntGetWindowObject (HWND hWnd);
+
+VOID FASTCALL
+IntReleaseWindowObject (PWINDOW_OBJECT Window);
+
HWND STDCALL
-W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
+IntCreateDesktopWindow (PWINSTATION_OBJECT WindowStation,
PWNDCLASS_OBJECT DesktopClass,
ULONG Width, ULONG Height);
-BOOL
-W32kIsDesktopWindow(HWND hWnd);
-HWND
-W32kGetActiveWindow(VOID);
-BOOL
-W32kIsWindowVisible(HWND Wnd);
-BOOL
-W32kIsChildWindow(HWND Parent, HWND Child);
-HWND W32kGetDesktopWindow();
+
+HWND FASTCALL
+IntGetActiveWindow (VOID);
+
+BOOL FASTCALL
+IntIsWindowVisible (HWND Wnd);
+
+BOOL FASTCALL
+IntIsChildWindow (HWND Parent, HWND Child);
+
+HWND FASTCALL
+IntGetDesktopWindow (VOID);
+
+HWND FASTCALL
+IntGetFocusWindow (VOID);
+
+HWND FASTCALL
+IntSetFocusWindow (HWND hWnd);
+
+BOOL FASTCALL
+IntSetProp(PWINDOW_OBJECT Wnd, ATOM Atom, HANDLE Data);
+
+PPROPERTY FASTCALL
+IntGetProp(PWINDOW_OBJECT WindowObject, ATOM Atom);
+
+DWORD FASTCALL
+IntGetWindowThreadProcessId(PWINDOW_OBJECT Wnd, PDWORD pid);
+
+VOID FASTCALL
+IntUnlinkWindow(PWINDOW_OBJECT Wnd);
+
+ULONG
+UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle);
+
+ULONG
+UserHasThickFrameStyle(ULONG Style, ULONG ExStyle);
+
+PWINDOW_OBJECT FASTCALL
+IntGetAncestor(PWINDOW_OBJECT Wnd, UINT Type);
+
+PWINDOW_OBJECT FASTCALL
+IntGetParent(PWINDOW_OBJECT Wnd);
+
+typedef enum _WINLOCK_TYPE
+{
+ None,
+ Any,
+ Shared,
+ Exclusive
+} WINLOCK_TYPE;
+
+#define ASSERT_WINLOCK(a) assert(IntVerifyWinLock(a))
+
+inline VOID IntAcquireWinLockShared();
+inline VOID IntAcquireWinLockExclusive();
+inline VOID IntReleaseWinLock();
+BOOL FASTCALL IntVerifyWinLock(WINLOCK_TYPE Type);
+WINLOCK_TYPE FASTCALL IntSuspendWinLock();
+VOID FASTCALL IntRestoreWinLock(WINLOCK_TYPE Type);
+inline BOOL IntInitializeWinLock();
+inline VOID IntDeleteWinLock();
#endif /* __WIN32K_WINDOW_H */