ReactOS  0.4.14-dev-297-g23e575c
enable.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS win32 subsystem
3  * LICENSE: GPL - See COPYING in the top level directory
4  * PURPOSE: GDI font driver for bitmap fonts
5  * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6  */
7 
8 #include "ftfd.h"
9 
10 static DRVFN gadrvfn[] =
11 {
24 };
25 
27 
28 
29 BOOL
32  ULONG iEngineVersion,
33  ULONG cj,
34  PDRVENABLEDATA pded)
35 {
36  FT_Error fterror;
37 
38  DbgPrint("FtfdEnableDriver()\n");
39 
40  /* Check parameter */
41  if (cj < sizeof(DRVENABLEDATA))
42  {
43  return FALSE;
44  }
45 
46  /* Initialize freetype library */
47  fterror = FT_Init_FreeType(&gftlibrary);
48  if (fterror)
49  {
50  DbgPrint("an error occurred during library initialization: %ld.\n", fterror);
51  return FALSE;
52  }
53 
54  /* Fill DRVENABLEDATA */
55  pded->c = sizeof(gadrvfn) / sizeof(DRVFN);
56  pded->pdrvfn = gadrvfn;
58 
59  /* Success */
60  return TRUE;
61 }
62 
63 
64 DHPDEV
67  IN DEVMODEW *pdm,
69  IN ULONG cPat,
70  OUT HSURF *phsurfPatterns,
71  IN ULONG cjCaps,
72  OUT ULONG *pdevcaps,
74  OUT DEVINFO *pdi,
75  IN HDEV hdev,
78 {
79  DbgPrint("FtfdEnablePDEV(hdev=%p)\n", hdev);
80  __debugbreak();
81 
82 
83  /* Return a dummy DHPDEV */
84  return (PVOID)1;
85 }
86 
87 
88 VOID
91  IN DHPDEV dhpdev,
92  IN HDEV hdev)
93 {
94  DbgPrint("FtfdCompletePDEV()\n");
95  /* Nothing to do */
96 }
97 
98 
99 VOID
100 APIENTRY
102  IN DHPDEV dhpdev)
103 {
104  DbgPrint("FtfdDisablePDEV()\n");
105  /* Nothing to do */
106 }
int FT_Error
Definition: fttypes.h:300
PVOID APIENTRY FtfdQueryFontTree(DHPDEV dhpdev, ULONG_PTR iFile, ULONG iFace, ULONG iMode, ULONG_PTR *pid)
Definition: font.c:355
#define IN
Definition: typedefs.h:38
#define TRUE
Definition: types.h:120
_In_ ULONG cj
Definition: winddi.h:3540
#define INDEX_DrvCompletePDEV
Definition: winddi.h:417
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
VOID APIENTRY FtfdDisablePDEV(IN DHPDEV dhpdev)
Definition: enable.c:101
static DRVFN gadrvfn[]
Definition: enable.c:10
#define INDEX_DrvQueryFontCaps
Definition: winddi.h:460
#define INDEX_DrvEnablePDEV
Definition: winddi.h:416
LONG APIENTRY FtfdQueryFontData(DHPDEV dhpdev, FONTOBJ *pfo, ULONG iMode, HGLYPH hg, OUT GLYPHDATA *pgd, PVOID pv, ULONG cjSize)
Definition: glyph.c:24
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Definition: winddi.h:3553
#define INDEX_DrvUnloadFontFile
Definition: winddi.h:462
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
#define INDEX_DrvLoadFontFile
Definition: winddi.h:461
FT_Init_FreeType(FT_Library *alibrary)
Definition: ftinit.c:320
#define INDEX_DrvQueryFontData
Definition: winddi.h:444
BOOL APIENTRY FtfdEnableDriver(ULONG iEngineVersion, ULONG cj, PDRVENABLEDATA pded)
Definition: enable.c:31
LONG APIENTRY FtfdQueryFontCaps(ULONG culCaps, ULONG *pulCaps)
Definition: font.c:333
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG APIENTRY FtfdQueryFontFile(ULONG_PTR iFile, ULONG ulMode, ULONG cjBuf, ULONG *pulBuf)
Definition: font.c:139
DHPDEV APIENTRY FtfdEnablePDEV(IN DEVMODEW *pdm, IN LPWSTR pwszLogAddress, IN ULONG cPat, OUT HSURF *phsurfPatterns, IN ULONG cjCaps, OUT ULONG *pdevcaps, IN ULONG cjDevInfo, OUT DEVINFO *pdi, IN HDEV hdev, IN LPWSTR pwszDeviceName, IN HANDLE hDriver)
Definition: enable.c:66
#define DDI_DRIVER_VERSION_NT5
Definition: winddi.h:537
#define INDEX_DrvQueryFontTree
Definition: winddi.h:443
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
FT_Library gftlibrary
Definition: enable.c:26
VOID APIENTRY FtfdCompletePDEV(IN DHPDEV dhpdev, IN HDEV hdev)
Definition: enable.c:90
#define INDEX_DrvQueryFont
Definition: winddi.h:442
DRVFN * pdrvfn
Definition: winddi.h:544
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
#define INDEX_DrvQueryFontFile
Definition: winddi.h:467
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3553
BOOLEAN(* PFN)(PARGS)
Definition: parse.h:47
#define INDEX_DrvQueryGlyphAttrs
Definition: winddi.h:502
_In_ LPWSTR _In_ ULONG cPat
Definition: winddi.h:3548
#define INDEX_DrvFree
Definition: winddi.h:458
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG cjDevInfo
Definition: winddi.h:3553
ULONG iDriverVersion
Definition: winddi.h:542
PFD_GLYPHATTR APIENTRY FtfdQueryGlyphAttrs(FONTOBJ *pfo, ULONG iMode)
Definition: glyph.c:15
BOOL APIENTRY FtfdUnloadFontFile(IN ULONG_PTR iFile)
Definition: font.c:110
#define INDEX_DrvDisablePDEV
Definition: winddi.h:418
_In_ LPWSTR _In_ ULONG _In_ ULONG cjCaps
Definition: winddi.h:3551
PIFIMETRICS APIENTRY FtfdQueryFont(IN DHPDEV dhpdev, IN ULONG_PTR iFile, IN ULONG iFace, IN ULONG_PTR *pid)
Definition: font.c:169
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Definition: winddi.h:529
ULONG DbgPrint(PCCH Format,...)
Definition: enable.c:589
_In_ HDEV hdev
Definition: winddi.h:3449
VOID APIENTRY FtfdFree(PVOID pv, ULONG_PTR id)
Definition: font.c:480
#define APIENTRY
Definition: api.h:79
ULONG_PTR APIENTRY FtfdLoadFontFile(ULONG cFiles, ULONG_PTR *piFile, PVOID *ppvView, ULONG *pcjView, DESIGNVECTOR *pdv, ULONG ulLangID, ULONG ulFastCheckSum)
Definition: font.c:29
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO * pdi
Definition: winddi.h:3553