merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / rendering / XBufferController.idl
blobfccd084a31a7245b504dca050635b7e6caccfcc2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XBufferController.idl,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_rendering_XBufferController_idl__
31 #define __com_sun_star_rendering_XBufferController_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
36 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37 #include <com/sun/star/lang/IllegalArgumentException.idl>
38 #endif
40 module com { module sun { module star { module rendering {
42 /** Interface providing access to double/multi-buffer facilities of
43 screen devices.<p>
45 This interface provides methods to enable and control
46 double/multi-buffering facilities on screen devices.<p>
48 @since OOo 2.0.0
50 interface XBufferController : ::com::sun::star::uno::XInterface
52 /** Create the given number of background buffers.<p>
54 There's one buffer implicitely available, which is the canvas
55 surface itself. Thus, calling <code>createBuffers(1)</code>
56 creates a double-buffered object.<p>
58 @param nBuffers
59 The number of background&lt;buffers requested. Must be greater
60 than 0.
62 @return the number of actually generated buffers, which might
63 be between 0 (no double-buffering available) and nBuffers.
65 @throws <type>com::sun::star::lang::IllegalArgumentException</type>
66 if nBuffers is smaller than one.
68 long createBuffers( [in] long nBuffers )
69 raises (com::sun::star::lang::IllegalArgumentException);
71 //-------------------------------------------------------------------------
73 /** Destroy all buffers generated via this object.
75 void destroyBuffers();
77 //-------------------------------------------------------------------------
79 /** Switch the display to show the specified buffer.<p>
81 The method returns, when the switch is performed and the
82 selected buffer is shown on screen, or immediately when an
83 error occurs. If the switch was successful, subsequent render
84 operations will be directed to the new backbuffer.<p>
86 Use this method if you need your screen display to be in sync
87 with other things, e.g. sound playback.<p>
89 @param bUpdateAll
90 When <TRUE/>, update the whole screen. When <FALSE/>,
91 implementation is permitted to restrict update to areas the
92 canvas itself changed (e.g. because of render operations, or
93 changes on the sprites). The former is useful for updates
94 after window expose events, the latter for animation display.
96 @return whether the switch was performed successfully.
98 @throws <type>com::sun::star::lang::IllegalArgumentException</type>
99 if nBuffer is outside the permissible range.
101 boolean showBuffer( [in] boolean bUpdateAll );
103 //-------------------------------------------------------------------------
105 /** Schedule the display of the specified buffer.<p>
107 The method returns, when the switching of the buffer is
108 successfully scheduled, or immediately when an error
109 occurs. If the switch was successful, subsequent render
110 operations will be directed to the new backbuffer. Note that,
111 if the buffer switching is exceedingly slow, or the frequency
112 of switchBuffer() is exceedingly high, the buffer scheduled
113 for display here might become the current render target
114 <em>before</em> it is fully displayed on screen. In this case,
115 any rendering operation to this buffer will block, until it is
116 safe to perform the operation without visible cluttering.<p>
118 Use this method if you favor maximal render speed, but don't
119 necessarily require your screen display to be in sync with
120 other things, e.g. sound playback.<p>
122 @param bUpdateAll
123 When <TRUE/>, update the whole screen. When <FALSE/>,
124 implementation is permitted to restrict update to areas the
125 canvas itself changed (e.g. because of render operations, or
126 changes on the sprites). The former is useful for updates
127 after window expose events, the latter for animation display.
129 @return whether the switch was performed successfully.
131 boolean switchBuffer( [in] boolean bUpdateAll );
135 }; }; }; };
137 #endif