/// import { EventEmitter } from 'events'; import { IClient } from '../../IClient'; import { IParticipant } from '../interfaces'; import { IControl, IControlData, IControlUpdate, IGridPlacement } from '../interfaces/controls/IControl'; import { IInput, IInputEvent } from '../interfaces/controls/IInput'; import { IMeta } from '../interfaces/controls/IMeta'; import { Scene } from '../Scene'; /** * Control is used a base class for all other controls within an interactive session. * It contains shared logic which all types of controls can utilize. */ export declare class Control extends EventEmitter implements IControl { controlID: string; kind: string; disabled: boolean; position: IGridPlacement[]; /** @deprecated etags are no longer used, you can always omit/ignore this */ etag: string; meta: IMeta; protected scene: Scene; client: IClient; /** * Sets the scene this control belongs to. */ setScene(scene: Scene): void; /** * Sets the client instance this control can use to execute methods. */ setClient(client: IClient): void; constructor(control: T); giveInput?(input: IInput): Promise; /** * Called by client when it receives an input event for this control from the server. */ receiveInput(inputEvent: IInputEvent, participant: IParticipant): void; protected sendInput(input: K): Promise; /** * Disables this control, preventing participant interaction. */ disable(): Promise; /** * Enables this control, allowing participant interaction. */ enable(): Promise; protected updateAttribute(attribute: K, value: T[K]): Promise; /** * Merges in values from the server in response to an update operation from the server. */ onUpdate(controlData: IControlData): void; /** * Update this control on the server. */ update(controlUpdate: T2): Promise; destroy(): void; }