xref: /haiku/src/add-ons/media/media-add-ons/videowindow/VideoView.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
1 /*
2  * VideoView.h - "Video Window" media add-on.
3  *
4  * Copyright (C) 2006 Marcus Overhagen <marcus@overhagen.de>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * version 2 as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  *
19  */
20 #ifndef __VIDEO_VIEW_H
21 #define __VIDEO_VIEW_H
22 
23 #include <View.h>
24 
25 class VideoNode;
26 
27 class VideoView : public BView
28 {
29 public:
30 					VideoView(BRect frame, const char *name, uint32 resizeMask, uint32 flags);
31 					~VideoView();
32 
33 	void			RemoveVideoDisplay();
34 	void			RemoveOverlay();
35 
36 	VideoNode *		Node();
37 
38 	bool			IsOverlaySupported();
39 
40 	void			OverlayLockAcquire();
41 	void			OverlayLockRelease();
42 
43 	void			OverlayScreenshotPrepare();
44 	void			OverlayScreenshotCleanup();
45 
46 	void			DrawFrame();
47 
48 private:
49 	void			AttachedToWindow();
50 	void			MessageReceived(BMessage *msg);
51 	void			Draw(BRect updateRect);
52 
53 private:
54 	VideoNode *		fVideoNode;
55 	bool			fOverlayActive;
56 	rgb_color		fOverlayKeyColor;
57 };
58 
59 #endif
60