A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
591 B

using System.Threading.Tasks;
using Avalonia.Native.Interop;
using Avalonia.Platform;
namespace Avalonia.Native
{
internal class PlatformBehaviorInhibition : IPlatformBehaviorInhibition
{
readonly IAvnPlatformBehaviorInhibition _native;
internal PlatformBehaviorInhibition(IAvnPlatformBehaviorInhibition native)
=> _native = native;
public Task SetInhibitAppSleep(bool inhibitAppSleep, string reason)
{
_native.SetInhibitAppSleep(inhibitAppSleep ? 1 : 0, reason);
return Task.CompletedTask;
}
}
}