W3cubDocs

/Kotlin

Package kotlinx.cinterop

Types

Platform and version requirements: Native (1.3)

Arena

class Arena : ArenaBase
Platform and version requirements: Native (1.3)

ArenaBase

open class ArenaBase : AutofreeScope
Platform and version requirements: Native (1.3)

AutofreeScope

abstract class AutofreeScope : DeferScope, NativePlacement
Platform and version requirements: Native (1.3)

BooleanVar

typealias BooleanVar = BooleanVarOf<Boolean>
Platform and version requirements: Native (1.3)

BooleanVarOf

class BooleanVarOf<T : Boolean> : CPrimitiveVar
Platform and version requirements: Native (1.3)

ByteVar

typealias ByteVar = ByteVarOf<Byte>
Platform and version requirements: Native (1.3)

ByteVarOf

class ByteVarOf<T : Byte> : CPrimitiveVar
Platform and version requirements: Native (1.3)

CArrayPointer

typealias CArrayPointer<T> = CPointer<T>
Platform and version requirements: Native (1.3)

CArrayPointerVar

typealias CArrayPointerVar<T> = CPointerVar<T>
Platform and version requirements: Native (1.3)

CEnum

interface CEnum
Platform and version requirements: Native (1.3)

CEnumVar

abstract class CEnumVar : CPrimitiveVar
Platform and version requirements: Native (1.3)

CFunction

The C function.

class CFunction<T : Function<*>> : CPointed
Platform and version requirements: Native (1.3)

COpaque

The CPointed without any specified interpretation.

abstract class COpaque : CPointed
Platform and version requirements: Native (1.3)

COpaquePointer

The pointer with an opaque type.

typealias COpaquePointer = CPointer<out CPointed>
Platform and version requirements: Native (1.3)

COpaquePointerVar

The variable containing a COpaquePointer.

typealias COpaquePointerVar = CPointerVarOf<COpaquePointer>
Platform and version requirements: Native (1.3)

CPointed

C data or code.

abstract class CPointed : NativePointed
Platform and version requirements: Native (1.3)

CPointer

C pointer.

class CPointer<T : CPointed> : CValuesRef<T>
Platform and version requirements: Native (1.3)

CPointerVar

The C data variable containing the pointer to T.

typealias CPointerVar<T> = CPointerVarOf<CPointer<T>>
Platform and version requirements: Native (1.3)

CPointerVarOf

class CPointerVarOf<T : CPointer<*>> : CVariable
Platform and version requirements: Native (1.3)

CPrimitiveVar

The C primitive-typed variable located in memory.

sealed class CPrimitiveVar : CVariable
Platform and version requirements: Native (1.3)

CStructVar

The C struct-typed variable located in memory.

abstract class CStructVar : CVariable
Platform and version requirements: Native (1.3)

CValue

The single immutable C value. It is self-contained and doesn't depend on native memory.

abstract class CValue<T : CVariable> : CValues<T>
Platform and version requirements: Native (1.3)

CValues

The (possibly empty) sequence of immutable C values. It is self-contained and doesn't depend on native memory.

abstract class CValues<T : CVariable> : CValuesRef<T>
Platform and version requirements: Native (1.3)

CValuesRef

Represents a reference to (possibly empty) sequence of C values. It can be either a stable pointer CPointer or a sequence of immutable values CValues.

abstract class CValuesRef<T : CPointed>
Platform and version requirements: Native (1.3)

CVariable

The C data variable located in memory.

abstract class CVariable : CPointed
Platform and version requirements: Native (1.3)

DeferScope

open class DeferScope
Platform and version requirements: Native (1.3)

DoubleVar

typealias DoubleVar = DoubleVarOf<Double>
Platform and version requirements: Native (1.3)

DoubleVarOf

class DoubleVarOf<T : Double> : CPrimitiveVar
Platform and version requirements: Native (1.3)

FloatVar

typealias FloatVar = FloatVarOf<Float>
Platform and version requirements: Native (1.3)

FloatVarOf

class FloatVarOf<T : Float> : CPrimitiveVar
Platform and version requirements: Native (1.3)

IntVar

typealias IntVar = IntVarOf<Int>
Platform and version requirements: Native (1.3)

IntVarOf

class IntVarOf<T : Int> : CPrimitiveVar
Platform and version requirements: Native (1.3)

LongVar

typealias LongVar = LongVarOf<Long>
Platform and version requirements: Native (1.3)

LongVarOf

class LongVarOf<T : Long> : CPrimitiveVar
Platform and version requirements: Native (1.3)

MemScope

class MemScope : ArenaBase
Platform and version requirements: Native (1.3)

NativeFreeablePlacement

interface NativeFreeablePlacement : NativePlacement
Platform and version requirements: Native (1.3)

nativeHeap

object nativeHeap : NativeFreeablePlacement
Platform and version requirements: Native (1.3)

NativePlacement

interface NativePlacement
Platform and version requirements: Native (1.3)

NativePointed

The entity which has an associated native pointer. Subtypes are supposed to represent interpretations of the pointed data or code.

open class NativePointed
Platform and version requirements: Native (1.3)

NativePtr

typealias NativePtr = NativePtr
Platform and version requirements: Native (1.3)

ObjCBlockVar

typealias ObjCBlockVar<T> = ObjCNotImplementedVar<T>
Platform and version requirements: Native (1.3)

ObjCClass

interface ObjCClass : ObjCObject
Platform and version requirements: Native (1.3)

ObjCClassOf

interface ObjCClassOf<T : ObjCObject> : ObjCClass
Platform and version requirements: Native (1.3)

ObjCNotImplementedVar

class ObjCNotImplementedVar<T> : CVariable
Platform and version requirements: Native (1.3)

ObjCObject

interface ObjCObject
Platform and version requirements: Native (1.3)

ObjCObjectBase

abstract class ObjCObjectBase : ObjCObject
Platform and version requirements: Native (1.3)

ObjCObjectBaseMeta

abstract class ObjCObjectBaseMeta : 
    ObjCObjectBase, 
    ObjCObjectMeta
Platform and version requirements: Native (1.3)

ObjCObjectMeta

typealias ObjCObjectMeta = ObjCClass
Platform and version requirements: Native (1.3)

ObjCObjectVar

class ObjCObjectVar<T> : CVariable
Platform and version requirements: Native (1.3)

ObjCProtocol

interface ObjCProtocol : ObjCObject
Platform and version requirements: Native (1.3)

ObjCStringVarOf

typealias ObjCStringVarOf<T> = ObjCNotImplementedVar<T>
Platform and version requirements: Native (1.3)

Pinned

data class Pinned<out T : Any>
Platform and version requirements: Native (1.3)

ShortVar

typealias ShortVar = ShortVarOf<Short>
Platform and version requirements: Native (1.3)

ShortVarOf

class ShortVarOf<T : Short> : CPrimitiveVar
Platform and version requirements: Native (1.3)

StableObjPtr

typealias StableObjPtr = StableRef<*>
Platform and version requirements: Native (1.3)

StableRef

This class provides a way to create a stable handle to any Kotlin object. After converting to CPointer it can be safely passed to native code e.g. to be received in a Kotlin callback.

class StableRef<out T : Any>
Platform and version requirements: Native (1.3)

UByteVar

typealias UByteVar = UByteVarOf<UByte>
Platform and version requirements: Native (1.3)

UByteVarOf

class UByteVarOf<T : UByte> : CPrimitiveVar
Platform and version requirements: Native (1.3)

UIntVar

typealias UIntVar = UIntVarOf<UInt>
Platform and version requirements: Native (1.3)

UIntVarOf

class UIntVarOf<T : UInt> : CPrimitiveVar
Platform and version requirements: Native (1.3)

ULongVar

typealias ULongVar = ULongVarOf<ULong>
Platform and version requirements: Native (1.3)

ULongVarOf

class ULongVarOf<T : ULong> : CPrimitiveVar
Platform and version requirements: Native (1.3)

UShortVar

typealias UShortVar = UShortVarOf<UShort>
Platform and version requirements: Native (1.3)

UShortVarOf

class UShortVarOf<T : UShort> : CPrimitiveVar
Platform and version requirements: Native (1.3)

Vector128Var

typealias Vector128Var = Vector128VarOf<Vector128>
Platform and version requirements: Native (1.3)

Vector128VarOf

class Vector128VarOf<T : Vector128> : CVariable

Annotations

Platform and version requirements: Native (1.3)

ExportObjCClass

Makes Kotlin subclass of Objective-C class visible for runtime lookup after Kotlin main function gets invoked.

annotation class ExportObjCClass
Platform and version requirements: Native (1.3)

ExternalObjCClass

annotation class ExternalObjCClass
Platform and version requirements: Native (1.3)

InteropStubs

annotation class InteropStubs
Platform and version requirements: Native (1.3)

ObjCAction

Makes Kotlin method in Objective-C class accessible through Objective-C dispatch to be used as action sent by control in UIKit or AppKit.

annotation class ObjCAction
Platform and version requirements: Native (1.3)

ObjCConstructor

annotation class ObjCConstructor
Platform and version requirements: Native (1.3)

ObjCFactory

annotation class ObjCFactory
Platform and version requirements: Native (1.3)

ObjCMethod

annotation class ObjCMethod
Platform and version requirements: Native (1.3)

ObjCOutlet

Makes Kotlin property in Objective-C class settable through Objective-C dispatch to be used as IB outlet.

annotation class ObjCOutlet

Properties

Platform and version requirements: Native (1.3)

cstr

val String.cstr: CValues<ByteVar>
Platform and version requirements: Native (1.3)

nativeNullPtr

val nativeNullPtr: NativePtr
Platform and version requirements: Native (1.3)

pointed

Returns the corresponding CPointed.

val <T : CPointed> CPointer<T>.pointed: T

The code or data pointed by the value of this variable.

var <T : CPointed, P : CPointer<T>> CPointerVarOf<P>.pointed: T?
Platform and version requirements: Native (1.3)

ptr

Returns the pointer to this data or code.

val <T : CPointed> T.ptr: CPointer<T>
Platform and version requirements: Native (1.3)

rawPtr

val NativePointed?.rawPtr: NativePtr
Platform and version requirements: Native (1.3)

rawValue

val CPointer<*>?.rawValue: NativePtr
Platform and version requirements: Native (1.3)

utf16

val String.utf16: CValues<UShortVar>
Platform and version requirements: Native (1.3)

utf32

val String.utf32: CValues<IntVar>
Platform and version requirements: Native (1.3)

utf8

val String.utf8: CValues<ByteVar>
Platform and version requirements: Native (1.3)

value

var <T : Boolean> BooleanVarOf<T>.value: T
var <T : Byte> ByteVarOf<T>.value: T
var <T : Short> ShortVarOf<T>.value: T
var <T : Int> IntVarOf<T>.value: T
var <T : Long> LongVarOf<T>.value: T
var <T : UByte> UByteVarOf<T>.value: T
var <T : UShort> UShortVarOf<T>.value: T
var <T : UInt> UIntVarOf<T>.value: T
var <T : ULong> ULongVarOf<T>.value: T
var <T : Float> FloatVarOf<T>.value: T
var <T : Double> DoubleVarOf<T>.value: T
var <T : Vector128> Vector128VarOf<T>.value: T
var <T> ObjCNotImplementedVar<T>.value: T
var <T> ObjCObjectVar<T>.value: T

The value of this variable.

var <P : CPointer<*>> CPointerVarOf<P>.value: P?
Platform and version requirements: Native (1.3)

wcstr

val String.wcstr: CValues<UShortVar>

Functions

Platform and version requirements: Native (1.3)

addressOf

fun Pinned<ByteArray>.addressOf(
    index: Int
): CPointer<ByteVar>
fun Pinned<String>.addressOf(index: Int): CPointer<COpaque>
fun Pinned<CharArray>.addressOf(
    index: Int
): CPointer<COpaque>
fun Pinned<ShortArray>.addressOf(
    index: Int
): CPointer<ShortVar>
fun Pinned<IntArray>.addressOf(index: Int): CPointer<IntVar>
fun Pinned<LongArray>.addressOf(
    index: Int
): CPointer<LongVar>
fun Pinned<UByteArray>.addressOf(
    index: Int
): CPointer<UByteVar>
fun Pinned<UShortArray>.addressOf(
    index: Int
): CPointer<UShortVar>
fun Pinned<UIntArray>.addressOf(
    index: Int
): CPointer<UIntVar>
fun Pinned<ULongArray>.addressOf(
    index: Int
): CPointer<ULongVar>
fun Pinned<FloatArray>.addressOf(
    index: Int
): CPointer<FloatVar>
fun Pinned<DoubleArray>.addressOf(
    index: Int
): CPointer<DoubleVar>
Platform and version requirements: Native (1.3)

alignOf

fun <T : CVariable> alignOf(): Int
Platform and version requirements: Native (1.3)

alloc

Allocates variable of given type.

fun <T : CVariable> NativePlacement.alloc(): T

Allocates variable of given type and initializes it applying given block.

fun <T : CVariable> NativePlacement.alloc(
    initialize: T.() -> Unit
): T
Platform and version requirements: Native (1.3)

allocArray

Allocates C array of given elements type and length.

fun <T : CVariable> NativePlacement.allocArray(
    length: Long
): CArrayPointer<T>
fun <T : CVariable> NativePlacement.allocArray(
    length: Int
): CArrayPointer<T>

Allocates C array of given elements type and length, and initializes its elements applying given block.

fun <T : CVariable> NativePlacement.allocArray(
    length: Long, 
    initializer: T.(index: Long) -> Unit
): CArrayPointer<T>
fun <T : CVariable> NativePlacement.allocArray(
    length: Int, 
    initializer: T.(index: Int) -> Unit
): CArrayPointer<T>
Platform and version requirements: Native (1.3)

allocArrayOf

Allocates C array of given values.

fun <T : CPointer<*>> NativePlacement.allocArrayOf(
    vararg elements: T?
): CArrayPointer<CPointerVarOf<T>>
fun <T : CPointer<*>> NativePlacement.allocArrayOf(
    elements: List<T?>
): CArrayPointer<CPointerVarOf<T>>
fun NativePlacement.allocArrayOf(
    elements: ByteArray
): CArrayPointer<ByteVar>
fun NativePlacement.allocArrayOf(
    vararg elements: Float
): CArrayPointer<FloatVar>
Platform and version requirements: Native (1.3)

allocArrayOfPointersTo

Allocates C array of pointers to given elements.

fun <T : CPointed> NativePlacement.allocArrayOfPointersTo(
    elements: List<T?>
): CArrayPointer<CPointerVar<T>>
fun <T : CPointed> NativePlacement.allocArrayOfPointersTo(
    vararg elements: T?
): CArrayPointer<CPointerVar<T>>
Platform and version requirements: Native (1.3)

allocPointerTo

fun <T : CPointed> NativePlacement.allocPointerTo(): CPointerVar<T>
Platform and version requirements: Native (1.3)

arrayMemberAt

fun <T : CVariable> CStructVar.arrayMemberAt(
    offset: Long
): CArrayPointer<T>
Platform and version requirements: Native (1.3)

asStableRef

Converts to StableRef this opaque pointer produced by StableRef.asCPointer.

fun <T : Any> CPointer<*>.asStableRef(): StableRef<T>
Platform and version requirements: Native (1.3)

autoreleasepool

fun <R> autoreleasepool(block: () -> R): R
Platform and version requirements: Native (1.3)

bitsToDouble

fun bitsToDouble(bits: Long): Double
Platform and version requirements: Native (1.3)

bitsToFloat

fun bitsToFloat(bits: Int): Float
Platform and version requirements: Native (1.3)

convert

fun <R : Any> Byte.convert(): R
fun <R : Any> Short.convert(): R
fun <R : Any> Int.convert(): R
fun <R : Any> Long.convert(): R
fun <R : Any> UByte.convert(): R
fun <R : Any> UShort.convert(): R
fun <R : Any> UInt.convert(): R
fun <R : Any> ULong.convert(): R
Platform and version requirements: Native (1.3)

copy

fun <T : CStructVar> CValue<T>.copy(
    modify: T.() -> Unit
): CValue<T>
Platform and version requirements: Native (1.3)

createKotlinObjectHolder

fun createKotlinObjectHolder(any: Any?): NativePtr
Platform and version requirements: Native (1.3)

CreateKStringFromNSString

fun CreateKStringFromNSString(ptr: NativePtr): String?
Platform and version requirements: Native (1.3)

CreateNSStringFromKString

fun CreateNSStringFromKString(str: String?): NativePtr
Platform and version requirements: Native (1.3)

createValues

fun <T : CVariable> createValues(
    count: Int, 
    initializer: T.(index: Int) -> Unit
): CValues<T>
Platform and version requirements: Native (1.3)

cValue

fun <T : CVariable> cValue(): CValue<T>
fun <T : CStructVar> cValue(
    initialize: T.() -> Unit
): CValue<T>
Platform and version requirements: Native (1.3)

cValuesOf

Returns sequence of immutable values CValues to pass them to C code.

fun cValuesOf(vararg elements: Byte): CValues<ByteVar>
fun cValuesOf(vararg elements: Short): CValues<ShortVar>
fun cValuesOf(vararg elements: Int): CValues<IntVar>
fun cValuesOf(vararg elements: Long): CValues<LongVar>
fun cValuesOf(vararg elements: Float): CValues<FloatVar>
fun cValuesOf(vararg elements: Double): CValues<DoubleVar>
fun <T : CPointed> cValuesOf(
    vararg elements: CPointer<T>?
): CValues<CPointerVar<T>>
fun cValuesOf(vararg elements: UByte): CValues<UByteVar>
fun cValuesOf(vararg elements: UShort): CValues<UShortVar>
fun cValuesOf(vararg elements: UInt): CValues<UIntVar>
fun cValuesOf(vararg elements: ULong): CValues<ULongVar>
Platform and version requirements: Native (1.3)

free

fun NativeFreeablePlacement.free(pointer: CPointer<*>)
fun NativeFreeablePlacement.free(pointed: NativePointed)
Platform and version requirements: Native (1.3)

get

operator fun <T : Byte> CPointer<ByteVarOf<T>>.get(
    index: Int
): T
operator fun <T : Byte> CPointer<ByteVarOf<T>>.get(
    index: Long
): T
operator fun <T : Short> CPointer<ShortVarOf<T>>.get(
    index: Int
): T
operator fun <T : Short> CPointer<ShortVarOf<T>>.get(
    index: Long
): T
operator fun <T : Int> CPointer<IntVarOf<T>>.get(
    index: Int
): T
operator fun <T : Int> CPointer<IntVarOf<T>>.get(
    index: Long
): T
operator fun <T : Long> CPointer<LongVarOf<T>>.get(
    index: Int
): T
operator fun <T : Long> CPointer<LongVarOf<T>>.get(
    index: Long
): T
operator fun <T : UByte> CPointer<UByteVarOf<T>>.get(
    index: Int
): T
operator fun <T : UByte> CPointer<UByteVarOf<T>>.get(
    index: Long
): T
operator fun <T : UShort> CPointer<UShortVarOf<T>>.get(
    index: Int
): T
operator fun <T : UShort> CPointer<UShortVarOf<T>>.get(
    index: Long
): T
operator fun <T : UInt> CPointer<UIntVarOf<T>>.get(
    index: Int
): T
operator fun <T : UInt> CPointer<UIntVarOf<T>>.get(
    index: Long
): T
operator fun <T : ULong> CPointer<ULongVarOf<T>>.get(
    index: Int
): T
operator fun <T : ULong> CPointer<ULongVarOf<T>>.get(
    index: Long
): T
operator fun <T : Float> CPointer<FloatVarOf<T>>.get(
    index: Int
): T
operator fun <T : Float> CPointer<FloatVarOf<T>>.get(
    index: Long
): T
operator fun <T : Double> CPointer<DoubleVarOf<T>>.get(
    index: Int
): T
operator fun <T : Double> CPointer<DoubleVarOf<T>>.get(
    index: Long
): T
operator fun <T : CVariable> CPointer<T>.get(index: Long): T
operator fun <T : CVariable> CPointer<T>.get(index: Int): T
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.get(
    index: Int
): T?
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.get(
    index: Long
): T?
Platform and version requirements: Native (1.3)

getBytes

fun <T : CVariable> CValues<T>.getBytes(): ByteArray
Platform and version requirements: Native (1.3)

getOriginalKotlinClass

If objCClass is a class generated to Objective-C header for Kotlin class, returns KClass for that original Kotlin class.

fun getOriginalKotlinClass(objCClass: ObjCClass): KClass<*>?

If objCProtocol is a protocol generated to Objective-C header for Kotlin class, returns KClass for that original Kotlin class.

fun getOriginalKotlinClass(
    objCProtocol: ObjCProtocol
): KClass<*>?
Platform and version requirements: Native (1.3)

getRawPointer

fun NativePointed.getRawPointer(): NativePtr
Platform and version requirements: Native (1.3)

getRawValue

fun CPointer<*>.getRawValue(): NativePtr
Platform and version requirements: Native (1.3)

initBy

fun <T : ObjCObjectBase> T.initBy(constructorCall: T): T
Platform and version requirements: Native (1.3)

interpretCPointer

Performs type cast of the CPointer from the given raw pointer.

fun <T : CPointed> interpretCPointer(
    rawValue: NativePtr
): CPointer<T>?
Platform and version requirements: Native (1.3)

interpretNullableOpaquePointed

fun interpretNullableOpaquePointed(
    ptr: NativePtr
): NativePointed?
Platform and version requirements: Native (1.3)

interpretNullablePointed

Performs type cast of the native pointer to given interop type, including null values.

fun <T : NativePointed> interpretNullablePointed(
    ptr: NativePtr
): T?
Platform and version requirements: Native (1.3)

interpretObjCPointer

fun <T : Any> interpretObjCPointer(objcPtr: NativePtr): T
Platform and version requirements: Native (1.3)

interpretObjCPointerOrNull

fun <T> interpretObjCPointerOrNull(objcPtr: NativePtr): T?
Platform and version requirements: Native (1.3)

interpretOpaquePointed

fun interpretOpaquePointed(ptr: NativePtr): NativePointed
Platform and version requirements: Native (1.3)

interpretPointed

Returns interpretation of entity with given pointer.

fun <T : NativePointed> interpretPointed(ptr: NativePtr): T
Platform and version requirements: Native (1.3)

invoke

operator fun <R> CPointer<CFunction<() -> R>>.invoke(): R
operator fun <P1, R> CPointer<CFunction<(P1) -> R>>.invoke(
    p1: P1
): R
operator fun <P1, P2, R> CPointer<CFunction<(P1, P2) -> R>>.invoke(
    p1: P1, 
    p2: P2
): R
operator fun <P1, P2, P3, R> CPointer<CFunction<(P1, P2, P3) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3
): R
operator fun <P1, P2, P3, P4, R> CPointer<CFunction<(P1, P2, P3, P4) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4
): R
operator fun <P1, P2, P3, P4, P5, R> CPointer<CFunction<(P1, P2, P3, P4, P5) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5
): R
operator fun <P1, P2, P3, P4, P5, P6, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19, 
    p20: P20
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19, 
    p20: P20, 
    p21: P21
): R
operator fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R> CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R>>.invoke(
    p1: P1, 
    p2: P2, 
    p3: P3, 
    p4: P4, 
    p5: P5, 
    p6: P6, 
    p7: P7, 
    p8: P8, 
    p9: P9, 
    p10: P10, 
    p11: P11, 
    p12: P12, 
    p13: P13, 
    p14: P14, 
    p15: P15, 
    p16: P16, 
    p17: P17, 
    p18: P18, 
    p19: P19, 
    p20: P20, 
    p21: P21, 
    p22: P22
): R
Platform and version requirements: Native (1.3)

memberAt

Returns the member of this CStructVar which is located by given offset in bytes.

fun <T : CPointed> CStructVar.memberAt(offset: Long): T
Platform and version requirements: Native (1.3)

memScoped

Runs given block providing allocation of memory which will be automatically disposed at the end of this scope.

fun <R> memScoped(block: MemScope.() -> R): R
Platform and version requirements: Native (1.3)

narrow

fun <R : Number> Number.narrow(): R
Platform and version requirements: Native (1.3)

objc_autoreleasePoolPop

fun objc_autoreleasePoolPop(ptr: NativePtr)
Platform and version requirements: Native (1.3)

objc_autoreleasePoolPush

fun objc_autoreleasePoolPush(): NativePtr
Platform and version requirements: Native (1.3)

objc_lookUpClass

fun objc_lookUpClass(name: NativePtr): NativePtr
Platform and version requirements: Native (1.3)

objc_release

fun objc_release(ptr: NativePtr)
Platform and version requirements: Native (1.3)

objc_retain

fun objc_retain(ptr: NativePtr): NativePtr
Platform and version requirements: Native (1.3)

objc_retainAutoreleaseReturnValue

fun objc_retainAutoreleaseReturnValue(
    ptr: NativePtr
): NativePtr
Platform and version requirements: Native (1.3)

objcPtr

fun Any?.objcPtr(): NativePtr
Platform and version requirements: Native (1.3)

optional

fun optional(): Nothing
Platform and version requirements: Native (1.3)

pin

fun <T : Any> T.pin(): Pinned<T>
Platform and version requirements: Native (1.3)

placeTo

fun <T : CVariable> CValues<T>.placeTo(
    scope: AutofreeScope
): CPointer<T>
Platform and version requirements: Native (1.3)

plus

operator fun <T : ByteVarOf<*>> CPointer<T>?.plus(
    index: Long
): CPointer<T>?
operator fun <T : ByteVarOf<*>> CPointer<T>?.plus(
    index: Int
): CPointer<T>?
Platform and version requirements: Native (1.3)

readBits

fun readBits(
    ptr: NativePtr, 
    offset: Long, 
    size: Int, 
    signed: Boolean
): Long
Platform and version requirements: Native (1.3)

readBytes

fun COpaquePointer.readBytes(count: Int): ByteArray
Platform and version requirements: Native (1.3)

readValue

fun <T : CVariable> CPointed.readValue(
    size: Long, 
    align: Int
): CValue<T>
fun <T : CStructVar> T.readValue(): CValue<T>
Platform and version requirements: Native (1.3)

readValues

fun <T : CVariable> CPointed.readValues(
    size: Int, 
    align: Int
): CValues<T>
fun <T : CVariable> T.readValues(count: Int): CValues<T>
Platform and version requirements: Native (1.3)

refTo

fun ByteArray.refTo(index: Int): CValuesRef<ByteVar>
fun String.refTo(index: Int): CValuesRef<COpaque>
fun CharArray.refTo(index: Int): CValuesRef<COpaque>
fun ShortArray.refTo(index: Int): CValuesRef<ShortVar>
fun IntArray.refTo(index: Int): CValuesRef<IntVar>
fun LongArray.refTo(index: Int): CValuesRef<LongVar>
fun UByteArray.refTo(index: Int): CValuesRef<UByteVar>
fun UShortArray.refTo(index: Int): CValuesRef<UShortVar>
fun UIntArray.refTo(index: Int): CValuesRef<UIntVar>
fun ULongArray.refTo(index: Int): CValuesRef<ULongVar>
fun FloatArray.refTo(index: Int): CValuesRef<FloatVar>
fun DoubleArray.refTo(index: Int): CValuesRef<DoubleVar>
Platform and version requirements: Native (1.3)

reinterpret

Changes the interpretation of the pointed data or code.

fun <T : NativePointed> NativePointed.reinterpret(): T
fun <T : CPointed> CPointer<*>.reinterpret(): CPointer<T>
fun <T : ObjCObject> ObjCObject.reinterpret(): T
Platform and version requirements: Native (1.3)

set

operator fun <T : Byte> CPointer<ByteVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Byte> CPointer<ByteVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Short> CPointer<ShortVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Short> CPointer<ShortVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Int> CPointer<IntVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Int> CPointer<IntVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Long> CPointer<LongVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Long> CPointer<LongVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : UByte> CPointer<UByteVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : UByte> CPointer<UByteVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : UShort> CPointer<UShortVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : UShort> CPointer<UShortVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : UInt> CPointer<UIntVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : UInt> CPointer<UIntVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : ULong> CPointer<ULongVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : ULong> CPointer<ULongVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Float> CPointer<FloatVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Float> CPointer<FloatVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : Double> CPointer<DoubleVarOf<T>>.set(
    index: Int, 
    value: T)
operator fun <T : Double> CPointer<DoubleVarOf<T>>.set(
    index: Long, 
    value: T)
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.set(
    index: Int, 
    value: T?)
operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.set(
    index: Long, 
    value: T?)
Platform and version requirements: Native (1.3)

signExtend

fun <R : Number> Number.signExtend(): R
Platform and version requirements: Native (1.3)

sizeOf

fun <T : CVariable> sizeOf(): Long
Platform and version requirements: Native (1.3)

staticCFunction

Returns a pointer to C function which calls given Kotlin static function.

fun <R> staticCFunction(
    function: () -> R
): CPointer<CFunction<() -> R>>
fun <P1, R> staticCFunction(
    function: (P1) -> R
): CPointer<CFunction<(P1) -> R>>
fun <P1, P2, R> staticCFunction(
    function: (P1, P2) -> R
): CPointer<CFunction<(P1, P2) -> R>>
fun <P1, P2, P3, R> staticCFunction(
    function: (P1, P2, P3) -> R
): CPointer<CFunction<(P1, P2, P3) -> R>>
fun <P1, P2, P3, P4, R> staticCFunction(
    function: (P1, P2, P3, P4) -> R
): CPointer<CFunction<(P1, P2, P3, P4) -> R>>
fun <P1, P2, P3, P4, P5, R> staticCFunction(
    function: (P1, P2, P3, P4, P5) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5) -> R>>
fun <P1, P2, P3, P4, P5, P6, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R>>
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R> staticCFunction(
    function: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R
): CPointer<CFunction<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R>>
Platform and version requirements: Native (1.3)

toBoolean

fun Byte.toBoolean(): Boolean
Platform and version requirements: Native (1.3)

toByte

fun Boolean.toByte(): Byte
Platform and version requirements: Native (1.3)

toCPointer

fun <T : CPointed> Long.toCPointer(): CPointer<T>?
Platform and version requirements: Native (1.3)

toCStringArray

Convert this list of Kotlin strings to C array of C strings, allocating memory for the array and C strings with given AutofreeScope.

fun List<String>.toCStringArray(
    autofreeScope: AutofreeScope
): CPointer<CPointerVar<ByteVar>>

Convert this array of Kotlin strings to C array of C strings, allocating memory for the array and C strings with given AutofreeScope.

fun Array<String>.toCStringArray(
    autofreeScope: AutofreeScope
): CPointer<CPointerVar<ByteVar>>
Platform and version requirements: Native (1.3)

toCValues

fun ByteArray.toCValues(): CValues<ByteVar>
fun ShortArray.toCValues(): CValues<ShortVar>
fun IntArray.toCValues(): CValues<IntVar>
fun LongArray.toCValues(): CValues<LongVar>
fun FloatArray.toCValues(): CValues<FloatVar>
fun DoubleArray.toCValues(): CValues<DoubleVar>
fun <T : CPointed> Array<CPointer<T>?>.toCValues(): CValues<CPointerVar<T>>
fun <T : CPointed> List<CPointer<T>?>.toCValues(): CValues<CPointerVar<T>>
fun UByteArray.toCValues(): CValues<UByteVar>
fun UShortArray.toCValues(): CValues<UShortVar>
fun UIntArray.toCValues(): CValues<UIntVar>
fun ULongArray.toCValues(): CValues<ULongVar>
Platform and version requirements: Native (1.3)

toKString

fun CPointer<ByteVar>.toKString(): String
fun CPointer<ShortVar>.toKString(): String
fun CPointer<UShortVar>.toKString(): String

Decodes a string from the bytes in UTF-8 encoding in this array. Bytes following the first occurrence of 0 byte, if it occurs, are not decoded.

fun ByteArray.toKString(): String

Decodes a string from the bytes in UTF-8 encoding in this array or its subrange. Bytes following the first occurrence of 0 byte, if it occurs, are not decoded.

fun ByteArray.toKString(
    startIndex: Int = 0, 
    endIndex: Int = this.size, 
    throwOnInvalidSequence: Boolean = false
): String
Platform and version requirements: Native (1.3)

toKStringFromUtf16

fun CPointer<ShortVar>.toKStringFromUtf16(): String
fun CPointer<UShortVar>.toKStringFromUtf16(): String
Platform and version requirements: Native (1.3)

toKStringFromUtf32

fun CPointer<IntVar>.toKStringFromUtf32(): String
Platform and version requirements: Native (1.3)

toKStringFromUtf8

fun CPointer<ByteVar>.toKStringFromUtf8(): String
Platform and version requirements: Native (1.3)

toLong

fun <T : CPointed> CPointer<T>?.toLong(): Long
Platform and version requirements: Native (1.3)

typeOf

fun <T : CVariable> typeOf(): Type
Platform and version requirements: Native (1.3)

unwrapKotlinObjectHolder

fun <T : Any> unwrapKotlinObjectHolder(holder: Any?): T
Platform and version requirements: Native (1.3)

useContents

Calls the block with temporary copy of this value as receiver.

fun <T : CStructVar, R> CValue<T>.useContents(
    block: T.() -> R
): R
Platform and version requirements: Native (1.3)

usePinned

fun <T : Any, R> T.usePinned(block: (Pinned<T>) -> R): R
Platform and version requirements: Native (1.3)

write

fun <T : CVariable> CValue<T>.write(location: NativePtr)
Platform and version requirements: Native (1.3)

writeBits

fun writeBits(
    ptr: NativePtr, 
    offset: Long, 
    size: Int, 
    value: Long)
Platform and version requirements: Native (1.3)

zeroValue

fun <T : CVariable> zeroValue(
    size: Int, 
    align: Int
): CValue<T>
fun <T : CVariable> zeroValue(): CValue<T>

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/index.html