bump product version to 6.3.0.0.beta1
[LibreOffice.git] / avmedia / source / win / window.hxx
blob32ae3504f6d5e833d8dd19b46effaf812c479b82
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
21 #define INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
23 #include <sal/config.h>
25 #include <WinDef.h>
27 #include "wincommon.hxx"
28 #include <cppuhelper/implbase.hxx>
29 #include <cppuhelper/interfacecontainer.h>
31 #include <com/sun/star/media/XPlayerWindow.hpp>
33 struct IVideoWindow;
35 namespace avmedia { namespace win {
37 class Player;
40 class Window : public ::cppu::WeakImplHelper< css::media::XPlayerWindow,
41 css::lang::XServiceInfo >
43 public:
45 Window( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr,
46 Player& rPlayer );
47 ~Window() override;
49 bool create( const css::uno::Sequence< css::uno::Any >& aArguments );
50 void processGraphEvent();
51 void updatePointer();
53 // XPlayerWindow
54 virtual void SAL_CALL update( ) override;
55 virtual sal_Bool SAL_CALL setZoomLevel( css::media::ZoomLevel ZoomLevel ) override;
56 virtual css::media::ZoomLevel SAL_CALL getZoomLevel( ) override;
57 virtual void SAL_CALL setPointerType( sal_Int32 nPointerType ) override;
59 // XWindow
60 virtual void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) override;
61 virtual css::awt::Rectangle SAL_CALL getPosSize( ) override;
62 virtual void SAL_CALL setVisible( sal_Bool Visible ) override;
63 virtual void SAL_CALL setEnable( sal_Bool Enable ) override;
64 virtual void SAL_CALL setFocus( ) override;
65 virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
66 virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override;
67 virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
68 virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override;
69 virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
70 virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override;
71 virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
72 virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override;
73 virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
74 virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override;
75 virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
76 virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override;
78 // XComponent
79 virtual void SAL_CALL dispose( ) override;
80 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
81 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
83 // XServiceInfo
84 virtual OUString SAL_CALL getImplementationName( ) override;
85 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
86 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
88 public:
90 void fireMousePressedEvent( const css::awt::MouseEvent& rEvt );
91 void fireMouseReleasedEvent( const css::awt::MouseEvent& rEvt );
92 void fireMouseMovedEvent( const css::awt::MouseEvent& rEvt );
93 void fireKeyPressedEvent( const css::awt::KeyEvent& rEvt );
94 void fireKeyReleasedEvent( const css::awt::KeyEvent& rEvt );
95 void fireSetFocusEvent( const css::awt::FocusEvent& rEvt );
96 HWND getParentWnd() const { return mnParentWnd; }
98 private:
100 css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr;
102 ::osl::Mutex maMutex;
103 ::cppu::OMultiTypeInterfaceContainerHelper maListeners;
104 css::media::ZoomLevel meZoomLevel;
105 Player& mrPlayer;
106 HWND mnFrameWnd;
107 HWND mnParentWnd;
108 int mnPointerType;
110 void ImplLayoutVideoWindow();
113 } // namespace win
114 } // namespace avmedia
116 #endif // INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */