Files
AtomUI/src/AtomUI.Native/WindowUtils.cs
T
2025-02-25 17:49:38 +08:00

29 lines
750 B
C#

using AtomUI.Native.Interop;
using Avalonia.Controls;
namespace AtomUI.Native;
internal static class WindowUtils
{
public static void SetWindowIgnoreMouseEvents(this WindowBase window, bool flag)
{
var windowHandle = window.PlatformImpl?.Handle?.Handle;
if (windowHandle is not null)
{
WindowUtilsImpl.AtomUISetWindowIgnoresMouseEvents(windowHandle.Value, flag);
}
}
public static bool GetWindowIgnoreMouseEvents(this WindowBase window)
{
var windowHandle = window.PlatformImpl?.Handle?.Handle;
if (windowHandle is not null)
{
return WindowUtilsImpl.AtomUIGetWindowIgnoresMouseEvents(windowHandle.Value);
}
return false;
}
}