xref: /aoo41x/main/slideshow/test/tests.hxx (revision aaef562f)
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 INCLUDED_TESTS_HXX
25 #define INCLUDED_TESTS_HXX
26 
27 #include "animatableshape.hxx"
28 #include "unoview.hxx"
29 #include <boost/shared_ptr.hpp>
30 
31 namespace basegfx{ class B1DRange; class B2DRange; class B2DVector; }
32 
33 class TestView : public slideshow::internal::UnoView
34 {
35 public:
36     /// true iff clear() has been called
37     virtual bool isClearCalled() const = 0;
38     virtual std::vector<std::pair<basegfx::B2DVector,double> > getCreatedSprites() const = 0;
39     virtual basegfx::B1DRange getPriority() const = 0;
40     /// true iff setClip was called (on and off)
41     virtual bool wasClipSet() const = 0;
42     virtual basegfx::B2DRange getBounds() const = 0;
43 
44     virtual std::vector<boost::shared_ptr<TestView> > getViewLayers() const = 0;
45 };
46 
47 typedef boost::shared_ptr<TestView> TestViewSharedPtr;
48 TestViewSharedPtr createTestView();
49 
50 
51 ///////////////////////////////////////////////////////////////////////////////////////
52 
53 
54 class TestShape : public slideshow::internal::AnimatableShape
55 {
56 public:
57     virtual std::vector<
58     std::pair<slideshow::internal::ViewLayerSharedPtr,bool> > getViewLayers() const = 0;
59     virtual sal_Int32 getNumUpdates() const = 0;
60     virtual sal_Int32 getNumRenders() const = 0;
61     virtual sal_Int32 getAnimationCount() const = 0;
62 };
63 
64 typedef boost::shared_ptr<TestShape> TestShapeSharedPtr;
65 TestShapeSharedPtr createTestShape(const basegfx::B2DRange& rRect,
66                                    double                   nPrio);
67 
68 #endif /* INCLUDED_TESTS_HXX */
69