slint-ui 0.2.4 → 0.2.5
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/dist/index.d.ts +18 -2
- package/dist/index.js +21 -1
- package/native/Cargo.toml +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,13 +15,29 @@ declare class Component {
|
|
|
15
15
|
run(): void;
|
|
16
16
|
show(): void;
|
|
17
17
|
hide(): void;
|
|
18
|
-
get window():
|
|
18
|
+
get window(): SlintWindow;
|
|
19
19
|
send_mouse_click(x: number, y: number): void;
|
|
20
20
|
send_keyboard_string_sequence(s: String): void;
|
|
21
21
|
}
|
|
22
|
-
interface
|
|
22
|
+
interface Point {
|
|
23
|
+
x: Number;
|
|
24
|
+
y: Number;
|
|
25
|
+
}
|
|
26
|
+
interface SlintWindow {
|
|
27
|
+
show(): void;
|
|
28
|
+
hide(): void;
|
|
29
|
+
position: Point;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
declare class WindowAPI implements SlintWindow {
|
|
35
|
+
protected impl: any;
|
|
36
|
+
constructor(impl: any);
|
|
23
37
|
show(): void;
|
|
24
38
|
hide(): void;
|
|
39
|
+
get position(): Point;
|
|
40
|
+
set position(pos: Point);
|
|
25
41
|
}
|
|
26
42
|
/**
|
|
27
43
|
* @hidden
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ class Component {
|
|
|
33
33
|
this.window.hide();
|
|
34
34
|
}
|
|
35
35
|
get window() {
|
|
36
|
-
return this.comp.window();
|
|
36
|
+
return new WindowAPI(this.comp.window());
|
|
37
37
|
}
|
|
38
38
|
send_mouse_click(x, y) {
|
|
39
39
|
this.comp.send_mouse_click(x, y);
|
|
@@ -42,6 +42,26 @@ class Component {
|
|
|
42
42
|
this.comp.send_keyboard_string_sequence(s);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* @hidden
|
|
47
|
+
*/
|
|
48
|
+
class WindowAPI {
|
|
49
|
+
constructor(impl) {
|
|
50
|
+
this.impl = impl;
|
|
51
|
+
}
|
|
52
|
+
show() {
|
|
53
|
+
this.impl.show();
|
|
54
|
+
}
|
|
55
|
+
hide() {
|
|
56
|
+
this.impl.hide();
|
|
57
|
+
}
|
|
58
|
+
get position() {
|
|
59
|
+
return this.impl.get_position();
|
|
60
|
+
}
|
|
61
|
+
set position(pos) {
|
|
62
|
+
this.impl.set_position(pos);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
45
65
|
require.extensions['.60'] = require.extensions['.slint'] =
|
|
46
66
|
function (module, filename) {
|
|
47
67
|
var c = native.load(filename);
|
package/native/Cargo.toml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
[package]
|
|
5
5
|
name = "slint-node"
|
|
6
|
-
version = "0.2.
|
|
6
|
+
version = "0.2.5"
|
|
7
7
|
authors = ["Slint Developers <info@slint-ui.com>"]
|
|
8
8
|
edition = "2021"
|
|
9
9
|
build = "build.rs"
|
|
@@ -20,9 +20,9 @@ crate-type = ["cdylib"]
|
|
|
20
20
|
name = "slint_node_native"
|
|
21
21
|
|
|
22
22
|
[dependencies]
|
|
23
|
-
i-slint-compiler = { version = "=0.2.
|
|
24
|
-
i-slint-core = { version = "=0.2.
|
|
25
|
-
slint-interpreter = { version = "=0.2.
|
|
23
|
+
i-slint-compiler = { version = "=0.2.5"}
|
|
24
|
+
i-slint-core = { version = "=0.2.5"}
|
|
25
|
+
slint-interpreter = { version = "=0.2.5", features = ["display-diagnostics"] }
|
|
26
26
|
|
|
27
27
|
vtable = { version = "0.1.6"}
|
|
28
28
|
|