@compass-framework/core 1.2.56 → 1.2.58
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 +50 -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
package/@types/Color.d.ts
CHANGED
|
@@ -1,46 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
public static LTGRAY: number;
|
|
6
|
-
public static WHITE: number;
|
|
7
|
-
public static RED: number;
|
|
8
|
-
public static GREEN: number;
|
|
9
|
-
public static BLUE: number;
|
|
10
|
-
public static YELLOW: number;
|
|
11
|
-
public static CYAN: number;
|
|
12
|
-
public static MAGENTA: number;
|
|
13
|
-
public static TRANSPARENT: number;
|
|
1
|
+
/**
|
|
2
|
+
* 颜色工具接口占位。
|
|
3
|
+
*/
|
|
4
|
+
export interface Color {
|
|
14
5
|
|
|
15
|
-
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 颜色常量与 ARGB/HSV 等颜色工具方法。
|
|
10
|
+
*/
|
|
11
|
+
export declare namespace Color {
|
|
12
|
+
export const BLACK: number;
|
|
13
|
+
export const DKGRAY: number;
|
|
14
|
+
export const GRAY: number;
|
|
15
|
+
export const LTGRAY: number;
|
|
16
|
+
export const WHITE: number;
|
|
17
|
+
export const RED: number;
|
|
18
|
+
export const GREEN: number;
|
|
19
|
+
export const BLUE: number;
|
|
20
|
+
export const TRANSPARENT: number;
|
|
21
|
+
export const YELLOW: number;
|
|
22
|
+
export const CYAN: number;
|
|
23
|
+
export const MAGENTA: number;
|
|
24
|
+
|
|
25
|
+
export function alpha(color: number): number;
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
export function red(color: number): number;
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
export function green(color: number): number;
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
export function blue(color: number): number;
|
|
22
32
|
|
|
23
|
-
|
|
33
|
+
export function argb(alpha: number, red: number, green: number, blue: number);
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
export function hue(color: number): number;
|
|
26
36
|
|
|
27
|
-
|
|
37
|
+
export function rgb(red: number, green: number, blue: number);
|
|
28
38
|
|
|
29
|
-
|
|
39
|
+
export function pin(value: number): number;
|
|
30
40
|
|
|
31
|
-
|
|
41
|
+
export function rgbaString(color: number): string;
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
export function rgbString(color: number): string;
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
export function parseColor(colorString: string, colorType?: 'rgba' | 'argb'): number;
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
export function saturation(color: number): number;
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
export function brightness(color: number): number;
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
51
|
+
export function HSBtoColor(hsb: number[]): number;
|
|
52
|
+
export function HSBtoColor(h: number, s: number, b: number): number;
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
export function HSVToColor(hsv: number[]): number;
|
|
55
|
+
export function HSVToColor(alpha: number, hsv: number[]): number;
|
|
46
56
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Drawable } from "./Drawable";
|
|
2
2
|
import { Canvas } from "./Canvas";
|
|
3
|
+
import { Context } from "./Context";
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 纯色 Drawable,用单一颜色填充自身边界。
|
|
7
|
+
*/
|
|
4
8
|
export declare class ColorDrawable extends Drawable {
|
|
5
|
-
public constructor(color: number);
|
|
9
|
+
public constructor(context: Context, color: number);
|
|
6
10
|
|
|
7
11
|
public draw(canvas: Canvas): void;
|
|
8
12
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 颜色滤镜,用于改变绘制内容的颜色表现。
|
|
5
|
+
*/
|
|
6
|
+
export interface ColorFilter {
|
|
7
|
+
dispose(): void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ColorFilter 接口的实现基类。
|
|
12
|
+
*/
|
|
13
|
+
export abstract class ColorFilter extends InterfaceTemplate {
|
|
14
|
+
|
|
15
|
+
}
|
package/@types/Context.d.ts
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import { Environment } from "./Environment";
|
|
2
2
|
import { Resources } from "./Resources";
|
|
3
3
|
import { XMLViewFactoryRegistry } from "./XMLViewFactoryRegistry";
|
|
4
|
+
import { DisplayMetrics } from "./DisplayMetrics";
|
|
5
|
+
import { MouseCursor } from "./MouseCursor";
|
|
6
|
+
import { RendererBackend } from "./RendererBackend";
|
|
7
|
+
import { WindowManager } from "./WindowManager";
|
|
8
|
+
import { SurfaceProvider } from "./SurfaceProvider";
|
|
4
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 全局运行时上下文,提供资源、环境与窗口管理等服务。
|
|
12
|
+
*/
|
|
5
13
|
export declare interface Context {
|
|
6
|
-
|
|
14
|
+
getDisplayMetrics(): DisplayMetrics
|
|
7
15
|
|
|
8
|
-
|
|
16
|
+
getMouseCursor(): MouseCursor
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
getRendererBackend(): RendererBackend
|
|
19
|
+
|
|
20
|
+
getResources(): Resources
|
|
21
|
+
|
|
22
|
+
getSurfaceProvider(): SurfaceProvider
|
|
23
|
+
|
|
24
|
+
getViewFactoryRegistry() :XMLViewFactoryRegistry
|
|
25
|
+
|
|
26
|
+
getEnvironment(): Environment
|
|
27
|
+
|
|
28
|
+
getWindowManager(): WindowManager
|
|
11
29
|
}
|
package/@types/ContextUtils.d.ts
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Implements, InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
import { Context } from "./Context";
|
|
3
|
+
import { PathEffect } from "./PathEffect";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 圆角路径效果,将路径尖角平滑为圆角。
|
|
7
|
+
*/
|
|
8
|
+
export declare interface CornerPathEffect extends PathEffect {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* CornerPathEffect 接口的实现基类。
|
|
14
|
+
*/
|
|
15
|
+
@Implements(PathEffect)
|
|
16
|
+
export class CornerPathEffect extends InterfaceTemplate {}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* CornerPathEffect 工厂方法。
|
|
20
|
+
*/
|
|
21
|
+
export namespace CornerPathEffect {
|
|
22
|
+
/**
|
|
23
|
+
* 创建指定圆角半径的 CornerPathEffect。
|
|
24
|
+
*/
|
|
25
|
+
export function create(context: Context, radius: number): CornerPathEffect;
|
|
26
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Drawable } from "./Drawable";
|
|
2
2
|
import { Canvas } from "./Canvas";
|
|
3
|
-
import {
|
|
3
|
+
import { Context } from "./Context";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 圆角矩形 Drawable,支持填充色与描边。
|
|
7
|
+
*/
|
|
5
8
|
export declare class CornersDrawable extends Drawable {
|
|
6
|
-
public constructor(info: CornersDrawable.CornersInfo
|
|
9
|
+
public constructor(context: Context, info: CornersDrawable.CornersInfo);
|
|
7
10
|
|
|
8
11
|
public draw(canvas: Canvas): void;
|
|
9
12
|
|
|
@@ -11,12 +14,14 @@ export declare class CornersDrawable extends Drawable {
|
|
|
11
14
|
|
|
12
15
|
public getLeftTopRadius(): number;
|
|
13
16
|
|
|
14
|
-
public getRightTopRadius(): number;
|
|
15
|
-
|
|
16
17
|
public getRightBottomRadius(): number;
|
|
17
18
|
|
|
19
|
+
public getRightTopRadius(): number;
|
|
20
|
+
|
|
18
21
|
public getOpacity(): number;
|
|
19
22
|
|
|
23
|
+
public setBorderStrokeWidth(strokeWidth: number): void;
|
|
24
|
+
|
|
20
25
|
public setCornersRadius(radius: number): void;
|
|
21
26
|
|
|
22
27
|
public setAlpha(alpha: number): void;
|
|
@@ -25,8 +30,6 @@ export declare class CornersDrawable extends Drawable {
|
|
|
25
30
|
|
|
26
31
|
public setBackgroundColor(color: number): void;
|
|
27
32
|
|
|
28
|
-
public setBorderStrokeWidth(strokeWidth: number): void;
|
|
29
|
-
|
|
30
33
|
public setLeftBottomRadius(radius: number): void;
|
|
31
34
|
|
|
32
35
|
public setLeftTopRadius(radius: number): void;
|
|
@@ -36,7 +39,13 @@ export declare class CornersDrawable extends Drawable {
|
|
|
36
39
|
public setRightBottomRadius(radius: number): void;
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
/**
|
|
43
|
+
* CornersDrawable 相关配置类型。
|
|
44
|
+
*/
|
|
39
45
|
export namespace CornersDrawable {
|
|
46
|
+
/**
|
|
47
|
+
* 圆角、边框与背景色配置。
|
|
48
|
+
*/
|
|
40
49
|
export interface CornersInfo {
|
|
41
50
|
leftTopRadius?: number,
|
|
42
51
|
leftBottomRadius?: number,
|
package/@types/DoubleClick.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { DoubleClickListener } from "./DoubleClickListener";
|
|
|
3
3
|
import { View } from "./View";
|
|
4
4
|
import { MotionEvent } from "./MotionEvent";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* 双击手势识别器,将触摸事件转换为单击/双击回调。
|
|
8
|
+
*/
|
|
6
9
|
@Implements(View.OnTouchListener)
|
|
7
10
|
export declare class DoubleClick implements View.OnTouchListener {
|
|
8
11
|
public constructor(doubleClickListener: DoubleClickListener, timeDifference?: number);
|
|
@@ -2,6 +2,9 @@ import { InterfaceTemplate } from "@compass-framework/library";
|
|
|
2
2
|
import { View } from "./View";
|
|
3
3
|
import { MotionEvent } from "./MotionEvent";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 双击监听器,处理单击、双击与指针触摸回调。
|
|
7
|
+
*/
|
|
5
8
|
export declare interface DoubleClickListener {
|
|
6
9
|
onSingleClick(event: MotionEvent, view: View): void;
|
|
7
10
|
|
|
@@ -10,4 +13,7 @@ export declare interface DoubleClickListener {
|
|
|
10
13
|
onTouchPointer(event: MotionEvent, view: View): boolean;
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
/**
|
|
17
|
+
* DoubleClickListener 的接口模板实现。
|
|
18
|
+
*/
|
|
13
19
|
export class DoubleClickListener extends InterfaceTemplate {}
|
package/@types/Drawable.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { InterfaceTemplate, Runnable } from "@compass-framework/library";
|
|
2
|
-
import {
|
|
2
|
+
import { Resources } from "./Resources";
|
|
3
3
|
import { Canvas } from "./Canvas";
|
|
4
|
-
import { Configuration } from "./Configuration";
|
|
5
4
|
import { Outline } from "./Outline";
|
|
6
|
-
import {
|
|
5
|
+
import { Rect } from "./Rect";
|
|
6
|
+
import { Configuration } from "./Configuration";
|
|
7
|
+
import { Context } from "./Context";
|
|
7
8
|
import { DisplayMetrics } from "./DisplayMetrics";
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 可绘制对象的基类,封装边界、透明度与绘制回调。
|
|
12
|
+
*/
|
|
9
13
|
export declare abstract class Drawable {
|
|
10
|
-
protected constructor();
|
|
11
|
-
protected constructor(drawable: Drawable);
|
|
14
|
+
protected constructor(context: Context);
|
|
12
15
|
|
|
13
16
|
public abstract draw(canvas: Canvas): void;
|
|
14
17
|
|
|
@@ -47,7 +50,13 @@ export declare abstract class Drawable {
|
|
|
47
50
|
public setCallback(callback: Drawable.Callback): void;
|
|
48
51
|
}
|
|
49
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Drawable 相关嵌套类型。
|
|
55
|
+
*/
|
|
50
56
|
export declare namespace Drawable {
|
|
57
|
+
/**
|
|
58
|
+
* Drawable 的不可变常量状态,用于创建新实例。
|
|
59
|
+
*/
|
|
51
60
|
export abstract class ConstantState {
|
|
52
61
|
public abstract newDrawable(): Drawable;
|
|
53
62
|
|
|
@@ -56,6 +65,9 @@ export declare namespace Drawable {
|
|
|
56
65
|
public abstract getChangingConfigurations(): number;
|
|
57
66
|
}
|
|
58
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Drawable 失效与调度回调接口。
|
|
70
|
+
*/
|
|
59
71
|
export interface Callback {
|
|
60
72
|
invalidateDrawable(who:Drawable): void
|
|
61
73
|
|
|
@@ -66,6 +78,9 @@ export declare namespace Drawable {
|
|
|
66
78
|
getResources(): Resources;
|
|
67
79
|
}
|
|
68
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Callback 接口的实现基类。
|
|
83
|
+
*/
|
|
69
84
|
export class Callback extends InterfaceTemplate {
|
|
70
85
|
|
|
71
86
|
}
|
package/@types/EditRichText.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { Context } from "./Context";
|
|
|
3
3
|
import { AttributeSet } from "./AttributeSet";
|
|
4
4
|
import { View } from "./View";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* 富文本编辑器,支持 HTML 互转与选区样式操作。
|
|
8
|
+
*/
|
|
6
9
|
export class EditRichText extends FrameLayout {
|
|
7
10
|
public static TEXT_DECORATION_UNDERLINE: number;
|
|
8
11
|
public static TEXT_DECORATION_DOUBLE: number;
|
package/@types/EditText.d.ts
CHANGED
package/@types/Editable.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { CharSequence, Implements, InterfaceTemplate } from "@compass-framework/library";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 可编辑字符序列,表示可变文本内容。
|
|
5
|
+
*/
|
|
3
6
|
export declare interface Editable extends CharSequence {
|
|
4
7
|
|
|
5
8
|
}
|
|
6
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Editable 的接口模板实现。
|
|
12
|
+
*/
|
|
7
13
|
@Implements(CharSequence)
|
|
8
14
|
export class Editable extends InterfaceTemplate {
|
|
9
15
|
|
package/@types/Environment.ts
CHANGED
package/@types/FrameLayout.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 帧布局,子视图按添加顺序叠放,可通过 gravity 对齐。
|
|
5
|
+
*/
|
|
3
6
|
export declare class FrameLayout extends ViewGroup {}
|
|
4
7
|
|
|
5
8
|
export declare namespace FrameLayout {
|
|
9
|
+
/**
|
|
10
|
+
* FrameLayout 的布局参数,支持 gravity 对齐。
|
|
11
|
+
*/
|
|
6
12
|
export class LayoutParams extends ViewGroup.MarginLayoutParams {
|
|
7
|
-
public getGravity(): number
|
|
13
|
+
public getGravity(): number;
|
|
8
14
|
|
|
9
|
-
public setGravity(gravity: number): void
|
|
15
|
+
public setGravity(gravity: number): void;
|
|
10
16
|
}
|
|
11
17
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { FreezeLayoutViewGroup } from "./FreezeLayoutViewGroup";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 支持冻结区域的绝对定位布局。
|
|
5
|
+
*/
|
|
3
6
|
export declare class FreezeAbsoluteLayout extends FreezeLayoutViewGroup {}
|
|
4
7
|
|
|
5
8
|
export declare namespace FreezeAbsoluteLayout {
|
|
9
|
+
/**
|
|
10
|
+
* FreezeAbsoluteLayout 的布局参数。
|
|
11
|
+
*/
|
|
6
12
|
export class LayoutParams extends FreezeLayoutViewGroup.LayoutParams {}
|
|
7
13
|
}
|
package/@types/Gravity.d.ts
CHANGED
package/@types/GridLayout.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 网格布局,按行与列排列子视图。
|
|
5
|
+
*/
|
|
3
6
|
export declare class GridLayout extends ViewGroup {
|
|
4
7
|
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
export declare namespace GridLayout {
|
|
11
|
+
/**
|
|
12
|
+
* GridLayout 的布局参数。
|
|
13
|
+
*/
|
|
8
14
|
export class LayoutParams extends ViewGroup.MarginLayoutParams {}
|
|
9
15
|
}
|
package/@types/GridView.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
import { Context } from "./Context";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 位图图像,封装像素缓冲及其尺寸。
|
|
6
|
+
*/
|
|
7
|
+
export declare interface Image {
|
|
8
|
+
getWidth(): number;
|
|
9
|
+
|
|
10
|
+
getHeight(): number;
|
|
11
|
+
|
|
12
|
+
dispose(): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Image 接口的实现基类。
|
|
17
|
+
*/
|
|
18
|
+
export class Image extends InterfaceTemplate {}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Image 工厂方法。
|
|
22
|
+
*/
|
|
23
|
+
export namespace Image {
|
|
24
|
+
/**
|
|
25
|
+
* 从 ArrayBuffer 创建 Image。
|
|
26
|
+
*/
|
|
27
|
+
export function create(context: Context, arraybuffer: ArrayBuffer): Promise<Image>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Drawable } from "./Drawable";
|
|
2
|
+
import { Image } from "./Image";
|
|
3
|
+
import { Canvas } from "./Canvas";
|
|
4
|
+
import { Context } from "./Context";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 图像 Drawable,将 Image 按重力对齐绘制到边界内。
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class ImageDrawable extends Drawable {
|
|
10
|
+
protected constructor(context: Context);
|
|
11
|
+
protected constructor(context: Context, imageState: ImageDrawable.ImageState);
|
|
12
|
+
protected constructor(context: Context, image: Image);
|
|
13
|
+
|
|
14
|
+
public draw(canvas: Canvas): void;
|
|
15
|
+
|
|
16
|
+
public getOpacity(): number;
|
|
17
|
+
|
|
18
|
+
public getImage(): Image;
|
|
19
|
+
|
|
20
|
+
public setImage(image: Image): void;
|
|
21
|
+
|
|
22
|
+
public setAlpha(alpha: number): void;
|
|
23
|
+
|
|
24
|
+
public setGravity(gravity: number): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* ImageDrawable 相关嵌套类型。
|
|
29
|
+
*/
|
|
30
|
+
export declare namespace ImageDrawable {
|
|
31
|
+
/**
|
|
32
|
+
* ImageDrawable 的常量状态。
|
|
33
|
+
*/
|
|
34
|
+
class ImageState extends Drawable.ConstantState {
|
|
35
|
+
public constructor(context: Context);
|
|
36
|
+
public constructor(context: Context, imageState: ImageState);
|
|
37
|
+
public constructor(context: Context, image: Image);
|
|
38
|
+
|
|
39
|
+
public newDrawable(): Drawable;
|
|
40
|
+
|
|
41
|
+
public getChangingConfigurations(): number;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 图像滤镜,用于对图层或绘制结果做效果处理。
|
|
5
|
+
*/
|
|
6
|
+
export interface ImageFilter {
|
|
7
|
+
dispose(): void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ImageFilter 接口的实现基类。
|
|
12
|
+
*/
|
|
13
|
+
export abstract class ImageFilter extends InterfaceTemplate {}
|
package/@types/ImageView.d.ts
CHANGED
|
@@ -7,9 +7,15 @@ import {
|
|
|
7
7
|
View,
|
|
8
8
|
} from "./View";
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 图片视图,用于展示图像内容。
|
|
12
|
+
*/
|
|
10
13
|
export declare class ImageView extends View {}
|
|
11
14
|
|
|
12
15
|
export declare namespace ImageView {
|
|
16
|
+
/**
|
|
17
|
+
* 图片更新通知接口,支持订阅与一次性回调。
|
|
18
|
+
*/
|
|
13
19
|
export interface UpdateNotification<S> {
|
|
14
20
|
addNotification(c: Consumer<S>): void;
|
|
15
21
|
|
|
@@ -18,5 +24,8 @@ export declare namespace ImageView {
|
|
|
18
24
|
removeNotification(c: Consumer<S>): void;
|
|
19
25
|
}
|
|
20
26
|
|
|
27
|
+
/**
|
|
28
|
+
* UpdateNotification 的接口模板实现。
|
|
29
|
+
*/
|
|
21
30
|
export class UpdateNotification<S> extends InterfaceTemplate {}
|
|
22
31
|
}
|
package/@types/Interpolator.d.ts
CHANGED
|
@@ -4,8 +4,14 @@ import {
|
|
|
4
4
|
TimeInterpolator,
|
|
5
5
|
} from "./TimeInterpolator";
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* 插值器接口。
|
|
9
|
+
*/
|
|
7
10
|
export declare interface Interpolator extends TimeInterpolator {
|
|
8
11
|
}
|
|
9
12
|
|
|
13
|
+
/**
|
|
14
|
+
* 插值器实现类。
|
|
15
|
+
*/
|
|
10
16
|
@Implements(TimeInterpolator)
|
|
11
17
|
export declare class Interpolator extends InterfaceTemplate {}
|