LibreOffice Module avmedia (master) 1
mediawindow_impl.cxx
Go to the documentation of this file.
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#include <iostream>
21#include "mediawindow_impl.hxx"
22#include "mediaevent_impl.hxx"
23#include <mediamisc.hxx>
24#include <bitmaps.hlst>
25#include <helpids.h>
26
27#include <algorithm>
28#include <string_view>
29
30#include <sal/log.hxx>
34#include <tools/urlobj.hxx>
36#include <vcl/bitmapex.hxx>
37#include <vcl/sysdata.hxx>
38#include <vcl/commandevent.hxx>
39#include <vcl/event.hxx>
40#include <vcl/ptrstyle.hxx>
41#include <vcl/svapp.hxx>
42
43#include <com/sun/star/awt/SystemPointer.hpp>
44#include <com/sun/star/lang/XComponent.hpp>
45#include <com/sun/star/media/XManager.hpp>
46#include <com/sun/star/uno/XComponentContext.hpp>
47using namespace ::com::sun::star;
48
49namespace avmedia::priv {
50
53{
54}
55
57{
58 MediaItem aItem;
59
60 static_cast< MediaWindowImpl* >( GetParent() )->updateMediaItem( aItem );
61 setState(aItem);
62}
63
65{
66 static_cast<MediaWindowImpl*>(GetParent())->executeMediaItem(rItem);
67}
68
71{
72}
73
75{
76 const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
77 rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
78
80 GetParent()->MouseMove( aTransformedEvent );
81}
82
84{
85 const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
86 rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
87
89 GetParent()->MouseButtonDown( aTransformedEvent );
90}
91
93{
94 const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ),
95 rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() );
96
98 GetParent()->MouseButtonUp( aTransformedEvent );
99}
100
102{
104 GetParent()->KeyInput( rKEvt );
105}
106
108{
110 GetParent()->KeyUp( rKEvt );
111}
112
114{
115 const CommandEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ),
116 rCEvt.GetCommand(), rCEvt.IsMouseEvent(), rCEvt.GetEventData() );
117
119 GetParent()->Command( aTransformedEvent );
120}
121
122MediaWindowImpl::MediaWindowImpl(vcl::Window* pParent, MediaWindow* pMediaWindow, bool bInternalMediaControl)
123 : Control(pParent)
124 , DropTargetHelper(this)
125 , DragSourceHelper(this)
126 , mpMediaWindow(pMediaWindow)
127 , mpMediaWindowControl(bInternalMediaControl ? VclPtr<MediaWindowControl>::Create(this) : nullptr)
128{
130 {
131 mpMediaWindowControl->SetSizePixel(mpMediaWindowControl->GetOptimalSize());
132 mpMediaWindowControl->Show();
133 }
134}
135
137{
138 disposeOnce();
139}
140
142{
143 if (mxEvents.is())
144 mxEvents->cleanUp();
145
146 if (mxPlayerWindow.is())
147 {
148 mxPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( mxEvents ) );
149 mxPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( mxEvents ) );
150 mxPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEvents ) );
151 mxPlayerWindow->dispose();
152 mxPlayerWindow.clear();
153 }
154
155 uno::Reference< lang::XComponent > xComponent( mxPlayer, uno::UNO_QUERY );
156 if (xComponent.is()) // this stops the player
157 xComponent->dispose();
158
159 mxPlayer.clear();
160
161 mpMediaWindow = nullptr;
162
163 mpEmptyBmpEx.reset();
164 mpAudioBmpEx.reset();
165 mpMediaWindowControl.disposeAndClear();
166 mpChildWindow.disposeAndClear();
167
169}
170
171uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rURL, const OUString& rReferer, const OUString*)
172{
173 uno::Reference<media::XPlayer> xPlayer;
174
175 if( rURL.isEmpty() )
176 return xPlayer;
177
179 {
180 return xPlayer;
181 }
182
183 // currently there isn't anything else, throw any mime type to the media players
184 //if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON)
185 {
186 uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
187 if (Application::GetToolkitName() == "gtk4")
188 xPlayer = createPlayer(rURL, "com.sun.star.comp.avmedia.Manager_Gtk", xContext);
189 else
190 xPlayer = createPlayer(rURL, AVMEDIA_MANAGER_SERVICE_NAME, xContext);
191 }
192
193 return xPlayer;
194}
195
196uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer(
197 const OUString& rURL, const OUString& rManagerServName,
198 const uno::Reference< uno::XComponentContext >& xContext)
199{
200 uno::Reference< media::XPlayer > xPlayer;
201 try
202 {
203 uno::Reference< media::XManager > xManager (
204 xContext->getServiceManager()->createInstanceWithContext(rManagerServName, xContext),
205 uno::UNO_QUERY );
206 if( xManager.is() )
207 xPlayer = xManager->createPlayer( rURL );
208 else
209 SAL_INFO( "avmedia", "failed to create media player service " << rManagerServName );
210 } catch ( const uno::Exception & )
211 {
212 TOOLS_WARN_EXCEPTION( "avmedia", "couldn't create media player " << rManagerServName);
213 }
214 return xPlayer;
215}
216
217void MediaWindowImpl::setURL( const OUString& rURL,
218 OUString const& rTempURL, OUString const& rReferer)
219{
220 maReferer = rReferer;
221 if( rURL == getURL() )
222 return;
223
224 if( mxPlayer.is() )
225 mxPlayer->stop();
226
227 if( mxPlayerWindow.is() )
228 {
229 mxPlayerWindow->setVisible( false );
230 mxPlayerWindow.clear();
231 }
232
233 mxPlayer.clear();
234 mTempFileURL.clear();
235
236 if (!rTempURL.isEmpty())
237 {
238 maFileURL = rURL;
239 mTempFileURL = rTempURL;
240 }
241 else
242 {
243 INetURLObject aURL( rURL );
244
245 if (aURL.GetProtocol() != INetProtocol::NotValid)
247 else
248 maFileURL = rURL;
249 }
250
251 mxPlayer = createPlayer((!mTempFileURL.isEmpty()) ? mTempFileURL : maFileURL, rReferer, &m_sMimeType );
252 onURLChanged();
253}
254
255const OUString& MediaWindowImpl::getURL() const
256{
257 return maFileURL;
258}
259
261{
262 return mxPlayer.is();
263}
264
266{
267 Size aRet(480, 360);
268
269 if( mxPlayer.is() )
270 {
271 awt::Size aPrefSize( mxPlayer->getPreferredPlayerWindowSize() );
272
273 aRet.setWidth( aPrefSize.Width );
274 aRet.setHeight( aPrefSize.Height );
275 }
276
277 return aRet;
278}
279
281{
282 return mxPlayer.is() && ( mxPlayer->start(), true );
283}
284
286{
287 if( isPlaying() )
288 rItem.setState( MediaState::Play );
289 else
291
292 rItem.setDuration( getDuration() );
293 rItem.setTime( getMediaTime() );
294 rItem.setLoop( mxPlayer.is() && mxPlayer->isPlaybackLoop() );
295 rItem.setMute( mxPlayer.is() && mxPlayer->isMute() );
296 rItem.setVolumeDB( mxPlayer.is() ? mxPlayer->getVolumeDB() : 0 );
297 rItem.setZoom( mxPlayerWindow.is() ? mxPlayerWindow->getZoomLevel() : media::ZoomLevel_NOT_AVAILABLE );
298 rItem.setURL( getURL(), mTempFileURL, maReferer );
299}
300
302{
303 mpItem = &rItem;
304 comphelper::ScopeGuard g([this] { this->mpItem = nullptr; });
305
306 const AVMediaSetMask nMaskSet = rItem.getMaskSet();
307
308 // set URL first
309 if (nMaskSet & AVMediaSetMask::URL)
310 {
311 m_sMimeType = rItem.getMimeType();
312 setURL(rItem.getURL(), rItem.getTempURL(), rItem.getReferer());
313 }
314
315 // set different states next
316 if (nMaskSet & AVMediaSetMask::TIME)
317 setMediaTime(std::min(rItem.getTime(), getDuration()));
318
319 if (nMaskSet & AVMediaSetMask::LOOP && mxPlayer.is() )
320 mxPlayer->setPlaybackLoop( rItem.isLoop() );
321
322 if (nMaskSet & AVMediaSetMask::MUTE && mxPlayer.is() )
323 mxPlayer->setMute( rItem.isMute() );
324
325 if (nMaskSet & AVMediaSetMask::VOLUMEDB && mxPlayer.is() )
326 mxPlayer->setVolumeDB( rItem.getVolumeDB() );
327
328 if (nMaskSet & AVMediaSetMask::ZOOM && mxPlayerWindow.is() )
329 mxPlayerWindow->setZoomLevel( rItem.getZoom() );
330
331 // set play state at last
332 if (!(nMaskSet & AVMediaSetMask::STATE))
333 return;
334
335 switch (rItem.getState())
336 {
337 case MediaState::Play:
338 {
339 if (!isPlaying())
340 start();
341 }
342 break;
343
345 {
346 if (isPlaying())
347 stop();
348 }
349 break;
350
351 case MediaState::Stop:
352 {
353 if (isPlaying())
354 {
355 setMediaTime( 0.0 );
356 stop();
357 setMediaTime( 0.0 );
358 }
359 }
360 break;
361 }
362}
363
365{
366 if( mxPlayer.is() )
367 mxPlayer->stop();
368}
369
371{
372 return( mxPlayer.is() && mxPlayer->isPlaying() );
373}
374
376{
377 return( mxPlayer.is() ? mxPlayer->getDuration() : 0.0 );
378}
379
381{
382 if( mxPlayer.is() )
383 mxPlayer->setMediaTime( fTime );
384}
385
387{
388 return( mxPlayer.is() ? mxPlayer->getMediaTime() : 0.0 );
389}
390
392{
393 if (isPlaying())
394 {
395 bStop ? mxPlayer->stop() : mxPlayer->start();
396 }
397}
398
400{
401 //if (m_sMimeType == AVMEDIA_MIMETYPE_COMMON)
402 {
403 mpChildWindow.disposeAndClear();
405 }
406 if (!mpChildWindow)
407 return;
410
411 if (mxPlayer.is())
412 {
413 Resize();
414 uno::Reference<media::XPlayerWindow> xPlayerWindow;
415 const Point aPoint;
416 const Size aSize(mpChildWindow->GetSizePixel());
417
418 sal_IntPtr nParentWindowHandle(0);
419 const SystemEnvData* pEnvData = mpChildWindow->GetSystemData();
420 // tdf#139609 gtk doesn't need the handle, and fetching it is undesirable
421 if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk)
422 nParentWindowHandle = mpChildWindow->GetParentWindowHandle();
423 uno::Sequence<uno::Any> aArgs{
424 uno::Any(nParentWindowHandle),
425 uno::Any(awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height())),
426 uno::Any(reinterpret_cast<sal_IntPtr>(mpChildWindow.get())),
427 // Media item contains media properties, e.g. cropping.
428 uno::Any(reinterpret_cast<sal_IntPtr>(mpItem))
429 };
430
431 try
432 {
433 xPlayerWindow = mxPlayer->createPlayerWindow( aArgs );
434 }
435 catch( const uno::RuntimeException& )
436 {
437 // happens eg, on MacOSX where Java frames cannot be created from X11 window handles
438 }
439
440 mxPlayerWindow = xPlayerWindow;
441
442 if( xPlayerWindow.is() )
443 {
444 xPlayerWindow->addKeyListener( uno::Reference< awt::XKeyListener >( mxEvents ) );
445 xPlayerWindow->addMouseListener( uno::Reference< awt::XMouseListener >( mxEvents ) );
446 xPlayerWindow->addMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEvents ) );
447 xPlayerWindow->addFocusListener( uno::Reference< awt::XFocusListener >( mxEvents ) );
448 }
449 }
450 else
451 mxPlayerWindow.clear();
452
453 if( mxPlayerWindow.is() )
454 mpChildWindow->Show();
455 else
456 mpChildWindow->Hide();
457
459 {
460 MediaItem aItem;
461
462 updateMediaItem( aItem );
463 mpMediaWindowControl->setState( aItem );
464 }
465}
466
468{
469 SetPosSizePixel(rRect.TopLeft(), rRect.GetSize());
470}
471
473{
474 SetPointer(aPointer);
475
476 if (mpChildWindow)
477 mpChildWindow->SetPointer(aPointer);
478
479 if (!mxPlayerWindow.is())
480 return;
481
482 sal_Int32 nPointer;
483
484 switch (aPointer)
485 {
486 case PointerStyle::Cross:
487 nPointer = awt::SystemPointer::CROSS;
488 break;
489 case PointerStyle::Hand:
490 nPointer = awt::SystemPointer::HAND;
491 break;
492 case PointerStyle::Move:
493 nPointer = awt::SystemPointer::MOVE;
494 break;
495 case PointerStyle::Wait:
496 nPointer = awt::SystemPointer::WAIT;
497 break;
498 default:
499 nPointer = awt::SystemPointer::ARROW;
500 break;
501 }
502
503 mxPlayerWindow->setPointerType(nPointer);
504}
505
507{
508 const Size aCurSize(GetOutputSizePixel());
509 const sal_Int32 nOffset(mpMediaWindowControl ? AVMEDIA_CONTROLOFFSET : 0);
510
511 Size aPlayerWindowSize(aCurSize.Width() - (nOffset << 1),
512 aCurSize.Height() - (nOffset << 1));
513
515 {
516 const sal_Int32 nControlHeight = mpMediaWindowControl->GetSizePixel().Height();
517 const sal_Int32 nControlY = std::max(aCurSize.Height() - nControlHeight - nOffset, tools::Long(0));
518
519 aPlayerWindowSize.setHeight( nControlY - (nOffset << 1) );
520 mpMediaWindowControl->SetPosSizePixel(Point(nOffset, nControlY ), Size(aCurSize.Width() - (nOffset << 1), nControlHeight));
521 }
522 if (mpChildWindow)
523 mpChildWindow->SetPosSizePixel(Point(0, 0), aPlayerWindowSize);
524
525 if (mxPlayerWindow.is())
526 mxPlayerWindow->setPosSize(0, 0, aPlayerWindowSize.Width(), aPlayerWindowSize.Height(), 0);
527}
528
530{
531 if (!mxPlayerWindow.is())
532 return;
533
534 // stop playing when going disabled or hidden
535 switch (eType)
536 {
537 case StateChangedType::Visible:
538 {
540 mxPlayerWindow->setVisible(IsVisible());
541 }
542 break;
543
544 case StateChangedType::Enable:
545 {
547 mxPlayerWindow->setEnable(IsEnabled());
548 }
549 break;
550
551 default:
552 break;
553 }
554}
555
557{
558 if (mxPlayerWindow.is())
559 mxPlayerWindow->update();
560
561 BitmapEx* pLogo = nullptr;
562
563 if (!mxPlayer.is())
564 {
565 if (!mpEmptyBmpEx)
566 mpEmptyBmpEx.reset(new BitmapEx(AVMEDIA_BMP_EMPTYLOGO));
567
568 pLogo = mpEmptyBmpEx.get();
569 }
570 else if (!mxPlayerWindow.is())
571 {
572 if (!mpAudioBmpEx)
573 mpAudioBmpEx.reset(new BitmapEx(AVMEDIA_BMP_AUDIOLOGO));
574
575 pLogo = mpAudioBmpEx.get();
576 }
577
578 if (!mpChildWindow)
579 return;
580
581 const Point aBasePos(mpChildWindow->GetPosPixel());
582 const tools::Rectangle aVideoRect(aBasePos, mpChildWindow->GetSizePixel());
583
584 if (!pLogo || pLogo->IsEmpty() || aVideoRect.IsEmpty())
585 return;
586
587 Size aLogoSize(pLogo->GetSizePixel());
588 const Color aBackgroundColor(67, 67, 67);
589
590 rRenderContext.SetLineColor(aBackgroundColor);
591 rRenderContext.SetFillColor(aBackgroundColor);
592 rRenderContext.DrawRect(aVideoRect);
593
594 if ((aLogoSize.Width() > aVideoRect.GetWidth() || aLogoSize.Height() > aVideoRect.GetHeight() ) &&
595 (aLogoSize.Height() > 0))
596 {
597 const double fLogoWH = double(aLogoSize.Width()) / aLogoSize.Height();
598
599 if (fLogoWH < (double(aVideoRect.GetWidth()) / aVideoRect.GetHeight()))
600 {
601 aLogoSize.setWidth( tools::Long(aVideoRect.GetHeight() * fLogoWH) );
602 aLogoSize.setHeight( aVideoRect.GetHeight() );
603 }
604 else
605 {
606 aLogoSize.setWidth( aVideoRect.GetWidth() );
607 aLogoSize.setHeight( tools::Long(aVideoRect.GetWidth() / fLogoWH) );
608 }
609 }
610
611 Point aPoint(aBasePos.X() + ((aVideoRect.GetWidth() - aLogoSize.Width()) >> 1),
612 aBasePos.Y() + ((aVideoRect.GetHeight() - aLogoSize.Height()) >> 1));
613
614 rRenderContext.DrawBitmapEx(aPoint, aLogoSize, *pLogo);
615}
616
618{
619}
620
622{
623 if (mpMediaWindow)
624 mpMediaWindow->MouseMove(rMEvt);
625}
626
628{
629 if (mpMediaWindow)
631}
632
634{
635 if (mpMediaWindow)
637}
638
640{
641 if (mpMediaWindow)
642 mpMediaWindow->KeyInput(rKEvt);
643}
644
646{
647 if (mpMediaWindow)
648 mpMediaWindow->KeyUp(rKEvt);
649}
650
652{
653 if (mpMediaWindow)
654 mpMediaWindow->Command(rCEvt);
655}
656
658{
659 return (mpMediaWindow ? mpMediaWindow->AcceptDrop(rEvt) : 0);
660}
661
663{
664 return (mpMediaWindow ? mpMediaWindow->ExecuteDrop(rEvt) : 0);
665}
666
667void MediaWindowImpl::StartDrag(sal_Int8 nAction, const Point& rPosPixel)
668{
669 if (mpMediaWindow)
670 mpMediaWindow->StartDrag(nAction, rPosPixel);
671}
672
673} // namespace
674
675/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static OUString GetToolkitName()
bool IsEmpty() const
const Size & GetSizePixel() const
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
void * GetEventData() const
bool IsMouseEvent() const
virtual void dispose() override
MouseEventModifiers GetMode() const
sal_uInt16 GetModifier() const
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
void DrawRect(const tools::Rectangle &rRect)
void SetLineColor()
void SetFillColor()
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
void setState(const MediaItem &rItem)
bool setMute(bool bMute)
Definition: mediaitem.cxx:353
bool setState(MediaState eState)
Definition: mediaitem.cxx:297
bool isMute() const
Definition: mediaitem.cxx:362
const OUString & getTempURL() const
Definition: mediaitem.cxx:251
bool isLoop() const
Definition: mediaitem.cxx:348
bool setURL(const OUString &rURL, const OUString &rTempURL, const OUString &rReferer)
Definition: mediaitem.cxx:232
bool setZoom(css::media::ZoomLevel eZoom)
Definition: mediaitem.cxx:381
MediaState getState() const
Definition: mediaitem.cxx:306
bool setTime(double fTime)
Definition: mediaitem.cxx:325
bool setVolumeDB(sal_Int16 nDB)
Definition: mediaitem.cxx:367
double getTime() const
Definition: mediaitem.cxx:334
OUString getMimeType() const
Definition: mediaitem.cxx:270
bool setDuration(double fDuration)
Definition: mediaitem.cxx:311
AVMediaSetMask getMaskSet() const
Definition: mediaitem.cxx:227
const OUString & getReferer() const
Definition: mediaitem.cxx:256
::css::media::ZoomLevel getZoom() const
Definition: mediaitem.cxx:390
sal_Int16 getVolumeDB() const
Definition: mediaitem.cxx:376
const OUString & getURL() const
Definition: mediaitem.cxx:246
bool setLoop(bool bLoop)
Definition: mediaitem.cxx:339
virtual void MouseMove(const MouseEvent &rMEvt)
Definition: mediawindow.cxx:83
virtual void KeyUp(const KeyEvent &rKEvt)
virtual void Command(const CommandEvent &rCEvt)
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: mediawindow.cxx:98
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel)
virtual void MouseButtonUp(const MouseEvent &rMEvt)
Definition: mediawindow.cxx:93
virtual void MouseButtonDown(const MouseEvent &rMEvt)
Definition: mediawindow.cxx:88
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt)
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
virtual void Command(const CommandEvent &rCEvt) override
virtual void MouseMove(const MouseEvent &rMEvt) override
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
MediaChildWindow(vcl::Window *pParent)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void KeyUp(const KeyEvent &rKEvt) override
virtual void KeyInput(const KeyEvent &rKEvt) override
void execute(const MediaItem &rItem) override
MediaWindowControl(vcl::Window *pParent)
void updateMediaItem(MediaItem &rItem) const
void executeMediaItem(const MediaItem &rItem)
virtual void MouseMove(const MouseEvent &rMEvt) override
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
std::unique_ptr< BitmapEx > mpEmptyBmpEx
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
css::uno::Reference< css::media::XPlayer > mxPlayer
VclPtr< MediaWindowControl > mpMediaWindowControl
std::unique_ptr< BitmapEx > mpAudioBmpEx
virtual void KeyUp(const KeyEvent &rKEvt) override
virtual void KeyInput(const KeyEvent &rKEvt) override
static css::uno::Reference< css::media::XPlayer > createPlayer(const OUString &rURL, const OUString &rReferer, const OUString *pMimeType)
void setPosSize(const tools::Rectangle &rRect)
MediaWindowImpl(vcl::Window *parent, MediaWindow *pMediaWindow, bool bInternalMediaControl)
void setPointer(PointerStyle nPointer)
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
virtual void dispose() override
virtual void Command(const CommandEvent &rCEvt) override
const OUString & getURL() const
virtual void StateChanged(StateChangedType) override
VclPtr< MediaChildWindow > mpChildWindow
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
rtl::Reference< MediaEventListenersImpl > mxEvents
virtual void GetFocus() override
css::uno::Reference< css::media::XPlayerWindow > mxPlayerWindow
void setURL(const OUString &rURL, OUString const &rTempURL, OUString const &rReferer)
virtual void Resize() override
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
constexpr tools::Long GetWidth() const
constexpr Point TopLeft() const
constexpr Size GetSize() const
constexpr tools::Long GetHeight() const
constexpr bool IsEmpty() const
Point OutputToScreenPixel(const Point &rPos) const
vcl::Window * GetParent() const
virtual void Command(const CommandEvent &rCEvt)
virtual void MouseButtonDown(const MouseEvent &rMEvt)
virtual void MouseButtonUp(const MouseEvent &rMEvt)
virtual void KeyInput(const KeyEvent &rKEvt)
virtual void MouseMove(const MouseEvent &rMEvt)
Size GetOutputSizePixel() const
virtual void SetPointer(PointerStyle)
bool IsVisible() const
virtual void KeyUp(const KeyEvent &rKEvt)
Point ScreenToOutputPixel(const Point &rPos) const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
bool IsEnabled() const
#define TOOLS_WARN_EXCEPTION(area, stream)
URL aURL
DocumentType eType
constexpr OUStringLiteral HID_AVMEDIA_PLAYERWINDOW
Definition: helpids.h:34
#define SAL_INFO(area, stream)
#define AVMEDIA_CONTROLOFFSET
AVMediaSetMask
Definition: mediaitem.hxx:39
#define AVMEDIA_MANAGER_SERVICE_NAME
Definition: mediamisc.hxx:32
bool isUntrustedReferer(OUString const &referer)
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
long Long
PointerStyle
Toolkit toolkit
signed char sal_Int8
StateChangedType
WinBits const WB_CLIPCHILDREN