Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

skin_common.hpp

00001 /*****************************************************************************
00002  * skin_common.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: skin_common.hpp 12501 2005-09-09 19:20:34Z gbazin $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *          Olivier Teulière <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef SKIN_COMMON_HPP
00026 #define SKIN_COMMON_HPP
00027 
00028 #include <vlc/vlc.h>
00029 #include <vlc/intf.h>
00030 
00031 #include <string>
00032 using namespace std;
00033 
00034 class AsyncQueue;
00035 class Logger;
00036 class Dialogs;
00037 class Interpreter;
00038 class OSFactory;
00039 class OSLoop;
00040 class VarManager;
00041 class VlcProc;
00042 class Theme;
00043 class ThemeRepository;
00044 
00045 #ifndef M_PI
00046 #   define M_PI 3.14159265358979323846
00047 #endif
00048 
00049 #ifdef _MSC_VER
00050 // turn off 'warning C4355: 'this' : used in base member initializer list'
00051 #pragma warning ( disable:4355 )
00052 // turn off 'identifier was truncated to '255' characters in the debug info'
00053 #pragma warning ( disable:4786 )
00054 #endif
00055 
00056 // Useful macros
00057 #define SKINS_DELETE( p ) \
00058    if( p ) \
00059    { \
00060        delete p; \
00061    } \
00062    else \
00063    { \
00064        msg_Err( getIntf(), "delete NULL pointer in %s at line %d", \
00065                 __FILE__, __LINE__ ); \
00066    }
00067 
00068 
00069 //---------------------------------------------------------------------------
00070 // intf_sys_t: description and status of skin interface
00071 //---------------------------------------------------------------------------
00072 struct intf_sys_t
00073 {
00075     input_thread_t *p_input;
00076 
00078     playlist_t *p_playlist;
00079 
00081     msg_subscription_t *p_sub;
00082 
00083     // "Singleton" objects: MUST be initialized to NULL !
00085     Logger *p_logger;
00087     AsyncQueue *p_queue;
00089     Dialogs *p_dialogs;
00091     Interpreter *p_interpreter;
00093     OSFactory *p_osFactory;
00095     OSLoop *p_osLoop;
00097     VarManager *p_varManager;
00099     VlcProc *p_vlcProc;
00101     ThemeRepository *p_repository;
00102 
00104     Theme *p_theme;
00105 };
00106 
00107 
00109 class SkinObject
00110 {
00111     public:
00112         SkinObject( intf_thread_t *pIntf ): m_pIntf( pIntf ) {}
00113         virtual ~SkinObject() {}
00114 
00117         intf_thread_t *getIntf() const { return m_pIntf; }
00118 
00119     private:
00120         intf_thread_t *m_pIntf;
00121 };
00122 
00123 
00124 #endif

Generated on Tue Dec 20 10:14:42 2005 for vlc-0.8.4a by  doxygen 1.4.2