add wxAppConsoleBase::OnEventLoopEnter/Exit callbacks; add wxEventLoopBase::IsMain() and wxAppConsoleBase::GetMainLoop() helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,6 +34,28 @@ wxEventLoopBase::wxEventLoopBase()
|
||||
m_eventsToProcessInsideYield = wxEVT_CATEGORY_ALL;
|
||||
}
|
||||
|
||||
bool wxEventLoopBase::IsMain() const
|
||||
{
|
||||
if (wxTheApp)
|
||||
return wxTheApp->GetMainLoop() == this;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void wxEventLoopBase::SetActive(wxEventLoopBase* loop)
|
||||
{
|
||||
ms_activeLoop = loop;
|
||||
|
||||
if (wxTheApp)
|
||||
wxTheApp->OnEventLoopEnter(loop);
|
||||
}
|
||||
|
||||
void wxEventLoopBase::OnExit()
|
||||
{
|
||||
if (wxTheApp)
|
||||
wxTheApp->OnEventLoopExit(this);
|
||||
}
|
||||
|
||||
void wxEventLoopBase::DelayPendingEventHandler(wxEvtHandler* toDelay)
|
||||
{
|
||||
wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker);
|
||||
|
||||
Reference in New Issue
Block a user