/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#import "PrintModel.h"
#import "PrinterView.h"
#import "ThreadUtilities.h"
if (self) {
}
return self;
}
- (void)dealloc {
fPrintInfo = nil;
[super dealloc];
}
//- (void)finalize { [super finalize]; }
- (BOOL)runPageSetup {
}];
return fResult;
}
- (BOOL)runJobSetup {
}];
return fResult;
}
{
// <rdar://problem/4310184> Because people like to put up modal dialogs during print operations,
// we have to run the print operation on a non-AppKit thread or else we get a deadlock and errors
// the AppKit team believes it's OK for us to call runOperation from non-AppKit threads,
// as long as we don't show any panels, and we don't touch the NSPrintInfo or the NSView from other threads.
if (wait) {
} else {
// Retain these so they don't go away while we're in Java
JNFCallStaticVoidMethod(env, jm_detachPrintLoop, ptr_to_jlong(self), ptr_to_jlong(printerView)); // AWT_THREADING Safe (known object)
}
return fResult;
}
{
@try {
NSPrintOperation* printLoop = [NSPrintOperation printOperationWithView:printerView printInfo:fPrintInfo];
//[printLoop setCanSpawnSeparateThread:YES]; //+++gdb Need to check this...
} @finally {
// Tell CPrinterJob that things are done.
}
return fResult;
}
@end
/*
* Class: sun_lwawt_macosx_CPrinterJob
* Method: _safePrintLoop
* Signature: (JJ)V
*/
{
// These are to match the retains in runPrintLoopWithView:
}