1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_XBufferController_idl__
20 #define __com_sun_star_rendering_XBufferController_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
25 module com
{ module sun
{ module star
{ module rendering
{
27 /** Interface providing access to double/multi-buffer facilities of
30 This interface provides methods to enable and control
31 double/multi-buffering facilities on screen devices.<p>
35 interface XBufferController
: ::com
::sun
::star
::uno
::XInterface
37 /** Create the given number of background buffers.<p>
39 There's one buffer implicitly available, which is the canvas
40 surface itself. Thus, calling <code>createBuffers(1)</code>
41 creates a double-buffered object.<p>
44 The number of background<buffers requested. Must be greater
47 @return the number of actually generated buffers, which might
48 be between 0 (no double-buffering available) and nBuffers.
50 @throws com::sun::star::lang::IllegalArgumentException
51 if nBuffers is smaller than one.
53 long createBuffers
( [in] long nBuffers
)
54 raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
57 /** Destroy all buffers generated via this object.
59 void destroyBuffers
();
62 /** Switch the display to show the specified buffer.<p>
64 The method returns, when the switch is performed and the
65 selected buffer is shown on screen, or immediately when an
66 error occurs. If the switch was successful, subsequent render
67 operations will be directed to the new backbuffer.<p>
69 Use this method if you need your screen display to be in sync
70 with other things, e.g. sound playback.<p>
73 When `TRUE`, update the whole screen. When `FALSE`,
74 implementation is permitted to restrict update to areas the
75 canvas itself changed (e.g. because of render operations, or
76 changes on the sprites). The former is useful for updates
77 after window expose events, the latter for animation display.
79 @return whether the switch was performed successfully.
81 @throws com::sun::star::lang::IllegalArgumentException
82 if nBuffer is outside the permissible range.
84 boolean showBuffer
( [in] boolean bUpdateAll
);
87 /** Schedule the display of the specified buffer.<p>
89 The method returns, when the switching of the buffer is
90 successfully scheduled, or immediately when an error
91 occurs. If the switch was successful, subsequent render
92 operations will be directed to the new backbuffer. Note that,
93 if the buffer switching is exceedingly slow, or the frequency
94 of switchBuffer() is exceedingly high, the buffer scheduled
95 for display here might become the current render target
96 <em>before</em> it is fully displayed on screen. In this case,
97 any rendering operation to this buffer will block, until it is
98 safe to perform the operation without visible cluttering.<p>
100 Use this method if you favor maximal render speed, but don't
101 necessarily require your screen display to be in sync with
102 other things, e.g. sound playback.<p>
105 When `TRUE`, update the whole screen. When `FALSE`,
106 implementation is permitted to restrict update to areas the
107 canvas itself changed (e.g. because of render operations, or
108 changes on the sprites). The former is useful for updates
109 after window expose events, the latter for animation display.
111 @return whether the switch was performed successfully.
113 boolean switchBuffer
( [in] boolean bUpdateAll
);
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */