X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84969af72daf3d5ffab6888dbb3c64ac868df390..0b49ccf8d66e2568e2b0de85c25b406aad39f3b1:/src/mac/carbon/uma.cpp diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 12bed00709..40fc28f1d6 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -442,11 +442,12 @@ void UMAInsertMenuItem( MenuRef menu , const wxString& title , MenuItemIndex ite // quickdraw +#if !TARGET_CARBON + int gPrOpenCounter = 0 ; -OSStatus UMAPrOpen(void *macPrintSession) +OSStatus UMAPrOpen() { -#if !TARGET_CARBON OSErr err = noErr ; ++gPrOpenCounter ; if ( gPrOpenCounter == 1 ) @@ -456,25 +457,10 @@ OSStatus UMAPrOpen(void *macPrintSession) wxASSERT( err == noErr ) ; } return err ; -#else - OSStatus err = noErr ; - ++gPrOpenCounter ; - if ( gPrOpenCounter == 1 ) - { - #if PM_USE_SESSION_APIS - err = PMCreateSession((PMPrintSession *)macPrintSession) ; - #else - err = PMBegin() ; - #endif - wxASSERT( err == noErr ) ; - } - return err ; -#endif } -OSStatus UMAPrClose(void *macPrintSession) +OSStatus UMAPrClose() { -#if !TARGET_CARBON OSErr err = noErr ; wxASSERT( gPrOpenCounter >= 1 ) ; if ( gPrOpenCounter == 1 ) @@ -485,25 +471,8 @@ OSStatus UMAPrClose(void *macPrintSession) } --gPrOpenCounter ; return err ; -#else - OSStatus err = noErr ; - wxASSERT( gPrOpenCounter >= 1 ) ; - if ( gPrOpenCounter == 1 ) - { - #if PM_USE_SESSION_APIS - err = PMRelease(*(PMPrintSession *)macPrintSession) ; - *(PMPrintSession *)macPrintSession = kPMNoReference; - #else - err = PMEnd() ; - #endif - } - --gPrOpenCounter ; - return err ; -#endif } -#if !TARGET_CARBON - pascal QDGlobalsPtr GetQDGlobalsPtr (void) ; pascal QDGlobalsPtr GetQDGlobalsPtr (void) {