xref: /aoo4110/main/slideshow/source/inc/unoview.hxx (revision b1cdbd2c)
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_SLIDESHOW_UNOVIEW_HXX
25 #define INCLUDED_SLIDESHOW_UNOVIEW_HXX
26 
27 #include "view.hxx"
28 #include <com/sun/star/uno/Reference.hxx>
29 
30 #include <vector>
31 
32 namespace com { namespace sun { namespace star { namespace presentation
33 {
34     class XSlideShowView;
35 } } } }
36 
37 
38 /* Definition of UnoView interface */
39 
40 namespace slideshow
41 {
42     namespace internal
43     {
44         /** Extend View with UNO interface retrieval.
45 
46         	This interface extends View with an UNO interface
47         	retrieval, to be used for Views which are set from
48         	external API.
49          */
50         class UnoView : public View
51         {
52         public:
53             /** Retrieve the underlying UNO slide view.
54              */
55             virtual ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XSlideShowView > getUnoView() const = 0;
56 
57             /** Dispose view
58 
59                 This needs to be different from Disposable interface,
60                 as the UNO XComponent also provides a dispose() (only
61                 with a different calling convention under Windows).
62              */
63             virtual void _dispose() = 0;
64 
65             /** Return whether the sound play back is enabled.
66             */
67             virtual bool isSoundEnabled (void) const = 0;
68 
69             /** Tell the view whether it may play sounds.  Disabling this
70                 can be used to prevent different views to play the same
71                 sounds at the same time.
72             */
73             virtual void setIsSoundEnabled (const bool bValue) = 0;
74         };
75 
76         typedef ::boost::shared_ptr< UnoView > 		UnoViewSharedPtr;
77         typedef ::std::vector< UnoViewSharedPtr >	UnoViewVector;
78     }
79 }
80 
81 #endif /* INCLUDED_SLIDESHOW_UNOVIEW_HXX */
82