anotherim-desktop/plugins/windows-notification/vapi/winrt_windows_ui_notifications.vapi

68 lines
2.3 KiB
Vala
Raw Normal View History

using winrt;
[CCode (cheader_filename = "gobject/winrt-glib.h")]
namespace winrt.Windows.UI.Notifications {
2021-02-24 09:49:49 +00:00
[CCode (type_id = "winrt_windows_ui_notifications_toast_dismissal_reason_get_type ()")]
2021-02-24 09:49:49 +00:00
public enum ToastDismissalReason
{
Activated,
ApplicationHidden,
TimedOut
}
[CCode (type_id = "winrt_windows_ui_notifications_toast_template_type_get_type ()")]
2021-02-24 10:08:00 +00:00
public enum ToastTemplateType
{
ToastImageAndText01,
ToastImageAndText02,
ToastImageAndText03,
ToastImageAndText04,
ToastText01,
ToastText02,
ToastText03,
ToastText04
}
2021-02-24 09:49:49 +00:00
[CCode (cname = "NotificationCallbackFailed", has_target = true)]
public delegate void NotificationCallbackFailed();
2021-02-21 23:13:23 +00:00
[CCode (cname = "NotificationCallbackActivated", has_target = true)]
public delegate void NotificationCallbackActivated(string? arguments, string[]? userInput);
2021-02-24 09:49:49 +00:00
[CCode (cname = "NotificationCallbackDismissed", has_target = true)]
public delegate void NotificationCallbackDismissed(ToastDismissalReason reason);
[CCode (type_id = "winrt_windows_ui_notifications_toast_notification_get_type ()")]
public class ToastNotification : GLib.Object {
public ToastNotification(string doc);
public bool ExpiresOnReboot { get; set; }
2021-02-24 09:49:49 +00:00
public EventToken Activated(owned NotificationCallbackActivated handler);
public void RemoveActivated(EventToken token);
2021-02-24 09:49:49 +00:00
public EventToken Failed(owned NotificationCallbackFailed handler);
public void RemoveFailed(EventToken token);
public EventToken Dismissed(owned NotificationCallbackDismissed handler);
public void RemoveDismissed(EventToken token);
public string GetTag();
public void SetTag(string tag);
public string GetGroup();
public void SetGroup(string group);
}
2021-02-22 10:41:39 +00:00
[CCode (type_id = "winrt_windows_ui_notifications_toast_notifier_get_type ()")]
public class ToastNotifier : GLib.Object {
public ToastNotifier(string aumid);
public void Show(ToastNotification notification);
public void Hide(ToastNotification notification);
}
2021-02-26 11:29:48 +00:00
[Compact]
[CCode]
public class ToastNotificationManager {
public static string GetTemplateContent(ToastTemplateType type);
}
}