// return instance of the wxFontMapper singleton
static wxFontMapper *Get();
- // set the sigleton to 'mapper' instance and return previous one
+ // set the singleton to 'mapper' instance and return previous one
static wxFontMapper *Set(wxFontMapper *mapper);
// get the n-th supported encoding
static wxFontEncoding GetEncoding(size_t n);
- // return internal string identifier for the encoding (see also
- // GetEncodingDescription())
+ // return canonical name of this encoding (this is a short string,
+ // GetEncodingDescription() returns a longer one)
static wxString GetEncodingName(wxFontEncoding encoding);
+// // return a list of all names of this encoding (see GetEncodingName)
+// static const wxChar** GetAllEncodingNames(wxFontEncoding encoding);
+
// return user-readable string describing the given encoding
//
// NB: hard-coded now, but might change later (read it from config?)
static wxFontEncoding GetEncodingFromName(const wxString& name);
- // set the config object to use (may be NULL to use default)
- void SetConfig(wxConfigBase *config);
-
// set the root config path to use (should be an absolute path)
void SetConfigPath(const wxString& prefix);
//wxArrayString* GetFacenames();
%extend {
PyObject* GetEncodings() {
+ PyObject* ret;
wxArrayString* arr = self->GetEncodings();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (arr)
- return wxArrayString2PyList_helper(*arr);
+ ret = wxArrayString2PyList_helper(*arr);
else
- return PyList_New(0);
+ ret = PyList_New(0);
+ wxPyEndBlockThreads(blocked);
+ return ret;
}
PyObject* GetFacenames() {
+ PyObject* ret;
wxArrayString* arr = self->GetFacenames();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (arr)
- return wxArrayString2PyList_helper(*arr);
+ ret = wxArrayString2PyList_helper(*arr);
else
- return PyList_New(0);
+ ret = PyList_New(0);
+ wxPyEndBlockThreads(blocked);
+ return ret;
}
}
};