@@ -29,7 +29,6 @@ internal static class TrayIconNative
|
||||
internal const int ContextMenuNotification = 0x007B;
|
||||
|
||||
private const int NIM_ADD = 0x00000000;
|
||||
private const int NIM_MODIFY = 0x00000001;
|
||||
private const int NIM_DELETE = 0x00000002;
|
||||
private const int NIM_SETVERSION = 0x00000004;
|
||||
|
||||
@@ -72,13 +71,6 @@ internal static class TrayIconNative
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Replaces the image and the tooltip of an icon already there.</summary>
|
||||
internal static bool Modify(IntPtr window, int id, IntPtr icon, string tooltip)
|
||||
{
|
||||
NotifyIconData data = Describe(window, id, icon, tooltip);
|
||||
return Shell_NotifyIcon(NIM_MODIFY, ref data);
|
||||
}
|
||||
|
||||
/// <summary>Takes the icon away. A forgotten icon stays in the tray until hovered.</summary>
|
||||
internal static void Remove(IntPtr window, int id)
|
||||
{
|
||||
|
||||
@@ -103,6 +103,11 @@ internal static class WindowNative
|
||||
private const byte AC_SRC_ALPHA = 1;
|
||||
private const uint ULW_ALPHA = 0x00000002;
|
||||
|
||||
/// <summary>
|
||||
/// BLENDFUNCTION. <c>BlendFlags</c> is never assigned and must stay all the same:
|
||||
/// Windows reads the structure by its layout, and dropping a byte from the middle
|
||||
/// of it would shift everything after.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct BlendFunction
|
||||
{
|
||||
|
||||
@@ -49,9 +49,6 @@ internal sealed class NativeTrayIcon : IDisposable
|
||||
|
||||
internal event EventHandler? ExitRequested;
|
||||
|
||||
/// <summary>Whether the shell accepted the icon. Reported by the diagnostics.</summary>
|
||||
internal bool IsInstalled => _isInstalled;
|
||||
|
||||
internal bool Install()
|
||||
{
|
||||
if (_isInstalled)
|
||||
|
||||
Reference in New Issue
Block a user