aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Library/ml_pmp/IconStore.h
blob: 4e3b379f560b277486541295341f0c58f949ca72 (plain) (blame)
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
#pragma once
#include "..\..\General\gen_ml/ml_ipc_0313.h"
#include <vector>

class IconStore
{
public:
	IconStore();
	~IconStore();
	
	int GetPlaylistIcon();
	int GetVideoIcon();
	int GetDeviceIcon();
	int GetQueueIcon(int iconIndex = 0);
	int GetResourceIcon(HINSTANCE module, const wchar_t *name);
	void ReleaseResourceIcon(int iconIndex);

private:
	int RegisterResourceIcon(HINSTANCE module, const wchar_t *name);

private:
	typedef struct ResourceIcon
	{
		size_t ref;
		int index;
		wchar_t *name;
		HINSTANCE module;
	} ResourceIcon;

	int playlist_icon_index;
	int video_icon_index;
	int device_icon_index;
	int queue_icon_index[4];
	int active_queue_icon[4];

	std::vector<ResourceIcon> iconList;
};

extern IconStore icon_store;