Techwiki:Win32k/DESKTOP

From ReactOS Wiki
Jump to: navigation, search

Windows XP version of DESKTOP and DESKTOPINFO

#define CWINHOOKS WH_MAX - WH_MIN + 1 // 16, see sdk/winuser.h.
#if (_WIN32_WINNT >= 0x0700)
typedef struct _MAGNIFICATION_INPUT_TRANSFORM
{
  RECT        rcSource;
  RECT        rcScreen;
  PTHREADINFO ptiMagThreadInfo;
  INT         magFactorX;
  INT         magFactorY;
} MAGNIFICATION_INPUT_TRANSFORM, *PMAGNIFICATION_INPUT_TRANSFORM;
#endif

typedef struct VWPLELEMENT
{
  ULONG_PTR DataOrTag;
  PWND      pwnd;   
} VWPLELEMENT, *PVWPLELEMENT;

typedef struct VWPL
{
  ULONG       cPwnd;
  ULONG       cElem;
  ULONG       cThreshhold;
  INT         fTagged;
  VWPLELEMENT aElement[0];
} VWPL1, *PVWPL;

typedef struct _DESKTOPINFO
{
/* 000 */ PVOID        pvDesktopBase;
/* 004 */ PVOID        pvDesktopLimit;
/* 008 */ PWND         spwnd;
/* 00c */ DWORD        fsHooks;
/* 010 */ PHOOK        aphkStart[CWINHOOKS];
/* 050 */ PWND         spwndShell;
/* 054 */ PPROCESSINFO ppiShellProcess;
/* 058 */ PWND         spwndBkGnd;
/* 05c */ PWND         spwndTaskman;
/* 060 */ PWND         spwndProgman;
/* 064 */ PVWPL        pvwplShellHook;
/* 068 */ INT          cntMBox;
          PWND         spwndGestureEngine;
          PVWPL        pvwplMessagePPHandler;
          struct
          {
            ULONG fComposited:1;
            ULONG fIsDwmDesktop:1;
          };
} DESKTOPINFO, *PDESKTOPINFO;
//
typedef struct _CONSOLE_CARET_INFO
{
  HWND hwnd;
  RECT rc;
} CONSOLE_CARET_INFO, *PCONSOLE_CARET_INFO;
//
typedef struct _DESKTOP  // Size: 0x88
{                                          // XP
#if (_WIN32_WINNT >= 0x0501)
  DWORD              dwSessionId;          // 000
#endif
  PDESKTOPINFO       pDeskInfo;            // 004
  PDISPLAYINFO       pDispInfo;            // 008
  struct _DESKTOP   *rpdeskNext;           // 00c
  PWINDOWSTATION     rpwinstaParent;       // 010
  DWORD              dwDTFlage;            // 014
  DWORD              dwDesktopId;          // 018
#if (_WIN32_WINNT < 0x0600)
  PWND               spwndMenu;            // 01c
#endif
  PMENU              spmenuSys;            // 020
  PMENU              spmenuDialogSys;      // 024
  PMENU              spmenuHScroll;        // 028
  PMENU              spmenuVScroll;        // 02c
  PWND               spwndForeground;      // 030
  PWND               spwndTray;            // 034
  PWND               spwndMessage;         // 038
  PWND               spwndTooltip;         // 03c
  HANDLE             hsectionDesktop;      // 040
  PWIN32HEAP         pheapDesktop;         // 044
#if (_WIN32_WINNT >= 0x0600)
  ULONG ulHeapSize;
#else
  DWORD              dwConsoleThreadId;    // 048
  DWORD              dwConsoleIMEThreadId; // 04c
#endif
  CONSOLE_CARET_INFO cciConsole;           // 050 Size is 20 bytes
  LIST_ENTRY         PtiList;              // 064
  PWND               spwndTrack;           // 06c
  DWORD              htEx;                 // 070
  RECT               rcMouseHover;         // 074
  DWORD              dwMouseHoverTime;     // 084
#if (_WIN32_WINNT <= 0x0500)
  DWORD              dwSessionId; // W2k
#endif
#if (_WIN32_WINNT >= 0x0700)
  PMAGNIFICATION_INPUT_TRANSFORM pMagInputTransform;
#endif
} DESKTOP, *PDESKTOP;

// Desktop flags
#define DF_TME_HOVER        0x00000400
#define DF_TME_LEAVE        0x00000800
#define DF_TOOLTIPSTARTED   0x00001000
#define DF_TOOLTIPRUNNING   0x00002000
#define DF_HOTTRACK         0x00004000
#define DF_DESTROYED        0x00008000
#define DF_DESKWNDDESTROYED 0x00010000
#define DF_DYING            0x00020000

typedef struct tagDESKTOPVIEW
{
  struct _tagDESKTOPVIEW* pdvNext;
  PDESKTOP                pdesk;
  ULONG_PTR               ulClientDelta;
} DESKTOPVIEW, *PDESKTOPVIEW;

References