X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..423adfde5464b1c0d053f40cdac6768ae3a15abb:/src/cocoa/fontutil.cpp diff --git a/src/cocoa/fontutil.cpp b/src/cocoa/fontutil.cpp index 3c184f4aef..7d3eb844ae 100644 --- a/src/cocoa/fontutil.cpp +++ b/src/cocoa/fontutil.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: unix/fontutil.cpp +// Name: src/cocoa/fontutil.cpp // Purpose: Font helper functions for X11 (GDK/X) // Author: Vadim Zeitlin // Modified by: // Created: 05.11.99 // RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -24,14 +24,16 @@ #pragma hdrstop #endif +#include "wx/fontutil.h" + #ifndef WX_PRECOMP + #include "wx/hash.h" + #include "wx/utils.h" + #include "wx/module.h" #endif // PCH -#include "wx/fontutil.h" #include "wx/fontmap.h" #include "wx/tokenzr.h" -#include "wx/hash.h" -#include "wx/module.h" #include "wx/encinfo.h" #ifdef __WXGTK20__ @@ -68,7 +70,7 @@ wxFontStyle wxNativeFontInfo::GetStyle() const m_style = wxFONTSTYLE_SLANT; break; } - + return m_style; } @@ -97,19 +99,19 @@ wxFontWeight wxNativeFontInfo::GetWeight() const m_weight = wxFONTWEIGHT_BOLD; break; } - + return m_weight; } bool wxNativeFontInfo::GetUnderlined() const { - return FALSE; + return false; } wxString wxNativeFontInfo::GetFaceName() const { wxString tmp = wxGTK_CONV_BACK( pango_font_description_get_family( description ) ); - + return tmp; } @@ -129,7 +131,7 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const bool wxNativeEncodingInfo::FromString(const wxString& s) { - return FALSE; + return false; } wxString wxNativeEncodingInfo::ToString() const @@ -139,16 +141,16 @@ wxString wxNativeEncodingInfo::ToString() const bool wxTestFontEncoding(const wxNativeEncodingInfo& info) { - return TRUE; + return true; } bool wxGetNativeFontEncoding(wxFontEncoding encoding, wxNativeEncodingInfo *info) { - return FALSE; + return false; } -#else +#else // __WXGTK20__ #ifdef __X__ @@ -162,7 +164,6 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, #pragma message enable nosimpint #endif - #include "wx/utils.h" // for wxGetDisplay() #elif defined(__WXGTK__) // we have to declare struct tm to avoid problems with first forward // declaring it in C code (glib.h included from gdk.h does it) and then @@ -178,7 +179,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, // private data // ---------------------------------------------------------------------------- -static wxHashTable *g_fontHash = (wxHashTable*) NULL; +static wxHashTable *g_fontHash = NULL; // ---------------------------------------------------------------------------- // private functions @@ -211,7 +212,7 @@ return wxEmptyString; bool wxGetNativeFontEncoding(wxFontEncoding encoding, wxNativeEncodingInfo *info) { - return FALSE; + return false; } bool wxTestFontEncoding(const wxNativeEncodingInfo& info) @@ -243,14 +244,12 @@ bool wxFontModule::OnInit() { g_fontHash = new wxHashTable( wxKEY_STRING ); - return TRUE; + return true; } void wxFontModule::OnExit() { - delete g_fontHash; - - g_fontHash = (wxHashTable *)NULL; + wxDELETE(g_fontHash); } #endif