ReactOS  0.4.15-dev-2703-g05fb0f1
t2embapi.h
Go to the documentation of this file.
1 #ifndef __T2EMBED_API_H
2 #define __T2EMBED_API_H
3 
4 #ifndef CHARSET_UNICODE
5 #define CHARSET_UNICODE 1
6 #define CHARSET_DEFAULT 1
7 #define CHARSET_SYMBOL 2
8 #define CHARSET_GLYPHIDX 3
9 #endif
10 
11 #ifndef EMBED_PREVIEWPRINT
12 #define EMBED_PREVIEWPRINT 1
13 #define EMBED_EDITABLE 2
14 #define EMBED_INSTALLABLE 3
15 #define EMBED_NOEMBEDDING 4
16 #endif
17 
18 #ifndef LICENSE_INSTALLABLE
19 #define LICENSE_INSTALLABLE 0x0
20 #define LICENSE_DEFAULT 0x0
21 #define LICENSE_NOEMBEDDING 0x2
22 #define LICENSE_PREVIEWPRINT 0x4
23 #define LICENSE_EDITABLE 0x8
24 #endif
25 
26 #ifndef TTEMBED_RAW
27 #define TTEMBED_RAW 0x0
28 #define TTEMBED_SUBSET 0x1
29 #define TTEMBED_TTCOMPRESSED 0x4
30 #define TTEMBED_FAILIFVARIATIONSIMULATED 0x10
31 #define TTEMBED_EMBEDEUDC 0x20
32 #define TTEMBED_VALIDATIONTESTS 0x40
33 #define TTEMBED_WEBOBJECT 0x80
34 #define TTEMBED_ENCRYPTDATA 0x10000000
35 #endif
36 
37 #ifndef E_NONE
38 #define E_NONE 0x0
39 #endif
40 
41 #define E_API_NOTIMPL 0x0001L
42 
43 #ifndef E_CHARCODECOUNTINVALID
44 #define E_CHARCODECOUNTINVALID 0x2
45 #define E_CHARCODESETINVALID 0x3
46 #define E_DEVICETRUETYPEFONT 0x4
47 #define E_HDCINVALID 0x6
48 #define E_NOFREEMEMORY 0x7
49 #define E_FONTREFERENCEINVALID 0x8
50 #define E_NOTATRUETYPEFONT 0xA
51 #define E_ERRORACCESSINGFONTDATA 0xC
52 #define E_ERRORACCESSINGFACENAME 0xD
53 #define E_ERRORUNICODECONVERSION 0x11
54 #define E_ERRORCONVERTINGCHARS 0x12
55 #define E_EXCEPTION 0x13
56 #define E_RESERVEDPARAMNOTNULL 0x14
57 #define E_CHARSETINVALID 0x15
58 #define E_WIN32S_NOTSUPPORTED 0x16
59 #define E_FILE_NOT_FOUND 0x17
60 #define E_TTC_INDEX_OUT_OF_RANGE 0x18
61 #define E_INPUTPARAMINVALID 0x19
62 #endif
63 
64 #ifndef E_ERRORCOMPRESSINGFONTDATA
65 #define E_ERRORCOMPRESSINGFONTDATA 0x100
66 #define E_FONTDATAINVALID 0x102
67 #define E_NAMECHANGEFAILED 0x103
68 #define E_FONTNOTEMBEDDABLE 0x104
69 #define E_PRIVSINVALID 0x105
70 #define E_SUBSETTINGFAILED 0x106
71 #define E_READFROMSTREAMFAILED 0x107
72 #define E_SAVETOSTREAMFAILED 0x108
73 #define E_NOOS2 0x109
74 #define E_T2NOFREEMEMORY 0x10A
75 #define E_ERRORREADINGFONTDATA 0x10B
76 #define E_FLAGSINVALID 0x10C
77 #define E_ERRORCREATINGFONTFILE 0x10D
78 #define E_FONTALREADYEXISTS 0x10E
79 #define E_FONTNAMEALREADYEXISTS 0x10F
80 #define E_FONTINSTALLFAILED 0x110
81 #define E_ERRORDECOMPRESSINGFONTDATA 0x111
82 #define E_ERRORACCESSINGEXCLUDELIST 0x112
83 #define E_FACENAMEINVALID 0x113
84 #define E_STREAMINVALID 0x114
85 #define E_STATUSINVALID 0x115
86 #define E_PRIVSTATUSINVALID 0x116
87 #define E_PERMISSIONSINVALID 0x117
88 #define E_PBENABLEDINVALID 0x118
89 #define E_SUBSETTINGEXCEPTION 0x119
90 #define E_SUBSTRING_TEST_FAIL 0x11A
91 #define E_FONTVARIATIONSIMULATED 0x11B
92 #define E_FONTVALIDATEFAIL 0x11C
93 #define E_FONTFAMILYNAMENOTINFULL 0x11D
94 #endif
95 
96 #ifndef E_ADDFONTFAILED
97 #define E_ADDFONTFAILED 0x200
98 #define E_COULDNTCREATETEMPFILE 0x201
99 #define E_FONTFILECREATEFAILED 0x203
100 #define E_WINDOWSAPI 0x204
101 #define E_FONTFILENOTFOUND 0x205
102 #define E_RESOURCEFILECREATEFAILED 0x206
103 #define E_ERROREXPANDINGFONTDATA 0x207
104 #define E_ERRORGETTINGDC 0x208
105 #define E_EXCEPTIONINDECOMPRESSION 0x209
106 #define E_EXCEPTIONINCOMPRESSION 0x20A
107 #endif
108 
109 #ifdef __cplusplus
110 extern "C" {
111 #endif
112 
113 typedef unsigned long(WINAPIV *WRITEEMBEDPROC)
114 (
115  void* lpvWriteStream,
116  const void* lpvBuffer,
117  const unsigned long cbBuffer
118 );
119 
120 typedef unsigned long(WINAPIV *READEMBEDPROC)
121 (
122  void* lpvReadStream,
123  void* lpvBuffer,
124  const unsigned long cbBuffer
125 );
126 
127 
128 typedef struct
129 {
130  unsigned long ulStructSize;
133  unsigned long ulCharSet;
134  unsigned short usReserved1;
135  unsigned short usCharCodeCount;
136  unsigned short* pusCharCodeSet;
138 
139 typedef struct
140 {
141  unsigned long ulStructSize;
144  unsigned long ulCharSet;
145  unsigned short usReserved1;
146  unsigned short usCharCodeCount;
147  unsigned long* pulCharCodeSet;
149 
150 typedef struct
151 {
152  unsigned short usStructSize;
153  unsigned short usRootStrSize;
154  unsigned short *pusRootStr;
155 } TTEMBEDINFO;
156 
157 typedef struct
158 {
159  unsigned short usStructSize;
160  unsigned short usRefStrSize;
161  unsigned short *pusRefStr;
162 } TTLOADINFO;
163 
164 LONG
165 WINAPI
167  UCHAR* pucCharCodes,
168  ULONG ulCharCodeSize,
169  USHORT* pusShortCodes,
170  ULONG ulShortCodeSize,
171  ULONG ulFlags);
172 
173 LONG
174 WINAPI
175 TTDeleteEmbeddedFont(HANDLE hFontReference,
176  ULONG ulFlags,
177  ULONG* pulStatus);
178 
179 LONG
180 WINAPI
182  ULONG ulFlags,
183  ULONG ulCharSet,
184  ULONG* pulPrivStatus,
185  ULONG* pulStatus,
186  WRITEEMBEDPROC lpfnWriteToStream,
187  LPVOID lpvWriteStream,
188  USHORT* pusCharCodeSet,
189  USHORT usCharCodeCount,
190  USHORT usLanguage,
191  TTEMBEDINFO* pTTEmbedInfo);
192 
193 LONG
194 WINAPI
196  LPCSTR szFontFileName,
197  USHORT usTTCIndex,
198  ULONG ulFlags,
199  ULONG ulCharSet,
200  ULONG* pulPrivStatus,
201  ULONG* pulStatus,
202  WRITEEMBEDPROC lpfnWriteToStream,
203  LPVOID lpvWriteStream,
204  USHORT* pusCharCodeSet,
205  USHORT usCharCodeCount,
206  USHORT usLanguage,
207  TTEMBEDINFO* pTTEmbedInfo);
208 
209 LONG
210 WINAPI
212  BOOL bEnable);
213 
214 LONG
215 WINAPI
217  ULONG* pulPrivStatus,
218  ULONG ulPrivs,
219  ULONG* pulStatus,
220  READEMBEDPROC lpfnReadFromStream,
221  LPVOID lpvReadStream,
222  TTLOADINFO* pTTLoadInfo);
223 
224 LONG
225 WINAPI
227  ULONG* pulPrivStatus);
228 
229 LONG
230 WINAPI
232  BOOL* pbEnabled);
233 
234 LONG
235 WINAPI
237  BOOL* pbEnabled);
238 
239 LONG
240 WINAPI
241 TTLoadEmbeddedFont(HANDLE *phFontReference,
242  ULONG ulFlags,
243  ULONG* pulPrivStatus,
244  ULONG ulPrivs,
245  ULONG* pulStatus,
246  READEMBEDPROC lpfnReadFromStream,
247  LPVOID lpvReadStream,
248  LPWSTR szWinFamilyName,
249  LPSTR szMacFamilyName,
250  TTLOADINFO* pTTLoadInfo);
251 
252 LONG
253 WINAPI
255  TTVALIDATIONTESTPARAMS* pTestParam);
256 
257 LONG
258 WINAPI
260  ULONG ulFlags,
261  ULONG ulCharSet,
262  ULONG* pulPrivStatus,
263  ULONG* pulStatus,
264  WRITEEMBEDPROC lpfnWriteToStream,
265  LPVOID lpvWriteStream,
266  ULONG* pulCharCodeSet,
267  USHORT usCharCodeCount,
268  USHORT usLanguage,
269  TTEMBEDINFO* pTTEmbedInfo);
270 
271 LONG
272 WINAPI
274  TTVALIDATIONTESTPARAMSEX* pTestParam);
275 
276 LONG
277 WINAPI
278 TTGetNewFontName(HANDLE* phFontReference,
279  LPWSTR szWinFamilyName,
280  long cchMaxWinName,
281  LPSTR szMacFamilyName,
282  long cchMaxMacName);
283 
284 #ifdef __cplusplus
285  }
286 #endif
287 
288 #endif /* __T2EMBED_API_H */
unsigned short * pusRootStr
Definition: t2embapi.h:154
unsigned short usReserved1
Definition: t2embapi.h:134
LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *pulPrivStatus)
Definition: main.c:72
unsigned short * pusRefStr
Definition: t2embapi.h:161
unsigned short usCharCodeCount
Definition: t2embapi.h:135
static HDC
Definition: imagelist.c:92
LONG WINAPI TTDeleteEmbeddedFont(HANDLE hFontReference, ULONG ulFlags, ULONG *pulStatus)
Definition: main.c:180
LONG WINAPI TTEmbedFont(HDC hDC, ULONG ulFlags, ULONG ulCharSet, ULONG *pulPrivStatus, ULONG *pulStatus, WRITEEMBEDPROC lpfnWriteToStream, LPVOID lpvWriteStream, USHORT *pusCharCodeSet, USHORT usCharCodeCount, USHORT usLanguage, TTEMBEDINFO *pTTEmbedInfo)
Definition: main.c:59
char * LPSTR
Definition: xmlstorage.h:182
unsigned long ulStructSize
Definition: t2embapi.h:141
LONG WINAPI TTGetEmbeddedFontInfo(ULONG ulFlags, ULONG *pulPrivStatus, ULONG ulPrivs, ULONG *pulStatus, READEMBEDPROC lpfnReadFromStream, LPVOID lpvReadStream, TTLOADINFO *pTTLoadInfo)
Definition: stubs.c:57
unsigned short usCharCodeCount
Definition: t2embapi.h:146
unsigned long(WINAPIV * WRITEEMBEDPROC)(void *lpvWriteStream, const void *lpvBuffer, const unsigned long cbBuffer)
Definition: t2embapi.h:114
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
LONG WINAPI TTLoadEmbeddedFont(HANDLE *phFontReference, ULONG ulFlags, ULONG *pulPrivStatus, ULONG ulPrivs, ULONG *pulStatus, READEMBEDPROC lpfnReadFromStream, LPVOID lpvReadStream, LPWSTR szWinFamilyName, LPSTR szMacFamilyName, TTLOADINFO *pTTLoadInfo)
Definition: main.c:45
LONG WINAPI TTRunValidationTestsEx(HDC hDC, TTVALIDATIONTESTPARAMSEX *pTestParam)
Definition: stubs.c:98
unsigned short usReserved1
Definition: t2embapi.h:145
LONG WINAPI TTIsEmbeddingEnabled(HDC hDC, BOOL *pbEnabled)
Definition: main.c:155
LONG WINAPI TTCharToUnicode(HDC hDC, UCHAR *pucCharCodes, ULONG ulCharCodeSize, USHORT *pusShortCodes, ULONG ulShortCodeSize, ULONG ulFlags)
Definition: stubs.c:15
LONG WINAPI TTEmbedFontFromFileA(HDC hDC, LPCSTR szFontFileName, USHORT usTTCIndex, ULONG ulFlags, ULONG ulCharSet, ULONG *pulPrivStatus, ULONG *pulStatus, WRITEEMBEDPROC lpfnWriteToStream, LPVOID lpvWriteStream, USHORT *pusCharCodeSet, USHORT usCharCodeCount, USHORT usLanguage, TTEMBEDINFO *pTTEmbedInfo)
Definition: stubs.c:28
LONG WINAPI TTEnableEmbeddingForFacename(LPSTR lpszFacename, BOOL bEnable)
Definition: stubs.c:48
const char * LPCSTR
Definition: xmlstorage.h:183
LONG WINAPI TTEmbedFontEx(HDC hDC, ULONG ulFlags, ULONG ulCharSet, ULONG *pulPrivStatus, ULONG *pulStatus, WRITEEMBEDPROC lpfnWriteToStream, LPVOID lpvWriteStream, ULONG *pulCharCodeSet, USHORT usCharCodeCount, USHORT usLanguage, TTEMBEDINFO *pTTEmbedInfo)
Definition: stubs.c:80
unsigned long ulCharSet
Definition: t2embapi.h:133
LONG WINAPI TTRunValidationTests(HDC hDC, TTVALIDATIONTESTPARAMS *pTestParam)
Definition: stubs.c:71
#define WINAPI
Definition: msvc.h:6
unsigned short * pusCharCodeSet
Definition: t2embapi.h:136
unsigned long * pulCharCodeSet
Definition: t2embapi.h:147
unsigned short usRefStrSize
Definition: t2embapi.h:160
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned long ulStructSize
Definition: t2embapi.h:130
LONG WINAPI TTIsEmbeddingEnabledForFacename(LPCSTR lpszFacename, BOOL *pbEnabled)
Definition: main.c:108
unsigned short usStructSize
Definition: t2embapi.h:159
#define WINAPIV
Definition: sdbpapi.h:64
static HDC hDC
Definition: 3dtext.c:33
_In_ BOOL bEnable
Definition: winddi.h:3426
unsigned short USHORT
Definition: pedump.c:61
#define long
Definition: qsort.c:33
LONG WINAPI TTGetNewFontName(HANDLE *phFontReference, LPWSTR szWinFamilyName, long cchMaxWinName, LPSTR szMacFamilyName, long cchMaxMacName)
Definition: stubs.c:107
unsigned long ulCharSet
Definition: t2embapi.h:144
unsigned int ULONG
Definition: retypes.h:1
unsigned short usStructSize
Definition: t2embapi.h:152
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned short usRootStrSize
Definition: t2embapi.h:153
unsigned long(WINAPIV * READEMBEDPROC)(void *lpvReadStream, void *lpvBuffer, const unsigned long cbBuffer)
Definition: t2embapi.h:121