LibreOffice
LibreOffice 6.4 SDK API Reference
Public Member Functions | List of all members
XBufferController Interface Reference

Interface providing access to double/multi-buffer facilities of screen devices. More...

import"XBufferController.idl";

Inheritance diagram for XBufferController:
XInterface

Public Member Functions

long createBuffers ([in] long nBuffers) raises (com::sun::star::lang::IllegalArgumentException)
 Create the given number of background buffers. More...
 
void destroyBuffers ()
 Destroy all buffers generated via this object. More...
 
boolean showBuffer ([in] boolean bUpdateAll)
 Switch the display to show the specified buffer. More...
 
boolean switchBuffer ([in] boolean bUpdateAll)
 Schedule the display of the specified buffer. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

Interface providing access to double/multi-buffer facilities of screen devices.

This interface provides methods to enable and control double/multi-buffering facilities on screen devices.

Since
OOo 2.0

Member Function Documentation

◆ createBuffers()

long createBuffers ( [in] long  nBuffers)
raises (com::sun::star::lang::IllegalArgumentException
)

Create the given number of background buffers.

There's one buffer implicitly available, which is the canvas surface itself. Thus, calling createBuffers(1) creates a double-buffered object.

Parameters
nBuffersThe number of background<buffers requested. Must be greater than 0.
Returns
the number of actually generated buffers, which might be between 0 (no double-buffering available) and nBuffers.
Exceptions
com::sun::star::lang::IllegalArgumentExceptionif nBuffers is smaller than one.

◆ destroyBuffers()

void destroyBuffers ( )

Destroy all buffers generated via this object.

◆ showBuffer()

boolean showBuffer ( [in] boolean  bUpdateAll)

Switch the display to show the specified buffer.

The method returns, when the switch is performed and the selected buffer is shown on screen, or immediately when an error occurs. If the switch was successful, subsequent render operations will be directed to the new backbuffer.

Use this method if you need your screen display to be in sync with other things, e.g. sound playback.

Parameters
bUpdateAllWhen TRUE, update the whole screen. When FALSE, implementation is permitted to restrict update to areas the canvas itself changed (e.g. because of render operations, or changes on the sprites). The former is useful for updates after window expose events, the latter for animation display.
Returns
whether the switch was performed successfully.
Exceptions
com::sun::star::lang::IllegalArgumentExceptionif nBuffer is outside the permissible range.

◆ switchBuffer()

boolean switchBuffer ( [in] boolean  bUpdateAll)

Schedule the display of the specified buffer.

The method returns, when the switching of the buffer is successfully scheduled, or immediately when an error occurs. If the switch was successful, subsequent render operations will be directed to the new backbuffer. Note that, if the buffer switching is exceedingly slow, or the frequency of switchBuffer() is exceedingly high, the buffer scheduled for display here might become the current render target before it is fully displayed on screen. In this case, any rendering operation to this buffer will block, until it is safe to perform the operation without visible cluttering.

Use this method if you favor maximal render speed, but don't necessarily require your screen display to be in sync with other things, e.g. sound playback.

Parameters
bUpdateAllWhen TRUE, update the whole screen. When FALSE, implementation is permitted to restrict update to areas the canvas itself changed (e.g. because of render operations, or changes on the sprites). The former is useful for updates after window expose events, the latter for animation display.
Returns
whether the switch was performed successfully.

The documentation for this interface was generated from the following file: