import { EventEmitter } from 'eventemitter3'; import type { HIDDevice, HIDDeviceInfo } from '../hid-device.js'; import type { DeviceModelId, Dimension, KeyIndex } from '../id.js'; import type { FillImageOptions, FillPanelDimensionsOptions, FillPanelOptions, StreamDeck, StreamDeckEvents, StreamDeckTcpChildDeviceInfo } from '../types.js'; import type { ButtonsLcdDisplayService } from '../services/buttonsLcdDisplay/interface.js'; import type { StreamDeckButtonControlDefinition, StreamDeckControlDefinition } from '../controlDefinition.js'; import type { LcdSegmentDisplayService } from '../services/lcdSegmentDisplay/interface.js'; import type { PropertiesService } from '../services/properties/interface.js'; import type { CallbackHook } from '../services/callback-hook.js'; import type { StreamDeckInputService } from '../services/input/interface.js'; import type { StreamDeckModelInfo } from '../modelInfo.js'; import type { EncoderLedService } from '../services/encoderLed/interface.js'; import { type PreparedBuffer } from '../preparedBuffer.js'; export type EncodeJPEGHelper = (buffer: Uint8Array, width: number, height: number) => Promise; export interface OpenStreamDeckOptions { encodeJPEG?: EncodeJPEGHelper; } export type StreamDeckProperties = Readonly<{ model: DeviceModelId; productName: string; keyDataOffset: number; supportsRgbKeyFill: boolean; controls: Readonly; /** The extent of the face, which every control's `bounds` is within */ faceSize: Dimension; fullscreenPanels: number; hasNfcReader: boolean; /** Whether this device supports child devices */ supportsChildDevices: boolean; }>; /** * The properties of a model which are known without a device present. * The identity of the model is applied when its `StreamDeckModelDefinition` is built */ export type StreamDeckStaticProperties = Omit; export interface StreamDeckServicesDefinition { modelInfo: StreamDeckModelInfo; deviceProperties: StreamDeckProperties; events: CallbackHook; properties: PropertiesService; buttonsLcd: ButtonsLcdDisplayService; inputService: StreamDeckInputService; lcdSegmentDisplay: LcdSegmentDisplayService | null; encoderLed: EncoderLedService | null; } export declare class StreamDeckBase extends EventEmitter implements StreamDeck { #private; get modelInfo(): StreamDeckModelInfo; get CONTROLS(): Readonly; get MODEL(): DeviceModelId; get PRODUCT_NAME(): string; get HAS_NFC_READER(): boolean; protected readonly device: HIDDevice; protected readonly deviceProperties: Readonly; constructor(device: HIDDevice, _options: Readonly>, services: StreamDeckServicesDefinition); protected checkValidKeyIndex(keyIndex: KeyIndex, feedbackType: StreamDeckButtonControlDefinition['feedbackType'] | null): void; calculateFillPanelDimensions(options?: FillPanelDimensionsOptions): Dimension | null; close(): Promise; getHidDeviceInfo(): Promise; setBrightness(percentage: number): Promise; resetToLogo(): Promise; getFirmwareVersion(): Promise; getAllFirmwareVersions(): Promise>; getSerialNumber(): Promise; sendPreparedBuffer(buffer: PreparedBuffer): Promise; fillKeyColor(keyIndex: KeyIndex, r: number, g: number, b: number): Promise; fillKeyBuffer(keyIndex: KeyIndex, imageBuffer: Uint8Array, options?: FillImageOptions): Promise; prepareFillKeyBuffer(keyIndex: KeyIndex, imageBuffer: Uint8Array | Uint8ClampedArray, options?: FillImageOptions, jsonSafe?: boolean): Promise; fillPanelBuffer(imageBuffer: Uint8Array, options?: FillPanelOptions): Promise; prepareFillPanelBuffer(imageBuffer: Uint8Array | Uint8ClampedArray, options?: FillPanelOptions, jsonSafe?: boolean): Promise; clearKey(keyIndex: KeyIndex): Promise; clearPanel(): Promise; fillLcd(...args: Parameters): ReturnType; fillLcdRegion(...args: Parameters): ReturnType; prepareFillLcdRegion(...args: Parameters): ReturnType; clearLcdSegment(...args: Parameters): ReturnType; setEncoderColor(...args: Parameters): ReturnType; setEncoderRingSingleColor(...args: Parameters): ReturnType; setEncoderRingColors(...args: Parameters): ReturnType; getChildDeviceInfo(): Promise; } //# sourceMappingURL=base.d.ts.map