From d7abb13de2e68351251a74f4106582f00bcc92f7 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 15 Dec 2007 07:03:51 +0000 Subject: [PATCH] Add new items to gdi handle table. Added cfont and user space share gdi handle table. svn path=/trunk/; revision=31228 --- reactos/include/reactos/win32k/ntgdihdl.h | 14 ++++++++++ reactos/include/reactos/win32k/ntgdityp.h | 27 +++++++++++++++++-- .../subsystems/win32/win32k/include/gdiobj.h | 7 +++-- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/reactos/include/reactos/win32k/ntgdihdl.h b/reactos/include/reactos/win32k/ntgdihdl.h index d82dac598d8..e6d1c739f38 100644 --- a/reactos/include/reactos/win32k/ntgdihdl.h +++ b/reactos/include/reactos/win32k/ntgdihdl.h @@ -21,6 +21,7 @@ /* GDI handle table can hold 0x10000 handles */ #define GDI_HANDLE_COUNT 0x10000 #define GDI_GLOBAL_PROCESS (0x0) +#define GDI_CFONT_MAX 16 /* Handle Masks and shifts */ #define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1) @@ -213,6 +214,19 @@ typedef struct _GDI_TABLE_ENTRY PVOID UserData; /* Points to the user mode structure, usually NULL though */ } GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY; +// +// User space only structure! +// +typedef struct __GDI_SHARED_HANDLE_TABLE // Must match win32k/include/gdiobj.h +{ + GDI_TABLE_ENTRY Entries[GDI_HANDLE_COUNT]; // Handle table. + DEVCAPS DevCaps; // Shared device capabilities. + FLONG flDeviceUniq; // Device settings uniqueness. + PVOID pvLangPack; // Lanuage Pack. + CFONT cfPublic[GDI_CFONT_MAX]; // Public Fonts. + DWORD dwCsbSupported1; // OEM code-page bitfield. +} GDI_SHARED_HANDLE_TABLE, *PGDI_SHARED_HANDLE_TABLE; + typedef struct _RGNATTR { ULONG AttrFlags; diff --git a/reactos/include/reactos/win32k/ntgdityp.h b/reactos/include/reactos/win32k/ntgdityp.h index c8a4460b129..cabcbc9637a 100644 --- a/reactos/include/reactos/win32k/ntgdityp.h +++ b/reactos/include/reactos/win32k/ntgdityp.h @@ -128,8 +128,11 @@ typedef CHWIDTHINFO *PCHWIDTHINFO; typedef D3DNTHAL_CONTEXTCREATEDATA D3DNTHAL_CONTEXTCREATEI; typedef LONG FIX; -/* FIXME: Unknown; easy to guess, usually based on public types and converted */ -typedef struct _REALIZATION_INFO REALIZATION_INFO, *PREALIZATION_INFO; +typedef struct _REALIZATION_INFO // Based on LOCALESIGNATURE +{ + DWORD dwCsbDefault[2]; + DWORD dwCsbSupported0; +} REALIZATION_INFO, *PREALIZATION_INFO; typedef struct _WIDTHDATA { @@ -241,6 +244,26 @@ typedef union ULONG l; } gxf_long; +typedef struct _CFONT +{ + struct _CFONT *pcfNext; + HFONT hf; + ULONG cRef; // Count of all pointers to this CFONT. + FLONG fl; + LONG lHeight; // Precomputed logical height. + HDC hdc; // HDC of realization. 0 for display. + EFLOAT_S efM11; // efM11 of WtoD of DC of realization + EFLOAT_S efM22; // efM22 of WtoD of DC of realization + EFLOAT_S efDtoWBaseline; // Precomputed back transform. (FXtoL) + EFLOAT_S efDtoWAscent; // Precomputed back transform. (FXtoL) + WIDTHDATA wd; + FLONG flInfo; + USHORT sWidth[256]; // Widths in pels. + ULONG ulAveWidth; // bogus average used by USER + TMW_INTERNAL tmw; // cached metrics + LOCALESIGNATURE lsLocSig; // font signature information +} CFONT, *PCFONT; + // // GDI Batch structures. // diff --git a/reactos/subsystems/win32/win32k/include/gdiobj.h b/reactos/subsystems/win32/win32k/include/gdiobj.h index e9b08c71d51..5f8a8199aa2 100644 --- a/reactos/subsystems/win32/win32k/include/gdiobj.h +++ b/reactos/subsystems/win32/win32k/include/gdiobj.h @@ -16,8 +16,11 @@ typedef struct _GDI_HANDLE_TABLE */ ////////////////////////////////////////////////////////////////////////////// GDI_TABLE_ENTRY Entries[GDI_HANDLE_COUNT]; - DEVCAPS DevCaps; // Device Capabilities - // Font data + DEVCAPS DevCaps; // Device Capabilities + FLONG flDeviceUniq; // Device settings uniqueness. + PVOID pvLangPack; // Lanuage Pack. + CFONT cfPublic[GDI_CFONT_MAX]; // Public Fonts. + DWORD dwCsbSupported1; // OEM code-page bitfield. ////////////////////////////////////////////////////////////////////////////// PPAGED_LOOKASIDE_LIST LookasideLists;