package ch.cyberduck.binding.application;

/*
 * Copyright (c) 2002-2009 David Kocher. All rights reserved.
 *
 * http://cyberduck.ch/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 for more details.
 *
 * Bug fixes, suggestions and comments should be sent to:
 * dkocher@cyberduck.ch
 */

import ch.cyberduck.binding.foundation.NSObject;

import org.rococoa.ObjCClass;

/**
 * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
 * a tool written by <a href="http://ochafik.free.fr/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
 * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a>, <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.
 */
public abstract class NSPrintOperation extends NSObject {
    static final _Class CLASS = org.rococoa.Rococoa.createClass("NSPrintOperation", _Class.class);

    /**
     * Factory methods that create a new NSPrintOperation for printing, copying to Portable Document Format, or copying to Encapsulated PostScript. The passed-in NSPrintInfo is copied, and the copy is retained by the new NSPrintOperation. (So, no need to copy the NSPrintInfo you pass to these.) You can get the copy with -printInfo.<br>
     * Original signature : <code>+(NSPrintOperation*)printOperationWithView:(NSView*) printInfo:(NSPrintInfo*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:90</i>
     */
    public static NSPrintOperation printOperationWithView_printInfo(NSView view, NSPrintInfo printInfo) {
        return CLASS.printOperationWithView_printInfo(view, printInfo);
    }

    /**
     * Slight conveniences, for use when the application's global NSPrintInfo is appropriate. Each of these methods invokes [NSPrintInfo sharedPrintInfo] and then invokes the like-named method listed above.<br>
     * Original signature : <code>+(NSPrintOperation*)printOperationWithView:(NSView*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:98</i>
     */
    public static NSPrintOperation printOperationWithView(NSView view) {
        return CLASS.printOperationWithView(view);
    }

    /**
     * The current print operation for this thread. If this is nil, there is no current operation for the current thread.<br>
     * Original signature : <code>+(NSPrintOperation*)currentOperation</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:104</i>
     */
    public static NSPrintOperation currentOperation() {
        return CLASS.currentOperation();
    }

    /**
     * Original signature : <code>+(void)setCurrentOperation:(NSPrintOperation*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:105</i>
     */
    public static void setCurrentOperation(NSPrintOperation operation) {
        CLASS.setCurrentOperation(operation);
    }

    public interface _Class extends ObjCClass {
        /**
         * Factory methods that create a new NSPrintOperation for printing, copying to Portable Document Format, or copying to Encapsulated PostScript. The passed-in NSPrintInfo is copied, and the copy is retained by the new NSPrintOperation. (So, no need to copy the NSPrintInfo you pass to these.) You can get the copy with -printInfo.<br>
         * Original signature : <code>+(NSPrintOperation*)printOperationWithView:(NSView*) printInfo:(NSPrintInfo*)</code><br>
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:90</i>
         */
        NSPrintOperation printOperationWithView_printInfo(NSView view, NSPrintInfo printInfo);
        /**
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:91</i><br>
         * Conversion Error : /// Original signature : <code>+(NSPrintOperation*)PDFOperationWithView:(NSView*) insideRect:() toData:(NSMutableData*) printInfo:(NSPrintInfo*)</code><br>
         * + (NSPrintOperation*)PDFOperationWithView:(NSView*)view insideRect:(null)rect toData:(NSMutableData*)data printInfo:(NSPrintInfo*)printInfo; (Argument rect cannot be converted)
         */
        /**
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:92</i><br>
         * Conversion Error : /// Original signature : <code>+(NSPrintOperation*)PDFOperationWithView:(NSView*) insideRect:() toPath:(NSString*) printInfo:(NSPrintInfo*)</code><br>
         * + (NSPrintOperation*)PDFOperationWithView:(NSView*)view insideRect:(null)rect toPath:(NSString*)path printInfo:(NSPrintInfo*)printInfo; (Argument rect cannot be converted)
         */
        /**
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:93</i><br>
         * Conversion Error : /// Original signature : <code>+(NSPrintOperation*)EPSOperationWithView:(NSView*) insideRect:() toData:(NSMutableData*) printInfo:(NSPrintInfo*)</code><br>
         * + (NSPrintOperation*)EPSOperationWithView:(NSView*)view insideRect:(null)rect toData:(NSMutableData*)data printInfo:(NSPrintInfo*)printInfo; (Argument rect cannot be converted)
         */
        /**
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:94</i><br>
         * Conversion Error : /// Original signature : <code>+(NSPrintOperation*)EPSOperationWithView:(NSView*) insideRect:() toPath:(NSString*) printInfo:(NSPrintInfo*)</code><br>
         * + (NSPrintOperation*)EPSOperationWithView:(NSView*)view insideRect:(null)rect toPath:(NSString*)path printInfo:(NSPrintInfo*)printInfo; (Argument rect cannot be converted)
         */
        /**
         * Slight conveniences, for use when the application's global NSPrintInfo is appropriate. Each of these methods invokes [NSPrintInfo sharedPrintInfo] and then invokes the like-named method listed above.<br>
         * Original signature : <code>+(NSPrintOperation*)printOperationWithView:(NSView*)</code><br>
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:98</i>
         */
        NSPrintOperation printOperationWithView(NSView view);
        /**
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:99</i><br>
         * Conversion Error : /// Original signature : <code>+(NSPrintOperation*)PDFOperationWithView:(NSView*) insideRect:() toData:(NSMutableData*)</code><br>
         * + (NSPrintOperation*)PDFOperationWithView:(NSView*)view insideRect:(null)rect toData:(NSMutableData*)data; (Argument rect cannot be converted)
         */
        /**
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:100</i><br>
         * Conversion Error : /// Original signature : <code>+(NSPrintOperation*)EPSOperationWithView:(NSView*) insideRect:() toData:(NSMutableData*)</code><br>
         * + (NSPrintOperation*)EPSOperationWithView:(NSView*)view insideRect:(null)rect toData:(NSMutableData*)data; (Argument rect cannot be converted)
         */
        /**
         * The current print operation for this thread. If this is nil, there is no current operation for the current thread.<br>
         * Original signature : <code>+(NSPrintOperation*)currentOperation</code><br>
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:104</i>
         */
        NSPrintOperation currentOperation();

        /**
         * Original signature : <code>+(void)setCurrentOperation:(NSPrintOperation*)</code><br>
         * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:105</i>
         */
        void setCurrentOperation(NSPrintOperation operation);

        /// <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h</i>
        NSPrintOperation alloc();
    }

    /**
     * Return YES if the operation for copying to PDF or EPS, NO if it's for printing.<br>
     * Original signature : <code>-(BOOL)isCopyingOperation</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:109</i>
     */
    public abstract boolean isCopyingOperation();

    /**
     * The title of the print job. If a job title is set it overrides anything that might be gotten by sending the printed view an [NSView(NSPrinting) printJobTitle] message.<br>
     * Original signature : <code>-(void)setJobTitle:(NSString*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:115</i>
     */
    public abstract void setJobTitle(com.sun.jna.Pointer jobTitle);

    /**
     * Original signature : <code>-(NSString*)jobTitle</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:116</i>
     */
    public abstract com.sun.jna.Pointer jobTitle();

    /**
     * Whether the print and progress panels are shown during the operation.<br>
     * Original signature : <code>-(void)setShowsPrintPanel:(BOOL)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:124</i>
     */
    public abstract void setShowsPrintPanel(boolean flag);

    /**
     * Original signature : <code>-(BOOL)showsPrintPanel</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:125</i>
     */
    public abstract boolean showsPrintPanel();

    /**
     * Original signature : <code>-(void)setShowsProgressPanel:(BOOL)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:126</i>
     */
    public abstract void setShowsProgressPanel(boolean flag);

    /**
     * Original signature : <code>-(BOOL)showsProgressPanel</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:127</i>
     */
    public abstract boolean showsProgressPanel();

    /**
     * The print panel to be presented by the operation when it is run, if showsProgressPanel is YES and isCopyingOperation is NO. -printPanel will create a new NSPrintPanel if one hasn't been set yet.<br>
     * Original signature : <code>-(void)setPrintPanel:(NSPrintPanel*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:133</i>
     */
    public abstract void setPrintPanel(NSPrintPanel panel);

    /**
     * Original signature : <code>-(NSPrintPanel*)printPanel</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:134</i>
     */
    public abstract NSPrintPanel printPanel();

    /**
     * Whether the print operation should spawn a separate thread in which to run itself.<br>
     * Original signature : <code>-(void)setCanSpawnSeparateThread:(BOOL)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:138</i>
     */
    public abstract void setCanSpawnSeparateThread(boolean canSpawnSeparateThread);

    /**
     * Original signature : <code>-(BOOL)canSpawnSeparateThread</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:139</i>
     */
    public abstract boolean canSpawnSeparateThread();

    /**
     * The page order that will be used to generate the pages in this job. This is the physical page order of the pages. It depends on the stacking order of the printer, the capability of the app to reverse page order, etc.<br>
     * Original signature : <code>-(void)setPageOrder:(NSPrintingPageOrder)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:143</i><br>
     *
     * @param pageOrder @see AppKitLibrary#NSPrintingPageOrder
     */
    public abstract void setPageOrder(int pageOrder);

    /**
     * Original signature : <code>-(NSPrintingPageOrder)pageOrder</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:144</i>
     */
    public abstract /**
     * @see AppKitLibrary#NSPrintingPageOrder
     */
    int pageOrder();

    /**
     * Do the print operation, with panels that are document-modal to a specific window. When the operation has been completed, send the message selected by didRunSelector to the delegate, with the contextInfo as the last argument. The method selected by didRunSelector must have the same signature as:<br>
     * - (void)printOperationDidRun:(NSPrintOperation *)printOperation success:(BOOL)success contextInfo:(void *)contextInfo;<br>
     * This can only be invoked once. Create a new NSPrintOperation instance for each operation. When this method completes, the object is removed from being the current operation if it is the current operation.<br>
     * Original signature : <code>-(void)runOperationModalForWindow:(NSWindow*) delegate:(id) didRunSelector:(SEL) contextInfo:(void*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:152</i>
     */
    public abstract void runOperationModalForWindow_delegate_didRunSelector_contextInfo(NSWindow docWindow, org.rococoa.ID delegate, org.rococoa.Selector didRunSelector, NSObject contextInfo);

    /**
     * Do the print operation, with application-modal panels. Return YES if the operation completed successfully, NO if there was an error or the user cancelled the operation. This can only be invoked once. Create a new NSPrintOperation instance for each operation. When this method completes, the object is removed from being the current operation if it is the current operation.<br>
     * Original signature : <code>-(BOOL)runOperation</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:156</i>
     */
    public abstract boolean runOperation();

    /**
     * The view being printed.<br>
     * Original signature : <code>-(NSView*)view</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:160</i>
     */
    public abstract NSView view();

    /**
     * The print info of the operation. -printInfo always returns a copy of the NSPrintInfo passed into the factory method used to create the print operation, unless -setPrintInfo: has been invoked, in which case it returns the exact same object passed into -setPrintInfo:. So, the factory methods listed above copy the passed-in NSPrintInfo, but -setPrintInfo: doesn't.<br>
     * Original signature : <code>-(NSPrintInfo*)printInfo</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:164</i>
     */
    public abstract NSPrintInfo printInfo();

    /**
     * Original signature : <code>-(void)setPrintInfo:(NSPrintInfo*)</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:165</i>
     */
    public abstract void setPrintInfo(NSPrintInfo printInfo);

    /**
     * The context for the output of this operation.<br>
     * Original signature : <code>-(NSGraphicsContext*)context</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:169</i>
     */
    public abstract com.sun.jna.Pointer context();

    /**
     * The first through last one-based page numbers of the operation as it's being previewed or printed. The first page number might not be 1, and the page count might be NSIntegerMax to indicate that the number of pages is not known, depending on what the printed view returned when sent an [NSView(NSPrinting) knowsPageRange:] message.<br>
     * Original signature : <code>-(id)pageRange</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:175</i>
     */
    public abstract org.rococoa.ID pageRange();

    /**
     * The current one-based page number of the operation as it's being previewed or printed.<br>
     * Original signature : <code>-(NSInteger)currentPage</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:181</i>
     */
    public abstract org.rococoa.cocoa.foundation.NSInteger currentPage();

    /**
     * Methods that are invoked by the print operation itself as it proceeds. You should not invoke them.<br>
     * Original signature : <code>-(NSGraphicsContext*)createContext</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:185</i>
     */
    public abstract com.sun.jna.Pointer createContext();

    /**
     * Original signature : <code>-(void)destroyContext</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:186</i>
     */
    public abstract void destroyContext();

    /**
     * Original signature : <code>-(BOOL)deliverResult</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:187</i>
     */
    public abstract boolean deliverResult();

    /**
     * Original signature : <code>-(void)cleanUpOperation</code><br>
     * <i>native declaration : /System/Library/Frameworks/framework/Headers/AppKitDefines.h:188</i>
     */
    public abstract void cleanUpOperation();
}
