19ea84ac5SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 39ea84ac5SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 49ea84ac5SAndrew Rist * or more contributor license agreements. See the NOTICE file 59ea84ac5SAndrew Rist * distributed with this work for additional information 69ea84ac5SAndrew Rist * regarding copyright ownership. The ASF licenses this file 79ea84ac5SAndrew Rist * to you under the Apache License, Version 2.0 (the 89ea84ac5SAndrew Rist * "License"); you may not use this file except in compliance 99ea84ac5SAndrew Rist * with the License. You may obtain a copy of the License at 109ea84ac5SAndrew Rist * 119ea84ac5SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 129ea84ac5SAndrew Rist * 139ea84ac5SAndrew Rist * Unless required by applicable law or agreed to in writing, 149ea84ac5SAndrew Rist * software distributed under the License is distributed on an 159ea84ac5SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 169ea84ac5SAndrew Rist * KIND, either express or implied. See the License for the 179ea84ac5SAndrew Rist * specific language governing permissions and limitations 189ea84ac5SAndrew Rist * under the License. 199ea84ac5SAndrew Rist * 209ea84ac5SAndrew Rist *************************************************************/ 219ea84ac5SAndrew Rist 229ea84ac5SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _AVMEDIA_MEDIACHILD_HXX 25cdf0e10cSrcweir #define _AVMEDIA_MEDIACHILD_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <sfx2/ctrlitem.hxx> 28cdf0e10cSrcweir #include <sfx2/dockwin.hxx> 29cdf0e10cSrcweir #include <tools/urlobj.hxx> 30*deb7b1c2Sdamjan #include <avmedia/avmediadllapi.h> 31cdf0e10cSrcweir 32cdf0e10cSrcweir // ----------- 33cdf0e10cSrcweir // - Defines - 34cdf0e10cSrcweir // ----------- 35cdf0e10cSrcweir 36cdf0e10cSrcweir #define AVMEDIA_MEDIAWINDOW() \ 37cdf0e10cSrcweir (static_cast< ::avmedia::MediaFloater* >( ( \ 38cdf0e10cSrcweir SfxViewFrame::Current() && SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())) ? \ 39cdf0e10cSrcweir SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())->GetWindow() : \ 40cdf0e10cSrcweir NULL)) 41cdf0e10cSrcweir 42cdf0e10cSrcweir namespace avmedia 43cdf0e10cSrcweir { 44cdf0e10cSrcweir 45cdf0e10cSrcweir // --------------- 46cdf0e10cSrcweir // - MediaPlayer - 47cdf0e10cSrcweir // --------------- 48cdf0e10cSrcweir 49*deb7b1c2Sdamjan class AVMEDIA_DLLPUBLIC MediaPlayer : public SfxChildWindow 50cdf0e10cSrcweir { 51cdf0e10cSrcweir public: 52cdf0e10cSrcweir MediaPlayer( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); 53cdf0e10cSrcweir ~MediaPlayer(); 54cdf0e10cSrcweir 55cdf0e10cSrcweir SFX_DECL_CHILDWINDOW( MediaPlayer ); 56cdf0e10cSrcweir }; 57cdf0e10cSrcweir 58cdf0e10cSrcweir // ---------------- 59cdf0e10cSrcweir // - MediaFloater - 60cdf0e10cSrcweir // ---------------- 61cdf0e10cSrcweir 62cdf0e10cSrcweir class MediaWindow; 63cdf0e10cSrcweir 64*deb7b1c2Sdamjan class AVMEDIA_DLLPUBLIC MediaFloater : public SfxDockingWindow 65cdf0e10cSrcweir { 66cdf0e10cSrcweir public: 67cdf0e10cSrcweir 68cdf0e10cSrcweir MediaFloater( SfxBindings* pBindings, SfxChildWindow* pCW, Window* pParent ); 69cdf0e10cSrcweir ~MediaFloater(); 70cdf0e10cSrcweir 71cdf0e10cSrcweir void setURL( const ::rtl::OUString& rURL, bool bPlayImmediately ); 72cdf0e10cSrcweir const ::rtl::OUString& getURL() const; 73cdf0e10cSrcweir 74cdf0e10cSrcweir void dispatchCurrentURL(); 75cdf0e10cSrcweir 76cdf0e10cSrcweir protected: 77cdf0e10cSrcweir 78cdf0e10cSrcweir virtual void Resize(); 79cdf0e10cSrcweir virtual void ToggleFloatingMode(); 80cdf0e10cSrcweir 81cdf0e10cSrcweir private: 82cdf0e10cSrcweir 83cdf0e10cSrcweir MediaWindow* mpMediaWindow; 84cdf0e10cSrcweir Size maLastSize; 85cdf0e10cSrcweir long mnDummy1; 86cdf0e10cSrcweir long mnDummy2; 87cdf0e10cSrcweir 88cdf0e10cSrcweir void implInit(); 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir 91cdf0e10cSrcweir } 92cdf0e10cSrcweir 93cdf0e10cSrcweir #endif 94