1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _VCLCANVAS_SPRITESURFACE_HXX
25 #define _VCLCANVAS_SPRITESURFACE_HXX
26 
27 #include <sal/config.h>
28 
29 #include "cairo_sprite.hxx"
30 
31 class Point;
32 class Size;
33 class Rectangle;
34 
35 namespace cairocanvas
36 {
37 	/* Definition of SpriteSurface interface */
38 
39     class SpriteSurface
40     {
41     public:
~SpriteSurface()42         virtual ~SpriteSurface() {}
43 
44         // call this when XSprite::show() is called
45         virtual void showSprite( const Sprite::ImplRef& sprite ) = 0;
46 
47         // call this when XSprite::hide() is called
48         virtual void hideSprite( const Sprite::ImplRef& sprite ) = 0;
49 
50         // call this when XSprite::move() is called
51         virtual void moveSprite( const Sprite::ImplRef&	sprite,
52                                  const Point& 			rOldPos,
53                                  const Point& 			rNewPos,
54                                  const Size& 			rSpriteSize ) = 0;
55 
56         // call this when some part of your sprite has changed. That
57         // includes show/hide�, i.e. for show, both showSprite and
58         // updateSprite must be called.
59         virtual void updateSprite( const Sprite::ImplRef& 	sprite,
60                                    const Point& 			rPos,
61                                    const Rectangle& 		rUpdateArea ) = 0;
62 
63     };
64 }
65 
66 #endif /* _VCLCANVAS_SPRITESURFACE_HXX */
67