fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / canvas / base / spritesurface.hxx
blob47a0fb24a67d51852346ce33aac135c2625e246c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_CANVAS_SPRITESURFACE_HXX
21 #define INCLUDED_CANVAS_SPRITESURFACE_HXX
23 #include <canvas/base/sprite.hxx>
25 namespace canvas
27 /* Definition of the SpriteSurface interface */
29 /** Canvas surface containing sprites
31 Every canvas surface that contains sprites must implement this
32 interface, when employing the canvas base framework. The
33 methods provided here are used from the individual sprites to
34 notify the canvas about necessary screen updates.
36 class SpriteSurface : public ::com::sun::star::uno::XInterface
38 public:
39 typedef ::rtl::Reference< SpriteSurface > Reference;
41 /// Sprites should call this from XSprite::show()
42 virtual void showSprite( const Sprite::Reference& rSprite ) = 0;
44 /// Sprites should call this from XSprite::hide()
45 virtual void hideSprite( const Sprite::Reference& rSprite ) = 0;
47 /// Sprites should call this from XSprite::move()
48 virtual void moveSprite( const Sprite::Reference& rSprite,
49 const ::basegfx::B2DPoint& rOldPos,
50 const ::basegfx::B2DPoint& rNewPos,
51 const ::basegfx::B2DVector& rSpriteSize ) = 0;
53 /** Sprites should call this when some part of the content has
54 changed.
56 That includes show/hide, i.e. for show, both showSprite()
57 and updateSprite() must be called.
59 virtual void updateSprite( const Sprite::Reference& rSprite,
60 const ::basegfx::B2DPoint& rPos,
61 const ::basegfx::B2DRange& rUpdateArea ) = 0;
63 protected:
64 ~SpriteSurface() {}
68 #endif /* INCLUDED_CANVAS_SPRITESURFACE_HXX */
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */