mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-29 08:54:29 +00:00
Move modules into separate files
This commit is contained in:
60
github-electron/github-electron.screen.d.ts
vendored
Normal file
60
github-electron/github-electron.screen.d.ts
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
// Type definitions for Electron v0.37.2
|
||||
// Project: http://electron.atom.io/
|
||||
// Definitions by: jedmao <https://github.com/jedmao/>, rhysd <https://rhysd.github.io>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="github-electron.event-emitter.d.ts" />
|
||||
|
||||
declare namespace Electron {
|
||||
|
||||
interface Display {
|
||||
id: number;
|
||||
bounds: Bounds;
|
||||
workArea: Bounds;
|
||||
size: Dimension;
|
||||
workAreaSize: Dimension;
|
||||
scaleFactor: number;
|
||||
rotation: number;
|
||||
touchSupport: string;
|
||||
}
|
||||
|
||||
interface Bounds {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface Dimension {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
class Screen extends EventEmitter {
|
||||
/**
|
||||
* @returns The current absolute position of the mouse pointer.
|
||||
*/
|
||||
getCursorScreenPoint(): Point;
|
||||
/**
|
||||
* @returns The primary display.
|
||||
*/
|
||||
getPrimaryDisplay(): Display;
|
||||
/**
|
||||
* @returns An array of displays that are currently available.
|
||||
*/
|
||||
getAllDisplays(): Display[];
|
||||
/**
|
||||
* @returns The display nearest the specified point.
|
||||
*/
|
||||
getDisplayNearestPoint(point: Point): Display;
|
||||
/**
|
||||
* @returns The display that most closely intersects the provided bounds.
|
||||
*/
|
||||
getDisplayMatching(rect: Bounds): Display;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user