]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected conditional compilation
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Thu, 28 Jun 2001 06:30:58 +0000 (06:30 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Thu, 28 Jun 2001 06:30:58 +0000 (06:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/uma.h
src/mac/carbon/uma.cpp
src/mac/uma.cpp

index 01885e751968e5cc68fbc39740d83db8f269cb0a..6133502a6b64b85e66c17ced39acb7cb1e179f5c 100644 (file)
@@ -82,9 +82,9 @@ void                  UMADrawMenuBar() ;
 void                   UMAShowWatchCursor() ;
 void                   UMAShowArrowCursor() ;
 
-#if PM_USE_SESSION_APIS
-OSStatus               UMAPrOpen(PMPrintSession *macPrintPort) ;
-OSStatus               UMAPrClose(PMPrintSession *macPrintPort) ;
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus               UMAPrOpen(PMPrintSession *macPrintSession) ;
+OSStatus               UMAPrClose(PMPrintSession *macPrintSession) ;
 #else
 OSStatus               UMAPrOpen() ;
 OSStatus               UMAPrClose() ;
index e0e3bdf35f88a621b63cf258ace2b03d3e59860f..52e0497c558d7000867570bcd526b1fc038ac60f 100644 (file)
@@ -289,8 +289,8 @@ void UMAInsertMenu( MenuRef insertMenu , SInt16 afterId )
 
 int gPrOpenCounter = 0 ;
 
-#if PM_USE_SESSION_APIS
-OSStatus UMAPrOpen(PMPrintSession *macPrintPort)
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus UMAPrOpen(PMPrintSession *macPrintSession)
 #else
 OSStatus UMAPrOpen()
 #endif
@@ -311,7 +311,7 @@ OSStatus UMAPrOpen()
        if ( gPrOpenCounter == 1 )
        {
   #if PM_USE_SESSION_APIS
-           err = PMCreateSession(macPrintPort) ;
+           err = PMCreateSession(macPrintSession) ;
   #else
            err = PMBegin() ;
   #endif
@@ -321,8 +321,8 @@ OSStatus UMAPrOpen()
 #endif
 }
 
-#if PM_USE_SESSION_APIS
-OSStatus UMAPrClose(PMPrintSession *macPrintPort)
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus UMAPrClose(PMPrintSession *macPrintSession)
 #else
 OSStatus UMAPrClose()
 #endif
@@ -344,7 +344,8 @@ OSStatus UMAPrClose()
        if ( gPrOpenCounter == 1 )
        {
   #if PM_USE_SESSION_APIS
-           err = PMRelease(*macPrintPort) ;
+           err = PMRelease(*macPrintSession) ;
+           *macPrintSession = kPMNoReference;
   #else
            err = PMEnd() ;
   #endif
index e0e3bdf35f88a621b63cf258ace2b03d3e59860f..52e0497c558d7000867570bcd526b1fc038ac60f 100644 (file)
@@ -289,8 +289,8 @@ void UMAInsertMenu( MenuRef insertMenu , SInt16 afterId )
 
 int gPrOpenCounter = 0 ;
 
-#if PM_USE_SESSION_APIS
-OSStatus UMAPrOpen(PMPrintSession *macPrintPort)
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus UMAPrOpen(PMPrintSession *macPrintSession)
 #else
 OSStatus UMAPrOpen()
 #endif
@@ -311,7 +311,7 @@ OSStatus UMAPrOpen()
        if ( gPrOpenCounter == 1 )
        {
   #if PM_USE_SESSION_APIS
-           err = PMCreateSession(macPrintPort) ;
+           err = PMCreateSession(macPrintSession) ;
   #else
            err = PMBegin() ;
   #endif
@@ -321,8 +321,8 @@ OSStatus UMAPrOpen()
 #endif
 }
 
-#if PM_USE_SESSION_APIS
-OSStatus UMAPrClose(PMPrintSession *macPrintPort)
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus UMAPrClose(PMPrintSession *macPrintSession)
 #else
 OSStatus UMAPrClose()
 #endif
@@ -344,7 +344,8 @@ OSStatus UMAPrClose()
        if ( gPrOpenCounter == 1 )
        {
   #if PM_USE_SESSION_APIS
-           err = PMRelease(*macPrintPort) ;
+           err = PMRelease(*macPrintSession) ;
+           *macPrintSession = kPMNoReference;
   #else
            err = PMEnd() ;
   #endif