Convert NULL menu items to separators.
[wine/wine-kai.git] / include / font.h
blob93a754976fce0b287e0a5f94c90bc201a728b973
1 /*
2 * GDI font definitions
4 * Copyright 1994 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_FONT_H
22 #define __WINE_FONT_H
24 #include "gdi.h"
26 #include "pshpack1.h"
28 /* GDI logical font object */
29 typedef struct
31 GDIOBJHDR header;
32 LOGFONTW logfont;
33 } FONTOBJ;
35 typedef struct {
36 WORD dfVersion;
37 DWORD dfSize;
38 CHAR dfCopyright[60];
39 WORD dfType;
40 WORD dfPoints;
41 WORD dfVertRes;
42 WORD dfHorizRes;
43 WORD dfAscent;
44 WORD dfInternalLeading;
45 WORD dfExternalLeading;
46 BYTE dfItalic;
47 BYTE dfUnderline;
48 BYTE dfStrikeOut;
49 WORD dfWeight;
50 BYTE dfCharSet;
51 WORD dfPixWidth;
52 WORD dfPixHeight;
53 BYTE dfPitchAndFamily;
54 WORD dfAvgWidth;
55 WORD dfMaxWidth;
56 BYTE dfFirstChar;
57 BYTE dfLastChar;
58 BYTE dfDefaultChar;
59 BYTE dfBreakChar;
60 WORD dfWidthBytes;
61 DWORD dfDevice;
62 DWORD dfFace;
63 DWORD dfReserved;
64 CHAR szDeviceName[60]; /* FIXME: length unknown */
65 CHAR szFaceName[60]; /* dito */
66 } FONTDIR16, *LPFONTDIR16;
68 #include "poppack.h"
70 #define FONTCACHE 32 /* dynamic font cache size */
72 extern BOOL FONT_Init( UINT16* pTextCaps );
73 extern INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer );
74 extern INT FONT_GetObjectA( FONTOBJ * font, INT count, LPSTR buffer );
75 extern INT FONT_GetObjectW( FONTOBJ * font, INT count, LPSTR buffer );
76 extern void FONT_LogFontATo16( const LOGFONTA* font32, LPLOGFONT16 font16 );
77 extern void FONT_LogFontWTo16( const LOGFONTW* font32, LPLOGFONT16 font16 );
78 extern void FONT_LogFont16ToA( const LOGFONT16* font16, LPLOGFONTA font32 );
79 extern void FONT_LogFont16ToW( const LOGFONT16* font16, LPLOGFONTW font32 );
80 extern void FONT_TextMetricATo16(const TEXTMETRICA *ptm32, LPTEXTMETRIC16 ptm16 );
81 extern void FONT_TextMetricWTo16(const TEXTMETRICW *ptm32, LPTEXTMETRIC16 ptm16 );
82 extern void FONT_TextMetric16ToA(const TEXTMETRIC16 *ptm16, LPTEXTMETRICA ptm32 );
83 extern void FONT_TextMetric16ToW(const TEXTMETRIC16 *ptm16, LPTEXTMETRICW ptm32 );
84 extern void FONT_TextMetricAToW(const TEXTMETRICA *ptm32A, LPTEXTMETRICW ptm32W );
85 extern void FONT_NewTextMetricEx16ToW(const NEWTEXTMETRICEX16*, LPNEWTEXTMETRICEXW);
86 extern void FONT_EnumLogFontEx16ToW(const ENUMLOGFONTEX16*, LPENUMLOGFONTEXW);
88 extern LPWSTR FONT_mbtowc(HDC, LPCSTR, INT, INT*, UINT*);
90 extern GdiFont WineEngCreateFontInstance(HFONT);
91 extern BOOL WineEngDestroyFontInstance(HFONT handle);
92 extern DWORD WineEngEnumFonts(LPLOGFONTW, DEVICEFONTENUMPROC, LPARAM);
93 extern BOOL WineEngGetCharWidth(GdiFont, UINT, UINT, LPINT);
94 extern DWORD WineEngGetFontData(GdiFont, DWORD, DWORD, LPVOID, DWORD);
95 extern DWORD WineEngGetGlyphOutline(GdiFont, UINT glyph, UINT format,
96 LPGLYPHMETRICS, DWORD buflen, LPVOID buf,
97 const MAT2*);
98 extern UINT WineEngGetOutlineTextMetrics(GdiFont, UINT, LPOUTLINETEXTMETRICW);
99 extern BOOL WineEngGetTextExtentPoint(GdiFont, LPCWSTR, INT, LPSIZE);
100 extern BOOL WineEngGetTextMetrics(GdiFont, LPTEXTMETRICW);
101 extern BOOL WineEngInit(void);
103 #endif /* __WINE_FONT_H */