tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / avmedia / source / gstreamer / gstwindow.cxx
blob2d9aec0418b36d4492928968712cc05ac0214515
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"
26 constexpr OUString AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Window_GStreamer"_ustr;
27 constexpr OUString AVMEDIA_GST_WINDOW_SERVICENAME = u"com.sun.star.media.Window_GStreamer"_ustr;
29 using namespace ::com::sun::star;
31 namespace avmedia::gstreamer {
33 // Window
36 Window::Window() :
37 meZoomLevel( media::ZoomLevel_NOT_AVAILABLE )
41 Window::~Window()
45 // XPlayerWindow
48 void SAL_CALL Window::update( )
52 sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
54 bool bRet = false;
56 if( meZoomLevel != media::ZoomLevel_NOT_AVAILABLE &&
57 eZoomLevel != media::ZoomLevel_NOT_AVAILABLE )
59 if( eZoomLevel != meZoomLevel )
61 meZoomLevel = eZoomLevel;
64 bRet = true;
67 return bRet;
70 media::ZoomLevel SAL_CALL Window::getZoomLevel( )
72 return meZoomLevel;
75 void SAL_CALL Window::setPointerType( sal_Int32 /*nPointerType*/ )
79 // XWindow
82 void SAL_CALL Window::setPosSize( sal_Int32 /*X*/, sal_Int32 /*Y*/, sal_Int32 /*Width*/, sal_Int32 /*Height*/, sal_Int16 /*Flags*/ )
86 awt::Rectangle SAL_CALL Window::getPosSize()
88 awt::Rectangle aRet;
90 aRet.X = aRet.Y = 0;
91 aRet.Width = 320;
92 aRet.Height = 240;
94 return aRet;
97 void SAL_CALL Window::setVisible( sal_Bool /*bVisible*/ )
101 void SAL_CALL Window::setEnable( sal_Bool /*bEnable*/ )
105 void SAL_CALL Window::setFocus( )
109 void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& )
113 void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& )
117 void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& )
121 void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& )
125 void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& )
129 void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& )
133 void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& )
137 void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& )
141 void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& )
145 void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& )
149 void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& )
153 void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& )
157 // XComponent
160 void SAL_CALL Window::dispose( )
164 void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& )
168 void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& )
172 // XServiceInfo
175 OUString SAL_CALL Window::getImplementationName( )
177 return AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME;
180 sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName )
182 return cppu::supportsService(this, ServiceName);
185 uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames( )
187 return { AVMEDIA_GST_WINDOW_SERVICENAME };
190 } // namespace
192 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */