idlize
22 строки · 626.0 Байт
1import { int32 } from "@koalaui/common"2import { pointer } from "@koalaui/interop"3import { Finalizable } from "./Finalizable"4import { nativeModule } from "@koalaui/arkoala";5
6export class NativePeerNode extends Finalizable {7}
8
9export class PeerNode {10peer: NativePeerNode11constructor(type: number, flags: int32) {12const id = 0 // TODO: use id13const ptr = nativeModule()._CreateNode(type, id, flags)14this.peer = new NativePeerNode(ptr, getNodeFinalizer())15}16applyAttributes(attrs: Object) {}17}
18
19
20function getNodeFinalizer() : pointer {21return nativeModule()._GetNodeFinalizer()22}
23