forked from octalmage/robotjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into new-screenshot-code
- Loading branch information
Showing
13 changed files
with
393 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## How to contribute | ||
|
||
* Please try to match the style of the code around the feature/bug you're working on. | ||
* Use tabs not spaces. | ||
* Please make sure your pull request only includes changes to the lines you're working on. For example, disable the whitespace extension when using Atom. | ||
* All pull requests must include code for every platform (Mac, Windows, and Linux) before they can be merged. The exception is platform specific features. Feel free to submit a pull request with code for one platform and others can fill in the gaps to help get it merged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!--- Provide a general summary of the issue in the Title above. --> | ||
|
||
## Expected Behavior | ||
<!--- If you're describing a bug, tell us what should happen. --> | ||
<!--- If you're suggesting a change/improvement, tell us how it should work. --> | ||
|
||
## Current Behavior | ||
<!--- If describing a bug, tell us what happens instead of the expected behavior. --> | ||
<!--- If suggesting a change/improvement, explain the difference from current behavior. --> | ||
|
||
## Possible Solution | ||
<!--- Not obligatory, but suggest a fix/reason for the bug, --> | ||
<!--- or ideas how to implement the addition or change. --> | ||
|
||
## Steps to Reproduce (for bugs) | ||
<!--- Please provide an unambiguous set of steps to reproduce this bug. --> | ||
<!--- Include code to reproduce. --> | ||
1. | ||
2. | ||
3. | ||
4. | ||
|
||
## Context | ||
<!--- How has this issue affected you? What are you trying to accomplish? --> | ||
<!--- Providing context helps us come up with a solution that is most useful in the real world. --> | ||
|
||
## Your Environment | ||
<!--- Include as many relevant details about the environment you experienced the bug in. --> | ||
* RobotJS version: | ||
* Node.js version: | ||
* npm version: | ||
* Operating System: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export interface Bitmap { | ||
width: number | ||
height: number | ||
image: any | ||
byteWidth: number | ||
bitsPerPixel: number | ||
bytesPerPixel: number | ||
colorAt(x: number, y: number): string | ||
} | ||
|
||
export interface Screen { | ||
capture(x?: number, y?: number, width?: number, height?: number): Bitmap | ||
} | ||
|
||
export function setKeyboardDelay(ms: number) : void | ||
export function keyTap(key: string, modifier?: string | string[]) : void | ||
export function keyToggle(key: string, down: string, modifier?: string | string[]) : void | ||
export function typeString(string: string) : void | ||
export function typeStringDelayed(string: string, cpm: number) : void | ||
export function setMouseDelay(delay: number) : void | ||
export function moveMouse(x: number, y: number) : void | ||
export function moveMouseSmooth(x: number, y: number) : void | ||
export function mouseClick(button?: string, double?: boolean) : void | ||
export function mouseToggle(down?: string, button?: boolean) : void | ||
export function dragMouse(x: number, y: number) : void | ||
export function scrollMouse(magnitude: number, direction: string) : void | ||
export function getMousePos(): { x: number, y: number } | ||
export function getPixelColor(x: number, y: number): string | ||
export function getScreenSize(): { width: number, height: number } | ||
|
||
export var screen: Screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.