using System;
namespace ScreenCapture
{
///
/// Represents the duplication of a single display.
///
public interface IScreenCapture : IDisposable
{
///
/// Gets the this capture is duplicating.
///
Display Display { get; }
///
/// Occurs when the is updated.
///
event EventHandler? Updated;
///
/// Attemts to capture the current frame showed on the .
///
/// true if the current frame was captures successfully; otherwise, false.
bool CaptureScreen();
///
/// Creates a new for this .
///
/// The x-location of the region to capture (must be >= 0 and < screen-width).
/// The x-location of the region to capture (must be >= 0 and < screen-height).
/// The width of the region to capture (must be >= 0 and this + x must be <= screen-width).
/// The height of the region to capture (must be >= 0 and this + y must be <= screen-height).
/// The level of downscaling applied to the image of this region before copying to local memory. The calculation is (width and height)/2^downscaleLevel.
/// The new .
CaptureZone RegisterCaptureZone(int x, int y, int width, int height, int downscaleLevel = 0);
///
/// Removes the given from the .
///
/// The previosly registered .
/// true if the was successfully removed; otherwise, false.
bool UnregisterCaptureZone(CaptureZone captureZone);
///
/// Restarts the .
///
void Restart();
}
}