X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a689a4d09a65e3eda2cad1eb34320238b01c8151..89fcec9514fd890de58da83118363570e2482bc9:/src/mac/carbon/uma.cpp diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 044ef97c96..2c70ef47b7 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -3,7 +3,7 @@ #include "wx/mac/uma.h" #include "wx/mac/aga.h" -#ifndef __UNIX__ +#ifndef __DARWIN__ #include #endif @@ -84,7 +84,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) #endif // UMA_USE_WINDOWMGR #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ #if TARGET_CARBON // Call currently implicitely done : InitFloatingWindows() ; #else @@ -289,10 +289,10 @@ void UMAInsertMenu( MenuRef insertMenu , SInt16 afterId ) int gPrOpenCounter = 0 ; -#if !TARGET_CARBON -OSStatus UMAPrOpen() +#if TARGET_CARBON && PM_USE_SESSION_APIS +OSStatus UMAPrOpen(PMPrintSession *macPrintSession) #else -OSStatus UMAPrOpen(PMPrintSession *macPrintPort) +OSStatus UMAPrOpen() #endif { #if !TARGET_CARBON @@ -311,7 +311,7 @@ OSStatus UMAPrOpen(PMPrintSession *macPrintPort) if ( gPrOpenCounter == 1 ) { #if PM_USE_SESSION_APIS - err = PMCreateSession(macPrintPort) ; + err = PMCreateSession(macPrintSession) ; #else err = PMBegin() ; #endif @@ -321,10 +321,10 @@ OSStatus UMAPrOpen(PMPrintSession *macPrintPort) #endif } -#if !TARGET_CARBON -OSStatus UMAPrClose() +#if TARGET_CARBON && PM_USE_SESSION_APIS +OSStatus UMAPrClose(PMPrintSession *macPrintSession) #else -OSStatus UMAPrClose(PMPrintSession *macPrintPort) +OSStatus UMAPrClose() #endif { #if !TARGET_CARBON @@ -344,7 +344,8 @@ OSStatus UMAPrClose(PMPrintSession *macPrintPort) if ( gPrOpenCounter == 1 ) { #if PM_USE_SESSION_APIS - err = PMRelease(*macPrintPort) ; + err = PMRelease(*macPrintSession) ; + *macPrintSession = kPMNoReference; #else err = PMEnd() ; #endif