@compass-framework/core 1.2.63 → 1.2.65
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Class } from "@compass-framework/library";
|
|
1
2
|
import { Environment } from "../evaluate/Environment";
|
|
2
3
|
import { Resources } from "./Resources";
|
|
3
4
|
import { MouseCursor } from "../display/MouseCursor";
|
|
@@ -5,6 +6,8 @@ import { RendererBackend } from "../canvas/RendererBackend";
|
|
|
5
6
|
import { WindowManager } from "../window/WindowManager";
|
|
6
7
|
import { SurfaceProvider } from "../display/SurfaceProvider";
|
|
7
8
|
import { ViewFactoryRegistry } from "./ViewFactoryRegistry";
|
|
9
|
+
import { Intent } from "../activity/Intent";
|
|
10
|
+
import { ServiceRegister } from "./ServiceRegister";
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* 全局运行时上下文,提供资源、环境与窗口管理等服务。
|
|
@@ -12,10 +15,14 @@ import { ViewFactoryRegistry } from "./ViewFactoryRegistry";
|
|
|
12
15
|
export declare interface Context {
|
|
13
16
|
startActivity(intent: Intent): void;
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
getRegisterService<T>(key: Class<T>): T;
|
|
19
|
+
|
|
20
|
+
getSurfaceProvider(): SurfaceProvider;
|
|
16
21
|
|
|
17
22
|
getEnvironment(): Environment;
|
|
18
23
|
|
|
24
|
+
getServiceRegister(): ServiceRegister;
|
|
25
|
+
|
|
19
26
|
getMouseCursor(): MouseCursor;
|
|
20
27
|
|
|
21
28
|
getWindowManager(): WindowManager
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Class } from "@compass-framework/library";
|
|
2
|
+
|
|
3
|
+
export declare class ServiceRegister {
|
|
4
|
+
public registerService<T>(key: Class<T>, service: T): this;
|
|
5
|
+
|
|
6
|
+
public getRegisterService<T>(key: Class<T>): T;
|
|
7
|
+
|
|
8
|
+
public hasRegisterService<T>(key: Class<T>): boolean;
|
|
9
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from "./@types/widget/Adapter";
|
|
2
|
-
export * from "./@types/content/BaseAdapter";
|
|
3
|
-
export * from "./@types/content/ArrayAdapter";
|
|
4
2
|
export * from "./@types/widget/Button";
|
|
5
3
|
export * from "./@types/widget/EditRichText";
|
|
6
4
|
export * from "./@types/widget/EditText";
|
|
@@ -24,13 +22,18 @@ export * from "./@types/layout/LinearLayout";
|
|
|
24
22
|
export * from "./@types/layout/RelativeLayout";
|
|
25
23
|
export * from "./@types/layout/GridLayoutAnimationController";
|
|
26
24
|
|
|
25
|
+
export * from "./@types/content/BaseAdapter";
|
|
26
|
+
export * from "./@types/content/Theme";
|
|
27
|
+
export * from "./@types/content/ArrayAdapter";
|
|
27
28
|
export * from "./@types/content/AttributeSet";
|
|
28
29
|
export * from "./@types/content/Configuration";
|
|
29
30
|
export * from "./@types/content/Context";
|
|
30
31
|
export * from "./@types/content/PixelFormat";
|
|
31
32
|
export * from "./@types/content/Resources";
|
|
32
33
|
export * from "./@types/content/DisplayMetrics";
|
|
34
|
+
export * from "./@types/content/ServiceRegister";
|
|
33
35
|
export * from "./@types/content/LayoutInflater";
|
|
36
|
+
export * from "./@types/content/ViewFactoryRegistry";
|
|
34
37
|
|
|
35
38
|
export * from "./@types/canvas/BlendMode";
|
|
36
39
|
export * from "./@types/canvas/Canvas";
|
|
@@ -72,7 +75,6 @@ export * from "./@types/widget/ScrollView";
|
|
|
72
75
|
|
|
73
76
|
export * from "./@types/layout/TableLayout";
|
|
74
77
|
export * from "./@types/layout/TableRow";
|
|
75
|
-
export * from "./@types/content/Theme";
|
|
76
78
|
export * from "./@types/layout/TabBarLayout";
|
|
77
79
|
|
|
78
80
|
export * from "./@types/animation/RotateAnimation";
|