xref: /aoo42x/main/offapi/com/sun/star/awt/XDevice.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_XDevice_idl__
24#define __com_sun_star_awt_XDevice_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_awt_DeviceInfo_idl__
31#include <com/sun/star/awt/DeviceInfo.idl>
32#endif
33
34#ifndef __com_sun_star_awt_FontDescriptor_idl__
35#include <com/sun/star/awt/FontDescriptor.idl>
36#endif
37
38//=============================================================================
39
40 module com {  module sun {  module star {  module awt {
41
42 published interface XGraphics;
43 published interface XFont;
44 published interface XBitmap;
45 published interface XDisplayBitmap;
46
47//=============================================================================
48
49/** provides information about a graphical output device and
50	offers a factory for the <em>graphics</em> which provides write
51	operations on the device.
52 */
53published interface XDevice: com::sun::star::uno::XInterface
54{
55	//-------------------------------------------------------------------------
56
57	/** creates a new graphics whose output operation is directed to this
58        device.
59	 */
60	XGraphics createGraphics();
61
62	//-------------------------------------------------------------------------
63
64	/** creates a new device which is compatible with this one.
65
66		<p>If the device does not support the GETBITS device capability,
67		this method returns <NULL/>.</p>
68	 */
69	XDevice createDevice( [in] long nWidth,
70			 [in] long nHeight );
71
72	//-------------------------------------------------------------------------
73
74	/** returns information about the device.
75	 */
76	com::sun::star::awt::DeviceInfo getInfo();
77
78	//-------------------------------------------------------------------------
79
80	/** returns the list of available font descriptors.
81	 */
82	sequence<FontDescriptor> getFontDescriptors();
83
84	//-------------------------------------------------------------------------
85
86	/** returns information about a font offered by this device.
87
88        @returns the font of this device.
89
90	    @param aDescriptor
91		specifies the description of a font.
92		The unit of measure is pixel for this device.
93	 */
94	com::sun::star::awt::XFont getFont( [in] FontDescriptor aDescriptor );
95
96	//-------------------------------------------------------------------------
97
98	/** creates a bitmap with the current device depth.
99
100		<p>If the specified area does not lie entirely in the device, the bits
101		outside are not specified.</p>
102	 */
103	XBitmap createBitmap( [in] long nX,
104			 [in] long nY,
105			 [in] long nWidth,
106			 [in] long nHeight );
107
108	//-------------------------------------------------------------------------
109
110	/** creates a device compatible bitmap.
111
112		<p>The data of the bitmap is in process memory instead of in the device,
113		so that the output operation is fast.</p>
114	 */
115	XDisplayBitmap createDisplayBitmap( [in] XBitmap Bitmap );
116
117};
118
119//=============================================================================
120
121}; }; }; };
122
123#endif
124