Sync with trunk r63935.
[reactos.git] / win32ss / drivers / font / bmfd / enable.c
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 "bmfd.h"
9
10 static DRVFN gadrvfn[] =
11 {
12 {INDEX_DrvEnablePDEV, (PFN)BmfdEnablePDEV},
13 {INDEX_DrvCompletePDEV, (PFN)BmfdCompletePDEV},
14 {INDEX_DrvDisablePDEV, (PFN)BmfdDisablePDEV},
15 {INDEX_DrvLoadFontFile, (PFN)BmfdLoadFontFile},
16 {INDEX_DrvUnloadFontFile, (PFN)BmfdUnloadFontFile},
17 {INDEX_DrvQueryFontFile, (PFN)BmfdQueryFontFile},
18 {INDEX_DrvQueryFontCaps, (PFN)BmfdQueryFontCaps},
19 {INDEX_DrvQueryFontTree, (PFN)BmfdQueryFontTree},
20 {INDEX_DrvQueryFont, (PFN)BmfdQueryFont},
21 {INDEX_DrvFree, (PFN)BmfdFree},
22 {INDEX_DrvQueryGlyphAttrs, (PFN)BmfdQueryGlyphAttrs},
23 {INDEX_DrvQueryFontData, (PFN)BmfdQueryFontData},
24 {INDEX_DrvDestroyFont, (PFN)BmfdDestroyFont},
25 };
26
27
28 ULONG
29 DbgPrint(IN PCHAR Format, IN ...)
30 {
31 va_list args;
32
33 va_start(args, Format);
34 EngDebugPrint("Bmfd: ", Format, args);
35 va_end(args);
36 return 0;
37 }
38
39
40 BOOL
41 APIENTRY
42 BmfdEnableDriver(
43 ULONG iEngineVersion,
44 ULONG cj,
45 PDRVENABLEDATA pded)
46 {
47 DbgPrint("BmfdEnableDriver()\n");
48
49 /* Check parameter */
50 if (cj < sizeof(DRVENABLEDATA))
51 {
52 return FALSE;
53 }
54
55 /* Fill DRVENABLEDATA */
56 pded->c = sizeof(gadrvfn) / sizeof(DRVFN);
57 pded->pdrvfn = gadrvfn;
58 pded->iDriverVersion = DDI_DRIVER_VERSION_NT5;
59
60 /* Success */
61 return TRUE;
62 }
63
64
65 DHPDEV
66 APIENTRY
67 BmfdEnablePDEV(
68 IN DEVMODEW *pdm,
69 IN LPWSTR pwszLogAddress,
70 IN ULONG cPat,
71 OUT HSURF *phsurfPatterns,
72 IN ULONG cjCaps,
73 OUT ULONG *pdevcaps,
74 IN ULONG cjDevInfo,
75 OUT DEVINFO *pdi,
76 IN HDEV hdev,
77 IN LPWSTR pwszDeviceName,
78 IN HANDLE hDriver)
79 {
80 DbgPrint("BmfdEnablePDEV(hdev=%p)\n", hdev);
81
82 /* Return a dummy DHPDEV */
83 return (PVOID)1;
84 }
85
86
87 VOID
88 APIENTRY
89 BmfdCompletePDEV(
90 IN DHPDEV dhpdev,
91 IN HDEV hdev)
92 {
93 DbgPrint("BmfdCompletePDEV()\n");
94 /* Nothing to do */
95 }
96
97
98 VOID
99 APIENTRY
100 BmfdDisablePDEV(
101 IN DHPDEV dhpdev)
102 {
103 DbgPrint("BmfdDisablePDEV()\n");
104 /* Nothing to do */
105 }