forked from TheSaw/win7shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenderer.h
54 lines (43 loc) · 1.3 KB
/
renderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef renderer_h__
#define renderer_h__
#include <windows.h>
#include <GdiPlus.h>
#include <vector>
#include <string>
#include "gen_win7shell.h"
#include "metadata.h"
#include "lines.h"
extern CRITICAL_SECTION g_cs[4];
#define background_cs g_cs[0]
#define metadata_cs g_cs[1]
#define overlay_icons_cs g_cs[2]
#define thumbnai_icons_cs g_cs[3]
class renderer
{
public:
renderer(sSettings& settings, MetaData &metadata);
~renderer();
bool getAlbumArt(const std::wstring &fname, const bool skip_lock);
typedef unsigned long ARGB32;
HBITMAP GetThumbnail(const bool clear, const bool skip_lock);
void ClearAlbumart(void);
void ClearBackground(const bool skip_lock);
void ClearCustomBackground(void);
void ClearFonts(void);
void ThumbnailPopup(void);
void SetDimensions(const int new_w, const int new_h);
MetaData GetMetadata(void) const { return m_metadata; }
private:
Gdiplus::Image *custom_img;
Gdiplus::Bitmap *background;
Gdiplus::Bitmap *albumart;
Gdiplus::Font *normal_font;
Gdiplus::Font *large_font;
sSettings &m_settings;
MetaData &m_metadata;
int m_width, m_height, m_iconwidth, m_iconheight,
m_textpause, _iconwidth, _iconheight;
std::vector<int> m_textpositions;
bool no_icon, fail, scroll_block, no_text;
};
#endif // renderer_h__