github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/sessions/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/sessions store_Session 20 //go:noescape 21 func SessionJSStore( 22 ptr unsafe.Pointer, ref js.Ref) 23 24 //go:wasmimport plat/js/webext/sessions load_Session 25 //go:noescape 26 func SessionJSLoad( 27 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 28 29 //go:wasmimport plat/js/webext/sessions store_Device 30 //go:noescape 31 func DeviceJSStore( 32 ptr unsafe.Pointer, ref js.Ref) 33 34 //go:wasmimport plat/js/webext/sessions load_Device 35 //go:noescape 36 func DeviceJSLoad( 37 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 38 39 //go:wasmimport plat/js/webext/sessions store_Filter 40 //go:noescape 41 func FilterJSStore( 42 ptr unsafe.Pointer, ref js.Ref) 43 44 //go:wasmimport plat/js/webext/sessions load_Filter 45 //go:noescape 46 func FilterJSLoad( 47 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 48 49 //go:wasmimport plat/js/webext/sessions get_MAX_SESSION_RESULTS 50 //go:noescape 51 func GetMAX_SESSION_RESULTS(retPtr unsafe.Pointer) js.Ref 52 53 //go:wasmimport plat/js/webext/sessions set_MAX_SESSION_RESULTS 54 //go:noescape 55 func SetMAX_SESSION_RESULTS( 56 val js.Ref) js.Ref 57 58 //go:wasmimport plat/js/webext/sessions has_GetDevices 59 //go:noescape 60 func HasFuncGetDevices() js.Ref 61 62 //go:wasmimport plat/js/webext/sessions func_GetDevices 63 //go:noescape 64 func FuncGetDevices(fn unsafe.Pointer) 65 66 //go:wasmimport plat/js/webext/sessions call_GetDevices 67 //go:noescape 68 func CallGetDevices( 69 retPtr unsafe.Pointer, 70 filter unsafe.Pointer) 71 72 //go:wasmimport plat/js/webext/sessions try_GetDevices 73 //go:noescape 74 func TryGetDevices( 75 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 76 filter unsafe.Pointer) (ok js.Ref) 77 78 //go:wasmimport plat/js/webext/sessions has_GetRecentlyClosed 79 //go:noescape 80 func HasFuncGetRecentlyClosed() js.Ref 81 82 //go:wasmimport plat/js/webext/sessions func_GetRecentlyClosed 83 //go:noescape 84 func FuncGetRecentlyClosed(fn unsafe.Pointer) 85 86 //go:wasmimport plat/js/webext/sessions call_GetRecentlyClosed 87 //go:noescape 88 func CallGetRecentlyClosed( 89 retPtr unsafe.Pointer, 90 filter unsafe.Pointer) 91 92 //go:wasmimport plat/js/webext/sessions try_GetRecentlyClosed 93 //go:noescape 94 func TryGetRecentlyClosed( 95 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 96 filter unsafe.Pointer) (ok js.Ref) 97 98 //go:wasmimport plat/js/webext/sessions has_OnChanged 99 //go:noescape 100 func HasFuncOnChanged() js.Ref 101 102 //go:wasmimport plat/js/webext/sessions func_OnChanged 103 //go:noescape 104 func FuncOnChanged(fn unsafe.Pointer) 105 106 //go:wasmimport plat/js/webext/sessions call_OnChanged 107 //go:noescape 108 func CallOnChanged( 109 retPtr unsafe.Pointer, 110 callback js.Ref) 111 112 //go:wasmimport plat/js/webext/sessions try_OnChanged 113 //go:noescape 114 func TryOnChanged( 115 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 116 callback js.Ref) (ok js.Ref) 117 118 //go:wasmimport plat/js/webext/sessions has_OffChanged 119 //go:noescape 120 func HasFuncOffChanged() js.Ref 121 122 //go:wasmimport plat/js/webext/sessions func_OffChanged 123 //go:noescape 124 func FuncOffChanged(fn unsafe.Pointer) 125 126 //go:wasmimport plat/js/webext/sessions call_OffChanged 127 //go:noescape 128 func CallOffChanged( 129 retPtr unsafe.Pointer, 130 callback js.Ref) 131 132 //go:wasmimport plat/js/webext/sessions try_OffChanged 133 //go:noescape 134 func TryOffChanged( 135 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 136 callback js.Ref) (ok js.Ref) 137 138 //go:wasmimport plat/js/webext/sessions has_HasOnChanged 139 //go:noescape 140 func HasFuncHasOnChanged() js.Ref 141 142 //go:wasmimport plat/js/webext/sessions func_HasOnChanged 143 //go:noescape 144 func FuncHasOnChanged(fn unsafe.Pointer) 145 146 //go:wasmimport plat/js/webext/sessions call_HasOnChanged 147 //go:noescape 148 func CallHasOnChanged( 149 retPtr unsafe.Pointer, 150 callback js.Ref) 151 152 //go:wasmimport plat/js/webext/sessions try_HasOnChanged 153 //go:noescape 154 func TryHasOnChanged( 155 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 156 callback js.Ref) (ok js.Ref) 157 158 //go:wasmimport plat/js/webext/sessions has_Restore 159 //go:noescape 160 func HasFuncRestore() js.Ref 161 162 //go:wasmimport plat/js/webext/sessions func_Restore 163 //go:noescape 164 func FuncRestore(fn unsafe.Pointer) 165 166 //go:wasmimport plat/js/webext/sessions call_Restore 167 //go:noescape 168 func CallRestore( 169 retPtr unsafe.Pointer, 170 sessionId js.Ref) 171 172 //go:wasmimport plat/js/webext/sessions try_Restore 173 //go:noescape 174 func TryRestore( 175 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 176 sessionId js.Ref) (ok js.Ref)