forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INotifyIcon.cs
63 lines (52 loc) · 2.1 KB
/
INotifyIcon.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// https://github.com/AvaloniaUI/Avalonia/issues/2649#issuecomment-620720914
using System.IO;
namespace System.Application.UI
{
/// <summary>
/// Represents a taskbar notification area icon (aka "tray icon") on Windows,
/// and similar task panel notification icons on Linux and Mac.
/// <para><see cref="https://github.com/sqrldev/SQRLDotNetClient/blob/master/SQRLDotNetClientUI/Models/INotifyIcon.cs"/></para>
/// </summary>
public interface INotifyIcon<TContextMenu>
{
/// <summary>
/// Gets or sets the icon for the notify icon. Either a file system path
/// or a <c>resm:</c> manifest resource path can be specified.
/// </summary>
string IconPath { get; set; }
/// <summary>
/// Gets or sets the tooltip text for the notify icon.
/// </summary>
string ToolTipText { get; set; }
/// <summary>
/// Gets or sets the context- (right-click)-menu for the notify icon.
/// </summary>
TContextMenu? ContextMenu { get; set; }
/// <summary>
/// Gets or sets if the notify icon is visible in the
/// taskbar notification area or not.
/// </summary>
bool Visible { get; set; }
/// <summary>
/// Removes the notify icon from the taskbar notification area.
/// </summary>
void Remove();
/// <summary>
/// This event is raised when a user clicks on the notification icon.
/// </summary>
event EventHandler<EventArgs> Click;
/// <summary>
/// This event is raised when a user doubleclicks on the notification icon.
/// </summary>
event EventHandler<EventArgs> DoubleClick;
/// <summary>
/// This event is raised when a user right-clicks on the notification icon.
/// </summary>
event EventHandler<EventArgs> RightClick;
public interface IUIFrameworkHelper
{
Stream OpenAsset(Uri uri);
void ForEachMenuItems(TContextMenu menu, Action<(object menuItem, string header, Action activated)> action);
}
}
}