1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2004 the VideoLAN team
7 * Authors: Cyril Deguet <asmax@via.ecp.fr>
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.
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.
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 *****************************************************************************/
24 #ifndef THEME_REPOSITORY_HPP
25 #define THEME_REPOSITORY_HPP
27 #include "skin_common.hpp"
31 /// Singleton object handling the list of available themes
32 class ThemeRepository: public SkinObject
35 /// Get the instance of ThemeRepository
36 /// Returns NULL if the initialization of the object failed
37 static ThemeRepository *instance( intf_thread_t *pIntf );
39 /// Delete the instance of ThemeRepository
40 static void destroy( intf_thread_t *pIntf );
43 void updateRepository();
46 // Protected because it is a singleton
47 ThemeRepository( intf_thread_t *pIntf );
48 virtual ~ThemeRepository();
51 /// Look for themes in a directory
52 void parseDirectory( const string &rDir );
54 /// Callback for menu item selection
55 static int changeSkin( vlc_object_t *pThis, char const *pVariable,
56 vlc_value_t oldval, vlc_value_t newval,
59 /// list of skins available
60 map<string,string> m_skinsMap;