Restore, but deprecate, LOGFONT conversion functions in wxMSW
Even though these functions were declared in a header called private.h,
some code outside the library still used them, notably the popular
wxPdfDocument library.
So partially revert 72a225924d
and these
functions back, and just mark them as deprecated for now.
This commit is contained in:
@@ -965,6 +965,13 @@ extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp
|
||||
// GetCursorPos can fail without populating the POINT. This falls back to GetMessagePos.
|
||||
WXDLLIMPEXP_CORE void wxGetCursorPosMSW(POINT* pt);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_MSG("Use wxNativeFontInfo::lf directly instead of this private function")
|
||||
WXDLLIMPEXP_CORE void wxFillLogFont(LOGFONT *logFont, const wxFont *font);
|
||||
wxDEPRECATED_MSG("Use wxNativeFontInfo(LOGFONT) ctor instead of this private function")
|
||||
WXDLLIMPEXP_CORE wxFont wxCreateFontFromLogFont(const LOGFONT *logFont);
|
||||
#endif // WXWIN_COMPATIBILITY_3_0
|
||||
|
||||
WXDLLIMPEXP_CORE void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font);
|
||||
WXDLLIMPEXP_CORE wxFontEncoding wxGetFontEncFromCharSet(int charset);
|
||||
|
||||
|
@@ -264,3 +264,21 @@ wxFontEncoding wxGetFontEncFromCharSet(int cs)
|
||||
|
||||
return fontEncoding;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Deprecated wxFont <-> LOGFONT conversion functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_3_0
|
||||
|
||||
void wxFillLogFont(LOGFONT *logFont, const wxFont *font)
|
||||
{
|
||||
*logFont = font->GetNativeFontInfo()->lf;
|
||||
}
|
||||
|
||||
wxFont wxCreateFontFromLogFont(const LOGFONT *logFont)
|
||||
{
|
||||
return wxFont(wxNativeFontInfo(*logFont));
|
||||
}
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_3_0
|
||||
|
Reference in New Issue
Block a user