LCOV - code coverage report
Current view: top level - avmedia/source/viewer - mediawindow_impl.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_AVMEDIA_SOURCE_VIEWER_MEDIAWINDOW_IMPL_HXX
      21             : #define INCLUDED_AVMEDIA_SOURCE_VIEWER_MEDIAWINDOW_IMPL_HXX
      22             : 
      23             : #include <svtools/transfer.hxx>
      24             : #include <vcl/syschild.hxx>
      25             : 
      26             : #include "mediacontrol.hxx"
      27             : 
      28             : namespace com { namespace sun { namespace star { namespace media {
      29             :     class XPlayer;
      30             :     class XPlayerWindow;
      31             : }}}}
      32             : 
      33             : namespace com { namespace sun { namespace star { namespace uno {
      34             :     class XComponentContext;
      35             : }}}}
      36             : 
      37             : class BitmapEx;
      38             : 
      39             : namespace avmedia
      40             : {
      41             : 
      42             : class MediaWindow;
      43             : 
      44             : namespace priv
      45             : {
      46             : 
      47           0 : class MediaWindowControl : public MediaControl
      48             : {
      49             : public:
      50             : 
      51             :     explicit MediaWindowControl( vcl::Window* pParent );
      52             : 
      53             : protected:
      54             : 
      55             :     void    update() SAL_OVERRIDE;
      56             :     void    execute( const MediaItem& rItem ) SAL_OVERRIDE;
      57             : };
      58             : 
      59           0 : class MediaChildWindow : public SystemChildWindow
      60             : {
      61             : public:
      62             : 
      63             :     explicit MediaChildWindow( vcl::Window* pParent );
      64             :     MediaChildWindow( vcl::Window* pParent, SystemWindowData* pData );
      65             : 
      66             : protected:
      67             : 
      68             :     virtual void    MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      69             :     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      70             :     virtual void    MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      71             :     virtual void    KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
      72             :     virtual void    KeyUp( const KeyEvent& rKEvt ) SAL_OVERRIDE;
      73             :     virtual void    Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
      74             : };
      75             : 
      76             : class MediaEventListenersImpl;
      77             : 
      78             : class MediaWindowImpl : public Control, public DropTargetHelper, public DragSourceHelper
      79             : {
      80             : public:
      81             :     MediaWindowImpl(vcl::Window* parent, MediaWindow* pMediaWindow, bool bInternalMediaControl);
      82             :     virtual ~MediaWindowImpl();
      83             : 
      84             :     virtual void dispose() SAL_OVERRIDE;
      85             : 
      86             :     static css::uno::Reference<css::media::XPlayer> createPlayer(const OUString& rURL, const OUString& rReferer, const OUString* pMimeType = 0);
      87             : 
      88             :     void setURL(const OUString& rURL, OUString const& rTempURL, OUString const& rReferer);
      89             : 
      90             :     const OUString& getURL() const;
      91             : 
      92             :     bool isValid() const;
      93             : 
      94             :     Size getPreferredSize() const;
      95             : 
      96             :     bool start();
      97             : 
      98             :     void updateMediaItem( MediaItem& rItem ) const;
      99             :     void executeMediaItem( const MediaItem& rItem );
     100             : 
     101             :     void setPosSize( const Rectangle& rRect );
     102             : 
     103             :     void setPointer( const Pointer& rPointer );
     104             : 
     105             : private:
     106             : 
     107             :     // Window
     108             :     virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     109             :     virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     110             :     virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     111             :     virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
     112             :     virtual void KeyUp( const KeyEvent& rKEvt ) SAL_OVERRIDE;
     113             :     virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
     114             :     virtual void Resize() SAL_OVERRIDE;
     115             :     virtual void StateChanged( StateChangedType ) SAL_OVERRIDE;
     116             :     virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; // const
     117             :     virtual void GetFocus() SAL_OVERRIDE;
     118             : 
     119             :     // DropTargetHelper
     120             :     virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
     121             :     virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
     122             : 
     123             :     // DragSourceHelper
     124             :     virtual void    StartDrag( sal_Int8 nAction, const Point& rPosPixel ) SAL_OVERRIDE;
     125             : 
     126             :     bool setZoom(css::media::ZoomLevel eLevel);
     127             :     css::media::ZoomLevel getZoom() const;
     128             : 
     129             :     void stop();
     130             : 
     131             :     bool isPlaying() const;
     132             : 
     133             :     double getDuration() const;
     134             : 
     135             :     void setMediaTime( double fTime );
     136             :     double getMediaTime() const;
     137             : 
     138             :     void setPlaybackLoop( bool bSet );
     139             :     bool isPlaybackLoop() const;
     140             : 
     141             :     void setMute( bool bSet );
     142             :     bool isMute() const;
     143             : 
     144             :     void setVolumeDB( sal_Int16 nVolumeDB );
     145             :     sal_Int16 getVolumeDB() const;
     146             : 
     147             :     void stopPlayingInternal( bool );
     148             : 
     149             :     void onURLChanged();
     150             : 
     151             :     static css::uno::Reference<css::media::XPlayer> createPlayer(const OUString& rURL, const OUString& rManagerServName,
     152             :                                                                  css::uno::Reference<css::uno::XComponentContext> xContext);
     153             : 
     154             :     OUString maFileURL;
     155             :     OUString mTempFileURL;
     156             :     OUString maReferer;
     157             :     OUString m_sMimeType;
     158             :     css::uno::Reference<css::media::XPlayer> mxPlayer;
     159             :     css::uno::Reference<css::media::XPlayerWindow> mxPlayerWindow;
     160             :     MediaWindow* mpMediaWindow;
     161             : 
     162             :     css::uno::Reference<css::uno::XInterface> mxEventsIf;
     163             :     MediaEventListenersImpl* mpEvents;
     164             :     bool mbEventTransparent;
     165             :     VclPtr<MediaChildWindow> mpChildWindow;
     166             :     VclPtr<MediaWindowControl> mpMediaWindowControl;
     167             :     BitmapEx* mpEmptyBmpEx;
     168             :     BitmapEx* mpAudioBmpEx;
     169             : };
     170             : 
     171             : }} // end namespace avmedia::priv
     172             : 
     173             : #endif
     174             : 
     175             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11