@supraio/client-daemon-js 0.0.0-master.289 → 0.0.0-master.308
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/daemon.html +1 -1
- package/daemon.js +17058 -16559
- package/daemon.js.map +4 -4
- package/package.json +4 -2
- package/screen/h264decoder.d.ts +8 -0
- package/screen/nacldecoder.d.ts +8 -0
- package/screen/wasm.d.ts +0 -7
- package/screen.html +1 -1
- package/screen.js +17202 -16531
- package/screen.js.map +4 -4
- package/sdk.d.ts +5 -2
- package/sdk.js +17207 -16539
- package/sdk.js.map +4 -4
- package/supra-client-daemon.js +1164 -767
- package/supra-client-daemon.js.map +1 -1
- package/supra-client-daemon.wasm +0 -0
- package/supra-client-screen.js +1646 -999
- package/supra-client-screen.js.map +1 -1
- package/supra-client-screen.wasm +0 -0
package/supra-client-daemon.js
CHANGED
|
@@ -21274,7 +21274,7 @@ $packages["strconv"] = (function() {
|
|
|
21274
21274
|
return $pkg;
|
|
21275
21275
|
})();
|
|
21276
21276
|
$packages["reflect"] = (function() {
|
|
21277
|
-
var $pkg = {}, $init, errors, js, abi, bytealg, goarch, itoa, unsafeheader, math, runtime, strconv, sync, unicode, utf8, Value, flag, ValueError, MapIter,
|
|
21277
|
+
var $pkg = {}, $init, errors, js, abi, bytealg, goarch, itoa, unsafeheader, math, runtime, strconv, sync, unicode, utf8, Value, flag, ValueError, MapIter, Type, Kind, tflag, rtype, method, ChanDir, arrayType, chanType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, Method, nameOff, typeOff, textOff, StructField, StructTag, fieldScan, uncommonType, funcType, name, nameData, hiter, sliceType$1, ptrType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, ptrType$2, funcType$1, sliceType$7, sliceType$8, ptrType$6, ptrType$8, ptrType$9, sliceType$10, ptrType$10, sliceType$11, ptrType$11, ptrType$12, sliceType$12, ptrType$13, ptrType$14, funcType$2, sliceType$14, sliceType$15, ptrType$18, structType$3, sliceType$16, ptrType$19, ptrType$20, sliceType$17, sliceType$18, arrayType$6, sliceType$19, arrayType$7, sliceType$20, funcType$3, ptrType$23, arrayType$8, ptrType$24, funcType$4, funcType$5, ptrType$26, ptrType$27, bytesType, uint8Type, stringType, kindNames, initialized, nameMap, nameOffList, typeOffList, callHelper, jsObjectPtr, selectHelper, copyVal, overflowFloat32, typesMustMatch, grow, Append, MakeMap, MakeMapWithSize, Indirect, convertOp, makeFloat, makeFloat32, makeComplex, makeString, makeBytes, makeRunes, cvtInt, cvtUint, cvtFloatInt, cvtFloatUint, cvtIntFloat, cvtUintFloat, cvtFloat, cvtComplex, cvtIntString, cvtUintString, cvtBytesString, cvtStringBytes, cvtRunesString, cvtStringRunes, cvtT2I, cvtI2I, PtrTo, PointerTo, implements$1, specialChannelAssignability, directlyAssignable, haveIdenticalType, haveIdenticalUnderlyingType, toType, ifaceIndir, methodValueCallCodePtr, methodValueCall, init, New, jsType, reflectType, setKindType, newName, newMethodName, resolveReflectName, newTypeOff, internalStr, isWrapped, copyStruct, makeValue, MakeSlice, TypeOf, ValueOf, FuncOf, SliceOf, Zero, unsafe_New, makeInt, typedmemmove, makemap, keyFor, mapaccess, mapassign, mapdelete, mapaccess_faststr, mapassign_faststr, mapdelete_faststr, mapiterinit, mapiterkey, mapiterelem, mapiternext, maplen, cvtDirect, cvtSliceArrayPtr, Copy, methodReceiver, valueInterface, ifaceE2I, makeMethodValue, wrapJsObject, unwrapJsObject, getJsTag, chanrecv, chansend, DeepEqual, deepValueEqualJs, stringsLastIndex, stringsHasPrefix, valueMethodName, verifyNotInHeapPtr;
|
|
21278
21278
|
errors = $packages["errors"];
|
|
21279
21279
|
js = $packages["github.com/gopherjs/gopherjs/js"];
|
|
21280
21280
|
abi = $packages["internal/abi"];
|
|
@@ -21321,18 +21321,6 @@ $packages["reflect"] = (function() {
|
|
|
21321
21321
|
this.m = m_;
|
|
21322
21322
|
this.hiter = hiter_;
|
|
21323
21323
|
});
|
|
21324
|
-
SliceHeader = $pkg.SliceHeader = $newType(0, $kindStruct, "reflect.SliceHeader", true, "reflect", true, function(Data_, Len_, Cap_) {
|
|
21325
|
-
this.$val = this;
|
|
21326
|
-
if (arguments.length === 0) {
|
|
21327
|
-
this.Data = 0;
|
|
21328
|
-
this.Len = 0;
|
|
21329
|
-
this.Cap = 0;
|
|
21330
|
-
return;
|
|
21331
|
-
}
|
|
21332
|
-
this.Data = Data_;
|
|
21333
|
-
this.Len = Len_;
|
|
21334
|
-
this.Cap = Cap_;
|
|
21335
|
-
});
|
|
21336
21324
|
Type = $pkg.Type = $newType(8, $kindInterface, "reflect.Type", true, "reflect", true, null);
|
|
21337
21325
|
Kind = $pkg.Kind = $newType(4, $kindUint, "reflect.Kind", true, "reflect", true, null);
|
|
21338
21326
|
tflag = $pkg.tflag = $newType(1, $kindUint8, "reflect.tflag", true, "reflect", false, null);
|
|
@@ -26582,7 +26570,6 @@ $packages["reflect"] = (function() {
|
|
|
26582
26570
|
Value.init("reflect", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "flag", embedded: true, exported: false, typ: flag, tag: ""}]);
|
|
26583
26571
|
ValueError.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: Kind, tag: ""}]);
|
|
26584
26572
|
MapIter.init("reflect", [{prop: "m", name: "m", embedded: false, exported: false, typ: Value, tag: ""}, {prop: "hiter", name: "hiter", embedded: false, exported: false, typ: hiter, tag: ""}]);
|
|
26585
|
-
SliceHeader.init("", [{prop: "Data", name: "Data", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "Len", name: "Len", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Cap", name: "Cap", embedded: false, exported: true, typ: $Int, tag: ""}]);
|
|
26586
26573
|
Type.init([{prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$7], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$10], false)}]);
|
|
26587
26574
|
rtype.init("reflect", [{prop: "size", name: "size", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "ptrdata", name: "ptrdata", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "hash", name: "hash", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "tflag", name: "tflag", embedded: false, exported: false, typ: tflag, tag: ""}, {prop: "align", name: "align", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "fieldAlign", name: "fieldAlign", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "kind", name: "kind", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "equal", name: "equal", embedded: false, exported: false, typ: funcType$4, tag: ""}, {prop: "gcdata", name: "gcdata", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", embedded: false, exported: false, typ: typeOff, tag: ""}]);
|
|
26588
26575
|
method.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mtyp", name: "mtyp", embedded: false, exported: false, typ: typeOff, tag: ""}, {prop: "ifn", name: "ifn", embedded: false, exported: false, typ: textOff, tag: ""}, {prop: "tfn", name: "tfn", embedded: false, exported: false, typ: textOff, tag: ""}]);
|
|
@@ -46411,14 +46398,14 @@ $packages["github.com/supraio/client-daemon/pkg/helper"] = (function() {
|
|
|
46411
46398
|
$go((function(signalChannel) { return function $b() {
|
|
46412
46399
|
var {$s, $r, $c} = $restore(this, {});
|
|
46413
46400
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
46414
|
-
$r = time.Sleep(new time.Duration(
|
|
46401
|
+
$r = time.Sleep(new time.Duration(140815, 4180213760)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
46415
46402
|
$r = $send(signalChannel[0], new syscall.Signal(6)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
46416
46403
|
$s = -1; return;
|
|
46417
46404
|
/* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f;
|
|
46418
46405
|
}; })(signalChannel), []);
|
|
46419
46406
|
_r$4 = $recv(signalChannel[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
46420
46407
|
sig = _r$4[0];
|
|
46421
|
-
$r = log.Printf("Signal %s received (emulated after
|
|
46408
|
+
$r = log.Printf("Signal %s received (emulated after 1 week).\n", new sliceType$1([sig])); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
46422
46409
|
$s = -1; return;
|
|
46423
46410
|
/* */ } return; } var $f = {$blk: WaitOnStopSignal, $c: true, $r, _r$4, sig, signalChannel, $s};return $f;
|
|
46424
46411
|
};
|
|
@@ -158660,26 +158647,12 @@ $packages["github.com/supraio/client-daemon/pkg/netclient"] = (function() {
|
|
|
158660
158647
|
};
|
|
158661
158648
|
MetadataServer.prototype.handleData = function() { return this.$val.handleData(); };
|
|
158662
158649
|
NewMetadataResponsiveSender = function(metadataServer, timeoutDuration) {
|
|
158663
|
-
var metadataServer, timeoutDuration;
|
|
158664
|
-
|
|
158650
|
+
var metadataServer, s, timeoutDuration;
|
|
158651
|
+
s = new MetadataResponsiveSender.ptr(metadataServer, timeoutDuration, $makeMap($String.keyFor, []), $clone(new sync.Mutex.ptr(0, 0), sync.Mutex));
|
|
158652
|
+
metadataServer.OnMessage($methodVal(s, "handleServerData"));
|
|
158653
|
+
return s;
|
|
158665
158654
|
};
|
|
158666
158655
|
$pkg.NewMetadataResponsiveSender = NewMetadataResponsiveSender;
|
|
158667
|
-
MetadataResponsiveSender.ptr.prototype.Listen = function() {
|
|
158668
|
-
var s;
|
|
158669
|
-
s = this;
|
|
158670
|
-
s.metadataServer.OnMessage($methodVal(s, "handleServerData"));
|
|
158671
|
-
};
|
|
158672
|
-
MetadataResponsiveSender.prototype.Listen = function() { return this.$val.Listen(); };
|
|
158673
|
-
MetadataResponsiveSender.ptr.prototype.Close = function() {
|
|
158674
|
-
var {$24r, _r, s, $s, $r, $c} = $restore(this, {});
|
|
158675
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
158676
|
-
s = this;
|
|
158677
|
-
_r = s.metadataServer.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
158678
|
-
$24r = _r;
|
|
158679
|
-
$s = 2; case 2: return $24r;
|
|
158680
|
-
/* */ } return; } var $f = {$blk: MetadataResponsiveSender.ptr.prototype.Close, $c: true, $r, $24r, _r, s, $s};return $f;
|
|
158681
|
-
};
|
|
158682
|
-
MetadataResponsiveSender.prototype.Close = function() { return this.$val.Close(); };
|
|
158683
158656
|
MetadataResponsiveSender.ptr.prototype.SendServerWaitResponse = function(msgType, data) {
|
|
158684
158657
|
var {$24r, $24r$1, $24r$2, _key, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _selection, _tuple, data, err, msgType, reqData, requestChan, requestID, resp, s, $s, $r, $c} = $restore(this, {msgType, data});
|
|
158685
158658
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
@@ -158979,7 +158952,7 @@ $packages["github.com/supraio/client-daemon/pkg/netclient"] = (function() {
|
|
|
158979
158952
|
};
|
|
158980
158953
|
Framer.prototype.parseFrames = function() { return this.$val.parseFrames(); };
|
|
158981
158954
|
ptrType$1.methods = [{prop: "start", name: "start", pkg: "github.com/supraio/client-daemon/pkg/netclient", typ: $funcType([], [], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "OnClose", name: "OnClose", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "OnMessage", name: "OnMessage", pkg: "", typ: $funcType([funcType$1], [], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "handleData", name: "handleData", pkg: "github.com/supraio/client-daemon/pkg/netclient", typ: $funcType([], [], false)}];
|
|
158982
|
-
ptrType$2.methods = [{prop: "
|
|
158955
|
+
ptrType$2.methods = [{prop: "SendServerWaitResponse", name: "SendServerWaitResponse", pkg: "", typ: $funcType([message.MsgType, sliceType$1], [sliceType$1, $error], false)}, {prop: "handleServerData", name: "handleServerData", pkg: "github.com/supraio/client-daemon/pkg/netclient", typ: $funcType([message.MsgType, sliceType$1], [], false)}];
|
|
158983
158956
|
ptrType$3.methods = [{prop: "Send", name: "Send", pkg: "", typ: $funcType([message.MsgType, sliceType$1], [$error], false)}];
|
|
158984
158957
|
ptrType$4.methods = [{prop: "Connect", name: "Connect", pkg: "", typ: $funcType([], [ptrType$1, $error], false)}];
|
|
158985
158958
|
ptrType$6.methods = [{prop: "Start", name: "Start", pkg: "", typ: $funcType([], [], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "startPinging", name: "startPinging", pkg: "github.com/supraio/client-daemon/pkg/netclient", typ: $funcType([], [], false)}];
|
|
@@ -159271,7 +159244,7 @@ $packages["github.com/supraio/client-daemon/pkg/socket"] = (function() {
|
|
|
159271
159244
|
_i++;
|
|
159272
159245
|
$s = 1; continue;
|
|
159273
159246
|
case 2:
|
|
159274
|
-
l.closeConns =
|
|
159247
|
+
l.closeConns = new $global.Map();
|
|
159275
159248
|
$s = -1; return $ifaceNil;
|
|
159276
159249
|
/* */ } return; } var $f = {$blk: JsListener.ptr.prototype.Close, $c: true, $r, _entry, _i, _key, _keys, _ref, _size, closeConn, l, $s};return $f;
|
|
159277
159250
|
};
|
|
@@ -159347,7 +159320,7 @@ $packages["github.com/supraio/client-daemon/pkg/socket"] = (function() {
|
|
|
159347
159320
|
return $pkg;
|
|
159348
159321
|
})();
|
|
159349
159322
|
$packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
159350
|
-
var $pkg = {}, $init, context, json, errs, message, netclient, netpacket, netstream, socket, io, log, sync, time, ScreenManager, ServerInfo, Handler, sliceType, sliceType$1, sliceType$2, structType, ptrType, ptrType$1, sliceType$3, ptrType$2, funcType, ptrType$3, mapType, NewHandler;
|
|
159323
|
+
var $pkg = {}, $init, context, json, errs, message, netclient, netpacket, netstream, socket, io, log, sync, time, ScreenManager, ServerInfo, Handler, sliceType, sliceType$1, sliceType$2, structType, ptrType, ptrType$1, sliceType$3, ptrType$2, funcType, ptrType$3, mapType, mapType$1, NewHandler;
|
|
159351
159324
|
context = $packages["context"];
|
|
159352
159325
|
json = $packages["encoding/json"];
|
|
159353
159326
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
@@ -159381,11 +159354,12 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159381
159354
|
this.ClientSecret = ClientSecret_;
|
|
159382
159355
|
this.Secure = Secure_;
|
|
159383
159356
|
});
|
|
159384
|
-
Handler = $pkg.Handler = $newType(0, $kindStruct, "command.Handler", true, "github.com/supraio/client-daemon/pkg/command", true, function(socketPath_, screenManager_, metadataResponsiveSenders_, timeoutDuration_, listener_, mutex_) {
|
|
159357
|
+
Handler = $pkg.Handler = $newType(0, $kindStruct, "command.Handler", true, "github.com/supraio/client-daemon/pkg/command", true, function(socketPath_, screenManager_, metadataServers_, metadataResponsiveSenders_, timeoutDuration_, listener_, mutex_) {
|
|
159385
159358
|
this.$val = this;
|
|
159386
159359
|
if (arguments.length === 0) {
|
|
159387
159360
|
this.socketPath = "";
|
|
159388
159361
|
this.screenManager = $ifaceNil;
|
|
159362
|
+
this.metadataServers = false;
|
|
159389
159363
|
this.metadataResponsiveSenders = false;
|
|
159390
159364
|
this.timeoutDuration = new time.Duration(0, 0);
|
|
159391
159365
|
this.listener = $ifaceNil;
|
|
@@ -159394,6 +159368,7 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159394
159368
|
}
|
|
159395
159369
|
this.socketPath = socketPath_;
|
|
159396
159370
|
this.screenManager = screenManager_;
|
|
159371
|
+
this.metadataServers = metadataServers_;
|
|
159397
159372
|
this.metadataResponsiveSenders = metadataResponsiveSenders_;
|
|
159398
159373
|
this.timeoutDuration = timeoutDuration_;
|
|
159399
159374
|
this.listener = listener_;
|
|
@@ -159409,10 +159384,11 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159409
159384
|
ptrType$2 = $ptrType(netclient.Framer);
|
|
159410
159385
|
funcType = $funcType([], [$error], false);
|
|
159411
159386
|
ptrType$3 = $ptrType(Handler);
|
|
159412
|
-
mapType = $mapType($String, ptrType);
|
|
159387
|
+
mapType = $mapType($String, ptrType$1);
|
|
159388
|
+
mapType$1 = $mapType($String, ptrType);
|
|
159413
159389
|
NewHandler = function(socketPath, screenManager, timeoutDuration) {
|
|
159414
159390
|
var screenManager, socketPath, timeoutDuration;
|
|
159415
|
-
return new Handler.ptr(socketPath, screenManager, $makeMap($String.keyFor, []), timeoutDuration, $ifaceNil, $clone(new sync.Mutex.ptr(0, 0), sync.Mutex));
|
|
159391
|
+
return new Handler.ptr(socketPath, screenManager, $makeMap($String.keyFor, []), $makeMap($String.keyFor, []), timeoutDuration, $ifaceNil, $clone(new sync.Mutex.ptr(0, 0), sync.Mutex));
|
|
159416
159392
|
};
|
|
159417
159393
|
$pkg.NewHandler = NewHandler;
|
|
159418
159394
|
Handler.ptr.prototype.Listen = function() {
|
|
@@ -159447,13 +159423,13 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159447
159423
|
};
|
|
159448
159424
|
Handler.prototype.Listen = function() { return this.$val.Listen(); };
|
|
159449
159425
|
Handler.ptr.prototype.Close = function() {
|
|
159450
|
-
var {$24r, $24r$1, _entry, _i, _i$1, _key, _keys, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _size, allErr, err, err$1, err$2, errList,
|
|
159426
|
+
var {$24r, $24r$1, _entry, _i, _i$1, _key, _keys, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _size, allErr, err, err$1, err$2, errList, metadataServer, s, $s, $deferred, $r, $c} = $restore(this, {});
|
|
159451
159427
|
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
159452
159428
|
s = this;
|
|
159453
159429
|
$r = s.mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
159454
159430
|
$deferred.push([$methodVal(s.mutex, "Unlock"), []]);
|
|
159455
159431
|
errList = new sliceType([]);
|
|
159456
|
-
_ref = s.
|
|
159432
|
+
_ref = s.metadataServers;
|
|
159457
159433
|
_i = 0;
|
|
159458
159434
|
_keys = _ref ? _ref.keys() : undefined;
|
|
159459
159435
|
_size = _ref ? _ref.size : 0;
|
|
@@ -159465,8 +159441,8 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159465
159441
|
_i++;
|
|
159466
159442
|
/* continue; */ $s = 2; continue;
|
|
159467
159443
|
}
|
|
159468
|
-
|
|
159469
|
-
_r =
|
|
159444
|
+
metadataServer = _entry.v;
|
|
159445
|
+
_r = metadataServer.Close(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
159470
159446
|
err = _r;
|
|
159471
159447
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
159472
159448
|
errList = $append(errList, err);
|
|
@@ -159500,7 +159476,7 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159500
159476
|
/* } */ case 7:
|
|
159501
159477
|
$24r$1 = $ifaceNil;
|
|
159502
159478
|
$s = 13; case 13: return $24r$1;
|
|
159503
|
-
/* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Handler.ptr.prototype.Close, $c: true, $r, $24r, $24r$1, _entry, _i, _i$1, _key, _keys, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _size, allErr, err, err$1, err$2, errList,
|
|
159479
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Handler.ptr.prototype.Close, $c: true, $r, $24r, $24r$1, _entry, _i, _i$1, _key, _keys, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _size, allErr, err, err$1, err$2, errList, metadataServer, s, $s, $deferred};return $f; } }
|
|
159504
159480
|
};
|
|
159505
159481
|
Handler.prototype.Close = function() { return this.$val.Close(); };
|
|
159506
159482
|
Handler.ptr.prototype.bindMessages = function(framer, closeSocket) {
|
|
@@ -159631,40 +159607,34 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159631
159607
|
_tuple = _r;
|
|
159632
159608
|
successData = _tuple[0];
|
|
159633
159609
|
errorData = _tuple[1];
|
|
159634
|
-
/* break; */ $s = 1; continue;
|
|
159635
159610
|
$s = 8; continue;
|
|
159636
159611
|
/* } else if (_1 === (39)) { */ case 3:
|
|
159637
159612
|
_r$1 = s.startProcess(data); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
159638
159613
|
_tuple$1 = _r$1;
|
|
159639
159614
|
successData = _tuple$1[0];
|
|
159640
159615
|
errorData = _tuple$1[1];
|
|
159641
|
-
/* break; */ $s = 1; continue;
|
|
159642
159616
|
$s = 8; continue;
|
|
159643
159617
|
/* } else if (_1 === (40)) { */ case 4:
|
|
159644
159618
|
_r$2 = s.stopProcess(data); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
159645
159619
|
_tuple$2 = _r$2;
|
|
159646
159620
|
successData = _tuple$2[0];
|
|
159647
159621
|
errorData = _tuple$2[1];
|
|
159648
|
-
/* break; */ $s = 1; continue;
|
|
159649
159622
|
$s = 8; continue;
|
|
159650
159623
|
/* } else if ((_1 === (42)) || (_1 === (43))) { */ case 5:
|
|
159651
159624
|
_r$3 = s.proxyMessage(messageType, data); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
159652
159625
|
_tuple$3 = _r$3;
|
|
159653
159626
|
successData = _tuple$3[0];
|
|
159654
159627
|
errorData = _tuple$3[1];
|
|
159655
|
-
/* break; */ $s = 1; continue;
|
|
159656
159628
|
$s = 8; continue;
|
|
159657
159629
|
/* } else if (_1 === (45)) { */ case 6:
|
|
159658
159630
|
_r$4 = s.listAttachedProcesses(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
159659
159631
|
_tuple$4 = _r$4;
|
|
159660
159632
|
successData = _tuple$4[0];
|
|
159661
159633
|
errorData = _tuple$4[1];
|
|
159662
|
-
/* break; */ $s = 1; continue;
|
|
159663
159634
|
$s = 8; continue;
|
|
159664
159635
|
/* } else { */ case 7:
|
|
159665
159636
|
$r = log.Printf("Unknown message type %d\n", new sliceType$1([new message.MsgType(messageType)])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
159666
159637
|
errorData = (new sliceType$2($stringToBytes("Unknown message type")));
|
|
159667
|
-
/* break; */ $s = 1; continue;
|
|
159668
159638
|
/* } */ case 8:
|
|
159669
159639
|
case 1:
|
|
159670
159640
|
_tmp = successData;
|
|
@@ -159944,7 +159914,7 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159944
159914
|
};
|
|
159945
159915
|
Handler.prototype.proxyMessage = function(msgType, data) { return this.$val.proxyMessage(msgType, data); };
|
|
159946
159916
|
Handler.ptr.prototype.getMetadataResponsiveSender = function(data) {
|
|
159947
|
-
var {_entry, _key, _r, _r$1, _tuple, _tuple$1, data, err, metadataResponsiveSender, metadataResponsiveSender$1, metadataServer, ok, s, serverInfo, $s, $r, $c} = $restore(this, {data});
|
|
159917
|
+
var {_entry, _key, _key$1, _r, _r$1, _tuple, _tuple$1, data, err, metadataResponsiveSender, metadataResponsiveSender$1, metadataServer, ok, s, serverInfo, $s, $r, $c} = $restore(this, {data});
|
|
159948
159918
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
159949
159919
|
s = [s];
|
|
159950
159920
|
serverInfo = [serverInfo];
|
|
@@ -159968,19 +159938,20 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
159968
159938
|
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
159969
159939
|
$s = -1; return [ptrType.nil, err];
|
|
159970
159940
|
}
|
|
159941
|
+
_key = serverInfo[0].MetadataHost; (s[0].metadataServers || $throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(_key), { k: _key, v: metadataServer });
|
|
159971
159942
|
metadataResponsiveSender$1 = netclient.NewMetadataResponsiveSender(metadataServer, s[0].timeoutDuration);
|
|
159972
|
-
|
|
159973
|
-
_key = serverInfo[0].MetadataHost; (s[0].metadataResponsiveSenders || $throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(_key), { k: _key, v: metadataResponsiveSender$1 });
|
|
159943
|
+
_key$1 = serverInfo[0].MetadataHost; (s[0].metadataResponsiveSenders || $throwRuntimeError("assignment to entry in nil map")).set($String.keyFor(_key$1), { k: _key$1, v: metadataResponsiveSender$1 });
|
|
159974
159944
|
metadataServer.OnClose((function(s, serverInfo) { return function $b() {
|
|
159975
159945
|
var {$s, $r, $c} = $restore(this, {});
|
|
159976
159946
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
159977
159947
|
$r = log.Println(new sliceType$1([new $String("Metadata server was disconnected")])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
159948
|
+
$mapDelete(s[0].metadataServers, $String.keyFor(serverInfo[0].MetadataHost));
|
|
159978
159949
|
$mapDelete(s[0].metadataResponsiveSenders, $String.keyFor(serverInfo[0].MetadataHost));
|
|
159979
159950
|
$s = -1; return;
|
|
159980
159951
|
/* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f;
|
|
159981
159952
|
}; })(s, serverInfo));
|
|
159982
159953
|
$s = -1; return [metadataResponsiveSender$1, $ifaceNil];
|
|
159983
|
-
/* */ } return; } var $f = {$blk: Handler.ptr.prototype.getMetadataResponsiveSender, $c: true, $r, _entry, _key, _r, _r$1, _tuple, _tuple$1, data, err, metadataResponsiveSender, metadataResponsiveSender$1, metadataServer, ok, s, serverInfo, $s};return $f;
|
|
159954
|
+
/* */ } return; } var $f = {$blk: Handler.ptr.prototype.getMetadataResponsiveSender, $c: true, $r, _entry, _key, _key$1, _r, _r$1, _tuple, _tuple$1, data, err, metadataResponsiveSender, metadataResponsiveSender$1, metadataServer, ok, s, serverInfo, $s};return $f;
|
|
159984
159955
|
};
|
|
159985
159956
|
Handler.prototype.getMetadataResponsiveSender = function(data) { return this.$val.getMetadataResponsiveSender(data); };
|
|
159986
159957
|
Handler.ptr.prototype.createMetadataServer = function(serverInfo) {
|
|
@@ -160043,7 +160014,7 @@ $packages["github.com/supraio/client-daemon/pkg/command"] = (function() {
|
|
|
160043
160014
|
ptrType$3.methods = [{prop: "Listen", name: "Listen", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "bindMessages", name: "bindMessages", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([ptrType$2, funcType], [], false)}, {prop: "handleSocketData", name: "handleSocketData", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([sliceType$2, ptrType$2], [], false)}, {prop: "processMsg", name: "processMsg", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([message.MsgType, sliceType$2], [sliceType$2, sliceType$2], false)}, {prop: "attachProcess", name: "attachProcess", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([sliceType$2], [sliceType$2, sliceType$2], false)}, {prop: "listAttachedProcesses", name: "listAttachedProcesses", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([], [sliceType$2, sliceType$2], false)}, {prop: "startProcess", name: "startProcess", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([sliceType$2], [sliceType$2, sliceType$2], false)}, {prop: "stopProcess", name: "stopProcess", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([sliceType$2], [sliceType$2, sliceType$2], false)}, {prop: "proxyMessage", name: "proxyMessage", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([message.MsgType, sliceType$2], [sliceType$2, sliceType$2], false)}, {prop: "getMetadataResponsiveSender", name: "getMetadataResponsiveSender", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([sliceType$2], [ptrType, $error], false)}, {prop: "createMetadataServer", name: "createMetadataServer", pkg: "github.com/supraio/client-daemon/pkg/command", typ: $funcType([ServerInfo], [ptrType$1, $error], false)}];
|
|
160044
160015
|
ScreenManager.init([{prop: "ListScreens", name: "ListScreens", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "StartScreen", name: "StartScreen", pkg: "", typ: $funcType([$String, netpacket.Driver, $String, netstream.Driver, $String, $String, $String, $Bool], [$error], false)}, {prop: "StopScreen", name: "StopScreen", pkg: "", typ: $funcType([$String], [$error], false)}]);
|
|
160045
160016
|
ServerInfo.init("", [{prop: "MetadataDriver", name: "MetadataDriver", embedded: false, exported: true, typ: netstream.Driver, tag: ""}, {prop: "MetadataHost", name: "MetadataHost", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ScreenDriver", name: "ScreenDriver", embedded: false, exported: true, typ: netpacket.Driver, tag: ""}, {prop: "ScreenHost", name: "ScreenHost", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ClientID", name: "ClientID", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ClientSecret", name: "ClientSecret", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Secure", name: "Secure", embedded: false, exported: true, typ: $Bool, tag: ""}]);
|
|
160046
|
-
Handler.init("github.com/supraio/client-daemon/pkg/command", [{prop: "socketPath", name: "socketPath", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "screenManager", name: "screenManager", embedded: false, exported: false, typ: ScreenManager, tag: ""}, {prop: "metadataResponsiveSenders", name: "metadataResponsiveSenders", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "timeoutDuration", name: "timeoutDuration", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "listener", name: "listener", embedded: false, exported: false, typ: socket.Listener, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: sync.Mutex, tag: ""}]);
|
|
160017
|
+
Handler.init("github.com/supraio/client-daemon/pkg/command", [{prop: "socketPath", name: "socketPath", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "screenManager", name: "screenManager", embedded: false, exported: false, typ: ScreenManager, tag: ""}, {prop: "metadataServers", name: "metadataServers", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "metadataResponsiveSenders", name: "metadataResponsiveSenders", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "timeoutDuration", name: "timeoutDuration", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "listener", name: "listener", embedded: false, exported: false, typ: socket.Listener, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: sync.Mutex, tag: ""}]);
|
|
160047
160018
|
$init = function() {
|
|
160048
160019
|
$pkg.$init = function() {};
|
|
160049
160020
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
@@ -181852,14 +181823,114 @@ $packages["github.com/supraio/client-daemon/pkg/clientscreen"] = (function() {
|
|
|
181852
181823
|
return $pkg;
|
|
181853
181824
|
})();
|
|
181854
181825
|
$packages["github.com/supraio/client-daemon/pkg/jshelper"] = (function() {
|
|
181855
|
-
var $pkg = {}, $init, log, js;
|
|
181826
|
+
var $pkg = {}, $init, errs, log, js, ptrType, sliceType, GetError, Await;
|
|
181827
|
+
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
181856
181828
|
log = $packages["log"];
|
|
181857
181829
|
js = $packages["syscall/js"];
|
|
181830
|
+
ptrType = $ptrType(js.Value);
|
|
181831
|
+
sliceType = $sliceType($emptyInterface);
|
|
181832
|
+
GetError = function(err) {
|
|
181833
|
+
var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, err, $s, $r, $c} = $restore(this, {err});
|
|
181834
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
181835
|
+
/* */ if (err === ptrType.nil) { $s = 1; continue; }
|
|
181836
|
+
/* */ $s = 2; continue;
|
|
181837
|
+
/* if (err === ptrType.nil) { */ case 1:
|
|
181838
|
+
_r = errs.Errorf("Error is nil", sliceType.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
181839
|
+
$24r = _r;
|
|
181840
|
+
$s = 4; case 4: return $24r;
|
|
181841
|
+
/* } */ case 2:
|
|
181842
|
+
/* */ if ($clone(err, js.Value).Type() === 4) { $s = 5; continue; }
|
|
181843
|
+
/* */ if ($clone(err, js.Value).Type() === 6) { $s = 6; continue; }
|
|
181844
|
+
/* */ $s = 7; continue;
|
|
181845
|
+
/* if ($clone(err, js.Value).Type() === 4) { */ case 5:
|
|
181846
|
+
_r$1 = errs.Errorf("%s", new sliceType([new $String($clone(err, js.Value).String())])); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
181847
|
+
$24r$1 = _r$1;
|
|
181848
|
+
$s = 10; case 10: return $24r$1;
|
|
181849
|
+
/* } else if ($clone(err, js.Value).Type() === 6) { */ case 6:
|
|
181850
|
+
_r$2 = errs.Errorf("%s, stack: %s", new sliceType([new $String($clone($clone(err, js.Value).Get("message"), js.Value).String()), new $String($clone($clone(err, js.Value).Get("stack"), js.Value).String())])); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
181851
|
+
$24r$2 = _r$2;
|
|
181852
|
+
$s = 12; case 12: return $24r$2;
|
|
181853
|
+
/* } else { */ case 7:
|
|
181854
|
+
_r$3 = errs.Errorf("Unknown error type: %v", new sliceType([err])); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
181855
|
+
$24r$3 = _r$3;
|
|
181856
|
+
$s = 14; case 14: return $24r$3;
|
|
181857
|
+
/* } */ case 8:
|
|
181858
|
+
$s = -1; return $ifaceNil;
|
|
181859
|
+
/* */ } return; } var $f = {$blk: GetError, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, err, $s};return $f;
|
|
181860
|
+
};
|
|
181861
|
+
$pkg.GetError = GetError;
|
|
181862
|
+
Await = function(awaitable) {
|
|
181863
|
+
var {$24r, $24r$1, _r, _r$1, _r$2, _selection, awaitable, catch$1, catchFunc, err, result, then, thenFunc, $s, $deferred, $r, $c} = $restore(this, {awaitable});
|
|
181864
|
+
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
181865
|
+
catch$1 = [catch$1];
|
|
181866
|
+
then = [then];
|
|
181867
|
+
then[0] = new $Chan(ptrType, 0);
|
|
181868
|
+
$deferred.push([(function(catch$1, then) { return function() {
|
|
181869
|
+
$close(then[0]);
|
|
181870
|
+
then[0] = $chanNil;
|
|
181871
|
+
}; })(catch$1, then), []]);
|
|
181872
|
+
thenFunc = $clone(js.FuncOf((function(catch$1, then) { return function $b(this$1, args) {
|
|
181873
|
+
var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
181874
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
181875
|
+
/* */ if (then[0] === $chanNil) { $s = 1; continue; }
|
|
181876
|
+
/* */ $s = 2; continue;
|
|
181877
|
+
/* if (then[0] === $chanNil) { */ case 1:
|
|
181878
|
+
$r = log.Printf("Promise already resolved cannot resolve again: %v\n", new sliceType([(0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0])])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181879
|
+
$s = -1; return $ifaceNil;
|
|
181880
|
+
/* } */ case 2:
|
|
181881
|
+
$r = $send(then[0], (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181882
|
+
$s = -1; return $ifaceNil;
|
|
181883
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f;
|
|
181884
|
+
}; })(catch$1, then)), js.Func);
|
|
181885
|
+
$deferred.push([$methodVal($clone(thenFunc, js.Func), "Release"), []]);
|
|
181886
|
+
catch$1[0] = new $Chan(ptrType, 0);
|
|
181887
|
+
$deferred.push([(function(catch$1, then) { return function() {
|
|
181888
|
+
$close(catch$1[0]);
|
|
181889
|
+
catch$1[0] = $chanNil;
|
|
181890
|
+
}; })(catch$1, then), []]);
|
|
181891
|
+
catchFunc = $clone(js.FuncOf((function(catch$1, then) { return function $b(this$1, args) {
|
|
181892
|
+
var {_arg, _r, args, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
181893
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
181894
|
+
/* */ if (catch$1[0] === $chanNil) { $s = 1; continue; }
|
|
181895
|
+
/* */ $s = 2; continue;
|
|
181896
|
+
/* if (catch$1[0] === $chanNil) { */ case 1:
|
|
181897
|
+
_r = GetError((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
181898
|
+
_arg = _r;
|
|
181899
|
+
$r = errs.Print("Promise already resolved cannot be rejected", _arg); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181900
|
+
$s = -1; return $ifaceNil;
|
|
181901
|
+
/* } */ case 2:
|
|
181902
|
+
$r = $send(catch$1[0], (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181903
|
+
$s = -1; return $ifaceNil;
|
|
181904
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _r, args, this$1, $s};return $f;
|
|
181905
|
+
}; })(catch$1, then)), js.Func);
|
|
181906
|
+
$deferred.push([$methodVal($clone(catchFunc, js.Func), "Release"), []]);
|
|
181907
|
+
_r = $clone(awaitable, js.Value).Call("then", new sliceType([new thenFunc.constructor.elem(thenFunc)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
181908
|
+
_r$1 = $clone(_r, js.Value).Call("catch", new sliceType([new catchFunc.constructor.elem(catchFunc)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
181909
|
+
_r$1;
|
|
181910
|
+
_r$2 = $select([[then[0]], [catch$1[0]]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
181911
|
+
_selection = _r$2;
|
|
181912
|
+
/* */ if (_selection[0] === 0) { $s = 4; continue; }
|
|
181913
|
+
/* */ if (_selection[0] === 1) { $s = 5; continue; }
|
|
181914
|
+
/* */ $s = 6; continue;
|
|
181915
|
+
/* if (_selection[0] === 0) { */ case 4:
|
|
181916
|
+
result = _selection[1][0];
|
|
181917
|
+
$24r = [result, ptrType.nil];
|
|
181918
|
+
$s = 7; case 7: return $24r;
|
|
181919
|
+
/* } else if (_selection[0] === 1) { */ case 5:
|
|
181920
|
+
err = _selection[1][0];
|
|
181921
|
+
$24r$1 = [ptrType.nil, err];
|
|
181922
|
+
$s = 8; case 8: return $24r$1;
|
|
181923
|
+
/* } */ case 6:
|
|
181924
|
+
$s = -1; return [ptrType.nil, ptrType.nil];
|
|
181925
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType.nil, ptrType.nil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Await, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _selection, awaitable, catch$1, catchFunc, err, result, then, thenFunc, $s, $deferred};return $f; } }
|
|
181926
|
+
};
|
|
181927
|
+
$pkg.Await = Await;
|
|
181858
181928
|
$init = function() {
|
|
181859
181929
|
$pkg.$init = function() {};
|
|
181860
181930
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
181861
|
-
$r =
|
|
181862
|
-
$r =
|
|
181931
|
+
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181932
|
+
$r = log.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181933
|
+
$r = js.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
181863
181934
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
181864
181935
|
};
|
|
181865
181936
|
$pkg.$init = $init;
|
|
@@ -182663,12 +182734,11 @@ $packages["github.com/nuberu/webgl/extensions"] = (function() {
|
|
|
182663
182734
|
return $pkg;
|
|
182664
182735
|
})();
|
|
182665
182736
|
$packages["github.com/nuberu/webgl"] = (function() {
|
|
182666
|
-
var $pkg = {}, $init, errors, fmt, extensions, types,
|
|
182737
|
+
var $pkg = {}, $init, errors, fmt, extensions, types, runtime, js, RenderingContext, funcType, arrayType, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, sliceType$1, ptrType$7, arrayType$1, arrayType$2, arrayType$3, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, sliceType$7, sliceType$8, sliceType$9, sliceType$10, sliceType$11, sliceType$12, sliceType$13, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, WrapContext, FromCanvas, polyfillOldVersion, TypedArrayOf;
|
|
182667
182738
|
errors = $packages["errors"];
|
|
182668
182739
|
fmt = $packages["fmt"];
|
|
182669
182740
|
extensions = $packages["github.com/nuberu/webgl/extensions"];
|
|
182670
182741
|
types = $packages["github.com/nuberu/webgl/types"];
|
|
182671
|
-
reflect = $packages["reflect"];
|
|
182672
182742
|
runtime = $packages["runtime"];
|
|
182673
182743
|
js = $packages["syscall/js"];
|
|
182674
182744
|
RenderingContext = $pkg.RenderingContext = $newType(0, $kindStruct, "webgl.RenderingContext", true, "github.com/nuberu/webgl", true, function(loaded_, js_, version_) {
|
|
@@ -182707,27 +182777,15 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
182707
182777
|
sliceType$8 = $sliceType($Int8);
|
|
182708
182778
|
sliceType$9 = $sliceType($Int16);
|
|
182709
182779
|
sliceType$10 = $sliceType($Int32);
|
|
182710
|
-
sliceType$11 = $sliceType($
|
|
182711
|
-
sliceType$12 = $sliceType($
|
|
182712
|
-
sliceType$13 = $sliceType($
|
|
182713
|
-
ptrType$8 = $ptrType(
|
|
182714
|
-
ptrType$9 = $ptrType(
|
|
182715
|
-
ptrType$10 = $ptrType(
|
|
182716
|
-
ptrType$11 = $ptrType(
|
|
182717
|
-
ptrType$12 = $ptrType(
|
|
182718
|
-
ptrType$13 = $ptrType(
|
|
182719
|
-
ptrType$14 = $ptrType(sliceType$6);
|
|
182720
|
-
ptrType$15 = $ptrType(sliceType$12);
|
|
182721
|
-
ptrType$16 = $ptrType(sliceType$7);
|
|
182722
|
-
ptrType$17 = $ptrType(sliceType$13);
|
|
182723
|
-
sliceType$14 = $sliceType($Int);
|
|
182724
|
-
sliceType$15 = $sliceType($Uint);
|
|
182725
|
-
ptrType$18 = $ptrType(types.VertexArray);
|
|
182726
|
-
ptrType$19 = $ptrType(types.ActiveInfo);
|
|
182727
|
-
ptrType$20 = $ptrType(extensions.Extension);
|
|
182728
|
-
ptrType$21 = $ptrType(extensions.LoseContext);
|
|
182729
|
-
ptrType$22 = $ptrType(types.ShaderPrecisionFormat);
|
|
182730
|
-
ptrType$23 = $ptrType(types.UniformLocation);
|
|
182780
|
+
sliceType$11 = $sliceType($Float64);
|
|
182781
|
+
sliceType$12 = $sliceType($Int);
|
|
182782
|
+
sliceType$13 = $sliceType($Uint);
|
|
182783
|
+
ptrType$8 = $ptrType(types.VertexArray);
|
|
182784
|
+
ptrType$9 = $ptrType(types.ActiveInfo);
|
|
182785
|
+
ptrType$10 = $ptrType(extensions.Extension);
|
|
182786
|
+
ptrType$11 = $ptrType(extensions.LoseContext);
|
|
182787
|
+
ptrType$12 = $ptrType(types.ShaderPrecisionFormat);
|
|
182788
|
+
ptrType$13 = $ptrType(types.UniformLocation);
|
|
182731
182789
|
WrapContext = function(jsContext) {
|
|
182732
182790
|
var context, jsContext;
|
|
182733
182791
|
context = new RenderingContext.ptr(true, $clone(jsContext, js.Value), 0);
|
|
@@ -186525,96 +186583,10 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
186525
186583
|
/* */ } return; } var $f = {$blk: RenderingContext.ptr.prototype.Viewport, $c: true, $r, _r, c, height, width, x, y, $s};return $f;
|
|
186526
186584
|
};
|
|
186527
186585
|
RenderingContext.prototype.Viewport = function(x, y, width, height) { return this.$val.Viewport(x, y, width, height); };
|
|
186528
|
-
sliceToByteSlice = function(s) {
|
|
186529
|
-
var {_r, _ref, h, h$1, h$2, h$3, h$4, h$5, h$6, h$7, h$8, s, s$1, s$10, s$11, s$2, s$3, s$4, s$5, s$6, s$7, s$8, s$9, $s, $r, $c} = $restore(this, {s});
|
|
186530
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186531
|
-
s$1 = [s$1];
|
|
186532
|
-
s$2 = [s$2];
|
|
186533
|
-
s$3 = [s$3];
|
|
186534
|
-
s$4 = [s$4];
|
|
186535
|
-
s$5 = [s$5];
|
|
186536
|
-
s$6 = [s$6];
|
|
186537
|
-
s$7 = [s$7];
|
|
186538
|
-
s$8 = [s$8];
|
|
186539
|
-
s$9 = [s$9];
|
|
186540
|
-
_ref = s;
|
|
186541
|
-
/* */ if ($assertType(_ref, sliceType$8, true)[1]) { $s = 1; continue; }
|
|
186542
|
-
/* */ if ($assertType(_ref, sliceType$9, true)[1]) { $s = 2; continue; }
|
|
186543
|
-
/* */ if ($assertType(_ref, sliceType$10, true)[1]) { $s = 3; continue; }
|
|
186544
|
-
/* */ if ($assertType(_ref, sliceType$11, true)[1]) { $s = 4; continue; }
|
|
186545
|
-
/* */ if ($assertType(_ref, sliceType$4, true)[1]) { $s = 5; continue; }
|
|
186546
|
-
/* */ if ($assertType(_ref, sliceType$5, true)[1]) { $s = 6; continue; }
|
|
186547
|
-
/* */ if ($assertType(_ref, sliceType$6, true)[1]) { $s = 7; continue; }
|
|
186548
|
-
/* */ if ($assertType(_ref, sliceType$12, true)[1]) { $s = 8; continue; }
|
|
186549
|
-
/* */ if ($assertType(_ref, sliceType$7, true)[1]) { $s = 9; continue; }
|
|
186550
|
-
/* */ if ($assertType(_ref, sliceType$13, true)[1]) { $s = 10; continue; }
|
|
186551
|
-
/* */ $s = 11; continue;
|
|
186552
|
-
/* if ($assertType(_ref, sliceType$8, true)[1]) { */ case 1:
|
|
186553
|
-
s$1[0] = _ref.$val;
|
|
186554
|
-
h = ($pointerOfStructConversion(((s$1.$ptr || (s$1.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$1)))), ptrType$8));
|
|
186555
|
-
$s = -1; return ((h)).$get();
|
|
186556
|
-
/* } else if ($assertType(_ref, sliceType$9, true)[1]) { */ case 2:
|
|
186557
|
-
s$2[0] = _ref.$val;
|
|
186558
|
-
h$1 = ($pointerOfStructConversion(((s$2.$ptr || (s$2.$ptr = new ptrType$10(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$2)))), ptrType$8));
|
|
186559
|
-
h$1.Len = $imul(h$1.Len, (2));
|
|
186560
|
-
h$1.Cap = $imul(h$1.Cap, (2));
|
|
186561
|
-
$s = -1; return ((h$1)).$get();
|
|
186562
|
-
/* } else if ($assertType(_ref, sliceType$10, true)[1]) { */ case 3:
|
|
186563
|
-
s$3[0] = _ref.$val;
|
|
186564
|
-
h$2 = ($pointerOfStructConversion(((s$3.$ptr || (s$3.$ptr = new ptrType$11(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$3)))), ptrType$8));
|
|
186565
|
-
h$2.Len = $imul(h$2.Len, (4));
|
|
186566
|
-
h$2.Cap = $imul(h$2.Cap, (4));
|
|
186567
|
-
$s = -1; return ((h$2)).$get();
|
|
186568
|
-
/* } else if ($assertType(_ref, sliceType$11, true)[1]) { */ case 4:
|
|
186569
|
-
s$4[0] = _ref.$val;
|
|
186570
|
-
h$3 = ($pointerOfStructConversion(((s$4.$ptr || (s$4.$ptr = new ptrType$12(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$4)))), ptrType$8));
|
|
186571
|
-
h$3.Len = $imul(h$3.Len, (8));
|
|
186572
|
-
h$3.Cap = $imul(h$3.Cap, (8));
|
|
186573
|
-
$s = -1; return ((h$3)).$get();
|
|
186574
|
-
/* } else if ($assertType(_ref, sliceType$4, true)[1]) { */ case 5:
|
|
186575
|
-
s$10 = _ref.$val;
|
|
186576
|
-
$s = -1; return s$10;
|
|
186577
|
-
/* } else if ($assertType(_ref, sliceType$5, true)[1]) { */ case 6:
|
|
186578
|
-
s$5[0] = _ref.$val;
|
|
186579
|
-
h$4 = ($pointerOfStructConversion(((s$5.$ptr || (s$5.$ptr = new ptrType$13(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$5)))), ptrType$8));
|
|
186580
|
-
h$4.Len = $imul(h$4.Len, (2));
|
|
186581
|
-
h$4.Cap = $imul(h$4.Cap, (2));
|
|
186582
|
-
$s = -1; return ((h$4)).$get();
|
|
186583
|
-
/* } else if ($assertType(_ref, sliceType$6, true)[1]) { */ case 7:
|
|
186584
|
-
s$6[0] = _ref.$val;
|
|
186585
|
-
h$5 = ($pointerOfStructConversion(((s$6.$ptr || (s$6.$ptr = new ptrType$14(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$6)))), ptrType$8));
|
|
186586
|
-
h$5.Len = $imul(h$5.Len, (4));
|
|
186587
|
-
h$5.Cap = $imul(h$5.Cap, (4));
|
|
186588
|
-
$s = -1; return ((h$5)).$get();
|
|
186589
|
-
/* } else if ($assertType(_ref, sliceType$12, true)[1]) { */ case 8:
|
|
186590
|
-
s$7[0] = _ref.$val;
|
|
186591
|
-
h$6 = ($pointerOfStructConversion(((s$7.$ptr || (s$7.$ptr = new ptrType$15(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$7)))), ptrType$8));
|
|
186592
|
-
h$6.Len = $imul(h$6.Len, (8));
|
|
186593
|
-
h$6.Cap = $imul(h$6.Cap, (8));
|
|
186594
|
-
$s = -1; return ((h$6)).$get();
|
|
186595
|
-
/* } else if ($assertType(_ref, sliceType$7, true)[1]) { */ case 9:
|
|
186596
|
-
s$8[0] = _ref.$val;
|
|
186597
|
-
h$7 = ($pointerOfStructConversion(((s$8.$ptr || (s$8.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$8)))), ptrType$8));
|
|
186598
|
-
h$7.Len = $imul(h$7.Len, (4));
|
|
186599
|
-
h$7.Cap = $imul(h$7.Cap, (4));
|
|
186600
|
-
$s = -1; return ((h$7)).$get();
|
|
186601
|
-
/* } else if ($assertType(_ref, sliceType$13, true)[1]) { */ case 10:
|
|
186602
|
-
s$9[0] = _ref.$val;
|
|
186603
|
-
h$8 = ($pointerOfStructConversion(((s$9.$ptr || (s$9.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, s$9)))), ptrType$8));
|
|
186604
|
-
h$8.Len = $imul(h$8.Len, (8));
|
|
186605
|
-
h$8.Cap = $imul(h$8.Cap, (8));
|
|
186606
|
-
$s = -1; return ((h$8)).$get();
|
|
186607
|
-
/* } else { */ case 11:
|
|
186608
|
-
s$11 = _ref;
|
|
186609
|
-
_r = fmt.Sprintf("jsutil: unexpected value at sliceToBytesSlice: %T", new sliceType([s$11])); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186610
|
-
$panic(new $String(_r));
|
|
186611
|
-
/* } */ case 12:
|
|
186612
|
-
$s = -1; return sliceType$4.nil;
|
|
186613
|
-
/* */ } return; } var $f = {$blk: sliceToByteSlice, $c: true, $r, _r, _ref, h, h$1, h$2, h$3, h$4, h$5, h$6, h$7, h$8, s, s$1, s$10, s$11, s$2, s$3, s$4, s$5, s$6, s$7, s$8, s$9, $s};return $f;
|
|
186614
|
-
};
|
|
186615
186586
|
TypedArrayOf = function(s) {
|
|
186616
|
-
var {
|
|
186587
|
+
var {_i, _i$1, _i$2, _i$3, _i$4, _i$5, _i$6, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, i, i$1, i$2, i$3, i$4, i$5, i$6, result, s, s$1, s$2, s$3, s$4, s$5, s$6, s$7, s$8, s$9, v, v$1, v$2, v$3, v$4, v$5, v$6, $s, $r, $c} = $restore(this, {s});
|
|
186617
186588
|
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186589
|
+
result = new js.Value.ptr(null, false, arrayType.zero());
|
|
186618
186590
|
_ref = s;
|
|
186619
186591
|
/* */ if ($assertType(_ref, sliceType$8, true)[1]) { $s = 1; continue; }
|
|
186620
186592
|
/* */ if ($assertType(_ref, sliceType$9, true)[1]) { $s = 2; continue; }
|
|
@@ -186623,123 +186595,123 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
186623
186595
|
/* */ if ($assertType(_ref, sliceType$5, true)[1]) { $s = 5; continue; }
|
|
186624
186596
|
/* */ if ($assertType(_ref, sliceType$6, true)[1]) { $s = 6; continue; }
|
|
186625
186597
|
/* */ if ($assertType(_ref, sliceType$7, true)[1]) { $s = 7; continue; }
|
|
186626
|
-
/* */ if ($assertType(_ref, sliceType$
|
|
186598
|
+
/* */ if ($assertType(_ref, sliceType$11, true)[1]) { $s = 8; continue; }
|
|
186627
186599
|
/* */ $s = 9; continue;
|
|
186628
186600
|
/* if ($assertType(_ref, sliceType$8, true)[1]) { */ case 1:
|
|
186629
186601
|
s$1 = _ref.$val;
|
|
186630
|
-
_r = $clone($clone(js.Global(), js.Value).Get("
|
|
186631
|
-
|
|
186632
|
-
|
|
186633
|
-
|
|
186634
|
-
|
|
186635
|
-
|
|
186636
|
-
|
|
186637
|
-
|
|
186638
|
-
|
|
186639
|
-
|
|
186640
|
-
|
|
186641
|
-
$s =
|
|
186602
|
+
_r = $clone($clone(js.Global(), js.Value).Get("Int8Array"), js.Value).New(new sliceType([new $Int(s$1.$length)])); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186603
|
+
js.Value.copy(result, _r);
|
|
186604
|
+
_ref$1 = s$1;
|
|
186605
|
+
_i = 0;
|
|
186606
|
+
while (true) {
|
|
186607
|
+
if (!(_i < _ref$1.$length)) { break; }
|
|
186608
|
+
i = _i;
|
|
186609
|
+
v = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]);
|
|
186610
|
+
$clone(result, js.Value).SetIndex(i, new $Int8(v));
|
|
186611
|
+
_i++;
|
|
186612
|
+
}
|
|
186613
|
+
$s = 10; continue;
|
|
186642
186614
|
/* } else if ($assertType(_ref, sliceType$9, true)[1]) { */ case 2:
|
|
186643
186615
|
s$2 = _ref.$val;
|
|
186644
|
-
_r$
|
|
186645
|
-
|
|
186646
|
-
|
|
186647
|
-
|
|
186648
|
-
|
|
186649
|
-
|
|
186650
|
-
|
|
186651
|
-
|
|
186652
|
-
|
|
186653
|
-
|
|
186654
|
-
|
|
186655
|
-
$s =
|
|
186616
|
+
_r$1 = $clone($clone(js.Global(), js.Value).Get("Int16Array"), js.Value).New(new sliceType([new $Int(s$2.$length)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
186617
|
+
js.Value.copy(result, _r$1);
|
|
186618
|
+
_ref$2 = s$2;
|
|
186619
|
+
_i$1 = 0;
|
|
186620
|
+
while (true) {
|
|
186621
|
+
if (!(_i$1 < _ref$2.$length)) { break; }
|
|
186622
|
+
i$1 = _i$1;
|
|
186623
|
+
v$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]);
|
|
186624
|
+
$clone(result, js.Value).SetIndex(i$1, new $Int16(v$1));
|
|
186625
|
+
_i$1++;
|
|
186626
|
+
}
|
|
186627
|
+
$s = 10; continue;
|
|
186656
186628
|
/* } else if ($assertType(_ref, sliceType$10, true)[1]) { */ case 3:
|
|
186657
186629
|
s$3 = _ref.$val;
|
|
186658
|
-
_r$
|
|
186659
|
-
|
|
186660
|
-
|
|
186661
|
-
|
|
186662
|
-
|
|
186663
|
-
|
|
186664
|
-
|
|
186665
|
-
|
|
186666
|
-
|
|
186667
|
-
|
|
186668
|
-
|
|
186669
|
-
$s =
|
|
186630
|
+
_r$2 = $clone($clone(js.Global(), js.Value).Get("Int32Array"), js.Value).New(new sliceType([new $Int(s$3.$length)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
186631
|
+
js.Value.copy(result, _r$2);
|
|
186632
|
+
_ref$3 = s$3;
|
|
186633
|
+
_i$2 = 0;
|
|
186634
|
+
while (true) {
|
|
186635
|
+
if (!(_i$2 < _ref$3.$length)) { break; }
|
|
186636
|
+
i$2 = _i$2;
|
|
186637
|
+
v$2 = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$2]);
|
|
186638
|
+
$clone(result, js.Value).SetIndex(i$2, new $Int32(v$2));
|
|
186639
|
+
_i$2++;
|
|
186640
|
+
}
|
|
186641
|
+
$s = 10; continue;
|
|
186670
186642
|
/* } else if ($assertType(_ref, sliceType$4, true)[1]) { */ case 4:
|
|
186671
186643
|
s$4 = _ref.$val;
|
|
186672
|
-
_r$
|
|
186673
|
-
|
|
186674
|
-
js.CopyBytesToJS($clone(
|
|
186644
|
+
_r$3 = $clone($clone(js.Global(), js.Value).Get("Uint8Array"), js.Value).New(new sliceType([new $Int(s$4.$length)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
186645
|
+
js.Value.copy(result, _r$3);
|
|
186646
|
+
js.CopyBytesToJS($clone(result, js.Value), s$4);
|
|
186675
186647
|
runtime.KeepAlive(s$4);
|
|
186676
|
-
$s =
|
|
186648
|
+
$s = 10; continue;
|
|
186677
186649
|
/* } else if ($assertType(_ref, sliceType$5, true)[1]) { */ case 5:
|
|
186678
186650
|
s$5 = _ref.$val;
|
|
186679
|
-
_r$
|
|
186680
|
-
|
|
186681
|
-
|
|
186682
|
-
|
|
186683
|
-
|
|
186684
|
-
|
|
186685
|
-
|
|
186686
|
-
|
|
186687
|
-
|
|
186688
|
-
|
|
186689
|
-
|
|
186690
|
-
$s =
|
|
186651
|
+
_r$4 = $clone($clone(js.Global(), js.Value).Get("Uint16Array"), js.Value).New(new sliceType([new $Int(s$5.$length)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
186652
|
+
js.Value.copy(result, _r$4);
|
|
186653
|
+
_ref$4 = s$5;
|
|
186654
|
+
_i$3 = 0;
|
|
186655
|
+
while (true) {
|
|
186656
|
+
if (!(_i$3 < _ref$4.$length)) { break; }
|
|
186657
|
+
i$3 = _i$3;
|
|
186658
|
+
v$3 = ((_i$3 < 0 || _i$3 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$3]);
|
|
186659
|
+
$clone(result, js.Value).SetIndex(i$3, new $Uint16(v$3));
|
|
186660
|
+
_i$3++;
|
|
186661
|
+
}
|
|
186662
|
+
$s = 10; continue;
|
|
186691
186663
|
/* } else if ($assertType(_ref, sliceType$6, true)[1]) { */ case 6:
|
|
186692
186664
|
s$6 = _ref.$val;
|
|
186693
|
-
_r$
|
|
186694
|
-
|
|
186695
|
-
|
|
186696
|
-
|
|
186697
|
-
|
|
186698
|
-
|
|
186699
|
-
|
|
186700
|
-
|
|
186701
|
-
|
|
186702
|
-
|
|
186703
|
-
|
|
186704
|
-
$s =
|
|
186665
|
+
_r$5 = $clone($clone(js.Global(), js.Value).Get("Uint32Array"), js.Value).New(new sliceType([new $Int(s$6.$length)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
186666
|
+
js.Value.copy(result, _r$5);
|
|
186667
|
+
_ref$5 = s$6;
|
|
186668
|
+
_i$4 = 0;
|
|
186669
|
+
while (true) {
|
|
186670
|
+
if (!(_i$4 < _ref$5.$length)) { break; }
|
|
186671
|
+
i$4 = _i$4;
|
|
186672
|
+
v$4 = ((_i$4 < 0 || _i$4 >= _ref$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$5.$array[_ref$5.$offset + _i$4]);
|
|
186673
|
+
$clone(result, js.Value).SetIndex(i$4, new $Uint32(v$4));
|
|
186674
|
+
_i$4++;
|
|
186675
|
+
}
|
|
186676
|
+
$s = 10; continue;
|
|
186705
186677
|
/* } else if ($assertType(_ref, sliceType$7, true)[1]) { */ case 7:
|
|
186706
186678
|
s$7 = _ref.$val;
|
|
186707
|
-
_r$
|
|
186708
|
-
|
|
186709
|
-
|
|
186710
|
-
|
|
186711
|
-
|
|
186712
|
-
|
|
186713
|
-
|
|
186714
|
-
|
|
186715
|
-
|
|
186716
|
-
|
|
186717
|
-
|
|
186718
|
-
$s =
|
|
186719
|
-
/* } else if ($assertType(_ref, sliceType$
|
|
186679
|
+
_r$6 = $clone($clone(js.Global(), js.Value).Get("Float32Array"), js.Value).New(new sliceType([new $Int(s$7.$length)])); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
186680
|
+
js.Value.copy(result, _r$6);
|
|
186681
|
+
_ref$6 = s$7;
|
|
186682
|
+
_i$5 = 0;
|
|
186683
|
+
while (true) {
|
|
186684
|
+
if (!(_i$5 < _ref$6.$length)) { break; }
|
|
186685
|
+
i$5 = _i$5;
|
|
186686
|
+
v$5 = ((_i$5 < 0 || _i$5 >= _ref$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$6.$array[_ref$6.$offset + _i$5]);
|
|
186687
|
+
$clone(result, js.Value).SetIndex(i$5, new $Float32(v$5));
|
|
186688
|
+
_i$5++;
|
|
186689
|
+
}
|
|
186690
|
+
$s = 10; continue;
|
|
186691
|
+
/* } else if ($assertType(_ref, sliceType$11, true)[1]) { */ case 8:
|
|
186720
186692
|
s$8 = _ref.$val;
|
|
186721
|
-
_r$
|
|
186722
|
-
|
|
186723
|
-
|
|
186724
|
-
|
|
186725
|
-
|
|
186726
|
-
|
|
186727
|
-
|
|
186728
|
-
|
|
186729
|
-
|
|
186730
|
-
|
|
186731
|
-
|
|
186732
|
-
$s =
|
|
186693
|
+
_r$7 = $clone($clone(js.Global(), js.Value).Get("Float64Array"), js.Value).New(new sliceType([new $Int(s$8.$length)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
186694
|
+
js.Value.copy(result, _r$7);
|
|
186695
|
+
_ref$7 = s$8;
|
|
186696
|
+
_i$6 = 0;
|
|
186697
|
+
while (true) {
|
|
186698
|
+
if (!(_i$6 < _ref$7.$length)) { break; }
|
|
186699
|
+
i$6 = _i$6;
|
|
186700
|
+
v$6 = ((_i$6 < 0 || _i$6 >= _ref$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$7.$array[_ref$7.$offset + _i$6]);
|
|
186701
|
+
$clone(result, js.Value).SetIndex(i$6, new $Float64(v$6));
|
|
186702
|
+
_i$6++;
|
|
186703
|
+
}
|
|
186704
|
+
$s = 10; continue;
|
|
186733
186705
|
/* } else { */ case 9:
|
|
186734
186706
|
s$9 = _ref;
|
|
186735
|
-
_r$
|
|
186736
|
-
$panic(new $String(_r$
|
|
186707
|
+
_r$8 = fmt.Sprintf("jsutil: unexpected value at SliceToTypedArray: %T", new sliceType([s$9])); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; }
|
|
186708
|
+
$panic(new $String(_r$8));
|
|
186737
186709
|
/* } */ case 10:
|
|
186738
|
-
$s = -1; return
|
|
186739
|
-
/* */ } return; } var $f = {$blk: TypedArrayOf, $c: true, $r,
|
|
186710
|
+
$s = -1; return result;
|
|
186711
|
+
/* */ } return; } var $f = {$blk: TypedArrayOf, $c: true, $r, _i, _i$1, _i$2, _i$3, _i$4, _i$5, _i$6, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, i, i$1, i$2, i$3, i$4, i$5, i$6, result, s, s$1, s$2, s$3, s$4, s$5, s$6, s$7, s$8, s$9, v, v$1, v$2, v$3, v$4, v$5, v$6, $s};return $f;
|
|
186740
186712
|
};
|
|
186741
186713
|
$pkg.TypedArrayOf = TypedArrayOf;
|
|
186742
|
-
ptrType.methods = [{prop: "GetJs", name: "GetJs", pkg: "", typ: $funcType([], [js.Value], false)}, {prop: "GetDrawingBufferWidth", name: "GetDrawingBufferWidth", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetDrawingBufferHeight", name: "GetDrawingBufferHeight", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetCanvas", name: "GetCanvas", pkg: "", typ: $funcType([], [js.Value], false)}, {prop: "ActiveTexture", name: "ActiveTexture", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AttachShader", name: "AttachShader", pkg: "", typ: $funcType([ptrType$1, ptrType$6], [], false)}, {prop: "BindAttribLocation", name: "BindAttribLocation", pkg: "", typ: $funcType([ptrType$1, $Int, $String], [], false)}, {prop: "BindBuffer", name: "BindBuffer", pkg: "", typ: $funcType([types.GLEnum, ptrType$2], [], false)}, {prop: "BindFrameBuffer", name: "BindFrameBuffer", pkg: "", typ: $funcType([types.GLEnum, ptrType$3], [], false)}, {prop: "BindRenderBuffer", name: "BindRenderBuffer", pkg: "", typ: $funcType([types.GLEnum, ptrType$4], [], false)}, {prop: "BindTexture", name: "BindTexture", pkg: "", typ: $funcType([types.GLEnum, ptrType$5], [], false)}, {prop: "BlendColor", name: "BlendColor", pkg: "", typ: $funcType([$Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "BlendEquation", name: "BlendEquation", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "BlendEquationSeparate", name: "BlendEquationSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "BlendFunc", name: "BlendFunc", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "BlendFuncSeparate", name: "BlendFuncSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "BufferDataBySize", name: "BufferDataBySize", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum], [], false)}, {prop: "BufferData", name: "BufferData", pkg: "", typ: $funcType([types.GLEnum, sliceType$7, types.GLEnum], [], false)}, {prop: "BufferDataI", name: "BufferDataI", pkg: "", typ: $funcType([types.GLEnum, sliceType$14, types.GLEnum], [], false)}, {prop: "BufferDataUI", name: "BufferDataUI", pkg: "", typ: $funcType([types.GLEnum, sliceType$6, types.GLEnum], [], false)}, {prop: "BufferDataUI16", name: "BufferDataUI16", pkg: "", typ: $funcType([types.GLEnum, sliceType$5, types.GLEnum], [], false)}, {prop: "BufferDataWithOffset", name: "BufferDataWithOffset", pkg: "", typ: $funcType([types.GLEnum, sliceType$7, types.GLEnum, $Uint, $Uint], [], false)}, {prop: "BufferDataIWithOffset", name: "BufferDataIWithOffset", pkg: "", typ: $funcType([types.GLEnum, sliceType$14, types.GLEnum, $Uint, $Uint], [], false)}, {prop: "BufferDataUIWithOffset", name: "BufferDataUIWithOffset", pkg: "", typ: $funcType([types.GLEnum, sliceType$15, types.GLEnum, $Uint, $Uint], [], false)}, {prop: "BufferSubData", name: "BufferSubData", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$7], [], false)}, {prop: "BufferSubDataI", name: "BufferSubDataI", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$14], [], false)}, {prop: "BufferSubDataUI", name: "BufferSubDataUI", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$15], [], false)}, {prop: "BufferSubDataWithOffset", name: "BufferSubDataWithOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$7, $Uint, $Uint], [], false)}, {prop: "BufferSubDataIWithOffset", name: "BufferSubDataIWithOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$14, $Uint, $Uint], [], false)}, {prop: "BufferSubDataUIWithOffset", name: "BufferSubDataUIWithOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$15, $Uint, $Uint], [], false)}, {prop: "CheckFrameBufferStatus", name: "CheckFrameBufferStatus", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "ClearColor", name: "ClearColor", pkg: "", typ: $funcType([$Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "ClearDepth", name: "ClearDepth", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "ClearStencil", name: "ClearStencil", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "ColorMask", name: "ColorMask", pkg: "", typ: $funcType([$Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "Commit", name: "Commit", pkg: "", typ: $funcType([], [], false)}, {prop: "CompileShader", name: "CompileShader", pkg: "", typ: $funcType([ptrType$6], [], false)}, {prop: "CompressedTexImage2D", name: "CompressedTexImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int], [], false)}, {prop: "CompressedTexImage2DIn", name: "CompressedTexImage2DIn", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, sliceType$7], [], false)}, {prop: "CompressedTexImage2DOffset", name: "CompressedTexImage2DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CompressedTexImage2DFromOffset", name: "CompressedTexImage2DFromOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, sliceType$7, $Int, $Int], [], false)}, {prop: "CompressedTexImage3DOffset", name: "CompressedTexImage3DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CompressedTexImage3DFromOffset", name: "CompressedTexImage3DFromOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, sliceType$7, $Int, $Int], [], false)}, {prop: "CompressedTexSubImage2D", name: "CompressedTexSubImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum], [], false)}, {prop: "CompressedTexSubImage2DIn", name: "CompressedTexSubImage2DIn", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, sliceType$7], [], false)}, {prop: "CompressedTexSubImage2DFrom", name: "CompressedTexSubImage2DFrom", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, $Int, $Int], [], false)}, {prop: "CompressedTexSubImage2DFromOffset", name: "CompressedTexSubImage2DFromOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, sliceType$7, $Int, $Int], [], false)}, {prop: "CopyTexImage2D", name: "CopyTexImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CopyTexSubImage2D", name: "CopyTexSubImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CreateVertexArray", name: "CreateVertexArray", pkg: "", typ: $funcType([], [ptrType$18], false)}, {prop: "BindVertexArray", name: "BindVertexArray", pkg: "", typ: $funcType([ptrType$18], [], false)}, {prop: "CreateBuffer", name: "CreateBuffer", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "CreateFrameBuffer", name: "CreateFrameBuffer", pkg: "", typ: $funcType([], [ptrType$3], false)}, {prop: "CreateProgram", name: "CreateProgram", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "CreateRenderBuffer", name: "CreateRenderBuffer", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "CreateShader", name: "CreateShader", pkg: "", typ: $funcType([types.GLEnum], [ptrType$6], false)}, {prop: "CreateFragmentShader", name: "CreateFragmentShader", pkg: "", typ: $funcType([], [ptrType$6], false)}, {prop: "CreateVertexShader", name: "CreateVertexShader", pkg: "", typ: $funcType([], [ptrType$6], false)}, {prop: "CreateTexture", name: "CreateTexture", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "CullFace", name: "CullFace", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "DeleteBuffer", name: "DeleteBuffer", pkg: "", typ: $funcType([ptrType$2], [], false)}, {prop: "DeleteFrameBuffer", name: "DeleteFrameBuffer", pkg: "", typ: $funcType([ptrType$3], [], false)}, {prop: "DeleteProgram", name: "DeleteProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "DeleteRenderBuffer", name: "DeleteRenderBuffer", pkg: "", typ: $funcType([ptrType$4], [], false)}, {prop: "DeleteShader", name: "DeleteShader", pkg: "", typ: $funcType([ptrType$6], [], false)}, {prop: "DeleteTexture", name: "DeleteTexture", pkg: "", typ: $funcType([ptrType$5], [], false)}, {prop: "DepthFunc", name: "DepthFunc", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "DepthMask", name: "DepthMask", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "DepthRange", name: "DepthRange", pkg: "", typ: $funcType([$Float32, $Float32], [], false)}, {prop: "DetachShader", name: "DetachShader", pkg: "", typ: $funcType([ptrType$1, ptrType$6], [], false)}, {prop: "Disable", name: "Disable", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "DisableVertexAttribArray", name: "DisableVertexAttribArray", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "DrawArrays", name: "DrawArrays", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int], [], false)}, {prop: "DrawElements", name: "DrawElements", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int64], [], false)}, {prop: "Enable", name: "Enable", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "EnableVertexAttribArray", name: "EnableVertexAttribArray", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Finnish", name: "Finnish", pkg: "", typ: $funcType([], [], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "FrameBufferRenderbuffer", name: "FrameBufferRenderbuffer", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, ptrType$4], [], false)}, {prop: "FrameBufferTexture2D", name: "FrameBufferTexture2D", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, ptrType$5, $Int], [], false)}, {prop: "FrontFace", name: "FrontFace", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "GenerateMipmap", name: "GenerateMipmap", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "GetActiveAttrib", name: "GetActiveAttrib", pkg: "", typ: $funcType([ptrType$1, $Uint], [ptrType$19], false)}, {prop: "GetActiveUniform", name: "GetActiveUniform", pkg: "", typ: $funcType([ptrType$1, $Uint], [ptrType$19], false)}, {prop: "GetAttachedShaders", name: "GetAttachedShaders", pkg: "", typ: $funcType([ptrType$1], [sliceType$1], false)}, {prop: "GetAttribLocation", name: "GetAttribLocation", pkg: "", typ: $funcType([ptrType$1, $String], [$Int], false)}, {prop: "GetBufferParameter", name: "GetBufferParameter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [$Int], false)}, {prop: "GetContextAttributes", name: "GetContextAttributes", pkg: "", typ: $funcType([], [ptrType$7], false)}, {prop: "GetError", name: "GetError", pkg: "", typ: $funcType([], [$error], false)}, {prop: "GetExtension", name: "GetExtension", pkg: "", typ: $funcType([$String], [ptrType$20], false)}, {prop: "GetExtensionLoseContext", name: "GetExtensionLoseContext", pkg: "", typ: $funcType([], [ptrType$21], false)}, {prop: "GetFrameBufferAttachmentParameterInt", name: "GetFrameBufferAttachmentParameterInt", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [$Int], false)}, {prop: "GetFrameBufferAttachmentParameterEnum", name: "GetFrameBufferAttachmentParameterEnum", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [types.GLEnum], false)}, {prop: "GetFrameBufferAttachmentParameterRenderBuffer", name: "GetFrameBufferAttachmentParameterRenderBuffer", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [ptrType$4], false)}, {prop: "GetFrameBufferAttachmentParameterTexture", name: "GetFrameBufferAttachmentParameterTexture", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [ptrType$5], false)}, {prop: "GetParameter", name: "GetParameter", pkg: "", typ: $funcType([types.GLEnum], [js.Value], false)}, {prop: "GetParameterActiveTexture", name: "GetParameterActiveTexture", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterAliasedLineWidthRange", name: "GetParameterAliasedLineWidthRange", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "GetParameterAliasedPointSizeRange", name: "GetParameterAliasedPointSizeRange", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "GetParameterAlphaBits", name: "GetParameterAlphaBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterArrayBufferBinding", name: "GetParameterArrayBufferBinding", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "GetParameterBlend", name: "GetParameterBlend", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterBlendColor", name: "GetParameterBlendColor", pkg: "", typ: $funcType([], [arrayType$2], false)}, {prop: "GetParameterBlendDstAlpha", name: "GetParameterBlendDstAlpha", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendDstRgb", name: "GetParameterBlendDstRgb", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendEquation", name: "GetParameterBlendEquation", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendEquationAlpha", name: "GetParameterBlendEquationAlpha", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendEquationRgb", name: "GetParameterBlendEquationRgb", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendSrcAlpha", name: "GetParameterBlendSrcAlpha", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendSrcRgb", name: "GetParameterBlendSrcRgb", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlueBits", name: "GetParameterBlueBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterColorClearValue", name: "GetParameterColorClearValue", pkg: "", typ: $funcType([], [arrayType$2], false)}, {prop: "GetParameterColorWritemask", name: "GetParameterColorWritemask", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "GetParameterCompressedTextureFormats", name: "GetParameterCompressedTextureFormats", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "GetParameterCullFace", name: "GetParameterCullFace", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterCullFaceMode", name: "GetParameterCullFaceMode", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterCurrentProgram", name: "GetParameterCurrentProgram", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "GetParameterDepthBits", name: "GetParameterDepthBits", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterDepthFunc", name: "GetParameterDepthFunc", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterElementArrayBufferBinding", name: "GetParameterElementArrayBufferBinding", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "GetParameterFrameBufferBinding", name: "GetParameterFrameBufferBinding", pkg: "", typ: $funcType([], [ptrType$3], false)}, {prop: "GetParameterFrontFace", name: "GetParameterFrontFace", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterGenerateMipmapHint", name: "GetParameterGenerateMipmapHint", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterGreenBits", name: "GetParameterGreenBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterImplementationColorReadFormat", name: "GetParameterImplementationColorReadFormat", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterImplementationColorReadType", name: "GetParameterImplementationColorReadType", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterLineWidth", name: "GetParameterLineWidth", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterCombinedTextureImageUnits", name: "GetParameterCombinedTextureImageUnits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxCubeMapTextureSize", name: "GetParameterMaxCubeMapTextureSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxFragmentUniformVectors", name: "GetParameterMaxFragmentUniformVectors", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxRenderBufferSize", name: "GetParameterMaxRenderBufferSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxTextureImageUnits", name: "GetParameterMaxTextureImageUnits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxTextureSize", name: "GetParameterMaxTextureSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVaryingVectors", name: "GetParameterMaxVaryingVectors", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVertexAttribs", name: "GetParameterMaxVertexAttribs", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVertexTextureImageUnits", name: "GetParameterMaxVertexTextureImageUnits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVertexUniformVectors", name: "GetParameterMaxVertexUniformVectors", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxViewportDims", name: "GetParameterMaxViewportDims", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "GetParameterPackAlignment", name: "GetParameterPackAlignment", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterPolygonOffsetFactor", name: "GetParameterPolygonOffsetFactor", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterPolygonOffsetFill", name: "GetParameterPolygonOffsetFill", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterPolygonOffsetUnits", name: "GetParameterPolygonOffsetUnits", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterRedBits", name: "GetParameterRedBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterRenderBufferBinding", name: "GetParameterRenderBufferBinding", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "GetParameterRenderer", name: "GetParameterRenderer", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterSampleBuffers", name: "GetParameterSampleBuffers", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterSampleCoverageInvert", name: "GetParameterSampleCoverageInvert", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterSampleCoverageValue", name: "GetParameterSampleCoverageValue", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterSamples", name: "GetParameterSamples", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterScissorBox", name: "GetParameterScissorBox", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "GetParameterScissorTest", name: "GetParameterScissorTest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterShadingLanguageVersion", name: "GetParameterShadingLanguageVersion", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterStencilBackFail", name: "GetParameterStencilBackFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackFunc", name: "GetParameterStencilBackFunc", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackPassDepthFail", name: "GetParameterStencilBackPassDepthFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackPassDepthPass", name: "GetParameterStencilBackPassDepthPass", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackRef", name: "GetParameterStencilBackRef", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilBackValueMask", name: "GetParameterStencilBackValueMask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterStencilBackWritemask", name: "GetParameterStencilBackWritemask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterStencilBits", name: "GetParameterStencilBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilClearValue", name: "GetParameterStencilClearValue", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilFail", name: "GetParameterStencilFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilFunc", name: "GetParameterStencilFunc", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilPassDepthFail", name: "GetParameterStencilPassDepthFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilPassDepthPass", name: "GetParameterStencilPassDepthPass", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilRef", name: "GetParameterStencilRef", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilTest", name: "GetParameterStencilTest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterStencilValueMask", name: "GetParameterStencilValueMask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterStencilWritemask", name: "GetParameterStencilWritemask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterSubpixelBits", name: "GetParameterSubpixelBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterTextureBinding2D", name: "GetParameterTextureBinding2D", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "GetParameterTextureBindingCubeMap", name: "GetParameterTextureBindingCubeMap", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "GetParameterUnpackAlignment", name: "GetParameterUnpackAlignment", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterUnpackColorspaceConversionWebGL", name: "GetParameterUnpackColorspaceConversionWebGL", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterUnpackFlipYWebGL", name: "GetParameterUnpackFlipYWebGL", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterUnpackPremultiplyAlphaWebGL", name: "GetParameterUnpackPremultiplyAlphaWebGL", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterVendor", name: "GetParameterVendor", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterVersion", name: "GetParameterVersion", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterViewport", name: "GetParameterViewport", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "GetProgramInfoLog", name: "GetProgramInfoLog", pkg: "", typ: $funcType([ptrType$1], [$String], false)}, {prop: "GetProgramParameter", name: "GetProgramParameter", pkg: "", typ: $funcType([ptrType$1, types.GLEnum], [js.Value], false)}, {prop: "GetProgramParameterDeleteStatus", name: "GetProgramParameterDeleteStatus", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "GetProgramParameterLinkStatus", name: "GetProgramParameterLinkStatus", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "GetProgramParameterValidateStatus", name: "GetProgramParameterValidateStatus", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "GetProgramParameterAttachedShaders", name: "GetProgramParameterAttachedShaders", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterActiveAttributes", name: "GetProgramParameterActiveAttributes", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterActiveUniforms", name: "GetProgramParameterActiveUniforms", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterTransformFeedbackBufferMode", name: "GetProgramParameterTransformFeedbackBufferMode", pkg: "", typ: $funcType([ptrType$1], [types.GLEnum], false)}, {prop: "GetProgramParameterTransformFeedbackVaryings", name: "GetProgramParameterTransformFeedbackVaryings", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterActiveUniformBlocks", name: "GetProgramParameterActiveUniformBlocks", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetRenderbufferParameter", name: "GetRenderbufferParameter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [js.Value], false)}, {prop: "GetRenderbufferParameterRenderBufferWidth", name: "GetRenderbufferParameterRenderBufferWidth", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferHeight", name: "GetRenderbufferParameterRenderBufferHeight", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferInternalFormat", name: "GetRenderbufferParameterRenderBufferInternalFormat", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetRenderbufferParameterRenderBufferGreenSize", name: "GetRenderbufferParameterRenderBufferGreenSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferBlueSize", name: "GetRenderbufferParameterRenderBufferBlueSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferRedSize", name: "GetRenderbufferParameterRenderBufferRedSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferAlphaSize", name: "GetRenderbufferParameterRenderBufferAlphaSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferDepthSize", name: "GetRenderbufferParameterRenderBufferDepthSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferStencilSize", name: "GetRenderbufferParameterRenderBufferStencilSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferSamples", name: "GetRenderbufferParameterRenderBufferSamples", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetShaderInfoLog", name: "GetShaderInfoLog", pkg: "", typ: $funcType([ptrType$6], [$String], false)}, {prop: "GetShaderParameter", name: "GetShaderParameter", pkg: "", typ: $funcType([ptrType$6, types.GLEnum], [js.Value], false)}, {prop: "GetShaderParameterDeleteStatus", name: "GetShaderParameterDeleteStatus", pkg: "", typ: $funcType([ptrType$6], [$Bool], false)}, {prop: "GetShaderParameterCompileStatus", name: "GetShaderParameterCompileStatus", pkg: "", typ: $funcType([ptrType$6], [$Bool], false)}, {prop: "GetShaderParameterShaderType", name: "GetShaderParameterShaderType", pkg: "", typ: $funcType([ptrType$6], [types.GLEnum], false)}, {prop: "GetShaderPrecisionFormat", name: "GetShaderPrecisionFormat", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [ptrType$22], false)}, {prop: "GetShaderSource", name: "GetShaderSource", pkg: "", typ: $funcType([ptrType$6], [$String], false)}, {prop: "GetSupportedExtensions", name: "GetSupportedExtensions", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "GetTexParameter", name: "GetTexParameter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [js.Value], false)}, {prop: "GetTexParameterMagFilter", name: "GetTexParameterMagFilter", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterMinFilter", name: "GetTexParameterMinFilter", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterWrapS", name: "GetTexParameterWrapS", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterWrapT", name: "GetTexParameterWrapT", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterMaxAnisotropyExt", name: "GetTexParameterMaxAnisotropyExt", pkg: "", typ: $funcType([types.GLEnum], [$Float32], false)}, {prop: "GetTexParameterBaseLevel", name: "GetTexParameterBaseLevel", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetTexParameterCompareFunc", name: "GetTexParameterCompareFunc", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterCompareMode", name: "GetTexParameterCompareMode", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterImmutableFormat", name: "GetTexParameterImmutableFormat", pkg: "", typ: $funcType([types.GLEnum], [$Bool], false)}, {prop: "GetTexParameterImmutableLevels", name: "GetTexParameterImmutableLevels", pkg: "", typ: $funcType([types.GLEnum], [$Uint], false)}, {prop: "GetTexParameterMaxLever", name: "GetTexParameterMaxLever", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetTexParameterMaxLOD", name: "GetTexParameterMaxLOD", pkg: "", typ: $funcType([types.GLEnum], [$Float32], false)}, {prop: "GetTexParameterMinLOD", name: "GetTexParameterMinLOD", pkg: "", typ: $funcType([types.GLEnum], [$Float32], false)}, {prop: "GetTexParameterWrapR", name: "GetTexParameterWrapR", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetUniform", name: "GetUniform", pkg: "", typ: $funcType([ptrType$1, ptrType$23], [js.Value], false)}, {prop: "GetUniformLocation", name: "GetUniformLocation", pkg: "", typ: $funcType([ptrType$1, $String], [ptrType$23], false)}, {prop: "GetVertexAttrib", name: "GetVertexAttrib", pkg: "", typ: $funcType([$Int, types.GLEnum], [js.Value], false)}, {prop: "GetVertexAttribArrayBufferBinding", name: "GetVertexAttribArrayBufferBinding", pkg: "", typ: $funcType([$Int], [ptrType$2], false)}, {prop: "GetVertexAttribArrayBufferEnabled", name: "GetVertexAttribArrayBufferEnabled", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GetVertexAttribArraySize", name: "GetVertexAttribArraySize", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribArrayStride", name: "GetVertexAttribArrayStride", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribArrayType", name: "GetVertexAttribArrayType", pkg: "", typ: $funcType([$Int], [types.GLEnum], false)}, {prop: "GetVertexAttribArrayNormalized", name: "GetVertexAttribArrayNormalized", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GetVertexAttribCurrentVertexAttrib", name: "GetVertexAttribCurrentVertexAttrib", pkg: "", typ: $funcType([$Int], [arrayType$2], false)}, {prop: "GetVertexAttribArrayInteger", name: "GetVertexAttribArrayInteger", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GetVertexAttribArrayDivisor", name: "GetVertexAttribArrayDivisor", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribArrayDivisorAngle", name: "GetVertexAttribArrayDivisorAngle", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribOffset", name: "GetVertexAttribOffset", pkg: "", typ: $funcType([$Int, types.GLEnum], [$Int], false)}, {prop: "Hint", name: "Hint", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "IsBuffer", name: "IsBuffer", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsContextLost", name: "IsContextLost", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsEnabled", name: "IsEnabled", pkg: "", typ: $funcType([types.GLEnum], [$Bool], false)}, {prop: "IsFrameBuffer", name: "IsFrameBuffer", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsProgram", name: "IsProgram", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsRenderbuffer", name: "IsRenderbuffer", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsShader", name: "IsShader", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsTexture", name: "IsTexture", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "LineWidth", name: "LineWidth", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "LinkProgram", name: "LinkProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "PixelStorei", name: "PixelStorei", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "PolygonOffset", name: "PolygonOffset", pkg: "", typ: $funcType([$Float32, $Float32], [], false)}, {prop: "ReadPixels", name: "ReadPixels", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, types.GLEnum, js.Value], [], false)}, {prop: "ReadPixelsOffset", name: "ReadPixelsOffset", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, types.GLEnum, js.Value, $Uint], [], false)}, {prop: "ReadPixelsOffsetPointer", name: "ReadPixelsOffsetPointer", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, types.GLEnum, $Int], [], false)}, {prop: "RenderbufferStorage", name: "RenderbufferStorage", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Int], [], false)}, {prop: "SampleCoverage", name: "SampleCoverage", pkg: "", typ: $funcType([$Float32, $Bool], [], false)}, {prop: "Scissor", name: "Scissor", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int], [], false)}, {prop: "ShaderSource", name: "ShaderSource", pkg: "", typ: $funcType([ptrType$6, $String], [], false)}, {prop: "StencilFunc", name: "StencilFunc", pkg: "", typ: $funcType([types.GLEnum, $Int, $Uint32], [], false)}, {prop: "StencilFuncSeparate", name: "StencilFuncSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Uint32], [], false)}, {prop: "StencilMask", name: "StencilMask", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "StencilMaskSeparate", name: "StencilMaskSeparate", pkg: "", typ: $funcType([types.GLEnum, $Uint32], [], false)}, {prop: "StencilOp", name: "StencilOp", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "StencilOpSeparate", name: "StencilOpSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "TexImage2Db", name: "TexImage2Db", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, sliceType$4], [], false)}, {prop: "TexImage2Dui16", name: "TexImage2Dui16", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, sliceType$5], [], false)}, {prop: "TexImage2Dui32", name: "TexImage2Dui32", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, sliceType$6], [], false)}, {prop: "TexImage2Df", name: "TexImage2Df", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, sliceType$7], [], false)}, {prop: "TexImage2DHtmlElement", name: "TexImage2DHtmlElement", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexImage2DOffset", name: "TexImage2DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "TexImage2DHtmlElement2", name: "TexImage2DHtmlElement2", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexImage2D2", name: "TexImage2D2", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, sliceType$7, $Int], [], false)}, {prop: "TexParameterf", name: "TexParameterf", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Float32], [], false)}, {prop: "TexParameteri", name: "TexParameteri", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "texParameterEnum", name: "texParameterEnum", pkg: "github.com/nuberu/webgl", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMagFilter", name: "TexParameterMagFilter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMinFilter", name: "TexParameterMinFilter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterWrapS", name: "TexParameterWrapS", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterWrapT", name: "TexParameterWrapT", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMaxAnisotropyExt", name: "TexParameterMaxAnisotropyExt", pkg: "", typ: $funcType([types.GLEnum, $Float32], [], false)}, {prop: "TexParameterBaseLevel", name: "TexParameterBaseLevel", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterCompareFunc", name: "TexParameterCompareFunc", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterCompareMode", name: "TexParameterCompareMode", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMaxLevel", name: "TexParameterMaxLevel", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterMaxLOD", name: "TexParameterMaxLOD", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterMinLOD", name: "TexParameterMinLOD", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterWrapR", name: "TexParameterWrapR", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexSubImage2D", name: "TexSubImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexSubImage2DHtmlElement", name: "TexSubImage2DHtmlElement", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexSubImage2DOffset", name: "TexSubImage2DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "TexSubImage2DOffset2", name: "TexSubImage2DOffset2", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "TexSubImage2DHtmlElement2", name: "TexSubImage2DHtmlElement2", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "Uniform1f", name: "Uniform1f", pkg: "", typ: $funcType([ptrType$23, $Float32], [], false)}, {prop: "Uniform1fv", name: "Uniform1fv", pkg: "", typ: $funcType([ptrType$23, sliceType$7], [], false)}, {prop: "Uniform1i", name: "Uniform1i", pkg: "", typ: $funcType([ptrType$23, $Int], [], false)}, {prop: "Uniform1iv", name: "Uniform1iv", pkg: "", typ: $funcType([ptrType$23, sliceType$14], [], false)}, {prop: "Uniform2f", name: "Uniform2f", pkg: "", typ: $funcType([ptrType$23, $Float32, $Float32], [], false)}, {prop: "Uniform2fv", name: "Uniform2fv", pkg: "", typ: $funcType([ptrType$23, sliceType$7], [], false)}, {prop: "Uniform2i", name: "Uniform2i", pkg: "", typ: $funcType([ptrType$23, $Int, $Int], [], false)}, {prop: "Uniform2iv", name: "Uniform2iv", pkg: "", typ: $funcType([ptrType$23, sliceType$14], [], false)}, {prop: "Uniform3f", name: "Uniform3f", pkg: "", typ: $funcType([ptrType$23, $Float32, $Float32, $Float32], [], false)}, {prop: "Uniform3fv", name: "Uniform3fv", pkg: "", typ: $funcType([ptrType$23, sliceType$7], [], false)}, {prop: "Uniform3i", name: "Uniform3i", pkg: "", typ: $funcType([ptrType$23, $Int, $Int, $Int], [], false)}, {prop: "Uniform3iv", name: "Uniform3iv", pkg: "", typ: $funcType([ptrType$23, sliceType$14], [], false)}, {prop: "Uniform4f", name: "Uniform4f", pkg: "", typ: $funcType([ptrType$23, $Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "Uniform4fv", name: "Uniform4fv", pkg: "", typ: $funcType([ptrType$23, sliceType$7], [], false)}, {prop: "Uniform4i", name: "Uniform4i", pkg: "", typ: $funcType([ptrType$23, $Int, $Int, $Int, $Int], [], false)}, {prop: "Uniform4iv", name: "Uniform4iv", pkg: "", typ: $funcType([ptrType$23, sliceType$14], [], false)}, {prop: "UniformMatrix2fv", name: "UniformMatrix2fv", pkg: "", typ: $funcType([ptrType$23, $Bool, sliceType$7], [], false)}, {prop: "UniformMatrix3fv", name: "UniformMatrix3fv", pkg: "", typ: $funcType([ptrType$23, $Bool, sliceType$7], [], false)}, {prop: "UniformMatrix4fv", name: "UniformMatrix4fv", pkg: "", typ: $funcType([ptrType$23, $Bool, sliceType$7], [], false)}, {prop: "UseProgram", name: "UseProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "ValidateProgram", name: "ValidateProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "VertexAttrib1f", name: "VertexAttrib1f", pkg: "", typ: $funcType([$Int, $Float32], [], false)}, {prop: "VertexAttrib2f", name: "VertexAttrib2f", pkg: "", typ: $funcType([$Int, $Float32, $Float32], [], false)}, {prop: "VertexAttrib3f", name: "VertexAttrib3f", pkg: "", typ: $funcType([$Int, $Float32, $Float32, $Float32], [], false)}, {prop: "VertexAttrib4f", name: "VertexAttrib4f", pkg: "", typ: $funcType([$Int, $Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "VertexAttrib1fv", name: "VertexAttrib1fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttrib2fv", name: "VertexAttrib2fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttrib3fv", name: "VertexAttrib3fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttrib4fv", name: "VertexAttrib4fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttribPointer", name: "VertexAttribPointer", pkg: "", typ: $funcType([$Int, $Int, types.GLEnum, $Bool, $Int, $Int], [], false)}, {prop: "Viewport", name: "Viewport", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int], [], false)}];
|
|
186714
|
+
ptrType.methods = [{prop: "GetJs", name: "GetJs", pkg: "", typ: $funcType([], [js.Value], false)}, {prop: "GetDrawingBufferWidth", name: "GetDrawingBufferWidth", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetDrawingBufferHeight", name: "GetDrawingBufferHeight", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetCanvas", name: "GetCanvas", pkg: "", typ: $funcType([], [js.Value], false)}, {prop: "ActiveTexture", name: "ActiveTexture", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AttachShader", name: "AttachShader", pkg: "", typ: $funcType([ptrType$1, ptrType$6], [], false)}, {prop: "BindAttribLocation", name: "BindAttribLocation", pkg: "", typ: $funcType([ptrType$1, $Int, $String], [], false)}, {prop: "BindBuffer", name: "BindBuffer", pkg: "", typ: $funcType([types.GLEnum, ptrType$2], [], false)}, {prop: "BindFrameBuffer", name: "BindFrameBuffer", pkg: "", typ: $funcType([types.GLEnum, ptrType$3], [], false)}, {prop: "BindRenderBuffer", name: "BindRenderBuffer", pkg: "", typ: $funcType([types.GLEnum, ptrType$4], [], false)}, {prop: "BindTexture", name: "BindTexture", pkg: "", typ: $funcType([types.GLEnum, ptrType$5], [], false)}, {prop: "BlendColor", name: "BlendColor", pkg: "", typ: $funcType([$Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "BlendEquation", name: "BlendEquation", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "BlendEquationSeparate", name: "BlendEquationSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "BlendFunc", name: "BlendFunc", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "BlendFuncSeparate", name: "BlendFuncSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "BufferDataBySize", name: "BufferDataBySize", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum], [], false)}, {prop: "BufferData", name: "BufferData", pkg: "", typ: $funcType([types.GLEnum, sliceType$7, types.GLEnum], [], false)}, {prop: "BufferDataI", name: "BufferDataI", pkg: "", typ: $funcType([types.GLEnum, sliceType$12, types.GLEnum], [], false)}, {prop: "BufferDataUI", name: "BufferDataUI", pkg: "", typ: $funcType([types.GLEnum, sliceType$6, types.GLEnum], [], false)}, {prop: "BufferDataUI16", name: "BufferDataUI16", pkg: "", typ: $funcType([types.GLEnum, sliceType$5, types.GLEnum], [], false)}, {prop: "BufferDataWithOffset", name: "BufferDataWithOffset", pkg: "", typ: $funcType([types.GLEnum, sliceType$7, types.GLEnum, $Uint, $Uint], [], false)}, {prop: "BufferDataIWithOffset", name: "BufferDataIWithOffset", pkg: "", typ: $funcType([types.GLEnum, sliceType$12, types.GLEnum, $Uint, $Uint], [], false)}, {prop: "BufferDataUIWithOffset", name: "BufferDataUIWithOffset", pkg: "", typ: $funcType([types.GLEnum, sliceType$13, types.GLEnum, $Uint, $Uint], [], false)}, {prop: "BufferSubData", name: "BufferSubData", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$7], [], false)}, {prop: "BufferSubDataI", name: "BufferSubDataI", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$12], [], false)}, {prop: "BufferSubDataUI", name: "BufferSubDataUI", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$13], [], false)}, {prop: "BufferSubDataWithOffset", name: "BufferSubDataWithOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$7, $Uint, $Uint], [], false)}, {prop: "BufferSubDataIWithOffset", name: "BufferSubDataIWithOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$12, $Uint, $Uint], [], false)}, {prop: "BufferSubDataUIWithOffset", name: "BufferSubDataUIWithOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, sliceType$13, $Uint, $Uint], [], false)}, {prop: "CheckFrameBufferStatus", name: "CheckFrameBufferStatus", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "ClearColor", name: "ClearColor", pkg: "", typ: $funcType([$Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "ClearDepth", name: "ClearDepth", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "ClearStencil", name: "ClearStencil", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "ColorMask", name: "ColorMask", pkg: "", typ: $funcType([$Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "Commit", name: "Commit", pkg: "", typ: $funcType([], [], false)}, {prop: "CompileShader", name: "CompileShader", pkg: "", typ: $funcType([ptrType$6], [], false)}, {prop: "CompressedTexImage2D", name: "CompressedTexImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int], [], false)}, {prop: "CompressedTexImage2DIn", name: "CompressedTexImage2DIn", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, sliceType$7], [], false)}, {prop: "CompressedTexImage2DOffset", name: "CompressedTexImage2DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CompressedTexImage2DFromOffset", name: "CompressedTexImage2DFromOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, sliceType$7, $Int, $Int], [], false)}, {prop: "CompressedTexImage3DOffset", name: "CompressedTexImage3DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CompressedTexImage3DFromOffset", name: "CompressedTexImage3DFromOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, sliceType$7, $Int, $Int], [], false)}, {prop: "CompressedTexSubImage2D", name: "CompressedTexSubImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum], [], false)}, {prop: "CompressedTexSubImage2DIn", name: "CompressedTexSubImage2DIn", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, sliceType$7], [], false)}, {prop: "CompressedTexSubImage2DFrom", name: "CompressedTexSubImage2DFrom", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, $Int, $Int], [], false)}, {prop: "CompressedTexSubImage2DFromOffset", name: "CompressedTexSubImage2DFromOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, sliceType$7, $Int, $Int], [], false)}, {prop: "CopyTexImage2D", name: "CopyTexImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CopyTexSubImage2D", name: "CopyTexSubImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, $Int, $Int], [], false)}, {prop: "CreateVertexArray", name: "CreateVertexArray", pkg: "", typ: $funcType([], [ptrType$8], false)}, {prop: "BindVertexArray", name: "BindVertexArray", pkg: "", typ: $funcType([ptrType$8], [], false)}, {prop: "CreateBuffer", name: "CreateBuffer", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "CreateFrameBuffer", name: "CreateFrameBuffer", pkg: "", typ: $funcType([], [ptrType$3], false)}, {prop: "CreateProgram", name: "CreateProgram", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "CreateRenderBuffer", name: "CreateRenderBuffer", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "CreateShader", name: "CreateShader", pkg: "", typ: $funcType([types.GLEnum], [ptrType$6], false)}, {prop: "CreateFragmentShader", name: "CreateFragmentShader", pkg: "", typ: $funcType([], [ptrType$6], false)}, {prop: "CreateVertexShader", name: "CreateVertexShader", pkg: "", typ: $funcType([], [ptrType$6], false)}, {prop: "CreateTexture", name: "CreateTexture", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "CullFace", name: "CullFace", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "DeleteBuffer", name: "DeleteBuffer", pkg: "", typ: $funcType([ptrType$2], [], false)}, {prop: "DeleteFrameBuffer", name: "DeleteFrameBuffer", pkg: "", typ: $funcType([ptrType$3], [], false)}, {prop: "DeleteProgram", name: "DeleteProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "DeleteRenderBuffer", name: "DeleteRenderBuffer", pkg: "", typ: $funcType([ptrType$4], [], false)}, {prop: "DeleteShader", name: "DeleteShader", pkg: "", typ: $funcType([ptrType$6], [], false)}, {prop: "DeleteTexture", name: "DeleteTexture", pkg: "", typ: $funcType([ptrType$5], [], false)}, {prop: "DepthFunc", name: "DepthFunc", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "DepthMask", name: "DepthMask", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "DepthRange", name: "DepthRange", pkg: "", typ: $funcType([$Float32, $Float32], [], false)}, {prop: "DetachShader", name: "DetachShader", pkg: "", typ: $funcType([ptrType$1, ptrType$6], [], false)}, {prop: "Disable", name: "Disable", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "DisableVertexAttribArray", name: "DisableVertexAttribArray", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "DrawArrays", name: "DrawArrays", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int], [], false)}, {prop: "DrawElements", name: "DrawElements", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int64], [], false)}, {prop: "Enable", name: "Enable", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "EnableVertexAttribArray", name: "EnableVertexAttribArray", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Finnish", name: "Finnish", pkg: "", typ: $funcType([], [], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "FrameBufferRenderbuffer", name: "FrameBufferRenderbuffer", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, ptrType$4], [], false)}, {prop: "FrameBufferTexture2D", name: "FrameBufferTexture2D", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, ptrType$5, $Int], [], false)}, {prop: "FrontFace", name: "FrontFace", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "GenerateMipmap", name: "GenerateMipmap", pkg: "", typ: $funcType([types.GLEnum], [], false)}, {prop: "GetActiveAttrib", name: "GetActiveAttrib", pkg: "", typ: $funcType([ptrType$1, $Uint], [ptrType$9], false)}, {prop: "GetActiveUniform", name: "GetActiveUniform", pkg: "", typ: $funcType([ptrType$1, $Uint], [ptrType$9], false)}, {prop: "GetAttachedShaders", name: "GetAttachedShaders", pkg: "", typ: $funcType([ptrType$1], [sliceType$1], false)}, {prop: "GetAttribLocation", name: "GetAttribLocation", pkg: "", typ: $funcType([ptrType$1, $String], [$Int], false)}, {prop: "GetBufferParameter", name: "GetBufferParameter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [$Int], false)}, {prop: "GetContextAttributes", name: "GetContextAttributes", pkg: "", typ: $funcType([], [ptrType$7], false)}, {prop: "GetError", name: "GetError", pkg: "", typ: $funcType([], [$error], false)}, {prop: "GetExtension", name: "GetExtension", pkg: "", typ: $funcType([$String], [ptrType$10], false)}, {prop: "GetExtensionLoseContext", name: "GetExtensionLoseContext", pkg: "", typ: $funcType([], [ptrType$11], false)}, {prop: "GetFrameBufferAttachmentParameterInt", name: "GetFrameBufferAttachmentParameterInt", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [$Int], false)}, {prop: "GetFrameBufferAttachmentParameterEnum", name: "GetFrameBufferAttachmentParameterEnum", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [types.GLEnum], false)}, {prop: "GetFrameBufferAttachmentParameterRenderBuffer", name: "GetFrameBufferAttachmentParameterRenderBuffer", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [ptrType$4], false)}, {prop: "GetFrameBufferAttachmentParameterTexture", name: "GetFrameBufferAttachmentParameterTexture", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [ptrType$5], false)}, {prop: "GetParameter", name: "GetParameter", pkg: "", typ: $funcType([types.GLEnum], [js.Value], false)}, {prop: "GetParameterActiveTexture", name: "GetParameterActiveTexture", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterAliasedLineWidthRange", name: "GetParameterAliasedLineWidthRange", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "GetParameterAliasedPointSizeRange", name: "GetParameterAliasedPointSizeRange", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "GetParameterAlphaBits", name: "GetParameterAlphaBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterArrayBufferBinding", name: "GetParameterArrayBufferBinding", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "GetParameterBlend", name: "GetParameterBlend", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterBlendColor", name: "GetParameterBlendColor", pkg: "", typ: $funcType([], [arrayType$2], false)}, {prop: "GetParameterBlendDstAlpha", name: "GetParameterBlendDstAlpha", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendDstRgb", name: "GetParameterBlendDstRgb", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendEquation", name: "GetParameterBlendEquation", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendEquationAlpha", name: "GetParameterBlendEquationAlpha", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendEquationRgb", name: "GetParameterBlendEquationRgb", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendSrcAlpha", name: "GetParameterBlendSrcAlpha", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlendSrcRgb", name: "GetParameterBlendSrcRgb", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterBlueBits", name: "GetParameterBlueBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterColorClearValue", name: "GetParameterColorClearValue", pkg: "", typ: $funcType([], [arrayType$2], false)}, {prop: "GetParameterColorWritemask", name: "GetParameterColorWritemask", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "GetParameterCompressedTextureFormats", name: "GetParameterCompressedTextureFormats", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "GetParameterCullFace", name: "GetParameterCullFace", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterCullFaceMode", name: "GetParameterCullFaceMode", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterCurrentProgram", name: "GetParameterCurrentProgram", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "GetParameterDepthBits", name: "GetParameterDepthBits", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterDepthFunc", name: "GetParameterDepthFunc", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterElementArrayBufferBinding", name: "GetParameterElementArrayBufferBinding", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "GetParameterFrameBufferBinding", name: "GetParameterFrameBufferBinding", pkg: "", typ: $funcType([], [ptrType$3], false)}, {prop: "GetParameterFrontFace", name: "GetParameterFrontFace", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterGenerateMipmapHint", name: "GetParameterGenerateMipmapHint", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterGreenBits", name: "GetParameterGreenBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterImplementationColorReadFormat", name: "GetParameterImplementationColorReadFormat", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterImplementationColorReadType", name: "GetParameterImplementationColorReadType", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterLineWidth", name: "GetParameterLineWidth", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterCombinedTextureImageUnits", name: "GetParameterCombinedTextureImageUnits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxCubeMapTextureSize", name: "GetParameterMaxCubeMapTextureSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxFragmentUniformVectors", name: "GetParameterMaxFragmentUniformVectors", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxRenderBufferSize", name: "GetParameterMaxRenderBufferSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxTextureImageUnits", name: "GetParameterMaxTextureImageUnits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxTextureSize", name: "GetParameterMaxTextureSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVaryingVectors", name: "GetParameterMaxVaryingVectors", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVertexAttribs", name: "GetParameterMaxVertexAttribs", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVertexTextureImageUnits", name: "GetParameterMaxVertexTextureImageUnits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxVertexUniformVectors", name: "GetParameterMaxVertexUniformVectors", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterMaxViewportDims", name: "GetParameterMaxViewportDims", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "GetParameterPackAlignment", name: "GetParameterPackAlignment", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterPolygonOffsetFactor", name: "GetParameterPolygonOffsetFactor", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterPolygonOffsetFill", name: "GetParameterPolygonOffsetFill", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterPolygonOffsetUnits", name: "GetParameterPolygonOffsetUnits", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterRedBits", name: "GetParameterRedBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterRenderBufferBinding", name: "GetParameterRenderBufferBinding", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "GetParameterRenderer", name: "GetParameterRenderer", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterSampleBuffers", name: "GetParameterSampleBuffers", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterSampleCoverageInvert", name: "GetParameterSampleCoverageInvert", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterSampleCoverageValue", name: "GetParameterSampleCoverageValue", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "GetParameterSamples", name: "GetParameterSamples", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterScissorBox", name: "GetParameterScissorBox", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "GetParameterScissorTest", name: "GetParameterScissorTest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterShadingLanguageVersion", name: "GetParameterShadingLanguageVersion", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterStencilBackFail", name: "GetParameterStencilBackFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackFunc", name: "GetParameterStencilBackFunc", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackPassDepthFail", name: "GetParameterStencilBackPassDepthFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackPassDepthPass", name: "GetParameterStencilBackPassDepthPass", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilBackRef", name: "GetParameterStencilBackRef", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilBackValueMask", name: "GetParameterStencilBackValueMask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterStencilBackWritemask", name: "GetParameterStencilBackWritemask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterStencilBits", name: "GetParameterStencilBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilClearValue", name: "GetParameterStencilClearValue", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilFail", name: "GetParameterStencilFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilFunc", name: "GetParameterStencilFunc", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilPassDepthFail", name: "GetParameterStencilPassDepthFail", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilPassDepthPass", name: "GetParameterStencilPassDepthPass", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterStencilRef", name: "GetParameterStencilRef", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterStencilTest", name: "GetParameterStencilTest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterStencilValueMask", name: "GetParameterStencilValueMask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterStencilWritemask", name: "GetParameterStencilWritemask", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "GetParameterSubpixelBits", name: "GetParameterSubpixelBits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterTextureBinding2D", name: "GetParameterTextureBinding2D", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "GetParameterTextureBindingCubeMap", name: "GetParameterTextureBindingCubeMap", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "GetParameterUnpackAlignment", name: "GetParameterUnpackAlignment", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "GetParameterUnpackColorspaceConversionWebGL", name: "GetParameterUnpackColorspaceConversionWebGL", pkg: "", typ: $funcType([], [types.GLEnum], false)}, {prop: "GetParameterUnpackFlipYWebGL", name: "GetParameterUnpackFlipYWebGL", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterUnpackPremultiplyAlphaWebGL", name: "GetParameterUnpackPremultiplyAlphaWebGL", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetParameterVendor", name: "GetParameterVendor", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterVersion", name: "GetParameterVersion", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetParameterViewport", name: "GetParameterViewport", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "GetProgramInfoLog", name: "GetProgramInfoLog", pkg: "", typ: $funcType([ptrType$1], [$String], false)}, {prop: "GetProgramParameter", name: "GetProgramParameter", pkg: "", typ: $funcType([ptrType$1, types.GLEnum], [js.Value], false)}, {prop: "GetProgramParameterDeleteStatus", name: "GetProgramParameterDeleteStatus", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "GetProgramParameterLinkStatus", name: "GetProgramParameterLinkStatus", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "GetProgramParameterValidateStatus", name: "GetProgramParameterValidateStatus", pkg: "", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "GetProgramParameterAttachedShaders", name: "GetProgramParameterAttachedShaders", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterActiveAttributes", name: "GetProgramParameterActiveAttributes", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterActiveUniforms", name: "GetProgramParameterActiveUniforms", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterTransformFeedbackBufferMode", name: "GetProgramParameterTransformFeedbackBufferMode", pkg: "", typ: $funcType([ptrType$1], [types.GLEnum], false)}, {prop: "GetProgramParameterTransformFeedbackVaryings", name: "GetProgramParameterTransformFeedbackVaryings", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetProgramParameterActiveUniformBlocks", name: "GetProgramParameterActiveUniformBlocks", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "GetRenderbufferParameter", name: "GetRenderbufferParameter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [js.Value], false)}, {prop: "GetRenderbufferParameterRenderBufferWidth", name: "GetRenderbufferParameterRenderBufferWidth", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferHeight", name: "GetRenderbufferParameterRenderBufferHeight", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferInternalFormat", name: "GetRenderbufferParameterRenderBufferInternalFormat", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetRenderbufferParameterRenderBufferGreenSize", name: "GetRenderbufferParameterRenderBufferGreenSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferBlueSize", name: "GetRenderbufferParameterRenderBufferBlueSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferRedSize", name: "GetRenderbufferParameterRenderBufferRedSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferAlphaSize", name: "GetRenderbufferParameterRenderBufferAlphaSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferDepthSize", name: "GetRenderbufferParameterRenderBufferDepthSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferStencilSize", name: "GetRenderbufferParameterRenderBufferStencilSize", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetRenderbufferParameterRenderBufferSamples", name: "GetRenderbufferParameterRenderBufferSamples", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetShaderInfoLog", name: "GetShaderInfoLog", pkg: "", typ: $funcType([ptrType$6], [$String], false)}, {prop: "GetShaderParameter", name: "GetShaderParameter", pkg: "", typ: $funcType([ptrType$6, types.GLEnum], [js.Value], false)}, {prop: "GetShaderParameterDeleteStatus", name: "GetShaderParameterDeleteStatus", pkg: "", typ: $funcType([ptrType$6], [$Bool], false)}, {prop: "GetShaderParameterCompileStatus", name: "GetShaderParameterCompileStatus", pkg: "", typ: $funcType([ptrType$6], [$Bool], false)}, {prop: "GetShaderParameterShaderType", name: "GetShaderParameterShaderType", pkg: "", typ: $funcType([ptrType$6], [types.GLEnum], false)}, {prop: "GetShaderPrecisionFormat", name: "GetShaderPrecisionFormat", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [ptrType$12], false)}, {prop: "GetShaderSource", name: "GetShaderSource", pkg: "", typ: $funcType([ptrType$6], [$String], false)}, {prop: "GetSupportedExtensions", name: "GetSupportedExtensions", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "GetTexParameter", name: "GetTexParameter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [js.Value], false)}, {prop: "GetTexParameterMagFilter", name: "GetTexParameterMagFilter", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterMinFilter", name: "GetTexParameterMinFilter", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterWrapS", name: "GetTexParameterWrapS", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterWrapT", name: "GetTexParameterWrapT", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterMaxAnisotropyExt", name: "GetTexParameterMaxAnisotropyExt", pkg: "", typ: $funcType([types.GLEnum], [$Float32], false)}, {prop: "GetTexParameterBaseLevel", name: "GetTexParameterBaseLevel", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetTexParameterCompareFunc", name: "GetTexParameterCompareFunc", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterCompareMode", name: "GetTexParameterCompareMode", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetTexParameterImmutableFormat", name: "GetTexParameterImmutableFormat", pkg: "", typ: $funcType([types.GLEnum], [$Bool], false)}, {prop: "GetTexParameterImmutableLevels", name: "GetTexParameterImmutableLevels", pkg: "", typ: $funcType([types.GLEnum], [$Uint], false)}, {prop: "GetTexParameterMaxLever", name: "GetTexParameterMaxLever", pkg: "", typ: $funcType([types.GLEnum], [$Int], false)}, {prop: "GetTexParameterMaxLOD", name: "GetTexParameterMaxLOD", pkg: "", typ: $funcType([types.GLEnum], [$Float32], false)}, {prop: "GetTexParameterMinLOD", name: "GetTexParameterMinLOD", pkg: "", typ: $funcType([types.GLEnum], [$Float32], false)}, {prop: "GetTexParameterWrapR", name: "GetTexParameterWrapR", pkg: "", typ: $funcType([types.GLEnum], [types.GLEnum], false)}, {prop: "GetUniform", name: "GetUniform", pkg: "", typ: $funcType([ptrType$1, ptrType$13], [js.Value], false)}, {prop: "GetUniformLocation", name: "GetUniformLocation", pkg: "", typ: $funcType([ptrType$1, $String], [ptrType$13], false)}, {prop: "GetVertexAttrib", name: "GetVertexAttrib", pkg: "", typ: $funcType([$Int, types.GLEnum], [js.Value], false)}, {prop: "GetVertexAttribArrayBufferBinding", name: "GetVertexAttribArrayBufferBinding", pkg: "", typ: $funcType([$Int], [ptrType$2], false)}, {prop: "GetVertexAttribArrayBufferEnabled", name: "GetVertexAttribArrayBufferEnabled", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GetVertexAttribArraySize", name: "GetVertexAttribArraySize", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribArrayStride", name: "GetVertexAttribArrayStride", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribArrayType", name: "GetVertexAttribArrayType", pkg: "", typ: $funcType([$Int], [types.GLEnum], false)}, {prop: "GetVertexAttribArrayNormalized", name: "GetVertexAttribArrayNormalized", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GetVertexAttribCurrentVertexAttrib", name: "GetVertexAttribCurrentVertexAttrib", pkg: "", typ: $funcType([$Int], [arrayType$2], false)}, {prop: "GetVertexAttribArrayInteger", name: "GetVertexAttribArrayInteger", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GetVertexAttribArrayDivisor", name: "GetVertexAttribArrayDivisor", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribArrayDivisorAngle", name: "GetVertexAttribArrayDivisorAngle", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "GetVertexAttribOffset", name: "GetVertexAttribOffset", pkg: "", typ: $funcType([$Int, types.GLEnum], [$Int], false)}, {prop: "Hint", name: "Hint", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "IsBuffer", name: "IsBuffer", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsContextLost", name: "IsContextLost", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsEnabled", name: "IsEnabled", pkg: "", typ: $funcType([types.GLEnum], [$Bool], false)}, {prop: "IsFrameBuffer", name: "IsFrameBuffer", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsProgram", name: "IsProgram", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsRenderbuffer", name: "IsRenderbuffer", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsShader", name: "IsShader", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "IsTexture", name: "IsTexture", pkg: "", typ: $funcType([js.Value], [$Bool], false)}, {prop: "LineWidth", name: "LineWidth", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "LinkProgram", name: "LinkProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "PixelStorei", name: "PixelStorei", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "PolygonOffset", name: "PolygonOffset", pkg: "", typ: $funcType([$Float32, $Float32], [], false)}, {prop: "ReadPixels", name: "ReadPixels", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, types.GLEnum, js.Value], [], false)}, {prop: "ReadPixelsOffset", name: "ReadPixelsOffset", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, types.GLEnum, js.Value, $Uint], [], false)}, {prop: "ReadPixelsOffsetPointer", name: "ReadPixelsOffsetPointer", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, types.GLEnum, $Int], [], false)}, {prop: "RenderbufferStorage", name: "RenderbufferStorage", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Int], [], false)}, {prop: "SampleCoverage", name: "SampleCoverage", pkg: "", typ: $funcType([$Float32, $Bool], [], false)}, {prop: "Scissor", name: "Scissor", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int], [], false)}, {prop: "ShaderSource", name: "ShaderSource", pkg: "", typ: $funcType([ptrType$6, $String], [], false)}, {prop: "StencilFunc", name: "StencilFunc", pkg: "", typ: $funcType([types.GLEnum, $Int, $Uint32], [], false)}, {prop: "StencilFuncSeparate", name: "StencilFuncSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Int, $Uint32], [], false)}, {prop: "StencilMask", name: "StencilMask", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "StencilMaskSeparate", name: "StencilMaskSeparate", pkg: "", typ: $funcType([types.GLEnum, $Uint32], [], false)}, {prop: "StencilOp", name: "StencilOp", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "StencilOpSeparate", name: "StencilOpSeparate", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "TexImage2Db", name: "TexImage2Db", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, sliceType$4], [], false)}, {prop: "TexImage2Dui16", name: "TexImage2Dui16", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, sliceType$5], [], false)}, {prop: "TexImage2Dui32", name: "TexImage2Dui32", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, sliceType$6], [], false)}, {prop: "TexImage2Df", name: "TexImage2Df", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, sliceType$7], [], false)}, {prop: "TexImage2DHtmlElement", name: "TexImage2DHtmlElement", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexImage2DOffset", name: "TexImage2DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "TexImage2DHtmlElement2", name: "TexImage2DHtmlElement2", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexImage2D2", name: "TexImage2D2", pkg: "", typ: $funcType([types.GLEnum, $Int, types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, sliceType$7, $Int], [], false)}, {prop: "TexParameterf", name: "TexParameterf", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Float32], [], false)}, {prop: "TexParameteri", name: "TexParameteri", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "texParameterEnum", name: "texParameterEnum", pkg: "github.com/nuberu/webgl", typ: $funcType([types.GLEnum, types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMagFilter", name: "TexParameterMagFilter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMinFilter", name: "TexParameterMinFilter", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterWrapS", name: "TexParameterWrapS", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterWrapT", name: "TexParameterWrapT", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMaxAnisotropyExt", name: "TexParameterMaxAnisotropyExt", pkg: "", typ: $funcType([types.GLEnum, $Float32], [], false)}, {prop: "TexParameterBaseLevel", name: "TexParameterBaseLevel", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterCompareFunc", name: "TexParameterCompareFunc", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterCompareMode", name: "TexParameterCompareMode", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexParameterMaxLevel", name: "TexParameterMaxLevel", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterMaxLOD", name: "TexParameterMaxLOD", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterMinLOD", name: "TexParameterMinLOD", pkg: "", typ: $funcType([types.GLEnum, $Int], [], false)}, {prop: "TexParameterWrapR", name: "TexParameterWrapR", pkg: "", typ: $funcType([types.GLEnum, types.GLEnum], [], false)}, {prop: "TexSubImage2D", name: "TexSubImage2D", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexSubImage2DHtmlElement", name: "TexSubImage2DHtmlElement", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "TexSubImage2DOffset", name: "TexSubImage2DOffset", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "TexSubImage2DOffset2", name: "TexSubImage2DOffset2", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, types.GLEnum, $Int], [], false)}, {prop: "TexSubImage2DHtmlElement2", name: "TexSubImage2DHtmlElement2", pkg: "", typ: $funcType([types.GLEnum, $Int, $Int, $Int, $Int, $Int, types.GLEnum, types.GLEnum, js.Value], [], false)}, {prop: "Uniform1f", name: "Uniform1f", pkg: "", typ: $funcType([ptrType$13, $Float32], [], false)}, {prop: "Uniform1fv", name: "Uniform1fv", pkg: "", typ: $funcType([ptrType$13, sliceType$7], [], false)}, {prop: "Uniform1i", name: "Uniform1i", pkg: "", typ: $funcType([ptrType$13, $Int], [], false)}, {prop: "Uniform1iv", name: "Uniform1iv", pkg: "", typ: $funcType([ptrType$13, sliceType$12], [], false)}, {prop: "Uniform2f", name: "Uniform2f", pkg: "", typ: $funcType([ptrType$13, $Float32, $Float32], [], false)}, {prop: "Uniform2fv", name: "Uniform2fv", pkg: "", typ: $funcType([ptrType$13, sliceType$7], [], false)}, {prop: "Uniform2i", name: "Uniform2i", pkg: "", typ: $funcType([ptrType$13, $Int, $Int], [], false)}, {prop: "Uniform2iv", name: "Uniform2iv", pkg: "", typ: $funcType([ptrType$13, sliceType$12], [], false)}, {prop: "Uniform3f", name: "Uniform3f", pkg: "", typ: $funcType([ptrType$13, $Float32, $Float32, $Float32], [], false)}, {prop: "Uniform3fv", name: "Uniform3fv", pkg: "", typ: $funcType([ptrType$13, sliceType$7], [], false)}, {prop: "Uniform3i", name: "Uniform3i", pkg: "", typ: $funcType([ptrType$13, $Int, $Int, $Int], [], false)}, {prop: "Uniform3iv", name: "Uniform3iv", pkg: "", typ: $funcType([ptrType$13, sliceType$12], [], false)}, {prop: "Uniform4f", name: "Uniform4f", pkg: "", typ: $funcType([ptrType$13, $Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "Uniform4fv", name: "Uniform4fv", pkg: "", typ: $funcType([ptrType$13, sliceType$7], [], false)}, {prop: "Uniform4i", name: "Uniform4i", pkg: "", typ: $funcType([ptrType$13, $Int, $Int, $Int, $Int], [], false)}, {prop: "Uniform4iv", name: "Uniform4iv", pkg: "", typ: $funcType([ptrType$13, sliceType$12], [], false)}, {prop: "UniformMatrix2fv", name: "UniformMatrix2fv", pkg: "", typ: $funcType([ptrType$13, $Bool, sliceType$7], [], false)}, {prop: "UniformMatrix3fv", name: "UniformMatrix3fv", pkg: "", typ: $funcType([ptrType$13, $Bool, sliceType$7], [], false)}, {prop: "UniformMatrix4fv", name: "UniformMatrix4fv", pkg: "", typ: $funcType([ptrType$13, $Bool, sliceType$7], [], false)}, {prop: "UseProgram", name: "UseProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "ValidateProgram", name: "ValidateProgram", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "VertexAttrib1f", name: "VertexAttrib1f", pkg: "", typ: $funcType([$Int, $Float32], [], false)}, {prop: "VertexAttrib2f", name: "VertexAttrib2f", pkg: "", typ: $funcType([$Int, $Float32, $Float32], [], false)}, {prop: "VertexAttrib3f", name: "VertexAttrib3f", pkg: "", typ: $funcType([$Int, $Float32, $Float32, $Float32], [], false)}, {prop: "VertexAttrib4f", name: "VertexAttrib4f", pkg: "", typ: $funcType([$Int, $Float32, $Float32, $Float32, $Float32], [], false)}, {prop: "VertexAttrib1fv", name: "VertexAttrib1fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttrib2fv", name: "VertexAttrib2fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttrib3fv", name: "VertexAttrib3fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttrib4fv", name: "VertexAttrib4fv", pkg: "", typ: $funcType([$Int, sliceType$7], [], false)}, {prop: "VertexAttribPointer", name: "VertexAttribPointer", pkg: "", typ: $funcType([$Int, $Int, types.GLEnum, $Bool, $Int, $Int], [], false)}, {prop: "Viewport", name: "Viewport", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int], [], false)}];
|
|
186743
186715
|
RenderingContext.init("github.com/nuberu/webgl", [{prop: "loaded", name: "loaded", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "js", name: "js", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "version", name: "version", embedded: false, exported: false, typ: $Uint, tag: ""}]);
|
|
186744
186716
|
$init = function() {
|
|
186745
186717
|
$pkg.$init = function() {};
|
|
@@ -186748,469 +186720,8 @@ $packages["github.com/nuberu/webgl"] = (function() {
|
|
|
186748
186720
|
$r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186749
186721
|
$r = extensions.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186750
186722
|
$r = types.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186751
|
-
$r =
|
|
186752
|
-
$r =
|
|
186753
|
-
$r = js.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186754
|
-
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
186755
|
-
};
|
|
186756
|
-
$pkg.$init = $init;
|
|
186757
|
-
return $pkg;
|
|
186758
|
-
})();
|
|
186759
|
-
$packages["golang.org/x/exp/shiny/driver/internal/dom"] = (function() {
|
|
186760
|
-
var $pkg = {}, $init, focus, key, mouse, size, geom, math, strings, js, DomEvents, sliceType, funcType, sliceType$1, sliceType$2, chanType, ptrType, keyCodesMap, keyCodesByKeyMap, GetDocWidth, GetDocHeight, GetScreenWidth, GetScreenHeight, GetBrowserZoomRatio, SetWindowWidth, SetWindowHeight, GetOrientation, NewDomEvents, getMouseDirection, getWheelButton, getMouseButton, getEventModifiers, isFocusIn, getKeyRune, getKeyDirection, getKeyCode;
|
|
186761
|
-
focus = $packages["golang.org/x/mobile/event/focus"];
|
|
186762
|
-
key = $packages["golang.org/x/mobile/event/key"];
|
|
186763
|
-
mouse = $packages["golang.org/x/mobile/event/mouse"];
|
|
186764
|
-
size = $packages["golang.org/x/mobile/event/size"];
|
|
186765
|
-
geom = $packages["golang.org/x/mobile/geom"];
|
|
186766
|
-
math = $packages["math"];
|
|
186767
|
-
strings = $packages["strings"];
|
|
186768
|
-
js = $packages["syscall/js"];
|
|
186769
|
-
DomEvents = $pkg.DomEvents = $newType(0, $kindStruct, "dom.DomEvents", true, "golang.org/x/exp/shiny/driver/internal/dom", true, function(eventChan_, releases_) {
|
|
186770
|
-
this.$val = this;
|
|
186771
|
-
if (arguments.length === 0) {
|
|
186772
|
-
this.eventChan = $chanNil;
|
|
186773
|
-
this.releases = sliceType$1.nil;
|
|
186774
|
-
return;
|
|
186775
|
-
}
|
|
186776
|
-
this.eventChan = eventChan_;
|
|
186777
|
-
this.releases = releases_;
|
|
186778
|
-
});
|
|
186779
|
-
sliceType = $sliceType($emptyInterface);
|
|
186780
|
-
funcType = $funcType([], [], false);
|
|
186781
|
-
sliceType$1 = $sliceType(funcType);
|
|
186782
|
-
sliceType$2 = $sliceType($Int32);
|
|
186783
|
-
chanType = $chanType($emptyInterface, false, false);
|
|
186784
|
-
ptrType = $ptrType(DomEvents);
|
|
186785
|
-
GetDocWidth = function() {
|
|
186786
|
-
return $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Int();
|
|
186787
|
-
};
|
|
186788
|
-
$pkg.GetDocWidth = GetDocWidth;
|
|
186789
|
-
GetDocHeight = function() {
|
|
186790
|
-
return $clone($clone(js.Global(), js.Value).Get("innerHeight"), js.Value).Int();
|
|
186791
|
-
};
|
|
186792
|
-
$pkg.GetDocHeight = GetDocHeight;
|
|
186793
|
-
GetScreenWidth = function() {
|
|
186794
|
-
return $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("width"), js.Value).Int();
|
|
186795
|
-
};
|
|
186796
|
-
$pkg.GetScreenWidth = GetScreenWidth;
|
|
186797
|
-
GetScreenHeight = function() {
|
|
186798
|
-
return $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("height"), js.Value).Int();
|
|
186799
|
-
};
|
|
186800
|
-
$pkg.GetScreenHeight = GetScreenHeight;
|
|
186801
|
-
GetBrowserZoomRatio = function() {
|
|
186802
|
-
var chromeZoom1, chromeZoom2, chromeZoom3, docElClientWidth, scrollerWidthInNoZoom, scrollerWidthInZoom1, scrollerWidthInZoom2, windowInnerWidth, windowOuterWidth;
|
|
186803
|
-
windowInnerWidth = $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Float();
|
|
186804
|
-
windowOuterWidth = $clone($clone(js.Global(), js.Value).Get("outerWidth"), js.Value).Float();
|
|
186805
|
-
docElClientWidth = $clone($clone($clone($clone(js.Global(), js.Value).Get("document"), js.Value).Get("documentElement"), js.Value).Get("clientWidth"), js.Value).Float();
|
|
186806
|
-
scrollerWidthInNoZoom = windowInnerWidth - docElClientWidth;
|
|
186807
|
-
chromeZoom1 = (windowOuterWidth - scrollerWidthInNoZoom) / windowInnerWidth;
|
|
186808
|
-
scrollerWidthInZoom1 = math.Round(scrollerWidthInNoZoom * chromeZoom1);
|
|
186809
|
-
chromeZoom2 = (windowOuterWidth - scrollerWidthInZoom1) / windowInnerWidth;
|
|
186810
|
-
scrollerWidthInZoom2 = math.Round(scrollerWidthInNoZoom * chromeZoom2);
|
|
186811
|
-
chromeZoom3 = (windowOuterWidth - scrollerWidthInZoom2) / windowInnerWidth;
|
|
186812
|
-
return chromeZoom3;
|
|
186813
|
-
};
|
|
186814
|
-
$pkg.GetBrowserZoomRatio = GetBrowserZoomRatio;
|
|
186815
|
-
SetWindowWidth = function(newInnerWidth) {
|
|
186816
|
-
var {_r, innerWidth, newInnerWidth, newOuterWidth, outerHeight, outerWidth, screenWidth, $s, $r, $c} = $restore(this, {newInnerWidth});
|
|
186817
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186818
|
-
innerWidth = $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Int();
|
|
186819
|
-
outerWidth = $clone($clone(js.Global(), js.Value).Get("outerWidth"), js.Value).Int();
|
|
186820
|
-
outerHeight = $clone($clone(js.Global(), js.Value).Get("outerHeight"), js.Value).Int();
|
|
186821
|
-
newOuterWidth = newInnerWidth + ((outerWidth - innerWidth >> 0)) >> 0;
|
|
186822
|
-
screenWidth = GetScreenWidth();
|
|
186823
|
-
if (newOuterWidth > screenWidth) {
|
|
186824
|
-
newOuterWidth = screenWidth;
|
|
186825
|
-
}
|
|
186826
|
-
_r = $clone(js.Global(), js.Value).Call("resizeTo", new sliceType([new $Int(newOuterWidth), new $Int(outerHeight)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186827
|
-
_r;
|
|
186828
|
-
$s = -1; return;
|
|
186829
|
-
/* */ } return; } var $f = {$blk: SetWindowWidth, $c: true, $r, _r, innerWidth, newInnerWidth, newOuterWidth, outerHeight, outerWidth, screenWidth, $s};return $f;
|
|
186830
|
-
};
|
|
186831
|
-
$pkg.SetWindowWidth = SetWindowWidth;
|
|
186832
|
-
SetWindowHeight = function(newInnerHeight) {
|
|
186833
|
-
var {_r, innerHeight, newInnerHeight, newOuterHeight, outerHeight, outerWidth, screenHeight, $s, $r, $c} = $restore(this, {newInnerHeight});
|
|
186834
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186835
|
-
innerHeight = $clone($clone(js.Global(), js.Value).Get("innerHeight"), js.Value).Int();
|
|
186836
|
-
outerHeight = $clone($clone(js.Global(), js.Value).Get("outerHeight"), js.Value).Int();
|
|
186837
|
-
outerWidth = $clone($clone(js.Global(), js.Value).Get("outerWidth"), js.Value).Int();
|
|
186838
|
-
newOuterHeight = newInnerHeight + ((outerHeight - innerHeight >> 0)) >> 0;
|
|
186839
|
-
screenHeight = GetScreenHeight();
|
|
186840
|
-
if (newOuterHeight > screenHeight) {
|
|
186841
|
-
newOuterHeight = screenHeight;
|
|
186842
|
-
}
|
|
186843
|
-
_r = $clone(js.Global(), js.Value).Call("resizeTo", new sliceType([new $Int(outerWidth), new $Int(newOuterHeight)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186844
|
-
_r;
|
|
186845
|
-
$s = -1; return;
|
|
186846
|
-
/* */ } return; } var $f = {$blk: SetWindowHeight, $c: true, $r, _r, innerHeight, newInnerHeight, newOuterHeight, outerHeight, outerWidth, screenHeight, $s};return $f;
|
|
186847
|
-
};
|
|
186848
|
-
$pkg.SetWindowHeight = SetWindowHeight;
|
|
186849
|
-
GetOrientation = function() {
|
|
186850
|
-
var {$24r, $24r$1, $24r$2, orientation, orientationType, $s, $deferred, $r, $c} = $restore(this, {});
|
|
186851
|
-
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
186852
|
-
orientation = [orientation];
|
|
186853
|
-
orientation[0] = 0;
|
|
186854
|
-
$deferred.push([(function(orientation) { return function() {
|
|
186855
|
-
if (!($interfaceIsEqual($recover(), $ifaceNil))) {
|
|
186856
|
-
orientation[0] = 0;
|
|
186857
|
-
}
|
|
186858
|
-
}; })(orientation), []]);
|
|
186859
|
-
orientationType = $clone($clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("orientation"), js.Value).Get("type"), js.Value).String();
|
|
186860
|
-
/* */ if (strings.HasPrefix(orientationType, "landscape")) { $s = 1; continue; }
|
|
186861
|
-
/* */ $s = 2; continue;
|
|
186862
|
-
/* if (strings.HasPrefix(orientationType, "landscape")) { */ case 1:
|
|
186863
|
-
orientation[0] = 2;
|
|
186864
|
-
$24r = orientation[0];
|
|
186865
|
-
$s = 3; case 3: return $24r;
|
|
186866
|
-
/* } */ case 2:
|
|
186867
|
-
/* */ if (strings.HasPrefix(orientationType, "portrait")) { $s = 4; continue; }
|
|
186868
|
-
/* */ $s = 5; continue;
|
|
186869
|
-
/* if (strings.HasPrefix(orientationType, "portrait")) { */ case 4:
|
|
186870
|
-
orientation[0] = 2;
|
|
186871
|
-
$24r$1 = orientation[0];
|
|
186872
|
-
$s = 6; case 6: return $24r$1;
|
|
186873
|
-
/* } */ case 5:
|
|
186874
|
-
orientation[0] = 0;
|
|
186875
|
-
$24r$2 = orientation[0];
|
|
186876
|
-
$s = 7; case 7: return $24r$2;
|
|
186877
|
-
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return orientation[0]; } if($curGoroutine.asleep) { var $f = {$blk: GetOrientation, $c: true, $r, $24r, $24r$1, $24r$2, orientation, orientationType, $s, $deferred};return $f; } }
|
|
186878
|
-
};
|
|
186879
|
-
$pkg.GetOrientation = GetOrientation;
|
|
186880
|
-
NewDomEvents = function() {
|
|
186881
|
-
return new DomEvents.ptr(new $Chan($emptyInterface, 0), $makeSlice(sliceType$1, 0));
|
|
186882
|
-
};
|
|
186883
|
-
$pkg.NewDomEvents = NewDomEvents;
|
|
186884
|
-
DomEvents.ptr.prototype.GetEventChan = function() {
|
|
186885
|
-
var d;
|
|
186886
|
-
d = this;
|
|
186887
|
-
return d.eventChan;
|
|
186888
|
-
};
|
|
186889
|
-
DomEvents.prototype.GetEventChan = function() { return this.$val.GetEventChan(); };
|
|
186890
|
-
DomEvents.ptr.prototype.Release = function() {
|
|
186891
|
-
var {_i, _ref, d, release, $s, $r, $c} = $restore(this, {});
|
|
186892
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186893
|
-
d = this;
|
|
186894
|
-
_ref = d.releases;
|
|
186895
|
-
_i = 0;
|
|
186896
|
-
/* while (true) { */ case 1:
|
|
186897
|
-
/* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
|
|
186898
|
-
release = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
|
|
186899
|
-
$r = release(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186900
|
-
_i++;
|
|
186901
|
-
$s = 1; continue;
|
|
186902
|
-
case 2:
|
|
186903
|
-
$s = -1; return;
|
|
186904
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.Release, $c: true, $r, _i, _ref, d, release, $s};return $f;
|
|
186905
|
-
};
|
|
186906
|
-
DomEvents.prototype.Release = function() { return this.$val.Release(); };
|
|
186907
|
-
DomEvents.ptr.prototype.BindEvents = function() {
|
|
186908
|
-
var {d, $s, $r, $c} = $restore(this, {});
|
|
186909
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186910
|
-
d = this;
|
|
186911
|
-
$r = d.bindSizeEvents(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186912
|
-
$go($methodVal(d, "emitSizeEvent"), []);
|
|
186913
|
-
$r = d.bindMouseEvents(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186914
|
-
$r = d.bindKeyEvents(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186915
|
-
$r = d.bindFocusEvents(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186916
|
-
$s = -1; return;
|
|
186917
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.BindEvents, $c: true, $r, d, $s};return $f;
|
|
186918
|
-
};
|
|
186919
|
-
DomEvents.prototype.BindEvents = function() { return this.$val.BindEvents(); };
|
|
186920
|
-
DomEvents.ptr.prototype.bindSizeEvents = function() {
|
|
186921
|
-
var {_r, d, onResize, $s, $r, $c} = $restore(this, {});
|
|
186922
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186923
|
-
d = [d];
|
|
186924
|
-
onResize = [onResize];
|
|
186925
|
-
d[0] = this;
|
|
186926
|
-
onResize[0] = $clone(js.FuncOf((function(d, onResize) { return function $b(this$1, args) {
|
|
186927
|
-
var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
186928
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186929
|
-
$r = d[0].emitSizeEvent(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186930
|
-
$s = -1; return $ifaceNil;
|
|
186931
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f;
|
|
186932
|
-
}; })(d, onResize)), js.Func);
|
|
186933
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186934
|
-
_r;
|
|
186935
|
-
d[0].releases = $append(d[0].releases, (function(d, onResize) { return function $b() {
|
|
186936
|
-
var {_r$1, $s, $r, $c} = $restore(this, {});
|
|
186937
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186938
|
-
_r$1 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
186939
|
-
_r$1;
|
|
186940
|
-
$clone(onResize[0], js.Func).Release();
|
|
186941
|
-
$s = -1; return;
|
|
186942
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, $s};return $f;
|
|
186943
|
-
}; })(d, onResize));
|
|
186944
|
-
$s = -1; return;
|
|
186945
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindSizeEvents, $c: true, $r, _r, d, onResize, $s};return $f;
|
|
186946
|
-
};
|
|
186947
|
-
DomEvents.prototype.bindSizeEvents = function() { return this.$val.bindSizeEvents(); };
|
|
186948
|
-
DomEvents.ptr.prototype.emitSizeEvent = function() {
|
|
186949
|
-
var {_q, _q$1, _r, d, height, orientation, pixelsPerPt, width, x, $s, $r, $c} = $restore(this, {});
|
|
186950
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186951
|
-
d = this;
|
|
186952
|
-
_r = GetOrientation(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186953
|
-
orientation = _r;
|
|
186954
|
-
pixelsPerPt = 1;
|
|
186955
|
-
width = GetDocWidth();
|
|
186956
|
-
height = GetDocHeight();
|
|
186957
|
-
$r = $send(d.eventChan, (x = new size.Event.ptr(width, height, ((_q = width / ((pixelsPerPt >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), ((_q$1 = height / ((pixelsPerPt >> 0)), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), pixelsPerPt, orientation), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186958
|
-
$s = -1; return;
|
|
186959
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.emitSizeEvent, $c: true, $r, _q, _q$1, _r, d, height, orientation, pixelsPerPt, width, x, $s};return $f;
|
|
186960
|
-
};
|
|
186961
|
-
DomEvents.prototype.emitSizeEvent = function() { return this.$val.emitSizeEvent(); };
|
|
186962
|
-
DomEvents.ptr.prototype.bindMouseEvents = function() {
|
|
186963
|
-
var {_r, _r$1, _r$2, _r$3, d, onClick, onMove, onWheel, $s, $r, $c} = $restore(this, {});
|
|
186964
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186965
|
-
d = [d];
|
|
186966
|
-
onClick = [onClick];
|
|
186967
|
-
onMove = [onMove];
|
|
186968
|
-
onWheel = [onWheel];
|
|
186969
|
-
d[0] = this;
|
|
186970
|
-
onMove[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
186971
|
-
var {_r, args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
186972
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186973
|
-
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186974
|
-
_r;
|
|
186975
|
-
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), 0, getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 0), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186976
|
-
$s = -1; return $ifaceNil;
|
|
186977
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, args, this$1, x, $s};return $f;
|
|
186978
|
-
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
186979
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
186980
|
-
_r;
|
|
186981
|
-
onClick[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
186982
|
-
var {_r$1, args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
186983
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186984
|
-
_r$1 = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
186985
|
-
_r$1;
|
|
186986
|
-
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getMouseButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getMouseDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186987
|
-
$s = -1; return $ifaceNil;
|
|
186988
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, args, this$1, x, $s};return $f;
|
|
186989
|
-
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
186990
|
-
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
186991
|
-
_r$1;
|
|
186992
|
-
_r$2 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
186993
|
-
_r$2;
|
|
186994
|
-
onWheel[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
186995
|
-
var {args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
186996
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
186997
|
-
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getWheelButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 3), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186998
|
-
$s = -1; return $ifaceNil;
|
|
186999
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, x, $s};return $f;
|
|
187000
|
-
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
187001
|
-
_r$3 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
187002
|
-
_r$3;
|
|
187003
|
-
d[0].releases = $append(d[0].releases, (function(d, onClick, onMove, onWheel) { return function $b() {
|
|
187004
|
-
var {_r$4, _r$5, _r$6, _r$7, $s, $r, $c} = $restore(this, {});
|
|
187005
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187006
|
-
_r$4 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
187007
|
-
_r$4;
|
|
187008
|
-
_r$5 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
187009
|
-
_r$5;
|
|
187010
|
-
_r$6 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
187011
|
-
_r$6;
|
|
187012
|
-
_r$7 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
187013
|
-
_r$7;
|
|
187014
|
-
$clone(onMove[0], js.Func).Release();
|
|
187015
|
-
$clone(onClick[0], js.Func).Release();
|
|
187016
|
-
$clone(onWheel[0], js.Func).Release();
|
|
187017
|
-
$s = -1; return;
|
|
187018
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, _r$5, _r$6, _r$7, $s};return $f;
|
|
187019
|
-
}; })(d, onClick, onMove, onWheel));
|
|
187020
|
-
$s = -1; return;
|
|
187021
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindMouseEvents, $c: true, $r, _r, _r$1, _r$2, _r$3, d, onClick, onMove, onWheel, $s};return $f;
|
|
187022
|
-
};
|
|
187023
|
-
DomEvents.prototype.bindMouseEvents = function() { return this.$val.bindMouseEvents(); };
|
|
187024
|
-
getMouseDirection = function(ev) {
|
|
187025
|
-
var dir, ev;
|
|
187026
|
-
dir = 0;
|
|
187027
|
-
dir = 0;
|
|
187028
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mousedown") {
|
|
187029
|
-
dir = 1;
|
|
187030
|
-
}
|
|
187031
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mouseup") {
|
|
187032
|
-
dir = 2;
|
|
187033
|
-
}
|
|
187034
|
-
return dir;
|
|
187035
|
-
};
|
|
187036
|
-
getWheelButton = function(ev) {
|
|
187037
|
-
var deltaX, deltaY, ev;
|
|
187038
|
-
deltaY = $clone($clone(ev, js.Value).Get("deltaY"), js.Value).Int();
|
|
187039
|
-
deltaX = $clone($clone(ev, js.Value).Get("deltaX"), js.Value).Int();
|
|
187040
|
-
if (deltaY > 0) {
|
|
187041
|
-
return -2;
|
|
187042
|
-
}
|
|
187043
|
-
if (deltaY < 0) {
|
|
187044
|
-
return -1;
|
|
187045
|
-
}
|
|
187046
|
-
if (deltaX > 0) {
|
|
187047
|
-
return -4;
|
|
187048
|
-
}
|
|
187049
|
-
if (deltaX < 0) {
|
|
187050
|
-
return -3;
|
|
187051
|
-
}
|
|
187052
|
-
return 0;
|
|
187053
|
-
};
|
|
187054
|
-
getMouseButton = function(ev) {
|
|
187055
|
-
var _1, ev;
|
|
187056
|
-
_1 = $clone($clone(ev, js.Value).Get("button"), js.Value).Int();
|
|
187057
|
-
if (_1 === (0)) {
|
|
187058
|
-
return 1;
|
|
187059
|
-
} else if (_1 === (1)) {
|
|
187060
|
-
return 2;
|
|
187061
|
-
} else if (_1 === (2)) {
|
|
187062
|
-
return 3;
|
|
187063
|
-
} else if (_1 === (3)) {
|
|
187064
|
-
return 8;
|
|
187065
|
-
} else if (_1 === (4)) {
|
|
187066
|
-
return 9;
|
|
187067
|
-
} else {
|
|
187068
|
-
return 0;
|
|
187069
|
-
}
|
|
187070
|
-
};
|
|
187071
|
-
getEventModifiers = function(ev) {
|
|
187072
|
-
var ev, mod;
|
|
187073
|
-
mod = 0;
|
|
187074
|
-
if ($clone($clone(ev, js.Value).Get("altKey"), js.Value).Bool()) {
|
|
187075
|
-
mod = (mod | (4)) >>> 0;
|
|
187076
|
-
}
|
|
187077
|
-
if ($clone($clone(ev, js.Value).Get("ctrlKey"), js.Value).Bool()) {
|
|
187078
|
-
mod = (mod | (2)) >>> 0;
|
|
187079
|
-
}
|
|
187080
|
-
if ($clone($clone(ev, js.Value).Get("shiftKey"), js.Value).Bool()) {
|
|
187081
|
-
mod = (mod | (1)) >>> 0;
|
|
187082
|
-
}
|
|
187083
|
-
if ($clone($clone(ev, js.Value).Get("metaKey"), js.Value).Bool()) {
|
|
187084
|
-
mod = (mod | (8)) >>> 0;
|
|
187085
|
-
}
|
|
187086
|
-
return mod;
|
|
187087
|
-
};
|
|
187088
|
-
DomEvents.ptr.prototype.bindFocusEvents = function() {
|
|
187089
|
-
var {_r, _r$1, d, onFocus, $s, $r, $c} = $restore(this, {});
|
|
187090
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187091
|
-
d = [d];
|
|
187092
|
-
onFocus = [onFocus];
|
|
187093
|
-
d[0] = this;
|
|
187094
|
-
onFocus[0] = $clone(js.FuncOf((function(d, onFocus) { return function $b(this$1, args) {
|
|
187095
|
-
var {args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
187096
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187097
|
-
$r = $send(d[0].eventChan, (x = new focus.Event.ptr(isFocusIn($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187098
|
-
$s = -1; return $ifaceNil;
|
|
187099
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, x, $s};return $f;
|
|
187100
|
-
}; })(d, onFocus)), js.Func);
|
|
187101
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
187102
|
-
_r;
|
|
187103
|
-
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
187104
|
-
_r$1;
|
|
187105
|
-
d[0].releases = $append(d[0].releases, (function(d, onFocus) { return function $b() {
|
|
187106
|
-
var {_r$2, _r$3, $s, $r, $c} = $restore(this, {});
|
|
187107
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187108
|
-
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
187109
|
-
_r$2;
|
|
187110
|
-
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
187111
|
-
_r$3;
|
|
187112
|
-
$clone(onFocus[0], js.Func).Release();
|
|
187113
|
-
$s = -1; return;
|
|
187114
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, $s};return $f;
|
|
187115
|
-
}; })(d, onFocus));
|
|
187116
|
-
$s = -1; return;
|
|
187117
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindFocusEvents, $c: true, $r, _r, _r$1, d, onFocus, $s};return $f;
|
|
187118
|
-
};
|
|
187119
|
-
DomEvents.prototype.bindFocusEvents = function() { return this.$val.bindFocusEvents(); };
|
|
187120
|
-
isFocusIn = function(ev) {
|
|
187121
|
-
var ev;
|
|
187122
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "focus") {
|
|
187123
|
-
return true;
|
|
187124
|
-
}
|
|
187125
|
-
return false;
|
|
187126
|
-
};
|
|
187127
|
-
DomEvents.ptr.prototype.bindKeyEvents = function() {
|
|
187128
|
-
var {_r, _r$1, d, onKey, $s, $r, $c} = $restore(this, {});
|
|
187129
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187130
|
-
d = [d];
|
|
187131
|
-
onKey = [onKey];
|
|
187132
|
-
d[0] = this;
|
|
187133
|
-
onKey[0] = $clone(js.FuncOf((function(d, onKey) { return function $b(this$1, args) {
|
|
187134
|
-
var {_r, args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
187135
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187136
|
-
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
187137
|
-
_r;
|
|
187138
|
-
$r = $send(d[0].eventChan, (x = new key.Event.ptr(getKeyRune($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyCode($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187139
|
-
$s = -1; return $ifaceNil;
|
|
187140
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, args, this$1, x, $s};return $f;
|
|
187141
|
-
}; })(d, onKey)), js.Func);
|
|
187142
|
-
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
187143
|
-
_r;
|
|
187144
|
-
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
187145
|
-
_r$1;
|
|
187146
|
-
d[0].releases = $append(d[0].releases, (function(d, onKey) { return function $b() {
|
|
187147
|
-
var {_r$2, _r$3, $s, $r, $c} = $restore(this, {});
|
|
187148
|
-
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
187149
|
-
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
187150
|
-
_r$2;
|
|
187151
|
-
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
187152
|
-
_r$3;
|
|
187153
|
-
$clone(onKey[0], js.Func).Release();
|
|
187154
|
-
$s = -1; return;
|
|
187155
|
-
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, $s};return $f;
|
|
187156
|
-
}; })(d, onKey));
|
|
187157
|
-
$s = -1; return;
|
|
187158
|
-
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindKeyEvents, $c: true, $r, _r, _r$1, d, onKey, $s};return $f;
|
|
187159
|
-
};
|
|
187160
|
-
DomEvents.prototype.bindKeyEvents = function() { return this.$val.bindKeyEvents(); };
|
|
187161
|
-
getKeyRune = function(ev) {
|
|
187162
|
-
var ev, key$1;
|
|
187163
|
-
key$1 = (new sliceType$2($stringToRunes($clone($clone(ev, js.Value).Get("key"), js.Value).String())));
|
|
187164
|
-
if (key$1.$length === 1) {
|
|
187165
|
-
return (0 >= key$1.$length ? ($throwRuntimeError("index out of range"), undefined) : key$1.$array[key$1.$offset + 0]);
|
|
187166
|
-
}
|
|
187167
|
-
return -1;
|
|
187168
|
-
};
|
|
187169
|
-
getKeyDirection = function(ev) {
|
|
187170
|
-
var dir, ev;
|
|
187171
|
-
dir = 0;
|
|
187172
|
-
dir = 0;
|
|
187173
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keydown") {
|
|
187174
|
-
dir = 1;
|
|
187175
|
-
}
|
|
187176
|
-
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keyup") {
|
|
187177
|
-
dir = 2;
|
|
187178
|
-
}
|
|
187179
|
-
return dir;
|
|
187180
|
-
};
|
|
187181
|
-
getKeyCode = function(ev) {
|
|
187182
|
-
var _entry, _entry$1, _tuple, _tuple$1, code, code$1, domCode, domKey, ev, exists, exists$1;
|
|
187183
|
-
domCode = $clone($clone(ev, js.Value).Get("code"), js.Value).String();
|
|
187184
|
-
_tuple = (_entry = $mapIndex(keyCodesMap,$String.keyFor(domCode)), _entry !== undefined ? [_entry.v, true] : [0, false]);
|
|
187185
|
-
code = _tuple[0];
|
|
187186
|
-
exists = _tuple[1];
|
|
187187
|
-
if (exists) {
|
|
187188
|
-
return code;
|
|
187189
|
-
}
|
|
187190
|
-
domKey = $clone($clone(ev, js.Value).Get("key"), js.Value).String();
|
|
187191
|
-
_tuple$1 = (_entry$1 = $mapIndex(keyCodesByKeyMap,$String.keyFor(domKey)), _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]);
|
|
187192
|
-
code$1 = _tuple$1[0];
|
|
187193
|
-
exists$1 = _tuple$1[1];
|
|
187194
|
-
if (exists$1) {
|
|
187195
|
-
return code$1;
|
|
187196
|
-
}
|
|
187197
|
-
return 0;
|
|
187198
|
-
};
|
|
187199
|
-
ptrType.methods = [{prop: "GetEventChan", name: "GetEventChan", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "BindEvents", name: "BindEvents", pkg: "", typ: $funcType([], [], false)}, {prop: "bindSizeEvents", name: "bindSizeEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "emitSizeEvent", name: "emitSizeEvent", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "bindMouseEvents", name: "bindMouseEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "bindFocusEvents", name: "bindFocusEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}, {prop: "bindKeyEvents", name: "bindKeyEvents", pkg: "golang.org/x/exp/shiny/driver/internal/dom", typ: $funcType([], [], false)}];
|
|
187200
|
-
DomEvents.init("golang.org/x/exp/shiny/driver/internal/dom", [{prop: "eventChan", name: "eventChan", embedded: false, exported: false, typ: chanType, tag: ""}, {prop: "releases", name: "releases", embedded: false, exported: false, typ: sliceType$1, tag: ""}]);
|
|
187201
|
-
$init = function() {
|
|
187202
|
-
$pkg.$init = function() {};
|
|
187203
|
-
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
187204
|
-
$r = focus.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187205
|
-
$r = key.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187206
|
-
$r = mouse.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187207
|
-
$r = size.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187208
|
-
$r = geom.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187209
|
-
$r = math.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187210
|
-
$r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187211
|
-
$r = js.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187212
|
-
keyCodesMap = $makeMap($String.keyFor, [{ k: "KeyA", v: 4 }, { k: "KeyB", v: 5 }, { k: "KeyC", v: 6 }, { k: "KeyD", v: 7 }, { k: "KeyE", v: 8 }, { k: "KeyF", v: 9 }, { k: "KeyG", v: 10 }, { k: "KeyH", v: 11 }, { k: "KeyI", v: 12 }, { k: "KeyJ", v: 13 }, { k: "KeyK", v: 14 }, { k: "KeyL", v: 15 }, { k: "KeyM", v: 16 }, { k: "KeyN", v: 17 }, { k: "KeyO", v: 18 }, { k: "KeyP", v: 19 }, { k: "KeyQ", v: 20 }, { k: "KeyR", v: 21 }, { k: "KeyS", v: 22 }, { k: "KeyT", v: 23 }, { k: "KeyU", v: 24 }, { k: "KeyV", v: 25 }, { k: "KeyW", v: 26 }, { k: "KeyX", v: 27 }, { k: "KeyY", v: 28 }, { k: "KeyZ", v: 29 }, { k: "Digit1", v: 30 }, { k: "Digit2", v: 31 }, { k: "Digit3", v: 32 }, { k: "Digit4", v: 33 }, { k: "Digit5", v: 34 }, { k: "Digit6", v: 35 }, { k: "Digit7", v: 36 }, { k: "Digit8", v: 37 }, { k: "Digit9", v: 38 }, { k: "Digit0", v: 39 }, { k: "Enter", v: 40 }, { k: "Escape", v: 41 }, { k: "Backspace", v: 42 }, { k: "Tab", v: 43 }, { k: "Space", v: 44 }, { k: "Minus", v: 45 }, { k: "Equal", v: 46 }, { k: "BracketLeft", v: 47 }, { k: "BracketRight", v: 48 }, { k: "Backslash", v: 49 }, { k: "Semicolon", v: 51 }, { k: "Quote", v: 52 }, { k: "Backquote", v: 53 }, { k: "Comma", v: 54 }, { k: "Period", v: 55 }, { k: "Slash", v: 56 }, { k: "CapsLock", v: 57 }, { k: "F1", v: 58 }, { k: "F2", v: 59 }, { k: "F3", v: 60 }, { k: "F4", v: 61 }, { k: "F5", v: 62 }, { k: "F6", v: 63 }, { k: "F7", v: 64 }, { k: "F8", v: 65 }, { k: "F9", v: 66 }, { k: "F10", v: 67 }, { k: "F11", v: 68 }, { k: "F12", v: 69 }, { k: "Pause", v: 72 }, { k: "Insert", v: 73 }, { k: "Home", v: 74 }, { k: "PageUp", v: 75 }, { k: "Delete", v: 76 }, { k: "End", v: 77 }, { k: "PageDown", v: 78 }, { k: "ArrowRight", v: 79 }, { k: "ArrowLeft", v: 80 }, { k: "ArrowDown", v: 81 }, { k: "ArrowUp", v: 82 }, { k: "NumLock", v: 83 }, { k: "NumpadDivide", v: 84 }, { k: "NumpadMultiply", v: 85 }, { k: "NumpadSubtract", v: 86 }, { k: "NumpadAdd", v: 87 }, { k: "NumpadEnter", v: 88 }, { k: "Numpad1", v: 89 }, { k: "Numpad2", v: 90 }, { k: "Numpad3", v: 91 }, { k: "Numpad4", v: 92 }, { k: "Numpad5", v: 93 }, { k: "Numpad6", v: 94 }, { k: "Numpad7", v: 95 }, { k: "Numpad8", v: 96 }, { k: "Numpad9", v: 97 }, { k: "Numpad0", v: 98 }, { k: "NumpadDecimal", v: 99 }, { k: "NumpadEqual", v: 103 }, { k: "F13", v: 104 }, { k: "F14", v: 105 }, { k: "F15", v: 106 }, { k: "F16", v: 107 }, { k: "F17", v: 108 }, { k: "F18", v: 109 }, { k: "F19", v: 110 }, { k: "F20", v: 111 }, { k: "F21", v: 112 }, { k: "F22", v: 113 }, { k: "F23", v: 114 }, { k: "F24", v: 115 }, { k: "Help", v: 117 }, { k: "ContextMenu", v: 118 }, { k: "VolumeMute", v: 127 }, { k: "VolumeUp", v: 128 }, { k: "VolumeDown", v: 129 }, { k: "ControlLeft", v: 224 }, { k: "ShiftLeft", v: 225 }, { k: "AltLeft", v: 226 }, { k: "MetaLeft", v: 227 }, { k: "ControlRight", v: 228 }, { k: "ShiftRight", v: 229 }, { k: "AltRight", v: 230 }, { k: "MetaRight", v: 231 }, { k: "PrintScreen", v: 0 }]);
|
|
187213
|
-
keyCodesByKeyMap = $makeMap($String.keyFor, [{ k: "AudioVolumeMute", v: 127 }, { k: "AudioVolumeUp", v: 128 }, { k: "AudioVolumeDown", v: 129 }]);
|
|
186723
|
+
$r = runtime.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
186724
|
+
$r = js.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
187214
186725
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
187215
186726
|
};
|
|
187216
186727
|
$pkg.$init = $init;
|
|
@@ -189297,6 +188808,466 @@ $packages["golang.org/x/exp/shiny/driver/internal/errscreen"] = (function() {
|
|
|
189297
188808
|
$pkg.$init = $init;
|
|
189298
188809
|
return $pkg;
|
|
189299
188810
|
})();
|
|
188811
|
+
$packages["golang.org/x/exp/shiny/driver/util/dom"] = (function() {
|
|
188812
|
+
var $pkg = {}, $init, focus, key, mouse, size, geom, math, strings, js, DomEvents, sliceType, funcType, sliceType$1, sliceType$2, chanType, ptrType, keyCodesMap, keyCodesByKeyMap, GetDocWidth, GetDocHeight, GetScreenWidth, GetScreenHeight, GetBrowserZoomRatio, SetWindowWidth, SetWindowHeight, GetOrientation, NewDomEvents, getMouseDirection, getWheelButton, getMouseButton, getEventModifiers, isFocusIn, getKeyRune, getKeyDirection, getKeyCode;
|
|
188813
|
+
focus = $packages["golang.org/x/mobile/event/focus"];
|
|
188814
|
+
key = $packages["golang.org/x/mobile/event/key"];
|
|
188815
|
+
mouse = $packages["golang.org/x/mobile/event/mouse"];
|
|
188816
|
+
size = $packages["golang.org/x/mobile/event/size"];
|
|
188817
|
+
geom = $packages["golang.org/x/mobile/geom"];
|
|
188818
|
+
math = $packages["math"];
|
|
188819
|
+
strings = $packages["strings"];
|
|
188820
|
+
js = $packages["syscall/js"];
|
|
188821
|
+
DomEvents = $pkg.DomEvents = $newType(0, $kindStruct, "dom.DomEvents", true, "golang.org/x/exp/shiny/driver/util/dom", true, function(eventChan_, releases_) {
|
|
188822
|
+
this.$val = this;
|
|
188823
|
+
if (arguments.length === 0) {
|
|
188824
|
+
this.eventChan = $chanNil;
|
|
188825
|
+
this.releases = sliceType$1.nil;
|
|
188826
|
+
return;
|
|
188827
|
+
}
|
|
188828
|
+
this.eventChan = eventChan_;
|
|
188829
|
+
this.releases = releases_;
|
|
188830
|
+
});
|
|
188831
|
+
sliceType = $sliceType($emptyInterface);
|
|
188832
|
+
funcType = $funcType([], [], false);
|
|
188833
|
+
sliceType$1 = $sliceType(funcType);
|
|
188834
|
+
sliceType$2 = $sliceType($Int32);
|
|
188835
|
+
chanType = $chanType($emptyInterface, false, false);
|
|
188836
|
+
ptrType = $ptrType(DomEvents);
|
|
188837
|
+
GetDocWidth = function() {
|
|
188838
|
+
return $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Int();
|
|
188839
|
+
};
|
|
188840
|
+
$pkg.GetDocWidth = GetDocWidth;
|
|
188841
|
+
GetDocHeight = function() {
|
|
188842
|
+
return $clone($clone(js.Global(), js.Value).Get("innerHeight"), js.Value).Int();
|
|
188843
|
+
};
|
|
188844
|
+
$pkg.GetDocHeight = GetDocHeight;
|
|
188845
|
+
GetScreenWidth = function() {
|
|
188846
|
+
return $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("width"), js.Value).Int();
|
|
188847
|
+
};
|
|
188848
|
+
$pkg.GetScreenWidth = GetScreenWidth;
|
|
188849
|
+
GetScreenHeight = function() {
|
|
188850
|
+
return $clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("height"), js.Value).Int();
|
|
188851
|
+
};
|
|
188852
|
+
$pkg.GetScreenHeight = GetScreenHeight;
|
|
188853
|
+
GetBrowserZoomRatio = function() {
|
|
188854
|
+
var chromeZoom1, chromeZoom2, chromeZoom3, docElClientWidth, scrollerWidthInNoZoom, scrollerWidthInZoom1, scrollerWidthInZoom2, windowInnerWidth, windowOuterWidth;
|
|
188855
|
+
windowInnerWidth = $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Float();
|
|
188856
|
+
windowOuterWidth = $clone($clone(js.Global(), js.Value).Get("outerWidth"), js.Value).Float();
|
|
188857
|
+
docElClientWidth = $clone($clone($clone($clone(js.Global(), js.Value).Get("document"), js.Value).Get("documentElement"), js.Value).Get("clientWidth"), js.Value).Float();
|
|
188858
|
+
scrollerWidthInNoZoom = windowInnerWidth - docElClientWidth;
|
|
188859
|
+
chromeZoom1 = (windowOuterWidth - scrollerWidthInNoZoom) / windowInnerWidth;
|
|
188860
|
+
scrollerWidthInZoom1 = math.Round(scrollerWidthInNoZoom * chromeZoom1);
|
|
188861
|
+
chromeZoom2 = (windowOuterWidth - scrollerWidthInZoom1) / windowInnerWidth;
|
|
188862
|
+
scrollerWidthInZoom2 = math.Round(scrollerWidthInNoZoom * chromeZoom2);
|
|
188863
|
+
chromeZoom3 = (windowOuterWidth - scrollerWidthInZoom2) / windowInnerWidth;
|
|
188864
|
+
return chromeZoom3;
|
|
188865
|
+
};
|
|
188866
|
+
$pkg.GetBrowserZoomRatio = GetBrowserZoomRatio;
|
|
188867
|
+
SetWindowWidth = function(newInnerWidth) {
|
|
188868
|
+
var {_r, innerWidth, newInnerWidth, newOuterWidth, outerHeight, outerWidth, screenWidth, $s, $r, $c} = $restore(this, {newInnerWidth});
|
|
188869
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188870
|
+
innerWidth = $clone($clone(js.Global(), js.Value).Get("innerWidth"), js.Value).Int();
|
|
188871
|
+
outerWidth = $clone($clone(js.Global(), js.Value).Get("outerWidth"), js.Value).Int();
|
|
188872
|
+
outerHeight = $clone($clone(js.Global(), js.Value).Get("outerHeight"), js.Value).Int();
|
|
188873
|
+
newOuterWidth = newInnerWidth + ((outerWidth - innerWidth >> 0)) >> 0;
|
|
188874
|
+
screenWidth = GetScreenWidth();
|
|
188875
|
+
if (newOuterWidth > screenWidth) {
|
|
188876
|
+
newOuterWidth = screenWidth;
|
|
188877
|
+
}
|
|
188878
|
+
_r = $clone(js.Global(), js.Value).Call("resizeTo", new sliceType([new $Int(newOuterWidth), new $Int(outerHeight)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
188879
|
+
_r;
|
|
188880
|
+
$s = -1; return;
|
|
188881
|
+
/* */ } return; } var $f = {$blk: SetWindowWidth, $c: true, $r, _r, innerWidth, newInnerWidth, newOuterWidth, outerHeight, outerWidth, screenWidth, $s};return $f;
|
|
188882
|
+
};
|
|
188883
|
+
$pkg.SetWindowWidth = SetWindowWidth;
|
|
188884
|
+
SetWindowHeight = function(newInnerHeight) {
|
|
188885
|
+
var {_r, innerHeight, newInnerHeight, newOuterHeight, outerHeight, outerWidth, screenHeight, $s, $r, $c} = $restore(this, {newInnerHeight});
|
|
188886
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188887
|
+
innerHeight = $clone($clone(js.Global(), js.Value).Get("innerHeight"), js.Value).Int();
|
|
188888
|
+
outerHeight = $clone($clone(js.Global(), js.Value).Get("outerHeight"), js.Value).Int();
|
|
188889
|
+
outerWidth = $clone($clone(js.Global(), js.Value).Get("outerWidth"), js.Value).Int();
|
|
188890
|
+
newOuterHeight = newInnerHeight + ((outerHeight - innerHeight >> 0)) >> 0;
|
|
188891
|
+
screenHeight = GetScreenHeight();
|
|
188892
|
+
if (newOuterHeight > screenHeight) {
|
|
188893
|
+
newOuterHeight = screenHeight;
|
|
188894
|
+
}
|
|
188895
|
+
_r = $clone(js.Global(), js.Value).Call("resizeTo", new sliceType([new $Int(outerWidth), new $Int(newOuterHeight)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
188896
|
+
_r;
|
|
188897
|
+
$s = -1; return;
|
|
188898
|
+
/* */ } return; } var $f = {$blk: SetWindowHeight, $c: true, $r, _r, innerHeight, newInnerHeight, newOuterHeight, outerHeight, outerWidth, screenHeight, $s};return $f;
|
|
188899
|
+
};
|
|
188900
|
+
$pkg.SetWindowHeight = SetWindowHeight;
|
|
188901
|
+
GetOrientation = function() {
|
|
188902
|
+
var {$24r, $24r$1, $24r$2, orientation, orientationType, $s, $deferred, $r, $c} = $restore(this, {});
|
|
188903
|
+
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
188904
|
+
orientation = [orientation];
|
|
188905
|
+
orientation[0] = 0;
|
|
188906
|
+
$deferred.push([(function(orientation) { return function() {
|
|
188907
|
+
if (!($interfaceIsEqual($recover(), $ifaceNil))) {
|
|
188908
|
+
orientation[0] = 0;
|
|
188909
|
+
}
|
|
188910
|
+
}; })(orientation), []]);
|
|
188911
|
+
orientationType = $clone($clone($clone($clone(js.Global(), js.Value).Get("screen"), js.Value).Get("orientation"), js.Value).Get("type"), js.Value).String();
|
|
188912
|
+
/* */ if (strings.HasPrefix(orientationType, "landscape")) { $s = 1; continue; }
|
|
188913
|
+
/* */ $s = 2; continue;
|
|
188914
|
+
/* if (strings.HasPrefix(orientationType, "landscape")) { */ case 1:
|
|
188915
|
+
orientation[0] = 2;
|
|
188916
|
+
$24r = orientation[0];
|
|
188917
|
+
$s = 3; case 3: return $24r;
|
|
188918
|
+
/* } */ case 2:
|
|
188919
|
+
/* */ if (strings.HasPrefix(orientationType, "portrait")) { $s = 4; continue; }
|
|
188920
|
+
/* */ $s = 5; continue;
|
|
188921
|
+
/* if (strings.HasPrefix(orientationType, "portrait")) { */ case 4:
|
|
188922
|
+
orientation[0] = 2;
|
|
188923
|
+
$24r$1 = orientation[0];
|
|
188924
|
+
$s = 6; case 6: return $24r$1;
|
|
188925
|
+
/* } */ case 5:
|
|
188926
|
+
orientation[0] = 0;
|
|
188927
|
+
$24r$2 = orientation[0];
|
|
188928
|
+
$s = 7; case 7: return $24r$2;
|
|
188929
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return orientation[0]; } if($curGoroutine.asleep) { var $f = {$blk: GetOrientation, $c: true, $r, $24r, $24r$1, $24r$2, orientation, orientationType, $s, $deferred};return $f; } }
|
|
188930
|
+
};
|
|
188931
|
+
$pkg.GetOrientation = GetOrientation;
|
|
188932
|
+
NewDomEvents = function() {
|
|
188933
|
+
return new DomEvents.ptr(new $Chan($emptyInterface, 0), $makeSlice(sliceType$1, 0));
|
|
188934
|
+
};
|
|
188935
|
+
$pkg.NewDomEvents = NewDomEvents;
|
|
188936
|
+
DomEvents.ptr.prototype.GetEventChan = function() {
|
|
188937
|
+
var d;
|
|
188938
|
+
d = this;
|
|
188939
|
+
return d.eventChan;
|
|
188940
|
+
};
|
|
188941
|
+
DomEvents.prototype.GetEventChan = function() { return this.$val.GetEventChan(); };
|
|
188942
|
+
DomEvents.ptr.prototype.Release = function() {
|
|
188943
|
+
var {_i, _ref, d, release, $s, $r, $c} = $restore(this, {});
|
|
188944
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188945
|
+
d = this;
|
|
188946
|
+
_ref = d.releases;
|
|
188947
|
+
_i = 0;
|
|
188948
|
+
/* while (true) { */ case 1:
|
|
188949
|
+
/* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; }
|
|
188950
|
+
release = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]);
|
|
188951
|
+
$r = release(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
188952
|
+
_i++;
|
|
188953
|
+
$s = 1; continue;
|
|
188954
|
+
case 2:
|
|
188955
|
+
$s = -1; return;
|
|
188956
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.Release, $c: true, $r, _i, _ref, d, release, $s};return $f;
|
|
188957
|
+
};
|
|
188958
|
+
DomEvents.prototype.Release = function() { return this.$val.Release(); };
|
|
188959
|
+
DomEvents.ptr.prototype.BindEvents = function() {
|
|
188960
|
+
var {d, $s, $r, $c} = $restore(this, {});
|
|
188961
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188962
|
+
d = this;
|
|
188963
|
+
$r = d.bindSizeEvents(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
188964
|
+
$go($methodVal(d, "emitSizeEvent"), []);
|
|
188965
|
+
$r = d.bindMouseEvents(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
188966
|
+
$r = d.bindKeyEvents(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
188967
|
+
$r = d.bindFocusEvents(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
188968
|
+
$s = -1; return;
|
|
188969
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.BindEvents, $c: true, $r, d, $s};return $f;
|
|
188970
|
+
};
|
|
188971
|
+
DomEvents.prototype.BindEvents = function() { return this.$val.BindEvents(); };
|
|
188972
|
+
DomEvents.ptr.prototype.bindSizeEvents = function() {
|
|
188973
|
+
var {_r, d, onResize, $s, $r, $c} = $restore(this, {});
|
|
188974
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188975
|
+
d = [d];
|
|
188976
|
+
onResize = [onResize];
|
|
188977
|
+
d[0] = this;
|
|
188978
|
+
onResize[0] = $clone(js.FuncOf((function(d, onResize) { return function $b(this$1, args) {
|
|
188979
|
+
var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args});
|
|
188980
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188981
|
+
$r = d[0].emitSizeEvent(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
188982
|
+
$s = -1; return $ifaceNil;
|
|
188983
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f;
|
|
188984
|
+
}; })(d, onResize)), js.Func);
|
|
188985
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
188986
|
+
_r;
|
|
188987
|
+
d[0].releases = $append(d[0].releases, (function(d, onResize) { return function $b() {
|
|
188988
|
+
var {_r$1, $s, $r, $c} = $restore(this, {});
|
|
188989
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
188990
|
+
_r$1 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("resize"), new onResize[0].constructor.elem(onResize[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
188991
|
+
_r$1;
|
|
188992
|
+
$clone(onResize[0], js.Func).Release();
|
|
188993
|
+
$s = -1; return;
|
|
188994
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, $s};return $f;
|
|
188995
|
+
}; })(d, onResize));
|
|
188996
|
+
$s = -1; return;
|
|
188997
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindSizeEvents, $c: true, $r, _r, d, onResize, $s};return $f;
|
|
188998
|
+
};
|
|
188999
|
+
DomEvents.prototype.bindSizeEvents = function() { return this.$val.bindSizeEvents(); };
|
|
189000
|
+
DomEvents.ptr.prototype.emitSizeEvent = function() {
|
|
189001
|
+
var {_q, _q$1, _r, d, height, orientation, pixelsPerPt, width, x, $s, $r, $c} = $restore(this, {});
|
|
189002
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189003
|
+
d = this;
|
|
189004
|
+
_r = GetOrientation(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
189005
|
+
orientation = _r;
|
|
189006
|
+
pixelsPerPt = 1;
|
|
189007
|
+
width = GetDocWidth();
|
|
189008
|
+
height = GetDocHeight();
|
|
189009
|
+
$r = $send(d.eventChan, (x = new size.Event.ptr(width, height, ((_q = width / ((pixelsPerPt >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), ((_q$1 = height / ((pixelsPerPt >> 0)), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))), pixelsPerPt, orientation), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189010
|
+
$s = -1; return;
|
|
189011
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.emitSizeEvent, $c: true, $r, _q, _q$1, _r, d, height, orientation, pixelsPerPt, width, x, $s};return $f;
|
|
189012
|
+
};
|
|
189013
|
+
DomEvents.prototype.emitSizeEvent = function() { return this.$val.emitSizeEvent(); };
|
|
189014
|
+
DomEvents.ptr.prototype.bindMouseEvents = function() {
|
|
189015
|
+
var {_r, _r$1, _r$2, _r$3, d, onClick, onMove, onWheel, $s, $r, $c} = $restore(this, {});
|
|
189016
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189017
|
+
d = [d];
|
|
189018
|
+
onClick = [onClick];
|
|
189019
|
+
onMove = [onMove];
|
|
189020
|
+
onWheel = [onWheel];
|
|
189021
|
+
d[0] = this;
|
|
189022
|
+
onMove[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
189023
|
+
var {_r, args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
189024
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189025
|
+
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
189026
|
+
_r;
|
|
189027
|
+
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), 0, getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 0), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189028
|
+
$s = -1; return $ifaceNil;
|
|
189029
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, args, this$1, x, $s};return $f;
|
|
189030
|
+
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
189031
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
189032
|
+
_r;
|
|
189033
|
+
onClick[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
189034
|
+
var {_r$1, args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
189035
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189036
|
+
_r$1 = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
189037
|
+
_r$1;
|
|
189038
|
+
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getMouseButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getMouseDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189039
|
+
$s = -1; return $ifaceNil;
|
|
189040
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, args, this$1, x, $s};return $f;
|
|
189041
|
+
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
189042
|
+
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
189043
|
+
_r$1;
|
|
189044
|
+
_r$2 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
189045
|
+
_r$2;
|
|
189046
|
+
onWheel[0] = $clone(js.FuncOf((function(d, onClick, onMove, onWheel) { return function $b(this$1, args) {
|
|
189047
|
+
var {args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
189048
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189049
|
+
$r = $send(d[0].eventChan, (x = new mouse.Event.ptr(($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetX"), js.Value).Float())), ($fround($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("offsetY"), js.Value).Float())), getWheelButton($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), 3), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189050
|
+
$s = -1; return $ifaceNil;
|
|
189051
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, x, $s};return $f;
|
|
189052
|
+
}; })(d, onClick, onMove, onWheel)), js.Func);
|
|
189053
|
+
_r$3 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
189054
|
+
_r$3;
|
|
189055
|
+
d[0].releases = $append(d[0].releases, (function(d, onClick, onMove, onWheel) { return function $b() {
|
|
189056
|
+
var {_r$4, _r$5, _r$6, _r$7, $s, $r, $c} = $restore(this, {});
|
|
189057
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189058
|
+
_r$4 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("mousemove"), new onMove[0].constructor.elem(onMove[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
189059
|
+
_r$4;
|
|
189060
|
+
_r$5 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("mousedown"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
189061
|
+
_r$5;
|
|
189062
|
+
_r$6 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("mouseup"), new onClick[0].constructor.elem(onClick[0])])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
189063
|
+
_r$6;
|
|
189064
|
+
_r$7 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("wheel"), new onWheel[0].constructor.elem(onWheel[0])])); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; }
|
|
189065
|
+
_r$7;
|
|
189066
|
+
$clone(onMove[0], js.Func).Release();
|
|
189067
|
+
$clone(onClick[0], js.Func).Release();
|
|
189068
|
+
$clone(onWheel[0], js.Func).Release();
|
|
189069
|
+
$s = -1; return;
|
|
189070
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, _r$5, _r$6, _r$7, $s};return $f;
|
|
189071
|
+
}; })(d, onClick, onMove, onWheel));
|
|
189072
|
+
$s = -1; return;
|
|
189073
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindMouseEvents, $c: true, $r, _r, _r$1, _r$2, _r$3, d, onClick, onMove, onWheel, $s};return $f;
|
|
189074
|
+
};
|
|
189075
|
+
DomEvents.prototype.bindMouseEvents = function() { return this.$val.bindMouseEvents(); };
|
|
189076
|
+
getMouseDirection = function(ev) {
|
|
189077
|
+
var dir, ev;
|
|
189078
|
+
dir = 0;
|
|
189079
|
+
dir = 0;
|
|
189080
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mousedown") {
|
|
189081
|
+
dir = 1;
|
|
189082
|
+
}
|
|
189083
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "mouseup") {
|
|
189084
|
+
dir = 2;
|
|
189085
|
+
}
|
|
189086
|
+
return dir;
|
|
189087
|
+
};
|
|
189088
|
+
getWheelButton = function(ev) {
|
|
189089
|
+
var deltaX, deltaY, ev;
|
|
189090
|
+
deltaY = $clone($clone(ev, js.Value).Get("deltaY"), js.Value).Int();
|
|
189091
|
+
deltaX = $clone($clone(ev, js.Value).Get("deltaX"), js.Value).Int();
|
|
189092
|
+
if (deltaY > 0) {
|
|
189093
|
+
return -2;
|
|
189094
|
+
}
|
|
189095
|
+
if (deltaY < 0) {
|
|
189096
|
+
return -1;
|
|
189097
|
+
}
|
|
189098
|
+
if (deltaX > 0) {
|
|
189099
|
+
return -4;
|
|
189100
|
+
}
|
|
189101
|
+
if (deltaX < 0) {
|
|
189102
|
+
return -3;
|
|
189103
|
+
}
|
|
189104
|
+
return 0;
|
|
189105
|
+
};
|
|
189106
|
+
getMouseButton = function(ev) {
|
|
189107
|
+
var _1, ev;
|
|
189108
|
+
_1 = $clone($clone(ev, js.Value).Get("button"), js.Value).Int();
|
|
189109
|
+
if (_1 === (0)) {
|
|
189110
|
+
return 1;
|
|
189111
|
+
} else if (_1 === (1)) {
|
|
189112
|
+
return 2;
|
|
189113
|
+
} else if (_1 === (2)) {
|
|
189114
|
+
return 3;
|
|
189115
|
+
} else if (_1 === (3)) {
|
|
189116
|
+
return 8;
|
|
189117
|
+
} else if (_1 === (4)) {
|
|
189118
|
+
return 9;
|
|
189119
|
+
} else {
|
|
189120
|
+
return 0;
|
|
189121
|
+
}
|
|
189122
|
+
};
|
|
189123
|
+
getEventModifiers = function(ev) {
|
|
189124
|
+
var ev, mod;
|
|
189125
|
+
mod = 0;
|
|
189126
|
+
if ($clone($clone(ev, js.Value).Get("altKey"), js.Value).Bool()) {
|
|
189127
|
+
mod = (mod | (4)) >>> 0;
|
|
189128
|
+
}
|
|
189129
|
+
if ($clone($clone(ev, js.Value).Get("ctrlKey"), js.Value).Bool()) {
|
|
189130
|
+
mod = (mod | (2)) >>> 0;
|
|
189131
|
+
}
|
|
189132
|
+
if ($clone($clone(ev, js.Value).Get("shiftKey"), js.Value).Bool()) {
|
|
189133
|
+
mod = (mod | (1)) >>> 0;
|
|
189134
|
+
}
|
|
189135
|
+
if ($clone($clone(ev, js.Value).Get("metaKey"), js.Value).Bool()) {
|
|
189136
|
+
mod = (mod | (8)) >>> 0;
|
|
189137
|
+
}
|
|
189138
|
+
return mod;
|
|
189139
|
+
};
|
|
189140
|
+
DomEvents.ptr.prototype.bindFocusEvents = function() {
|
|
189141
|
+
var {_r, _r$1, d, onFocus, $s, $r, $c} = $restore(this, {});
|
|
189142
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189143
|
+
d = [d];
|
|
189144
|
+
onFocus = [onFocus];
|
|
189145
|
+
d[0] = this;
|
|
189146
|
+
onFocus[0] = $clone(js.FuncOf((function(d, onFocus) { return function $b(this$1, args) {
|
|
189147
|
+
var {args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
189148
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189149
|
+
$r = $send(d[0].eventChan, (x = new focus.Event.ptr(isFocusIn($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189150
|
+
$s = -1; return $ifaceNil;
|
|
189151
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, x, $s};return $f;
|
|
189152
|
+
}; })(d, onFocus)), js.Func);
|
|
189153
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
189154
|
+
_r;
|
|
189155
|
+
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
189156
|
+
_r$1;
|
|
189157
|
+
d[0].releases = $append(d[0].releases, (function(d, onFocus) { return function $b() {
|
|
189158
|
+
var {_r$2, _r$3, $s, $r, $c} = $restore(this, {});
|
|
189159
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189160
|
+
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("focus"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
189161
|
+
_r$2;
|
|
189162
|
+
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("blur"), new onFocus[0].constructor.elem(onFocus[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
189163
|
+
_r$3;
|
|
189164
|
+
$clone(onFocus[0], js.Func).Release();
|
|
189165
|
+
$s = -1; return;
|
|
189166
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, $s};return $f;
|
|
189167
|
+
}; })(d, onFocus));
|
|
189168
|
+
$s = -1; return;
|
|
189169
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindFocusEvents, $c: true, $r, _r, _r$1, d, onFocus, $s};return $f;
|
|
189170
|
+
};
|
|
189171
|
+
DomEvents.prototype.bindFocusEvents = function() { return this.$val.bindFocusEvents(); };
|
|
189172
|
+
isFocusIn = function(ev) {
|
|
189173
|
+
var ev;
|
|
189174
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "focus") {
|
|
189175
|
+
return true;
|
|
189176
|
+
}
|
|
189177
|
+
return false;
|
|
189178
|
+
};
|
|
189179
|
+
DomEvents.ptr.prototype.bindKeyEvents = function() {
|
|
189180
|
+
var {_r, _r$1, d, onKey, $s, $r, $c} = $restore(this, {});
|
|
189181
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189182
|
+
d = [d];
|
|
189183
|
+
onKey = [onKey];
|
|
189184
|
+
d[0] = this;
|
|
189185
|
+
onKey[0] = $clone(js.FuncOf((function(d, onKey) { return function $b(this$1, args) {
|
|
189186
|
+
var {_r, args, this$1, x, $s, $r, $c} = $restore(this, {this$1, args});
|
|
189187
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189188
|
+
_r = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Call("preventDefault", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
189189
|
+
_r;
|
|
189190
|
+
$r = $send(d[0].eventChan, (x = new key.Event.ptr(getKeyRune($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyCode($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getEventModifiers($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value)), getKeyDirection($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value))), new x.constructor.elem(x))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189191
|
+
$s = -1; return $ifaceNil;
|
|
189192
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, args, this$1, x, $s};return $f;
|
|
189193
|
+
}; })(d, onKey)), js.Func);
|
|
189194
|
+
_r = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
189195
|
+
_r;
|
|
189196
|
+
_r$1 = $clone(js.Global(), js.Value).Call("addEventListener", new sliceType([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
189197
|
+
_r$1;
|
|
189198
|
+
d[0].releases = $append(d[0].releases, (function(d, onKey) { return function $b() {
|
|
189199
|
+
var {_r$2, _r$3, $s, $r, $c} = $restore(this, {});
|
|
189200
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
189201
|
+
_r$2 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("keydown"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
189202
|
+
_r$2;
|
|
189203
|
+
_r$3 = $clone(js.Global(), js.Value).Call("removeEventListener", new sliceType([new $String("keyup"), new onKey[0].constructor.elem(onKey[0])])); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
189204
|
+
_r$3;
|
|
189205
|
+
$clone(onKey[0], js.Func).Release();
|
|
189206
|
+
$s = -1; return;
|
|
189207
|
+
/* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, $s};return $f;
|
|
189208
|
+
}; })(d, onKey));
|
|
189209
|
+
$s = -1; return;
|
|
189210
|
+
/* */ } return; } var $f = {$blk: DomEvents.ptr.prototype.bindKeyEvents, $c: true, $r, _r, _r$1, d, onKey, $s};return $f;
|
|
189211
|
+
};
|
|
189212
|
+
DomEvents.prototype.bindKeyEvents = function() { return this.$val.bindKeyEvents(); };
|
|
189213
|
+
getKeyRune = function(ev) {
|
|
189214
|
+
var ev, key$1;
|
|
189215
|
+
key$1 = (new sliceType$2($stringToRunes($clone($clone(ev, js.Value).Get("key"), js.Value).String())));
|
|
189216
|
+
if (key$1.$length === 1) {
|
|
189217
|
+
return (0 >= key$1.$length ? ($throwRuntimeError("index out of range"), undefined) : key$1.$array[key$1.$offset + 0]);
|
|
189218
|
+
}
|
|
189219
|
+
return -1;
|
|
189220
|
+
};
|
|
189221
|
+
getKeyDirection = function(ev) {
|
|
189222
|
+
var dir, ev;
|
|
189223
|
+
dir = 0;
|
|
189224
|
+
dir = 0;
|
|
189225
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keydown") {
|
|
189226
|
+
dir = 1;
|
|
189227
|
+
}
|
|
189228
|
+
if ($clone($clone(ev, js.Value).Get("type"), js.Value).String() === "keyup") {
|
|
189229
|
+
dir = 2;
|
|
189230
|
+
}
|
|
189231
|
+
return dir;
|
|
189232
|
+
};
|
|
189233
|
+
getKeyCode = function(ev) {
|
|
189234
|
+
var _entry, _entry$1, _tuple, _tuple$1, code, code$1, domCode, domKey, ev, exists, exists$1;
|
|
189235
|
+
domCode = $clone($clone(ev, js.Value).Get("code"), js.Value).String();
|
|
189236
|
+
_tuple = (_entry = $mapIndex(keyCodesMap,$String.keyFor(domCode)), _entry !== undefined ? [_entry.v, true] : [0, false]);
|
|
189237
|
+
code = _tuple[0];
|
|
189238
|
+
exists = _tuple[1];
|
|
189239
|
+
if (exists) {
|
|
189240
|
+
return code;
|
|
189241
|
+
}
|
|
189242
|
+
domKey = $clone($clone(ev, js.Value).Get("key"), js.Value).String();
|
|
189243
|
+
_tuple$1 = (_entry$1 = $mapIndex(keyCodesByKeyMap,$String.keyFor(domKey)), _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]);
|
|
189244
|
+
code$1 = _tuple$1[0];
|
|
189245
|
+
exists$1 = _tuple$1[1];
|
|
189246
|
+
if (exists$1) {
|
|
189247
|
+
return code$1;
|
|
189248
|
+
}
|
|
189249
|
+
return 0;
|
|
189250
|
+
};
|
|
189251
|
+
ptrType.methods = [{prop: "GetEventChan", name: "GetEventChan", pkg: "", typ: $funcType([], [chanType], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "BindEvents", name: "BindEvents", pkg: "", typ: $funcType([], [], false)}, {prop: "bindSizeEvents", name: "bindSizeEvents", pkg: "golang.org/x/exp/shiny/driver/util/dom", typ: $funcType([], [], false)}, {prop: "emitSizeEvent", name: "emitSizeEvent", pkg: "golang.org/x/exp/shiny/driver/util/dom", typ: $funcType([], [], false)}, {prop: "bindMouseEvents", name: "bindMouseEvents", pkg: "golang.org/x/exp/shiny/driver/util/dom", typ: $funcType([], [], false)}, {prop: "bindFocusEvents", name: "bindFocusEvents", pkg: "golang.org/x/exp/shiny/driver/util/dom", typ: $funcType([], [], false)}, {prop: "bindKeyEvents", name: "bindKeyEvents", pkg: "golang.org/x/exp/shiny/driver/util/dom", typ: $funcType([], [], false)}];
|
|
189252
|
+
DomEvents.init("golang.org/x/exp/shiny/driver/util/dom", [{prop: "eventChan", name: "eventChan", embedded: false, exported: false, typ: chanType, tag: ""}, {prop: "releases", name: "releases", embedded: false, exported: false, typ: sliceType$1, tag: ""}]);
|
|
189253
|
+
$init = function() {
|
|
189254
|
+
$pkg.$init = function() {};
|
|
189255
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
189256
|
+
$r = focus.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189257
|
+
$r = key.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189258
|
+
$r = mouse.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189259
|
+
$r = size.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189260
|
+
$r = geom.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189261
|
+
$r = math.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189262
|
+
$r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189263
|
+
$r = js.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
189264
|
+
keyCodesMap = $makeMap($String.keyFor, [{ k: "KeyA", v: 4 }, { k: "KeyB", v: 5 }, { k: "KeyC", v: 6 }, { k: "KeyD", v: 7 }, { k: "KeyE", v: 8 }, { k: "KeyF", v: 9 }, { k: "KeyG", v: 10 }, { k: "KeyH", v: 11 }, { k: "KeyI", v: 12 }, { k: "KeyJ", v: 13 }, { k: "KeyK", v: 14 }, { k: "KeyL", v: 15 }, { k: "KeyM", v: 16 }, { k: "KeyN", v: 17 }, { k: "KeyO", v: 18 }, { k: "KeyP", v: 19 }, { k: "KeyQ", v: 20 }, { k: "KeyR", v: 21 }, { k: "KeyS", v: 22 }, { k: "KeyT", v: 23 }, { k: "KeyU", v: 24 }, { k: "KeyV", v: 25 }, { k: "KeyW", v: 26 }, { k: "KeyX", v: 27 }, { k: "KeyY", v: 28 }, { k: "KeyZ", v: 29 }, { k: "Digit1", v: 30 }, { k: "Digit2", v: 31 }, { k: "Digit3", v: 32 }, { k: "Digit4", v: 33 }, { k: "Digit5", v: 34 }, { k: "Digit6", v: 35 }, { k: "Digit7", v: 36 }, { k: "Digit8", v: 37 }, { k: "Digit9", v: 38 }, { k: "Digit0", v: 39 }, { k: "Enter", v: 40 }, { k: "Escape", v: 41 }, { k: "Backspace", v: 42 }, { k: "Tab", v: 43 }, { k: "Space", v: 44 }, { k: "Minus", v: 45 }, { k: "Equal", v: 46 }, { k: "BracketLeft", v: 47 }, { k: "BracketRight", v: 48 }, { k: "Backslash", v: 49 }, { k: "Semicolon", v: 51 }, { k: "Quote", v: 52 }, { k: "Backquote", v: 53 }, { k: "Comma", v: 54 }, { k: "Period", v: 55 }, { k: "Slash", v: 56 }, { k: "CapsLock", v: 57 }, { k: "F1", v: 58 }, { k: "F2", v: 59 }, { k: "F3", v: 60 }, { k: "F4", v: 61 }, { k: "F5", v: 62 }, { k: "F6", v: 63 }, { k: "F7", v: 64 }, { k: "F8", v: 65 }, { k: "F9", v: 66 }, { k: "F10", v: 67 }, { k: "F11", v: 68 }, { k: "F12", v: 69 }, { k: "Pause", v: 72 }, { k: "Insert", v: 73 }, { k: "Home", v: 74 }, { k: "PageUp", v: 75 }, { k: "Delete", v: 76 }, { k: "End", v: 77 }, { k: "PageDown", v: 78 }, { k: "ArrowRight", v: 79 }, { k: "ArrowLeft", v: 80 }, { k: "ArrowDown", v: 81 }, { k: "ArrowUp", v: 82 }, { k: "NumLock", v: 83 }, { k: "NumpadDivide", v: 84 }, { k: "NumpadMultiply", v: 85 }, { k: "NumpadSubtract", v: 86 }, { k: "NumpadAdd", v: 87 }, { k: "NumpadEnter", v: 88 }, { k: "Numpad1", v: 89 }, { k: "Numpad2", v: 90 }, { k: "Numpad3", v: 91 }, { k: "Numpad4", v: 92 }, { k: "Numpad5", v: 93 }, { k: "Numpad6", v: 94 }, { k: "Numpad7", v: 95 }, { k: "Numpad8", v: 96 }, { k: "Numpad9", v: 97 }, { k: "Numpad0", v: 98 }, { k: "NumpadDecimal", v: 99 }, { k: "NumpadEqual", v: 103 }, { k: "F13", v: 104 }, { k: "F14", v: 105 }, { k: "F15", v: 106 }, { k: "F16", v: 107 }, { k: "F17", v: 108 }, { k: "F18", v: 109 }, { k: "F19", v: 110 }, { k: "F20", v: 111 }, { k: "F21", v: 112 }, { k: "F22", v: 113 }, { k: "F23", v: 114 }, { k: "F24", v: 115 }, { k: "Help", v: 117 }, { k: "ContextMenu", v: 118 }, { k: "VolumeMute", v: 127 }, { k: "VolumeUp", v: 128 }, { k: "VolumeDown", v: 129 }, { k: "ControlLeft", v: 224 }, { k: "ShiftLeft", v: 225 }, { k: "AltLeft", v: 226 }, { k: "MetaLeft", v: 227 }, { k: "ControlRight", v: 228 }, { k: "ShiftRight", v: 229 }, { k: "AltRight", v: 230 }, { k: "MetaRight", v: 231 }, { k: "PrintScreen", v: 0 }]);
|
|
189265
|
+
keyCodesByKeyMap = $makeMap($String.keyFor, [{ k: "AudioVolumeMute", v: 127 }, { k: "AudioVolumeUp", v: 128 }, { k: "AudioVolumeDown", v: 129 }]);
|
|
189266
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
189267
|
+
};
|
|
189268
|
+
$pkg.$init = $init;
|
|
189269
|
+
return $pkg;
|
|
189270
|
+
})();
|
|
189300
189271
|
$packages["golang.org/x/exp/shiny/imageutil"] = (function() {
|
|
189301
189272
|
var $pkg = {}, $init, screen, image, draw, ConvertYCbCrToRGBA;
|
|
189302
189273
|
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
@@ -189331,12 +189302,12 @@ $packages["golang.org/x/exp/shiny/imageutil"] = (function() {
|
|
|
189331
189302
|
return $pkg;
|
|
189332
189303
|
})();
|
|
189333
189304
|
$packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
189334
|
-
var $pkg = {}, $init, fmt, webgl, types,
|
|
189305
|
+
var $pkg = {}, $init, fmt, webgl, types, errscreen, dom, imageutil, screen, f64, image, color, draw, sync, js, windowImpl, screenImpl, ArrayBufferSlice, YCbCrJS, BufferImpl, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, funcType, arrayType, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, sliceType$3, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, texCoordsVertices, elementsIndices, newWindow, main, newScreenImpl, newBuffer;
|
|
189335
189306
|
fmt = $packages["fmt"];
|
|
189336
189307
|
webgl = $packages["github.com/nuberu/webgl"];
|
|
189337
189308
|
types = $packages["github.com/nuberu/webgl/types"];
|
|
189338
|
-
dom = $packages["golang.org/x/exp/shiny/driver/internal/dom"];
|
|
189339
189309
|
errscreen = $packages["golang.org/x/exp/shiny/driver/internal/errscreen"];
|
|
189310
|
+
dom = $packages["golang.org/x/exp/shiny/driver/util/dom"];
|
|
189340
189311
|
imageutil = $packages["golang.org/x/exp/shiny/imageutil"];
|
|
189341
189312
|
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
189342
189313
|
f64 = $packages["golang.org/x/image/math/f64"];
|
|
@@ -190120,8 +190091,8 @@ $packages["golang.org/x/exp/shiny/driver/webgldriver"] = (function() {
|
|
|
190120
190091
|
$r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190121
190092
|
$r = webgl.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190122
190093
|
$r = types.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190123
|
-
$r =
|
|
190124
|
-
$r =
|
|
190094
|
+
$r = errscreen.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190095
|
+
$r = dom.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190125
190096
|
$r = imageutil.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190126
190097
|
$r = screen.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190127
190098
|
$r = f64.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
@@ -190157,11 +190128,58 @@ $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"] = (function()
|
|
|
190157
190128
|
$pkg.$init = $init;
|
|
190158
190129
|
return $pkg;
|
|
190159
190130
|
})();
|
|
190131
|
+
$packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder/jsdecoder"] = (function() {
|
|
190132
|
+
var $pkg = {}, $init, js, ptrType, initiateReset, jsNaClDecoder, ResetBeforeNextDecode, ShouldResetOnNextDecode, GetJsNaClDecoder;
|
|
190133
|
+
js = $packages["syscall/js"];
|
|
190134
|
+
ptrType = $ptrType(js.Value);
|
|
190135
|
+
ResetBeforeNextDecode = function() {
|
|
190136
|
+
initiateReset = true;
|
|
190137
|
+
};
|
|
190138
|
+
$pkg.ResetBeforeNextDecode = ResetBeforeNextDecode;
|
|
190139
|
+
ShouldResetOnNextDecode = function() {
|
|
190140
|
+
return initiateReset;
|
|
190141
|
+
};
|
|
190142
|
+
$pkg.ShouldResetOnNextDecode = ShouldResetOnNextDecode;
|
|
190143
|
+
GetJsNaClDecoder = function() {
|
|
190144
|
+
return jsNaClDecoder;
|
|
190145
|
+
};
|
|
190146
|
+
$pkg.GetJsNaClDecoder = GetJsNaClDecoder;
|
|
190147
|
+
$init = function() {
|
|
190148
|
+
$pkg.$init = function() {};
|
|
190149
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
190150
|
+
$r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190151
|
+
jsNaClDecoder = ptrType.nil;
|
|
190152
|
+
initiateReset = false;
|
|
190153
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
190154
|
+
};
|
|
190155
|
+
$pkg.$init = $init;
|
|
190156
|
+
return $pkg;
|
|
190157
|
+
})();
|
|
190158
|
+
$packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder"] = (function() {
|
|
190159
|
+
var $pkg = {}, $init, errs, jshelper, general, jsdecoder, js;
|
|
190160
|
+
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
190161
|
+
jshelper = $packages["github.com/supraio/client-daemon/pkg/jshelper"];
|
|
190162
|
+
general = $packages["github.com/supraio/client-daemon/pkg/x264/general"];
|
|
190163
|
+
jsdecoder = $packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder/jsdecoder"];
|
|
190164
|
+
js = $packages["syscall/js"];
|
|
190165
|
+
$init = function() {
|
|
190166
|
+
$pkg.$init = function() {};
|
|
190167
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
190168
|
+
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190169
|
+
$r = jshelper.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190170
|
+
$r = general.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190171
|
+
$r = jsdecoder.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190172
|
+
$r = js.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190173
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
190174
|
+
};
|
|
190175
|
+
$pkg.$init = $init;
|
|
190176
|
+
return $pkg;
|
|
190177
|
+
})();
|
|
190160
190178
|
$packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
190161
|
-
var $pkg = {}, $init, fmt,
|
|
190179
|
+
var $pkg = {}, $init, fmt, errscreen, dom, screen, f64, image, color, draw, sync, js, windowImpl, screenImpl, YCbCrJS, BufferImpl, sliceType, ptrType, ptrType$1, funcType, arrayType, ptrType$2, ptrType$3, sliceType$1, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, newWindow, main, newScreenImpl, newBuffer;
|
|
190162
190180
|
fmt = $packages["fmt"];
|
|
190163
|
-
dom = $packages["golang.org/x/exp/shiny/driver/internal/dom"];
|
|
190164
190181
|
errscreen = $packages["golang.org/x/exp/shiny/driver/internal/errscreen"];
|
|
190182
|
+
dom = $packages["golang.org/x/exp/shiny/driver/util/dom"];
|
|
190165
190183
|
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
190166
190184
|
f64 = $packages["golang.org/x/image/math/f64"];
|
|
190167
190185
|
image = $packages["image"];
|
|
@@ -190555,8 +190573,8 @@ $packages["golang.org/x/exp/shiny/driver/canvasdriver"] = (function() {
|
|
|
190555
190573
|
$pkg.$init = function() {};
|
|
190556
190574
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
190557
190575
|
$r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190558
|
-
$r =
|
|
190559
|
-
$r =
|
|
190576
|
+
$r = errscreen.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190577
|
+
$r = dom.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190560
190578
|
$r = screen.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190561
190579
|
$r = f64.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190562
190580
|
$r = image.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
@@ -190596,20 +190614,391 @@ $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"] = (function() {
|
|
|
190596
190614
|
return $pkg;
|
|
190597
190615
|
})();
|
|
190598
190616
|
$packages["github.com/supraio/client-daemon/pkg/x264"] = (function() {
|
|
190599
|
-
var $pkg = {}, $init, errs, general, h264_decoder,
|
|
190617
|
+
var $pkg = {}, $init, errs, general, h264_decoder, nacldecoder, webcodecs;
|
|
190600
190618
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
190601
190619
|
general = $packages["github.com/supraio/client-daemon/pkg/x264/general"];
|
|
190602
190620
|
h264_decoder = $packages["github.com/supraio/client-daemon/pkg/x264/h264decoder"];
|
|
190621
|
+
nacldecoder = $packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder"];
|
|
190603
190622
|
webcodecs = $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"];
|
|
190604
|
-
js = $packages["syscall/js"];
|
|
190605
190623
|
$init = function() {
|
|
190606
190624
|
$pkg.$init = function() {};
|
|
190607
190625
|
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
190608
190626
|
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190609
190627
|
$r = general.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190610
190628
|
$r = h264_decoder.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190611
|
-
$r =
|
|
190612
|
-
$r =
|
|
190629
|
+
$r = nacldecoder.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190630
|
+
$r = webcodecs.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190631
|
+
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
190632
|
+
};
|
|
190633
|
+
$pkg.$init = $init;
|
|
190634
|
+
return $pkg;
|
|
190635
|
+
})();
|
|
190636
|
+
$packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver"] = (function() {
|
|
190637
|
+
var $pkg = {}, $init, errs, jshelper, jsdecoder, dom, screen, f64, image, color, draw, log, sync, js, windowImpl, screenImpl, BufferImpl, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, funcType, arrayType, ptrType$4, sliceType$1, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, newWindow, newScreenImpl, main, newBuffer;
|
|
190638
|
+
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
190639
|
+
jshelper = $packages["github.com/supraio/client-daemon/pkg/jshelper"];
|
|
190640
|
+
jsdecoder = $packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder/jsdecoder"];
|
|
190641
|
+
dom = $packages["golang.org/x/exp/shiny/driver/util/dom"];
|
|
190642
|
+
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
190643
|
+
f64 = $packages["golang.org/x/image/math/f64"];
|
|
190644
|
+
image = $packages["image"];
|
|
190645
|
+
color = $packages["image/color"];
|
|
190646
|
+
draw = $packages["image/draw"];
|
|
190647
|
+
log = $packages["log"];
|
|
190648
|
+
sync = $packages["sync"];
|
|
190649
|
+
js = $packages["syscall/js"];
|
|
190650
|
+
windowImpl = $pkg.windowImpl = $newType(0, $kindStruct, "nacldriver.windowImpl", true, "github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver", false, function(screen_, mutex_, renderingInProgress_, domEvents_, released_) {
|
|
190651
|
+
this.$val = this;
|
|
190652
|
+
if (arguments.length === 0) {
|
|
190653
|
+
this.screen = ptrType.nil;
|
|
190654
|
+
this.mutex = ptrType$1.nil;
|
|
190655
|
+
this.renderingInProgress = false;
|
|
190656
|
+
this.domEvents = ptrType$2.nil;
|
|
190657
|
+
this.released = false;
|
|
190658
|
+
return;
|
|
190659
|
+
}
|
|
190660
|
+
this.screen = screen_;
|
|
190661
|
+
this.mutex = mutex_;
|
|
190662
|
+
this.renderingInProgress = renderingInProgress_;
|
|
190663
|
+
this.domEvents = domEvents_;
|
|
190664
|
+
this.released = released_;
|
|
190665
|
+
});
|
|
190666
|
+
screenImpl = $pkg.screenImpl = $newType(0, $kindStruct, "nacldriver.screenImpl", true, "github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver", false, function(doc_) {
|
|
190667
|
+
this.$val = this;
|
|
190668
|
+
if (arguments.length === 0) {
|
|
190669
|
+
this.doc = new js.Value.ptr(null, false, arrayType.zero());
|
|
190670
|
+
return;
|
|
190671
|
+
}
|
|
190672
|
+
this.doc = doc_;
|
|
190673
|
+
});
|
|
190674
|
+
BufferImpl = $pkg.BufferImpl = $newType(0, $kindStruct, "nacldriver.BufferImpl", true, "github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver", true, function(screen_, size_) {
|
|
190675
|
+
this.$val = this;
|
|
190676
|
+
if (arguments.length === 0) {
|
|
190677
|
+
this.screen = ptrType.nil;
|
|
190678
|
+
this.size = new image.Point.ptr(0, 0);
|
|
190679
|
+
return;
|
|
190680
|
+
}
|
|
190681
|
+
this.screen = screen_;
|
|
190682
|
+
this.size = size_;
|
|
190683
|
+
});
|
|
190684
|
+
sliceType = $sliceType($emptyInterface);
|
|
190685
|
+
ptrType = $ptrType(screenImpl);
|
|
190686
|
+
ptrType$1 = $ptrType(sync.Mutex);
|
|
190687
|
+
ptrType$2 = $ptrType(dom.DomEvents);
|
|
190688
|
+
ptrType$3 = $ptrType(js.Value);
|
|
190689
|
+
funcType = $funcType([], [], false);
|
|
190690
|
+
arrayType = $arrayType(funcType, 0);
|
|
190691
|
+
ptrType$4 = $ptrType(image.RGBA);
|
|
190692
|
+
sliceType$1 = $sliceType($Uint8);
|
|
190693
|
+
ptrType$5 = $ptrType(screen.DrawOptions);
|
|
190694
|
+
ptrType$6 = $ptrType(windowImpl);
|
|
190695
|
+
ptrType$7 = $ptrType(screen.NewWindowOptions);
|
|
190696
|
+
ptrType$8 = $ptrType(image.YCbCr);
|
|
190697
|
+
ptrType$9 = $ptrType(BufferImpl);
|
|
190698
|
+
newWindow = function(screen$1, opts) {
|
|
190699
|
+
var {_r, _r$1, domEvents, opts, screen$1, w, $s, $r, $c} = $restore(this, {screen$1, opts});
|
|
190700
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190701
|
+
/* */ if (!(opts.Title === "")) { $s = 1; continue; }
|
|
190702
|
+
/* */ $s = 2; continue;
|
|
190703
|
+
/* if (!(opts.Title === "")) { */ case 1:
|
|
190704
|
+
_r = $clone($clone(screen$1.doc, js.Value).Get("head"), js.Value).Call("getElementsByTagName", new sliceType([new $String("title")])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190705
|
+
_r$1 = $clone(_r, js.Value).Call("item", new sliceType([new $Int(0)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
190706
|
+
$r = $clone(_r$1, js.Value).Set("innerHTML", new $String(opts.Title)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190707
|
+
/* } */ case 2:
|
|
190708
|
+
domEvents = dom.NewDomEvents();
|
|
190709
|
+
w = new windowImpl.ptr(screen$1, new sync.Mutex.ptr(0, 0), false, domEvents, false);
|
|
190710
|
+
$r = domEvents.BindEvents(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190711
|
+
$s = -1; return w;
|
|
190712
|
+
/* */ } return; } var $f = {$blk: newWindow, $c: true, $r, _r, _r$1, domEvents, opts, screen$1, w, $s};return $f;
|
|
190713
|
+
};
|
|
190714
|
+
windowImpl.ptr.prototype.Release = function() {
|
|
190715
|
+
var {w, $s, $deferred, $r, $c} = $restore(this, {});
|
|
190716
|
+
/* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred);
|
|
190717
|
+
w = this;
|
|
190718
|
+
$r = w.mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190719
|
+
$deferred.push([$methodVal(w.mutex, "Unlock"), []]);
|
|
190720
|
+
/* */ if (w.released) { $s = 2; continue; }
|
|
190721
|
+
/* */ $s = 3; continue;
|
|
190722
|
+
/* if (w.released) { */ case 2:
|
|
190723
|
+
$s = 4; case 4: return;
|
|
190724
|
+
/* } */ case 3:
|
|
190725
|
+
$r = w.domEvents.Release(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190726
|
+
w.released = true;
|
|
190727
|
+
$s = -1; return;
|
|
190728
|
+
/* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: windowImpl.ptr.prototype.Release, $c: true, $r, w, $s, $deferred};return $f; } }
|
|
190729
|
+
};
|
|
190730
|
+
windowImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
190731
|
+
windowImpl.ptr.prototype.Publish = function() {
|
|
190732
|
+
var w;
|
|
190733
|
+
w = this;
|
|
190734
|
+
if (w.released) {
|
|
190735
|
+
return new screen.PublishResult.ptr(false);
|
|
190736
|
+
}
|
|
190737
|
+
return new screen.PublishResult.ptr(false);
|
|
190738
|
+
};
|
|
190739
|
+
windowImpl.prototype.Publish = function() { return this.$val.Publish(); };
|
|
190740
|
+
windowImpl.ptr.prototype.Send = function(event) {
|
|
190741
|
+
var event, w;
|
|
190742
|
+
w = this;
|
|
190743
|
+
if (w.released) {
|
|
190744
|
+
return;
|
|
190745
|
+
}
|
|
190746
|
+
$panic(new $String("Not implemented"));
|
|
190747
|
+
};
|
|
190748
|
+
windowImpl.prototype.Send = function(event) { return this.$val.Send(event); };
|
|
190749
|
+
windowImpl.ptr.prototype.SendFirst = function(event) {
|
|
190750
|
+
var event, w;
|
|
190751
|
+
w = this;
|
|
190752
|
+
if (w.released) {
|
|
190753
|
+
return;
|
|
190754
|
+
}
|
|
190755
|
+
$panic(new $String("Not implemented"));
|
|
190756
|
+
};
|
|
190757
|
+
windowImpl.prototype.SendFirst = function(event) { return this.$val.SendFirst(event); };
|
|
190758
|
+
windowImpl.ptr.prototype.NextEvent = function() {
|
|
190759
|
+
var {_r, ev, w, $s, $r, $c} = $restore(this, {});
|
|
190760
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190761
|
+
w = this;
|
|
190762
|
+
_r = $recv(w.domEvents.GetEventChan()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190763
|
+
ev = _r[0];
|
|
190764
|
+
$s = -1; return ev;
|
|
190765
|
+
/* */ } return; } var $f = {$blk: windowImpl.ptr.prototype.NextEvent, $c: true, $r, _r, ev, w, $s};return $f;
|
|
190766
|
+
};
|
|
190767
|
+
windowImpl.prototype.NextEvent = function() { return this.$val.NextEvent(); };
|
|
190768
|
+
windowImpl.ptr.prototype.Upload = function(dp, src, sr) {
|
|
190769
|
+
var {_r, dp, sr, src, w, $s, $r, $c} = $restore(this, {dp, src, sr});
|
|
190770
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190771
|
+
w = this;
|
|
190772
|
+
if (w.released) {
|
|
190773
|
+
$s = -1; return;
|
|
190774
|
+
}
|
|
190775
|
+
_r = errs.Errorf("Not implemented, use UploadYCbCr instead", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190776
|
+
$panic(_r);
|
|
190777
|
+
$s = -1; return;
|
|
190778
|
+
/* */ } return; } var $f = {$blk: windowImpl.ptr.prototype.Upload, $c: true, $r, _r, dp, sr, src, w, $s};return $f;
|
|
190779
|
+
};
|
|
190780
|
+
windowImpl.prototype.Upload = function(dp, src, sr) { return this.$val.Upload(dp, src, sr); };
|
|
190781
|
+
windowImpl.ptr.prototype.UploadYCbCr = function(dp, src, sr) {
|
|
190782
|
+
var {_arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, dp, err, err$1, jsNaClDecoder, picture, picturePromise, renderPromise, renderResult, sr, src, w, x, x$1, $s, $r, $c} = $restore(this, {dp, src, sr});
|
|
190783
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190784
|
+
w = this;
|
|
190785
|
+
if (w.released) {
|
|
190786
|
+
$s = -1; return;
|
|
190787
|
+
}
|
|
190788
|
+
/* */ if (jsdecoder.ShouldResetOnNextDecode()) { $s = 1; continue; }
|
|
190789
|
+
/* */ $s = 2; continue;
|
|
190790
|
+
/* if (jsdecoder.ShouldResetOnNextDecode()) { */ case 1:
|
|
190791
|
+
$r = log.Println(new sliceType([new $String("NaClDecoder is resetting, skipping frame rendering")])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190792
|
+
$s = -1; return;
|
|
190793
|
+
/* } */ case 2:
|
|
190794
|
+
jsNaClDecoder = jsdecoder.GetJsNaClDecoder();
|
|
190795
|
+
/* */ if (jsNaClDecoder === ptrType$3.nil) { $s = 4; continue; }
|
|
190796
|
+
/* */ $s = 5; continue;
|
|
190797
|
+
/* if (jsNaClDecoder === ptrType$3.nil) { */ case 4:
|
|
190798
|
+
$r = log.Println(new sliceType([new $String("JsNaClDecoder is not created, skipping frame rendering")])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190799
|
+
$s = -1; return;
|
|
190800
|
+
/* } */ case 5:
|
|
190801
|
+
$r = w.mutex.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190802
|
+
_r = $clone(jsNaClDecoder, js.Value).Call("getPicture", sliceType.nil); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190803
|
+
picturePromise = $clone(_r, js.Value);
|
|
190804
|
+
_r$1 = jshelper.Await($clone(picturePromise, js.Value)); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; }
|
|
190805
|
+
_tuple = _r$1;
|
|
190806
|
+
picture = _tuple[0];
|
|
190807
|
+
err = _tuple[1];
|
|
190808
|
+
$r = w.mutex.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190809
|
+
/* */ if (!(err === ptrType$3.nil)) { $s = 11; continue; }
|
|
190810
|
+
/* */ $s = 12; continue;
|
|
190811
|
+
/* if (!(err === ptrType$3.nil)) { */ case 11:
|
|
190812
|
+
jsdecoder.ResetBeforeNextDecode();
|
|
190813
|
+
_r$2 = jshelper.GetError(err); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; }
|
|
190814
|
+
_arg = _r$2;
|
|
190815
|
+
$r = errs.Print("Failed to get picture: %s", _arg); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190816
|
+
$s = -1; return;
|
|
190817
|
+
/* } */ case 12:
|
|
190818
|
+
/* */ if (!jsdecoder.ShouldResetOnNextDecode() && !w.renderingInProgress) { $s = 15; continue; }
|
|
190819
|
+
/* */ $s = 16; continue;
|
|
190820
|
+
/* if (!jsdecoder.ShouldResetOnNextDecode() && !w.renderingInProgress) { */ case 15:
|
|
190821
|
+
w.renderingInProgress = true;
|
|
190822
|
+
_r$3 = $clone(jsNaClDecoder, js.Value).Call("render", new sliceType([(x = picture, new x.constructor.elem(x))])); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; }
|
|
190823
|
+
renderPromise = $clone(_r$3, js.Value);
|
|
190824
|
+
_r$4 = jshelper.Await($clone(renderPromise, js.Value)); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; }
|
|
190825
|
+
_tuple$1 = _r$4;
|
|
190826
|
+
renderResult = _tuple$1[0];
|
|
190827
|
+
err$1 = _tuple$1[1];
|
|
190828
|
+
w.renderingInProgress = false;
|
|
190829
|
+
/* */ if (!(err$1 === ptrType$3.nil)) { $s = 19; continue; }
|
|
190830
|
+
/* */ $s = 20; continue;
|
|
190831
|
+
/* if (!(err$1 === ptrType$3.nil)) { */ case 19:
|
|
190832
|
+
_r$5 = jshelper.GetError(err$1); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; }
|
|
190833
|
+
_arg$1 = _r$5;
|
|
190834
|
+
$r = errs.Print("Failed to render frame: %s", _arg$1); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190835
|
+
$s = -1; return;
|
|
190836
|
+
/* } */ case 20:
|
|
190837
|
+
/* */ if (!(($clone(renderResult, js.Value).Float() === 0))) { $s = 23; continue; }
|
|
190838
|
+
/* */ $s = 24; continue;
|
|
190839
|
+
/* if (!(($clone(renderResult, js.Value).Float() === 0))) { */ case 23:
|
|
190840
|
+
$r = log.Printf("Failed to render frame with code: %f\n", new sliceType([new $Float64($clone(renderResult, js.Value).Float())])); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190841
|
+
$s = -1; return;
|
|
190842
|
+
/* } */ case 24:
|
|
190843
|
+
/* } */ case 16:
|
|
190844
|
+
_r$6 = $clone(jsNaClDecoder, js.Value).Call("recyclePicture", new sliceType([(x$1 = picture, new x$1.constructor.elem(x$1))])); /* */ $s = 26; case 26: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; }
|
|
190845
|
+
_r$6;
|
|
190846
|
+
$s = -1; return;
|
|
190847
|
+
/* */ } return; } var $f = {$blk: windowImpl.ptr.prototype.UploadYCbCr, $c: true, $r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, dp, err, err$1, jsNaClDecoder, picture, picturePromise, renderPromise, renderResult, sr, src, w, x, x$1, $s};return $f;
|
|
190848
|
+
};
|
|
190849
|
+
windowImpl.prototype.UploadYCbCr = function(dp, src, sr) { return this.$val.UploadYCbCr(dp, src, sr); };
|
|
190850
|
+
windowImpl.ptr.prototype.Fill = function(dr, src, op) {
|
|
190851
|
+
var dr, op, src, w;
|
|
190852
|
+
w = this;
|
|
190853
|
+
if (w.released) {
|
|
190854
|
+
return;
|
|
190855
|
+
}
|
|
190856
|
+
$panic(new $String("Not implemented"));
|
|
190857
|
+
};
|
|
190858
|
+
windowImpl.prototype.Fill = function(dr, src, op) { return this.$val.Fill(dr, src, op); };
|
|
190859
|
+
windowImpl.ptr.prototype.Draw = function(src2dst, src, sr, op, opts) {
|
|
190860
|
+
var op, opts, sr, src, src2dst, w;
|
|
190861
|
+
w = this;
|
|
190862
|
+
if (w.released) {
|
|
190863
|
+
return;
|
|
190864
|
+
}
|
|
190865
|
+
$panic(new $String("Not implemented"));
|
|
190866
|
+
};
|
|
190867
|
+
windowImpl.prototype.Draw = function(src2dst, src, sr, op, opts) { return this.$val.Draw(src2dst, src, sr, op, opts); };
|
|
190868
|
+
windowImpl.ptr.prototype.DrawUniform = function(src2dst, src, sr, op, opts) {
|
|
190869
|
+
var op, opts, sr, src, src2dst, w;
|
|
190870
|
+
w = this;
|
|
190871
|
+
if (w.released) {
|
|
190872
|
+
return;
|
|
190873
|
+
}
|
|
190874
|
+
$panic(new $String("Not implemented"));
|
|
190875
|
+
};
|
|
190876
|
+
windowImpl.prototype.DrawUniform = function(src2dst, src, sr, op, opts) { return this.$val.DrawUniform(src2dst, src, sr, op, opts); };
|
|
190877
|
+
windowImpl.ptr.prototype.Copy = function(dp, src, sr, op, opts) {
|
|
190878
|
+
var dp, op, opts, sr, src, w;
|
|
190879
|
+
w = this;
|
|
190880
|
+
if (w.released) {
|
|
190881
|
+
return;
|
|
190882
|
+
}
|
|
190883
|
+
$panic(new $String("Not implemented"));
|
|
190884
|
+
};
|
|
190885
|
+
windowImpl.prototype.Copy = function(dp, src, sr, op, opts) { return this.$val.Copy(dp, src, sr, op, opts); };
|
|
190886
|
+
windowImpl.ptr.prototype.Scale = function(dr, src, sr, op, opts) {
|
|
190887
|
+
var dr, op, opts, sr, src, w;
|
|
190888
|
+
w = this;
|
|
190889
|
+
if (w.released) {
|
|
190890
|
+
return;
|
|
190891
|
+
}
|
|
190892
|
+
$panic(new $String("Not implemented"));
|
|
190893
|
+
};
|
|
190894
|
+
windowImpl.prototype.Scale = function(dr, src, sr, op, opts) { return this.$val.Scale(dr, src, sr, op, opts); };
|
|
190895
|
+
newScreenImpl = function() {
|
|
190896
|
+
var s;
|
|
190897
|
+
s = new screenImpl.ptr($clone($clone(js.Global(), js.Value).Get("document"), js.Value));
|
|
190898
|
+
return [s, $ifaceNil];
|
|
190899
|
+
};
|
|
190900
|
+
screenImpl.ptr.prototype.NewBuffer = function(size) {
|
|
190901
|
+
var buffer, s, size;
|
|
190902
|
+
s = this;
|
|
190903
|
+
buffer = newBuffer(s, $clone(size, image.Point));
|
|
190904
|
+
return [buffer, $ifaceNil];
|
|
190905
|
+
};
|
|
190906
|
+
screenImpl.prototype.NewBuffer = function(size) { return this.$val.NewBuffer(size); };
|
|
190907
|
+
screenImpl.ptr.prototype.NewTexture = function(size) {
|
|
190908
|
+
var {$24r, _r, s, size, $s, $r, $c} = $restore(this, {size});
|
|
190909
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190910
|
+
s = this;
|
|
190911
|
+
_r = errs.Errorf("Texture not implemented", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190912
|
+
$24r = [$ifaceNil, _r];
|
|
190913
|
+
$s = 2; case 2: return $24r;
|
|
190914
|
+
/* */ } return; } var $f = {$blk: screenImpl.ptr.prototype.NewTexture, $c: true, $r, $24r, _r, s, size, $s};return $f;
|
|
190915
|
+
};
|
|
190916
|
+
screenImpl.prototype.NewTexture = function(size) { return this.$val.NewTexture(size); };
|
|
190917
|
+
screenImpl.ptr.prototype.NewWindow = function(opts) {
|
|
190918
|
+
var {_r, opts, s, window, $s, $r, $c} = $restore(this, {opts});
|
|
190919
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190920
|
+
s = this;
|
|
190921
|
+
_r = newWindow(s, opts); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190922
|
+
window = _r;
|
|
190923
|
+
$s = -1; return [window, $ifaceNil];
|
|
190924
|
+
/* */ } return; } var $f = {$blk: screenImpl.ptr.prototype.NewWindow, $c: true, $r, _r, opts, s, window, $s};return $f;
|
|
190925
|
+
};
|
|
190926
|
+
screenImpl.prototype.NewWindow = function(opts) { return this.$val.NewWindow(opts); };
|
|
190927
|
+
main = function(f) {
|
|
190928
|
+
var {_tuple, err, f, retErr, s, $s, $r, $c} = $restore(this, {f});
|
|
190929
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190930
|
+
retErr = $ifaceNil;
|
|
190931
|
+
_tuple = newScreenImpl();
|
|
190932
|
+
s = _tuple[0];
|
|
190933
|
+
err = _tuple[1];
|
|
190934
|
+
if (!($interfaceIsEqual(err, $ifaceNil))) {
|
|
190935
|
+
retErr = err;
|
|
190936
|
+
$s = -1; return retErr;
|
|
190937
|
+
}
|
|
190938
|
+
$r = f(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190939
|
+
retErr = $ifaceNil;
|
|
190940
|
+
$s = -1; return retErr;
|
|
190941
|
+
/* */ } return; } var $f = {$blk: main, $c: true, $r, _tuple, err, f, retErr, s, $s};return $f;
|
|
190942
|
+
};
|
|
190943
|
+
newBuffer = function(screen$1, size) {
|
|
190944
|
+
var b, screen$1, size;
|
|
190945
|
+
b = new BufferImpl.ptr(screen$1, $clone(size, image.Point));
|
|
190946
|
+
return b;
|
|
190947
|
+
};
|
|
190948
|
+
BufferImpl.ptr.prototype.Size = function() {
|
|
190949
|
+
var b;
|
|
190950
|
+
b = this;
|
|
190951
|
+
return b.size;
|
|
190952
|
+
};
|
|
190953
|
+
BufferImpl.prototype.Size = function() { return this.$val.Size(); };
|
|
190954
|
+
BufferImpl.ptr.prototype.Bounds = function() {
|
|
190955
|
+
var b;
|
|
190956
|
+
b = this;
|
|
190957
|
+
return new image.Rectangle.ptr(new image.Point.ptr(0, 0), $clone(b.size, image.Point));
|
|
190958
|
+
};
|
|
190959
|
+
BufferImpl.prototype.Bounds = function() { return this.$val.Bounds(); };
|
|
190960
|
+
BufferImpl.ptr.prototype.RGBA = function() {
|
|
190961
|
+
var {_r, b, $s, $r, $c} = $restore(this, {});
|
|
190962
|
+
/* */ $s = $s || 0; s: while (true) { switch ($s) { case 0:
|
|
190963
|
+
b = this;
|
|
190964
|
+
_r = errs.Errorf("Not implemented RGBA(), use PictureResult() instead", sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; }
|
|
190965
|
+
$panic(_r);
|
|
190966
|
+
$s = -1; return ptrType$4.nil;
|
|
190967
|
+
/* */ } return; } var $f = {$blk: BufferImpl.ptr.prototype.RGBA, $c: true, $r, _r, b, $s};return $f;
|
|
190968
|
+
};
|
|
190969
|
+
BufferImpl.prototype.RGBA = function() { return this.$val.RGBA(); };
|
|
190970
|
+
BufferImpl.ptr.prototype.YCbCr = function() {
|
|
190971
|
+
var b;
|
|
190972
|
+
b = this;
|
|
190973
|
+
return new image.YCbCr.ptr(sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, 0, 0, 0, $clone(b.Bounds(), image.Rectangle));
|
|
190974
|
+
};
|
|
190975
|
+
BufferImpl.prototype.YCbCr = function() { return this.$val.YCbCr(); };
|
|
190976
|
+
BufferImpl.ptr.prototype.Release = function() {
|
|
190977
|
+
var b;
|
|
190978
|
+
b = this;
|
|
190979
|
+
};
|
|
190980
|
+
BufferImpl.prototype.Release = function() { return this.$val.Release(); };
|
|
190981
|
+
ptrType$6.methods = [{prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}, {prop: "Publish", name: "Publish", pkg: "", typ: $funcType([], [screen.PublishResult], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "SendFirst", name: "SendFirst", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "NextEvent", name: "NextEvent", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Upload", name: "Upload", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "UploadYCbCr", name: "UploadYCbCr", pkg: "", typ: $funcType([image.Point, screen.Buffer, image.Rectangle], [], false)}, {prop: "Fill", name: "Fill", pkg: "", typ: $funcType([image.Rectangle, color.Color, draw.Op], [], false)}, {prop: "Draw", name: "Draw", pkg: "", typ: $funcType([f64.Aff3, screen.Texture, image.Rectangle, draw.Op, ptrType$5], [], false)}, {prop: "DrawUniform", name: "DrawUniform", pkg: "", typ: $funcType([f64.Aff3, color.Color, image.Rectangle, draw.Op, ptrType$5], [], false)}, {prop: "Copy", name: "Copy", pkg: "", typ: $funcType([image.Point, screen.Texture, image.Rectangle, draw.Op, ptrType$5], [], false)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([image.Rectangle, screen.Texture, image.Rectangle, draw.Op, ptrType$5], [], false)}];
|
|
190982
|
+
ptrType.methods = [{prop: "NewBuffer", name: "NewBuffer", pkg: "", typ: $funcType([image.Point], [screen.Buffer, $error], false)}, {prop: "NewTexture", name: "NewTexture", pkg: "", typ: $funcType([image.Point], [screen.Texture, $error], false)}, {prop: "NewWindow", name: "NewWindow", pkg: "", typ: $funcType([ptrType$7], [screen.Window, $error], false)}];
|
|
190983
|
+
ptrType$9.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [image.Point], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [image.Rectangle], false)}, {prop: "RGBA", name: "RGBA", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "YCbCr", name: "YCbCr", pkg: "", typ: $funcType([], [ptrType$8], false)}, {prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}];
|
|
190984
|
+
windowImpl.init("github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "renderingInProgress", name: "renderingInProgress", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "domEvents", name: "domEvents", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "released", name: "released", embedded: false, exported: false, typ: $Bool, tag: ""}]);
|
|
190985
|
+
screenImpl.init("github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver", [{prop: "doc", name: "doc", embedded: false, exported: false, typ: js.Value, tag: ""}]);
|
|
190986
|
+
BufferImpl.init("github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver", [{prop: "screen", name: "screen", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: image.Point, tag: ""}]);
|
|
190987
|
+
$init = function() {
|
|
190988
|
+
$pkg.$init = function() {};
|
|
190989
|
+
/* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0:
|
|
190990
|
+
$r = errs.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190991
|
+
$r = jshelper.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190992
|
+
$r = jsdecoder.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190993
|
+
$r = dom.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190994
|
+
$r = screen.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190995
|
+
$r = f64.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190996
|
+
$r = image.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190997
|
+
$r = color.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190998
|
+
$r = draw.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190999
|
+
$r = log.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191000
|
+
$r = sync.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191001
|
+
$r = js.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
190613
191002
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|
|
190614
191003
|
};
|
|
190615
191004
|
$pkg.$init = $init;
|
|
@@ -190628,13 +191017,14 @@ $packages["golang.org/x/mobile/event/lifecycle"] = (function() {
|
|
|
190628
191017
|
return $pkg;
|
|
190629
191018
|
})();
|
|
190630
191019
|
$packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
190631
|
-
var $pkg = {}, $init, binary, json, query, clientscreen, clipboard, errs, input, message, netclient, netpacket, netstream, stats, window, x264, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, image, io, ioutil, log, os, path, strings, sync, js, time, screenParams, ScreenManager, ProcessInfo, ProcessInfoManager, ptrType$2, funcType, sliceType$1, sliceType$3, arrayType, ptrType$14, openScreenWindows, mutex, NewScreenManager, NewProcessInfoManager;
|
|
191020
|
+
var $pkg = {}, $init, binary, json, query, clientscreen, clipboard, errs, helper, input, message, netclient, netpacket, netstream, stats, window, x264, nacldecoder, nacldriver, webcodecs, canvasdriver, webgldriver, screen, focus, key, lifecycle, mouse, size, image, io, ioutil, log, os, path, strings, sync, js, time, screenParams, ScreenManager, ProcessInfo, ProcessInfoManager, ptrType$2, funcType, sliceType$1, sliceType$3, arrayType, ptrType$14, openScreenWindows, mutex, NewScreenManager, NewProcessInfoManager;
|
|
190632
191021
|
binary = $packages["encoding/binary"];
|
|
190633
191022
|
json = $packages["encoding/json"];
|
|
190634
191023
|
query = $packages["github.com/google/go-querystring/query"];
|
|
190635
191024
|
clientscreen = $packages["github.com/supraio/client-daemon/pkg/clientscreen"];
|
|
190636
191025
|
clipboard = $packages["github.com/supraio/client-daemon/pkg/clipboard"];
|
|
190637
191026
|
errs = $packages["github.com/supraio/client-daemon/pkg/errs"];
|
|
191027
|
+
helper = $packages["github.com/supraio/client-daemon/pkg/helper"];
|
|
190638
191028
|
input = $packages["github.com/supraio/client-daemon/pkg/input"];
|
|
190639
191029
|
message = $packages["github.com/supraio/client-daemon/pkg/message"];
|
|
190640
191030
|
netclient = $packages["github.com/supraio/client-daemon/pkg/netclient"];
|
|
@@ -190643,6 +191033,9 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
190643
191033
|
stats = $packages["github.com/supraio/client-daemon/pkg/stats"];
|
|
190644
191034
|
window = $packages["github.com/supraio/client-daemon/pkg/window"];
|
|
190645
191035
|
x264 = $packages["github.com/supraio/client-daemon/pkg/x264"];
|
|
191036
|
+
nacldecoder = $packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder"];
|
|
191037
|
+
nacldriver = $packages["github.com/supraio/client-daemon/pkg/x264/nacldecoder/nacldriver"];
|
|
191038
|
+
webcodecs = $packages["github.com/supraio/client-daemon/pkg/x264/webcodecs"];
|
|
190646
191039
|
canvasdriver = $packages["golang.org/x/exp/shiny/driver/canvasdriver"];
|
|
190647
191040
|
webgldriver = $packages["golang.org/x/exp/shiny/driver/webgldriver"];
|
|
190648
191041
|
screen = $packages["golang.org/x/exp/shiny/screen"];
|
|
@@ -191081,32 +191474,36 @@ $packages["github.com/supraio/client-daemon/pkg/render"] = (function() {
|
|
|
191081
191474
|
$r = clientscreen.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191082
191475
|
$r = clipboard.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191083
191476
|
$r = errs.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191084
|
-
$r =
|
|
191085
|
-
$r =
|
|
191086
|
-
$r =
|
|
191087
|
-
$r =
|
|
191088
|
-
$r =
|
|
191089
|
-
$r =
|
|
191090
|
-
$r =
|
|
191091
|
-
$r =
|
|
191092
|
-
$r =
|
|
191093
|
-
$r =
|
|
191094
|
-
$r =
|
|
191095
|
-
$r =
|
|
191096
|
-
$r =
|
|
191097
|
-
$r =
|
|
191098
|
-
$r =
|
|
191099
|
-
$r =
|
|
191100
|
-
$r =
|
|
191101
|
-
$r =
|
|
191102
|
-
$r =
|
|
191103
|
-
$r =
|
|
191104
|
-
$r =
|
|
191105
|
-
$r =
|
|
191106
|
-
$r =
|
|
191107
|
-
$r =
|
|
191108
|
-
$r =
|
|
191109
|
-
$r =
|
|
191477
|
+
$r = helper.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191478
|
+
$r = input.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191479
|
+
$r = message.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191480
|
+
$r = netclient.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191481
|
+
$r = netpacket.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191482
|
+
$r = netstream.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191483
|
+
$r = stats.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191484
|
+
$r = window.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191485
|
+
$r = x264.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191486
|
+
$r = nacldecoder.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191487
|
+
$r = nacldriver.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191488
|
+
$r = webcodecs.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191489
|
+
$r = canvasdriver.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191490
|
+
$r = webgldriver.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191491
|
+
$r = screen.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191492
|
+
$r = focus.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191493
|
+
$r = key.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191494
|
+
$r = lifecycle.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191495
|
+
$r = mouse.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191496
|
+
$r = size.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191497
|
+
$r = image.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191498
|
+
$r = io.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191499
|
+
$r = ioutil.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191500
|
+
$r = log.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191501
|
+
$r = os.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191502
|
+
$r = path.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191503
|
+
$r = strings.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191504
|
+
$r = sync.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191505
|
+
$r = js.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191506
|
+
$r = time.$init(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; }
|
|
191110
191507
|
openScreenWindows = $makeMap($String.keyFor, []);
|
|
191111
191508
|
mutex = new sync.Mutex.ptr(0, 0);
|
|
191112
191509
|
/* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f;
|