1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2004 VideoLAN
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
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #ifndef THEME_REPOSITORY_HPP
25 #define THEME_REPOSITORY_HPP
27 #include "skin_common.hpp"
30 /// Singleton object handling the list of available themes
31 class ThemeRepository: public SkinObject
34 /// Get the instance of ThemeRepository
35 /// Returns NULL if the initialization of the object failed
36 static ThemeRepository *instance( intf_thread_t *pIntf );
38 /// Delete the instance of ThemeRepository
39 static void destroy( intf_thread_t *pIntf );
42 // Protected because it is a singleton
43 ThemeRepository( intf_thread_t *pIntf );
44 virtual ~ThemeRepository();
47 /// Identifier for the special menu entry
48 static const char *kOpenDialog;
50 /// Look for themes in a directory
51 void parseDirectory( const string &rDir );
53 /// Callback for menu item selection
54 static int changeSkin( vlc_object_t *pThis, char const *pCmd,
55 vlc_value_t oldval, vlc_value_t newval,