TeaWeb/shared/js/ui/frames/connection-handler-list/Definitions.ts

49 lines
1.3 KiB
TypeScript
Raw Normal View History

2020-09-26 01:22:21 +02:00
import {RemoteIconInfo} from "tc-shared/file/Icons";
2020-09-24 15:51:22 +02:00
export type MouseMoveCoordinates = { x: number, y: number, xOffset: number };
2020-09-24 15:51:22 +02:00
export type HandlerConnectionState = "disconnected" | "connecting" | "connected";
export type HandlerStatus = {
connectionState: HandlerConnectionState,
handlerName: string,
voiceReplaying: boolean,
2020-09-26 01:22:21 +02:00
serverIcon: RemoteIconInfo | undefined
2020-09-24 15:51:22 +02:00
}
export interface ConnectionListUIEvents {
action_set_active_handler: { handlerId: string },
action_destroy_handler: { handlerId: string },
action_scroll: { direction: "left" | "right" },
action_move_handler: {
handlerId: string | undefined,
mouse?: MouseMoveCoordinates
},
action_set_moving_position: {
offsetX: number,
width: number
},
action_swap_handler: {
handlerIdOne: string,
handlerIdTwo: string
}
2020-09-24 15:51:22 +02:00
query_handler_status: { handlerId: string },
query_handler_list: {},
notify_handler_list: {
handlerIds: string[],
activeHandlerId: string | undefined
},
notify_active_handler: {
handlerId: string
},
notify_handler_status: {
handlerId: string,
status: HandlerStatus
},
notify_scroll_status: {
left: boolean,
right: boolean
},
notify_destroy: {}
}