1*9ea84ac5SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*9ea84ac5SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*9ea84ac5SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*9ea84ac5SAndrew Rist  * distributed with this work for additional information
6*9ea84ac5SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*9ea84ac5SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*9ea84ac5SAndrew Rist  * "License"); you may not use this file except in compliance
9*9ea84ac5SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*9ea84ac5SAndrew Rist  *
11*9ea84ac5SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*9ea84ac5SAndrew Rist  *
13*9ea84ac5SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*9ea84ac5SAndrew Rist  * software distributed under the License is distributed on an
15*9ea84ac5SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9ea84ac5SAndrew Rist  * KIND, either express or implied.  See the License for the
17*9ea84ac5SAndrew Rist  * specific language governing permissions and limitations
18*9ea84ac5SAndrew Rist  * under the License.
19*9ea84ac5SAndrew Rist  *
20*9ea84ac5SAndrew Rist  *************************************************************/
21*9ea84ac5SAndrew Rist 
22*9ea84ac5SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _AVMEDIA_MEDIAEVENT_IMPL_HXX
25cdf0e10cSrcweir #define _AVMEDIA_MEDIAEVENT_IMPL_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <avmedia/mediawindow.hxx>
28cdf0e10cSrcweir #include <cppuhelper/compbase4.hxx>
29cdf0e10cSrcweir #include <com/sun/star/awt/XKeyListener.hpp>
30cdf0e10cSrcweir #include <com/sun/star/awt/XMouseListener.hpp>
31cdf0e10cSrcweir #include <com/sun/star/awt/XMouseMotionListener.hpp>
32cdf0e10cSrcweir #include <com/sun/star/awt/XFocusListener.hpp>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir namespace avmedia
35cdf0e10cSrcweir {
36cdf0e10cSrcweir     namespace priv
37cdf0e10cSrcweir     {
38cdf0e10cSrcweir         // ---------------------------
39cdf0e10cSrcweir         // - MediaEventListenersImpl -
40cdf0e10cSrcweir         // ---------------------------
41cdf0e10cSrcweir 
42cdf0e10cSrcweir         class MediaWindowImpl;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir         class MediaEventListenersImpl : public ::cppu::WeakImplHelper4< ::com::sun::star::awt::XKeyListener,
45cdf0e10cSrcweir                                                                         ::com::sun::star::awt::XMouseListener,
46cdf0e10cSrcweir                                                                         ::com::sun::star::awt::XMouseMotionListener,
47cdf0e10cSrcweir                                                                         ::com::sun::star::awt::XFocusListener >
48cdf0e10cSrcweir         {
49cdf0e10cSrcweir         public:
50cdf0e10cSrcweir 
51cdf0e10cSrcweir                     MediaEventListenersImpl( Window& rNotifyWindow );
52cdf0e10cSrcweir                     ~MediaEventListenersImpl();
53cdf0e10cSrcweir 
54cdf0e10cSrcweir         void        cleanUp();
55cdf0e10cSrcweir 
56cdf0e10cSrcweir         protected:
57cdf0e10cSrcweir 
58cdf0e10cSrcweir             // XKeyListener
59cdf0e10cSrcweir             virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
60cdf0e10cSrcweir             virtual void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw (::com::sun::star::uno::RuntimeException);
61cdf0e10cSrcweir             virtual void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw (::com::sun::star::uno::RuntimeException);
62cdf0e10cSrcweir 
63cdf0e10cSrcweir             // XMouseListener
64cdf0e10cSrcweir             virtual void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir             virtual void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
66cdf0e10cSrcweir             virtual void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
67cdf0e10cSrcweir             virtual void SAL_CALL mouseExited( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir 
69cdf0e10cSrcweir             // XMouseMotionListener
70cdf0e10cSrcweir             virtual void SAL_CALL mouseDragged( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
71cdf0e10cSrcweir             virtual void SAL_CALL mouseMoved( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
72cdf0e10cSrcweir 
73cdf0e10cSrcweir             // XFocusListener
74cdf0e10cSrcweir             virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
75cdf0e10cSrcweir             virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
76cdf0e10cSrcweir 
77cdf0e10cSrcweir         private:
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 			Window*					mpNotifyWindow;
80cdf0e10cSrcweir             mutable ::osl::Mutex    maMutex;
81cdf0e10cSrcweir         };
82cdf0e10cSrcweir     }
83cdf0e10cSrcweir }
84cdf0e10cSrcweir 
85cdf0e10cSrcweir #endif
86