xref: /aoo42x/main/offapi/com/sun/star/awt/XPrinter.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_awt_XPrinter_idl__
24#define __com_sun_star_awt_XPrinter_idl__
25
26#ifndef __com_sun_star_awt_XPrinterPropertySet_idl__
27#include <com/sun/star/awt/XPrinterPropertySet.idl>
28#endif
29
30#ifndef __com_sun_star_awt_PrinterException_idl__
31#include <com/sun/star/awt/PrinterException.idl>
32#endif
33
34#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35#include <com/sun/star/lang/IllegalArgumentException.idl>
36#endif
37
38#ifndef __com_sun_star_awt_XDevice_idl__
39#include <com/sun/star/awt/XDevice.idl>
40#endif
41
42
43//=============================================================================
44
45 module com {  module sun {  module star {  module awt {
46
47//=============================================================================
48
49/** represents a virtual printer.
50
51	<p>All properties are vetoable properties.
52    If you change the properties between a call to
53    <member scope="com::sun::star::awt">XPrinter::startPage</member> and a call
54    to <member scope="com::sun::star::awt">XPrinter::endPage</member>,
55    a <type scope="com::sun::star::beans">PropertyVetoException</type> is
56    thrown.</p>
57 */
58published interface XPrinter: com::sun::star::awt::XPrinterPropertySet
59{
60	//-------------------------------------------------------------------------
61
62	/** puts the job into the printer spooler.
63
64		<p>This call may block the thread. So release all resources
65		(mutex, semaphore, etc.) before this call.</p>
66	 */
67	boolean start( [in] string nJobName,
68			 [in] short nCopies,
69			 [in] boolean nCollate )
70			raises( com::sun::star::awt::PrinterException,
71					com::sun::star::lang::IllegalArgumentException );
72
73	//-------------------------------------------------------------------------
74
75	/** notifies the printer spooler that the job is done and printing
76		starts.
77
78        @see terminate
79	 */
80	void end()
81			raises( com::sun::star::awt::PrinterException );
82
83	//-------------------------------------------------------------------------
84
85	/** stops the current print job.
86
87		<p>If the method
88        <member scope="com::sun::star::awt">XPrinter::end</member>
89        is called beforehand, then this call does nothing. If you call
90		<member scope="com::sun::star::awt">XPrinter::terminate</member>
91        in or before the call to
92		<member scope="com::sun::star::awt">XPrinter::start</member>,
93		<member scope="com::sun::star::awt">XPrinter::terminate</member>
94        returns <FALSE/>. This call must not block the thread.</p>
95
96        @see end
97	 */
98	void terminate();
99
100	//-------------------------------------------------------------------------
101
102	/** begins with a new page.
103	 */
104	com::sun::star::awt::XDevice startPage()
105			raises( com::sun::star::awt::PrinterException );
106
107	//-------------------------------------------------------------------------
108
109	/** ends the current page.
110	 */
111	void endPage()
112			raises( com::sun::star::awt::PrinterException );
113
114};
115
116//=============================================================================
117
118}; }; }; };
119
120#endif
121