forked from dart-archive/js-interop-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.g.dart
91 lines (74 loc) · 3.06 KB
/
example.g.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// GENERATED CODE - DO NOT MODIFY BY HAND
// 2015-03-07T22:27:27.901Z
part of js.example.js_proxy;
// **************************************************************************
// Generator: Instance of 'InitializeJavascriptGenerator'
// Target: library js.example.js_proxy
// **************************************************************************
void initializeJavaScript({List<String> exclude, List<String> include}) {
bool accept(String name) => (include != null && include.contains(name)) ||
(include == null && exclude != null && !exclude.contains(name));
void register(String name, JsInterface f(JsObject o)) =>
registerFactoryForJsConstructor(getPath(name), f);
void mayRegister(String name, JsInterface f(JsObject o)) {
if (accept(name)) register(name, f);
}
mayRegister('z.y.x.JsFoo', (o) => new JsFoo.created(o));
mayRegister('z.y.x.a.b.JsBar', (o) => new JsBar.created(o));
mayRegister('z.y.x.JsBaz', (o) => new JsBaz.created(o));
}
// **************************************************************************
// Generator: Instance of 'JsProxyGenerator'
// Target: abstract class _JsFoo
// **************************************************************************
class JsFoo extends JsInterface {
JsFoo.created(JsObject o) : super.created(o);
JsFoo() : this.created(new JsObject(getPath('z.y.x.JsFoo')));
void set i(int _i) {
unwrap(this)['i'] = toJs(_i);
}
int get i => toDart(unwrap(this)['i']) as int;
void set k2(num _k2) {
unwrap(this)['k2'] = toJs(_k2);
}
num get k2 => toDart(unwrap(this)['k2']) as num;
void set k1(num _k1) {
unwrap(this)['k1'] = toJs(_k1);
}
num get k1 => toDart(unwrap(this)['k1']) as num;
int j = null;
bool get l => toDart(unwrap(this)['l']) as bool;
String get a => toDart(unwrap(this)['a']) as String;
void set a(String a) {
unwrap(this)['a'] = toJs(a);
}
String get b => '';
void set b(String b) {}
m1() => toDart(unwrap(this).callMethod('m1')) as dynamic;
void m2() {
unwrap(this).callMethod('m2');
}
String m3() => toDart(unwrap(this).callMethod('m3')) as String;
String m4(int a) =>
toDart(unwrap(this).callMethod('m4', [a].map(toJs).toList())) as String;
int m5(int a, b) =>
toDart(unwrap(this).callMethod('m5', [a, b].map(toJs).toList())) as int;
}
// **************************************************************************
// Generator: Instance of 'JsProxyGenerator'
// Target: abstract class _JsBar
// **************************************************************************
class JsBar extends JsInterface {
JsBar.created(JsObject o) : super.created(o);
external factory JsBar();
external factory JsBar.named(int x, int y);
JsBar m1() => toDart(unwrap(this).callMethod('m1')) as JsBar;
}
// **************************************************************************
// Generator: Instance of 'JsProxyGenerator'
// Target: abstract class _JsBaz
// **************************************************************************
class JsBaz extends JsBar {
JsBaz.created(JsObject o) : super.created(o);
external factory JsBaz();
}