using System.Threading.Tasks;
using Avalonia.Metadata;
namespace Avalonia.Input.Platform
{
///
/// Represents the system clipboard.
///
[NotClientImplementable]
public interface IClipboard
{
///
/// Clears any data from the system clipboard.
///
Task ClearAsync();
///
/// Places a data object on the clipboard.
/// The data object is responsible for providing supported formats and data upon request.
///
/// The data object to set on the clipboard.
///
///
/// If is null, nothing will get placed on the clipboard and this method
/// will be equivalent to .
///
///
/// The must NOT be disposed by the caller after this call.
/// The clipboard will dispose of it automatically when it becomes unused.
///
///
Task SetDataAsync(IAsyncDataTransfer? dataTransfer);
///
/// Permanently adds the data that is on the Clipboard so that it is available after the data's original application closes.
///
///
/// This method is only supported on the Windows platform. This method will do nothing on other platforms.
Task FlushAsync();
///
/// Retrieves data from the clipboard.
///
///
/// The returned MUST be disposed by the caller.
///
/// Avoid storing the returned instance for a long time:
/// use it, then dispose it as soon as possible.
///
///
Task TryGetDataAsync();
///
/// Retrieves the exact instance of a previously placed on the clipboard
/// by , if any.
///
/// The data transfer object if present, null otherwise.
///
/// This method cannot be used to retrieve a set by another process.
/// This method is only supported on Windows, macOS and X11 platforms. Other platforms will always return null.
///
/// Contrary to , the returned must NOT be disposed
/// by the caller since it's still owned by the clipboard.
///
///
Task TryGetInProcessDataAsync();
}
}