diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /offapi/com/sun/star/rendering/XSpriteCanvas.idl | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | offapi/com/sun/star/rendering/XSpriteCanvas.idl | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/offapi/com/sun/star/rendering/XSpriteCanvas.idl b/offapi/com/sun/star/rendering/XSpriteCanvas.idl new file mode 100644 index 000000000..f15b02b8e --- /dev/null +++ b/offapi/com/sun/star/rendering/XSpriteCanvas.idl @@ -0,0 +1,145 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_rendering_XSpriteCanvas_idl__ +#define __com_sun_star_rendering_XSpriteCanvas_idl__ + +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/rendering/XBitmapCanvas.idl> +#include <com/sun/star/rendering/XAnimation.idl> +#include <com/sun/star/rendering/VolatileContentDestroyedException.idl> + +module com { module sun { module star { module rendering { + +interface XSprite; +interface XAnimatedSprite; +interface XCustomSprite; + +/** Specialization of a XCanvas, where moving, animated objects + (called sprites) are supported.<p> + + @attention The screen output of canvas drawing operations is + undefined, unless XSpriteCanvas::updateScreen() is called. This is + because a sprite canvas might choose to employ double buffering to + reduce animation flicker, and cannot know the instant suitable to + display the newly rendered canvas content. When using external + double-buffering via XBufferController on a sprite canvas, the + implementation takes care of this issue, and in this case is able + to render correctly even without explicit updateScreen() calls + (because there's a defined moment in time where content display + can happen, namely the XBufferController::showBuffer()) call. If + you don't need sprite functionality, and don't want the + updateScreen hassle, simply use the XCanvas. + */ +interface XSpriteCanvas : XCanvas +{ + /** Create a sprite object from the specified animation + sequence. A sprite is a back-buffered object with its own, + independent animation. + */ + XAnimatedSprite createSpriteFromAnimation( [in] XAnimation animation ) + raises (com::sun::star::lang::IllegalArgumentException); + + /** Create a sprite object from the specified animation + sequence. + + A sprite is a back-buffered object with its own, + independent animation. + + @param animationBitmaps + Sequence of bitmaps. The bitmaps don't need to have the same + size, but they are all rendered with their left, top edges + aligned. + + @param interpolationMode + Value of InterpolationMode, to determine whether + and how to interpolate between the provided bitmaps, if + animation runs fast enough. + + @throws VolatileContentDestroyedException + if at least one of the bitmap is volatile, and its content has been destroyed by the system. + */ + XAnimatedSprite createSpriteFromBitmaps( [in] sequence<XBitmap> animationBitmaps, [in] byte interpolationMode ) + raises (com::sun::star::lang::IllegalArgumentException, + VolatileContentDestroyedException); + + /** Create a custom, user-handles-it-all sprite object. + + A sprite is a back-buffered object with its own, independent + animation. + + @param spriteSize + The required size of the sprite in device + coordinates. Everything that is rendered outside this area + might be clipped on output. Both components of the size must + be greater than zero. + + @return an interface to a custom sprite object. + */ + XCustomSprite createCustomSprite( [in] ::com::sun::star::geometry::RealSize2D spriteSize ) + raises (com::sun::star::lang::IllegalArgumentException); + + /** Create a cloned version of an already existing sprite + object. + + The cloned sprite always shows the same content as its + original, but of course the sprite position, visibility, alpha + etc. can be modified independently. + + @param original + The original sprite to copy the content from. This sprite must + have been created by the same XSpriteCanvas instance as this + method is called on. Other sprite instances will generate an + IllegalArgumentException. + + @return an interface to a sprite object. + */ + XSprite createClonedSprite( [in] XSprite original ) + raises (com::sun::star::lang::IllegalArgumentException); + + /** Tells the sprite canvas to now update the screen + representation. + + Required to display rendered changes to the canvas, and + updates to stopped animations and XCustomSprites in + general. This method will return only after the screen update + is done, or earlier if an error happened.<p> + + If double buffering is enabled via XBufferController, no + explicit call of updateScreen() is necessary, since the + XBufferController methods will automatically notify all + associated XSpriteCanvas instances.<p> + + @param bUpdateAll + When `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. + + @return `TRUE`, if the screen update was successfully + performed + */ + boolean updateScreen( [in] boolean bUpdateAll ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |