bump product version to 6.3.0.0.beta1
[LibreOffice.git] / avmedia / source / gstreamer / gstwindow.cxx
blobdf128744e0f0036beaa967b204e5e3fb72a70404
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 #include <com/sun/star/awt/SystemPointer.hpp>
22 #include <cppuhelper/supportsservice.hxx>
24 #include "gstwindow.hxx"
25 #include "gstplayer.hxx"
27 #define AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_GStreamer"
28 #define AVMEDIA_GST_WINDOW_SERVICENAME "com.sun.star.media.Window_GStreamer"
30 using namespace ::com::sun::star;
32 namespace avmedia { namespace gstreamer {
34 // Window
37 Window::Window() :
38 meZoomLevel( media::ZoomLevel_NOT_AVAILABLE )
42 Window::~Window()
46 // XPlayerWindow
49 void SAL_CALL Window::update( )
53 sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
55 bool bRet = false;
57 if( meZoomLevel != media::ZoomLevel_NOT_AVAILABLE &&
58 eZoomLevel != media::ZoomLevel_NOT_AVAILABLE )
60 if( eZoomLevel != meZoomLevel )
62 meZoomLevel = eZoomLevel;
65 bRet = true;
68 return bRet;
71 media::ZoomLevel SAL_CALL Window::getZoomLevel( )
73 return meZoomLevel;
76 void SAL_CALL Window::setPointerType( sal_Int32 /*nPointerType*/ )
80 // XWindow
83 void SAL_CALL Window::setPosSize( sal_Int32 /*X*/, sal_Int32 /*Y*/, sal_Int32 /*Width*/, sal_Int32 /*Height*/, sal_Int16 /*Flags*/ )
87 awt::Rectangle SAL_CALL Window::getPosSize()
89 awt::Rectangle aRet;
91 aRet.X = aRet.Y = 0;
92 aRet.Width = 320;
93 aRet.Height = 240;
95 return aRet;
98 void SAL_CALL Window::setVisible( sal_Bool /*bVisible*/ )
102 void SAL_CALL Window::setEnable( sal_Bool /*bEnable*/ )
106 void SAL_CALL Window::setFocus( )
110 void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& )
114 void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& )
118 void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& )
122 void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& )
126 void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& )
130 void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& )
134 void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& )
138 void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& )
142 void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& )
146 void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& )
150 void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& )
154 void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& )
158 // XComponent
161 void SAL_CALL Window::dispose( )
165 void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& )
169 void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& )
173 // XServiceInfo
176 OUString SAL_CALL Window::getImplementationName( )
178 return OUString( AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME );
181 sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName )
183 return cppu::supportsService(this, ServiceName);
186 uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames( )
188 return { AVMEDIA_GST_WINDOW_SERVICENAME };
191 } // namespace gstreamer
192 } // namespace avmedia
194 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */