github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/power/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/power constof_Level
    20  //go:noescape
    21  func ConstOfLevel(str js.Ref) uint32
    22  
    23  //go:wasmimport plat/js/webext/power has_ReleaseKeepAwake
    24  //go:noescape
    25  func HasFuncReleaseKeepAwake() js.Ref
    26  
    27  //go:wasmimport plat/js/webext/power func_ReleaseKeepAwake
    28  //go:noescape
    29  func FuncReleaseKeepAwake(fn unsafe.Pointer)
    30  
    31  //go:wasmimport plat/js/webext/power call_ReleaseKeepAwake
    32  //go:noescape
    33  func CallReleaseKeepAwake(
    34  	retPtr unsafe.Pointer)
    35  
    36  //go:wasmimport plat/js/webext/power try_ReleaseKeepAwake
    37  //go:noescape
    38  func TryReleaseKeepAwake(
    39  	retPtr unsafe.Pointer, errPtr unsafe.Pointer) (ok js.Ref)
    40  
    41  //go:wasmimport plat/js/webext/power has_ReportActivity
    42  //go:noescape
    43  func HasFuncReportActivity() js.Ref
    44  
    45  //go:wasmimport plat/js/webext/power func_ReportActivity
    46  //go:noescape
    47  func FuncReportActivity(fn unsafe.Pointer)
    48  
    49  //go:wasmimport plat/js/webext/power call_ReportActivity
    50  //go:noescape
    51  func CallReportActivity(
    52  	retPtr unsafe.Pointer)
    53  
    54  //go:wasmimport plat/js/webext/power try_ReportActivity
    55  //go:noescape
    56  func TryReportActivity(
    57  	retPtr unsafe.Pointer, errPtr unsafe.Pointer) (ok js.Ref)
    58  
    59  //go:wasmimport plat/js/webext/power has_RequestKeepAwake
    60  //go:noescape
    61  func HasFuncRequestKeepAwake() js.Ref
    62  
    63  //go:wasmimport plat/js/webext/power func_RequestKeepAwake
    64  //go:noescape
    65  func FuncRequestKeepAwake(fn unsafe.Pointer)
    66  
    67  //go:wasmimport plat/js/webext/power call_RequestKeepAwake
    68  //go:noescape
    69  func CallRequestKeepAwake(
    70  	retPtr unsafe.Pointer,
    71  	level uint32)
    72  
    73  //go:wasmimport plat/js/webext/power try_RequestKeepAwake
    74  //go:noescape
    75  func TryRequestKeepAwake(
    76  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    77  	level uint32) (ok js.Ref)