add interface

Signed-off-by: hungry_feiwei <huxiao31@huawei.com>
This commit is contained in:
hungry_feiwei 2022-04-25 14:33:44 +08:00
parent fbc9339773
commit 0a79751cf1
4 changed files with 70 additions and 14 deletions

View File

@ -24,10 +24,17 @@ import { AsyncCallback } from "./basic";
*/
declare namespace distributedInput {
enum InputAbility {
MOUSE = 0,
KEYBOARD = 1,
TOUCH_SCREEN = 2,
TOUCH_PAD = 3,
// 鼠标
Mouse = 0,
// 按键
Keyboard = 1,
// 触摸屏
Touchscreen = 2,
// 触摸板
Touchpad = 3,
}
/**

View File

@ -32,31 +32,75 @@ declare namespace inputDevice {
type AxisType = 'touchMajor' | 'touchMinor' | 'orientation' | 'x' | 'y' | 'pressure' | 'toolMinor' | 'touchMajor';
enum KeyboardType {
// 无按键
NONE = 0,
// 未知按键
UNKNOWN = 1,
// 字母键盘
ALPHABETIC_KEYBOARD = 2,
// 数字按键
DIGITAL_KEYBOARD = 3,
// 手写笔
HANDWRITING_PEN = 4,
// 遥控器
REMOTE_CONTROL = 5,
}
}
enum PointerStyle {
// 正常选择
NORMAL_SELECT,
// 协助选择
HELP_SELECT,
// 后台运行
WORKING_IN_BACKGROUND,
// 忙碌
BUSY,
// 精确选择
PRECISION_SELECT,
// 下一步
NEXT_SELECT,
// 手写
HANDWRITING,
// 不可用
UNAVAILABLE,
// 垂直调整
VERTICAL_RESIZE,
// 水平调整
HORIZONTAL_RESIZE,
// 正向对角线调整
DIAGONAL_RESIZE_1,
// 负向对角线调整
DIAGONAL_RESIZE_2,
// 移动
MOVE,
// 备选
ALTERNATE_SELECT,
// 链接
LINK_SELECT,
// 位置
LOCATION_SELECT,
// 人物
PERSON_SELECT,
}

View File

@ -30,7 +30,7 @@ export declare interface InputEvent {
// 上报输入事件的设备id, 整型数字,>=0 有效
deviceId: number;
// 事件发生事件
// 事件发生时间
actionTime: number;
// 目标屏幕id, 整型数字,>=0 有效

View File

@ -39,22 +39,27 @@ export declare enum Action {
export declare enum ToolType {
// 手指
FINGER = 0,
Finger = 0,
// 笔
PEN = 1,
Pen = 1,
RUBBER = 2,
// 橡皮擦
Rubber = 2,
BRUSH = 3,
// 笔刷
Brush = 3,
PENCIL = 4,
// 铅笔
Pencil = 4,
AIRBRUSH = 5,
// 气笔
Airbrush = 5,
MOUSE = 6,
// 鼠标
Mouse = 6,
LENS = 7,
Lens = 7,
}
export declare enum SourceType {