Skip to content

API Reference / @gtkx/native / Descriptor

Type Alias: Descriptor

Descriptor = { kind: "int8"; } | { kind: "uint8"; } | { kind: "int16"; } | { kind: "uint16"; } | { kind: "int32"; } | { kind: "uint32"; } | { kind: "int64"; } | { kind: "uint64"; } | { kind: "bigint64"; } | { kind: "biguint64"; } | { kind: "float32"; } | { kind: "float64"; } | { getTypeFnName: string; kind: "enum"; sharedLibrary: string; signed: boolean; } | { getTypeFnName: string; kind: "flags"; sharedLibrary: string; signed: boolean; } | { kind: "boolean"; } | { kind: "string"; length?: number; ownership: Ownership; } | { kind: "object"; ownership: Ownership; } | { kind: "unichar"; } | { kind: "void"; } | { kind: "buffer"; } | { callerAllocated?: boolean; freeFnName?: string; getTypeFnName?: string; kind: "boxed"; ownership: Ownership; sharedLibrary?: string; size?: number; typeName: string; } | { callerAllocated?: boolean; kind: "struct"; ownership: Ownership; size?: number; } | { kind: "fundamental"; ownership: Ownership; refFnName: string; sharedLibrary: string; typeName?: string; unrefFnName: string; } | { arrayKind: ArrayKind; elementSize?: number; fixedSize?: number; itemDescriptor: Descriptor; kind: "array"; ownership: Ownership; sizeParamIndex?: number; } | { keyDescriptor: Descriptor; kind: "hashtable"; ownership: Ownership; valueDescriptor: Descriptor; } | { argDescriptors: Descriptor[]; hasDestroy?: boolean; kind: "callback"; returnDescriptor: Descriptor; scope?: CallbackScope; userDataIndex?: number; } | { innerDescriptor: Descriptor; inout?: boolean; kind: "ref"; }

Defined in: index.d.ts:57

Describes how a single native value (a function argument, a return value, or a struct field) is marshalled between JavaScript and C. The kind field selects the variant.

Released under the MPL-2.0 License.