ReactOS  0.4.14-dev-52-g6116262
text.h
Go to the documentation of this file.
1 #pragma once
2 
3 #define TAG_FINF 'FNIF'
4 //
5 // EXSTROBJ flags.
6 //
7 #define TO_MEM_ALLOCATED 0x0001
8 #define TO_ALL_PTRS_VALID 0x0002
9 #define TO_VALID 0x0004
10 #define TO_ESC_NOT_ORIENT 0x0008
11 #define TO_PWSZ_ALLOCATED 0x0010
12 #define TSIM_UNDERLINE1 0x0020
13 #define TSIM_UNDERLINE2 0x0040
14 #define TSIM_STRIKEOUT 0x0080
15 #define TO_HIGHRESTEXT 0x0100
16 #define TO_BITMAPS 0x0200
17 #define TO_PARTITION_INIT 0x0400
18 #define TO_ALLOC_FACENAME 0x0800
19 #define TO_SYS_PARTITION 0x1000
20 //
21 // Extended STROBJ
22 //
23 typedef struct _STRGDI
24 {
25  STROBJ StrObj; // Text string object header.
29  PVOID prfo; // PRFONT -> PFONTGDI
54 } STRGDI, *PSTRGDI;
55 
56 #define TEXTOBJECT_INIT 0x00010000
57 
58 /* GDI logical font object */
59 typedef struct _LFONT
60 {
61  /* Header for all gdi objects in the handle table.
62  Do not (re)move this. */
69 // Fixed:
73 
74 /* Internal interface */
75 
76 #define LFONT_AllocFontWithHandle() ((PLFONT)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_FONT, sizeof(TEXTOBJ)))
77 #define LFONT_ShareLockFont(hfont) (PLFONT)GDIOBJ_ReferenceObjectByHandle(hfont, GDIObjType_LFONT_TYPE)
78 #define LFONT_ShareUnlockFont(plfnt) GDIOBJ_vDereferenceObject((POBJ)plfnt)
79 #define LFONT_UnlockFont(plfnt) GDIOBJ_vUnlockObject((POBJ)plfnt)
80 
84 {
86  if (plfnt != 0)
87  {
90  }
91  return plfnt;
92 }
93 
95 VOID
97 {
100  LFONT_ShareUnlockFont(plfnt);
101 }
102 
103 /* dwFlags for IntGdiAddFontResourceEx */
104 #define AFRX_WRITE_REGISTRY 0x1
105 #define AFRX_ALTERNATIVE_PATH 0x2
106 #define AFRX_DOS_DEVICE_PATH 0x4
107 
122  DWORD dwFlags);
143 BOOL FASTCALL GreTextOutW(HDC,int,int,LPCWSTR,int);
146 
147 #define IntLockProcessPrivateFonts(W32Process) \
148  ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&W32Process->PrivateFontListLock)
149 
150 #define IntUnLockProcessPrivateFonts(W32Process) \
151  ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&W32Process->PrivateFontListLock)
FORCEINLINE VOID ExAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: ex.h:1022
POINTFIX ptfxRef
Definition: text.h:31
#define IN
Definition: typedefs.h:38
BYTE FASTCALL IntCharSetFromCodePage(UINT uCodePage)
Definition: freetype.c:172
FIX fxExtent
Definition: text.h:35
#define LF_FACESIZE
Definition: dimm.idl:39
BOOL FASTCALL ftGdiGetTextMetricsW(HDC, PTMW_INTERNAL)
Definition: freetype.c:4704
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
Definition: text.h:23
BOOL FASTCALL IntLoadFontsInRegistry(VOID)
Definition: freetype.c:1811
STROBJ StrObj
Definition: text.h:25
FORCEINLINE VOID TEXTOBJ_UnlockText(PLFONT plfnt)
Definition: text.h:96
#define LFONT_ShareUnlockFont(plfnt)
Definition: text.h:78
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
ULONG acFaceNameGlyphs[8]
Definition: text.h:53
FORCEINLINE PTEXTOBJ TEXTOBJ_LockText(HFONT hfont)
Definition: text.h:83
static HDC
Definition: imagelist.c:92
HANDLE FASTCALL IntGdiAddFontMemResource(PVOID Buffer, DWORD dwSize, PDWORD pNumAdded)
Definition: freetype.c:1965
DWORD FASTCALL ftGetFontUnicodeRanges(PFONTGDI, PGLYPHSET)
Definition: freetype.c:4636
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
Definition: wingdi.h:2467
uint16_t * PWCHAR
Definition: typedefs.h:54
VOID FASTCALL IntGdiCleanupPrivateFontsForProcess(VOID)
Definition: freetype.c:2087
VOID FASTCALL IntEnableFontRendering(BOOL Enable)
Definition: freetype.c:2139
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
struct _STRGDI STRGDI
INT cExtraRects
Definition: text.h:39
POINTFIX ptfxUpdate
Definition: text.h:32
VOID FASTCALL IntLoadSystemFonts(VOID)
Definition: freetype.c:943
BOOL FASTCALL TextIntUpdateSize(PDC, PTEXTOBJ, PFONTGDI, BOOL)
Definition: freetype.c:3770
FLONG flTO
Definition: text.h:26
BOOL FASTCALL GreGetTextExtentExW(HDC, LPCWSTR, ULONG, ULONG, PULONG, PULONG, LPSIZE, FLONG)
Definition: text.c:93
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
INT FASTCALL IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
Definition: freetype.c:1795
BOOL WINAPI GreGetTextMetricsW(_In_ HDC hdc, _Out_ LPTEXTMETRICW lptm)
Definition: text.c:151
Definition: text.h:59
unsigned int BOOL
Definition: ntddk_ex.h:94
RECTL arclExtra[3]
Definition: text.h:40
DWORD dwOffsetEndArray
Definition: text.h:68
FLONG fl
Definition: text.h:65
BOOL FASTCALL TextIntGetTextExtentPoint(PDC, PTEXTOBJ, LPCWSTR, INT, ULONG, LPINT, LPINT, LPSIZE, FLONG)
Definition: freetype.c:4383
struct _LFONT TEXTOBJ
FORCEINLINE VOID ExReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: ex.h:1238
PVOID pacFaceNameGlyphs
Definition: text.h:52
BOOL FASTCALL InitFontSupport(VOID)
Definition: freetype.c:660
HFONT FASTCALL GreCreateFontIndirectW(LOGFONTW *)
Definition: font.c:23
ULONG FASTCALL FontGetObject(PTEXTOBJ TextObj, ULONG Count, PVOID Buffer)
Definition: font.c:293
#define FORCEINLINE
Definition: ntbasedef.h:221
#define _Out_
Definition: no_sal2.h:323
DWORD LFTYPE
Definition: ntgdityp.h:188
Definition: bufpool.h:45
BOOL FASTCALL IntGdiRemoveFontMemResource(HANDLE hMMFont)
Definition: freetype.c:2053
unsigned long FLONG
Definition: ntbasedef.h:373
static HFONT hfont
PGLYPHPOS pgpos
Definition: text.h:30
PLONG plNext
Definition: text.h:44
NTSTATUS FASTCALL TextIntRealizeFont(HFONT, PTEXTOBJ)
Definition: freetype.c:5342
BASEOBJECT BaseObject
Definition: text.h:63
BOOL FASTCALL IntIsFontRenderingEnabled(VOID)
Definition: freetype.c:2133
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
Definition: freetype.c:2167
Definition: polytest.cpp:40
INT FASTCALL ftGdiGetTextCharsetInfo(PDC, PFONTSIGNATURE, DWORD)
Definition: freetype.c:4523
RECTL rclBackGroundSave
Definition: text.h:41
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD FASTCALL IntGetFontLanguageInfo(PDC)
Definition: font.c:371
INT cgposCopied
Definition: text.h:27
BOOL NTAPI GreExtTextOutW(IN HDC, IN INT, IN INT, IN UINT, IN OPTIONAL RECTL *, IN LPCWSTR, IN INT, IN OPTIONAL LPINT, IN DWORD)
#define WINAPI
Definition: msvc.h:8
PVOID prfo
Definition: text.h:29
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG FASTCALL ftGdiGetGlyphOutline(PDC, WCHAR, UINT, LPGLYPHMETRICS, ULONG, PVOID, LPMAT2, BOOL)
Definition: freetype.c:3908
PGLYPHPOS pgpNext
Definition: text.h:45
POINTL ptlBaseLineAdjust
Definition: text.h:47
LONG FIX
Definition: winddi.h:126
struct _LFONT * PTEXTOBJ
BOOL FASTCALL IntGdiGetFontResourceInfo(PUNICODE_STRING, PVOID, DWORD *, DWORD)
Definition: freetype.c:5541
HDC hdc
Definition: main.c:9
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
RECTFX rcfx
Definition: text.h:34
INT FASTCALL IntGetOutlineTextMetrics(PFONTGDI, UINT, OUTLINETEXTMETRICW *)
Definition: freetype.c:2604
#define KeEnterCriticalRegion()
Definition: ke_x.h:83
unsigned char BYTE
Definition: mem.h:68
INT cTTSysGlyphs
Definition: text.h:48
DWORD FASTCALL IntGetCharDimensions(HDC, PTEXTMETRICW, PDWORD)
Definition: font.c:329
struct _LFONT LFONT
ENUMLOGFONTEXDVW logfont
Definition: text.h:70
BOOL FASTCALL GreGetTextExtentW(HDC, LPCWSTR, INT, LPSIZE, UINT)
Definition: text.c:36
POINTFIX ptfxEscapement
Definition: text.h:33
#define _In_
Definition: no_sal2.h:204
DWORD FASTCALL ftGdiGetFontData(PFONTGDI, DWORD, DWORD, PVOID, DWORD)
Definition: freetype.c:4800
FONTOBJ * Font
Definition: text.h:66
INT cgposPositionsEnumerated
Definition: text.h:28
INT cNumFaceNameGlyphs
Definition: text.h:51
#define KeLeaveCriticalRegion()
Definition: ke_x.h:114
FIX fxBreakExtra
Definition: text.h:37
DWORD dwCodePage
Definition: text.h:38
LFTYPE lft
Definition: text.h:64
EX_PUSH_LOCK lock
Definition: text.h:71
WCHAR TextFace[LF_FACESIZE]
Definition: text.h:67
unsigned int * PULONG
Definition: retypes.h:1
unsigned int UINT
Definition: ndis.h:50
INT FASTCALL IntGdiAddFontResourceEx(PUNICODE_STRING FileName, DWORD Characteristics, DWORD dwFlags)
Definition: freetype.c:1596
struct _STRGDI * PSTRGDI
#define LFONT_ShareLockFont(hfont)
Definition: text.h:77
DWORD * PDWORD
Definition: pedump.c:68
struct _LFONT * PLFONT
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT cSysGlyphs
Definition: text.h:49
PLONG plCurrentFont
Definition: text.h:46
unsigned int ULONG
Definition: retypes.h:1
PTEXTOBJ FASTCALL RealizeFontInit(HFONT)
Definition: font.c:422
PWCHAR pwcPartition
Definition: text.h:42
PLONG plPartition
Definition: text.h:43
FIX fxExtra
Definition: text.h:36
signed int * PLONG
Definition: retypes.h:5
BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI, PREALIZATION_INFO)
Definition: freetype.c:5809
#define CONST
Definition: pedump.c:81
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
static LPTEXTMETRICW lptm
Definition: font.c:42
INT cDefGlyphs
Definition: text.h:50
int * LPINT
Definition: windef.h:178
DWORD FASTCALL ftGdiGetKerningPairs(PFONTGDI, DWORD, LPKERNINGPAIR)
Definition: freetype.c:5828
BOOL FASTCALL GreTextOutW(HDC, int, int, LPCWSTR, int)
Definition: text.c:19
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS)
Definition: freetype.c:3279