X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..fd657b8a5907c8584db84c85535ce281bdd65193:/wxPython/src/fonts.i diff --git a/wxPython/src/fonts.i b/wxPython/src/fonts.i index dffe3ed4d2..8137e23db8 100644 --- a/wxPython/src/fonts.i +++ b/wxPython/src/fonts.i @@ -74,6 +74,7 @@ enum wxFontWeight }; + // font encodings enum wxFontEncoding { @@ -115,7 +116,7 @@ enum wxFontEncoding // and for Windows wxFONTENCODING_CP874, // WinThai wxFONTENCODING_CP932, // Japanese (shift-JIS) - wxFONTENCODING_CP936, // Chiniese simplified (GB) + wxFONTENCODING_CP936, // Chinese simplified (GB) wxFONTENCODING_CP949, // Korean (Hangul charset) wxFONTENCODING_CP950, // Chinese (traditional - Big5) wxFONTENCODING_CP1250, // WinLatin2 @@ -138,16 +139,15 @@ enum wxFontEncoding // Japanese (see http://zsigri.tripod.com/fontboard/cjk/jis.html) wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, // Shift JIS - wxFONTENCODING_EUC_JP, // Extended Unix Codepage for Japanese + wxFONTENCODING_EUC_JP = wxFONTENCODING_UTF8 + 1, // Extended Unix Codepage + // for Japanese - wxFONTENCODING_UNICODE, // Unicode - currently used only by - // wxEncodingConverter class + wxFONTENCODING_UNICODE, // Unicode (for wxEncodingConverter only) wxFONTENCODING_MAX }; - //--------------------------------------------------------------------------- // wxNativeFontInfo is platform-specific font representation: this struct // should be considered as opaque font description only used by the native @@ -374,6 +374,7 @@ public: static wxFontEncoding GetDefaultEncoding(); static void SetDefaultEncoding(wxFontEncoding encoding); + %pragma(python) addtoclass = "def __nonzero__(self): return self.Ok()" }; @@ -739,9 +740,9 @@ public: %pragma(python) addtoclass = " def Init(self, *_args, **_kwargs): if type(_args[0]) in [type(''), type(u'')]: - val = apply(self.Init1, _args, _kwargs) + val = self.Init1(*_args, **_kwargs) else: - val = apply(self.Init2, _args, _kwargs) + val = self.Init2(*_args, **_kwargs) return val " @@ -805,6 +806,13 @@ public: // Returns NULL if no info found, pointer must *not* be deleted by caller static const wxLanguageInfo *GetLanguageInfo(int lang); + // Find the language for the given locale string which may be either a + // canonical ISO 2 letter language code ("xx"), a language code followed by + // the country code ("xx_XX") or a Windows full language name ("Xxxxx...") + // + // Returns NULL if no info found, pointer must *not* be deleted by caller + static const wxLanguageInfo *FindLanguageInfo(const wxString& locale); + // Add custom language to the list of known languages. // Notes: 1) wxLanguageInfo contains platform-specific data // 2) must be called before Init to have effect @@ -962,6 +970,7 @@ public: // equivalent encodings, regardless the platform, including itself. static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc); + %pragma(python) addtoclass = "def __nonzero__(self): return self.IsOk()" };