mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
notifications: add support for unpackaged apps and protocol activation
This commit is contained in:
committed by
Andrey Nekrasov
parent
b90f1fc237
commit
c543b7585a
@@ -2,12 +2,29 @@
|
||||
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include <variant>
|
||||
|
||||
namespace notifications
|
||||
{
|
||||
constexpr inline const wchar_t TOAST_ACTIVATED_LAUNCH_ARG[] = L"-ToastActivated";
|
||||
|
||||
void register_background_toast_handler();
|
||||
|
||||
// Make sure your plaintext_message argument is properly XML-escaped
|
||||
void run_desktop_app_activator_loop();
|
||||
|
||||
struct link_button
|
||||
{
|
||||
std::wstring_view label;
|
||||
std::wstring_view url;
|
||||
};
|
||||
|
||||
struct background_activated_button
|
||||
{
|
||||
std::wstring_view label;
|
||||
};
|
||||
|
||||
using button_t = std::variant<link_button, background_activated_button>;
|
||||
|
||||
void show_toast(std::wstring_view plaintext_message);
|
||||
void show_toast_background_activated(std::wstring_view plaintext_message, std::wstring_view background_handler_id, std::vector<std::wstring_view> plaintext_button_labels);
|
||||
void show_toast_with_activations(std::wstring_view plaintext_message, std::wstring_view background_handler_id, std::vector<button_t> buttons);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user