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' of https://github.com/octalmage/robotjs
# Conflicts: # src/robotjs.cc
- Loading branch information
Showing
15 changed files
with
299 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2014 Jason Stallings | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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
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
Oops, something went wrong.