-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
58 lines (47 loc) · 1.38 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import EventEmitter = require("events");
declare class Displaypad extends EventEmitter {
/**
* The pixel size of an icon written to the Infinitton key.
*/
static get ICON_SIZE(): number;
/**
* The number of keys on the panel.
*/
static get NUM_KEYS(): number;
/**
* The number of keys per row on the panel.
*/
static get NUM_KEYS_PER_ROW(): number;
static get VENDOR_ID(): number;
static get PRODUCT_IDS(): number[];
static async openAsync();
constructor(devicePath: string);
/**
* Fills the given key with a solid color.
*
* @param {number} keyIndex The key to fill 0 - 14
* @param {number} r The color's red value. 0 - 255
* @param {number} g The color's green value. 0 - 255
* @param {number} b The color's blue value. 0 -255
*/
fillColor(keyIndex: number, r: number, g: number, b: number): void;
/**
* Fills the given key with an image in a Buffer.
*
* @param {number} keyIndex The key to fill 0 - 14
* @param {Buffer} imageBuffer
*/
fillImage(keyIndex: number, imageBuffer: Buffer): void;
/**
* Clears the given key.
*
* @param {number} keyIndex The key to clear 0 - 14
*/
clearKey(keyIndex: number): void;
/**
* Clears all keys.
*/
clearAllKeys(): void;
close(): void
}
export = Displaypad;