1 /* 2 * VideoView.h - Media Player for the Haiku Operating System 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 #include "Controller.h" 25 26 class VideoView : public BView 27 { 28 public: 29 VideoView(BRect frame, const char *name, uint32 resizeMask, uint32 flags); 30 ~VideoView(); 31 32 void SetController(Controller *controller); 33 34 void RemoveVideoDisplay(); 35 void RemoveOverlay(); 36 37 bool IsOverlaySupported(); 38 39 void OverlayLockAcquire(); 40 void OverlayLockRelease(); 41 42 void OverlayScreenshotPrepare(); 43 void OverlayScreenshotCleanup(); 44 45 void DrawFrame(); 46 47 private: 48 void AttachedToWindow(); 49 void MessageReceived(BMessage *msg); 50 void Draw(BRect updateRect); 51 52 private: 53 Controller * fController; 54 bool fOverlayActive; 55 rgb_color fOverlayKeyColor; 56 }; 57 58 #endif 59