github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/idle/bindings/import_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  //go:build wasm
     5  
     6  package bindings
     7  
     8  import (
     9  	"unsafe"
    10  
    11  	"github.com/primecitizens/pcz/std/ffi/js"
    12  )
    13  
    14  type (
    15  	_ unsafe.Pointer
    16  	_ js.Ref
    17  )
    18  
    19  //go:wasmimport plat/js/webext/idle constof_IdleState
    20  //go:noescape
    21  func ConstOfIdleState(str js.Ref) uint32
    22  
    23  //go:wasmimport plat/js/webext/idle has_GetAutoLockDelay
    24  //go:noescape
    25  func HasFuncGetAutoLockDelay() js.Ref
    26  
    27  //go:wasmimport plat/js/webext/idle func_GetAutoLockDelay
    28  //go:noescape
    29  func FuncGetAutoLockDelay(fn unsafe.Pointer)
    30  
    31  //go:wasmimport plat/js/webext/idle call_GetAutoLockDelay
    32  //go:noescape
    33  func CallGetAutoLockDelay(
    34  	retPtr unsafe.Pointer)
    35  
    36  //go:wasmimport plat/js/webext/idle try_GetAutoLockDelay
    37  //go:noescape
    38  func TryGetAutoLockDelay(
    39  	retPtr unsafe.Pointer, errPtr unsafe.Pointer) (ok js.Ref)
    40  
    41  //go:wasmimport plat/js/webext/idle has_OnStateChanged
    42  //go:noescape
    43  func HasFuncOnStateChanged() js.Ref
    44  
    45  //go:wasmimport plat/js/webext/idle func_OnStateChanged
    46  //go:noescape
    47  func FuncOnStateChanged(fn unsafe.Pointer)
    48  
    49  //go:wasmimport plat/js/webext/idle call_OnStateChanged
    50  //go:noescape
    51  func CallOnStateChanged(
    52  	retPtr unsafe.Pointer,
    53  	callback js.Ref)
    54  
    55  //go:wasmimport plat/js/webext/idle try_OnStateChanged
    56  //go:noescape
    57  func TryOnStateChanged(
    58  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    59  	callback js.Ref) (ok js.Ref)
    60  
    61  //go:wasmimport plat/js/webext/idle has_OffStateChanged
    62  //go:noescape
    63  func HasFuncOffStateChanged() js.Ref
    64  
    65  //go:wasmimport plat/js/webext/idle func_OffStateChanged
    66  //go:noescape
    67  func FuncOffStateChanged(fn unsafe.Pointer)
    68  
    69  //go:wasmimport plat/js/webext/idle call_OffStateChanged
    70  //go:noescape
    71  func CallOffStateChanged(
    72  	retPtr unsafe.Pointer,
    73  	callback js.Ref)
    74  
    75  //go:wasmimport plat/js/webext/idle try_OffStateChanged
    76  //go:noescape
    77  func TryOffStateChanged(
    78  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    79  	callback js.Ref) (ok js.Ref)
    80  
    81  //go:wasmimport plat/js/webext/idle has_HasOnStateChanged
    82  //go:noescape
    83  func HasFuncHasOnStateChanged() js.Ref
    84  
    85  //go:wasmimport plat/js/webext/idle func_HasOnStateChanged
    86  //go:noescape
    87  func FuncHasOnStateChanged(fn unsafe.Pointer)
    88  
    89  //go:wasmimport plat/js/webext/idle call_HasOnStateChanged
    90  //go:noescape
    91  func CallHasOnStateChanged(
    92  	retPtr unsafe.Pointer,
    93  	callback js.Ref)
    94  
    95  //go:wasmimport plat/js/webext/idle try_HasOnStateChanged
    96  //go:noescape
    97  func TryHasOnStateChanged(
    98  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    99  	callback js.Ref) (ok js.Ref)
   100  
   101  //go:wasmimport plat/js/webext/idle has_QueryState
   102  //go:noescape
   103  func HasFuncQueryState() js.Ref
   104  
   105  //go:wasmimport plat/js/webext/idle func_QueryState
   106  //go:noescape
   107  func FuncQueryState(fn unsafe.Pointer)
   108  
   109  //go:wasmimport plat/js/webext/idle call_QueryState
   110  //go:noescape
   111  func CallQueryState(
   112  	retPtr unsafe.Pointer,
   113  	detectionIntervalInSeconds float64)
   114  
   115  //go:wasmimport plat/js/webext/idle try_QueryState
   116  //go:noescape
   117  func TryQueryState(
   118  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
   119  	detectionIntervalInSeconds float64) (ok js.Ref)
   120  
   121  //go:wasmimport plat/js/webext/idle has_SetDetectionInterval
   122  //go:noescape
   123  func HasFuncSetDetectionInterval() js.Ref
   124  
   125  //go:wasmimport plat/js/webext/idle func_SetDetectionInterval
   126  //go:noescape
   127  func FuncSetDetectionInterval(fn unsafe.Pointer)
   128  
   129  //go:wasmimport plat/js/webext/idle call_SetDetectionInterval
   130  //go:noescape
   131  func CallSetDetectionInterval(
   132  	retPtr unsafe.Pointer,
   133  	intervalInSeconds float64)
   134  
   135  //go:wasmimport plat/js/webext/idle try_SetDetectionInterval
   136  //go:noescape
   137  func TrySetDetectionInterval(
   138  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
   139  	intervalInSeconds float64) (ok js.Ref)