]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected conditional compilation for Universal Interfaces (3.4 or later)
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Thu, 10 May 2001 20:52:48 +0000 (20:52 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Thu, 10 May 2001 20:52:48 +0000 (20:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/app.cpp
src/mac/carbon/app.cpp
src/mac/carbon/control.cpp
src/mac/carbon/timer.cpp
src/mac/control.cpp
src/mac/timer.cpp

index 314d307ec8854dca1697dfc2d83d9f338d855af2..f54dbe1e63937e9662815c6103d38d654deedf48 100644 (file)
@@ -353,14 +353,14 @@ bool wxApp::Initialize()
   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) ,
index 314d307ec8854dca1697dfc2d83d9f338d855af2..f54dbe1e63937e9662815c6103d38d654deedf48 100644 (file)
@@ -353,14 +353,14 @@ bool wxApp::Initialize()
   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) ,
index 9f495d36efbd710171eb35f448c5edb7add4c4f2..df3790521ac6fdc21f547c9c520369da1dbe313d 100644 (file)
@@ -70,7 +70,7 @@ wxControl::wxControl()
 
        if ( wxMacLiveScrollbarActionUPP == NULL )
        {
-#ifdef __UNIX__
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
         wxMacLiveScrollbarActionUPP = NewControlActionUPP( wxMacLiveScrollbarActionProc );
 #else
                wxMacLiveScrollbarActionUPP = NewControlActionProc( wxMacLiveScrollbarActionProc ) ;
index a958d21f1ff37849bad8cc01d9670073d372a8fc..107906e76390397021ded29b072e42561e845348 100644 (file)
@@ -72,7 +72,7 @@ bool wxTimer::Start(int milliseconds,bool mode)
     wxCHECK_MSG( m_info.m_task.tmAddr == NULL , FALSE, wxT("attempting to restart a timer") );
 
     m_milli = milliseconds;
-#ifdef __UNIX__
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
     m_info.m_task.tmAddr = NewTimerUPP( MacTimerProc ) ;
 #else
     m_info.m_task.tmAddr = NewTimerProc( MacTimerProc ) ;
index 9f495d36efbd710171eb35f448c5edb7add4c4f2..df3790521ac6fdc21f547c9c520369da1dbe313d 100644 (file)
@@ -70,7 +70,7 @@ wxControl::wxControl()
 
        if ( wxMacLiveScrollbarActionUPP == NULL )
        {
-#ifdef __UNIX__
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
         wxMacLiveScrollbarActionUPP = NewControlActionUPP( wxMacLiveScrollbarActionProc );
 #else
                wxMacLiveScrollbarActionUPP = NewControlActionProc( wxMacLiveScrollbarActionProc ) ;
index a958d21f1ff37849bad8cc01d9670073d372a8fc..107906e76390397021ded29b072e42561e845348 100644 (file)
@@ -72,7 +72,7 @@ bool wxTimer::Start(int milliseconds,bool mode)
     wxCHECK_MSG( m_info.m_task.tmAddr == NULL , FALSE, wxT("attempting to restart a timer") );
 
     m_milli = milliseconds;
-#ifdef __UNIX__
+#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
     m_info.m_task.tmAddr = NewTimerUPP( MacTimerProc ) ;
 #else
     m_info.m_task.tmAddr = NewTimerProc( MacTimerProc ) ;