merge the formfield patch from ooo-build
[ooovba.git] / avmedia / source / viewer / mediaevent_impl.hxx
blobc02a4c26b1560719d5bfe78e6152120951614fba
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mediaevent_impl.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _AVMEDIA_MEDIAEVENT_IMPL_HXX
32 #define _AVMEDIA_MEDIAEVENT_IMPL_HXX
34 #include <avmedia/mediawindow.hxx>
35 #include <cppuhelper/compbase4.hxx>
36 #include <com/sun/star/awt/XKeyListener.hpp>
37 #include <com/sun/star/awt/XMouseListener.hpp>
38 #include <com/sun/star/awt/XMouseMotionListener.hpp>
39 #include <com/sun/star/awt/XFocusListener.hpp>
41 namespace avmedia
43 namespace priv
45 // ---------------------------
46 // - MediaEventListenersImpl -
47 // ---------------------------
49 class MediaWindowImpl;
51 class MediaEventListenersImpl : public ::cppu::WeakImplHelper4< ::com::sun::star::awt::XKeyListener,
52 ::com::sun::star::awt::XMouseListener,
53 ::com::sun::star::awt::XMouseMotionListener,
54 ::com::sun::star::awt::XFocusListener >
56 public:
58 MediaEventListenersImpl( Window& rNotifyWindow );
59 ~MediaEventListenersImpl();
61 void cleanUp();
63 protected:
65 // XKeyListener
66 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
67 virtual void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw (::com::sun::star::uno::RuntimeException);
68 virtual void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw (::com::sun::star::uno::RuntimeException);
70 // XMouseListener
71 virtual void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
72 virtual void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
73 virtual void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
74 virtual void SAL_CALL mouseExited( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
76 // XMouseMotionListener
77 virtual void SAL_CALL mouseDragged( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
78 virtual void SAL_CALL mouseMoved( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
80 // XFocusListener
81 virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
82 virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
84 private:
86 Window* mpNotifyWindow;
87 mutable ::osl::Mutex maMutex;
92 #endif