summaryrefslogtreecommitdiff
path: root/plugins/!Deprecated/W7UI/src/jumplistbuilder.h
blob: 6a0bde2fd40d719166ea1505bd349c7f4c1fbcb1 (plain)
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
#ifndef jumplistbuilder_h__
#define jumplistbuilder_h__

class CJumpListBuilder
{
public:
	static void Load(void)
	{
		m_instance = new CJumpListBuilder;
	}

	static void Unload()
	{
		delete m_instance;
	}

	static void Rebuild()
	{
		m_instance->BuildJumpList();
	}

private:
	static CJumpListBuilder *m_instance;

	LIST<TCHAR> *m_lists;
	ICustomDestinationList *m_pList;
	CJumpListArray *m_pCurrentList;
	TCHAR m_cmdBuf[MAX_PATH * 2];

	HANDLE m_hBuildCategories;
	HANDLE m_hBuildItems;

	CJumpListBuilder();
	~CJumpListBuilder();
	void BuildJumpList();

	int __cdecl Rebuild(WPARAM wParam, LPARAM lParam);
	int __cdecl AddCategory(WPARAM wParam, LPARAM lParam);
	int __cdecl AddItem(WPARAM wParam, LPARAM lParam);

	void BuildCategory(TCHAR *category);

	TCHAR *BuildJumpListCommand(TCHAR *prefix, TCHAR *argument);
	HANDLE CreateSvc(char *svc, int (__cdecl CJumpListBuilder::*fn)(WPARAM, LPARAM));
};

#endif // jumplistbuilder_h__