init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
52
Telegram/SourceFiles/platform/win/windows_toast_activator.h
Normal file
52
Telegram/SourceFiles/platform/win/windows_toast_activator.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "base/platform/win/base_windows_rpcndr_h.h"
|
||||
#include "windows_toastactivator_h.h"
|
||||
|
||||
#include "base/platform/win/wrl/wrl_implements_h.h"
|
||||
|
||||
// {F11932D3-6110-4BBC-9B02-B2EC07A1BD19}
|
||||
class DECLSPEC_UUID("F11932D3-6110-4BBC-9B02-B2EC07A1BD19") ToastActivator
|
||||
: public ::Microsoft::WRL::RuntimeClass<
|
||||
::Microsoft::WRL::RuntimeClassFlags<::Microsoft::WRL::ClassicCom>,
|
||||
INotificationActivationCallback,
|
||||
::Microsoft::WRL::FtmBase> {
|
||||
public:
|
||||
ToastActivator() = default;
|
||||
~ToastActivator() = default;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE Activate(
|
||||
_In_ LPCWSTR appUserModelId,
|
||||
_In_ LPCWSTR invokedArgs,
|
||||
_In_reads_(dataCount) const NOTIFICATION_USER_INPUT_DATA *data,
|
||||
ULONG dataCount) override;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||
REFIID riid,
|
||||
void **ppObj);
|
||||
ULONG STDMETHODCALLTYPE AddRef();
|
||||
ULONG STDMETHODCALLTYPE Release();
|
||||
|
||||
private:
|
||||
long _ref = 1;
|
||||
|
||||
};
|
||||
|
||||
struct ToastActivation {
|
||||
struct UserInput {
|
||||
QString key;
|
||||
QString value;
|
||||
};
|
||||
QString args;
|
||||
std::vector<UserInput> input;
|
||||
|
||||
[[nodiscard]] static QString String(LPCWSTR value);
|
||||
};
|
||||
[[nodiscard]] rpl::producer<ToastActivation> ToastActivations();
|
||||
Reference in New Issue
Block a user