github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/hid/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/hid store_HidConnectInfo 20 //go:noescape 21 func HidConnectInfoJSStore( 22 ptr unsafe.Pointer, ref js.Ref) 23 24 //go:wasmimport plat/js/webext/hid load_HidConnectInfo 25 //go:noescape 26 func HidConnectInfoJSLoad( 27 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 28 29 //go:wasmimport plat/js/webext/hid store_DeviceFilter 30 //go:noescape 31 func DeviceFilterJSStore( 32 ptr unsafe.Pointer, ref js.Ref) 33 34 //go:wasmimport plat/js/webext/hid load_DeviceFilter 35 //go:noescape 36 func DeviceFilterJSLoad( 37 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 38 39 //go:wasmimport plat/js/webext/hid store_HidCollectionInfo 40 //go:noescape 41 func HidCollectionInfoJSStore( 42 ptr unsafe.Pointer, ref js.Ref) 43 44 //go:wasmimport plat/js/webext/hid load_HidCollectionInfo 45 //go:noescape 46 func HidCollectionInfoJSLoad( 47 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 48 49 //go:wasmimport plat/js/webext/hid store_HidDeviceInfo 50 //go:noescape 51 func HidDeviceInfoJSStore( 52 ptr unsafe.Pointer, ref js.Ref) 53 54 //go:wasmimport plat/js/webext/hid load_HidDeviceInfo 55 //go:noescape 56 func HidDeviceInfoJSLoad( 57 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 58 59 //go:wasmimport plat/js/webext/hid store_GetDevicesOptions 60 //go:noescape 61 func GetDevicesOptionsJSStore( 62 ptr unsafe.Pointer, ref js.Ref) 63 64 //go:wasmimport plat/js/webext/hid load_GetDevicesOptions 65 //go:noescape 66 func GetDevicesOptionsJSLoad( 67 ptr unsafe.Pointer, create, ref js.Ref) js.Ref 68 69 //go:wasmimport plat/js/webext/hid has_Connect 70 //go:noescape 71 func HasFuncConnect() js.Ref 72 73 //go:wasmimport plat/js/webext/hid func_Connect 74 //go:noescape 75 func FuncConnect(fn unsafe.Pointer) 76 77 //go:wasmimport plat/js/webext/hid call_Connect 78 //go:noescape 79 func CallConnect( 80 retPtr unsafe.Pointer, 81 deviceId int32) 82 83 //go:wasmimport plat/js/webext/hid try_Connect 84 //go:noescape 85 func TryConnect( 86 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 87 deviceId int32) (ok js.Ref) 88 89 //go:wasmimport plat/js/webext/hid has_Disconnect 90 //go:noescape 91 func HasFuncDisconnect() js.Ref 92 93 //go:wasmimport plat/js/webext/hid func_Disconnect 94 //go:noescape 95 func FuncDisconnect(fn unsafe.Pointer) 96 97 //go:wasmimport plat/js/webext/hid call_Disconnect 98 //go:noescape 99 func CallDisconnect( 100 retPtr unsafe.Pointer, 101 connectionId int32) 102 103 //go:wasmimport plat/js/webext/hid try_Disconnect 104 //go:noescape 105 func TryDisconnect( 106 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 107 connectionId int32) (ok js.Ref) 108 109 //go:wasmimport plat/js/webext/hid has_GetDevices 110 //go:noescape 111 func HasFuncGetDevices() js.Ref 112 113 //go:wasmimport plat/js/webext/hid func_GetDevices 114 //go:noescape 115 func FuncGetDevices(fn unsafe.Pointer) 116 117 //go:wasmimport plat/js/webext/hid call_GetDevices 118 //go:noescape 119 func CallGetDevices( 120 retPtr unsafe.Pointer, 121 options unsafe.Pointer) 122 123 //go:wasmimport plat/js/webext/hid try_GetDevices 124 //go:noescape 125 func TryGetDevices( 126 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 127 options unsafe.Pointer) (ok js.Ref) 128 129 //go:wasmimport plat/js/webext/hid has_OnDeviceAdded 130 //go:noescape 131 func HasFuncOnDeviceAdded() js.Ref 132 133 //go:wasmimport plat/js/webext/hid func_OnDeviceAdded 134 //go:noescape 135 func FuncOnDeviceAdded(fn unsafe.Pointer) 136 137 //go:wasmimport plat/js/webext/hid call_OnDeviceAdded 138 //go:noescape 139 func CallOnDeviceAdded( 140 retPtr unsafe.Pointer, 141 callback js.Ref) 142 143 //go:wasmimport plat/js/webext/hid try_OnDeviceAdded 144 //go:noescape 145 func TryOnDeviceAdded( 146 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 147 callback js.Ref) (ok js.Ref) 148 149 //go:wasmimport plat/js/webext/hid has_OffDeviceAdded 150 //go:noescape 151 func HasFuncOffDeviceAdded() js.Ref 152 153 //go:wasmimport plat/js/webext/hid func_OffDeviceAdded 154 //go:noescape 155 func FuncOffDeviceAdded(fn unsafe.Pointer) 156 157 //go:wasmimport plat/js/webext/hid call_OffDeviceAdded 158 //go:noescape 159 func CallOffDeviceAdded( 160 retPtr unsafe.Pointer, 161 callback js.Ref) 162 163 //go:wasmimport plat/js/webext/hid try_OffDeviceAdded 164 //go:noescape 165 func TryOffDeviceAdded( 166 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 167 callback js.Ref) (ok js.Ref) 168 169 //go:wasmimport plat/js/webext/hid has_HasOnDeviceAdded 170 //go:noescape 171 func HasFuncHasOnDeviceAdded() js.Ref 172 173 //go:wasmimport plat/js/webext/hid func_HasOnDeviceAdded 174 //go:noescape 175 func FuncHasOnDeviceAdded(fn unsafe.Pointer) 176 177 //go:wasmimport plat/js/webext/hid call_HasOnDeviceAdded 178 //go:noescape 179 func CallHasOnDeviceAdded( 180 retPtr unsafe.Pointer, 181 callback js.Ref) 182 183 //go:wasmimport plat/js/webext/hid try_HasOnDeviceAdded 184 //go:noescape 185 func TryHasOnDeviceAdded( 186 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 187 callback js.Ref) (ok js.Ref) 188 189 //go:wasmimport plat/js/webext/hid has_OnDeviceRemoved 190 //go:noescape 191 func HasFuncOnDeviceRemoved() js.Ref 192 193 //go:wasmimport plat/js/webext/hid func_OnDeviceRemoved 194 //go:noescape 195 func FuncOnDeviceRemoved(fn unsafe.Pointer) 196 197 //go:wasmimport plat/js/webext/hid call_OnDeviceRemoved 198 //go:noescape 199 func CallOnDeviceRemoved( 200 retPtr unsafe.Pointer, 201 callback js.Ref) 202 203 //go:wasmimport plat/js/webext/hid try_OnDeviceRemoved 204 //go:noescape 205 func TryOnDeviceRemoved( 206 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 207 callback js.Ref) (ok js.Ref) 208 209 //go:wasmimport plat/js/webext/hid has_OffDeviceRemoved 210 //go:noescape 211 func HasFuncOffDeviceRemoved() js.Ref 212 213 //go:wasmimport plat/js/webext/hid func_OffDeviceRemoved 214 //go:noescape 215 func FuncOffDeviceRemoved(fn unsafe.Pointer) 216 217 //go:wasmimport plat/js/webext/hid call_OffDeviceRemoved 218 //go:noescape 219 func CallOffDeviceRemoved( 220 retPtr unsafe.Pointer, 221 callback js.Ref) 222 223 //go:wasmimport plat/js/webext/hid try_OffDeviceRemoved 224 //go:noescape 225 func TryOffDeviceRemoved( 226 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 227 callback js.Ref) (ok js.Ref) 228 229 //go:wasmimport plat/js/webext/hid has_HasOnDeviceRemoved 230 //go:noescape 231 func HasFuncHasOnDeviceRemoved() js.Ref 232 233 //go:wasmimport plat/js/webext/hid func_HasOnDeviceRemoved 234 //go:noescape 235 func FuncHasOnDeviceRemoved(fn unsafe.Pointer) 236 237 //go:wasmimport plat/js/webext/hid call_HasOnDeviceRemoved 238 //go:noescape 239 func CallHasOnDeviceRemoved( 240 retPtr unsafe.Pointer, 241 callback js.Ref) 242 243 //go:wasmimport plat/js/webext/hid try_HasOnDeviceRemoved 244 //go:noescape 245 func TryHasOnDeviceRemoved( 246 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 247 callback js.Ref) (ok js.Ref) 248 249 //go:wasmimport plat/js/webext/hid has_Receive 250 //go:noescape 251 func HasFuncReceive() js.Ref 252 253 //go:wasmimport plat/js/webext/hid func_Receive 254 //go:noescape 255 func FuncReceive(fn unsafe.Pointer) 256 257 //go:wasmimport plat/js/webext/hid call_Receive 258 //go:noescape 259 func CallReceive( 260 retPtr unsafe.Pointer, 261 connectionId int32, 262 callback js.Ref) 263 264 //go:wasmimport plat/js/webext/hid try_Receive 265 //go:noescape 266 func TryReceive( 267 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 268 connectionId int32, 269 callback js.Ref) (ok js.Ref) 270 271 //go:wasmimport plat/js/webext/hid has_ReceiveFeatureReport 272 //go:noescape 273 func HasFuncReceiveFeatureReport() js.Ref 274 275 //go:wasmimport plat/js/webext/hid func_ReceiveFeatureReport 276 //go:noescape 277 func FuncReceiveFeatureReport(fn unsafe.Pointer) 278 279 //go:wasmimport plat/js/webext/hid call_ReceiveFeatureReport 280 //go:noescape 281 func CallReceiveFeatureReport( 282 retPtr unsafe.Pointer, 283 connectionId int32, 284 reportId int32) 285 286 //go:wasmimport plat/js/webext/hid try_ReceiveFeatureReport 287 //go:noescape 288 func TryReceiveFeatureReport( 289 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 290 connectionId int32, 291 reportId int32) (ok js.Ref) 292 293 //go:wasmimport plat/js/webext/hid has_Send 294 //go:noescape 295 func HasFuncSend() js.Ref 296 297 //go:wasmimport plat/js/webext/hid func_Send 298 //go:noescape 299 func FuncSend(fn unsafe.Pointer) 300 301 //go:wasmimport plat/js/webext/hid call_Send 302 //go:noescape 303 func CallSend( 304 retPtr unsafe.Pointer, 305 connectionId int32, 306 reportId int32, 307 data js.Ref) 308 309 //go:wasmimport plat/js/webext/hid try_Send 310 //go:noescape 311 func TrySend( 312 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 313 connectionId int32, 314 reportId int32, 315 data js.Ref) (ok js.Ref) 316 317 //go:wasmimport plat/js/webext/hid has_SendFeatureReport 318 //go:noescape 319 func HasFuncSendFeatureReport() js.Ref 320 321 //go:wasmimport plat/js/webext/hid func_SendFeatureReport 322 //go:noescape 323 func FuncSendFeatureReport(fn unsafe.Pointer) 324 325 //go:wasmimport plat/js/webext/hid call_SendFeatureReport 326 //go:noescape 327 func CallSendFeatureReport( 328 retPtr unsafe.Pointer, 329 connectionId int32, 330 reportId int32, 331 data js.Ref) 332 333 //go:wasmimport plat/js/webext/hid try_SendFeatureReport 334 //go:noescape 335 func TrySendFeatureReport( 336 retPtr unsafe.Pointer, errPtr unsafe.Pointer, 337 connectionId int32, 338 reportId int32, 339 data js.Ref) (ok js.Ref)