deeke-script-app 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,6 +41,151 @@ interface Console {
|
|
|
41
41
|
* @param message 堆栈追踪信息
|
|
42
42
|
*/
|
|
43
43
|
trace(...message: any[]): void;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 显示日志窗口
|
|
47
|
+
*/
|
|
48
|
+
show(): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 隐藏日志窗口
|
|
52
|
+
*/
|
|
53
|
+
hide(): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 设置日志窗口的大小
|
|
57
|
+
* @param width 窗口宽度(像素)
|
|
58
|
+
* @param height 窗口高度(像素)
|
|
59
|
+
*/
|
|
60
|
+
setWindowSize(width: number, height: number): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 设置日志窗口的位置
|
|
64
|
+
* @param x 窗口左上角X坐标(像素)
|
|
65
|
+
* @param y 窗口左上角Y坐标(像素)
|
|
66
|
+
*/
|
|
67
|
+
setWindowPosition(x: number, y: number): void;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 设置日志窗口的背景颜色
|
|
71
|
+
* @param color 颜色值(ARGB格式,如 0xFF000000 表示黑色)
|
|
72
|
+
*/
|
|
73
|
+
setBackgroundColor(color: number): void;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 设置日志文本的颜色
|
|
77
|
+
* @param color 颜色值(ARGB格式,如 0xFFFFFFFF 表示白色)
|
|
78
|
+
*/
|
|
79
|
+
setTextColor(color: number): void;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 设置日志文本的字体大小
|
|
83
|
+
* @param size 字体大小(像素)
|
|
84
|
+
*/
|
|
85
|
+
setTextSize(size: number): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 设置日志文本的行高
|
|
89
|
+
* @param lineHeight 行高(像素)
|
|
90
|
+
*/
|
|
91
|
+
setLineHeight(lineHeight: number): void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 一次性设置三个按钮的颜色(关闭按钮、拖拽按钮、调整大小按钮)
|
|
95
|
+
* @param closeColor 关闭按钮颜色(ARGB格式)
|
|
96
|
+
* @param dragColor 拖拽按钮颜色(ARGB格式)
|
|
97
|
+
* @param resizeColor 调整大小按钮颜色(ARGB格式)
|
|
98
|
+
*/
|
|
99
|
+
setButtonColors(closeColor: number, dragColor: number, resizeColor: number): void;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 设置是否允许窗口移动到顶部
|
|
103
|
+
* @param allow 是否允许移动到顶部
|
|
104
|
+
*/
|
|
105
|
+
setAllowMoveToTop(allow: boolean): void;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 设置是否允许窗口移动到底部
|
|
109
|
+
* @param allow 是否允许移动到底部
|
|
110
|
+
*/
|
|
111
|
+
setAllowMoveToBottom(allow: boolean): void;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 设置日志窗口是否可点击(穿透)
|
|
115
|
+
* @param clickable 是否可点击
|
|
116
|
+
*/
|
|
117
|
+
setClickable(clickable: boolean): void;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 检查日志窗口是否可点击
|
|
121
|
+
* @returns 是否可点击
|
|
122
|
+
*/
|
|
123
|
+
isClickable(): boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 清空日志窗口中的所有日志
|
|
127
|
+
*/
|
|
128
|
+
clearLogs(): void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 设置日志窗口显示的最大行数。超过此数量的旧日志会被自动删除。
|
|
132
|
+
* @param maxLines 最大行数
|
|
133
|
+
*/
|
|
134
|
+
setMaxLogLines(maxLines: number): void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 获取日志窗口显示的最大行数
|
|
138
|
+
* @returns 最大行数
|
|
139
|
+
*/
|
|
140
|
+
getMaxLogLines(): number;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 设置是否自动滚动到底部(当有新日志时)
|
|
144
|
+
* @param autoScroll 是否自动滚动
|
|
145
|
+
*/
|
|
146
|
+
setAutoScroll(autoScroll: boolean): void;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 一次性设置日志窗口的多个样式属性
|
|
150
|
+
* @param config 配置对象
|
|
151
|
+
*/
|
|
152
|
+
setWindowStyle(config: {
|
|
153
|
+
width?: number;
|
|
154
|
+
height?: number;
|
|
155
|
+
x?: number;
|
|
156
|
+
y?: number;
|
|
157
|
+
backgroundColor?: number;
|
|
158
|
+
textColor?: number;
|
|
159
|
+
textSize?: number;
|
|
160
|
+
lineHeight?: number;
|
|
161
|
+
closeButtonColor?: number;
|
|
162
|
+
dragButtonColor?: number;
|
|
163
|
+
resizeButtonColor?: number;
|
|
164
|
+
allowMoveToTop?: boolean;
|
|
165
|
+
allowMoveToBottom?: boolean;
|
|
166
|
+
clickable?: boolean;
|
|
167
|
+
}): void;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 获取当前日志窗口的样式配置
|
|
171
|
+
* @returns 包含所有样式配置的对象
|
|
172
|
+
*/
|
|
173
|
+
getWindowStyle(): {
|
|
174
|
+
width: number;
|
|
175
|
+
height: number;
|
|
176
|
+
x: number;
|
|
177
|
+
y: number;
|
|
178
|
+
backgroundColor: number;
|
|
179
|
+
textColor: number;
|
|
180
|
+
textSize: number;
|
|
181
|
+
lineHeight: number;
|
|
182
|
+
closeButtonColor: number;
|
|
183
|
+
dragButtonColor: number;
|
|
184
|
+
resizeButtonColor: number;
|
|
185
|
+
allowMoveToTop: boolean;
|
|
186
|
+
allowMoveToBottom: boolean;
|
|
187
|
+
clickable: boolean;
|
|
188
|
+
};
|
|
44
189
|
}
|
|
45
190
|
|
|
46
191
|
export { };
|
|
@@ -226,6 +226,26 @@ interface Device {
|
|
|
226
226
|
time: number;
|
|
227
227
|
provider: string;
|
|
228
228
|
} | null;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* 获取状态栏高度(像素)
|
|
232
|
+
*
|
|
233
|
+
* 状态栏是屏幕顶部显示时间、电池、信号等信息的区域。
|
|
234
|
+
* 如果获取失败返回0。
|
|
235
|
+
*
|
|
236
|
+
* @returns 状态栏高度(像素)
|
|
237
|
+
*/
|
|
238
|
+
public getStatusBarHeight(): number;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* 获取底部虚拟按钮(导航栏)高度(像素)
|
|
242
|
+
*
|
|
243
|
+
* 导航栏是屏幕底部显示返回、主页、最近任务等虚拟按钮的区域。
|
|
244
|
+
* 如果导航栏隐藏了或获取失败返回0。
|
|
245
|
+
*
|
|
246
|
+
* @returns 导航栏高度(像素),如果隐藏或获取失败返回0
|
|
247
|
+
*/
|
|
248
|
+
public getNavigationBarHeight(): number;
|
|
229
249
|
}
|
|
230
250
|
|
|
231
251
|
export { };
|
package/deekeScript.json
CHANGED