mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Introduce TEXTMETRICSA and TEXTMETRICSW
svn path=/trunk/; revision=4431
This commit is contained in:
parent
dcedc133e0
commit
59371a062e
10 changed files with 170 additions and 32 deletions
|
@ -1917,7 +1917,7 @@ GetMetaFileA(LPCSTR);
|
|||
|
||||
UINT
|
||||
STDCALL
|
||||
GetOutlineTextMetricsA(HDC, UINT, LPOUTLINETEXTMETRIC);
|
||||
GetOutlineTextMetricsA(HDC, UINT, LPOUTLINETEXTMETRICA);
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
|
@ -1979,7 +1979,7 @@ GetEnhMetaFileDescriptionA(HENHMETAFILE, UINT, LPSTR );
|
|||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
GetTextMetricsA(HDC, LPTEXTMETRIC);
|
||||
GetTextMetricsA(HDC, LPTEXTMETRICA);
|
||||
|
||||
int
|
||||
STDCALL
|
||||
|
|
|
@ -957,6 +957,7 @@ extern "C" {
|
|||
#define DT_TOP (0)
|
||||
#define DT_VCENTER (4)
|
||||
#define DT_WORDBREAK (16)
|
||||
#define DT_WORD_ELLIPSIS (262144)
|
||||
#define DT_INTERNAL (4096)
|
||||
|
||||
|
||||
|
|
|
@ -2715,7 +2715,7 @@ typedef struct tagNEWCPLINFO {
|
|||
TCHAR szHelpFile[128];
|
||||
} NEWCPLINFO;
|
||||
|
||||
typedef struct tagNEWTEXTMETRIC {
|
||||
typedef struct tagNEWTEXTMETRICA {
|
||||
LONG tmHeight;
|
||||
LONG tmAscent;
|
||||
LONG tmDescent;
|
||||
|
@ -2740,13 +2740,56 @@ typedef struct tagNEWTEXTMETRIC {
|
|||
UINT ntmSizeEM;
|
||||
UINT ntmCellHeight;
|
||||
UINT ntmAvgWidth;
|
||||
} NEWTEXTMETRIC;
|
||||
} NEWTEXTMETRICA;
|
||||
|
||||
typedef struct tagNEWTEXTMETRICW {
|
||||
LONG tmHeight;
|
||||
LONG tmAscent;
|
||||
LONG tmDescent;
|
||||
LONG tmInternalLeading;
|
||||
LONG tmExternalLeading;
|
||||
LONG tmAveCharWidth;
|
||||
LONG tmMaxCharWidth;
|
||||
LONG tmWeight;
|
||||
LONG tmOverhang;
|
||||
LONG tmDigitizedAspectX;
|
||||
LONG tmDigitizedAspectY;
|
||||
WCHAR tmFirstChar;
|
||||
WCHAR tmLastChar;
|
||||
WCHAR tmDefaultChar;
|
||||
WCHAR tmBreakChar;
|
||||
BYTE tmItalic;
|
||||
BYTE tmUnderlined;
|
||||
BYTE tmStruckOut;
|
||||
BYTE tmPitchAndFamily;
|
||||
BYTE tmCharSet;
|
||||
DWORD ntmFlags;
|
||||
UINT ntmSizeEM;
|
||||
UINT ntmCellHeight;
|
||||
UINT ntmAvgWidth;
|
||||
} NEWTEXTMETRICW;
|
||||
|
||||
typedef struct tagNEWTEXTMETRICEX {
|
||||
NEWTEXTMETRIC ntmentm;
|
||||
#ifdef UNICODE
|
||||
typedef NEWTEXTMETRICA NEWTEXTMETRIC;
|
||||
#else
|
||||
typedef NEWTEXTMETRICW NEWTEXTMETRIC;
|
||||
#endif
|
||||
|
||||
typedef struct tagNEWTEXTMETRICEXA {
|
||||
NEWTEXTMETRICA ntmentm;
|
||||
FONTSIGNATURE ntmeFontSignature;
|
||||
} NEWTEXTMETRICEX;
|
||||
} NEWTEXTMETRICEXA;
|
||||
|
||||
typedef struct tagNEWTEXTMETRICEXW {
|
||||
NEWTEXTMETRICW ntmentm;
|
||||
FONTSIGNATURE ntmeFontSignature;
|
||||
} NEWTEXTMETRICEXW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;
|
||||
#else
|
||||
typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
|
||||
#endif
|
||||
|
||||
typedef struct tagNM_LISTVIEW {
|
||||
NMHDR hdr;
|
||||
|
@ -2974,7 +3017,7 @@ typedef OSVERSIONINFOEXA OSVERSIONINFOEX;
|
|||
typedef OSVERSIONINFOEXW OSVERSIONINFOEX;
|
||||
#endif
|
||||
|
||||
typedef struct tagTEXTMETRIC {
|
||||
typedef struct tagTEXTMETRICA {
|
||||
LONG tmHeight;
|
||||
LONG tmAscent;
|
||||
LONG tmDescent;
|
||||
|
@ -2995,11 +3038,42 @@ typedef struct tagTEXTMETRIC {
|
|||
BYTE tmStruckOut;
|
||||
BYTE tmPitchAndFamily;
|
||||
BYTE tmCharSet;
|
||||
} TEXTMETRIC, *LPTEXTMETRIC;
|
||||
} TEXTMETRICA, *LPTEXTMETRICA;
|
||||
|
||||
typedef struct _OUTLINETEXTMETRIC {
|
||||
typedef struct tagTEXTMETRICW {
|
||||
LONG tmHeight;
|
||||
LONG tmAscent;
|
||||
LONG tmDescent;
|
||||
LONG tmInternalLeading;
|
||||
LONG tmExternalLeading;
|
||||
LONG tmAveCharWidth;
|
||||
LONG tmMaxCharWidth;
|
||||
LONG tmWeight;
|
||||
LONG tmOverhang;
|
||||
LONG tmDigitizedAspectX;
|
||||
LONG tmDigitizedAspectY;
|
||||
WCHAR tmFirstChar;
|
||||
WCHAR tmLastChar;
|
||||
WCHAR tmDefaultChar;
|
||||
BCHAR tmBreakChar;
|
||||
BYTE tmItalic;
|
||||
BYTE tmUnderlined;
|
||||
BYTE tmStruckOut;
|
||||
BYTE tmPitchAndFamily;
|
||||
BYTE tmCharSet;
|
||||
} TEXTMETRICW, *LPTEXTMETRICW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef TEXTMETRICA TEXTMETRIC;
|
||||
typedef LPTEXTMETRICA LPTEXTMETRIC;
|
||||
#else
|
||||
typedef TEXTMETRICW TEXTMETRIC;
|
||||
typedef LPTEXTMETRICA LPTEXTMETRIC;
|
||||
#endif
|
||||
|
||||
typedef struct _OUTLINETEXTMETRICA {
|
||||
UINT otmSize;
|
||||
TEXTMETRIC otmTextMetrics;
|
||||
TEXTMETRICA otmTextMetrics;
|
||||
BYTE otmFiller;
|
||||
PANOSE otmPanoseNumber;
|
||||
UINT otmfsSelection;
|
||||
|
@ -3030,7 +3104,50 @@ typedef struct _OUTLINETEXTMETRIC {
|
|||
PSTR otmpFaceName;
|
||||
PSTR otmpStyleName;
|
||||
PSTR otmpFullName;
|
||||
} OUTLINETEXTMETRIC, *LPOUTLINETEXTMETRIC;
|
||||
} OUTLINETEXTMETRICA, *LPOUTLINETEXTMETRICA;
|
||||
|
||||
typedef struct _OUTLINETEXTMETRICW {
|
||||
UINT otmSize;
|
||||
TEXTMETRICW otmTextMetrics;
|
||||
BYTE otmFiller;
|
||||
PANOSE otmPanoseNumber;
|
||||
UINT otmfsSelection;
|
||||
UINT otmfsType;
|
||||
int otmsCharSlopeRise;
|
||||
int otmsCharSlopeRun;
|
||||
int otmItalicAngle;
|
||||
UINT otmEMSquare;
|
||||
int otmAscent;
|
||||
int otmDescent;
|
||||
UINT otmLineGap;
|
||||
UINT otmsCapEmHeight;
|
||||
UINT otmsXHeight;
|
||||
RECT otmrcFontBox;
|
||||
int otmMacAscent;
|
||||
int otmMacDescent;
|
||||
UINT otmMacLineGap;
|
||||
UINT otmusMinimumPPEM;
|
||||
POINT otmptSubscriptSize;
|
||||
POINT otmptSubscriptOffset;
|
||||
POINT otmptSuperscriptSize;
|
||||
POINT otmptSuperscriptOffset;
|
||||
UINT otmsStrikeoutSize;
|
||||
int otmsStrikeoutPosition;
|
||||
int otmsUnderscoreSize;
|
||||
int otmsUnderscorePosition;
|
||||
PSTR otmpFamilyName;
|
||||
PSTR otmpFaceName;
|
||||
PSTR otmpStyleName;
|
||||
PSTR otmpFullName;
|
||||
} OUTLINETEXTMETRICW, *LPOUTLINETEXTMETRICW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef OUTLINETEXTMETRICA OUTLINETEXTMETRIC;
|
||||
typedef LPOUTLINETEXTMETRICA LPOUTLINETEXTMETRIC;
|
||||
#else
|
||||
typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC;
|
||||
typedef LPOUTLINETEXTMETRICA LPOUTLINETEXTMETRIC;
|
||||
#endif
|
||||
|
||||
typedef struct _OVERLAPPED {
|
||||
DWORD Internal;
|
||||
|
@ -4181,11 +4298,31 @@ typedef int CALLBACK (*ENUMMETAFILEPROC) (HDC, HANDLETABLE,
|
|||
typedef int CALLBACK (*ENHMETAFILEPROC) (HDC, HANDLETABLE,
|
||||
ENHMETARECORD, int, LPARAM);
|
||||
|
||||
typedef int CALLBACK (*ENUMFONTSPROC) (LPLOGFONT, LPTEXTMETRIC, DWORD, LPARAM);
|
||||
typedef int CALLBACK (*FONTENUMPROC) (ENUMLOGFONT *, NEWTEXTMETRIC *,
|
||||
int, LPARAM);
|
||||
typedef int CALLBACK (*FONTENUMEXPROC) (ENUMLOGFONTEX *, NEWTEXTMETRICEX *,
|
||||
int, LPARAM);
|
||||
typedef int CALLBACK (*ENUMFONTSPROCA) (LPLOGFONT, LPTEXTMETRICA, DWORD, LPARAM);
|
||||
typedef int CALLBACK (*ENUMFONTSPROCW) (LPLOGFONT, LPTEXTMETRICW, DWORD, LPARAM);
|
||||
#ifdef UNICODE
|
||||
typedef ENUMFONTSPROCW ENUMFONTSPROC;
|
||||
#else
|
||||
typedef ENUMFONTSPROCA ENUMFONTSPROC;
|
||||
#endif
|
||||
typedef int CALLBACK (*FONTENUMPROCA) (ENUMLOGFONT *, NEWTEXTMETRICA *,
|
||||
int, LPARAM);
|
||||
typedef int CALLBACK (*FONTENUMPROCW) (ENUMLOGFONT *, NEWTEXTMETRICW *,
|
||||
int, LPARAM);
|
||||
#ifdef UNICODE
|
||||
typedef FONTENUMPROCW FONTENUMPROC;
|
||||
#else
|
||||
typedef FONTENUMPROCA FONTENUMPROC;
|
||||
#endif
|
||||
typedef int CALLBACK (*FONTENUMEXPROCA) (ENUMLOGFONTEX *, NEWTEXTMETRICEXA *,
|
||||
int, LPARAM);
|
||||
typedef int CALLBACK (*FONTENUMEXPROCW) (ENUMLOGFONTEX *, NEWTEXTMETRICEXW *,
|
||||
int, LPARAM);
|
||||
#ifdef UNICODE
|
||||
typedef FONTENUMEXPROCW FONTENUMEXPROC;
|
||||
#else
|
||||
typedef FONTENUMEXPROCA FONTENUMEXPROC;
|
||||
#endif
|
||||
|
||||
typedef VOID CALLBACK (*LPOVERLAPPED_COMPLETION_ROUTINE) (DWORD, DWORD,
|
||||
LPOVERLAPPED);
|
||||
|
|
|
@ -1925,7 +1925,7 @@ GetMetaFileW(LPCWSTR);
|
|||
|
||||
UINT
|
||||
STDCALL
|
||||
GetOutlineTextMetricsW(HDC, UINT, LPOUTLINETEXTMETRIC);
|
||||
GetOutlineTextMetricsW(HDC, UINT, LPOUTLINETEXTMETRICW);
|
||||
|
||||
WINBOOL
|
||||
STDCALL GetTextExtentPointW(
|
||||
|
@ -1986,7 +1986,7 @@ GetEnhMetaFileDescriptionW(HENHMETAFILE, UINT, LPWSTR );
|
|||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
GetTextMetricsW(HDC, LPTEXTMETRIC);
|
||||
GetTextMetricsW(HDC, LPTEXTMETRICW);
|
||||
|
||||
int
|
||||
STDCALL
|
||||
|
|
|
@ -160,7 +160,7 @@ UINT
|
|||
STDCALL
|
||||
W32kGetOutlineTextMetrics(HDC hDC,
|
||||
UINT Data,
|
||||
LPOUTLINETEXTMETRIC otm);
|
||||
LPOUTLINETEXTMETRICW otm);
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
|
@ -210,7 +210,7 @@ W32kGetTextFace(HDC hDC,
|
|||
BOOL
|
||||
STDCALL
|
||||
W32kGetTextMetrics(HDC hDC,
|
||||
LPTEXTMETRIC tm);
|
||||
LPTEXTMETRICW tm);
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubsa.c,v 1.8 2002/09/08 10:22:40 chorns Exp $
|
||||
/* $Id: stubsa.c,v 1.9 2003/03/25 22:35:19 gvg Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -238,7 +238,7 @@ APIENTRY
|
|||
GetOutlineTextMetricsA(
|
||||
HDC a0,
|
||||
UINT a1,
|
||||
LPOUTLINETEXTMETRIC a2
|
||||
LPOUTLINETEXTMETRICA a2
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubsw.c,v 1.7 2002/09/08 10:22:40 chorns Exp $
|
||||
/* $Id: stubsw.c,v 1.8 2003/03/25 22:35:19 gvg Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -236,7 +236,7 @@ APIENTRY
|
|||
GetOutlineTextMetricsW(
|
||||
HDC a0,
|
||||
UINT a1,
|
||||
LPOUTLINETEXTMETRIC a2
|
||||
LPOUTLINETEXTMETRICW a2
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
|
|
|
@ -55,17 +55,17 @@ BOOL
|
|||
STDCALL
|
||||
GetTextMetricsA(
|
||||
HDC hdc,
|
||||
LPTEXTMETRIC tm
|
||||
LPTEXTMETRICA tm
|
||||
)
|
||||
{
|
||||
return W32kGetTextMetrics(hdc, tm);
|
||||
return W32kGetTextMetrics(hdc, (LPTEXTMETRICW) tm);
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
GetTextMetricsW(
|
||||
HDC hdc,
|
||||
LPTEXTMETRIC tm
|
||||
LPTEXTMETRICW tm
|
||||
)
|
||||
{
|
||||
return W32kGetTextMetrics(hdc, tm);
|
||||
|
|
|
@ -69,7 +69,7 @@ typedef struct _FONTGDI {
|
|||
|
||||
LPCWSTR Filename;
|
||||
FT_Face face;
|
||||
TEXTMETRIC TextMetric;
|
||||
TEXTMETRICW TextMetric;
|
||||
} FONTGDI, *PFONTGDI;
|
||||
|
||||
typedef struct _PALGDI {
|
||||
|
|
|
@ -376,7 +376,7 @@ UINT
|
|||
STDCALL
|
||||
W32kGetOutlineTextMetrics(HDC hDC,
|
||||
UINT Data,
|
||||
LPOUTLINETEXTMETRIC otm)
|
||||
LPOUTLINETEXTMETRICW otm)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
@ -485,13 +485,13 @@ W32kGetTextFace(HDC hDC,
|
|||
BOOL
|
||||
STDCALL
|
||||
W32kGetTextMetrics(HDC hDC,
|
||||
LPTEXTMETRIC tm)
|
||||
LPTEXTMETRICW tm)
|
||||
{
|
||||
PDC dc = (PDC)AccessUserObject(hDC);
|
||||
PFONTGDI FontGDI;
|
||||
|
||||
FontGDI = (PFONTGDI)AccessInternalObject(dc->w.hFont);
|
||||
memcpy(tm, &FontGDI->TextMetric, sizeof(TEXTMETRIC));
|
||||
memcpy(tm, &FontGDI->TextMetric, sizeof(TEXTMETRICW));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue