diff options
author | Dan Gudmundsson <[email protected]> | 2014-03-25 16:43:57 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-03-26 11:56:19 +0100 |
commit | 3a51f434c6a79bbf7dca8b0fd96a5df7671b5792 (patch) | |
tree | 9c68af076355d760240430fdaa9697f0bba3fef6 /lib/wx/c_src/gen/wxe_funcs.cpp | |
parent | 4486d61b3ea94875564337580cff66c0b7a79c5f (diff) | |
download | otp-3a51f434c6a79bbf7dca8b0fd96a5df7671b5792.tar.gz otp-3a51f434c6a79bbf7dca8b0fd96a5df7671b5792.tar.bz2 otp-3a51f434c6a79bbf7dca8b0fd96a5df7671b5792.zip |
wx: Add wxLocale class
Diffstat (limited to 'lib/wx/c_src/gen/wxe_funcs.cpp')
-rw-r--r-- | lib/wx/c_src/gen/wxe_funcs.cpp | 216 |
1 files changed, 213 insertions, 3 deletions
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index 2fd0894f8f..c1e9f3829a 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -31420,6 +31420,213 @@ case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon rt.addBool(Result); break; } +case wxLocale_new_0: { // wxLocale::wxLocale + wxLocale * Result = new EwxLocale(); + newPtr((void *) Result, 230, memenv); + rt.addRef(getRef((void *)Result,memenv), "wxLocale"); + break; +} +case wxLocale_new_2: { // wxLocale::wxLocale + int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING; + int * language = (int *) bp; bp += 4; + bp += 4; /* Align */ + while( * (int*) bp) { switch (* (int*) bp) { + case 1: {bp += 4; + flags = (int)*(int *) bp; bp += 4; + } break; + }}; + wxLocale * Result = new EwxLocale(*language,flags); + newPtr((void *) Result, 230, memenv); + rt.addRef(getRef((void *)Result,memenv), "wxLocale"); + break; +} +case wxLocale_destruct: { // wxLocale::~wxLocale + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(This) { ((WxeApp *) wxTheApp)->clearPtr((void *) This); + delete This;} + break; +} +case wxLocale_Init: { // wxLocale::Init + int language=wxLANGUAGE_DEFAULT; + int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING; + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + bp += 4; /* Align */ + while( * (int*) bp) { switch (* (int*) bp) { + case 1: {bp += 4; + language = (int)*(int *) bp; bp += 4; + } break; + case 2: {bp += 4; + flags = (int)*(int *) bp; bp += 4; + } break; + }}; + if(!This) throw wxe_badarg(0); + bool Result = This->Init(language,flags); + rt.addBool(Result); + break; +} +case wxLocale_AddCatalog_1: { // wxLocale::AddCatalog + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + int * szDomainLen = (int *) bp; bp += 4; + wxString szDomain = wxString(bp, wxConvUTF8); + bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7); + if(!This) throw wxe_badarg(0); + bool Result = This->AddCatalog(szDomain); + rt.addBool(Result); + break; +} +case wxLocale_AddCatalog_3: { // wxLocale::AddCatalog + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + int * szDomainLen = (int *) bp; bp += 4; + wxString szDomain = wxString(bp, wxConvUTF8); + bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7); + wxLanguage msgIdLanguage = *(wxLanguage *) bp; bp += 4;; + int * msgIdCharsetLen = (int *) bp; bp += 4; + wxString msgIdCharset = wxString(bp, wxConvUTF8); + bp += *msgIdCharsetLen+((8-((0+ *msgIdCharsetLen) & 7)) & 7); + if(!This) throw wxe_badarg(0); + bool Result = This->AddCatalog(szDomain,msgIdLanguage,msgIdCharset); + rt.addBool(Result); + break; +} +case wxLocale_AddCatalogLookupPathPrefix: { // wxLocale::AddCatalogLookupPathPrefix + int * prefixLen = (int *) bp; bp += 4; + wxString prefix = wxString(bp, wxConvUTF8); + bp += *prefixLen+((8-((4+ *prefixLen) & 7)) & 7); + wxLocale::AddCatalogLookupPathPrefix(prefix); + break; +} +case wxLocale_GetCanonicalName: { // wxLocale::GetCanonicalName + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + wxString Result = This->GetCanonicalName(); + rt.add(Result); + break; +} +case wxLocale_GetLanguage: { // wxLocale::GetLanguage + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + int Result = This->GetLanguage(); + rt.addInt(Result); + break; +} +case wxLocale_GetLanguageName: { // wxLocale::GetLanguageName + int * lang = (int *) bp; bp += 4; + wxString Result = wxLocale::GetLanguageName(*lang); + rt.add(Result); + break; +} +case wxLocale_GetLocale: { // wxLocale::GetLocale + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + const wxeLocaleC Result = This->GetLocale(); + rt.add(wxeLocaleC2String(Result)); + break; +} +case wxLocale_GetName: { // wxLocale::GetName + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + const wxString * Result = &This->GetName(); + rt.add(Result); + break; +} +case wxLocale_GetString_2: { // wxLocale::GetString + wxString szDomain= wxEmptyString; + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + int * szOrigStringLen = (int *) bp; bp += 4; + wxString szOrigString = wxString(bp, wxConvUTF8); + bp += *szOrigStringLen+((8-((0+ *szOrigStringLen) & 7)) & 7); + while( * (int*) bp) { switch (* (int*) bp) { + case 1: {bp += 4; + int * szDomainLen = (int *) bp; bp += 4; + szDomain = wxString(bp, wxConvUTF8); + bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7); + } break; + }}; + if(!This) throw wxe_badarg(0); + const wxeLocaleC Result = This->GetString(szOrigString,szDomain); + rt.add(wxeLocaleC2String(Result)); + break; +} +case wxLocale_GetString_4: { // wxLocale::GetString + wxString szDomain= wxEmptyString; + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + int * szOrigStringLen = (int *) bp; bp += 4; + wxString szOrigString = wxString(bp, wxConvUTF8); + bp += *szOrigStringLen+((8-((0+ *szOrigStringLen) & 7)) & 7); + int * szOrigString2Len = (int *) bp; bp += 4; + wxString szOrigString2 = wxString(bp, wxConvUTF8); + bp += *szOrigString2Len+((8-((4+ *szOrigString2Len) & 7)) & 7); + int * n = (int *) bp; bp += 4; + bp += 4; /* Align */ + while( * (int*) bp) { switch (* (int*) bp) { + case 1: {bp += 4; + int * szDomainLen = (int *) bp; bp += 4; + szDomain = wxString(bp, wxConvUTF8); + bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7); + } break; + }}; + if(!This) throw wxe_badarg(0); + const wxeLocaleC Result = This->GetString(szOrigString,szOrigString2,*n,szDomain); + rt.add(wxeLocaleC2String(Result)); + break; +} +case wxLocale_GetHeaderValue: { // wxLocale::GetHeaderValue + wxString szDomain= wxEmptyString; + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + int * szHeaderLen = (int *) bp; bp += 4; + wxString szHeader = wxString(bp, wxConvUTF8); + bp += *szHeaderLen+((8-((0+ *szHeaderLen) & 7)) & 7); + while( * (int*) bp) { switch (* (int*) bp) { + case 1: {bp += 4; + int * szDomainLen = (int *) bp; bp += 4; + szDomain = wxString(bp, wxConvUTF8); + bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7); + } break; + }}; + if(!This) throw wxe_badarg(0); + wxString Result = This->GetHeaderValue(szHeader,szDomain); + rt.add(Result); + break; +} +case wxLocale_GetSysName: { // wxLocale::GetSysName + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + wxString Result = This->GetSysName(); + rt.add(Result); + break; +} +case wxLocale_GetSystemEncoding: { // wxLocale::GetSystemEncoding + int Result = wxLocale::GetSystemEncoding(); + rt.addInt(Result); + break; +} +case wxLocale_GetSystemEncodingName: { // wxLocale::GetSystemEncodingName + wxString Result = wxLocale::GetSystemEncodingName(); + rt.add(Result); + break; +} +case wxLocale_GetSystemLanguage: { // wxLocale::GetSystemLanguage + int Result = wxLocale::GetSystemLanguage(); + rt.addInt(Result); + break; +} +case wxLocale_IsLoaded: { // wxLocale::IsLoaded + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + int * szDomainLen = (int *) bp; bp += 4; + wxString szDomain = wxString(bp, wxConvUTF8); + bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7); + if(!This) throw wxe_badarg(0); + bool Result = This->IsLoaded(szDomain); + rt.addBool(Result); + break; +} +case wxLocale_IsOk: { // wxLocale::IsOk + wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + bool Result = This->IsOk(); + rt.addBool(Result); + break; +} default: { wxeReturn error = wxeReturn(WXE_DRV_PORT, Ecmd.caller, false); error.addAtom("_wxe_error_"); error.addInt((int) Ecmd.op); @@ -31441,7 +31648,7 @@ case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon }} /* The End */ -void WxeApp::delete_object(void *ptr, wxeRefData *refd) { +bool WxeApp::delete_object(void *ptr, wxeRefData *refd) { switch(refd->type) { case 24: delete (wxGridCellBoolRenderer *) ptr; break; case 25: delete (wxGridCellBoolEditor *) ptr; break; @@ -31464,6 +31671,9 @@ void WxeApp::delete_object(void *ptr, wxeRefData *refd) { case 213: /* delete (wxTextDataObject *) ptr;These objects must be deleted by owner object */ break; case 214: /* delete (wxBitmapDataObject *) ptr;These objects must be deleted by owner object */ break; case 226: delete (wxLogNull *) ptr; break; - default: delete (wxObject *) ptr; -}} + case 230: delete (EwxLocale *) ptr; return false; + default: delete (wxObject *) ptr; return false; + } + return true; +} |