X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=subsys%2Fwin32k%2Finclude%2Fwindow.h;fp=subsys%2Fwin32k%2Finclude%2Fwindow.h;h=7607ed6c866f76f9e2ab8b2c4f34341104e25d73;hp=03f4f1b76a976ea626d831ca10b4f26bcaa38c65;hb=a3df8bf1429570e0bd6c6428f6ed80073578cf4b;hpb=7c0db166f81fbe8c8b913d7f26048e337d383605 diff --git a/subsys/win32k/include/window.h b/subsys/win32k/include/window.h index 03f4f1b..7607ed6 100644 --- a/subsys/win32k/include/window.h +++ b/subsys/win32k/include/window.h @@ -1,12 +1,16 @@ #ifndef __WIN32K_WINDOW_H #define __WIN32K_WINDOW_H +struct _PROPERTY; +struct _WINDOW_OBJECT; + #include #include #include #include #include #include +#include typedef struct _PROPERTY { @@ -15,7 +19,7 @@ typedef struct _PROPERTY ATOM Atom; } PROPERTY, *PPROPERTY; -VOID +VOID FASTCALL WinPosSetupInternalPos(VOID); typedef struct _WINDOW_OBJECT @@ -33,18 +37,18 @@ 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. */ @@ -57,18 +61,18 @@ typedef struct _WINDOW_OBJECT 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. */ @@ -81,39 +85,110 @@ typedef struct _WINDOW_OBJECT 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 */