@compass-framework/core 1.2.56 → 1.2.57
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.
- package/@types/AbsoluteLayout.d.ts +6 -0
- package/@types/AccelerateDecelerateInterpolator.d.ts +3 -0
- package/@types/AccelerateInterpolator.d.ts +3 -0
- package/@types/Adapter.d.ts +6 -0
- package/@types/AlphaAnimation.d.ts +6 -1
- package/@types/Animation.d.ts +15 -2
- package/@types/AnimationSet.d.ts +5 -1
- package/@types/Animator.d.ts +12 -0
- package/@types/Application.d.ts +49 -11
- package/@types/ApplicationWindow.d.ts +9 -5
- package/@types/ArrayAdapter.d.ts +3 -0
- package/@types/Assets.d.ts +3 -0
- package/@types/AttributeSet.d.ts +5 -2
- package/@types/BaseAdapter.d.ts +3 -0
- package/@types/BlendMode.ts +150 -0
- package/@types/BounceInterpolator.d.ts +3 -0
- package/@types/Button.d.ts +3 -0
- package/@types/Canvas.d.ts +46 -60
- package/@types/Color.d.ts +40 -30
- package/@types/ColorDrawable.d.ts +5 -1
- package/@types/ColorFilter.ts +15 -0
- package/@types/Configuration.d.ts +3 -0
- package/@types/Context.d.ts +21 -3
- package/@types/ContextUtils.d.ts +3 -0
- package/@types/CornerPathEffect.d.ts +26 -0
- package/@types/CornersDrawable.d.ts +15 -6
- package/@types/CycleInterpolator.d.ts +3 -0
- package/@types/DecelerateInterpolator.d.ts +3 -0
- package/@types/DisplayMetrics.d.ts +3 -0
- package/@types/DoubleClick.d.ts +3 -0
- package/@types/DoubleClickListener.d.ts +6 -0
- package/@types/Drawable.d.ts +20 -5
- package/@types/EditRichText.d.ts +3 -0
- package/@types/EditText.d.ts +3 -0
- package/@types/Editable.d.ts +6 -0
- package/@types/Environment.ts +3 -0
- package/@types/FrameLayout.d.ts +8 -2
- package/@types/FreezeAbsoluteLayout.d.ts +6 -0
- package/@types/FreezeLayoutViewGroup.d.ts +3 -0
- package/@types/Gravity.d.ts +3 -0
- package/@types/GridLayout.d.ts +6 -0
- package/@types/GridLayoutAnimationController.d.ts +3 -0
- package/@types/GridView.d.ts +3 -0
- package/@types/HorizontalScrollView.ts +3 -0
- package/@types/Image.d.ts +28 -0
- package/@types/ImageDrawable.ts +43 -0
- package/@types/ImageFilter.ts +13 -0
- package/@types/ImageView.d.ts +9 -0
- package/@types/InputMethodService.d.ts +6 -0
- package/@types/Interpolator.d.ts +6 -0
- package/@types/KeyEvent.d.ts +3 -0
- package/@types/LayerDrawable.d.ts +6 -2
- package/@types/LayoutAnimationController.d.ts +9 -0
- package/@types/LayoutInflater.ts +3 -0
- package/@types/LinearGradient.d.ts +22 -2
- package/@types/LinearGradientDrawable.d.ts +3 -0
- package/@types/LinearInterpolator.d.ts +3 -0
- package/@types/LinearLayout.d.ts +6 -0
- package/@types/ListAdapter.d.ts +6 -0
- package/@types/ListView.d.ts +3 -0
- package/@types/Matrix.d.ts +110 -53
- package/@types/MotionEvent.d.ts +9 -0
- package/@types/{ICursor.d.ts → MouseCursor.ts} +18 -7
- package/@types/Outline.d.ts +6 -2
- package/@types/Paint.d.ts +141 -76
- package/@types/Path.d.ts +86 -44
- package/@types/PathEffect.ts +7 -1
- package/@types/Picture.d.ts +24 -15
- package/@types/PictureDrawable.d.ts +7 -5
- package/@types/PixelFormat.ts +3 -0
- package/@types/PopupWindow.d.ts +9 -6
- package/@types/PropertyValuesHolder.d.ts +3 -0
- package/@types/Rect.d.ts +66 -43
- package/@types/RelativeLayout.d.ts +6 -0
- package/@types/RendererBackend.ts +8 -0
- package/@types/Resolver.ts +7 -2
- package/@types/Resources.d.ts +3 -0
- package/@types/ResourcesInflater.d.ts +3 -0
- package/@types/RotateAnimation.d.ts +7 -3
- package/@types/ScaleAnimation.d.ts +7 -3
- package/@types/ScrollView.d.ts +3 -0
- package/@types/Shader.d.ts +15 -1
- package/@types/Shadow.d.ts +32 -6
- package/@types/Slot.d.ts +9 -0
- package/@types/Surface.d.ts +32 -0
- package/@types/SurfaceProvider.d.ts +25 -0
- package/@types/TabBarLayout.d.ts +12 -0
- package/@types/TableLayout.d.ts +6 -0
- package/@types/TableRow.d.ts +6 -0
- package/@types/TextView.d.ts +3 -0
- package/@types/Theme.d.ts +9 -0
- package/@types/TimeInterpolator.d.ts +6 -0
- package/@types/Transformation.d.ts +6 -0
- package/@types/TranslateAnimation.d.ts +6 -2
- package/@types/TypeEvaluator.d.ts +3 -0
- package/@types/Typeface.d.ts +21 -3
- package/@types/TypefaceFactory.d.ts +40 -4
- package/@types/ValueAnimator.d.ts +12 -0
- package/@types/View.d.ts +66 -0
- package/@types/ViewGroup.d.ts +9 -0
- package/@types/ViewGroupOverlay.d.ts +3 -0
- package/@types/ViewOutlineProvider.d.ts +3 -0
- package/@types/ViewOverlay.d.ts +3 -0
- package/@types/ViewParent.d.ts +6 -0
- package/@types/ViewSlot.d.ts +3 -0
- package/@types/ViewTreeObserver.d.ts +27 -0
- package/@types/{IWindow.d.ts → Window.d.ts} +10 -4
- package/@types/WindowManager.d.ts +14 -6
- package/@types/XMLLayoutParser.d.ts +3 -0
- package/@types/XMLResourcesParser.d.ts +3 -0
- package/@types/XMLViewFactoryRegistry.d.ts +18 -0
- package/index.d.ts +111 -113
- package/package.json +2 -2
- package/@types/ApplicationBoot.ts +0 -10
- package/@types/ApplicationContext.d.ts +0 -3
- package/@types/ApplicationFrame.d.ts +0 -33
- package/@types/ApplicationFrameContext.ts +0 -5
- package/@types/ApplicationFrameObserver.d.ts +0 -17
- package/@types/ApplicationFrameSettings.ts +0 -5
- package/@types/ApplicationManifest.d.ts +0 -5
- package/@types/Bitmap.d.ts +0 -7
- package/@types/BitmapDrawable.d.ts +0 -31
- package/@types/CornerPathEffect.ts +0 -7
- package/@types/InputMethodServer.ts +0 -1
- package/@types/Readying.ts +0 -3
- package/@types/StackLayout.d.ts +0 -9
- package/@types/WindowContext.d.ts +0 -9
|
@@ -2,11 +2,15 @@ import { Implements, Runnable } from "@compass-framework/library";
|
|
|
2
2
|
import { Drawable } from "./Drawable";
|
|
3
3
|
import { Canvas } from "./Canvas";
|
|
4
4
|
import { Resources } from "./Resources";
|
|
5
|
+
import { Context } from "./Context";
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* 图层 Drawable,按顺序叠加绘制多个子 Drawable。
|
|
9
|
+
*/
|
|
6
10
|
@Implements(Drawable.Callback)
|
|
7
11
|
export declare class LayerDrawable extends Drawable implements Drawable.Callback {
|
|
8
|
-
public constructor();
|
|
9
|
-
public constructor(layers: Drawable[]);
|
|
12
|
+
public constructor(context: Context);
|
|
13
|
+
public constructor(context: Context, layers: Drawable[]);
|
|
10
14
|
|
|
11
15
|
public addLayer(layer: Drawable): void;
|
|
12
16
|
|
|
@@ -3,6 +3,9 @@ import { Context } from "./Context";
|
|
|
3
3
|
import { View } from "./View";
|
|
4
4
|
import { Interpolator } from "./Interpolator";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* 布局动画控制器,使子视图按序播放动画。
|
|
8
|
+
*/
|
|
6
9
|
export declare class LayoutAnimationController {
|
|
7
10
|
public static ORDER_NORMAL: number;
|
|
8
11
|
public static ORDER_REVERSE: number;
|
|
@@ -43,7 +46,13 @@ export declare class LayoutAnimationController {
|
|
|
43
46
|
public getTransformedIndex(params: LayoutAnimationController.AnimationParameters): number;
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
/**
|
|
50
|
+
* 布局动画控制器相关类型。
|
|
51
|
+
*/
|
|
46
52
|
export declare namespace LayoutAnimationController {
|
|
53
|
+
/**
|
|
54
|
+
* 布局动画参数。
|
|
55
|
+
*/
|
|
47
56
|
export class AnimationParameters {
|
|
48
57
|
public count: number;
|
|
49
58
|
public index: number;
|
package/@types/LayoutInflater.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { Context } from "./Context";
|
|
|
3
3
|
import { View } from "./View";
|
|
4
4
|
import { ViewGroup } from "./ViewGroup";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* 布局填充器,将 XML 布局膨胀为视图树。
|
|
8
|
+
*/
|
|
6
9
|
export declare class LayoutInflater {
|
|
7
10
|
public static from(context: Context, record?: Record<string, any>): LayoutInflater;
|
|
8
11
|
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
1
2
|
import { Shader } from "./Shader";
|
|
3
|
+
import { Context } from "./Context";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 线性渐变着色器。
|
|
7
|
+
*/
|
|
8
|
+
export interface LinearGradient extends Shader {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* LinearGradient 接口的实现基类。
|
|
14
|
+
*/
|
|
15
|
+
export abstract class LinearGradient extends InterfaceTemplate {}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* LinearGradient 工厂方法。
|
|
19
|
+
*/
|
|
20
|
+
export namespace LinearGradient {
|
|
21
|
+
/**
|
|
22
|
+
* 创建线性渐变着色器。
|
|
23
|
+
*/
|
|
24
|
+
export function create(context: Context, x0: number, y0: number, x1: number, y1: number, colors: number[], positions: number[]): LinearGradient;
|
|
5
25
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Canvas } from "./Canvas";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 线性渐变 Drawable,按角度或方向填充渐变色。
|
|
5
|
+
*/
|
|
3
6
|
export declare class LinearGradientDrawable {
|
|
4
7
|
public static MakeAngle(deg: number, colors: number[]): LinearGradientDrawable;
|
|
5
8
|
public static MakeAngle(deg: number, colors: number[], radius: number): LinearGradientDrawable;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Implements } from "@compass-framework/library";
|
|
2
2
|
import { Interpolator } from "./Interpolator";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 线性插值器。
|
|
6
|
+
*/
|
|
4
7
|
@Implements(Interpolator)
|
|
5
8
|
export declare class LinearInterpolator implements Interpolator {
|
|
6
9
|
public getInterpolation(input: number): number;
|
package/@types/LinearLayout.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 线性布局,按水平或垂直方向依次排列子视图。
|
|
5
|
+
*/
|
|
3
6
|
export declare class LinearLayout extends ViewGroup {
|
|
4
7
|
public static HORIZONTAL: number;
|
|
5
8
|
public static VERTICAL: number;
|
|
@@ -10,5 +13,8 @@ export declare class LinearLayout extends ViewGroup {
|
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export declare namespace LinearLayout {
|
|
16
|
+
/**
|
|
17
|
+
* LinearLayout 的布局参数。
|
|
18
|
+
*/
|
|
13
19
|
export class LayoutParams extends ViewGroup.MarginLayoutParams {}
|
|
14
20
|
}
|
package/@types/ListAdapter.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { Implements, InterfaceTemplate } from "@compass-framework/library";
|
|
2
2
|
import { Adapter } from "./Adapter";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 列表适配器接口,扩展 Adapter 供 ListView/GridView 使用。
|
|
6
|
+
*/
|
|
4
7
|
export declare interface ListAdapter extends Adapter {
|
|
5
8
|
|
|
6
9
|
}
|
|
7
10
|
|
|
11
|
+
/**
|
|
12
|
+
* ListAdapter 的接口模板实现。
|
|
13
|
+
*/
|
|
8
14
|
@Implements(Adapter)
|
|
9
15
|
export class ListAdapter extends InterfaceTemplate {
|
|
10
16
|
|
package/@types/ListView.d.ts
CHANGED
package/@types/Matrix.d.ts
CHANGED
|
@@ -1,81 +1,138 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
1
2
|
import { Rect } from "./Rect";
|
|
3
|
+
import { Context } from "./Context";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
public static MSCALE_Y: number;
|
|
9
|
-
public static MTRANS_Y: number;
|
|
10
|
-
public static MPERSP_0: number;
|
|
11
|
-
public static MPERSP_1: number;
|
|
12
|
-
public static MPERSP_2: number;
|
|
5
|
+
/**
|
|
6
|
+
* 二维变换矩阵,用于平移、缩放、旋转等几何变换。
|
|
7
|
+
*/
|
|
8
|
+
export interface Matrix {
|
|
9
|
+
setTranslate(dx: number, dy: number): void
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
mapPoints(pts: number[][]): void;
|
|
12
|
+
mapPoints(dst: number[][], src: number[][]): void;
|
|
13
|
+
mapPoints(dst: number[][], dstIndex: number, src: number[][], srcIndex: number, pointCount: number): void;
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
mapVectors(vecs: number[][]): void;
|
|
16
|
+
mapVectors(vecs: number[][], count: number): void;
|
|
17
|
+
mapVectors(dst: number[][], src: number[][]): void;
|
|
18
|
+
mapVectors(dst: number[][], dstIndex: number, src: number[][], srcIndex: number, vectorCount: number): void;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
setScale(sx: number, sy: number): void;
|
|
21
|
+
setScale(sx: number, sy: number, px: number, py: number): void;
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
setRotate(degrees: number): void;
|
|
24
|
+
setRotate(degrees: number, px: number, py: number): void;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
setSinCos(sinValue: number, cosValue: number): void;
|
|
27
|
+
setSinCos(sinValue: number, cosValue: number, px: number, py: number): void;
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
setSkew(kx: number, ky: number): void;
|
|
30
|
+
setSkew(kx: number, ky: number, px: number, py: number): void;
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
public setSinCos(sinValue: number, cosValue: number): void;
|
|
32
|
+
setConcat(a: Matrix, b: Matrix): void
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
public setSkew(kx: number, ky: number): void;
|
|
34
|
+
preTranslate(dx: number, dy: number): void
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
preScale(sx: number, sy: number): void;
|
|
37
|
+
preScale(sx: number, sy: number, px: number, py: number): void;
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
preRotate(degrees: number): void;
|
|
40
|
+
preRotate(degrees: number, px: number, py: number): void;
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
preSkew(kx: number, ky: number): void;
|
|
43
|
+
preSkew(kx: number, ky: number, px: number, py: number): void;
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
public preRotate(degrees: number): void;
|
|
45
|
+
preConcat(other: Matrix): number
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
public preSkew(kx: number, ky: number): void;
|
|
47
|
+
postTranslate(dx: number, dy: number): void
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
postScale(sx: number, sy: number): void;
|
|
50
|
+
postScale(sx: number, sy: number, px: number, py: number): void;
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
postRotate(degrees: number): void;
|
|
53
|
+
postRotate(degrees: number, px: number, py: number): void;
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
public postScale(sx: number, sy: number): void;
|
|
55
|
+
rectStaysRect(): boolean
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
public postRotate(degrees: number): void;
|
|
57
|
+
hasPerspective(): boolean
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
public postSkew(kx: number, ky: number): void;
|
|
59
|
+
isIdentity(): boolean
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
set(src: Matrix): void;
|
|
62
|
+
set(index: number, value: number): void;
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
public mapRect(dst: Rect, src: Rect): void;
|
|
64
|
+
reset(): void
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
public getValues(accept: number[], index: number, count: number): number[];
|
|
66
|
+
postSkew(kx: number, ky: number): void;
|
|
67
|
+
postSkew(kx: number, ky: number, px: number, py: number): void;
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
mapXY(x: number, y: number, point: number[]): void;
|
|
70
|
+
|
|
71
|
+
postConcat(other: Matrix): number
|
|
72
|
+
|
|
73
|
+
invert(inverse: Matrix): void
|
|
74
|
+
|
|
75
|
+
mapRect(rect: Rect): void;
|
|
76
|
+
mapRect(dst: Rect, src: Rect): void;
|
|
77
|
+
|
|
78
|
+
mapRadius(radius: number): number
|
|
79
|
+
|
|
80
|
+
getValues(accept: number[]): number[];
|
|
81
|
+
getValues(accept: number[], index: number): number[];
|
|
82
|
+
getValues(accept: number[], index: number, count: number): number[];
|
|
83
|
+
|
|
84
|
+
setValues(values: number[]): void
|
|
85
|
+
|
|
86
|
+
setRectToRect(src: Rect, dst: Rect, stf: Matrix.ScaleToFit): boolean
|
|
87
|
+
|
|
88
|
+
setPolyToPoly(src: number[][], srcIndex: number, dst: number[][], dstIndex: number, pointCount: number): boolean
|
|
89
|
+
|
|
90
|
+
dispose(): void
|
|
91
|
+
|
|
92
|
+
equals(target: Matrix): boolean
|
|
72
93
|
}
|
|
73
94
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Matrix 接口的实现基类。
|
|
97
|
+
*/
|
|
98
|
+
export abstract class Matrix extends InterfaceTemplate {}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Matrix 相关常量、类型与工厂方法。
|
|
102
|
+
*/
|
|
103
|
+
export namespace Matrix {
|
|
104
|
+
export const MSCALE_X: number;
|
|
105
|
+
export const MSKEW_X: number;
|
|
106
|
+
export const MTRANS_X: number;
|
|
107
|
+
export const MSKEW_Y: number;
|
|
108
|
+
export const MSCALE_Y: number;
|
|
109
|
+
export const MTRANS_Y: number;
|
|
110
|
+
export const MPERSP_0: number;
|
|
111
|
+
export const MPERSP_1: number;
|
|
112
|
+
export const MPERSP_2: number;
|
|
113
|
+
|
|
114
|
+
export const CHANGE_MSCALE_X: number;
|
|
115
|
+
export const CHANGE_MSKEW_X: number;
|
|
116
|
+
export const CHANGE_MTRANS_X: number;
|
|
117
|
+
export const CHANGE_MSKEW_Y: number;
|
|
118
|
+
export const CHANGE_MSCALE_Y: number;
|
|
119
|
+
export const CHANGE_MTRANS_Y: number;
|
|
120
|
+
export const CHANGE_MPERSP_0: number;
|
|
121
|
+
export const CHANGE_MPERSP_1: number;
|
|
122
|
+
export const CHANGE_MPERSP_2: number;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* 矩形到矩形的缩放适配方式。
|
|
126
|
+
*/
|
|
127
|
+
export enum ScaleToFit {
|
|
128
|
+
FILL,
|
|
129
|
+
START,
|
|
130
|
+
CENTER,
|
|
131
|
+
END,
|
|
80
132
|
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 创建 Matrix 实例。
|
|
136
|
+
*/
|
|
137
|
+
export function create(context: Context): Matrix;
|
|
81
138
|
}
|
package/@types/MotionEvent.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 触摸/指针运动事件及动作常量。
|
|
3
|
+
*/
|
|
1
4
|
export declare class MotionEvent {
|
|
2
5
|
public static ACTION_DOWN: number;
|
|
3
6
|
public static ACTION_MOVE: number;
|
|
@@ -51,7 +54,13 @@ export declare class MotionEvent {
|
|
|
51
54
|
public getPointerCoords(pointerIndex: number, outPointerCoords: MotionEvent.PointerCoords): void;
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
/**
|
|
58
|
+
* MotionEvent 相关类型定义。
|
|
59
|
+
*/
|
|
54
60
|
export declare namespace MotionEvent {
|
|
61
|
+
/**
|
|
62
|
+
* 指针坐标信息。
|
|
63
|
+
*/
|
|
55
64
|
export class PointerCoords {
|
|
56
65
|
public x: number;
|
|
57
66
|
public y: number;
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { View } from "./View";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 鼠标光标控制,支持锁定、悬停与重置。
|
|
5
|
+
*/
|
|
6
|
+
export declare interface MouseCursor {
|
|
7
|
+
lock(view: View, type: MouseCursor.MODE): void;
|
|
8
|
+
|
|
9
|
+
unlock(view: View): void;
|
|
5
10
|
|
|
6
|
-
|
|
11
|
+
reset(): void
|
|
7
12
|
|
|
8
|
-
|
|
13
|
+
hover(view: View, event: number, type?: MouseCursor.MODE): void;
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
isLock(): boolean;
|
|
11
16
|
}
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
/**
|
|
19
|
+
* MouseCursor 相关类型定义。
|
|
20
|
+
*/
|
|
21
|
+
export declare namespace MouseCursor {
|
|
22
|
+
/**
|
|
23
|
+
* 鼠标光标样式枚举。
|
|
24
|
+
*/
|
|
25
|
+
export enum MODE {
|
|
15
26
|
DEFAULT = 'default',
|
|
16
27
|
AUTO = 'auto',
|
|
17
28
|
HAND = 'hand',
|
package/@types/Outline.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Rect } from "./Rect";
|
|
2
|
+
import { Context } from "./Context";
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 轮廓,用于描述视图或 Drawable 的外形边界。
|
|
6
|
+
*/
|
|
3
7
|
export declare class Outline {
|
|
4
|
-
public constructor();
|
|
5
|
-
public constructor(src: Outline);
|
|
8
|
+
public constructor(context: Context);
|
|
9
|
+
public constructor(context: Context, src: Outline);
|
|
6
10
|
|
|
7
11
|
public setRect(rect:Rect): void;
|
|
8
12
|
public setRect(left:number, top:number, right:number, bottom:number): void;
|