1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include <tools/prewin.h> 29*cdf0e10cSrcweir #if defined _MSC_VER 30*cdf0e10cSrcweir #pragma warning(push, 1) 31*cdf0e10cSrcweir #pragma warning(disable: 4917) 32*cdf0e10cSrcweir #endif 33*cdf0e10cSrcweir #include <windows.h> 34*cdf0e10cSrcweir #include <objbase.h> 35*cdf0e10cSrcweir #include <strmif.h> 36*cdf0e10cSrcweir #include <control.h> 37*cdf0e10cSrcweir #include <dshow.h> 38*cdf0e10cSrcweir #if defined _MSC_VER 39*cdf0e10cSrcweir #pragma warning(pop) 40*cdf0e10cSrcweir #endif 41*cdf0e10cSrcweir #include <tools/postwin.h> 42*cdf0e10cSrcweir #include <com/sun/star/awt/SystemPointer.hdl> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir #include "window.hxx" 45*cdf0e10cSrcweir #include "player.hxx" 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir #define AVMEDIA_WIN_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_DirectX" 48*cdf0e10cSrcweir #define AVMEDIA_WIN_WINDOW_SERVICENAME "com.sun.star.media.Window_DirectX" 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir using namespace ::com::sun::star; 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir namespace avmedia { namespace win { 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir // ----------- 55*cdf0e10cSrcweir // - statics - 56*cdf0e10cSrcweir // ----------- 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir static ::osl::Mutex& ImplGetOwnStaticMutex() 59*cdf0e10cSrcweir { 60*cdf0e10cSrcweir static ::osl::Mutex* pMutex = NULL; 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir if( pMutex == NULL ) 63*cdf0e10cSrcweir { 64*cdf0e10cSrcweir ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir if( pMutex == NULL ) 67*cdf0e10cSrcweir { 68*cdf0e10cSrcweir static ::osl::Mutex aMutex; 69*cdf0e10cSrcweir pMutex = &aMutex; 70*cdf0e10cSrcweir } 71*cdf0e10cSrcweir } 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir return *pMutex; 74*cdf0e10cSrcweir } 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir // ----------- 77*cdf0e10cSrcweir // - WndProc - 78*cdf0e10cSrcweir // ----------- 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM nPar2 ) 81*cdf0e10cSrcweir { 82*cdf0e10cSrcweir Window* pWindow = (Window*) ::GetWindowLong( hWnd, 0 ); 83*cdf0e10cSrcweir bool bProcessed = true; 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir if( pWindow ) 86*cdf0e10cSrcweir { 87*cdf0e10cSrcweir switch( nMsg ) 88*cdf0e10cSrcweir { 89*cdf0e10cSrcweir case( WM_SETCURSOR ): 90*cdf0e10cSrcweir pWindow->updatePointer(); 91*cdf0e10cSrcweir break; 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir case( WM_GRAPHNOTIFY ): 94*cdf0e10cSrcweir pWindow->processGraphEvent(); 95*cdf0e10cSrcweir break; 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir case( WM_MOUSEMOVE ): 98*cdf0e10cSrcweir case( WM_LBUTTONDOWN ): 99*cdf0e10cSrcweir case( WM_MBUTTONDOWN ): 100*cdf0e10cSrcweir case( WM_RBUTTONDOWN ): 101*cdf0e10cSrcweir case( WM_LBUTTONUP ): 102*cdf0e10cSrcweir case( WM_MBUTTONUP ): 103*cdf0e10cSrcweir case( WM_RBUTTONUP ): 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir awt::MouseEvent aUNOEvt; 106*cdf0e10cSrcweir POINT aWinPoint; 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir if( !::GetCursorPos( &aWinPoint ) || !::ScreenToClient( hWnd, &aWinPoint ) ) 109*cdf0e10cSrcweir { 110*cdf0e10cSrcweir aWinPoint.x = GET_X_LPARAM( nPar2 ); 111*cdf0e10cSrcweir aWinPoint.y = GET_Y_LPARAM( nPar2 ); 112*cdf0e10cSrcweir } 113*cdf0e10cSrcweir aUNOEvt.Modifiers = 0; 114*cdf0e10cSrcweir aUNOEvt.Buttons = 0; 115*cdf0e10cSrcweir aUNOEvt.X = aWinPoint.x; 116*cdf0e10cSrcweir aUNOEvt.Y = aWinPoint.y; 117*cdf0e10cSrcweir aUNOEvt.PopupTrigger = false; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir // Modifiers 120*cdf0e10cSrcweir if( nPar1 & MK_SHIFT ) 121*cdf0e10cSrcweir aUNOEvt.Modifiers |= awt::KeyModifier::SHIFT; 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir if( nPar1 & MK_CONTROL ) 124*cdf0e10cSrcweir aUNOEvt.Modifiers |= awt::KeyModifier::MOD1; 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir // Buttons 127*cdf0e10cSrcweir if( WM_LBUTTONDOWN == nMsg || WM_LBUTTONUP == nMsg ) 128*cdf0e10cSrcweir aUNOEvt.Buttons |= awt::MouseButton::LEFT; 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir if( WM_MBUTTONDOWN == nMsg || WM_MBUTTONUP == nMsg ) 131*cdf0e10cSrcweir aUNOEvt.Buttons |= awt::MouseButton::MIDDLE; 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir if( WM_RBUTTONDOWN == nMsg || WM_RBUTTONUP == nMsg ) 134*cdf0e10cSrcweir aUNOEvt.Buttons |= awt::MouseButton::RIGHT; 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir // event type 137*cdf0e10cSrcweir if( WM_LBUTTONDOWN == nMsg || 138*cdf0e10cSrcweir WM_MBUTTONDOWN == nMsg || 139*cdf0e10cSrcweir WM_RBUTTONDOWN == nMsg ) 140*cdf0e10cSrcweir { 141*cdf0e10cSrcweir aUNOEvt.ClickCount = 1; 142*cdf0e10cSrcweir pWindow->fireMousePressedEvent( aUNOEvt ); 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir else if( WM_LBUTTONUP == nMsg || 145*cdf0e10cSrcweir WM_MBUTTONUP == nMsg || 146*cdf0e10cSrcweir WM_RBUTTONUP == nMsg ) 147*cdf0e10cSrcweir { 148*cdf0e10cSrcweir aUNOEvt.ClickCount = 1; 149*cdf0e10cSrcweir pWindow->fireMouseReleasedEvent( aUNOEvt ); 150*cdf0e10cSrcweir } 151*cdf0e10cSrcweir else if( WM_MOUSEMOVE == nMsg ) 152*cdf0e10cSrcweir { 153*cdf0e10cSrcweir aUNOEvt.ClickCount = 0; 154*cdf0e10cSrcweir pWindow->fireMouseMovedEvent( aUNOEvt ); 155*cdf0e10cSrcweir pWindow->updatePointer(); 156*cdf0e10cSrcweir } 157*cdf0e10cSrcweir } 158*cdf0e10cSrcweir break; 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir case( WM_SETFOCUS ): 161*cdf0e10cSrcweir { 162*cdf0e10cSrcweir const awt::FocusEvent aUNOEvt; 163*cdf0e10cSrcweir pWindow->fireSetFocusEvent( aUNOEvt ); 164*cdf0e10cSrcweir } 165*cdf0e10cSrcweir break; 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir default: 168*cdf0e10cSrcweir bProcessed = false; 169*cdf0e10cSrcweir break; 170*cdf0e10cSrcweir } 171*cdf0e10cSrcweir } 172*cdf0e10cSrcweir else 173*cdf0e10cSrcweir bProcessed = false; 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir return( bProcessed ? 0 : DefWindowProc( hWnd, nMsg, nPar1, nPar2 ) ); 176*cdf0e10cSrcweir } 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir // --------------- 179*cdf0e10cSrcweir // - Window - 180*cdf0e10cSrcweir // --------------- 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir WNDCLASS* lcl_getWndClass() 183*cdf0e10cSrcweir { 184*cdf0e10cSrcweir static WNDCLASS* s_pWndClass = NULL; 185*cdf0e10cSrcweir if ( !s_pWndClass ) 186*cdf0e10cSrcweir { 187*cdf0e10cSrcweir s_pWndClass = new WNDCLASS; 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir memset( s_pWndClass, 0, sizeof( *s_pWndClass ) ); 190*cdf0e10cSrcweir s_pWndClass->hInstance = GetModuleHandle( NULL ); 191*cdf0e10cSrcweir s_pWndClass->cbWndExtra = sizeof( DWORD ); 192*cdf0e10cSrcweir s_pWndClass->lpfnWndProc = MediaPlayerWndProc; 193*cdf0e10cSrcweir s_pWndClass->lpszClassName = "com_sun_star_media_PlayerWnd"; 194*cdf0e10cSrcweir s_pWndClass->hbrBackground = (HBRUSH) ::GetStockObject( BLACK_BRUSH ); 195*cdf0e10cSrcweir s_pWndClass->hCursor = ::LoadCursor( NULL, IDC_ARROW ); 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir ::RegisterClass( s_pWndClass ); 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir return s_pWndClass; 200*cdf0e10cSrcweir } 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Player& rPlayer ) : 205*cdf0e10cSrcweir mxMgr( rxMgr ), 206*cdf0e10cSrcweir mrPlayer( rPlayer ), 207*cdf0e10cSrcweir meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ), 208*cdf0e10cSrcweir mnParentWnd( 0 ), 209*cdf0e10cSrcweir mnFrameWnd( 0 ), 210*cdf0e10cSrcweir maListeners( maMutex ), 211*cdf0e10cSrcweir mnPointerType( awt::SystemPointer::ARROW ) 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() ); 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir lcl_getWndClass(); 216*cdf0e10cSrcweir } 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir Window::~Window() 221*cdf0e10cSrcweir { 222*cdf0e10cSrcweir if( mnFrameWnd ) 223*cdf0e10cSrcweir ::DestroyWindow( (HWND) mnFrameWnd ); 224*cdf0e10cSrcweir } 225*cdf0e10cSrcweir 226*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir void Window::ImplLayoutVideoWindow() 229*cdf0e10cSrcweir { 230*cdf0e10cSrcweir if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel ) 231*cdf0e10cSrcweir { 232*cdf0e10cSrcweir awt::Size aPrefSize( mrPlayer.getPreferredPlayerWindowSize() ); 233*cdf0e10cSrcweir awt::Rectangle aRect = getPosSize(); 234*cdf0e10cSrcweir int nW = aRect.Width, nH = aRect.Height; 235*cdf0e10cSrcweir int nVideoW = nW, nVideoH = nH; 236*cdf0e10cSrcweir int nX = 0, nY = 0, nWidth = 0, nHeight = 0; 237*cdf0e10cSrcweir bool bDone = false, bZoom = false; 238*cdf0e10cSrcweir 239*cdf0e10cSrcweir if( media::ZoomLevel_ORIGINAL == meZoomLevel ) 240*cdf0e10cSrcweir { 241*cdf0e10cSrcweir bZoom = true; 242*cdf0e10cSrcweir } 243*cdf0e10cSrcweir else if( media::ZoomLevel_ZOOM_1_TO_4 == meZoomLevel ) 244*cdf0e10cSrcweir { 245*cdf0e10cSrcweir aPrefSize.Width >>= 2; 246*cdf0e10cSrcweir aPrefSize.Height >>= 2; 247*cdf0e10cSrcweir bZoom = true; 248*cdf0e10cSrcweir } 249*cdf0e10cSrcweir else if( media::ZoomLevel_ZOOM_1_TO_2 == meZoomLevel ) 250*cdf0e10cSrcweir { 251*cdf0e10cSrcweir aPrefSize.Width >>= 1; 252*cdf0e10cSrcweir aPrefSize.Height >>= 1; 253*cdf0e10cSrcweir bZoom = true; 254*cdf0e10cSrcweir } 255*cdf0e10cSrcweir else if( media::ZoomLevel_ZOOM_2_TO_1 == meZoomLevel ) 256*cdf0e10cSrcweir { 257*cdf0e10cSrcweir aPrefSize.Width <<= 1; 258*cdf0e10cSrcweir aPrefSize.Height <<= 1; 259*cdf0e10cSrcweir bZoom = true; 260*cdf0e10cSrcweir } 261*cdf0e10cSrcweir else if( media::ZoomLevel_ZOOM_4_TO_1 == meZoomLevel ) 262*cdf0e10cSrcweir { 263*cdf0e10cSrcweir aPrefSize.Width <<= 2; 264*cdf0e10cSrcweir aPrefSize.Height <<= 2; 265*cdf0e10cSrcweir bZoom = true; 266*cdf0e10cSrcweir } 267*cdf0e10cSrcweir else if( media::ZoomLevel_FIT_TO_WINDOW == meZoomLevel ) 268*cdf0e10cSrcweir { 269*cdf0e10cSrcweir nWidth = nVideoW; 270*cdf0e10cSrcweir nHeight = nVideoH; 271*cdf0e10cSrcweir bDone = true; 272*cdf0e10cSrcweir } 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir if( bZoom ) 275*cdf0e10cSrcweir { 276*cdf0e10cSrcweir if( ( aPrefSize.Width <= nVideoW ) && ( aPrefSize.Height <= nVideoH ) ) 277*cdf0e10cSrcweir { 278*cdf0e10cSrcweir nX = ( nVideoW - aPrefSize.Width ) >> 1; 279*cdf0e10cSrcweir nY = ( nVideoH - aPrefSize.Height ) >> 1; 280*cdf0e10cSrcweir nWidth = aPrefSize.Width; 281*cdf0e10cSrcweir nHeight = aPrefSize.Height; 282*cdf0e10cSrcweir bDone = true; 283*cdf0e10cSrcweir } 284*cdf0e10cSrcweir } 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir if( !bDone ) 287*cdf0e10cSrcweir { 288*cdf0e10cSrcweir if( aPrefSize.Width > 0 && aPrefSize.Height > 0 && nVideoW > 0 && nVideoH > 0 ) 289*cdf0e10cSrcweir { 290*cdf0e10cSrcweir double fPrefWH = (double) aPrefSize.Width / aPrefSize.Height; 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir if( fPrefWH < ( (double) nVideoW / nVideoH ) ) 293*cdf0e10cSrcweir nVideoW = (int)( nVideoH * fPrefWH ); 294*cdf0e10cSrcweir else 295*cdf0e10cSrcweir nVideoH = (int)( nVideoW / fPrefWH ); 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir nX = ( nW - nVideoW ) >> 1; 298*cdf0e10cSrcweir nY = ( nH - nVideoH ) >> 1; 299*cdf0e10cSrcweir nWidth = nVideoW; 300*cdf0e10cSrcweir nHeight = nVideoH; 301*cdf0e10cSrcweir } 302*cdf0e10cSrcweir else 303*cdf0e10cSrcweir nX = nY = nWidth = nHeight = 0; 304*cdf0e10cSrcweir } 305*cdf0e10cSrcweir 306*cdf0e10cSrcweir IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() ); 307*cdf0e10cSrcweir 308*cdf0e10cSrcweir if( pVideoWindow ) 309*cdf0e10cSrcweir pVideoWindow->SetWindowPosition( nX, nY, nWidth, nHeight ); 310*cdf0e10cSrcweir } 311*cdf0e10cSrcweir } 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir bool Window::create( const uno::Sequence< uno::Any >& rArguments ) 316*cdf0e10cSrcweir { 317*cdf0e10cSrcweir IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() ); 318*cdf0e10cSrcweir WNDCLASS* mpWndClass = lcl_getWndClass(); 319*cdf0e10cSrcweir 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir if( !mnFrameWnd && pVideoWindow && mpWndClass ) 322*cdf0e10cSrcweir { 323*cdf0e10cSrcweir awt::Rectangle aRect; 324*cdf0e10cSrcweir sal_IntPtr nWnd; 325*cdf0e10cSrcweir 326*cdf0e10cSrcweir rArguments[ 0 ] >>= nWnd; 327*cdf0e10cSrcweir rArguments[ 1 ] >>= aRect; 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir mnParentWnd = static_cast<int>(nWnd); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL, 332*cdf0e10cSrcweir WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 333*cdf0e10cSrcweir aRect.X, aRect.Y, aRect.Width, aRect.Height, 334*cdf0e10cSrcweir (HWND) mnParentWnd, NULL, mpWndClass->hInstance, 0 ); 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir // if the last CreateWindow failed... 337*cdf0e10cSrcweir if( mnFrameWnd == 0 ) 338*cdf0e10cSrcweir { 339*cdf0e10cSrcweir // try again and this time assume that mnParent is indeed a dc 340*cdf0e10cSrcweir mnParentWnd = reinterpret_cast<int>(::WindowFromDC( (HDC)mnParentWnd )); 341*cdf0e10cSrcweir mnFrameWnd = (int) ::CreateWindow( mpWndClass->lpszClassName, NULL, 342*cdf0e10cSrcweir WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 343*cdf0e10cSrcweir aRect.X, aRect.Y, aRect.Width, aRect.Height, 344*cdf0e10cSrcweir (HWND)mnParentWnd , NULL, mpWndClass->hInstance, 0 ); 345*cdf0e10cSrcweir } 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir if( mnFrameWnd ) 348*cdf0e10cSrcweir { 349*cdf0e10cSrcweir ::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this ); 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir #ifdef DDRAW_TEST_OUTPUT 352*cdf0e10cSrcweir IDirectDraw7* pDDraw; 353*cdf0e10cSrcweir IDirectDrawSurface7* pDDSurface; 354*cdf0e10cSrcweir IDirectDrawClipper* pDDClipper; 355*cdf0e10cSrcweir 356*cdf0e10cSrcweir if( DD_OK == DirectDrawCreateEx( NULL, (void**) &pDDraw, IID_IDirectDraw7, NULL ) ) 357*cdf0e10cSrcweir { 358*cdf0e10cSrcweir if( DD_OK == pDDraw->SetCooperativeLevel( (HWND) mnParentWnd, DDSCL_NORMAL ) ) 359*cdf0e10cSrcweir { 360*cdf0e10cSrcweir DDSURFACEDESC2 aDDDesc; 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir memset( &aDDDesc, 0, sizeof( aDDDesc ) ); 363*cdf0e10cSrcweir aDDDesc.dwSize = sizeof( aDDDesc ); 364*cdf0e10cSrcweir aDDDesc.dwFlags = DDSD_CAPS; 365*cdf0e10cSrcweir aDDDesc.ddsCaps.dwCaps |= DDSCAPS_PRIMARYSURFACE; 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir if( DD_OK == pDDraw->CreateSurface( &aDDDesc, &pDDSurface, NULL ) ) 368*cdf0e10cSrcweir { 369*cdf0e10cSrcweir if( DD_OK == pDDraw->CreateClipper( 0, &pDDClipper, NULL ) ) 370*cdf0e10cSrcweir { 371*cdf0e10cSrcweir pDDClipper->SetHWnd( 0, (HWND) mnFrameWnd ); 372*cdf0e10cSrcweir pDDSurface->SetClipper( pDDClipper ); 373*cdf0e10cSrcweir } 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir mrPlayer.setDDrawParams( (IDirectDraw*) pDDraw, (IDirectDrawSurface*) pDDSurface ); 376*cdf0e10cSrcweir #endif 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir pVideoWindow->put_Owner( (OAHWND) mnFrameWnd ); 379*cdf0e10cSrcweir pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd ); 380*cdf0e10cSrcweir pVideoWindow->put_WindowStyle( WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN ); 381*cdf0e10cSrcweir 382*cdf0e10cSrcweir mrPlayer.setNotifyWnd( mnFrameWnd ); 383*cdf0e10cSrcweir 384*cdf0e10cSrcweir meZoomLevel = media::ZoomLevel_FIT_TO_WINDOW; 385*cdf0e10cSrcweir ImplLayoutVideoWindow(); 386*cdf0e10cSrcweir #ifdef DDRAW_TEST_OUTPUT 387*cdf0e10cSrcweir } 388*cdf0e10cSrcweir } 389*cdf0e10cSrcweir } 390*cdf0e10cSrcweir #endif 391*cdf0e10cSrcweir } 392*cdf0e10cSrcweir } 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir return( mnFrameWnd != 0 ); 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir void Window::processGraphEvent() 400*cdf0e10cSrcweir { 401*cdf0e10cSrcweir mrPlayer.processEvent(); 402*cdf0e10cSrcweir } 403*cdf0e10cSrcweir 404*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir void Window::updatePointer() 407*cdf0e10cSrcweir { 408*cdf0e10cSrcweir char* pCursorName; 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir switch( mnPointerType ) 411*cdf0e10cSrcweir { 412*cdf0e10cSrcweir case( awt::SystemPointer::CROSS ): pCursorName = IDC_CROSS; break; 413*cdf0e10cSrcweir //case( awt::SystemPointer::HAND ): pCursorName = IDC_HAND; break; 414*cdf0e10cSrcweir case( awt::SystemPointer::MOVE ): pCursorName = IDC_SIZEALL; break; 415*cdf0e10cSrcweir case( awt::SystemPointer::WAIT ): pCursorName = IDC_WAIT; break; 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir default: 418*cdf0e10cSrcweir pCursorName = IDC_ARROW; 419*cdf0e10cSrcweir break; 420*cdf0e10cSrcweir } 421*cdf0e10cSrcweir 422*cdf0e10cSrcweir ::SetCursor( ::LoadCursor( NULL, pCursorName ) ); 423*cdf0e10cSrcweir } 424*cdf0e10cSrcweir 425*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir void SAL_CALL Window::update( ) 428*cdf0e10cSrcweir throw (uno::RuntimeException) 429*cdf0e10cSrcweir { 430*cdf0e10cSrcweir ::RedrawWindow( (HWND) mnFrameWnd, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE ); 431*cdf0e10cSrcweir } 432*cdf0e10cSrcweir 433*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 434*cdf0e10cSrcweir 435*cdf0e10cSrcweir sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel ) 436*cdf0e10cSrcweir throw (uno::RuntimeException) 437*cdf0e10cSrcweir { 438*cdf0e10cSrcweir boolean bRet = false; 439*cdf0e10cSrcweir 440*cdf0e10cSrcweir if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel && 441*cdf0e10cSrcweir media::ZoomLevel_NOT_AVAILABLE != eZoomLevel ) 442*cdf0e10cSrcweir { 443*cdf0e10cSrcweir if( eZoomLevel != meZoomLevel ) 444*cdf0e10cSrcweir { 445*cdf0e10cSrcweir meZoomLevel = eZoomLevel; 446*cdf0e10cSrcweir ImplLayoutVideoWindow(); 447*cdf0e10cSrcweir } 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir bRet = true; 450*cdf0e10cSrcweir } 451*cdf0e10cSrcweir 452*cdf0e10cSrcweir return bRet; 453*cdf0e10cSrcweir } 454*cdf0e10cSrcweir 455*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 456*cdf0e10cSrcweir 457*cdf0e10cSrcweir media::ZoomLevel SAL_CALL Window::getZoomLevel( ) 458*cdf0e10cSrcweir throw (uno::RuntimeException) 459*cdf0e10cSrcweir { 460*cdf0e10cSrcweir return meZoomLevel; 461*cdf0e10cSrcweir } 462*cdf0e10cSrcweir 463*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 464*cdf0e10cSrcweir 465*cdf0e10cSrcweir void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) 466*cdf0e10cSrcweir throw (uno::RuntimeException) 467*cdf0e10cSrcweir { 468*cdf0e10cSrcweir mnPointerType = nPointerType; 469*cdf0e10cSrcweir } 470*cdf0e10cSrcweir 471*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 472*cdf0e10cSrcweir 473*cdf0e10cSrcweir void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 ) 474*cdf0e10cSrcweir throw (uno::RuntimeException) 475*cdf0e10cSrcweir { 476*cdf0e10cSrcweir if( mnFrameWnd ) 477*cdf0e10cSrcweir { 478*cdf0e10cSrcweir ::SetWindowPos( (HWND) mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 ); 479*cdf0e10cSrcweir ImplLayoutVideoWindow(); 480*cdf0e10cSrcweir } 481*cdf0e10cSrcweir } 482*cdf0e10cSrcweir 483*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 484*cdf0e10cSrcweir 485*cdf0e10cSrcweir awt::Rectangle SAL_CALL Window::getPosSize() 486*cdf0e10cSrcweir throw (uno::RuntimeException) 487*cdf0e10cSrcweir { 488*cdf0e10cSrcweir awt::Rectangle aRet; 489*cdf0e10cSrcweir 490*cdf0e10cSrcweir if( mnFrameWnd ) 491*cdf0e10cSrcweir { 492*cdf0e10cSrcweir ::RECT aWndRect; 493*cdf0e10cSrcweir 494*cdf0e10cSrcweir if( ::GetClientRect( (HWND) mnFrameWnd, &aWndRect ) ) 495*cdf0e10cSrcweir { 496*cdf0e10cSrcweir aRet.X = aWndRect.left; 497*cdf0e10cSrcweir aRet.Y = aWndRect.top; 498*cdf0e10cSrcweir aRet.Width = aWndRect.right - aWndRect.left + 1; 499*cdf0e10cSrcweir aRet.Height = aWndRect.bottom - aWndRect.top + 1; 500*cdf0e10cSrcweir } 501*cdf0e10cSrcweir } 502*cdf0e10cSrcweir 503*cdf0e10cSrcweir return aRet; 504*cdf0e10cSrcweir } 505*cdf0e10cSrcweir 506*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir void SAL_CALL Window::setVisible( sal_Bool bVisible ) 509*cdf0e10cSrcweir throw (uno::RuntimeException) 510*cdf0e10cSrcweir { 511*cdf0e10cSrcweir if( mnFrameWnd ) 512*cdf0e10cSrcweir { 513*cdf0e10cSrcweir IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() ); 514*cdf0e10cSrcweir 515*cdf0e10cSrcweir if( pVideoWindow ) 516*cdf0e10cSrcweir pVideoWindow->put_Visible( bVisible ? OATRUE : OAFALSE ); 517*cdf0e10cSrcweir 518*cdf0e10cSrcweir ::ShowWindow( (HWND) mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE ); 519*cdf0e10cSrcweir } 520*cdf0e10cSrcweir } 521*cdf0e10cSrcweir 522*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 523*cdf0e10cSrcweir 524*cdf0e10cSrcweir void SAL_CALL Window::setEnable( sal_Bool bEnable ) 525*cdf0e10cSrcweir throw (uno::RuntimeException) 526*cdf0e10cSrcweir { 527*cdf0e10cSrcweir if( mnFrameWnd ) 528*cdf0e10cSrcweir ::EnableWindow( (HWND) mnFrameWnd, bEnable ); 529*cdf0e10cSrcweir } 530*cdf0e10cSrcweir 531*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 532*cdf0e10cSrcweir 533*cdf0e10cSrcweir void SAL_CALL Window::setFocus( ) 534*cdf0e10cSrcweir throw (uno::RuntimeException) 535*cdf0e10cSrcweir { 536*cdf0e10cSrcweir if( mnFrameWnd ) 537*cdf0e10cSrcweir ::SetFocus( (HWND) mnFrameWnd ); 538*cdf0e10cSrcweir } 539*cdf0e10cSrcweir 540*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 541*cdf0e10cSrcweir 542*cdf0e10cSrcweir void SAL_CALL Window::addWindowListener( const uno::Reference< awt::XWindowListener >& xListener ) 543*cdf0e10cSrcweir throw (uno::RuntimeException) 544*cdf0e10cSrcweir { 545*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 546*cdf0e10cSrcweir } 547*cdf0e10cSrcweir 548*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 549*cdf0e10cSrcweir 550*cdf0e10cSrcweir void SAL_CALL Window::removeWindowListener( const uno::Reference< awt::XWindowListener >& xListener ) 551*cdf0e10cSrcweir throw (uno::RuntimeException) 552*cdf0e10cSrcweir { 553*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 554*cdf0e10cSrcweir } 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 557*cdf0e10cSrcweir 558*cdf0e10cSrcweir void SAL_CALL Window::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) 559*cdf0e10cSrcweir throw (uno::RuntimeException) 560*cdf0e10cSrcweir { 561*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 562*cdf0e10cSrcweir } 563*cdf0e10cSrcweir 564*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 565*cdf0e10cSrcweir 566*cdf0e10cSrcweir void SAL_CALL Window::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) 567*cdf0e10cSrcweir throw (uno::RuntimeException) 568*cdf0e10cSrcweir { 569*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 570*cdf0e10cSrcweir } 571*cdf0e10cSrcweir 572*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 573*cdf0e10cSrcweir 574*cdf0e10cSrcweir void SAL_CALL Window::addKeyListener( const uno::Reference< awt::XKeyListener >& xListener ) 575*cdf0e10cSrcweir throw (uno::RuntimeException) 576*cdf0e10cSrcweir { 577*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 578*cdf0e10cSrcweir } 579*cdf0e10cSrcweir 580*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 581*cdf0e10cSrcweir 582*cdf0e10cSrcweir void SAL_CALL Window::removeKeyListener( const uno::Reference< awt::XKeyListener >& xListener ) 583*cdf0e10cSrcweir throw (uno::RuntimeException) 584*cdf0e10cSrcweir { 585*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 586*cdf0e10cSrcweir } 587*cdf0e10cSrcweir 588*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 589*cdf0e10cSrcweir 590*cdf0e10cSrcweir void SAL_CALL Window::addMouseListener( const uno::Reference< awt::XMouseListener >& xListener ) 591*cdf0e10cSrcweir throw (uno::RuntimeException) 592*cdf0e10cSrcweir { 593*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 594*cdf0e10cSrcweir } 595*cdf0e10cSrcweir 596*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 597*cdf0e10cSrcweir 598*cdf0e10cSrcweir void SAL_CALL Window::removeMouseListener( const uno::Reference< awt::XMouseListener >& xListener ) 599*cdf0e10cSrcweir throw (uno::RuntimeException) 600*cdf0e10cSrcweir { 601*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 602*cdf0e10cSrcweir } 603*cdf0e10cSrcweir 604*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 605*cdf0e10cSrcweir 606*cdf0e10cSrcweir void SAL_CALL Window::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener ) 607*cdf0e10cSrcweir throw (uno::RuntimeException) 608*cdf0e10cSrcweir { 609*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 610*cdf0e10cSrcweir } 611*cdf0e10cSrcweir 612*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 613*cdf0e10cSrcweir 614*cdf0e10cSrcweir void SAL_CALL Window::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& xListener ) 615*cdf0e10cSrcweir throw (uno::RuntimeException) 616*cdf0e10cSrcweir { 617*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 618*cdf0e10cSrcweir } 619*cdf0e10cSrcweir 620*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir void SAL_CALL Window::addPaintListener( const uno::Reference< awt::XPaintListener >& xListener ) 623*cdf0e10cSrcweir throw (uno::RuntimeException) 624*cdf0e10cSrcweir { 625*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 626*cdf0e10cSrcweir } 627*cdf0e10cSrcweir 628*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 629*cdf0e10cSrcweir 630*cdf0e10cSrcweir void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintListener >& xListener ) 631*cdf0e10cSrcweir throw (uno::RuntimeException) 632*cdf0e10cSrcweir { 633*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 634*cdf0e10cSrcweir } 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 637*cdf0e10cSrcweir 638*cdf0e10cSrcweir void SAL_CALL Window::dispose( ) 639*cdf0e10cSrcweir throw (uno::RuntimeException) 640*cdf0e10cSrcweir { 641*cdf0e10cSrcweir } 642*cdf0e10cSrcweir 643*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir void SAL_CALL Window::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) 646*cdf0e10cSrcweir throw (uno::RuntimeException) 647*cdf0e10cSrcweir { 648*cdf0e10cSrcweir maListeners.addInterface( getCppuType( &xListener ), xListener ); 649*cdf0e10cSrcweir } 650*cdf0e10cSrcweir 651*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 652*cdf0e10cSrcweir 653*cdf0e10cSrcweir void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) 654*cdf0e10cSrcweir throw (uno::RuntimeException) 655*cdf0e10cSrcweir { 656*cdf0e10cSrcweir maListeners.removeInterface( getCppuType( &xListener ), xListener ); 657*cdf0e10cSrcweir } 658*cdf0e10cSrcweir 659*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 660*cdf0e10cSrcweir 661*cdf0e10cSrcweir void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) 662*cdf0e10cSrcweir { 663*cdf0e10cSrcweir ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); 664*cdf0e10cSrcweir 665*cdf0e10cSrcweir if( pContainer ) 666*cdf0e10cSrcweir { 667*cdf0e10cSrcweir ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); 668*cdf0e10cSrcweir 669*cdf0e10cSrcweir while( aIter.hasMoreElements() ) 670*cdf0e10cSrcweir uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mousePressed( rEvt ); 671*cdf0e10cSrcweir } 672*cdf0e10cSrcweir } 673*cdf0e10cSrcweir 674*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 675*cdf0e10cSrcweir 676*cdf0e10cSrcweir void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) 677*cdf0e10cSrcweir { 678*cdf0e10cSrcweir ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); 679*cdf0e10cSrcweir 680*cdf0e10cSrcweir if( pContainer ) 681*cdf0e10cSrcweir { 682*cdf0e10cSrcweir ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); 683*cdf0e10cSrcweir 684*cdf0e10cSrcweir while( aIter.hasMoreElements() ) 685*cdf0e10cSrcweir uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mouseReleased( rEvt ); 686*cdf0e10cSrcweir } 687*cdf0e10cSrcweir } 688*cdf0e10cSrcweir 689*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 690*cdf0e10cSrcweir 691*cdf0e10cSrcweir void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) 692*cdf0e10cSrcweir { 693*cdf0e10cSrcweir ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseMotionListener >*) 0 ) ); 694*cdf0e10cSrcweir 695*cdf0e10cSrcweir if( pContainer ) 696*cdf0e10cSrcweir { 697*cdf0e10cSrcweir ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); 698*cdf0e10cSrcweir 699*cdf0e10cSrcweir while( aIter.hasMoreElements() ) 700*cdf0e10cSrcweir uno::Reference< awt::XMouseMotionListener >( aIter.next(), uno::UNO_QUERY )->mouseMoved( rEvt ); 701*cdf0e10cSrcweir } 702*cdf0e10cSrcweir } 703*cdf0e10cSrcweir 704*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 705*cdf0e10cSrcweir 706*cdf0e10cSrcweir void Window::fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt ) 707*cdf0e10cSrcweir { 708*cdf0e10cSrcweir ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XFocusListener >*) 0 ) ); 709*cdf0e10cSrcweir 710*cdf0e10cSrcweir if( pContainer ) 711*cdf0e10cSrcweir { 712*cdf0e10cSrcweir ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); 713*cdf0e10cSrcweir 714*cdf0e10cSrcweir while( aIter.hasMoreElements() ) 715*cdf0e10cSrcweir uno::Reference< awt::XFocusListener >( aIter.next(), uno::UNO_QUERY )->focusGained( rEvt ); 716*cdf0e10cSrcweir } 717*cdf0e10cSrcweir } 718*cdf0e10cSrcweir 719*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 720*cdf0e10cSrcweir 721*cdf0e10cSrcweir ::rtl::OUString SAL_CALL Window::getImplementationName( ) 722*cdf0e10cSrcweir throw (uno::RuntimeException) 723*cdf0e10cSrcweir { 724*cdf0e10cSrcweir return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_WIN_WINDOW_IMPLEMENTATIONNAME ) ); 725*cdf0e10cSrcweir } 726*cdf0e10cSrcweir 727*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 728*cdf0e10cSrcweir 729*cdf0e10cSrcweir sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName ) 730*cdf0e10cSrcweir throw (uno::RuntimeException) 731*cdf0e10cSrcweir { 732*cdf0e10cSrcweir return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( AVMEDIA_WIN_WINDOW_SERVICENAME ) ); 733*cdf0e10cSrcweir } 734*cdf0e10cSrcweir 735*cdf0e10cSrcweir // ------------------------------------------------------------------------------ 736*cdf0e10cSrcweir 737*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL Window::getSupportedServiceNames( ) 738*cdf0e10cSrcweir throw (uno::RuntimeException) 739*cdf0e10cSrcweir { 740*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aRet(1); 741*cdf0e10cSrcweir aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_WIN_WINDOW_SERVICENAME ) ); 742*cdf0e10cSrcweir 743*cdf0e10cSrcweir return aRet; 744*cdf0e10cSrcweir } 745*cdf0e10cSrcweir 746*cdf0e10cSrcweir } // namespace win 747*cdf0e10cSrcweir } // namespace avmedia 748