Author: tkreuzer
Date: Wed Aug 3 19:50:56 2011
New Revision: 53054
URL:
http://svn.reactos.org/svn/reactos?rev=53054&view=rev
Log:
[GDI FONT DRIVER]
forgot these files
Modified:
branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/font.h
branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/text.h
branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32.h
branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32kp.h
Modified: branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/font.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/subsyst…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/font.h [iso-8859-1]
(original)
+++ branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/font.h [iso-8859-1]
Wed Aug 3 19:50:56 2011
@@ -1,3 +1,4 @@
+#pragma once
#define LFONT_GetObject FontGetObject
@@ -74,9 +75,11 @@
typedef struct _PFF
{
ULONG sizeofThis;
- LIST_ENTRY leLink;
+ struct _PFF *pPFFNext;
+ struct _PFF *pPFFPrev;
PWSTR pwszPathname;
ULONG cwc;
+ ULONG iFileNameHash;
ULONG cFiles;
FLONG flState;
ULONG cLoaded;
@@ -96,6 +99,56 @@
PFONTFILEVIEW apffv[FD_MAX_FILES];
PFE apfe[1];
} PFF, *PPFF;
+
+typedef struct _HASHBUCKET
+{
+ struct _HASHBUCKET *pbktCollision;
+ // PFELINK *ppfelEnumHead;
+ // PFELINK *ppfelEnumTail;
+ ULONG cTrueType;
+ FLONG fl;
+ struct _HASHBUCKET * pbktPrev;
+ struct _HASHBUCKET * pbktNext;
+ ULONG ulTime;
+ union
+ {
+ WCHAR wcCapName[1];
+ UNIVERSAL_FONT_ID ufi;
+ } u;
+} HASHBUCKET, *PHASHBUCKET;
+
+typedef enum _FONT_HASH_TYPE
+{
+ FHT_FAMILY = 1,
+ FHT_FACE,
+ FHT_UFI,
+} FONT_HASH_TYPE;
+
+typedef struct
+{
+ DWORD id;
+ FONT_HASH_TYPE fht;
+ ULONG cBuckets;
+ ULONG cUsed;
+ ULONG cCollisions;
+ HASHBUCKET * pbktFirst;
+ HASHBUCKET * pbktLast;
+ HASHBUCKET * apbkt[];
+} FONTHASH, *PFONTHASH;
+
+#define MAX_FONT_LIST 100
+typedef struct _PFT
+{
+ PFONTHASH pfhFamily;
+ PFONTHASH pfhFace;
+ PFONTHASH pfhUFI;
+ ULONG cBuckets;
+ ULONG cFiles;
+ PPFF apPFF[MAX_FONT_LIST];
+
+ /* ROS specific */
+ HSEMAPHORE hsem;
+} PFT, *PPFT;
typedef struct
{
@@ -222,6 +275,56 @@
ENUMLOGFONTEXDVW elfexw;
} LFONT, *PLFONT;
+enum _ESTROBJ_FLAGS
+{
+ TO_MEM_ALLOCATED = 0x0001,
+ TO_ALL_PTRS_VALID = 0x0002,
+ TO_VALID = 0x0004,
+ TO_ESC_NOT_ORIENT = 0x0008,
+ TO_PWSZ_ALLOCATED = 0x0010,
+ TSIM_UNDERLINE1 = 0x0020,
+ TSIM_UNDERLINE2 = 0x0040,
+ TSIM_STRIKEOUT = 0x0080,
+ TO_HIGHRESTEXT = 0x0100,
+ TO_BITMAPS = 0x0200,
+ TO_PARTITION_INIT = 0x0400,
+ TO_ALLOC_FACENAME = 0x0800,
+ TO_SYS_PARTITION = 0x1000,
+};
+
+typedef struct _ESTROBJ
+{
+ STROBJ stro; // Text string object header.
+ ULONG cgposCopied;
+ ULONG cgposPositionsEnumerated;
+ PRFONT prfnt;
+ FLONG flTO;
+ PGLYPHPOS pgpos;
+ POINTFIX ptfxRef;
+ POINTFIX ptfxUpdate;
+ POINTFIX ptfxEscapement;
+ RECTFX rcfx;
+ FIX fxExtent;
+ FIX fxExtra;
+ FIX fxBreakExtra;
+ DWORD dwCodePage;
+ ULONG cExtraRects;
+ RECTL arclExtra[3];
+ RECTL rclBackGroundSave;
+ PWCHAR pwcPartition;
+ PLONG plPartition;
+ PLONG plNext;
+ PGLYPHPOS pgpNext;
+ PLONG plCurrentFont;
+ POINTL ptlBaseLineAdjust;
+ INT cTTSysGlyphs;
+ INT cSysGlyphs;
+ INT cDefGlyphs;
+ INT cNumFaceNameGlyphs;
+ PVOID pacFaceNameGlyphs;
+ ULONG acFaceNameGlyphs[8];
+} ESTROBJ, *PESTROBJ;
+
FORCEINLINE
PLFONT
LFONT_ShareLockFont(HFONT hfont)
@@ -236,6 +339,17 @@
GDIOBJ_vDereferenceObject(&plfnt->baseobj);
}
+BOOL
+NTAPI
+PFT_bInit(
+ PFT *ppft);
+
+VOID
+NTAPI
+ESTROBJ_vInit(
+ IN ESTROBJ *pestro,
+ IN PWSTR pwsz,
+ IN ULONG cwc);
HFONT
NTAPI
@@ -253,17 +367,34 @@
PPFF
NTAPI
EngLoadFontFileFD(
- ULONG cFiles,
- PFONTFILEVIEW *ppffv,
+ IN WCHAR *pwszFiles,
+ IN ULONG cwc,
+ IN ULONG cFiles,
DESIGNVECTOR *pdv,
ULONG ulCheckSum);
INT
NTAPI
-GreAddFontResourceInternal(
- IN PWCHAR apwszFiles[],
+GreAddFontResourceW(
+ IN WCHAR *pwszFiles,
+ IN ULONG cwc,
IN ULONG cFiles,
IN FLONG fl,
IN DWORD dwPidTid,
IN OPTIONAL DESIGNVECTOR *pdv);
+BOOL
+NTAPI
+GreExtTextOutW(
+ IN HDC hDC,
+ IN INT XStart,
+ IN INT YStart,
+ IN UINT fuOptions,
+ IN OPTIONAL PRECTL lprc,
+ IN LPWSTR String,
+ IN INT Count,
+ IN OPTIONAL LPINT Dx,
+ IN DWORD dwCodePage);
+
+
+#define DbgDefaultChannel 0x0
Modified: branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/text.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/subsyst…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/text.h [iso-8859-1]
(original)
+++ branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/text.h [iso-8859-1]
Wed Aug 3 19:50:56 2011
@@ -1,116 +1,26 @@
#pragma once
#include <include/engobjects.h>
-
-#define TAG_FINF 'FNIF'
-//
-// EXSTROBJ flags.
-//
-#define TO_MEM_ALLOCATED 0x0001
-#define TO_ALL_PTRS_VALID 0x0002
-#define TO_VALID 0x0004
-#define TO_ESC_NOT_ORIENT 0x0008
-#define TO_PWSZ_ALLOCATED 0x0010
-#define TSIM_UNDERLINE1 0x0020
-#define TSIM_UNDERLINE2 0x0040
-#define TSIM_STRIKEOUT 0x0080
-#define TO_HIGHRESTEXT 0x0100
-#define TO_BITMAPS 0x0200
-#define TO_PARTITION_INIT 0x0400
-#define TO_ALLOC_FACENAME 0x0800
-#define TO_SYS_PARTITION 0x1000
-//
-// Extended STROBJ
-//
-typedef struct _STRGDI
-{
- STROBJ StrObj; // Text string object header.
- FLONG flTO;
- INT cgposCopied;
- INT cgposPositionsEnumerated;
- PVOID prfo; // PRFONT -> PFONTGDI
- PGLYPHPOS pgpos;
- POINTFIX ptfxRef;
- POINTFIX ptfxUpdate;
- POINTFIX ptfxEscapement;
- RECTFX rcfx;
- FIX fxExtent;
- FIX fxExtra;
- FIX fxBreakExtra;
- DWORD dwCodePage;
- INT cExtraRects;
- RECTL arclExtra[3];
- RECTL rclBackGroundSave;
- PWCHAR pwcPartition;
- PLONG plPartition;
- PLONG plNext;
- PGLYPHPOS pgpNext;
- PLONG plCurrentFont;
- POINTL ptlBaseLineAdjust;
- INT cTTSysGlyphs;
- INT cSysGlyphs;
- INT cDefGlyphs;
- INT cNumFaceNameGlyphs;
- PVOID pacFaceNameGlyphs;
- ULONG acFaceNameGlyphs[8];
-} STRGDI, *PSTRGDI;
-
-#define TEXTOBJECT_INIT 0x00010000
/* GDI logical font object */
typedef struct _LFONT TEXTOBJ, *PTEXTOBJ;
/* Internal interface */
-#define TEXTOBJ_AllocText() ((PTEXTOBJ) GDIOBJ_AllocObj(GDIObjType_LFONT_TYPE))
-#define TEXTOBJ_AllocTextWithHandle() ((PTEXTOBJ)
GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_FONT, sizeof(TEXTOBJ)))
-#define TEXTOBJ_FreeText(pBMObj) GDIOBJ_FreeObj((POBJ) pBMObj,
GDILoObjType_LO_FONT_TYPE)
-#define TEXTOBJ_FreeTextByHandle(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj,
GDI_OBJECT_TYPE_FONT)
-#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObject((HGDIOBJ) hBMObj,
GDIObjType_LFONT_TYPE))
#define TEXTOBJ_UnlockText(pBMObj) GDIOBJ_vUnlockObject ((POBJ)pBMObj)
-
-PTEXTOBJ FASTCALL RealizeFontInit(HFONT);
-NTSTATUS FASTCALL TextIntRealizeFont(HFONT,PTEXTOBJ);
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);
BOOL FASTCALL InitFontSupport(VOID);
-BOOL FASTCALL IntIsFontRenderingEnabled(VOID);
-BOOL FASTCALL IntIsFontRenderingEnabled(VOID);
-VOID FASTCALL IntEnableFontRendering(BOOL Enable);
INT FASTCALL FontGetObject(PTEXTOBJ TextObj, INT Count, PVOID Buffer);
-VOID FASTCALL IntLoadSystemFonts(VOID);
-INT FASTCALL IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics);
-ULONG FASTCALL
ftGdiGetGlyphOutline(PDC,WCHAR,UINT,LPGLYPHMETRICS,ULONG,PVOID,LPMAT2,BOOL);
-INT FASTCALL IntGetOutlineTextMetrics(PFONTGDI,UINT,OUTLINETEXTMETRICW *);
-BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS);
-BOOL FASTCALL
TextIntGetTextExtentPoint(PDC,PTEXTOBJ,LPCWSTR,INT,ULONG,LPINT,LPINT,LPSIZE,FLONG);
-BOOL FASTCALL ftGdiGetTextMetricsW(HDC,PTMW_INTERNAL);
-DWORD FASTCALL IntGetFontLanguageInfo(PDC);
-INT FASTCALL ftGdiGetTextCharsetInfo(PDC,PFONTSIGNATURE,DWORD);
-DWORD FASTCALL ftGetFontUnicodeRanges(PFONTGDI, PGLYPHSET);
-DWORD FASTCALL ftGdiGetFontData(PFONTGDI,DWORD,DWORD,PVOID,DWORD);
-BOOL FASTCALL IntGdiGetFontResourceInfo(PUNICODE_STRING,PVOID,DWORD*,DWORD);
-BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI,PREALIZATION_INFO);
-DWORD FASTCALL ftGdiGetKerningPairs(PFONTGDI,DWORD,LPKERNINGPAIR);
-BOOL NTAPI GreExtTextOutW(IN HDC,IN INT,IN INT,IN UINT,IN OPTIONAL RECTL*,
- IN LPWSTR, IN INT, IN OPTIONAL LPINT, IN DWORD);
-DWORD FASTCALL IntGetCharDimensions(HDC, PTEXTMETRICW, PDWORD);
-BOOL FASTCALL GreGetTextExtentW(HDC,LPWSTR,INT,LPSIZE,UINT);
-BOOL FASTCALL GreGetTextExtentExW(HDC,LPWSTR,ULONG,ULONG,PULONG,PULONG,LPSIZE,FLONG);
-#define IntLockProcessPrivateFonts(W32Process) \
-
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&W32Process->PrivateFontListLock)
-
-#define IntUnLockProcessPrivateFonts(W32Process) \
-
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&W32Process->PrivateFontListLock)
-
-#define IntLockGlobalFonts \
- ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&FontListLock)
-
-#define IntUnLockGlobalFonts \
- ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&FontListLock)
-
-#define IntLockFreeType \
- ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&FreeTypeLock)
-
-#define IntUnLockFreeType \
- ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&FreeTypeLock)
+BOOL
+NTAPI
+GreExtTextOutW(
+ IN HDC,
+ IN INT,
+ IN INT,
+ IN UINT,
+ IN OPTIONAL RECTL*,
+ IN LPWSTR,
+ IN INT,
+ IN OPTIONAL LPINT,
+ IN DWORD);
Modified: branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/subsyst…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32.h [iso-8859-1]
(original)
+++ branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32.h [iso-8859-1]
Wed Aug 3 19:50:56 2011
@@ -192,7 +192,7 @@
struct _GDI_POOL *pPoolDcAttr;
struct _GDI_POOL *pPoolBrushAttr;
struct _GDI_POOL *pPoolRgnAttr;
-
+ struct _PFT *ppftPrivate;
#ifdef DBG
BYTE DbgChannelLevel[DbgChCount];
#endif
Modified: branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32kp.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/subsyst…
==============================================================================
--- branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32kp.h
[iso-8859-1] (original)
+++ branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/include/win32kp.h
[iso-8859-1] Wed Aug 3 19:50:56 2011
@@ -95,3 +95,4 @@
#include <include/mapping.h>
#include <dib/dib.h>
#include <include/gdidebug.h>
+//#include <include/font.h>