forked from coddec/Classic-Shell
- Notifications
You must be signed in to change notification settings - Fork 452
/
Copy pathMetroLinkManager.h
58 lines (42 loc) · 1.91 KB
/
MetroLinkManager.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
55
56
57
58
// Classic Shell (c) 2009-2017, Ivo Beltchev
// Open-Shell (c) 2017-2018, The Open-Shell Team
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
#pragma once
#include<vector>
#include"ItemManager.h"
#include"LogManager.h"
#defineMETRO_APP_ROOTL"%LOCALAPPDATA%\\Microsoft\\Windows\\Application Shortcuts"
extern PROPERTYKEY PKEY_MetroAppLink; // pidl
extern PROPERTYKEY PKEY_MetroAppLauncher; // =1 for metro apps
extern PROPERTYKEY PKEY_MetroIconColor;
extern KNOWNFOLDERID FOLDERID_AppsFolder2;
#defineDESKTOP_APP_IDL"Microsoft.Windows.Desktop"
#defineSEARCH_APP_IDL"Windows.UI.Search"
structMetroLink
{
CAbsolutePidl pidl;
CString appid; // only for Windows 10
CComPtr<IShellItem> pItem;
};
// Returns a list of links for all metro apps
voidGetMetroLinks( std::vector<MetroLink> &links, bool bLog, std::vector<CString> *pNonApps10=NULL );
// Executes the metro link of the given item info
voidExecuteMetroLink( const CItemManager::ItemInfo *pInfo );
// Returns true if the app is still valid
boolIsValidApp( constwchar_t *appid );
// Returns true if the app should not be uninstalled
boolIsProtectedApp( constwchar_t *appid );
// Returns true if uninstalling is allowed by the policy
boolGetUninstallPolicy( void );
// Checks if the app can be uninstalled
boolCanUninstallMetroApp( constwchar_t *appid );
// Uninstalls the app with the given id
voidUninstallMetroApp( constwchar_t *appid );
// Asks for confirmation to uninstall the specified app
voidUninstallMetroApp( HWND parent, constwchar_t *name, constwchar_t *appid );
// Creates a context menu to pin/unpin the metro app to the taskbar
CComPtr<IContextMenu> GetMetroPinMenu( constwchar_t *appid );
// Determines if Edge is the default browser
boolIsEdgeDefaultBrowser( void );
// Returns full package name for given App ID
CString GetPackageFullName(constwchar_t* appId);