00001 /***************************************************************************** 00002 * vout_window.hpp 00003 ***************************************************************************** 00004 * Copyright (C) 2003 the VideoLAN team 00005 * $Id: f64d033809bc2a7c812cee0a5487d2c398ddc7ab $ 00006 * 00007 * Authors: Cyril Deguet <asmax@via.ecp.fr> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License along 00020 * with this program; if not, write to the Free Software Foundation, Inc., 00021 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00022 *****************************************************************************/ 00023 00024 #ifndef VOUT_WINDOW_HPP 00025 #define VOUT_WINDOW_HPP 00026 00027 #include "generic_window.hpp" 00028 #include <vlc_vout_window.h> 00029 00030 class OSGraphics; 00031 class CtrlVideo; 00032 00033 00034 /// Class to handle a video output window 00035 class VoutWindow: private GenericWindow 00036 { 00037 public: 00038 00039 VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd, 00040 int width, int height, GenericWindow* pParent = NULL ); 00041 virtual ~VoutWindow(); 00042 00043 /// Make some functions public 00044 //@{ 00045 using GenericWindow::show; 00046 using GenericWindow::hide; 00047 using GenericWindow::move; 00048 using GenericWindow::resize; 00049 using GenericWindow::getOSHandle; 00050 //@} 00051 00052 /// get the parent window 00053 virtual GenericWindow* getWindow( ) { return m_pParentWindow; } 00054 00055 /// hotkeys processing 00056 virtual void processEvent( EvtKey &rEvtKey ); 00057 00058 /// set and get Video Control for VoutWindow 00059 virtual void setCtrlVideo( CtrlVideo* pCtrlVideo ); 00060 virtual CtrlVideo* getCtrlVideo( ) { return m_pCtrlVideo; } 00061 00062 /// get original size of vout 00063 virtual int getOriginalWidth( ) { return original_width; } 00064 virtual int getOriginalHeight( ) { return original_height; } 00065 00066 /// set original size of vout 00067 virtual void setOriginalWidth( int width ) { original_width = width; } 00068 virtual void setOriginalHeight( int height ) { original_height = height; } 00069 00070 virtual string getType() const { return "Vout"; } 00071 00072 private: 00073 00074 /// vout thread 00075 vout_window_t* m_pWnd; 00076 00077 /// original width and height 00078 int original_width; 00079 int original_height; 00080 00081 /// VideoControl attached to it 00082 CtrlVideo* m_pCtrlVideo; 00083 00084 /// Parent Window 00085 GenericWindow* m_pParentWindow; 00086 }; 00087 00088 typedef CountedPtr<VoutWindow> VoutWindowPtr; 00089 00090 #endif
1.5.6