From 3b4963a4887931e2587151860cb91ff0b9003e6d Mon Sep 17 00:00:00 2001 From: Rafael Rivera Date: Sun, 17 Dec 2023 21:37:05 -0800 Subject: [PATCH 1/3] Add missing NotifyIcon notification constant --- generation/WinSDK/manual/Shell.cs | 2 ++ scripts/ChangesSinceLastRelease.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/generation/WinSDK/manual/Shell.cs b/generation/WinSDK/manual/Shell.cs index 291e3019a..eb60a89fe 100644 --- a/generation/WinSDK/manual/Shell.cs +++ b/generation/WinSDK/manual/Shell.cs @@ -16,6 +16,8 @@ public static unsafe partial class Apis [NativeTypeName("HRESULT")] public const int HLINK_S_FIRST = OLE_S_LAST + 1; + public const uint NIN_KEYSELECT = NIN_SELECT | NINF_KEY; + [DllImport("SHELL32.dll", EntryPoint = "#660", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] public static extern BOOL FileIconInit([In]BOOL fRestoreCache) } diff --git a/scripts/ChangesSinceLastRelease.txt b/scripts/ChangesSinceLastRelease.txt index 3a65293d9..77bdb719e 100644 --- a/scripts/ChangesSinceLastRelease.txt +++ b/scripts/ChangesSinceLastRelease.txt @@ -291,3 +291,5 @@ Windows.Win32.UI.WindowsAndMessaging.Apis.SendMessageTimeoutW : [DllImport(USER3 # Fixed #1866. Windows.Win32.System.WinRT.Printing.IPrintDocumentPageSource added Windows.Win32.System.WinRT.Printing.IPrintPreviewPageCollection added +# Add missing NotifyIcon notification constant +Windows.Win32.UI.Shell.Apis.NIN_KEYSELECT added From bfce736c5663b4e67bfd546db478dca776c83e4a Mon Sep 17 00:00:00 2001 From: Rafael Rivera Date: Mon, 18 Dec 2023 11:45:11 -0800 Subject: [PATCH 2/3] Adjust NIN/WM constant types --- generation/WinSDK/ConstantsScraper.settings.rsp | 10 ++++++++++ scripts/ChangesSinceLastRelease.txt | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/generation/WinSDK/ConstantsScraper.settings.rsp b/generation/WinSDK/ConstantsScraper.settings.rsp index 866cb53e3..07e2d31a8 100644 --- a/generation/WinSDK/ConstantsScraper.settings.rsp +++ b/generation/WinSDK/ConstantsScraper.settings.rsp @@ -230,6 +230,15 @@ IRLMP_SHARP_MODE=int IRLMP_TINYTP_MODE=int JET_errSuccess=int MAXIMUM_ALLOWED=uint +NIN_BALLOONHIDE=int +NIN_BALLOONSHOW=int +NIN_BALLOONTIMEOUT=int +NIN_BALLOONUSERCLICK=int +NIN_POPUPCLOSE=int +NIN_POPUPOPEN=int +NIN_SELECT=int +NIN_KEY=int +NIN_KEYSELECT=int NULLREGION=int PDH_ACCESS_DENIED=uint PDH_ASYNC_QUERY_TIMEOUT=uint @@ -441,6 +450,7 @@ UDP_RECV_MAX_COALESCED_SIZE=int UDP_SEND_MSG_SIZE=int WRITE_DAC=uint WRITE_OWNER=uint +WM_USER=int XBUTTON1=ushort XBUTTON2=ushort WINEVENT_CHANNEL_*=int diff --git a/scripts/ChangesSinceLastRelease.txt b/scripts/ChangesSinceLastRelease.txt index 77bdb719e..a1e202dfd 100644 --- a/scripts/ChangesSinceLastRelease.txt +++ b/scripts/ChangesSinceLastRelease.txt @@ -293,3 +293,12 @@ Windows.Win32.System.WinRT.Printing.IPrintDocumentPageSource added Windows.Win32.System.WinRT.Printing.IPrintPreviewPageCollection added # Add missing NotifyIcon notification constant Windows.Win32.UI.Shell.Apis.NIN_KEYSELECT added +# Adjust NIN/WM constant types +Windows.Win32.UI.Shell.Apis.NIN_BALLOONHIDE...System.UInt32 => System.Int32 +Windows.Win32.UI.Shell.Apis.NIN_BALLOONSHOW...System.UInt32 => System.Int32 +Windows.Win32.UI.Shell.Apis.NIN_BALLOONTIMEOUT...System.UInt32 => System.Int32 +Windows.Win32.UI.Shell.Apis.NIN_BALLOONUSERCLICK...System.UInt32 => System.Int32 +Windows.Win32.UI.Shell.Apis.NIN_POPUPCLOSE...System.UInt32 => System.Int32 +Windows.Win32.UI.Shell.Apis.NIN_POPUPOPEN...System.UInt32 => System.Int32 +Windows.Win32.UI.Shell.Apis.NIN_SELECT...System.UInt32 => System.Int32 +Windows.Win32.UI.WindowsAndMessaging.Apis.WM_USER...System.UInt32 => System.Int32 From 579cc3e278b99e6fc226585530ea1adc2db4edff Mon Sep 17 00:00:00 2001 From: Rafael Rivera Date: Mon, 18 Dec 2023 13:20:25 -0800 Subject: [PATCH 3/3] Correct NIN flag type --- generation/WinSDK/ConstantsScraper.settings.rsp | 2 +- generation/WinSDK/manual/Shell.cs | 2 +- scripts/ChangesSinceLastRelease.txt | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/generation/WinSDK/ConstantsScraper.settings.rsp b/generation/WinSDK/ConstantsScraper.settings.rsp index 07e2d31a8..7957c1cae 100644 --- a/generation/WinSDK/ConstantsScraper.settings.rsp +++ b/generation/WinSDK/ConstantsScraper.settings.rsp @@ -237,8 +237,8 @@ NIN_BALLOONUSERCLICK=int NIN_POPUPCLOSE=int NIN_POPUPOPEN=int NIN_SELECT=int -NIN_KEY=int NIN_KEYSELECT=int +NINF_KEY=int NULLREGION=int PDH_ACCESS_DENIED=uint PDH_ASYNC_QUERY_TIMEOUT=uint diff --git a/generation/WinSDK/manual/Shell.cs b/generation/WinSDK/manual/Shell.cs index eb60a89fe..4778d772b 100644 --- a/generation/WinSDK/manual/Shell.cs +++ b/generation/WinSDK/manual/Shell.cs @@ -16,7 +16,7 @@ public static unsafe partial class Apis [NativeTypeName("HRESULT")] public const int HLINK_S_FIRST = OLE_S_LAST + 1; - public const uint NIN_KEYSELECT = NIN_SELECT | NINF_KEY; + public const int NIN_KEYSELECT = NIN_SELECT | NINF_KEY; [DllImport("SHELL32.dll", EntryPoint = "#660", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] public static extern BOOL FileIconInit([In]BOOL fRestoreCache) diff --git a/scripts/ChangesSinceLastRelease.txt b/scripts/ChangesSinceLastRelease.txt index a1e202dfd..758cdf2ff 100644 --- a/scripts/ChangesSinceLastRelease.txt +++ b/scripts/ChangesSinceLastRelease.txt @@ -302,3 +302,12 @@ Windows.Win32.UI.Shell.Apis.NIN_POPUPCLOSE...System.UInt32 => System.Int32 Windows.Win32.UI.Shell.Apis.NIN_POPUPOPEN...System.UInt32 => System.Int32 Windows.Win32.UI.Shell.Apis.NIN_SELECT...System.UInt32 => System.Int32 Windows.Win32.UI.WindowsAndMessaging.Apis.WM_USER...System.UInt32 => System.Int32 +# Adjust NOTIFYICONDATA flags, types +Windows.Win32.UI.Shell.NOTIFY_ICON_INFOTIP_FLAGS : => [Flags] +Windows.Win32.UI.Shell.NOTIFY_ICON_STATE : => [Flags] +Windows.Win32.UI.Shell.NOTIFYICONDATAA.dwStateMask(X64, Arm64)...System.UInt32 => Windows.Win32.UI.Shell.NOTIFY_ICON_STATE +Windows.Win32.UI.Shell.NOTIFYICONDATAA.dwStateMask(X86)...System.UInt32 => Windows.Win32.UI.Shell.NOTIFY_ICON_STATE +Windows.Win32.UI.Shell.NOTIFYICONDATAW.dwStateMask(X64, Arm64)...System.UInt32 => Windows.Win32.UI.Shell.NOTIFY_ICON_STATE +Windows.Win32.UI.Shell.NOTIFYICONDATAW.dwStateMask(X86)...System.UInt32 => Windows.Win32.UI.Shell.NOTIFY_ICON_STATE +# Correct NIN flag type +Windows.Win32.UI.Shell.Apis.NINF_KEY...System.UInt32 => System.Int32