diff --git a/src/ElectronNET.API/API/App.cs b/src/ElectronNET.API/API/App.cs
index 1c1ffc56..c486f90a 100644
--- a/src/ElectronNET.API/API/App.cs
+++ b/src/ElectronNET.API/API/App.cs
@@ -2,6 +2,7 @@
using ElectronNET.API.Extensions;
using System;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
@@ -259,6 +260,8 @@ public event Action WebContentsCreated
/// screen readers, are enabled or disabled. See https://www.chromium.org/developers/design-documents/accessibility for more details.
///
/// when Chrome's accessibility support is enabled, otherwise.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public event Action AccessibilitySupportChanged
{
add => AddEvent(value, GetHashCode());
@@ -316,6 +319,7 @@ internal set
///
/// On Windows, you have to parse the arguments using App.CommandLine to get the filepath.
///
+ [SupportedOSPlatform("macOS")]
public event Action OpenFile
{
add => AddEvent(value, GetHashCode());
@@ -327,6 +331,7 @@ public event Action OpenFile
/// Emitted when a MacOS user wants to open a URL with the application. Your application's Info.plist file must
/// define the URL scheme within the CFBundleURLTypes key, and set NSPrincipalClass to AtomApplication.
///
+ [SupportedOSPlatform("macOS")]
public event Action OpenUrl
{
add => AddEvent(value, GetHashCode());
@@ -481,6 +486,7 @@ public void Focus(FocusOptions focusOptions)
///
/// Hides all application windows without minimizing them.
///
+ [SupportedOSPlatform("macOS")]
public void Hide()
{
this.CallMethod0();
@@ -489,6 +495,7 @@ public void Hide()
///
/// Shows application windows after they were hidden. Does not automatically focus them.
///
+ [SupportedOSPlatform("macOS")]
public void Show()
{
this.CallMethod0();
@@ -586,6 +593,8 @@ public async Task GetLocaleAsync(CancellationToken cancellationToken = d
/// list from the task bar, and on macOS you can visit it from dock menu.
///
/// Path to add.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void AddRecentDocument(string path)
{
this.CallMethod1(path);
@@ -594,6 +603,8 @@ public void AddRecentDocument(string path)
///
/// Clears the recent documents list.
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void ClearRecentDocuments()
{
this.CallMethod0();
@@ -709,6 +720,8 @@ public async Task SetAsDefaultProtocolClientAsync(string protocol, string
/// The name of your protocol, without ://.
/// The cancellation token.
/// Whether the call succeeded.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public async Task RemoveAsDefaultProtocolClientAsync(string protocol, CancellationToken cancellationToken = default)
{
return await this.RemoveAsDefaultProtocolClientAsync(protocol, null, null, cancellationToken).ConfigureAwait(false);
@@ -722,6 +735,8 @@ public async Task RemoveAsDefaultProtocolClientAsync(string protocol, Canc
/// Defaults to process.execPath.
/// The cancellation token.
/// Whether the call succeeded.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public async Task RemoveAsDefaultProtocolClientAsync(string protocol, string path, CancellationToken cancellationToken = default)
{
return await this.RemoveAsDefaultProtocolClientAsync(protocol, path, null, cancellationToken).ConfigureAwait(false);
@@ -736,6 +751,8 @@ public async Task RemoveAsDefaultProtocolClientAsync(string protocol, stri
/// Defaults to an empty array.
/// The cancellation token.
/// Whether the call succeeded.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public async Task RemoveAsDefaultProtocolClientAsync(string protocol, string path, string[] args, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -826,6 +843,7 @@ public async Task IsDefaultProtocolClientAsync(string protocol, string pat
/// Array of objects.
/// The cancellation token.
/// Whether the call succeeded.
+ [SupportedOSPlatform("Windows")]
public async Task SetUserTasksAsync(UserTask[] userTasks, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -846,6 +864,7 @@ public async Task SetUserTasksAsync(UserTask[] userTasks, CancellationToke
///
/// The cancellation token.
/// Jump List settings.
+ [SupportedOSPlatform("Windows")]
public async Task GetJumpListSettingsAsync(CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -868,6 +887,7 @@ public async Task GetJumpListSettingsAsync(CancellationToken c
/// omitted from the Jump List. The list of removed items can be obtained using .
///
/// Array of objects.
+ [SupportedOSPlatform("Windows")]
public void SetJumpList(JumpListCategory[] categories)
{
this.CallMethod1(categories);
@@ -950,6 +970,7 @@ public async Task HasSingleInstanceLockAsync(CancellationToken cancellatio
///
/// Uniquely identifies the activity. Maps to NSUserActivity.activityType.
/// App-specific state to store for use by another device.
+ [SupportedOSPlatform("macOS")]
public void SetUserActivity(string type, object userInfo)
{
SetUserActivity(type, userInfo, null);
@@ -967,6 +988,7 @@ public void SetUserActivity(string type, object userInfo)
///
/// The webpage to load in a browser if no suitable app is installed on the resuming device. The scheme must be http or https.
///
+ [SupportedOSPlatform("macOS")]
public void SetUserActivity(string type, object userInfo, string webpageUrl)
{
this.CallMethod3(type, userInfo, webpageUrl);
@@ -976,6 +998,7 @@ public void SetUserActivity(string type, object userInfo, string webpageUrl)
/// The type of the currently running activity.
///
/// The cancellation token.
+ [SupportedOSPlatform("macOS")]
public async Task GetCurrentActivityTypeAsync(CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -985,6 +1008,7 @@ public async Task GetCurrentActivityTypeAsync(CancellationToken cancella
///
/// Invalidates the current Handoff user activity.
///
+ [SupportedOSPlatform("macOS")]
public void InvalidateCurrentActivity()
{
this.CallMethod0();
@@ -993,6 +1017,7 @@ public void InvalidateCurrentActivity()
///
/// Marks the current Handoff user activity as inactive without invalidating it.
///
+ [SupportedOSPlatform("macOS")]
public void ResignCurrentActivity()
{
this.CallMethod0();
@@ -1002,6 +1027,7 @@ public void ResignCurrentActivity()
/// Changes the Application User Model ID to id.
///
/// Model Id.
+ [SupportedOSPlatform("Windows")]
public void SetAppUserModelId(string id)
{
this.CallMethod1(id);
@@ -1016,6 +1042,7 @@ public void SetAppUserModelId(string id)
///
/// The cancellation token.
/// Result of import. Value of 0 indicates success.
+ [SupportedOSPlatform("Linux")]
public async Task ImportCertificateAsync(ImportCertificateOptions options, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -1067,6 +1094,8 @@ public async Task GetGpuFeatureStatusAsync(CancellationToken c
/// Counter badge.
/// The cancellation token.
/// Whether the call succeeded.
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("macOS")]
public async Task SetBadgeCountAsync(int count, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -1086,6 +1115,8 @@ public async Task SetBadgeCountAsync(int count, CancellationToken cancella
/// The current value displayed in the counter badge.
///
/// The cancellation token.
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("macOS")]
public async Task GetBadgeCountAsync(CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -1101,6 +1132,7 @@ public async Task GetBadgeCountAsync(CancellationToken cancellationToken =
/// Whether the current desktop environment is Unity launcher.
///
/// The cancellation token.
+ [SupportedOSPlatform("Linux")]
public async Task IsUnityRunningAsync(CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -1111,6 +1143,8 @@ public async Task IsUnityRunningAsync(CancellationToken cancellationToken
/// If you provided path and args options to then you need to pass the same
/// arguments here for to be set correctly.
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public async Task GetLoginItemSettingsAsync(CancellationToken cancellationToken = default)
{
return await this.GetLoginItemSettingsAsync(null, cancellationToken).ConfigureAwait(false);
@@ -1122,6 +1156,8 @@ public async Task GetLoginItemSettingsAsync(CancellationToken
///
///
/// The cancellation token.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public async Task GetLoginItemSettingsAsync(LoginItemSettingsOptions options, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -1151,6 +1187,8 @@ public async Task GetLoginItemSettingsAsync(LoginItemSettings
/// you'll want to set the launch path to Update.exe, and pass arguments that specify your application name.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetLoginItemSettings(LoginSettings loginSettings)
{
this.CallMethod1(loginSettings);
@@ -1162,6 +1200,8 @@ public void SetLoginItemSettings(LoginSettings loginSettings)
/// See Chromium's accessibility docs for more details.
///
/// if Chrome’s accessibility support is enabled, otherwise.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public async Task IsAccessibilitySupportEnabledAsync(CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -1178,6 +1218,8 @@ public async Task IsAccessibilitySupportEnabledAsync(CancellationToken can
/// Note: Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
///
/// Enable or disable accessibility tree rendering.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetAccessibilitySupportEnabled(bool enabled)
{
this.CallMethod1(enabled);
diff --git a/src/ElectronNET.API/API/BrowserWindow.cs b/src/ElectronNET.API/API/BrowserWindow.cs
index 67f8b969..bd60b77d 100644
--- a/src/ElectronNET.API/API/BrowserWindow.cs
+++ b/src/ElectronNET.API/API/BrowserWindow.cs
@@ -1,10 +1,11 @@
-using ElectronNET.API.Entities;
-using ElectronNET.API.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
using System.Threading.Tasks;
+using ElectronNET.API.Entities;
+using ElectronNET.API.Extensions;
// ReSharper disable InconsistentNaming
@@ -68,6 +69,7 @@ public event Action OnClosed
///
/// Emitted when window session is going to end due to force shutdown or machine restart or session log off.
///
+ [SupportedOSPlatform("Windows")]
public event Action OnSessionEnd
{
add => AddEvent(value, Id);
@@ -187,6 +189,8 @@ public event Action OnMove
///
/// macOS: Emitted once when the window is moved to a new position.
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public event Action OnMoved
{
add => AddEvent(value, Id);
@@ -238,6 +242,8 @@ public event Action OnLeaveHtmlFullScreen
/// and the APPCOMMAND_ prefix is stripped off.e.g.APPCOMMAND_BROWSER_BACKWARD
/// is emitted as browser-backward.
///
+ [SupportedOSPlatform("Windows")]
+ [SupportedOSPlatform("Linux")]
public event Action OnAppCommand
{
add => AddEvent(value, Id);
@@ -247,6 +253,7 @@ public event Action OnAppCommand
///
/// Emitted on 3-finger swipe. Possible directions are up, right, down, left.
///
+ [SupportedOSPlatform("macOS")]
public event Action OnSwipe
{
add => AddEvent(value, Id);
@@ -256,6 +263,7 @@ public event Action OnSwipe
///
/// Emitted when the window opens a sheet.
///
+ [SupportedOSPlatform("macOS")]
public event Action OnSheetBegin
{
add => AddEvent(value, Id);
@@ -265,6 +273,7 @@ public event Action OnSheetBegin
///
/// Emitted when the window has closed a sheet.
///
+ [SupportedOSPlatform("macOS")]
public event Action OnSheetEnd
{
add => AddEvent(value, Id);
@@ -274,6 +283,7 @@ public event Action OnSheetEnd
///
/// Emitted when the native new tab button is clicked.
///
+ [SupportedOSPlatform("macOS")]
public event Action OnNewWindowForTab
{
add => AddEvent(value, Id);
@@ -432,6 +442,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// The absolute path to the file to preview with QuickLook. This is important as
/// Quick Look uses the file name and file extension on the path to determine the content type of the
/// file to open.
+ [SupportedOSPlatform("macOS")]
public void PreviewFile(string path) => this.CallMethod1(path);
///
@@ -442,11 +453,13 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// file to open.
/// The name of the file to display on the Quick Look modal view. This is
/// purely visual and does not affect the content type of the file. Defaults to path.
+ [SupportedOSPlatform("macOS")]
public void PreviewFile(string path, string displayname) => this.CallMethod2(path, displayname);
///
/// Closes the currently open Quick Look panel.
///
+ [SupportedOSPlatform("macOS")]
public void CloseFilePreview() => this.CallMethod0();
///
@@ -571,6 +584,8 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// Sets whether the window can be moved by user. On Linux does nothing.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetMovable(bool movable) => this.CallMethod1(movable);
///
@@ -579,12 +594,16 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// On Linux always returns true.
///
/// On Linux always returns true.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task IsMovableAsync() => this.InvokeAsync();
///
/// Sets whether the window can be manually minimized by user. On Linux does nothing.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetMinimizable(bool minimizable) => this.CallMethod1(minimizable);
///
@@ -593,12 +612,16 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// On Linux always returns true.
///
/// On Linux always returns true.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task IsMinimizableAsync() => this.InvokeAsync();
///
/// Sets whether the window can be manually maximized by user. On Linux does nothing.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetMaximizable(bool maximizable) => this.CallMethod1(maximizable);
///
@@ -607,6 +630,8 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// On Linux always returns true.
///
/// On Linux always returns true.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task IsMaximizableAsync() => this.InvokeAsync();
///
@@ -625,6 +650,8 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// Sets whether the window can be manually closed by user. On Linux does nothing.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetClosable(bool closable) => this.CallMethod1(closable);
///
@@ -633,6 +660,8 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) =>
/// On Linux always returns true.
///
/// On Linux always returns true.
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task IsClosableAsync() => this.InvokeAsync();
///
@@ -743,6 +772,7 @@ private bool isWindows10()
/// but you may want to display them beneath a HTML-rendered toolbar.
///
///
+ [SupportedOSPlatform("macOS")]
public void SetSheetOffset(float offsetY) => this.CallMethod1(offsetY);
///
@@ -752,6 +782,7 @@ private bool isWindows10()
///
///
///
+ [SupportedOSPlatform("macOS")]
public void SetSheetOffset(float offsetY, float offsetX) => this.CallMethod2(offsetY, offsetX);
///
@@ -764,6 +795,8 @@ private bool isWindows10()
/// Makes the window not show in the taskbar.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetSkipTaskbar(bool skip) => this.CallMethod1(skip);
///
@@ -789,12 +822,14 @@ private bool isWindows10()
/// and the icon of the file will show in window’s title bar.
///
///
+ [SupportedOSPlatform("macOS")]
public void SetRepresentedFilename(string filename) => this.CallMethod1(filename);
///
/// The pathname of the file the window represents.
///
///
+ [SupportedOSPlatform("macOS")]
public Task GetRepresentedFilenameAsync() => this.InvokeAsync();
///
@@ -802,12 +837,14 @@ private bool isWindows10()
/// and the icon in title bar will become gray when set to true.
///
///
+ [SupportedOSPlatform("macOS")]
public void SetDocumentEdited(bool edited) => this.CallMethod1(edited);
///
/// Whether the window’s document has been edited.
///
///
+ [SupportedOSPlatform("macOS")]
public Task IsDocumentEditedAsync() => this.InvokeAsync();
///
@@ -861,6 +898,8 @@ public IReadOnlyCollection
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("Windows")]
public void SetMenu(MenuItem[] menuItems)
{
menuItems.AddMenuItemsId();
@@ -878,6 +917,8 @@ public void SetMenu(MenuItem[] menuItems)
///
/// Remove the window's menu bar.
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("Windows")]
public void RemoveMenu() => this.CallMethod0();
///
@@ -950,6 +991,7 @@ public IReadOnlyCollection ThumbarButtons
///
///
/// Whether the buttons were added successfully.
+ [SupportedOSPlatform("Windows")]
public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
{
var tcs = new TaskCompletionSource();
@@ -977,12 +1019,14 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// an empty region: {x: 0, y: 0, width: 0, height: 0}.
///
///
+ [SupportedOSPlatform("Windows")]
public void SetThumbnailClip(Rectangle rectangle) => this.CallMethod1(rectangle);
///
/// Sets the toolTip that is displayed when hovering over the window thumbnail in the taskbar.
///
///
+ [SupportedOSPlatform("Windows")]
public void SetThumbnailToolTip(string tooltip) => this.CallMethod1(tooltip);
///
@@ -992,11 +1036,13 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// If one of those properties is not set, then neither will be used.
///
///
+ [SupportedOSPlatform("Windows")]
public void SetAppDetails(AppDetailsOptions options) => this.CallMethod1(options);
///
/// Same as webContents.showDefinitionForSelection().
///
+ [SupportedOSPlatform("macOS")]
public void ShowDefinitionForSelection() => this.CallMethod0();
///
@@ -1006,12 +1052,16 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// If the menu bar is already visible, calling setAutoHideMenuBar(true) won’t hide it immediately.
///
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("Windows")]
public void SetAutoHideMenuBar(bool hide) => this.CallMethod1(hide);
///
/// Whether menu bar automatically hides itself.
///
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("Windows")]
public Task IsMenuBarAutoHideAsync() => this.InvokeAsync();
///
@@ -1019,12 +1069,16 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// users can still bring up the menu bar by pressing the single Alt key.
///
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("Windows")]
public void SetMenuBarVisibility(bool visible) => this.CallMethod1(visible);
///
/// Whether the menu bar is visible.
///
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("Windows")]
public Task IsMenuBarVisibleAsync() => this.InvokeAsync();
///
@@ -1033,6 +1087,8 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// Note: This API does nothing on Windows.
///
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("macOS")]
public void SetVisibleOnAllWorkspaces(bool visible) => this.CallMethod1(visible);
///
@@ -1041,6 +1097,8 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// Note: This API always returns false on Windows.
///
///
+ [SupportedOSPlatform("Linux")]
+ [SupportedOSPlatform("macOS")]
public Task IsVisibleOnAllWorkspacesAsync() => this.InvokeAsync();
///
@@ -1059,12 +1117,16 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons)
/// On Windows it calls SetWindowDisplayAffinity with WDA_MONITOR.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetContentProtection(bool enable) => this.CallMethod1(enable);
///
/// Changes whether the window can be focused.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void SetFocusable(bool focusable) => this.CallMethod1(focusable);
///
@@ -1117,6 +1179,7 @@ public async Task> GetChildWindowsAsync()
/// Controls whether to hide cursor when typing.
///
///
+ [SupportedOSPlatform("macOS")]
public void SetAutoHideCursor(bool autoHide) => this.CallMethod1(autoHide);
///
@@ -1126,6 +1189,7 @@ public async Task> GetChildWindowsAsync()
/// Can be appearance-based, light, dark, titlebar, selection,
/// menu, popover, sidebar, medium-light or ultra-dark.
/// See the macOS documentation for more details.
+ [SupportedOSPlatform("macOS")]
public void SetVibrancy(Vibrancy type) => this.CallMethod1(type.GetDescription());
///
@@ -1144,4 +1208,4 @@ public void SetBrowserView(BrowserView browserView)
// This message name does not match the default ApiBase naming convention.
BridgeConnector.Socket.Emit("browserWindow-setBrowserView", Id, browserView.Id);
}
-}
\ No newline at end of file
+}
diff --git a/src/ElectronNET.API/API/Clipboard.cs b/src/ElectronNET.API/API/Clipboard.cs
index 4b063275..c25e3dd5 100644
--- a/src/ElectronNET.API/API/Clipboard.cs
+++ b/src/ElectronNET.API/API/Clipboard.cs
@@ -1,5 +1,6 @@
using ElectronNET.API.Entities;
using ElectronNET.API.Serialization;
+using System.Runtime.Versioning;
using System.Text.Json;
using System.Threading.Tasks;
@@ -98,6 +99,8 @@ public void WriteRTF(string text, string type = "")
/// be empty strings when the bookmark is unavailable.
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task ReadBookmarkAsync() => this.InvokeAsync();
///
@@ -110,6 +113,8 @@ public void WriteRTF(string text, string type = "")
///
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public void WriteBookmark(string title, string url, string type = "")
{
BridgeConnector.Socket.Emit("clipboard-writeBookmark", title, url, type);
@@ -121,6 +126,7 @@ public void WriteBookmark(string title, string url, string type = "")
/// find pasteboard whenever the application is activated.
///
///
+ [SupportedOSPlatform("macOS")]
public Task ReadFindTextAsync() => this.InvokeAsync();
///
@@ -128,6 +134,7 @@ public void WriteBookmark(string title, string url, string type = "")
/// synchronous IPC when called from the renderer process.
///
///
+ [SupportedOSPlatform("macOS")]
public void WriteFindText(string text)
{
BridgeConnector.Socket.Emit("clipboard-writeFindText", text);
diff --git a/src/ElectronNET.API/API/Dialog.cs b/src/ElectronNET.API/API/Dialog.cs
index fa60840c..21816463 100644
--- a/src/ElectronNET.API/API/Dialog.cs
+++ b/src/ElectronNET.API/API/Dialog.cs
@@ -1,5 +1,6 @@
using ElectronNET.API.Entities;
using System;
+using System.Runtime.Versioning;
using System.Text.Json;
using System.Threading.Tasks;
@@ -186,6 +187,8 @@ public void ShowErrorBox(string title, string content)
///
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task ShowCertificateTrustDialogAsync(CertificateTrustDialogOptions options)
{
return ShowCertificateTrustDialogAsync(null, options);
@@ -199,6 +202,8 @@ public Task ShowCertificateTrustDialogAsync(CertificateTrustDialogOptions option
///
///
///
+ [SupportedOSPlatform("macOS")]
+ [SupportedOSPlatform("Windows")]
public Task ShowCertificateTrustDialogAsync(BrowserWindow browserWindow, CertificateTrustDialogOptions options)
{
var tcs = new TaskCompletionSource