// mac
-#ifndef __UNIX__
+#ifndef __DARWIN__
#if __option(profile)
#include <profiler.h>
#endif
#include "wx/mac/macnotfy.h"
#if wxUSE_SOCKETS
- #ifdef __APPLE__
+ #ifdef __DARWIN__
#include <CoreServices/CoreServices.h>
#else
#include <OpenTransport.h>
SetEventMask( everyEvent ) ;
UMAShowWatchCursor() ;
-#ifdef __UNIX__
- AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , AEHandleODoc ,
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
+ AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , NewAEEventHandlerUPP(AEHandleODoc) ,
(long) wxTheApp , FALSE ) ;
- AEInstallEventHandler( kCoreEventClass , kAEOpenApplication , AEHandleOApp ,
+ AEInstallEventHandler( kCoreEventClass , kAEOpenApplication , NewAEEventHandlerUPP(AEHandleOApp) ,
(long) wxTheApp , FALSE ) ;
- AEInstallEventHandler( kCoreEventClass , kAEPrintDocuments , AEHandlePDoc ,
+ AEInstallEventHandler( kCoreEventClass , kAEPrintDocuments , NewAEEventHandlerUPP(AEHandlePDoc) ,
(long) wxTheApp , FALSE ) ;
- AEInstallEventHandler( kCoreEventClass , kAEQuitApplication , AEHandleQuit ,
+ AEInstallEventHandler( kCoreEventClass , kAEQuitApplication , NewAEEventHandlerUPP(AEHandleQuit) ,
(long) wxTheApp , FALSE ) ;
#else
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , NewAEEventHandlerProc(AEHandleODoc) ,
#endif
-#ifndef __UNIX__
+#ifndef __DARWIN__
// test the minimal configuration necessary
#if !TARGET_CARBON
return FALSE ;
}
-#ifndef __UNIX__
+#ifndef __DARWIN__
#if __option(profile)
ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
#endif
// now avoid exceptions thrown for new (bad_alloc)
-#ifndef __UNIX__
+#ifndef __DARWIN__
std::__throws_bad_alloc = FALSE ;
#endif
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
+#ifdef __WXDEBUG__
#if wxUSE_LOG
// flush the logged messages if any and install a 'safer' log target: the
// default one (wxLogGui) can't be used after the resources are freed just
// this will flush the old messages if any
delete wxLog::SetActiveTarget(new wxLogStderr);
#endif // wxUSE_LOG
+#endif
wxInitializeStockLists();
wxInitializeStockObjects();
wxClassInfo::CleanUpClasses();
-#ifndef __UNIX__
+#ifndef __DARWIN__
#if __option(profile)
ProfilerDump( "\papp.prof" ) ;
ProfilerTerm() ;
#endif
EventRecord event ;
- long sleepTime = 0 ; //::GetCaretTime();
+ long sleepTime = 1 ; //::GetCaretTime();
while ( !wxTheApp->IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, wxApp::s_macCursorRgn))
{
wxTheApp->MacHandleOneEvent( &event );
+ if ( event.what != kHighLevelEvent )
+ SetRectRgn( wxApp::s_macCursorRgn , event.where.h , event.where.v , event.where.h + 1 , event.where.v + 1 ) ;
}
wxMacProcessNotifierAndPendingEvents() ;
wxTheApp->ProcessIdle() ;
}
if ( event.what != kHighLevelEvent )
- SetRectRgn( s_macCursorRgn , event.where.h - 1 , event.where.v - 1, event.where.h + 1 , event.where.v + 1 ) ;
+ SetRectRgn( s_macCursorRgn , event.where.h , event.where.v , event.where.h + 1 , event.where.v + 1 ) ;
// repeaters
}
else
{
+ if ( win )
+ win->MacMouseDown( ev , windowPart ) ;
UMASelectWindow( window ) ;
}
}