]> git.sesse.net Git - vlc/blob - modules/gui/skins2/src/art_bitmap.hpp
skins2: implement art display in image controls
[vlc] / modules / gui / skins2 / src / art_bitmap.hpp
1 /*****************************************************************************
2  * art_bitmap.hpp
3  *****************************************************************************
4  * Copyright (C) 2010 the VideoLAN team
5  * $Id$
6  *
7  * Author: Erwan Tulou      <erwan10@vidoelan.org>
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 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  *****************************************************************************/
23
24 #ifndef ART_BITMAP_HPP
25 #define ART_BITMAP_HPP
26
27 #include "file_bitmap.hpp"
28 #include <string>
29 #include <list>
30
31
32 /// Class for art bitmaps
33 class ArtBitmap: public FileBitmap
34 {
35 public:
36
37     static ArtBitmap* getArtBitmap( string uriName );
38     static void initArtBitmap( intf_thread_t* pIntf );
39     static void freeArtBitmap( );
40
41     string getUriName() { return m_uriName; }
42
43 protected:
44
45     /// Constructor/destructor
46     ArtBitmap( string uriName );
47     virtual ~ArtBitmap() {}
48
49     /// skins2 interface
50     static intf_thread_t *m_pIntf;
51
52     /// Image handler (used to load art files)
53     static image_handler_t *m_pImageHandler;
54
55     // keep a cache of art already open
56     static list<ArtBitmap*> m_listBitmap;
57
58 private:
59
60     // uriName
61     string m_uriName;
62
63 };
64
65
66 #endif