using System.Threading.Tasks;
using ElectronNET.API.Entities;
namespace ElectronNET.API.Interfaces
{
///
/// Perform copy and paste operations on the system clipboard.
///
public interface IClipboard
{
///
/// Read the content in the clipboard as plain text.
///
///
/// The content in the clipboard as plain text.
Task ReadTextAsync(string type = "");
///
/// Writes the text into the clipboard as plain text.
///
///
///
void WriteText(string text, string type = "");
///
/// The content in the clipboard as markup.
///
///
///
Task ReadHTMLAsync(string type = "");
///
/// Writes markup to the clipboard.
///
///
///
void WriteHTML(string markup, string type = "");
///
/// The content in the clipboard as RTF.
///
///
///
Task ReadRTFAsync(string type = "");
///
/// Writes the text into the clipboard in RTF.
///
///
///
void WriteRTF(string text, string type = "");
///
/// Returns an Object containing title and url keys representing
/// the bookmark in the clipboard. The title and url values will
/// be empty strings when the bookmark is unavailable.
///
///
Task ReadBookmarkAsync();
///
/// Writes the title and url into the clipboard as a bookmark.
///
/// Note: Most apps on Windows don’t support pasting bookmarks
/// into them so you can use clipboard.write to write both a
/// bookmark and fallback text to the clipboard.
///
///
///
///
void WriteBookmark(string title, string url, string type = "");
///
/// macOS: The text on the find pasteboard. This method uses synchronous IPC
/// when called from the renderer process. The cached value is reread from the
/// find pasteboard whenever the application is activated.
///
///
Task ReadFindTextAsync();
///
/// macOS: Writes the text into the find pasteboard as plain text. This method uses
/// synchronous IPC when called from the renderer process.
///
///
void WriteFindText(string text);
///
/// Clears the clipboard content.
///
///
void Clear(string type = "");
///
/// An array of supported formats for the clipboard type.
///
///
///
Task AvailableFormatsAsync(string type = "");
///
/// Writes data to the clipboard.
///
///
///
void Write(Data data, string type = "");
///
/// Reads an image from the clipboard.
///
///
///
Task ReadImageAsync(string type = "");
///
/// Writes an image to the clipboard.
///
///
///
void WriteImage(NativeImage image, string type = "");
}
}