[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / guilib / GUIColorManager.h
1 /*!
2 \file GUIColorManager.h
3 \brief
4 */
5
6 #ifndef GUILIB_COLORMANAGER_H
7 #define GUILIB_COLORMANAGER_H
8
9 #pragma once
10
11 /*
12  *      Copyright (C) 2005-2013 Team XBMC
13  *      http://www.xbmc.org
14  *
15  *  This Program is free software; you can redistribute it and/or modify
16  *  it under the terms of the GNU General Public License as published by
17  *  the Free Software Foundation; either version 2, or (at your option)
18  *  any later version.
19  *
20  *  This Program is distributed in the hope that it will be useful,
21  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  *  GNU General Public License for more details.
24  *
25  *  You should have received a copy of the GNU General Public License
26  *  along with XBMC; see the file COPYING.  If not, see
27  *  <http://www.gnu.org/licenses/>.
28  *
29  */
30
31 /*!
32  \ingroup textures
33  \brief
34  */
35
36 #include "utils/StdString.h"
37
38 #include <map>
39
40 class CXBMCTinyXML;
41
42 typedef uint32_t color_t;
43
44 class CGUIColorManager
45 {
46 public:
47   CGUIColorManager(void);
48   virtual ~CGUIColorManager(void);
49
50   void Load(const CStdString &colorFile);
51
52   color_t GetColor(const CStdString &color) const;
53
54   void Clear();
55
56 protected:
57   bool LoadXML(CXBMCTinyXML &xmlDoc);
58
59   std::map<CStdString, color_t> m_colors;
60   typedef std::map<CStdString, color_t>::iterator iColor;
61   typedef std::map<CStdString, color_t>::const_iterator icColor;
62 };
63
64 /*!
65  \ingroup textures
66  \brief
67  */
68 extern CGUIColorManager g_colorManager;
69 #endif