IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
-#ifdef __WXDEBUG__
extern "C"
{
typedef int (*XErrorHandlerFunc)(Display *, XErrorEvent *);
}
}
-#endif // __WXDEBUG__
bool wxApp::Initialize(int& argc_, wxChar **argv_)
{
strcmp(loc, "POSIX") == 0 )
{
// we're using C locale, "fix" it
- wxLogDebug(_T("HP-UX fontset hack: forcing locale to en_US.iso88591"));
+ wxLogDebug(wxT("HP-UX fontset hack: forcing locale to en_US.iso88591"));
putenv(fixAll ? "LC_ALL=en_US.iso88591" : "LC_CTYPE=en_US.iso88591");
}
#endif // __HPUX__
// immediate crash inside XOpenIM() (if XIM is used) under IRIX
wxString appname = wxTheApp->GetAppName();
if ( appname.empty() )
- appname = _T("wxapp");
+ appname = wxT("wxapp");
wxString clsname = wxTheApp->GetClassName();
if ( clsname.empty() )
- clsname = _T("wx");
+ clsname = wxT("wx");
// FIXME-UTF8: This code is taken from wxGTK and duplicated here. This
// is just a temporary fix to make wxX11 compile in Unicode
}
m_initialDisplay = (WXDisplay*) dpy;
-#ifdef __WXDEBUG__
// install the X error handler
gs_pfnXErrorHandler = XSetErrorHandler(wxXErrorHandler);
-#endif // __WXDEBUG__
// Add general resize proc
XtActionsRec rec;
{
wxAppBase::CleanUp();
- delete wxWidgetHashTable;
- wxWidgetHashTable = NULL;
+ wxDELETE(wxWidgetHashTable);
delete m_mainLoop;
.m_topLevelRealizedWidget = (Widget)widget;
}
-// Yield to other processes
-
-bool wxApp::DoYield(bool onlyIfNeeded, long eventsToProcess)
-{
- if ( m_isInsideYield )
- {
- if ( !onlyIfNeeded )
- {
- wxFAIL_MSG( wxT("wxYield called recursively" ) );
- }
-
- return false;
- }
-
- m_isInsideYield = true;
- m_eventsToProcessInsideYield = eventsToProcess;
-
- wxEventLoopGuarantor dummyLoopIfNeeded;
- while (wxTheApp && wxTheApp->Pending())
- // TODO: implement event filtering using the eventsToProcess mask
- wxTheApp->Dispatch();
-
- m_isInsideYield = false;
-
- return true;
-}
// ----------------------------------------------------------------------------
// accessors for C modules