1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_awt_XPrinter_idl__ 28#define __com_sun_star_awt_XPrinter_idl__ 29 30#ifndef __com_sun_star_awt_XPrinterPropertySet_idl__ 31#include <com/sun/star/awt/XPrinterPropertySet.idl> 32#endif 33 34#ifndef __com_sun_star_awt_PrinterException_idl__ 35#include <com/sun/star/awt/PrinterException.idl> 36#endif 37 38#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 39#include <com/sun/star/lang/IllegalArgumentException.idl> 40#endif 41 42#ifndef __com_sun_star_awt_XDevice_idl__ 43#include <com/sun/star/awt/XDevice.idl> 44#endif 45 46 47//============================================================================= 48 49 module com { module sun { module star { module awt { 50 51//============================================================================= 52 53/** represents a virtual printer. 54 55 <p>All properties are vetoable properties. 56 If you change the properties between a call to 57 <member scope="com::sun::star::awt">XPrinter::startPage</member> and a call 58 to <member scope="com::sun::star::awt">XPrinter::endPage</member>, 59 a <type scope="com::sun::star::beans">PropertyVetoException</type> is 60 thrown.</p> 61 */ 62published interface XPrinter: com::sun::star::awt::XPrinterPropertySet 63{ 64 //------------------------------------------------------------------------- 65 66 /** puts the job into the printer spooler. 67 68 <p>This call may block the thread. So release all resources 69 (mutex, semaphore, etc.) before this call.</p> 70 */ 71 boolean start( [in] string nJobName, 72 [in] short nCopies, 73 [in] boolean nCollate ) 74 raises( com::sun::star::awt::PrinterException, 75 com::sun::star::lang::IllegalArgumentException ); 76 77 //------------------------------------------------------------------------- 78 79 /** notifies the printer spooler that the job is done and printing 80 starts. 81 82 @see terminate 83 */ 84 void end() 85 raises( com::sun::star::awt::PrinterException ); 86 87 //------------------------------------------------------------------------- 88 89 /** stops the current print job. 90 91 <p>If the method 92 <member scope="com::sun::star::awt">XPrinter::end</member> 93 is called beforehand, then this call does nothing. If you call 94 <member scope="com::sun::star::awt">XPrinter::terminate</member> 95 in or before the call to 96 <member scope="com::sun::star::awt">XPrinter::start</member>, 97 <member scope="com::sun::star::awt">XPrinter::terminate</member> 98 returns <FALSE/>. This call must not block the thread.</p> 99 100 @see end 101 */ 102 void terminate(); 103 104 //------------------------------------------------------------------------- 105 106 /** begins with a new page. 107 */ 108 com::sun::star::awt::XDevice startPage() 109 raises( com::sun::star::awt::PrinterException ); 110 111 //------------------------------------------------------------------------- 112 113 /** ends the current page. 114 */ 115 void endPage() 116 raises( com::sun::star::awt::PrinterException ); 117 118}; 119 120//============================================================================= 121 122}; }; }; }; 123 124#endif 125