mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:43:04 +00:00

- Although RECT and RECTL are defined equal, the compiler treats them as incompatible. MS has created a lot of definitions with RECT and a lot with RECTL. So far we had to typecast them. Now with adding some defines into a win32k header file, we can finally treat them as equal inside win32k and get rid of a lot of type casts. Also use RECTL in favour of RECT internally, as this is the type that MS uses for the DDI and seems to be the more appropriate type. - We had a lot of "const PRECT" stuff inside win32k. Note: there's difference between "const RECT *" (what you currently want) and "CONST PRECT" (which you proabably don't want). Despite the fact that CONST is not an official modifier (please stick to const) the main difference is that the former describes a pointer to a constant structure, while the latter describes a constant pointer to a modifyable structure. - In an attempt to clean up the overpolluted IntGdi namespace, "objectify" the rect functions, moving them into their own namespace RECTL_Xxx. svn path=/trunk/; revision=40100
174 lines
4.7 KiB
C
174 lines
4.7 KiB
C
#ifndef _WIN32K_WINDOW_H
|
|
#define _WIN32K_WINDOW_H
|
|
|
|
struct _PROPERTY;
|
|
struct _WINDOW_OBJECT;
|
|
typedef struct _WINDOW_OBJECT *PWINDOW_OBJECT;
|
|
|
|
#include <include/object.h>
|
|
#include <include/class.h>
|
|
#include <include/msgqueue.h>
|
|
#include <include/winsta.h>
|
|
#include <include/dce.h>
|
|
#include <include/prop.h>
|
|
#include <include/scroll.h>
|
|
|
|
BOOL FASTCALL UserUpdateUiState(PWINDOW Wnd, WPARAM wParam);
|
|
|
|
typedef struct _WINDOW_OBJECT
|
|
{
|
|
/* NOTE: Do *NOT* Move this pointer anywhere in this structure! This
|
|
is a pointer to the WINDOW structure that eventually replaces
|
|
the WINDOW_OBJECT structure! USER32 expects this pointer to
|
|
be here until WINDOW_OBJECT has completely been superseded! */
|
|
PWINDOW Wnd;
|
|
|
|
/* Pointer to the thread information */
|
|
PW32THREADINFO ti;
|
|
/* Pointer to the desktop */
|
|
PDESKTOPINFO Desktop;
|
|
/* system menu handle. */
|
|
HMENU SystemMenu;
|
|
/* Entry in the thread's list of windows. */
|
|
LIST_ENTRY ListEntry;
|
|
/* Handle for the window. */
|
|
HWND hSelf;
|
|
/* Window flags. */
|
|
ULONG Flags;
|
|
/* Handle of region of the window to be updated. */
|
|
HANDLE UpdateRegion;
|
|
/* Handle of the window region. */
|
|
HANDLE WindowRegion;
|
|
/* Pointer to the owning thread's message queue. */
|
|
PUSER_MESSAGE_QUEUE MessageQueue;
|
|
struct _WINDOW_OBJECT* FirstChild;
|
|
struct _WINDOW_OBJECT* LastChild;
|
|
struct _WINDOW_OBJECT* NextSibling;
|
|
struct _WINDOW_OBJECT* PrevSibling;
|
|
/* Entry in the list of thread windows. */
|
|
LIST_ENTRY ThreadListEntry;
|
|
/* Handle to the parent window. */
|
|
struct _WINDOW_OBJECT* Parent;
|
|
/* Handle to the owner window. */
|
|
HWND hOwner;
|
|
/* DC Entries (DCE) */
|
|
PDCE Dce;
|
|
/* Scrollbar info */
|
|
PWINDOW_SCROLLINFO Scroll;
|
|
PETHREAD OwnerThread;
|
|
HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/
|
|
ULONG Status;
|
|
/* counter for tiled child windows */
|
|
ULONG TiledCounter;
|
|
/* WNDOBJ list */
|
|
LIST_ENTRY WndObjListHead;
|
|
} WINDOW_OBJECT; /* PWINDOW_OBJECT already declared at top of file */
|
|
|
|
/* Window flags. */
|
|
#define WINDOWOBJECT_NEED_SIZE (0x00000001)
|
|
#define WINDOWOBJECT_NEED_ERASEBKGND (0x00000002)
|
|
#define WINDOWOBJECT_NEED_NCPAINT (0x00000004)
|
|
#define WINDOWOBJECT_NEED_INTERNALPAINT (0x00000008)
|
|
#define WINDOWOBJECT_RESTOREMAX (0x00000020)
|
|
|
|
#define WINDOWSTATUS_DESTROYING (0x1)
|
|
#define WINDOWSTATUS_DESTROYED (0x2)
|
|
|
|
#define HAS_DLGFRAME(Style, ExStyle) \
|
|
(((ExStyle) & WS_EX_DLGMODALFRAME) || \
|
|
(((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
|
|
|
|
#define HAS_THICKFRAME(Style, ExStyle) \
|
|
(((Style) & WS_THICKFRAME) && \
|
|
(!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
|
|
|
|
#define HAS_THINFRAME(Style, ExStyle) \
|
|
(((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
|
|
|
|
#define IntIsDesktopWindow(WndObj) \
|
|
(WndObj->Parent == NULL)
|
|
|
|
#define IntIsBroadcastHwnd(hWnd) \
|
|
(hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST)
|
|
|
|
|
|
#define IntWndBelongsToThread(WndObj, W32Thread) \
|
|
(((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread)) && \
|
|
(WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
|
|
|
|
#define IntGetWndThreadId(WndObj) \
|
|
WndObj->OwnerThread->Cid.UniqueThread
|
|
|
|
#define IntGetWndProcessId(WndObj) \
|
|
WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
|
|
|
|
|
|
BOOL FASTCALL
|
|
IntIsWindow(HWND hWnd);
|
|
|
|
HWND* FASTCALL
|
|
IntWinListChildren(PWINDOW_OBJECT Window);
|
|
|
|
NTSTATUS FASTCALL
|
|
InitWindowImpl (VOID);
|
|
|
|
NTSTATUS FASTCALL
|
|
CleanupWindowImpl (VOID);
|
|
|
|
VOID FASTCALL
|
|
IntGetClientRect (PWINDOW_OBJECT WindowObject, RECTL *Rect);
|
|
|
|
HWND FASTCALL
|
|
IntGetActiveWindow (VOID);
|
|
|
|
BOOL FASTCALL
|
|
IntIsWindowVisible (PWINDOW_OBJECT Window);
|
|
|
|
BOOL FASTCALL
|
|
IntIsChildWindow (PWINDOW_OBJECT Parent, PWINDOW_OBJECT Child);
|
|
|
|
VOID FASTCALL
|
|
IntUnlinkWindow(PWINDOW_OBJECT Wnd);
|
|
|
|
VOID FASTCALL
|
|
IntLinkWindow(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndParent, PWINDOW_OBJECT WndPrevSibling);
|
|
|
|
PWINDOW_OBJECT FASTCALL
|
|
IntGetAncestor(PWINDOW_OBJECT Wnd, UINT Type);
|
|
|
|
PWINDOW_OBJECT FASTCALL
|
|
IntGetParent(PWINDOW_OBJECT Wnd);
|
|
|
|
PWINDOW_OBJECT FASTCALL
|
|
IntGetOwner(PWINDOW_OBJECT Wnd);
|
|
|
|
|
|
INT FASTCALL
|
|
IntGetWindowRgn(PWINDOW_OBJECT Window, HRGN hRgn);
|
|
|
|
INT FASTCALL
|
|
IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECTL *Rect);
|
|
|
|
BOOL FASTCALL
|
|
IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi);
|
|
|
|
VOID FASTCALL
|
|
IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy);
|
|
|
|
BOOL FASTCALL
|
|
IntAnyPopup(VOID);
|
|
|
|
BOOL FASTCALL
|
|
IntIsWindowInDestroy(PWINDOW_OBJECT Window);
|
|
|
|
BOOL FASTCALL
|
|
IntShowOwnedPopups( PWINDOW_OBJECT owner, BOOL fShow );
|
|
|
|
LRESULT FASTCALL
|
|
IntDefWindowProc( PWINDOW_OBJECT Window, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi);
|
|
|
|
VOID FASTCALL IntNotifyWinEvent(DWORD, PWINDOW_OBJECT, LONG, LONG);
|
|
|
|
#endif /* _WIN32K_WINDOW_H */
|
|
|
|
/* EOF */
|