using System; using System.Threading.Tasks; using ElectronNET.API.Entities; namespace ElectronNET.API.Interfaces { /// /// Retrieve information about screen size, displays, cursor position, etc. /// public interface IScreen { /// /// Emitted when an new Display has been added. /// event Action OnDisplayAdded; /// /// Emitted when oldDisplay has been removed. /// event Action OnDisplayRemoved; /// /// Emitted when one or more metrics change in a display. /// The changedMetrics is an array of strings that describe the changes. /// Possible changes are bounds, workArea, scaleFactor and rotation. /// event Action OnDisplayMetricsChanged; /// /// The current absolute position of the mouse pointer. /// /// Task GetCursorScreenPointAsync(); /// /// macOS: The height of the menu bar in pixels. /// /// The height of the menu bar in pixels. Task GetMenuBarHeightAsync(); /// /// The primary display. /// /// Task GetPrimaryDisplayAsync(); /// /// An array of displays that are currently available. /// /// An array of displays that are currently available. Task GetAllDisplaysAsync(); /// /// The display nearest the specified point. /// /// The display nearest the specified point. Task GetDisplayNearestPointAsync(Point point); /// /// The display that most closely intersects the provided bounds. /// /// /// The display that most closely intersects the provided bounds. Task GetDisplayMatchingAsync(Rectangle rectangle); } }