X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fd5903a1b3892bf001f210771dd4c628bec08c6..93f467a3b4d1eda959b44cc01df34b4463383cfe:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index 0c3b44ea09..e734fb9e83 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -17,7 +17,14 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__) +// Some older compilers (such as EMX) cannot handle +// #pragma interface/implementation correctly, iff +// #pragma implementation is used in _two_ translation +// units (as created by e.g. event.cpp compiled for +// libwx_base and event.cpp compiled for libwx_gui_core). +// So we must not use those pragmas for those compilers in +// such files. #pragma implementation "event.h" #endif @@ -304,16 +311,6 @@ int wxNewEventType() // MT-FIXME static int s_lastUsedEventType = wxEVT_FIRST; -#if WXWIN_COMPATIBILITY_2 - // check that we don't overlap with the user-defined types: if it does - // happen, the best solution is probably to update the existing code to - // use wxNewEventType() instead of wxEVT_USER_FIRST - // - // due to the uncertainty - wxASSERT_MSG( s_lastUsedEventType < wxEVT_USER_FIRST - 1, - _T("possible event type conflict") ); -#endif // WXWIN_COMPATIBILITY_2 - return s_lastUsedEventType++; } @@ -390,7 +387,7 @@ long wxUpdateUIEvent::sm_updateInterval = 0; wxUpdateUIMode wxUpdateUIEvent::sm_updateMode = wxUPDATE_UI_PROCESS_ALL; // Can we update? -bool wxUpdateUIEvent::CanUpdate(wxWindow* win) +bool wxUpdateUIEvent::CanUpdate(wxWindowBase *win) { // Don't update if we've switched global updating off // and this window doesn't support updates. @@ -713,6 +710,9 @@ wxChildFocusEvent::wxChildFocusEvent(wxWindow *win) #endif // wxUSE_GUI + +#if wxUSE_BASE + // ---------------------------------------------------------------------------- // wxEventHashTable // ---------------------------------------------------------------------------- @@ -893,8 +893,6 @@ void wxEventHashTable::GrowEventTypeTable() // wxEvtHandler // ---------------------------------------------------------------------------- -#if wxUSE_BASE - /* * Event handler */ @@ -1106,10 +1104,8 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event) { // if we have a validator, it has higher priority than our own event // table -#if wxUSE_VALIDATORS if ( TryValidator(event) ) return TRUE; -#endif // wxUSE_VALIDATORS // Handle per-instance dynamic event tables first if ( m_dynamicEvents && SearchDynamicEventTable(event) ) @@ -1322,17 +1318,6 @@ void *wxEvtHandler::DoGetClientData() const return m_clientData; } - -#if WXWIN_COMPATIBILITY -bool wxEvtHandler::OnClose() -{ - if (GetNextHandler()) - return GetNextHandler()->OnClose(); - else - return FALSE; -} -#endif // WXWIN_COMPATIBILITY - #endif // wxUSE_BASE #if wxUSE_GUI