]> git.sesse.net Git - vlc/blob - modules/gui/skins2/src/theme_repository.hpp
Remove bogus executable permissions
[vlc] / modules / gui / skins2 / src / theme_repository.hpp
1 /*****************************************************************************
2  * theme_repository.hpp
3  *****************************************************************************
4  * Copyright (C) 2004 VideoLAN
5  * $Id$
6  *
7  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
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
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  *****************************************************************************/
23
24 #ifndef THEME_REPOSITORY_HPP
25 #define THEME_REPOSITORY_HPP
26
27 #include "skin_common.hpp"
28
29
30 /// Singleton object handling the list of available themes
31 class ThemeRepository: public SkinObject
32 {
33     public:
34         /// Get the instance of ThemeRepository
35         /// Returns NULL if the initialization of the object failed
36         static ThemeRepository *instance( intf_thread_t *pIntf );
37
38         /// Delete the instance of ThemeRepository
39         static void destroy( intf_thread_t *pIntf );
40
41     protected:
42         // Protected because it is a singleton
43         ThemeRepository( intf_thread_t *pIntf );
44         virtual ~ThemeRepository();
45
46     private:
47         /// Identifier for the special menu entry
48         static const char *kOpenDialog;
49
50        /// Look for themes in a directory
51         void parseDirectory( const string &rDir );
52
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,
56                                void *pData );
57 };
58
59
60 #endif