1 /***************************************************************************** 2 * fsc_window.hpp 3 ***************************************************************************** 4 * Copyright (C) 2010 the VideoLAN team 5 * $Id: 7221039aff99bc243e417173fe550805c7251e14 $ 6 * 7 * Author: Erwan Tulou <erwan10 At videolan Dot Org> 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License along 20 * with this program; if not, write to the Free Software Foundation, Inc., 21 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 *****************************************************************************/ 23 24 #ifndef FSC_WINDOW_HPP 25 #define FSC_WINDOW_HPP 26 27 #include "../src/top_window.hpp" 28 #include "../commands/cmd_generic.hpp" 29 30 class OSTimer; 31 32 /// Class for the fullscreen controller 33 class FscWindow: public TopWindow 34 { 35 public: 36 FscWindow( intf_thread_t *pIntf, int left, int top, 37 WindowManager &rWindowManager, 38 bool dragDrop, bool playOnDrop, bool visible ); 39 40 virtual ~FscWindow(); 41 42 virtual void processEvent( EvtLeave &rEvtLeave ); 43 virtual void processEvent( EvtMotion &rEvtMotion ); 44 45 /// Method called when fullscreen indicator changes 46 virtual void onUpdate( Subject<VarBool> &rVariable , void* ); 47 48 /// Action when window is shown 49 virtual void innerShow(); 50 51 /// Action when window is hidden 52 virtual void innerHide(); 53 54 /// Action when mouse moved 55 virtual void onMouseMoved(); 56 57 /// Action for each transition of fading out 58 virtual void onTimerExpired(); 59 60 /// Relocate fsc into new area 61 virtual void moveTo( int x, int y, int width, int height ); 62 63 private: 64 /// Timer for fsc fading-out 65 OSTimer *m_pTimer; 66 /// number of transitions when fading out 67 int m_count; 68 /// opacity set by user 69 int m_opacity; 70 /// delay set by user 71 int m_delay; 72 /// activation set by user 73 bool m_enabled; 74 75 /// Callback for the timer 76 DEFINE_CALLBACK( FscWindow, FscHide ) 77 }; 78 79 80 #endif 81