summaryrefslogtreecommitdiff
path: root/avmedia/source/viewer/mediawindow_impl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'avmedia/source/viewer/mediawindow_impl.cxx')
-rwxr-xr-x[-rw-r--r--]avmedia/source/viewer/mediawindow_impl.cxx57
1 files changed, 9 insertions, 48 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 787a5087129b..2d4578639110 100644..100755
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -94,11 +94,7 @@ void MediaWindowControl::execute( const MediaItem& rItem )
// --------------------
MediaChildWindow::MediaChildWindow( Window* pParent ) :
-#ifdef GSTREAMER
SystemChildWindow( pParent, WB_CLIPCHILDREN )
-#else
- JavaChildWindow( pParent, WB_CLIPCHILDREN )
-#endif
{
}
@@ -115,11 +111,7 @@ void MediaChildWindow::MouseMove( const MouseEvent& rMEvt )
const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
-#ifdef GSTREAMER
SystemChildWindow::MouseMove( rMEvt );
-#else
- JavaChildWindow::MouseMove( rMEvt );
-#endif
GetParent()->MouseMove( aTransformedEvent );
}
@@ -130,11 +122,7 @@ void MediaChildWindow::MouseButtonDown( const MouseEvent& rMEvt )
const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
-#ifdef GSTREAMER
SystemChildWindow::MouseButtonDown( rMEvt );
-#else
- JavaChildWindow::MouseButtonDown( rMEvt );
-#endif
GetParent()->MouseButtonDown( aTransformedEvent );
}
@@ -145,11 +133,7 @@ void MediaChildWindow::MouseButtonUp( const MouseEvent& rMEvt )
const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
-#ifdef GSTREAMER
SystemChildWindow::MouseButtonUp( rMEvt );
-#else
- JavaChildWindow::MouseButtonUp( rMEvt );
-#endif
GetParent()->MouseButtonUp( aTransformedEvent );
}
@@ -157,11 +141,7 @@ void MediaChildWindow::MouseButtonUp( const MouseEvent& rMEvt )
void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
{
-#ifdef GSTREAMER
SystemChildWindow::KeyInput( rKEvt );
-#else
- JavaChildWindow::KeyInput( rKEvt );
-#endif
GetParent()->KeyInput( rKEvt );
}
@@ -169,11 +149,7 @@ void MediaChildWindow::KeyInput( const KeyEvent& rKEvt )
void MediaChildWindow::KeyUp( const KeyEvent& rKEvt )
{
-#ifdef GSTREAMER
SystemChildWindow::KeyUp( rKEvt );
-#else
- JavaChildWindow::KeyUp( rKEvt );
-#endif
GetParent()->KeyUp( rKEvt );
}
@@ -184,11 +160,7 @@ void MediaChildWindow::Command( const CommandEvent& rCEvt )
const CommandEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ),
rCEvt.GetCommand(), rCEvt.IsMouseEvent(), rCEvt.GetData() );
-#ifdef GSTREAMER
SystemChildWindow::Command( rCEvt );
-#else
- JavaChildWindow::Command( rCEvt );
-#endif
GetParent()->Command( aTransformedEvent );
}
@@ -207,6 +179,7 @@ MediaWindowImpl::MediaWindowImpl( Window* pParent, MediaWindow* pMediaWindow, bo
mpEmptyBmpEx( NULL ),
mpAudioBmpEx( NULL )
{
+ maChildWindow.SetBackground( Color( COL_BLACK ) );
maChildWindow.SetHelpId( HID_AVMEDIA_PLAYERWINDOW );
maChildWindow.Hide();
@@ -255,33 +228,24 @@ void MediaWindowImpl::cleanUp()
void MediaWindowImpl::onURLChanged()
{
+{
if( getPlayer().is() )
{
uno::Sequence< uno::Any > aArgs( 3 );
uno::Reference< media::XPlayerWindow > xPlayerWindow;
const Point aPoint;
const Size aSize( maChildWindow.GetSizePixel() );
-#ifndef GSTREAMER
- const sal_IntPtr nWndHandle = static_cast< sal_IntPtr >( maChildWindow.getParentWindowHandleForJava() );
-#else
const sal_Int32 nWndHandle = 0;
-#endif
aArgs[ 0 ] = uno::makeAny( nWndHandle );
aArgs[ 1 ] = uno::makeAny( awt::Rectangle( aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height() ) );
-#ifdef GSTREAMER
- const SystemEnvData *pSystemData = maChildWindow.GetSystemData();
- OSL_TRACE( "MediaWindowImpl::onURLChanged xwindow id: %ld", pSystemData->aWindow );
- aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
-#endif
+ const SystemEnvData *pSystemData = maChildWindow.GetSystemData();
+ OSL_TRACE( "MediaWindowImpl::onURLChanged xwindow id: %ld", pSystemData->aWindow );
+ aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
try
{
-#ifdef GSTREAMER
if( pSystemData->aWindow != 0 )
-#else
- if( nWndHandle != 0 )
-#endif
xPlayerWindow = getPlayer()->createPlayerWindow( aArgs );
}
catch( uno::RuntimeException )
@@ -332,7 +296,7 @@ void MediaWindowImpl::update()
void MediaWindowImpl::setPosSize( const Rectangle& rRect )
{
- SetPosSizePixel( rRect.Left(), rRect.Top(), rRect.GetWidth(), rRect.GetHeight() );
+ SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
}
// ---------------------------------------------------------------------
@@ -346,7 +310,6 @@ void MediaWindowImpl::setPointer( const Pointer& rPointer )
if( xPlayerWindow.is() )
{
-
long nPointer;
switch( rPointer.GetStyle() )
@@ -396,10 +359,10 @@ void MediaWindowImpl::Resize()
mpMediaWindowControl->SetPosSizePixel( Point( nOffset, nControlY ), Size( aCurSize.Width() - ( nOffset << 1 ), nControlHeight ) );
}
- maChildWindow.SetPosSizePixel( Point( nOffset, nOffset ), aPlayerWindowSize );
-
if( xPlayerWindow.is() )
xPlayerWindow->setPosSize( 0, 0, aPlayerWindowSize.Width(), aPlayerWindowSize.Height(), 0 );
+
+ maChildWindow.SetPosSizePixel( Point( nOffset, nOffset ), aPlayerWindowSize );
}
// ---------------------------------------------------------------------
@@ -446,7 +409,7 @@ void MediaWindowImpl::Paint( const Rectangle& )
pLogo = mpEmptyBmpEx;
}
- else if ( !getPlayerWindow().is() )
+ else if( !getPlayerWindow().is() )
{
if( !mpAudioBmpEx )
mpAudioBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_AUDIOLOGO ) );
@@ -487,8 +450,6 @@ void MediaWindowImpl::Paint( const Rectangle& )
aBasePos.Y() + ( ( aVideoRect.GetHeight() - aLogoSize.Height() ) >> 1 ) ),
aLogoSize, *pLogo );
}
-
- update();
}
// ---------------------------------------------------------------------