#include "wx/mac/uma.h"
#include "wx/mac/aga.h"
-#ifndef __UNIX__
+#ifndef __DARWIN__
#include <Navigation.h>
#endif
#endif // UMA_USE_WINDOWMGR
#endif
-#ifndef __UNIX__
+#ifndef __DARWIN__
#if TARGET_CARBON
// Call currently implicitely done : InitFloatingWindows() ;
#else
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
if ( gPrOpenCounter == 1 )
{
#if PM_USE_SESSION_APIS
- err = PMCreateSession(macPrintPort) ;
+ err = PMCreateSession(macPrintSession) ;
#else
err = PMBegin() ;
#endif
#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
if ( gPrOpenCounter == 1 )
{
#if PM_USE_SESSION_APIS
- err = PMRelease(*macPrintPort) ;
+ err = PMRelease(*macPrintSession) ;
+ *macPrintSession = kPMNoReference;
#else
err = PMEnd() ;
#endif