X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87df17a11b0017d31c09f767bd921abb27193bee..dbcbe229628c7667da2b6257198467d4f09ab28d:/src/mac/uma.cpp diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index e0e3bdf35f..2c70ef47b7 100644 --- a/src/mac/uma.cpp +++ b/src/mac/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,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