mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
35 lines
No EOL
1.9 KiB
C#
35 lines
No EOL
1.9 KiB
C#
// ******************************************************************
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// This code is licensed under the MIT License (MIT).
|
|
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
|
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
|
|
// ******************************************************************
|
|
|
|
using GreenshotWin10Plugin.Native.Structs;
|
|
|
|
namespace GreenshotWin10Plugin.Native
|
|
{
|
|
/// <summary>
|
|
/// Apps must implement this activator to handle notification activation.
|
|
/// </summary>
|
|
public abstract class NotificationActivator : INotificationActivationCallback
|
|
{
|
|
public void Activate(string appUserModelId, string invokedArgs, NotificationUserInputData[] data, uint dataCount)
|
|
{
|
|
OnActivated(invokedArgs, new NotificationUserInput(data), appUserModelId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method will be called when the user clicks on a foreground or background activation on a toast. Parent app must implement this method.
|
|
/// </summary>
|
|
/// <param name="arguments">The arguments from the original notification. This is either the launch argument if the user clicked the body of your toast, or the arguments from a button on your toast.</param>
|
|
/// <param name="userInput">Text and selection values that the user entered in your toast.</param>
|
|
/// <param name="appUserModelId">Your AUMID.</param>
|
|
public abstract void OnActivated(string arguments, NotificationUserInput userInput, string appUserModelId);
|
|
}
|
|
} |