mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-13 05:34:47 +00:00
Add supported OS platform annotations
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
@@ -11,6 +12,8 @@ namespace ElectronNET.API
|
||||
/// <summary>
|
||||
/// Emitted when the system is about to lock the screen.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
public event Action OnLockScreen
|
||||
{
|
||||
add
|
||||
@@ -40,6 +43,8 @@ namespace ElectronNET.API
|
||||
/// <summary>
|
||||
/// Emitted when the system is about to unlock the screen.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
public event Action OnUnLockScreen
|
||||
{
|
||||
add
|
||||
@@ -69,6 +74,8 @@ namespace ElectronNET.API
|
||||
/// <summary>
|
||||
/// Emitted when the system is suspending.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
public event Action OnSuspend
|
||||
{
|
||||
add
|
||||
@@ -98,6 +105,8 @@ namespace ElectronNET.API
|
||||
/// <summary>
|
||||
/// Emitted when system is resuming.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
public event Action OnResume
|
||||
{
|
||||
add
|
||||
@@ -127,6 +136,8 @@ namespace ElectronNET.API
|
||||
/// <summary>
|
||||
/// Emitted when the system changes to AC power.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
public event Action OnAC
|
||||
{
|
||||
add
|
||||
@@ -156,6 +167,8 @@ namespace ElectronNET.API
|
||||
/// <summary>
|
||||
/// Emitted when system changes to battery power.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
public event Action OnBattery
|
||||
{
|
||||
add
|
||||
@@ -189,6 +202,9 @@ namespace ElectronNET.API
|
||||
/// order for the app to exit cleanly.If `e.preventDefault()` is called, the app
|
||||
/// should exit as soon as possible by calling something like `app.quit()`.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("linux")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
|
||||
public event Action OnShutdown
|
||||
{
|
||||
add
|
||||
|
||||
Reference in New Issue
Block a user