2 * Copyright 2006-2010 Stephan Aßmus <superstippi@gmx.de>
3 * All rights reserved. Distributed under the terms of the MIT license.
11 #include "ListenerAdapter.h"
12 #include "VideoTarget.h"
16 M_HIDE_FULL_SCREEN_CONTROLS
= 'hfsc'
23 class VideoView
: public BView
, public VideoTarget
{
25 VideoView(BRect frame
, const char* name
,
30 virtual void Draw(BRect updateRect
);
31 virtual void MessageReceived(BMessage
* message
);
33 virtual void MouseMoved(BPoint where
, uint32 transit
,
34 const BMessage
* dragMessage
= NULL
);
36 // VideoTarget interface
37 virtual void SetBitmap(const BBitmap
* bitmap
);
40 void GetOverlayScaleLimits(float* minScale
,
41 float* maxScale
) const;
43 void OverlayScreenshotPrepare();
44 void OverlayScreenshotCleanup();
46 bool UseOverlays() const;
47 bool IsOverlayActive();
48 void DisableOverlay();
50 void SetPlaying(bool playing
);
51 void SetFullscreen(bool fullScreen
);
52 void SetFullscreenControlsVisible(bool visible
);
53 void SetVideoFrame(const BRect
& frame
);
55 void SetSubTitle(const char* text
);
56 void SetSubTitleMaxBottom(float bottom
);
59 void _DrawBitmap(const BBitmap
* bitmap
);
61 void _AdoptGlobalSettings();
62 void _SetOverlayMode(bool overlayMode
);
63 void _LayoutSubtitle();
68 overlay_restrictions fOverlayRestrictions
;
69 rgb_color fOverlayKeyColor
;
72 bool fFullscreenControlsVisible
;
73 bool fFirstPulseAfterFullscreen
;
74 uint8 fSendHideCounter
;
75 bigtime_t fLastMouseMove
;
77 SubtitleBitmap
* fSubtitleBitmap
;
79 float fSubtitleMaxButtom
;
81 bool fSubtitleChanged
;
84 ListenerAdapter fGlobalSettingsListener
;
86 bool fUseBilinearScaling
;
87 uint32 fSubtitlePlacement
;
90 #endif // VIDEO_VIEW_H