Difference between revisions of "Techwiki:Win32k/PDEV"

From ReactOS Wiki
Jump to: navigation, search
Line 44: Line 44:
 
   [[Techwiki:win32k/LDEVOBJ|PLDEVOBJ]]    pldev;                    // 2E0 300
 
   [[Techwiki:win32k/LDEVOBJ|PLDEVOBJ]]    pldev;                    // 2E0 300
 
   DHPDEV      dhpdev;                  // 2E4 304
 
   DHPDEV      dhpdev;                  // 2E4 304
   PPALETTE    ppalSurf;                // 2E8 308 -> Gla8
+
   [[Techwiki:win32k/PALETTE|PPALETTE]]   ppalSurf;                // 2E8 308 -> Gla8
 
   [[Techwiki:win32k/DEVINFO|DEVINFO]]    devinfo;                  // 2EC 30C
 
   [[Techwiki:win32k/DEVINFO|DEVINFO]]    devinfo;                  // 2EC 30C
 
   [[Techwiki:win32k/GDIINFO|GDIINFO]]    gdiinfo;                  // 418 438  
 
   [[Techwiki:win32k/GDIINFO|GDIINFO]]    gdiinfo;                  // 418 438  

Revision as of 17:07, 19 December 2010

Windows XP version of PDEVOBJ

#define INDEX_LAST 93 // For XP
#define HS_DDI_MAX 6

typedef struct _PDEVOBJ
{ //                                       W2k WXP
  BASEOBJECT  baseobj;                  // 000 000
  PPDEVOBJ    ppdevNext;                // 010 010
  int         cPdevRefs;                // 014 014
  int         cPdevOpenRefs;            // 018 018
  PPDEVOBJ    ppdevParent;              // 01C 01C
  FLONG       flags;                    // 020 020
  FLONG       flAccelerated;            // 
  HSEMAPHORE  hsemDevLock;              // 028 028
  HSEMAPHORE  hsemPointer;              // 02C
  POINTL      ptlPointer;               // 030
  SIZEL       szlPointer;               // 038 038
  SPRITESTATE SpriteState;              // 040 040 size = 1f4h
  HFONT       hlfntDefault;             // 21C 234 HFONT at this offset verified on xp
  HFONT       hlfntAnsiVariable;        // 220 238 HFONT at this offset verified on xp
  HFONT       hlfntAnsiFixed;           // 224 23C HFONT at this offset verified on xp
  HSURF       ahsurf[HS_DDI_MAX];       // 228 240 HSURF at this offset verified on XP
  PUSHORT     pusPrtDataFileName;       // 0x0258 
  PVOID       pDevHTInfo;               // 244 0x025C 
  RFONT *     prfntActive;              // 248 260
  RFONT *     prfntInactive;            // 24C 264
  ULONG       cInactive;                // 250 268
  BYTE        ajbo[0x5C];               // 0x026C
  ULONG       cDirectDrawDisableLocks;  // 0x02C8 
  PVOID       TypeOneInfo;              // 0x02CC 
  PVOID       pvGammaRamp;              // 0x02D0
  PVOID       RemoteTypeOne;            // 0x02D4
  ULONG       ulHorzRes;                // 0x02D8 slz if PDEV_META_DEVICE
  ULONG       ulVertRes;                // 0x02DC get it from here.
  PFN         pfnDrvSetPointerShape;    // 2C0 2E0
  PFN         pfnDrvMovePointer;        // 2C4 2E4
  PFN         pfnMovePointer;           // 2C8 2E8 
  PFN         pfnDrvSynchronize;        // 2CC 2EC (gdikdx: pfnSync)
  PFN         pfnDrvSynchronizeSurface; //     2F0
  PFN         pfnDrvSetPalette;         //     2F4 
  PFN         pfnDrvNotify;             //     2F8
  ULONG       TagSig;                   //     2FC = 'Pdev'
  PLDEVOBJ    pldev;                    // 2E0 300
  DHPDEV      dhpdev;                   // 2E4 304
  PPALETTE    ppalSurf;                 // 2E8 308 -> Gla8
  DEVINFO     devinfo;                  // 2EC 30C
  GDIINFO     gdiinfo;                  // 418 438 
  PSURFACE    pSurface;                 // 548 568
  HANDLE      hSpooler;                 // 54C 0x056C 
  PVOID       pDesktopId;               // 550 0x0570  
  unknown     eDirectDrawGlobal;        // 558         W2k only
  PGRAPHICS_DEVICE pGraphicsDevice;     //     574
  POINTL      ptlOrigion;               //     578 
  PDEVMODEW   pdmwDev;                  //     580
  DWORD       Unknown3;                 // 0x0584 
  FLONG       DxDd_Flags;               // 0x0588 
  LONG        devAttr;                  // 0x058C
  PVOID       WatchDogContext;          //     590
  PVOID       WatchDogs;                //     594
  PFN         apfn[INDEX_LAST];         // B8C 598
} PDEVOBJ, *PPDEVOBJ; // Xp size 0x70C or 1804

// PDEV and EDDX extra data container.
typedef struct _PDEVEDD
{
   PDEVOBJ               pdevobj;
   EDD_DIRECTDRAW_GLOBAL EDDgpl;
} PDEVEDD, *PPDEVEDD;

Members

baseobj

Structure used by the handle manager. Unused for a PDEVOBJ.

ppdevNext

Pointer to the next PDEV in the list.

cPdevRefs

Number of references to this PDEV.

cPdevOpenRefs

ppdevParent

Pointer to the parent's PDEVOBJ. Points to this PDEV if no parent.

flags

Flags. Can be a combination of the following values.
#define PDEV_DISPLAY             0x00001
#define PDEV_HARDWARE_POINTER    0x00002
#define PDEV_SOFTWARE_POINTER    0x00004
#define PDEV_GOTFONTS            0x00040
#define PDEV_PRINTER             0x00080
#define PDEV_ALLOCATEDBRUSHES    0x00100
#define PDEV_HTPAL_IS_DEVPAL     0x00200
#define PDEV_DISABLED            0x00400
#define PDEV_SYNCHRONIZE_ENABLED 0x00800
#define PDEV_FONTDRIVER          0x02000
#define PDEV_GAMMARAMP_TABLE     0x04000
#define PDEV_UMPD                0x08000
#define PDEV_SHARED_DEVLOCK      0x10000
#define PDEV_META_DEVICE         0x20000
#define PDEV_DRIVER_PUNTED_CALL  0x40000
#define PDEV_CLONE_DEVICE        0x80000

flAccelerated

hsemDevLock

DEVOBJ lock, == HSEMAPHORE == PERESOURCE

hsemPointer

ptlPointer

Current position of the mouse pointer, if any.

szlPointer

Current dimensions of the pointer shape.

SpriteState

hlfntDefault

Handle to the devices default logical font.

hlfntAnsiVariable

hlfntAnsiFixed

ahsurf

Array of handles for the standard fill patterns. See phsurfPatterns in DrvEnablePDEV documentation.

pusPrtDataFileName

pDevHTInfo

prfntActive

prfntInactive

cInactive

ajbo

EBRUSHOBJ, was 0xFFFFFFFF on XP

cDirectDrawDisableLocks

TypeOneInfo

pvGammaRamp

Gamma Ramp pointer.

RemoteTypeOne

REMOTETYPEONENODE *

ulHorzRes

slz if PDEV_META_DEVICE

ulVertRes

get it from here.

pfnDrvSetPointerShape

XP: win32k!WatchdogDrvSetPointerShape

pfnDrvMovePointer

XP: win32k!WatchdogDrvMovePointer

pfnMovePointer

pfnDrvSynchronize

pfnDrvSynchronizeSurface (SURFACE *,RECTL *, FLONG)

pfnDrvSetPalette

pfnDrvNotify

vNotify (ULONG, PVOID)

TagSig

Tag Sign! 'Pdev'

pldev

Pointer to the corresponding LDEVOBJ.

dhpdev

Driver defined handle to the device.

ppalSurf

devinfo

gdiinfo

pSurface

(CONTAINING_RECORD +10h = SURFOBJ), the pointer will start at SURFOBJ of the SURFACE structure.

hSpooler

pDesktopId

pGraphicsDevice

PGRAPHICS_DEVICE see DISPLAY_DEVICE

ptlOrigion

pdmwDev

Pointer to a single DEVMODEW structure, describing the current display settings. The size of the allocation is

DEVMODEW.dmSize + dmDriverExtra. Allocated with Tag GDITAG_DEVMODE ('Gdev').

DxDd_Flags

devAttr

EngQueryDeviceAttribute, ENG_DEVICE_ATTRIBUTE

WatchDogContext

WatchDogs

apfn

Driver Function pointer table. See winddi.h. Is filled in by GDI according to the DRVFN return from the driver.

eDirectDrawGlobal

Windows 2000 only. Unknown pointer to or structure to EDD_DIRECTDRAW_GLOBAL.

Remarks

  • The pool tag for the structure is 'GDev'

References