1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
5 // Generated from namespace: functions
13 class FunctionsDictType extends ChromeObject {
17 FunctionsDictType._proxy(_jsObject) : super._proxy(_jsObject);
23 int get a => JS('int', '#.a', this._jsObject);
26 JS('void', '#.a = #', this._jsObject, a);
34 void voidFunc() => JS('void', '#.voidFunc()', this._jsObject);
52 void voidFunc() => JS('void', '#.voidFunc()', this._jsObject);
54 /// Function taking a non-optional argument.
55 void argFunc(String s) => JS('void', '#.argFunc(#)', this._jsObject, s);
57 /// Function taking an optional argument.
58 void optionalArgFunc([String s]) => JS('void', '#.optionalArgFunc(#)', this._jsObject, s);
60 /// Function taking a non-optional dictionary argument.
61 void dictArgFunc(FunctionsDictType d) => JS('void', '#.dictArgFunc(#)', this._jsObject, convertArgument(d));
63 /// Function taking an optional dictionary argument.
64 void optionalDictArgFunc([FunctionsDictType d]) => JS('void', '#.optionalDictArgFunc(#)', this._jsObject, convertArgument(d));
66 /// Function taking an entry argument.
67 void entryArgFunc(Object entry) => JS('void', '#.entryArgFunc(#)', this._jsObject, convertArgument(entry));
69 /// Function taking a simple callback.
70 void callbackFunc(void c()) => JS('void', '#.callbackFunc(#)', this._jsObject, convertDartClosureToJS(c, 0));
72 /// Function taking an optional simple callback.
73 void optionalCallbackFunc([void c()]) => JS('void', '#.optionalCallbackFunc(#)', this._jsObject, convertDartClosureToJS(c, 0));
75 /// Function taking a primitive callback.
76 void primitiveCallbackFunc(void c(int i)) => JS('void', '#.primitiveCallbackFunc(#)', this._jsObject, convertDartClosureToJS(c, 1));
78 /// Function taking a dictionary callback.
79 void dictCallbackFunc(void c(DictType dict)) {
80 void __proxy_callback(dict) {
82 c(new DictType._proxy(dict));
85 JS('void', '#.dictCallbackFunc(#)', this._jsObject, convertDartClosureToJS(__proxy_callback, 1));
88 /// Function returning a dictionary.
89 FunctionsDictType dictRetFunc() => new FunctionsDictType._proxy(JS('', '#.dictRetFunc()', this._jsObject));
91 API_functions(this._jsObject) {