summaryrefslogtreecommitdiff
path: root/include/delphi/reserve/m_w7ui.inc
blob: 3841319ac74912bf9fbd68734d2ad0f67541d5f3 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{$IFNDEF M_W7UI}
{$DEFINE M_W7UI}

const
	MIS_ICOLIB   = 0;
	MIS_GENERAL  = 1;
	MIS_PROTOCOL = 2;

type
  PMIRANDAJUMPLISTITEM = ^TMIRANDAJUMPLISTITEM;
  TMIRANDAJUMPLISTITEM = record
    iconSource:int;
    iconName  :pAnsiChar;
    iconIdx   :int;
    szTitle   :pWideChar;
    szPrefix  :pWideChar;
    szArgument:pWideChar;
  end;

const
// Force jumplist rebuild
  MS_JUMPLIST_REBUILD:pAnsiChar = 'w7/JumpList/Rebuild';

// ---
  ME_JUMPLIST_BUILDCATEGORIES:pAnsiChar = 'w7/JumpList/BuildCategories';

// lParam = (WCHAR *)category name
  ME_JUMPLIST_BUILDITEMS:pAnsiChar = 'w7/JumpList/BuildItems';

// lParam = (WCHAR *)category name
  MS_JUMPLIST_ADDCATEGORY:pAnsiChar = 'w7/JumpList/AddCategory';

// lParam = (MIRANDAJUMPLISTITEM *)item
  MS_JUMPLIST_ADDITEM:pAnsiChar = 'w7/JumpList/AddItem';

// wParam = prefix
// lParam = argument
  ME_JUMPLIST_PROCESS:pAnsiChar = 'w7/JumpList/Process';

procedure MJumpList_AddCategory(name:pWideChar);
begin
	CallService(MS_JUMPLIST_ADDCATEGORY, 0, LPARAM(name));
end;

procedure MJumpList_AddItem(mir_icon:pAnsiChar; title, prefix, argument:pWideChar); overload;
var
  item:TMIRANDAJUMPLISTITEM;
begin
	item.iconSource:=MIS_ICOLIB;
	item.iconName  :=mir_icon;
	item.iconIdx   :=0;
	item.szTitle   :=title;
	item.szPrefix  :=prefix;
	item.szArgument:=argument;
	CallService(MS_JUMPLIST_ADDITEM, 0, LPARAM(@item));
end;

procedure MJumpList_AddItem(skinicon:int; title, prefix, argument:pWideChar); overload;
var
  item:TMIRANDAJUMPLISTITEM;
begin
	item.iconSource:=MIS_GENERAL;
	item.iconName  :=0;
	item.iconIdx   :=skinicon;
	item.szTitle   :=title;
	item.szPrefix  :=prefix;
	item.szArgument:=argument;
	CallService(MS_JUMPLIST_ADDITEM, 0, LPARAM(@item));
end;

procedure MJumpList_AddItem(proto:pansiChar; skinicon:int; title, prefix, argument:pWideChar); overload;
var
  item:TMIRANDAJUMPLISTITEM;
begin
	item.iconSource:=MIS_PROTOCOL;
	item.iconName  :=proto;
	item.iconIdx   :=skinicon;
	item.szTitle   :=title;
	item.szPrefix  :=prefix;
	item.szArgument:=argument;
	CallService(MS_JUMPLIST_ADDITEM, 0, LPARAM(@item));
end;

{$ENDIF}