Update ooo320-m1
[ooovba.git] / applied_patches / 0389-avmedia-source-gstreamer-gstwindow.hxx.diff
blob9e2473d460caa974f19cb76aac08e3bfc489a0bb
1 --- /dev/null 2006-08-13 17:52:05.000000000 +0200
2 +++ avmedia/source/gstreamer/gstwindow.hxx 2006-08-22 11:38:56.000000000 +0200
3 @@ -0,0 +1,119 @@
4 +/*************************************************************************
5 + *
6 + * OpenOffice.org - a multi-platform office productivity suite
7 + *
8 + * $RCSfile$
9 + *
10 + * $Revision$
11 + *
12 + * last change: $Author$ $Date$
13 + *
14 + * The Contents of this file are made available subject to
15 + * the terms of GNU Lesser General Public License Version 2.1.
16 + *
17 + *
18 + * GNU Lesser General Public License Version 2.1
19 + * =============================================
20 + * Copyright 2005 by Sun Microsystems, Inc.
21 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
22 + *
23 + * This library is free software; you can redistribute it and/or
24 + * modify it under the terms of the GNU Lesser General Public
25 + * License version 2.1, as published by the Free Software Foundation.
26 + *
27 + * This library is distributed in the hope that it will be useful,
28 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 + * Lesser General Public License for more details.
31 + *
32 + * You should have received a copy of the GNU Lesser General Public
33 + * License along with this library; if not, write to the Free Software
34 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
35 + * MA 02111-1307 USA
36 + *
37 + ************************************************************************/
39 +#ifndef _WINDOW_HXX
40 +#define _WINDOW_HXX
42 +#include "gstcommon.hxx"
43 +#include <cppuhelper/interfacecontainer.h>
45 +#ifndef _COM_SUN_STAR_MEDIA_XPLAYERWINDOW_HDL_
46 +#include "com/sun/star/media/XPlayerWindow.hdl"
47 +#endif
49 +namespace avmedia { namespace gstreamer {
51 +// ---------------
52 +// - Window -
53 +// ---------------
55 +class Player;
57 +class Window : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayerWindow,
58 + ::com::sun::star::lang::XServiceInfo >
60 +public:
62 + Window( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr,
63 + Player& rPlayer );
64 + ~Window();
66 + bool create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments );
67 + void processGraphEvent();
68 + void updatePointer();
70 + // XPlayerWindow
71 + virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException);
72 + virtual sal_Bool SAL_CALL setZoomLevel( ::com::sun::star::media::ZoomLevel ZoomLevel ) throw (::com::sun::star::uno::RuntimeException);
73 + virtual ::com::sun::star::media::ZoomLevel SAL_CALL getZoomLevel( ) throw (::com::sun::star::uno::RuntimeException);
74 + virtual void SAL_CALL setPointerType( sal_Int32 nPointerType ) throw (::com::sun::star::uno::RuntimeException);
76 + // XWindow
77 + virtual void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException);
78 + virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize( ) throw (::com::sun::star::uno::RuntimeException);
79 + virtual void SAL_CALL setVisible( sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException);
80 + virtual void SAL_CALL setEnable( sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
81 + virtual void SAL_CALL setFocus( ) throw (::com::sun::star::uno::RuntimeException);
82 + virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
83 + virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
84 + virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
85 + virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
86 + virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
87 + virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
88 + virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
89 + virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
90 + virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
91 + virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
92 + virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
93 + virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
95 + // XComponent
96 + virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
97 + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
98 + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
100 + // XServiceInfo
101 + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
102 + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
103 + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
106 +private:
108 + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
110 + ::osl::Mutex maMutex;
111 + ::cppu::OMultiTypeInterfaceContainerHelper maListeners;
112 + ::com::sun::star::media::ZoomLevel meZoomLevel;
113 + Player& mrPlayer;
114 + int mnPointerType;
116 + void ImplLayoutVideoWindow();
119 +} // namespace gstreamer
120 +} // namespace avmedia
122 +#endif // _WINDOW_HXX