mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
FZ: warn w/ a toast if an elevated window cannot be dragged and offer learning more
This commit is contained in:
committed by
Andrey Nekrasov
parent
c2e219b446
commit
60fa6071b9
@@ -1,8 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include <variant>
|
||||
#include <optional>
|
||||
|
||||
namespace notifications
|
||||
{
|
||||
@@ -12,19 +14,38 @@ namespace notifications
|
||||
|
||||
void run_desktop_app_activator_loop();
|
||||
|
||||
struct snooze_duration
|
||||
{
|
||||
std::wstring label;
|
||||
int minutes;
|
||||
};
|
||||
|
||||
struct snooze_button
|
||||
{
|
||||
std::vector<snooze_duration> durations;
|
||||
};
|
||||
|
||||
struct link_button
|
||||
{
|
||||
std::wstring_view label;
|
||||
std::wstring_view url;
|
||||
std::wstring label;
|
||||
std::wstring url;
|
||||
bool context_menu = false;
|
||||
};
|
||||
|
||||
struct background_activated_button
|
||||
{
|
||||
std::wstring_view label;
|
||||
std::wstring label;
|
||||
bool context_menu = false;
|
||||
};
|
||||
|
||||
using button_t = std::variant<link_button, background_activated_button>;
|
||||
struct toast_params
|
||||
{
|
||||
std::optional<std::wstring_view> tag;
|
||||
bool resend_if_scheduled = true;
|
||||
};
|
||||
|
||||
void show_toast(std::wstring_view plaintext_message);
|
||||
void show_toast_with_activations(std::wstring_view plaintext_message, std::wstring_view background_handler_id, std::vector<button_t> buttons);
|
||||
using action_t = std::variant<link_button, background_activated_button, snooze_button>;
|
||||
|
||||
void show_toast(std::wstring plaintext_message, toast_params params = {});
|
||||
void show_toast_with_activations(std::wstring plaintext_message, std::wstring_view background_handler_id, std::vector<action_t> actions, toast_params params = {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user