extern void wxSetKeyboardHook(bool doIt);
#endif
-namespace
-{
-
+// because of mingw32 4.3 bug this struct can't be inside the namespace below:
+// see http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/110282
struct ClassRegInfo
{
// the base name of the class: this is used to construct the unique name in
- // RegisterClassWithUniqueNames()
+ // wxApp::GetRegisteredClassName()
wxString basename;
// the name of the registered class with and without CS_[HV]REDRAW styles
regnameNR;
};
+namespace
+{
+
wxVector<ClassRegInfo> gs_regClassesInfo;
} // anonymous namespace
return new ChildWaitLoopData(wd, winActive);
}
-void wxGUIAppTraits::AlwaysYield()
-{
- wxYield();
-}
-
void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig)
{
wxEndBusyCursor();
GetConsoleCommandHistory_t m_pfnGetConsoleCommandHistory;
GetConsoleCommandHistoryLength_t m_pfnGetConsoleCommandHistoryLength;
- DECLARE_NO_COPY_CLASS(wxConsoleStderr)
+ wxDECLARE_NO_COPY_CLASS(wxConsoleStderr);
};
bool wxConsoleStderr::DoInit()
#endif // !__WXWINCE__
-// ----------------------------------------------------------------------------
-// Yield to incoming messages
-// ----------------------------------------------------------------------------
-
-bool wxApp::Yield(bool onlyIfNeeded)
-{
- if ( m_isInsideYield )
- {
- if ( !onlyIfNeeded )
- {
- wxFAIL_MSG( wxT("wxYield called recursively" ) );
- }
-
- return false;
- }
-
- // set the flag and don't forget to reset it before returning
- m_isInsideYield = true;
- wxON_BLOCK_EXIT_SET(m_isInsideYield, false);
-
-
-#if wxUSE_LOG
- // disable log flushing from here because a call to wxYield() shouldn't
- // normally result in message boxes popping up &c
- wxLog::Suspend();
-
- // ensure the logs will be flashed again when we exit
- wxON_BLOCK_EXIT0(wxLog::Resume);
-#endif // wxUSE_LOG
-
-
- // we don't want to process WM_QUIT from here - it should be processed in
- // the main event loop in order to stop it
- wxEventLoopGuarantor dummyLoopIfNeeded;
- MSG msg;
- while ( PeekMessage(&msg, (HWND)0, 0, 0, PM_NOREMOVE) &&
- msg.message != WM_QUIT )
- {
-#if wxUSE_THREADS
- wxMutexGuiLeaveOrEnter();
-#endif // wxUSE_THREADS
-
- if ( !wxTheApp->Dispatch() )
- break;
- }
-
- // if there are pending events, we must process them.
- ProcessPendingEvents();
-
- return true;
-}
-
#if wxUSE_EXCEPTIONS
// ----------------------------------------------------------------------------