From 6f283573afab4bb8a164c7c8cf0e77131ef38df3 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 24 Mar 2009 06:58:43 +0000 Subject: [PATCH] adding back API for 2.8 compatibility git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/font.h | 4 ++++ src/osx/carbon/font.cpp | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/include/wx/osx/font.h b/include/wx/osx/font.h index 0d449c9c2d..f3410c1fbb 100644 --- a/include/wx/osx/font.h +++ b/include/wx/osx/font.h @@ -144,6 +144,10 @@ public: #if wxOSX_USE_ATSU_TEXT // Returns an ATSUStyle not ATSUStyle* void* MacGetATSUStyle() const ; +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( wxUint32 MacGetATSUFontID() const ); + wxDEPRECATED( wxUint32 MacGetATSUAdditionalQDStyles() const ); +#endif #endif #if wxOSX_USE_COCOA diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 250fecd35a..d4925a90a3 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -772,6 +772,29 @@ void * wxFont::MacGetATSUStyle() const return M_FONTDATA->m_macATSUStyle; } + +#if WXWIN_COMPATIBILITY_2_8 +wxUint32 wxFont::MacGetATSUFontID() const +{ + wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + + // cast away constness otherwise lazy font resolution is not possible + const_cast(this)->RealizeResource(); + + return M_FONTDATA->m_info.m_atsuFontID; +} + +wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const +{ + wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + + // cast away constness otherwise lazy font resolution is not possible + const_cast(this)->RealizeResource(); + + return M_FONTDATA->m_info.m_atsuAdditionalQDStyles; +} +#endif + #endif #if wxOSX_USE_CORE_TEXT -- 2.45.2