github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis41_js_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package web
     5  
     6  import (
     7  	"github.com/primecitizens/pcz/std/ffi/js"
     8  	"github.com/primecitizens/pcz/std/plat/js/web/bindings"
     9  )
    10  
    11  type LargestContentfulPaint struct {
    12  	PerformanceEntry
    13  }
    14  
    15  func (this LargestContentfulPaint) Once() LargestContentfulPaint {
    16  	this.ref.Once()
    17  	return this
    18  }
    19  
    20  func (this LargestContentfulPaint) Ref() js.Ref {
    21  	return this.PerformanceEntry.Ref()
    22  }
    23  
    24  func (this LargestContentfulPaint) FromRef(ref js.Ref) LargestContentfulPaint {
    25  	this.PerformanceEntry = this.PerformanceEntry.FromRef(ref)
    26  	return this
    27  }
    28  
    29  func (this LargestContentfulPaint) Free() {
    30  	this.ref.Free()
    31  }
    32  
    33  // RenderTime returns the value of property "LargestContentfulPaint.renderTime".
    34  //
    35  // It returns ok=false if there is no such property.
    36  func (this LargestContentfulPaint) RenderTime() (ret DOMHighResTimeStamp, ok bool) {
    37  	ok = js.True == bindings.GetLargestContentfulPaintRenderTime(
    38  		this.ref, js.Pointer(&ret),
    39  	)
    40  	return
    41  }
    42  
    43  // LoadTime returns the value of property "LargestContentfulPaint.loadTime".
    44  //
    45  // It returns ok=false if there is no such property.
    46  func (this LargestContentfulPaint) LoadTime() (ret DOMHighResTimeStamp, ok bool) {
    47  	ok = js.True == bindings.GetLargestContentfulPaintLoadTime(
    48  		this.ref, js.Pointer(&ret),
    49  	)
    50  	return
    51  }
    52  
    53  // Size returns the value of property "LargestContentfulPaint.size".
    54  //
    55  // It returns ok=false if there is no such property.
    56  func (this LargestContentfulPaint) Size() (ret uint32, ok bool) {
    57  	ok = js.True == bindings.GetLargestContentfulPaintSize(
    58  		this.ref, js.Pointer(&ret),
    59  	)
    60  	return
    61  }
    62  
    63  // Id returns the value of property "LargestContentfulPaint.id".
    64  //
    65  // It returns ok=false if there is no such property.
    66  func (this LargestContentfulPaint) Id() (ret js.String, ok bool) {
    67  	ok = js.True == bindings.GetLargestContentfulPaintId(
    68  		this.ref, js.Pointer(&ret),
    69  	)
    70  	return
    71  }
    72  
    73  // Url returns the value of property "LargestContentfulPaint.url".
    74  //
    75  // It returns ok=false if there is no such property.
    76  func (this LargestContentfulPaint) Url() (ret js.String, ok bool) {
    77  	ok = js.True == bindings.GetLargestContentfulPaintUrl(
    78  		this.ref, js.Pointer(&ret),
    79  	)
    80  	return
    81  }
    82  
    83  // Element returns the value of property "LargestContentfulPaint.element".
    84  //
    85  // It returns ok=false if there is no such property.
    86  func (this LargestContentfulPaint) Element() (ret Element, ok bool) {
    87  	ok = js.True == bindings.GetLargestContentfulPaintElement(
    88  		this.ref, js.Pointer(&ret),
    89  	)
    90  	return
    91  }
    92  
    93  // HasFuncToJSON returns true if the method "LargestContentfulPaint.toJSON" exists.
    94  func (this LargestContentfulPaint) HasFuncToJSON() bool {
    95  	return js.True == bindings.HasFuncLargestContentfulPaintToJSON(
    96  		this.ref,
    97  	)
    98  }
    99  
   100  // FuncToJSON returns the method "LargestContentfulPaint.toJSON".
   101  func (this LargestContentfulPaint) FuncToJSON() (fn js.Func[func() js.Object]) {
   102  	bindings.FuncLargestContentfulPaintToJSON(
   103  		this.ref, js.Pointer(&fn),
   104  	)
   105  	return
   106  }
   107  
   108  // ToJSON calls the method "LargestContentfulPaint.toJSON".
   109  func (this LargestContentfulPaint) ToJSON() (ret js.Object) {
   110  	bindings.CallLargestContentfulPaintToJSON(
   111  		this.ref, js.Pointer(&ret),
   112  	)
   113  
   114  	return
   115  }
   116  
   117  // TryToJSON calls the method "LargestContentfulPaint.toJSON"
   118  // in a try/catch block and returns (_, err, ok = false) when it went through
   119  // the catch clause.
   120  func (this LargestContentfulPaint) TryToJSON() (ret js.Object, exception js.Any, ok bool) {
   121  	ok = js.True == bindings.TryLargestContentfulPaintToJSON(
   122  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   123  	)
   124  
   125  	return
   126  }
   127  
   128  type LatencyMode uint32
   129  
   130  const (
   131  	_ LatencyMode = iota
   132  
   133  	LatencyMode_QUALITY
   134  	LatencyMode_REALTIME
   135  )
   136  
   137  func (LatencyMode) FromRef(str js.Ref) LatencyMode {
   138  	return LatencyMode(bindings.ConstOfLatencyMode(str))
   139  }
   140  
   141  func (x LatencyMode) String() (string, bool) {
   142  	switch x {
   143  	case LatencyMode_QUALITY:
   144  		return "quality", true
   145  	case LatencyMode_REALTIME:
   146  		return "realtime", true
   147  	default:
   148  		return "", false
   149  	}
   150  }
   151  
   152  type LayoutConstraints struct {
   153  	ref js.Ref
   154  }
   155  
   156  func (this LayoutConstraints) Once() LayoutConstraints {
   157  	this.ref.Once()
   158  	return this
   159  }
   160  
   161  func (this LayoutConstraints) Ref() js.Ref {
   162  	return this.ref
   163  }
   164  
   165  func (this LayoutConstraints) FromRef(ref js.Ref) LayoutConstraints {
   166  	this.ref = ref
   167  	return this
   168  }
   169  
   170  func (this LayoutConstraints) Free() {
   171  	this.ref.Free()
   172  }
   173  
   174  // AvailableInlineSize returns the value of property "LayoutConstraints.availableInlineSize".
   175  //
   176  // It returns ok=false if there is no such property.
   177  func (this LayoutConstraints) AvailableInlineSize() (ret float64, ok bool) {
   178  	ok = js.True == bindings.GetLayoutConstraintsAvailableInlineSize(
   179  		this.ref, js.Pointer(&ret),
   180  	)
   181  	return
   182  }
   183  
   184  // AvailableBlockSize returns the value of property "LayoutConstraints.availableBlockSize".
   185  //
   186  // It returns ok=false if there is no such property.
   187  func (this LayoutConstraints) AvailableBlockSize() (ret float64, ok bool) {
   188  	ok = js.True == bindings.GetLayoutConstraintsAvailableBlockSize(
   189  		this.ref, js.Pointer(&ret),
   190  	)
   191  	return
   192  }
   193  
   194  // FixedInlineSize returns the value of property "LayoutConstraints.fixedInlineSize".
   195  //
   196  // It returns ok=false if there is no such property.
   197  func (this LayoutConstraints) FixedInlineSize() (ret float64, ok bool) {
   198  	ok = js.True == bindings.GetLayoutConstraintsFixedInlineSize(
   199  		this.ref, js.Pointer(&ret),
   200  	)
   201  	return
   202  }
   203  
   204  // FixedBlockSize returns the value of property "LayoutConstraints.fixedBlockSize".
   205  //
   206  // It returns ok=false if there is no such property.
   207  func (this LayoutConstraints) FixedBlockSize() (ret float64, ok bool) {
   208  	ok = js.True == bindings.GetLayoutConstraintsFixedBlockSize(
   209  		this.ref, js.Pointer(&ret),
   210  	)
   211  	return
   212  }
   213  
   214  // PercentageInlineSize returns the value of property "LayoutConstraints.percentageInlineSize".
   215  //
   216  // It returns ok=false if there is no such property.
   217  func (this LayoutConstraints) PercentageInlineSize() (ret float64, ok bool) {
   218  	ok = js.True == bindings.GetLayoutConstraintsPercentageInlineSize(
   219  		this.ref, js.Pointer(&ret),
   220  	)
   221  	return
   222  }
   223  
   224  // PercentageBlockSize returns the value of property "LayoutConstraints.percentageBlockSize".
   225  //
   226  // It returns ok=false if there is no such property.
   227  func (this LayoutConstraints) PercentageBlockSize() (ret float64, ok bool) {
   228  	ok = js.True == bindings.GetLayoutConstraintsPercentageBlockSize(
   229  		this.ref, js.Pointer(&ret),
   230  	)
   231  	return
   232  }
   233  
   234  // BlockFragmentationOffset returns the value of property "LayoutConstraints.blockFragmentationOffset".
   235  //
   236  // It returns ok=false if there is no such property.
   237  func (this LayoutConstraints) BlockFragmentationOffset() (ret float64, ok bool) {
   238  	ok = js.True == bindings.GetLayoutConstraintsBlockFragmentationOffset(
   239  		this.ref, js.Pointer(&ret),
   240  	)
   241  	return
   242  }
   243  
   244  // BlockFragmentationType returns the value of property "LayoutConstraints.blockFragmentationType".
   245  //
   246  // It returns ok=false if there is no such property.
   247  func (this LayoutConstraints) BlockFragmentationType() (ret BlockFragmentationType, ok bool) {
   248  	ok = js.True == bindings.GetLayoutConstraintsBlockFragmentationType(
   249  		this.ref, js.Pointer(&ret),
   250  	)
   251  	return
   252  }
   253  
   254  // Data returns the value of property "LayoutConstraints.data".
   255  //
   256  // It returns ok=false if there is no such property.
   257  func (this LayoutConstraints) Data() (ret js.Any, ok bool) {
   258  	ok = js.True == bindings.GetLayoutConstraintsData(
   259  		this.ref, js.Pointer(&ret),
   260  	)
   261  	return
   262  }
   263  
   264  type LayoutEdges struct {
   265  	ref js.Ref
   266  }
   267  
   268  func (this LayoutEdges) Once() LayoutEdges {
   269  	this.ref.Once()
   270  	return this
   271  }
   272  
   273  func (this LayoutEdges) Ref() js.Ref {
   274  	return this.ref
   275  }
   276  
   277  func (this LayoutEdges) FromRef(ref js.Ref) LayoutEdges {
   278  	this.ref = ref
   279  	return this
   280  }
   281  
   282  func (this LayoutEdges) Free() {
   283  	this.ref.Free()
   284  }
   285  
   286  // InlineStart returns the value of property "LayoutEdges.inlineStart".
   287  //
   288  // It returns ok=false if there is no such property.
   289  func (this LayoutEdges) InlineStart() (ret float64, ok bool) {
   290  	ok = js.True == bindings.GetLayoutEdgesInlineStart(
   291  		this.ref, js.Pointer(&ret),
   292  	)
   293  	return
   294  }
   295  
   296  // InlineEnd returns the value of property "LayoutEdges.inlineEnd".
   297  //
   298  // It returns ok=false if there is no such property.
   299  func (this LayoutEdges) InlineEnd() (ret float64, ok bool) {
   300  	ok = js.True == bindings.GetLayoutEdgesInlineEnd(
   301  		this.ref, js.Pointer(&ret),
   302  	)
   303  	return
   304  }
   305  
   306  // BlockStart returns the value of property "LayoutEdges.blockStart".
   307  //
   308  // It returns ok=false if there is no such property.
   309  func (this LayoutEdges) BlockStart() (ret float64, ok bool) {
   310  	ok = js.True == bindings.GetLayoutEdgesBlockStart(
   311  		this.ref, js.Pointer(&ret),
   312  	)
   313  	return
   314  }
   315  
   316  // BlockEnd returns the value of property "LayoutEdges.blockEnd".
   317  //
   318  // It returns ok=false if there is no such property.
   319  func (this LayoutEdges) BlockEnd() (ret float64, ok bool) {
   320  	ok = js.True == bindings.GetLayoutEdgesBlockEnd(
   321  		this.ref, js.Pointer(&ret),
   322  	)
   323  	return
   324  }
   325  
   326  // Inline returns the value of property "LayoutEdges.inline".
   327  //
   328  // It returns ok=false if there is no such property.
   329  func (this LayoutEdges) Inline() (ret float64, ok bool) {
   330  	ok = js.True == bindings.GetLayoutEdgesInline(
   331  		this.ref, js.Pointer(&ret),
   332  	)
   333  	return
   334  }
   335  
   336  // Block returns the value of property "LayoutEdges.block".
   337  //
   338  // It returns ok=false if there is no such property.
   339  func (this LayoutEdges) Block() (ret float64, ok bool) {
   340  	ok = js.True == bindings.GetLayoutEdgesBlock(
   341  		this.ref, js.Pointer(&ret),
   342  	)
   343  	return
   344  }
   345  
   346  type LayoutSizingMode uint32
   347  
   348  const (
   349  	_ LayoutSizingMode = iota
   350  
   351  	LayoutSizingMode_BLOCK_LIKE
   352  	LayoutSizingMode_MANUAL
   353  )
   354  
   355  func (LayoutSizingMode) FromRef(str js.Ref) LayoutSizingMode {
   356  	return LayoutSizingMode(bindings.ConstOfLayoutSizingMode(str))
   357  }
   358  
   359  func (x LayoutSizingMode) String() (string, bool) {
   360  	switch x {
   361  	case LayoutSizingMode_BLOCK_LIKE:
   362  		return "block-like", true
   363  	case LayoutSizingMode_MANUAL:
   364  		return "manual", true
   365  	default:
   366  		return "", false
   367  	}
   368  }
   369  
   370  type LayoutOptions struct {
   371  	// ChildDisplay is "LayoutOptions.childDisplay"
   372  	//
   373  	// Optional, defaults to "block".
   374  	ChildDisplay ChildDisplayType
   375  	// Sizing is "LayoutOptions.sizing"
   376  	//
   377  	// Optional, defaults to "block-like".
   378  	Sizing LayoutSizingMode
   379  
   380  	FFI_USE bool
   381  }
   382  
   383  // FromRef calls UpdateFrom and returns a LayoutOptions with all fields set.
   384  func (p LayoutOptions) FromRef(ref js.Ref) LayoutOptions {
   385  	p.UpdateFrom(ref)
   386  	return p
   387  }
   388  
   389  // New creates a new LayoutOptions in the application heap.
   390  func (p LayoutOptions) New() js.Ref {
   391  	return bindings.LayoutOptionsJSLoad(
   392  		js.Pointer(&p), js.True, 0,
   393  	)
   394  }
   395  
   396  // UpdateFrom copies value of all fields of the heap object to p.
   397  func (p *LayoutOptions) UpdateFrom(ref js.Ref) {
   398  	bindings.LayoutOptionsJSStore(
   399  		js.Pointer(p), ref,
   400  	)
   401  }
   402  
   403  // Update writes all fields of the p to the heap object referenced by ref.
   404  func (p *LayoutOptions) Update(ref js.Ref) {
   405  	bindings.LayoutOptionsJSLoad(
   406  		js.Pointer(p), js.False, ref,
   407  	)
   408  }
   409  
   410  // FreeMembers frees fields with heap reference, if recursive is true
   411  // free all heap references reachable from p.
   412  func (p *LayoutOptions) FreeMembers(recursive bool) {
   413  }
   414  
   415  type LayoutShiftAttribution struct {
   416  	ref js.Ref
   417  }
   418  
   419  func (this LayoutShiftAttribution) Once() LayoutShiftAttribution {
   420  	this.ref.Once()
   421  	return this
   422  }
   423  
   424  func (this LayoutShiftAttribution) Ref() js.Ref {
   425  	return this.ref
   426  }
   427  
   428  func (this LayoutShiftAttribution) FromRef(ref js.Ref) LayoutShiftAttribution {
   429  	this.ref = ref
   430  	return this
   431  }
   432  
   433  func (this LayoutShiftAttribution) Free() {
   434  	this.ref.Free()
   435  }
   436  
   437  // Node returns the value of property "LayoutShiftAttribution.node".
   438  //
   439  // It returns ok=false if there is no such property.
   440  func (this LayoutShiftAttribution) Node() (ret Node, ok bool) {
   441  	ok = js.True == bindings.GetLayoutShiftAttributionNode(
   442  		this.ref, js.Pointer(&ret),
   443  	)
   444  	return
   445  }
   446  
   447  // PreviousRect returns the value of property "LayoutShiftAttribution.previousRect".
   448  //
   449  // It returns ok=false if there is no such property.
   450  func (this LayoutShiftAttribution) PreviousRect() (ret DOMRectReadOnly, ok bool) {
   451  	ok = js.True == bindings.GetLayoutShiftAttributionPreviousRect(
   452  		this.ref, js.Pointer(&ret),
   453  	)
   454  	return
   455  }
   456  
   457  // CurrentRect returns the value of property "LayoutShiftAttribution.currentRect".
   458  //
   459  // It returns ok=false if there is no such property.
   460  func (this LayoutShiftAttribution) CurrentRect() (ret DOMRectReadOnly, ok bool) {
   461  	ok = js.True == bindings.GetLayoutShiftAttributionCurrentRect(
   462  		this.ref, js.Pointer(&ret),
   463  	)
   464  	return
   465  }
   466  
   467  type LayoutShift struct {
   468  	PerformanceEntry
   469  }
   470  
   471  func (this LayoutShift) Once() LayoutShift {
   472  	this.ref.Once()
   473  	return this
   474  }
   475  
   476  func (this LayoutShift) Ref() js.Ref {
   477  	return this.PerformanceEntry.Ref()
   478  }
   479  
   480  func (this LayoutShift) FromRef(ref js.Ref) LayoutShift {
   481  	this.PerformanceEntry = this.PerformanceEntry.FromRef(ref)
   482  	return this
   483  }
   484  
   485  func (this LayoutShift) Free() {
   486  	this.ref.Free()
   487  }
   488  
   489  // Value returns the value of property "LayoutShift.value".
   490  //
   491  // It returns ok=false if there is no such property.
   492  func (this LayoutShift) Value() (ret float64, ok bool) {
   493  	ok = js.True == bindings.GetLayoutShiftValue(
   494  		this.ref, js.Pointer(&ret),
   495  	)
   496  	return
   497  }
   498  
   499  // HadRecentInput returns the value of property "LayoutShift.hadRecentInput".
   500  //
   501  // It returns ok=false if there is no such property.
   502  func (this LayoutShift) HadRecentInput() (ret bool, ok bool) {
   503  	ok = js.True == bindings.GetLayoutShiftHadRecentInput(
   504  		this.ref, js.Pointer(&ret),
   505  	)
   506  	return
   507  }
   508  
   509  // LastInputTime returns the value of property "LayoutShift.lastInputTime".
   510  //
   511  // It returns ok=false if there is no such property.
   512  func (this LayoutShift) LastInputTime() (ret DOMHighResTimeStamp, ok bool) {
   513  	ok = js.True == bindings.GetLayoutShiftLastInputTime(
   514  		this.ref, js.Pointer(&ret),
   515  	)
   516  	return
   517  }
   518  
   519  // Sources returns the value of property "LayoutShift.sources".
   520  //
   521  // It returns ok=false if there is no such property.
   522  func (this LayoutShift) Sources() (ret js.FrozenArray[LayoutShiftAttribution], ok bool) {
   523  	ok = js.True == bindings.GetLayoutShiftSources(
   524  		this.ref, js.Pointer(&ret),
   525  	)
   526  	return
   527  }
   528  
   529  // HasFuncToJSON returns true if the method "LayoutShift.toJSON" exists.
   530  func (this LayoutShift) HasFuncToJSON() bool {
   531  	return js.True == bindings.HasFuncLayoutShiftToJSON(
   532  		this.ref,
   533  	)
   534  }
   535  
   536  // FuncToJSON returns the method "LayoutShift.toJSON".
   537  func (this LayoutShift) FuncToJSON() (fn js.Func[func() js.Object]) {
   538  	bindings.FuncLayoutShiftToJSON(
   539  		this.ref, js.Pointer(&fn),
   540  	)
   541  	return
   542  }
   543  
   544  // ToJSON calls the method "LayoutShift.toJSON".
   545  func (this LayoutShift) ToJSON() (ret js.Object) {
   546  	bindings.CallLayoutShiftToJSON(
   547  		this.ref, js.Pointer(&ret),
   548  	)
   549  
   550  	return
   551  }
   552  
   553  // TryToJSON calls the method "LayoutShift.toJSON"
   554  // in a try/catch block and returns (_, err, ok = false) when it went through
   555  // the catch clause.
   556  func (this LayoutShift) TryToJSON() (ret js.Object, exception js.Any, ok bool) {
   557  	ok = js.True == bindings.TryLayoutShiftToJSON(
   558  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   559  	)
   560  
   561  	return
   562  }
   563  
   564  type LayoutWorkletGlobalScope struct {
   565  	WorkletGlobalScope
   566  }
   567  
   568  func (this LayoutWorkletGlobalScope) Once() LayoutWorkletGlobalScope {
   569  	this.ref.Once()
   570  	return this
   571  }
   572  
   573  func (this LayoutWorkletGlobalScope) Ref() js.Ref {
   574  	return this.WorkletGlobalScope.Ref()
   575  }
   576  
   577  func (this LayoutWorkletGlobalScope) FromRef(ref js.Ref) LayoutWorkletGlobalScope {
   578  	this.WorkletGlobalScope = this.WorkletGlobalScope.FromRef(ref)
   579  	return this
   580  }
   581  
   582  func (this LayoutWorkletGlobalScope) Free() {
   583  	this.ref.Free()
   584  }
   585  
   586  // HasFuncRegisterLayout returns true if the method "LayoutWorkletGlobalScope.registerLayout" exists.
   587  func (this LayoutWorkletGlobalScope) HasFuncRegisterLayout() bool {
   588  	return js.True == bindings.HasFuncLayoutWorkletGlobalScopeRegisterLayout(
   589  		this.ref,
   590  	)
   591  }
   592  
   593  // FuncRegisterLayout returns the method "LayoutWorkletGlobalScope.registerLayout".
   594  func (this LayoutWorkletGlobalScope) FuncRegisterLayout() (fn js.Func[func(name js.String, layoutCtor js.Func[func()])]) {
   595  	bindings.FuncLayoutWorkletGlobalScopeRegisterLayout(
   596  		this.ref, js.Pointer(&fn),
   597  	)
   598  	return
   599  }
   600  
   601  // RegisterLayout calls the method "LayoutWorkletGlobalScope.registerLayout".
   602  func (this LayoutWorkletGlobalScope) RegisterLayout(name js.String, layoutCtor js.Func[func()]) (ret js.Void) {
   603  	bindings.CallLayoutWorkletGlobalScopeRegisterLayout(
   604  		this.ref, js.Pointer(&ret),
   605  		name.Ref(),
   606  		layoutCtor.Ref(),
   607  	)
   608  
   609  	return
   610  }
   611  
   612  // TryRegisterLayout calls the method "LayoutWorkletGlobalScope.registerLayout"
   613  // in a try/catch block and returns (_, err, ok = false) when it went through
   614  // the catch clause.
   615  func (this LayoutWorkletGlobalScope) TryRegisterLayout(name js.String, layoutCtor js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
   616  	ok = js.True == bindings.TryLayoutWorkletGlobalScopeRegisterLayout(
   617  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   618  		name.Ref(),
   619  		layoutCtor.Ref(),
   620  	)
   621  
   622  	return
   623  }
   624  
   625  type LineAlignSetting uint32
   626  
   627  const (
   628  	_ LineAlignSetting = iota
   629  
   630  	LineAlignSetting_START
   631  	LineAlignSetting_CENTER
   632  	LineAlignSetting_END
   633  )
   634  
   635  func (LineAlignSetting) FromRef(str js.Ref) LineAlignSetting {
   636  	return LineAlignSetting(bindings.ConstOfLineAlignSetting(str))
   637  }
   638  
   639  func (x LineAlignSetting) String() (string, bool) {
   640  	switch x {
   641  	case LineAlignSetting_START:
   642  		return "start", true
   643  	case LineAlignSetting_CENTER:
   644  		return "center", true
   645  	case LineAlignSetting_END:
   646  		return "end", true
   647  	default:
   648  		return "", false
   649  	}
   650  }
   651  
   652  type OneOf_Float64_AutoKeyword struct {
   653  	ref js.Ref
   654  }
   655  
   656  func (x OneOf_Float64_AutoKeyword) Ref() js.Ref {
   657  	return x.ref
   658  }
   659  
   660  func (x OneOf_Float64_AutoKeyword) Free() {
   661  	x.ref.Free()
   662  }
   663  
   664  func (x OneOf_Float64_AutoKeyword) FromRef(ref js.Ref) OneOf_Float64_AutoKeyword {
   665  	return OneOf_Float64_AutoKeyword{
   666  		ref: ref,
   667  	}
   668  }
   669  
   670  func (x OneOf_Float64_AutoKeyword) Float64() float64 {
   671  	return js.Number[float64]{}.FromRef(x.ref).Get()
   672  }
   673  
   674  func (x OneOf_Float64_AutoKeyword) AutoKeyword() AutoKeyword {
   675  	return AutoKeyword(0).FromRef(x.ref)
   676  }
   677  
   678  type LineAndPositionSetting = OneOf_Float64_AutoKeyword
   679  
   680  type LinearAccelerationReadingValues struct {
   681  	// X is "LinearAccelerationReadingValues.x"
   682  	//
   683  	// Required
   684  	X float64
   685  	// Y is "LinearAccelerationReadingValues.y"
   686  	//
   687  	// Required
   688  	Y float64
   689  	// Z is "LinearAccelerationReadingValues.z"
   690  	//
   691  	// Required
   692  	Z float64
   693  
   694  	FFI_USE bool
   695  }
   696  
   697  // FromRef calls UpdateFrom and returns a LinearAccelerationReadingValues with all fields set.
   698  func (p LinearAccelerationReadingValues) FromRef(ref js.Ref) LinearAccelerationReadingValues {
   699  	p.UpdateFrom(ref)
   700  	return p
   701  }
   702  
   703  // New creates a new LinearAccelerationReadingValues in the application heap.
   704  func (p LinearAccelerationReadingValues) New() js.Ref {
   705  	return bindings.LinearAccelerationReadingValuesJSLoad(
   706  		js.Pointer(&p), js.True, 0,
   707  	)
   708  }
   709  
   710  // UpdateFrom copies value of all fields of the heap object to p.
   711  func (p *LinearAccelerationReadingValues) UpdateFrom(ref js.Ref) {
   712  	bindings.LinearAccelerationReadingValuesJSStore(
   713  		js.Pointer(p), ref,
   714  	)
   715  }
   716  
   717  // Update writes all fields of the p to the heap object referenced by ref.
   718  func (p *LinearAccelerationReadingValues) Update(ref js.Ref) {
   719  	bindings.LinearAccelerationReadingValuesJSLoad(
   720  		js.Pointer(p), js.False, ref,
   721  	)
   722  }
   723  
   724  // FreeMembers frees fields with heap reference, if recursive is true
   725  // free all heap references reachable from p.
   726  func (p *LinearAccelerationReadingValues) FreeMembers(recursive bool) {
   727  }
   728  
   729  func NewLinearAccelerationSensor(options AccelerometerSensorOptions) (ret LinearAccelerationSensor) {
   730  	ret.ref = bindings.NewLinearAccelerationSensorByLinearAccelerationSensor(
   731  		js.Pointer(&options))
   732  	return
   733  }
   734  
   735  func NewLinearAccelerationSensorByLinearAccelerationSensor1() (ret LinearAccelerationSensor) {
   736  	ret.ref = bindings.NewLinearAccelerationSensorByLinearAccelerationSensor1()
   737  	return
   738  }
   739  
   740  type LinearAccelerationSensor struct {
   741  	Accelerometer
   742  }
   743  
   744  func (this LinearAccelerationSensor) Once() LinearAccelerationSensor {
   745  	this.ref.Once()
   746  	return this
   747  }
   748  
   749  func (this LinearAccelerationSensor) Ref() js.Ref {
   750  	return this.Accelerometer.Ref()
   751  }
   752  
   753  func (this LinearAccelerationSensor) FromRef(ref js.Ref) LinearAccelerationSensor {
   754  	this.Accelerometer = this.Accelerometer.FromRef(ref)
   755  	return this
   756  }
   757  
   758  func (this LinearAccelerationSensor) Free() {
   759  	this.ref.Free()
   760  }
   761  
   762  type MIDIPortType uint32
   763  
   764  const (
   765  	_ MIDIPortType = iota
   766  
   767  	MIDIPortType_INPUT
   768  	MIDIPortType_OUTPUT
   769  )
   770  
   771  func (MIDIPortType) FromRef(str js.Ref) MIDIPortType {
   772  	return MIDIPortType(bindings.ConstOfMIDIPortType(str))
   773  }
   774  
   775  func (x MIDIPortType) String() (string, bool) {
   776  	switch x {
   777  	case MIDIPortType_INPUT:
   778  		return "input", true
   779  	case MIDIPortType_OUTPUT:
   780  		return "output", true
   781  	default:
   782  		return "", false
   783  	}
   784  }
   785  
   786  type MIDIPortDeviceState uint32
   787  
   788  const (
   789  	_ MIDIPortDeviceState = iota
   790  
   791  	MIDIPortDeviceState_DISCONNECTED
   792  	MIDIPortDeviceState_CONNECTED
   793  )
   794  
   795  func (MIDIPortDeviceState) FromRef(str js.Ref) MIDIPortDeviceState {
   796  	return MIDIPortDeviceState(bindings.ConstOfMIDIPortDeviceState(str))
   797  }
   798  
   799  func (x MIDIPortDeviceState) String() (string, bool) {
   800  	switch x {
   801  	case MIDIPortDeviceState_DISCONNECTED:
   802  		return "disconnected", true
   803  	case MIDIPortDeviceState_CONNECTED:
   804  		return "connected", true
   805  	default:
   806  		return "", false
   807  	}
   808  }
   809  
   810  type MIDIPortConnectionState uint32
   811  
   812  const (
   813  	_ MIDIPortConnectionState = iota
   814  
   815  	MIDIPortConnectionState_OPEN
   816  	MIDIPortConnectionState_CLOSED
   817  	MIDIPortConnectionState_PENDING
   818  )
   819  
   820  func (MIDIPortConnectionState) FromRef(str js.Ref) MIDIPortConnectionState {
   821  	return MIDIPortConnectionState(bindings.ConstOfMIDIPortConnectionState(str))
   822  }
   823  
   824  func (x MIDIPortConnectionState) String() (string, bool) {
   825  	switch x {
   826  	case MIDIPortConnectionState_OPEN:
   827  		return "open", true
   828  	case MIDIPortConnectionState_CLOSED:
   829  		return "closed", true
   830  	case MIDIPortConnectionState_PENDING:
   831  		return "pending", true
   832  	default:
   833  		return "", false
   834  	}
   835  }
   836  
   837  type MIDIPort struct {
   838  	EventTarget
   839  }
   840  
   841  func (this MIDIPort) Once() MIDIPort {
   842  	this.ref.Once()
   843  	return this
   844  }
   845  
   846  func (this MIDIPort) Ref() js.Ref {
   847  	return this.EventTarget.Ref()
   848  }
   849  
   850  func (this MIDIPort) FromRef(ref js.Ref) MIDIPort {
   851  	this.EventTarget = this.EventTarget.FromRef(ref)
   852  	return this
   853  }
   854  
   855  func (this MIDIPort) Free() {
   856  	this.ref.Free()
   857  }
   858  
   859  // Id returns the value of property "MIDIPort.id".
   860  //
   861  // It returns ok=false if there is no such property.
   862  func (this MIDIPort) Id() (ret js.String, ok bool) {
   863  	ok = js.True == bindings.GetMIDIPortId(
   864  		this.ref, js.Pointer(&ret),
   865  	)
   866  	return
   867  }
   868  
   869  // Manufacturer returns the value of property "MIDIPort.manufacturer".
   870  //
   871  // It returns ok=false if there is no such property.
   872  func (this MIDIPort) Manufacturer() (ret js.String, ok bool) {
   873  	ok = js.True == bindings.GetMIDIPortManufacturer(
   874  		this.ref, js.Pointer(&ret),
   875  	)
   876  	return
   877  }
   878  
   879  // Name returns the value of property "MIDIPort.name".
   880  //
   881  // It returns ok=false if there is no such property.
   882  func (this MIDIPort) Name() (ret js.String, ok bool) {
   883  	ok = js.True == bindings.GetMIDIPortName(
   884  		this.ref, js.Pointer(&ret),
   885  	)
   886  	return
   887  }
   888  
   889  // Type returns the value of property "MIDIPort.type".
   890  //
   891  // It returns ok=false if there is no such property.
   892  func (this MIDIPort) Type() (ret MIDIPortType, ok bool) {
   893  	ok = js.True == bindings.GetMIDIPortType(
   894  		this.ref, js.Pointer(&ret),
   895  	)
   896  	return
   897  }
   898  
   899  // Version returns the value of property "MIDIPort.version".
   900  //
   901  // It returns ok=false if there is no such property.
   902  func (this MIDIPort) Version() (ret js.String, ok bool) {
   903  	ok = js.True == bindings.GetMIDIPortVersion(
   904  		this.ref, js.Pointer(&ret),
   905  	)
   906  	return
   907  }
   908  
   909  // State returns the value of property "MIDIPort.state".
   910  //
   911  // It returns ok=false if there is no such property.
   912  func (this MIDIPort) State() (ret MIDIPortDeviceState, ok bool) {
   913  	ok = js.True == bindings.GetMIDIPortState(
   914  		this.ref, js.Pointer(&ret),
   915  	)
   916  	return
   917  }
   918  
   919  // Connection returns the value of property "MIDIPort.connection".
   920  //
   921  // It returns ok=false if there is no such property.
   922  func (this MIDIPort) Connection() (ret MIDIPortConnectionState, ok bool) {
   923  	ok = js.True == bindings.GetMIDIPortConnection(
   924  		this.ref, js.Pointer(&ret),
   925  	)
   926  	return
   927  }
   928  
   929  // HasFuncOpen returns true if the method "MIDIPort.open" exists.
   930  func (this MIDIPort) HasFuncOpen() bool {
   931  	return js.True == bindings.HasFuncMIDIPortOpen(
   932  		this.ref,
   933  	)
   934  }
   935  
   936  // FuncOpen returns the method "MIDIPort.open".
   937  func (this MIDIPort) FuncOpen() (fn js.Func[func() js.Promise[MIDIPort]]) {
   938  	bindings.FuncMIDIPortOpen(
   939  		this.ref, js.Pointer(&fn),
   940  	)
   941  	return
   942  }
   943  
   944  // Open calls the method "MIDIPort.open".
   945  func (this MIDIPort) Open() (ret js.Promise[MIDIPort]) {
   946  	bindings.CallMIDIPortOpen(
   947  		this.ref, js.Pointer(&ret),
   948  	)
   949  
   950  	return
   951  }
   952  
   953  // TryOpen calls the method "MIDIPort.open"
   954  // in a try/catch block and returns (_, err, ok = false) when it went through
   955  // the catch clause.
   956  func (this MIDIPort) TryOpen() (ret js.Promise[MIDIPort], exception js.Any, ok bool) {
   957  	ok = js.True == bindings.TryMIDIPortOpen(
   958  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   959  	)
   960  
   961  	return
   962  }
   963  
   964  // HasFuncClose returns true if the method "MIDIPort.close" exists.
   965  func (this MIDIPort) HasFuncClose() bool {
   966  	return js.True == bindings.HasFuncMIDIPortClose(
   967  		this.ref,
   968  	)
   969  }
   970  
   971  // FuncClose returns the method "MIDIPort.close".
   972  func (this MIDIPort) FuncClose() (fn js.Func[func() js.Promise[MIDIPort]]) {
   973  	bindings.FuncMIDIPortClose(
   974  		this.ref, js.Pointer(&fn),
   975  	)
   976  	return
   977  }
   978  
   979  // Close calls the method "MIDIPort.close".
   980  func (this MIDIPort) Close() (ret js.Promise[MIDIPort]) {
   981  	bindings.CallMIDIPortClose(
   982  		this.ref, js.Pointer(&ret),
   983  	)
   984  
   985  	return
   986  }
   987  
   988  // TryClose calls the method "MIDIPort.close"
   989  // in a try/catch block and returns (_, err, ok = false) when it went through
   990  // the catch clause.
   991  func (this MIDIPort) TryClose() (ret js.Promise[MIDIPort], exception js.Any, ok bool) {
   992  	ok = js.True == bindings.TryMIDIPortClose(
   993  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
   994  	)
   995  
   996  	return
   997  }
   998  
   999  type MIDIConnectionEventInit struct {
  1000  	// Port is "MIDIConnectionEventInit.port"
  1001  	//
  1002  	// Optional
  1003  	Port MIDIPort
  1004  	// Bubbles is "MIDIConnectionEventInit.bubbles"
  1005  	//
  1006  	// Optional, defaults to false.
  1007  	//
  1008  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  1009  	Bubbles bool
  1010  	// Cancelable is "MIDIConnectionEventInit.cancelable"
  1011  	//
  1012  	// Optional, defaults to false.
  1013  	//
  1014  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  1015  	Cancelable bool
  1016  	// Composed is "MIDIConnectionEventInit.composed"
  1017  	//
  1018  	// Optional, defaults to false.
  1019  	//
  1020  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  1021  	Composed bool
  1022  
  1023  	FFI_USE_Bubbles    bool // for Bubbles.
  1024  	FFI_USE_Cancelable bool // for Cancelable.
  1025  	FFI_USE_Composed   bool // for Composed.
  1026  
  1027  	FFI_USE bool
  1028  }
  1029  
  1030  // FromRef calls UpdateFrom and returns a MIDIConnectionEventInit with all fields set.
  1031  func (p MIDIConnectionEventInit) FromRef(ref js.Ref) MIDIConnectionEventInit {
  1032  	p.UpdateFrom(ref)
  1033  	return p
  1034  }
  1035  
  1036  // New creates a new MIDIConnectionEventInit in the application heap.
  1037  func (p MIDIConnectionEventInit) New() js.Ref {
  1038  	return bindings.MIDIConnectionEventInitJSLoad(
  1039  		js.Pointer(&p), js.True, 0,
  1040  	)
  1041  }
  1042  
  1043  // UpdateFrom copies value of all fields of the heap object to p.
  1044  func (p *MIDIConnectionEventInit) UpdateFrom(ref js.Ref) {
  1045  	bindings.MIDIConnectionEventInitJSStore(
  1046  		js.Pointer(p), ref,
  1047  	)
  1048  }
  1049  
  1050  // Update writes all fields of the p to the heap object referenced by ref.
  1051  func (p *MIDIConnectionEventInit) Update(ref js.Ref) {
  1052  	bindings.MIDIConnectionEventInitJSLoad(
  1053  		js.Pointer(p), js.False, ref,
  1054  	)
  1055  }
  1056  
  1057  // FreeMembers frees fields with heap reference, if recursive is true
  1058  // free all heap references reachable from p.
  1059  func (p *MIDIConnectionEventInit) FreeMembers(recursive bool) {
  1060  	js.Free(
  1061  		p.Port.Ref(),
  1062  	)
  1063  	p.Port = p.Port.FromRef(js.Undefined)
  1064  }
  1065  
  1066  func NewMIDIConnectionEvent(typ js.String, eventInitDict MIDIConnectionEventInit) (ret MIDIConnectionEvent) {
  1067  	ret.ref = bindings.NewMIDIConnectionEventByMIDIConnectionEvent(
  1068  		typ.Ref(),
  1069  		js.Pointer(&eventInitDict))
  1070  	return
  1071  }
  1072  
  1073  func NewMIDIConnectionEventByMIDIConnectionEvent1(typ js.String) (ret MIDIConnectionEvent) {
  1074  	ret.ref = bindings.NewMIDIConnectionEventByMIDIConnectionEvent1(
  1075  		typ.Ref())
  1076  	return
  1077  }
  1078  
  1079  type MIDIConnectionEvent struct {
  1080  	Event
  1081  }
  1082  
  1083  func (this MIDIConnectionEvent) Once() MIDIConnectionEvent {
  1084  	this.ref.Once()
  1085  	return this
  1086  }
  1087  
  1088  func (this MIDIConnectionEvent) Ref() js.Ref {
  1089  	return this.Event.Ref()
  1090  }
  1091  
  1092  func (this MIDIConnectionEvent) FromRef(ref js.Ref) MIDIConnectionEvent {
  1093  	this.Event = this.Event.FromRef(ref)
  1094  	return this
  1095  }
  1096  
  1097  func (this MIDIConnectionEvent) Free() {
  1098  	this.ref.Free()
  1099  }
  1100  
  1101  // Port returns the value of property "MIDIConnectionEvent.port".
  1102  //
  1103  // It returns ok=false if there is no such property.
  1104  func (this MIDIConnectionEvent) Port() (ret MIDIPort, ok bool) {
  1105  	ok = js.True == bindings.GetMIDIConnectionEventPort(
  1106  		this.ref, js.Pointer(&ret),
  1107  	)
  1108  	return
  1109  }
  1110  
  1111  type MIDIInput struct {
  1112  	MIDIPort
  1113  }
  1114  
  1115  func (this MIDIInput) Once() MIDIInput {
  1116  	this.ref.Once()
  1117  	return this
  1118  }
  1119  
  1120  func (this MIDIInput) Ref() js.Ref {
  1121  	return this.MIDIPort.Ref()
  1122  }
  1123  
  1124  func (this MIDIInput) FromRef(ref js.Ref) MIDIInput {
  1125  	this.MIDIPort = this.MIDIPort.FromRef(ref)
  1126  	return this
  1127  }
  1128  
  1129  func (this MIDIInput) Free() {
  1130  	this.ref.Free()
  1131  }
  1132  
  1133  type MIDIMessageEventInit struct {
  1134  	// Data is "MIDIMessageEventInit.data"
  1135  	//
  1136  	// Optional
  1137  	Data js.TypedArray[uint8]
  1138  	// Bubbles is "MIDIMessageEventInit.bubbles"
  1139  	//
  1140  	// Optional, defaults to false.
  1141  	//
  1142  	// NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective.
  1143  	Bubbles bool
  1144  	// Cancelable is "MIDIMessageEventInit.cancelable"
  1145  	//
  1146  	// Optional, defaults to false.
  1147  	//
  1148  	// NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective.
  1149  	Cancelable bool
  1150  	// Composed is "MIDIMessageEventInit.composed"
  1151  	//
  1152  	// Optional, defaults to false.
  1153  	//
  1154  	// NOTE: FFI_USE_Composed MUST be set to true to make this field effective.
  1155  	Composed bool
  1156  
  1157  	FFI_USE_Bubbles    bool // for Bubbles.
  1158  	FFI_USE_Cancelable bool // for Cancelable.
  1159  	FFI_USE_Composed   bool // for Composed.
  1160  
  1161  	FFI_USE bool
  1162  }
  1163  
  1164  // FromRef calls UpdateFrom and returns a MIDIMessageEventInit with all fields set.
  1165  func (p MIDIMessageEventInit) FromRef(ref js.Ref) MIDIMessageEventInit {
  1166  	p.UpdateFrom(ref)
  1167  	return p
  1168  }
  1169  
  1170  // New creates a new MIDIMessageEventInit in the application heap.
  1171  func (p MIDIMessageEventInit) New() js.Ref {
  1172  	return bindings.MIDIMessageEventInitJSLoad(
  1173  		js.Pointer(&p), js.True, 0,
  1174  	)
  1175  }
  1176  
  1177  // UpdateFrom copies value of all fields of the heap object to p.
  1178  func (p *MIDIMessageEventInit) UpdateFrom(ref js.Ref) {
  1179  	bindings.MIDIMessageEventInitJSStore(
  1180  		js.Pointer(p), ref,
  1181  	)
  1182  }
  1183  
  1184  // Update writes all fields of the p to the heap object referenced by ref.
  1185  func (p *MIDIMessageEventInit) Update(ref js.Ref) {
  1186  	bindings.MIDIMessageEventInitJSLoad(
  1187  		js.Pointer(p), js.False, ref,
  1188  	)
  1189  }
  1190  
  1191  // FreeMembers frees fields with heap reference, if recursive is true
  1192  // free all heap references reachable from p.
  1193  func (p *MIDIMessageEventInit) FreeMembers(recursive bool) {
  1194  	js.Free(
  1195  		p.Data.Ref(),
  1196  	)
  1197  	p.Data = p.Data.FromRef(js.Undefined)
  1198  }
  1199  
  1200  func NewMIDIMessageEvent(typ js.String, eventInitDict MIDIMessageEventInit) (ret MIDIMessageEvent) {
  1201  	ret.ref = bindings.NewMIDIMessageEventByMIDIMessageEvent(
  1202  		typ.Ref(),
  1203  		js.Pointer(&eventInitDict))
  1204  	return
  1205  }
  1206  
  1207  func NewMIDIMessageEventByMIDIMessageEvent1(typ js.String) (ret MIDIMessageEvent) {
  1208  	ret.ref = bindings.NewMIDIMessageEventByMIDIMessageEvent1(
  1209  		typ.Ref())
  1210  	return
  1211  }
  1212  
  1213  type MIDIMessageEvent struct {
  1214  	Event
  1215  }
  1216  
  1217  func (this MIDIMessageEvent) Once() MIDIMessageEvent {
  1218  	this.ref.Once()
  1219  	return this
  1220  }
  1221  
  1222  func (this MIDIMessageEvent) Ref() js.Ref {
  1223  	return this.Event.Ref()
  1224  }
  1225  
  1226  func (this MIDIMessageEvent) FromRef(ref js.Ref) MIDIMessageEvent {
  1227  	this.Event = this.Event.FromRef(ref)
  1228  	return this
  1229  }
  1230  
  1231  func (this MIDIMessageEvent) Free() {
  1232  	this.ref.Free()
  1233  }
  1234  
  1235  // Data returns the value of property "MIDIMessageEvent.data".
  1236  //
  1237  // It returns ok=false if there is no such property.
  1238  func (this MIDIMessageEvent) Data() (ret js.TypedArray[uint8], ok bool) {
  1239  	ok = js.True == bindings.GetMIDIMessageEventData(
  1240  		this.ref, js.Pointer(&ret),
  1241  	)
  1242  	return
  1243  }
  1244  
  1245  type MIDIOutput struct {
  1246  	MIDIPort
  1247  }
  1248  
  1249  func (this MIDIOutput) Once() MIDIOutput {
  1250  	this.ref.Once()
  1251  	return this
  1252  }
  1253  
  1254  func (this MIDIOutput) Ref() js.Ref {
  1255  	return this.MIDIPort.Ref()
  1256  }
  1257  
  1258  func (this MIDIOutput) FromRef(ref js.Ref) MIDIOutput {
  1259  	this.MIDIPort = this.MIDIPort.FromRef(ref)
  1260  	return this
  1261  }
  1262  
  1263  func (this MIDIOutput) Free() {
  1264  	this.ref.Free()
  1265  }
  1266  
  1267  // HasFuncSend returns true if the method "MIDIOutput.send" exists.
  1268  func (this MIDIOutput) HasFuncSend() bool {
  1269  	return js.True == bindings.HasFuncMIDIOutputSend(
  1270  		this.ref,
  1271  	)
  1272  }
  1273  
  1274  // FuncSend returns the method "MIDIOutput.send".
  1275  func (this MIDIOutput) FuncSend() (fn js.Func[func(data js.Array[uint8], timestamp DOMHighResTimeStamp)]) {
  1276  	bindings.FuncMIDIOutputSend(
  1277  		this.ref, js.Pointer(&fn),
  1278  	)
  1279  	return
  1280  }
  1281  
  1282  // Send calls the method "MIDIOutput.send".
  1283  func (this MIDIOutput) Send(data js.Array[uint8], timestamp DOMHighResTimeStamp) (ret js.Void) {
  1284  	bindings.CallMIDIOutputSend(
  1285  		this.ref, js.Pointer(&ret),
  1286  		data.Ref(),
  1287  		float64(timestamp),
  1288  	)
  1289  
  1290  	return
  1291  }
  1292  
  1293  // TrySend calls the method "MIDIOutput.send"
  1294  // in a try/catch block and returns (_, err, ok = false) when it went through
  1295  // the catch clause.
  1296  func (this MIDIOutput) TrySend(data js.Array[uint8], timestamp DOMHighResTimeStamp) (ret js.Void, exception js.Any, ok bool) {
  1297  	ok = js.True == bindings.TryMIDIOutputSend(
  1298  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1299  		data.Ref(),
  1300  		float64(timestamp),
  1301  	)
  1302  
  1303  	return
  1304  }
  1305  
  1306  // HasFuncSend1 returns true if the method "MIDIOutput.send" exists.
  1307  func (this MIDIOutput) HasFuncSend1() bool {
  1308  	return js.True == bindings.HasFuncMIDIOutputSend1(
  1309  		this.ref,
  1310  	)
  1311  }
  1312  
  1313  // FuncSend1 returns the method "MIDIOutput.send".
  1314  func (this MIDIOutput) FuncSend1() (fn js.Func[func(data js.Array[uint8])]) {
  1315  	bindings.FuncMIDIOutputSend1(
  1316  		this.ref, js.Pointer(&fn),
  1317  	)
  1318  	return
  1319  }
  1320  
  1321  // Send1 calls the method "MIDIOutput.send".
  1322  func (this MIDIOutput) Send1(data js.Array[uint8]) (ret js.Void) {
  1323  	bindings.CallMIDIOutputSend1(
  1324  		this.ref, js.Pointer(&ret),
  1325  		data.Ref(),
  1326  	)
  1327  
  1328  	return
  1329  }
  1330  
  1331  // TrySend1 calls the method "MIDIOutput.send"
  1332  // in a try/catch block and returns (_, err, ok = false) when it went through
  1333  // the catch clause.
  1334  func (this MIDIOutput) TrySend1(data js.Array[uint8]) (ret js.Void, exception js.Any, ok bool) {
  1335  	ok = js.True == bindings.TryMIDIOutputSend1(
  1336  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1337  		data.Ref(),
  1338  	)
  1339  
  1340  	return
  1341  }
  1342  
  1343  // HasFuncClear returns true if the method "MIDIOutput.clear" exists.
  1344  func (this MIDIOutput) HasFuncClear() bool {
  1345  	return js.True == bindings.HasFuncMIDIOutputClear(
  1346  		this.ref,
  1347  	)
  1348  }
  1349  
  1350  // FuncClear returns the method "MIDIOutput.clear".
  1351  func (this MIDIOutput) FuncClear() (fn js.Func[func()]) {
  1352  	bindings.FuncMIDIOutputClear(
  1353  		this.ref, js.Pointer(&fn),
  1354  	)
  1355  	return
  1356  }
  1357  
  1358  // Clear calls the method "MIDIOutput.clear".
  1359  func (this MIDIOutput) Clear() (ret js.Void) {
  1360  	bindings.CallMIDIOutputClear(
  1361  		this.ref, js.Pointer(&ret),
  1362  	)
  1363  
  1364  	return
  1365  }
  1366  
  1367  // TryClear calls the method "MIDIOutput.clear"
  1368  // in a try/catch block and returns (_, err, ok = false) when it went through
  1369  // the catch clause.
  1370  func (this MIDIOutput) TryClear() (ret js.Void, exception js.Any, ok bool) {
  1371  	ok = js.True == bindings.TryMIDIOutputClear(
  1372  		this.ref, js.Pointer(&ret), js.Pointer(&exception),
  1373  	)
  1374  
  1375  	return
  1376  }
  1377  
  1378  type MLActivation struct {
  1379  	ref js.Ref
  1380  }
  1381  
  1382  func (this MLActivation) Once() MLActivation {
  1383  	this.ref.Once()
  1384  	return this
  1385  }
  1386  
  1387  func (this MLActivation) Ref() js.Ref {
  1388  	return this.ref
  1389  }
  1390  
  1391  func (this MLActivation) FromRef(ref js.Ref) MLActivation {
  1392  	this.ref = ref
  1393  	return this
  1394  }
  1395  
  1396  func (this MLActivation) Free() {
  1397  	this.ref.Free()
  1398  }
  1399  
  1400  type MLAutoPad uint32
  1401  
  1402  const (
  1403  	_ MLAutoPad = iota
  1404  
  1405  	MLAutoPad_EXPLICIT
  1406  	MLAutoPad_SAME_UPPER
  1407  	MLAutoPad_SAME_LOWER
  1408  )
  1409  
  1410  func (MLAutoPad) FromRef(str js.Ref) MLAutoPad {
  1411  	return MLAutoPad(bindings.ConstOfMLAutoPad(str))
  1412  }
  1413  
  1414  func (x MLAutoPad) String() (string, bool) {
  1415  	switch x {
  1416  	case MLAutoPad_EXPLICIT:
  1417  		return "explicit", true
  1418  	case MLAutoPad_SAME_UPPER:
  1419  		return "same-upper", true
  1420  	case MLAutoPad_SAME_LOWER:
  1421  		return "same-lower", true
  1422  	default:
  1423  		return "", false
  1424  	}
  1425  }
  1426  
  1427  type MLOperand struct {
  1428  	ref js.Ref
  1429  }
  1430  
  1431  func (this MLOperand) Once() MLOperand {
  1432  	this.ref.Once()
  1433  	return this
  1434  }
  1435  
  1436  func (this MLOperand) Ref() js.Ref {
  1437  	return this.ref
  1438  }
  1439  
  1440  func (this MLOperand) FromRef(ref js.Ref) MLOperand {
  1441  	this.ref = ref
  1442  	return this
  1443  }
  1444  
  1445  func (this MLOperand) Free() {
  1446  	this.ref.Free()
  1447  }
  1448  
  1449  type MLBatchNormalizationOptions struct {
  1450  	// Scale is "MLBatchNormalizationOptions.scale"
  1451  	//
  1452  	// Optional
  1453  	Scale MLOperand
  1454  	// Bias is "MLBatchNormalizationOptions.bias"
  1455  	//
  1456  	// Optional
  1457  	Bias MLOperand
  1458  	// Axis is "MLBatchNormalizationOptions.axis"
  1459  	//
  1460  	// Optional, defaults to 1.
  1461  	//
  1462  	// NOTE: FFI_USE_Axis MUST be set to true to make this field effective.
  1463  	Axis uint32
  1464  	// Epsilon is "MLBatchNormalizationOptions.epsilon"
  1465  	//
  1466  	// Optional, defaults to 1e-5.
  1467  	//
  1468  	// NOTE: FFI_USE_Epsilon MUST be set to true to make this field effective.
  1469  	Epsilon float32
  1470  	// Activation is "MLBatchNormalizationOptions.activation"
  1471  	//
  1472  	// Optional
  1473  	Activation MLActivation
  1474  
  1475  	FFI_USE_Axis    bool // for Axis.
  1476  	FFI_USE_Epsilon bool // for Epsilon.
  1477  
  1478  	FFI_USE bool
  1479  }
  1480  
  1481  // FromRef calls UpdateFrom and returns a MLBatchNormalizationOptions with all fields set.
  1482  func (p MLBatchNormalizationOptions) FromRef(ref js.Ref) MLBatchNormalizationOptions {
  1483  	p.UpdateFrom(ref)
  1484  	return p
  1485  }
  1486  
  1487  // New creates a new MLBatchNormalizationOptions in the application heap.
  1488  func (p MLBatchNormalizationOptions) New() js.Ref {
  1489  	return bindings.MLBatchNormalizationOptionsJSLoad(
  1490  		js.Pointer(&p), js.True, 0,
  1491  	)
  1492  }
  1493  
  1494  // UpdateFrom copies value of all fields of the heap object to p.
  1495  func (p *MLBatchNormalizationOptions) UpdateFrom(ref js.Ref) {
  1496  	bindings.MLBatchNormalizationOptionsJSStore(
  1497  		js.Pointer(p), ref,
  1498  	)
  1499  }
  1500  
  1501  // Update writes all fields of the p to the heap object referenced by ref.
  1502  func (p *MLBatchNormalizationOptions) Update(ref js.Ref) {
  1503  	bindings.MLBatchNormalizationOptionsJSLoad(
  1504  		js.Pointer(p), js.False, ref,
  1505  	)
  1506  }
  1507  
  1508  // FreeMembers frees fields with heap reference, if recursive is true
  1509  // free all heap references reachable from p.
  1510  func (p *MLBatchNormalizationOptions) FreeMembers(recursive bool) {
  1511  	js.Free(
  1512  		p.Scale.Ref(),
  1513  		p.Bias.Ref(),
  1514  		p.Activation.Ref(),
  1515  	)
  1516  	p.Scale = p.Scale.FromRef(js.Undefined)
  1517  	p.Bias = p.Bias.FromRef(js.Undefined)
  1518  	p.Activation = p.Activation.FromRef(js.Undefined)
  1519  }
  1520  
  1521  type MLBufferResourceView struct {
  1522  	// Resource is "MLBufferResourceView.resource"
  1523  	//
  1524  	// Required
  1525  	Resource GPUBuffer
  1526  	// Offset is "MLBufferResourceView.offset"
  1527  	//
  1528  	// Optional, defaults to 0.
  1529  	//
  1530  	// NOTE: FFI_USE_Offset MUST be set to true to make this field effective.
  1531  	Offset uint64
  1532  	// Size is "MLBufferResourceView.size"
  1533  	//
  1534  	// Optional
  1535  	//
  1536  	// NOTE: FFI_USE_Size MUST be set to true to make this field effective.
  1537  	Size uint64
  1538  
  1539  	FFI_USE_Offset bool // for Offset.
  1540  	FFI_USE_Size   bool // for Size.
  1541  
  1542  	FFI_USE bool
  1543  }
  1544  
  1545  // FromRef calls UpdateFrom and returns a MLBufferResourceView with all fields set.
  1546  func (p MLBufferResourceView) FromRef(ref js.Ref) MLBufferResourceView {
  1547  	p.UpdateFrom(ref)
  1548  	return p
  1549  }
  1550  
  1551  // New creates a new MLBufferResourceView in the application heap.
  1552  func (p MLBufferResourceView) New() js.Ref {
  1553  	return bindings.MLBufferResourceViewJSLoad(
  1554  		js.Pointer(&p), js.True, 0,
  1555  	)
  1556  }
  1557  
  1558  // UpdateFrom copies value of all fields of the heap object to p.
  1559  func (p *MLBufferResourceView) UpdateFrom(ref js.Ref) {
  1560  	bindings.MLBufferResourceViewJSStore(
  1561  		js.Pointer(p), ref,
  1562  	)
  1563  }
  1564  
  1565  // Update writes all fields of the p to the heap object referenced by ref.
  1566  func (p *MLBufferResourceView) Update(ref js.Ref) {
  1567  	bindings.MLBufferResourceViewJSLoad(
  1568  		js.Pointer(p), js.False, ref,
  1569  	)
  1570  }
  1571  
  1572  // FreeMembers frees fields with heap reference, if recursive is true
  1573  // free all heap references reachable from p.
  1574  func (p *MLBufferResourceView) FreeMembers(recursive bool) {
  1575  	js.Free(
  1576  		p.Resource.Ref(),
  1577  	)
  1578  	p.Resource = p.Resource.FromRef(js.Undefined)
  1579  }
  1580  
  1581  type OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView struct {
  1582  	ref js.Ref
  1583  }
  1584  
  1585  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) Ref() js.Ref {
  1586  	return x.ref
  1587  }
  1588  
  1589  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) Free() {
  1590  	x.ref.Free()
  1591  }
  1592  
  1593  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) FromRef(ref js.Ref) OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView {
  1594  	return OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView{
  1595  		ref: ref,
  1596  	}
  1597  }
  1598  
  1599  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayInt8() js.TypedArray[int8] {
  1600  	return js.TypedArray[int8]{}.FromRef(x.ref)
  1601  }
  1602  
  1603  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayInt16() js.TypedArray[int16] {
  1604  	return js.TypedArray[int16]{}.FromRef(x.ref)
  1605  }
  1606  
  1607  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayInt32() js.TypedArray[int32] {
  1608  	return js.TypedArray[int32]{}.FromRef(x.ref)
  1609  }
  1610  
  1611  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayUint8() js.TypedArray[uint8] {
  1612  	return js.TypedArray[uint8]{}.FromRef(x.ref)
  1613  }
  1614  
  1615  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayUint16() js.TypedArray[uint16] {
  1616  	return js.TypedArray[uint16]{}.FromRef(x.ref)
  1617  }
  1618  
  1619  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayUint32() js.TypedArray[uint32] {
  1620  	return js.TypedArray[uint32]{}.FromRef(x.ref)
  1621  }
  1622  
  1623  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayInt64() js.TypedArray[int64] {
  1624  	return js.TypedArray[int64]{}.FromRef(x.ref)
  1625  }
  1626  
  1627  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayUint64() js.TypedArray[uint64] {
  1628  	return js.TypedArray[uint64]{}.FromRef(x.ref)
  1629  }
  1630  
  1631  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayFloat32() js.TypedArray[float32] {
  1632  	return js.TypedArray[float32]{}.FromRef(x.ref)
  1633  }
  1634  
  1635  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) TypedArrayFloat64() js.TypedArray[float64] {
  1636  	return js.TypedArray[float64]{}.FromRef(x.ref)
  1637  }
  1638  
  1639  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) DataView() js.DataView {
  1640  	return js.DataView{}.FromRef(x.ref)
  1641  }
  1642  
  1643  func (x OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView) MLBufferResourceView() MLBufferResourceView {
  1644  	var ret MLBufferResourceView
  1645  	ret.UpdateFrom(x.ref)
  1646  	return ret
  1647  }
  1648  
  1649  type MLBufferView = OneOf_TypedArrayInt8_TypedArrayInt16_TypedArrayInt32_TypedArrayUint8_TypedArrayUint16_TypedArrayUint32_TypedArrayInt64_TypedArrayUint64_TypedArrayFloat32_TypedArrayFloat64_DataView_MLBufferResourceView
  1650  
  1651  type MLClampOptions struct {
  1652  	// MinValue is "MLClampOptions.minValue"
  1653  	//
  1654  	// Optional
  1655  	//
  1656  	// NOTE: FFI_USE_MinValue MUST be set to true to make this field effective.
  1657  	MinValue float32
  1658  	// MaxValue is "MLClampOptions.maxValue"
  1659  	//
  1660  	// Optional
  1661  	//
  1662  	// NOTE: FFI_USE_MaxValue MUST be set to true to make this field effective.
  1663  	MaxValue float32
  1664  
  1665  	FFI_USE_MinValue bool // for MinValue.
  1666  	FFI_USE_MaxValue bool // for MaxValue.
  1667  
  1668  	FFI_USE bool
  1669  }
  1670  
  1671  // FromRef calls UpdateFrom and returns a MLClampOptions with all fields set.
  1672  func (p MLClampOptions) FromRef(ref js.Ref) MLClampOptions {
  1673  	p.UpdateFrom(ref)
  1674  	return p
  1675  }
  1676  
  1677  // New creates a new MLClampOptions in the application heap.
  1678  func (p MLClampOptions) New() js.Ref {
  1679  	return bindings.MLClampOptionsJSLoad(
  1680  		js.Pointer(&p), js.True, 0,
  1681  	)
  1682  }
  1683  
  1684  // UpdateFrom copies value of all fields of the heap object to p.
  1685  func (p *MLClampOptions) UpdateFrom(ref js.Ref) {
  1686  	bindings.MLClampOptionsJSStore(
  1687  		js.Pointer(p), ref,
  1688  	)
  1689  }
  1690  
  1691  // Update writes all fields of the p to the heap object referenced by ref.
  1692  func (p *MLClampOptions) Update(ref js.Ref) {
  1693  	bindings.MLClampOptionsJSLoad(
  1694  		js.Pointer(p), js.False, ref,
  1695  	)
  1696  }
  1697  
  1698  // FreeMembers frees fields with heap reference, if recursive is true
  1699  // free all heap references reachable from p.
  1700  func (p *MLClampOptions) FreeMembers(recursive bool) {
  1701  }
  1702  
  1703  type MLConv2dFilterOperandLayout uint32
  1704  
  1705  const (
  1706  	_ MLConv2dFilterOperandLayout = iota
  1707  
  1708  	MLConv2dFilterOperandLayout_OIHW
  1709  	MLConv2dFilterOperandLayout_HWIO
  1710  	MLConv2dFilterOperandLayout_OHWI
  1711  	MLConv2dFilterOperandLayout_IHWO
  1712  )
  1713  
  1714  func (MLConv2dFilterOperandLayout) FromRef(str js.Ref) MLConv2dFilterOperandLayout {
  1715  	return MLConv2dFilterOperandLayout(bindings.ConstOfMLConv2dFilterOperandLayout(str))
  1716  }
  1717  
  1718  func (x MLConv2dFilterOperandLayout) String() (string, bool) {
  1719  	switch x {
  1720  	case MLConv2dFilterOperandLayout_OIHW:
  1721  		return "oihw", true
  1722  	case MLConv2dFilterOperandLayout_HWIO:
  1723  		return "hwio", true
  1724  	case MLConv2dFilterOperandLayout_OHWI:
  1725  		return "ohwi", true
  1726  	case MLConv2dFilterOperandLayout_IHWO:
  1727  		return "ihwo", true
  1728  	default:
  1729  		return "", false
  1730  	}
  1731  }
  1732  
  1733  type MLInputOperandLayout uint32
  1734  
  1735  const (
  1736  	_ MLInputOperandLayout = iota
  1737  
  1738  	MLInputOperandLayout_NCHW
  1739  	MLInputOperandLayout_NHWC
  1740  )
  1741  
  1742  func (MLInputOperandLayout) FromRef(str js.Ref) MLInputOperandLayout {
  1743  	return MLInputOperandLayout(bindings.ConstOfMLInputOperandLayout(str))
  1744  }
  1745  
  1746  func (x MLInputOperandLayout) String() (string, bool) {
  1747  	switch x {
  1748  	case MLInputOperandLayout_NCHW:
  1749  		return "nchw", true
  1750  	case MLInputOperandLayout_NHWC:
  1751  		return "nhwc", true
  1752  	default:
  1753  		return "", false
  1754  	}
  1755  }
  1756  
  1757  type MLConv2dOptions struct {
  1758  	// Padding is "MLConv2dOptions.padding"
  1759  	//
  1760  	// Optional
  1761  	Padding js.Array[uint32]
  1762  	// Strides is "MLConv2dOptions.strides"
  1763  	//
  1764  	// Optional
  1765  	Strides js.Array[uint32]
  1766  	// Dilations is "MLConv2dOptions.dilations"
  1767  	//
  1768  	// Optional
  1769  	Dilations js.Array[uint32]
  1770  	// AutoPad is "MLConv2dOptions.autoPad"
  1771  	//
  1772  	// Optional, defaults to "explicit".
  1773  	AutoPad MLAutoPad
  1774  	// Groups is "MLConv2dOptions.groups"
  1775  	//
  1776  	// Optional, defaults to 1.
  1777  	//
  1778  	// NOTE: FFI_USE_Groups MUST be set to true to make this field effective.
  1779  	Groups uint32
  1780  	// InputLayout is "MLConv2dOptions.inputLayout"
  1781  	//
  1782  	// Optional, defaults to "nchw".
  1783  	InputLayout MLInputOperandLayout
  1784  	// FilterLayout is "MLConv2dOptions.filterLayout"
  1785  	//
  1786  	// Optional, defaults to "oihw".
  1787  	FilterLayout MLConv2dFilterOperandLayout
  1788  	// Bias is "MLConv2dOptions.bias"
  1789  	//
  1790  	// Optional
  1791  	Bias MLOperand
  1792  	// Activation is "MLConv2dOptions.activation"
  1793  	//
  1794  	// Optional
  1795  	Activation MLActivation
  1796  
  1797  	FFI_USE_Groups bool // for Groups.
  1798  
  1799  	FFI_USE bool
  1800  }
  1801  
  1802  // FromRef calls UpdateFrom and returns a MLConv2dOptions with all fields set.
  1803  func (p MLConv2dOptions) FromRef(ref js.Ref) MLConv2dOptions {
  1804  	p.UpdateFrom(ref)
  1805  	return p
  1806  }
  1807  
  1808  // New creates a new MLConv2dOptions in the application heap.
  1809  func (p MLConv2dOptions) New() js.Ref {
  1810  	return bindings.MLConv2dOptionsJSLoad(
  1811  		js.Pointer(&p), js.True, 0,
  1812  	)
  1813  }
  1814  
  1815  // UpdateFrom copies value of all fields of the heap object to p.
  1816  func (p *MLConv2dOptions) UpdateFrom(ref js.Ref) {
  1817  	bindings.MLConv2dOptionsJSStore(
  1818  		js.Pointer(p), ref,
  1819  	)
  1820  }
  1821  
  1822  // Update writes all fields of the p to the heap object referenced by ref.
  1823  func (p *MLConv2dOptions) Update(ref js.Ref) {
  1824  	bindings.MLConv2dOptionsJSLoad(
  1825  		js.Pointer(p), js.False, ref,
  1826  	)
  1827  }
  1828  
  1829  // FreeMembers frees fields with heap reference, if recursive is true
  1830  // free all heap references reachable from p.
  1831  func (p *MLConv2dOptions) FreeMembers(recursive bool) {
  1832  	js.Free(
  1833  		p.Padding.Ref(),
  1834  		p.Strides.Ref(),
  1835  		p.Dilations.Ref(),
  1836  		p.Bias.Ref(),
  1837  		p.Activation.Ref(),
  1838  	)
  1839  	p.Padding = p.Padding.FromRef(js.Undefined)
  1840  	p.Strides = p.Strides.FromRef(js.Undefined)
  1841  	p.Dilations = p.Dilations.FromRef(js.Undefined)
  1842  	p.Bias = p.Bias.FromRef(js.Undefined)
  1843  	p.Activation = p.Activation.FromRef(js.Undefined)
  1844  }
  1845  
  1846  type MLConvTranspose2dFilterOperandLayout uint32
  1847  
  1848  const (
  1849  	_ MLConvTranspose2dFilterOperandLayout = iota
  1850  
  1851  	MLConvTranspose2dFilterOperandLayout_IOHW
  1852  	MLConvTranspose2dFilterOperandLayout_HWOI
  1853  	MLConvTranspose2dFilterOperandLayout_OHWI
  1854  )
  1855  
  1856  func (MLConvTranspose2dFilterOperandLayout) FromRef(str js.Ref) MLConvTranspose2dFilterOperandLayout {
  1857  	return MLConvTranspose2dFilterOperandLayout(bindings.ConstOfMLConvTranspose2dFilterOperandLayout(str))
  1858  }
  1859  
  1860  func (x MLConvTranspose2dFilterOperandLayout) String() (string, bool) {
  1861  	switch x {
  1862  	case MLConvTranspose2dFilterOperandLayout_IOHW:
  1863  		return "iohw", true
  1864  	case MLConvTranspose2dFilterOperandLayout_HWOI:
  1865  		return "hwoi", true
  1866  	case MLConvTranspose2dFilterOperandLayout_OHWI:
  1867  		return "ohwi", true
  1868  	default:
  1869  		return "", false
  1870  	}
  1871  }
  1872  
  1873  type MLConvTranspose2dOptions struct {
  1874  	// Padding is "MLConvTranspose2dOptions.padding"
  1875  	//
  1876  	// Optional
  1877  	Padding js.Array[uint32]
  1878  	// Strides is "MLConvTranspose2dOptions.strides"
  1879  	//
  1880  	// Optional
  1881  	Strides js.Array[uint32]
  1882  	// Dilations is "MLConvTranspose2dOptions.dilations"
  1883  	//
  1884  	// Optional
  1885  	Dilations js.Array[uint32]
  1886  	// OutputPadding is "MLConvTranspose2dOptions.outputPadding"
  1887  	//
  1888  	// Optional
  1889  	OutputPadding js.Array[uint32]
  1890  	// OutputSizes is "MLConvTranspose2dOptions.outputSizes"
  1891  	//
  1892  	// Optional
  1893  	OutputSizes js.Array[uint32]
  1894  	// AutoPad is "MLConvTranspose2dOptions.autoPad"
  1895  	//
  1896  	// Optional, defaults to "explicit".
  1897  	AutoPad MLAutoPad
  1898  	// Groups is "MLConvTranspose2dOptions.groups"
  1899  	//
  1900  	// Optional, defaults to 1.
  1901  	//
  1902  	// NOTE: FFI_USE_Groups MUST be set to true to make this field effective.
  1903  	Groups uint32
  1904  	// InputLayout is "MLConvTranspose2dOptions.inputLayout"
  1905  	//
  1906  	// Optional, defaults to "nchw".
  1907  	InputLayout MLInputOperandLayout
  1908  	// FilterLayout is "MLConvTranspose2dOptions.filterLayout"
  1909  	//
  1910  	// Optional, defaults to "iohw".
  1911  	FilterLayout MLConvTranspose2dFilterOperandLayout
  1912  	// Bias is "MLConvTranspose2dOptions.bias"
  1913  	//
  1914  	// Optional
  1915  	Bias MLOperand
  1916  	// Activation is "MLConvTranspose2dOptions.activation"
  1917  	//
  1918  	// Optional
  1919  	Activation MLActivation
  1920  
  1921  	FFI_USE_Groups bool // for Groups.
  1922  
  1923  	FFI_USE bool
  1924  }
  1925  
  1926  // FromRef calls UpdateFrom and returns a MLConvTranspose2dOptions with all fields set.
  1927  func (p MLConvTranspose2dOptions) FromRef(ref js.Ref) MLConvTranspose2dOptions {
  1928  	p.UpdateFrom(ref)
  1929  	return p
  1930  }
  1931  
  1932  // New creates a new MLConvTranspose2dOptions in the application heap.
  1933  func (p MLConvTranspose2dOptions) New() js.Ref {
  1934  	return bindings.MLConvTranspose2dOptionsJSLoad(
  1935  		js.Pointer(&p), js.True, 0,
  1936  	)
  1937  }
  1938  
  1939  // UpdateFrom copies value of all fields of the heap object to p.
  1940  func (p *MLConvTranspose2dOptions) UpdateFrom(ref js.Ref) {
  1941  	bindings.MLConvTranspose2dOptionsJSStore(
  1942  		js.Pointer(p), ref,
  1943  	)
  1944  }
  1945  
  1946  // Update writes all fields of the p to the heap object referenced by ref.
  1947  func (p *MLConvTranspose2dOptions) Update(ref js.Ref) {
  1948  	bindings.MLConvTranspose2dOptionsJSLoad(
  1949  		js.Pointer(p), js.False, ref,
  1950  	)
  1951  }
  1952  
  1953  // FreeMembers frees fields with heap reference, if recursive is true
  1954  // free all heap references reachable from p.
  1955  func (p *MLConvTranspose2dOptions) FreeMembers(recursive bool) {
  1956  	js.Free(
  1957  		p.Padding.Ref(),
  1958  		p.Strides.Ref(),
  1959  		p.Dilations.Ref(),
  1960  		p.OutputPadding.Ref(),
  1961  		p.OutputSizes.Ref(),
  1962  		p.Bias.Ref(),
  1963  		p.Activation.Ref(),
  1964  	)
  1965  	p.Padding = p.Padding.FromRef(js.Undefined)
  1966  	p.Strides = p.Strides.FromRef(js.Undefined)
  1967  	p.Dilations = p.Dilations.FromRef(js.Undefined)
  1968  	p.OutputPadding = p.OutputPadding.FromRef(js.Undefined)
  1969  	p.OutputSizes = p.OutputSizes.FromRef(js.Undefined)
  1970  	p.Bias = p.Bias.FromRef(js.Undefined)
  1971  	p.Activation = p.Activation.FromRef(js.Undefined)
  1972  }
  1973  
  1974  type MLEluOptions struct {
  1975  	// Alpha is "MLEluOptions.alpha"
  1976  	//
  1977  	// Optional, defaults to 1.
  1978  	//
  1979  	// NOTE: FFI_USE_Alpha MUST be set to true to make this field effective.
  1980  	Alpha float32
  1981  
  1982  	FFI_USE_Alpha bool // for Alpha.
  1983  
  1984  	FFI_USE bool
  1985  }
  1986  
  1987  // FromRef calls UpdateFrom and returns a MLEluOptions with all fields set.
  1988  func (p MLEluOptions) FromRef(ref js.Ref) MLEluOptions {
  1989  	p.UpdateFrom(ref)
  1990  	return p
  1991  }
  1992  
  1993  // New creates a new MLEluOptions in the application heap.
  1994  func (p MLEluOptions) New() js.Ref {
  1995  	return bindings.MLEluOptionsJSLoad(
  1996  		js.Pointer(&p), js.True, 0,
  1997  	)
  1998  }
  1999  
  2000  // UpdateFrom copies value of all fields of the heap object to p.
  2001  func (p *MLEluOptions) UpdateFrom(ref js.Ref) {
  2002  	bindings.MLEluOptionsJSStore(
  2003  		js.Pointer(p), ref,
  2004  	)
  2005  }
  2006  
  2007  // Update writes all fields of the p to the heap object referenced by ref.
  2008  func (p *MLEluOptions) Update(ref js.Ref) {
  2009  	bindings.MLEluOptionsJSLoad(
  2010  		js.Pointer(p), js.False, ref,
  2011  	)
  2012  }
  2013  
  2014  // FreeMembers frees fields with heap reference, if recursive is true
  2015  // free all heap references reachable from p.
  2016  func (p *MLEluOptions) FreeMembers(recursive bool) {
  2017  }
  2018  
  2019  type MLGemmOptions struct {
  2020  	// C is "MLGemmOptions.c"
  2021  	//
  2022  	// Optional
  2023  	C MLOperand
  2024  	// Alpha is "MLGemmOptions.alpha"
  2025  	//
  2026  	// Optional, defaults to 1.0.
  2027  	//
  2028  	// NOTE: FFI_USE_Alpha MUST be set to true to make this field effective.
  2029  	Alpha float32
  2030  	// Beta is "MLGemmOptions.beta"
  2031  	//
  2032  	// Optional, defaults to 1.0.
  2033  	//
  2034  	// NOTE: FFI_USE_Beta MUST be set to true to make this field effective.
  2035  	Beta float32
  2036  	// ATranspose is "MLGemmOptions.aTranspose"
  2037  	//
  2038  	// Optional, defaults to false.
  2039  	//
  2040  	// NOTE: FFI_USE_ATranspose MUST be set to true to make this field effective.
  2041  	ATranspose bool
  2042  	// BTranspose is "MLGemmOptions.bTranspose"
  2043  	//
  2044  	// Optional, defaults to false.
  2045  	//
  2046  	// NOTE: FFI_USE_BTranspose MUST be set to true to make this field effective.
  2047  	BTranspose bool
  2048  
  2049  	FFI_USE_Alpha      bool // for Alpha.
  2050  	FFI_USE_Beta       bool // for Beta.
  2051  	FFI_USE_ATranspose bool // for ATranspose.
  2052  	FFI_USE_BTranspose bool // for BTranspose.
  2053  
  2054  	FFI_USE bool
  2055  }
  2056  
  2057  // FromRef calls UpdateFrom and returns a MLGemmOptions with all fields set.
  2058  func (p MLGemmOptions) FromRef(ref js.Ref) MLGemmOptions {
  2059  	p.UpdateFrom(ref)
  2060  	return p
  2061  }
  2062  
  2063  // New creates a new MLGemmOptions in the application heap.
  2064  func (p MLGemmOptions) New() js.Ref {
  2065  	return bindings.MLGemmOptionsJSLoad(
  2066  		js.Pointer(&p), js.True, 0,
  2067  	)
  2068  }
  2069  
  2070  // UpdateFrom copies value of all fields of the heap object to p.
  2071  func (p *MLGemmOptions) UpdateFrom(ref js.Ref) {
  2072  	bindings.MLGemmOptionsJSStore(
  2073  		js.Pointer(p), ref,
  2074  	)
  2075  }
  2076  
  2077  // Update writes all fields of the p to the heap object referenced by ref.
  2078  func (p *MLGemmOptions) Update(ref js.Ref) {
  2079  	bindings.MLGemmOptionsJSLoad(
  2080  		js.Pointer(p), js.False, ref,
  2081  	)
  2082  }
  2083  
  2084  // FreeMembers frees fields with heap reference, if recursive is true
  2085  // free all heap references reachable from p.
  2086  func (p *MLGemmOptions) FreeMembers(recursive bool) {
  2087  	js.Free(
  2088  		p.C.Ref(),
  2089  	)
  2090  	p.C = p.C.FromRef(js.Undefined)
  2091  }
  2092  
  2093  type MLOperandType uint32