Package-level declarations

Types

Link copied to clipboard
class Arena(parent: NativeFreeablePlacement = nativeHeap) : ArenaBase
Since Kotlin 1.3
Link copied to clipboard
open class ArenaBase(parent: NativeFreeablePlacement = nativeHeap) : AutofreeScope
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard

Marks Objective-C and Swift interoperability API as Beta.

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
typealias ByteVar = ByteVarOf<Byte>
Since Kotlin 1.3
Link copied to clipboard
class ByteVarOf<T : Byte>(rawPtr: NativePtr) : CPrimitiveVar
Since Kotlin 1.3
Link copied to clipboard
typealias CArrayPointer<T> = CPointer<T>
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
interface CEnum
Since Kotlin 1.3
Link copied to clipboard
abstract class CEnumVar(rawPtr: NativePtr) : CPrimitiveVar
Since Kotlin 1.3
Link copied to clipboard
class CFunction<T : Function<*>>(rawPtr: NativePtr) : CPointed

The C function.

Since Kotlin 1.3
Link copied to clipboard
abstract class COpaque(rawPtr: NativePtr) : CPointed

The CPointed without any specified interpretation.

Since Kotlin 1.3
Link copied to clipboard

The pointer with an opaque type.

Since Kotlin 1.3
Link copied to clipboard

The variable containing a COpaquePointer.

Since Kotlin 1.3
Link copied to clipboard
interface CPlusPlusClass
Since Kotlin 1.3
Link copied to clipboard
abstract class CPointed(rawPtr: NativePtr) : NativePointed

C data or code.

Since Kotlin 1.3
Link copied to clipboard

C pointer.

Since Kotlin 1.3
Link copied to clipboard

The C data variable containing the pointer to T.

Since Kotlin 1.3
Link copied to clipboard
class CPointerVarOf<T : CPointer<*>>(rawPtr: NativePtr) : CVariable
Since Kotlin 1.3
Link copied to clipboard
sealed class CPrimitiveVar(rawPtr: NativePtr) : CVariable

The C primitive-typed variable located in memory.

Since Kotlin 1.3
Link copied to clipboard
abstract class CStructVar(rawPtr: NativePtr) : CVariable

The C struct-typed variable located in memory.

Since Kotlin 1.3
Link copied to clipboard
abstract class CValue<T : CVariable> : CValues<T>

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

Since Kotlin 1.3
Link copied to clipboard
abstract class CValues<T : CVariable> : CValuesRef<T>

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

Since Kotlin 1.3
Link copied to clipboard
abstract class CValuesRef<T : CPointed>

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.

Since Kotlin 1.3
Link copied to clipboard
abstract class CVariable(rawPtr: NativePtr) : CPointed

The C data variable located in memory.

Since Kotlin 1.3
Link copied to clipboard
open class DeferScope
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard

Marks foreign-language-related API as experimental.

Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExportObjCClass(val name: String = "")

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

Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExternalObjCClass(val protocolGetter: String = "", val binaryName: String = "")
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FILE])
annotation class InteropStubs
Since Kotlin 1.3
Link copied to clipboard
typealias IntVar = IntVarOf<Int>
Since Kotlin 1.3
Link copied to clipboard
class IntVarOf<T : Int>(rawPtr: NativePtr) : CPrimitiveVar
Since Kotlin 1.3
Link copied to clipboard
typealias LongVar = LongVarOf<Long>
Since Kotlin 1.3
Link copied to clipboard
class LongVarOf<T : Long>(rawPtr: NativePtr) : CPrimitiveVar
Since Kotlin 1.3
Link copied to clipboard
abstract class ManagedType<T : CStructVar>(val cpp: T)
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
interface NativePlacement
Since Kotlin 1.3
Link copied to clipboard
open class NativePointed

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

Since Kotlin 1.3
Link copied to clipboard
typealias NativePtr = kotlin.native.internal.NativePtr
Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class 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.

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
interface ObjCClass : ObjCObject
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
annotation class ObjCConstructor(val initSelector: String, val designated: Boolean)
Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCDirect(val symbol: String)
Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCFactory(val selector: String, val encoding: String, val isStret: Boolean = false)
Since Kotlin 1.3
Link copied to clipboard
annotation class ObjCMethod(val selector: String, val encoding: String, val isStret: Boolean = false)
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
interface ObjCObject
Since Kotlin 1.3
Link copied to clipboard
abstract class ObjCObjectBase : ObjCObject
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ObjCOutlet

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

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCSignatureOverride

Marks functions for which Objective-C rules should be used for determinating whether two functions are conflicting.

Since Kotlin 2.0
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
class Pinned<T : Any>
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
interface SkiaRefCnt
Since Kotlin 1.3
Link copied to clipboard
value class StableRef<out T : Any>

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.

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
typealias UIntVar = UIntVarOf<UInt>
Since Kotlin 1.3
Link copied to clipboard
class UIntVarOf<T : UInt>(rawPtr: NativePtr) : CPrimitiveVar
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
annotation class UnsafeNumber(val actualPlatformTypes: Array<String>)

Marker for declarations that depend on numeric types of different bit width on at least two platforms.

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
class Vector128
Since Kotlin 1.9
Link copied to clipboard
Since Kotlin 1.9
Link copied to clipboard
Since Kotlin 1.9

Properties

Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard

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

Since Kotlin 1.3

Returns the corresponding CPointed.

Since Kotlin 1.3
Link copied to clipboard
val <T : CPointed> T.ptr: CPointer<T>

Returns the pointer to this data or code.

Since Kotlin 1.3
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
var <T : Byte> ByteVarOf<T>.value: T
var <T : Int> IntVarOf<T>.value: T
var <T : Long> LongVarOf<T>.value: T
var <T : UInt> UIntVarOf<T>.value: T
Since Kotlin 1.3

The value of this variable.

Since Kotlin 1.3
Since Kotlin 1.9
Link copied to clipboard
Since Kotlin 1.3

Functions

Link copied to clipboard
inline fun <T : CVariable> alignOf(): Int
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> NativePlacement.alloc(): T

Allocates variable of given type.

Since Kotlin 1.3
fun <T : Byte> NativePlacement.alloc(value: T): ByteVarOf<T>
fun <T : Int> NativePlacement.alloc(value: T): IntVarOf<T>
fun <T : Long> NativePlacement.alloc(value: T): LongVarOf<T>
fun <T : UInt> NativePlacement.alloc(value: T): UIntVarOf<T>

Allocates variable with given value type and initializes it with given value.

Since Kotlin 1.3
inline fun <T : CVariable> NativePlacement.alloc(initialize: T.() -> Unit): T

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

Since Kotlin 1.3
Link copied to clipboard

Allocates C array of given elements type and length.

Since Kotlin 1.3
inline fun <T : CVariable> NativePlacement.allocArray(length: Int, initializer: T.(index: Int) -> Unit): CArrayPointer<T>
inline fun <T : CVariable> NativePlacement.allocArray(length: Long, initializer: T.(index: Long) -> Unit): CArrayPointer<T>

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

Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CPointer<*>> NativePlacement.allocArrayOf(vararg elements: T?): CArrayPointer<CPointerVarOf<T>>

Allocates C array of given values.

Since Kotlin 1.3
Since Kotlin 1.3
Link copied to clipboard

Allocates C array of pointers to given elements.

Since Kotlin 1.3
Link copied to clipboard
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : Any> CPointer<*>.asStableRef(): StableRef<T>

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

Since Kotlin 1.3
Link copied to clipboard
inline fun <R> autoreleasepool(block: () -> R): R
Since Kotlin 1.3
Link copied to clipboard
external fun bitsToDouble(bits: Long): Double
Since Kotlin 1.3
Link copied to clipboard
external fun bitsToFloat(bits: Int): Float
Since Kotlin 1.3
Link copied to clipboard
inline external fun <R : Any> Byte.convert(): R
inline external fun <R : Any> Int.convert(): R
inline external fun <R : Any> Long.convert(): R
inline external fun <R : Any> Short.convert(): R
inline external fun <R : Any> UByte.convert(): R
inline external fun <R : Any> UInt.convert(): R
inline external fun <R : Any> ULong.convert(): R
inline external fun <R : Any> UShort.convert(): R
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CStructVar> CValue<T>.copy(modify: T.() -> Unit): CValue<T>
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> createValues(count: Int, initializer: T.(index: Int) -> Unit): CValues<T>
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> cValue(): CValue<T>
inline fun <T : CStructVar> cValue(initialize: T.() -> Unit): CValue<T>
Since Kotlin 1.3
Link copied to clipboard
fun <T : CPointed> cValuesOf(vararg elements: CPointer<T>?): CValues<CPointerVar<T>>
fun cValuesOf(vararg elements: Double): CValues<DoubleVar>
fun cValuesOf(vararg elements: Float): CValues<FloatVar>
fun cValuesOf(vararg elements: Int): CValues<IntVar>
fun cValuesOf(vararg elements: Long): CValues<LongVar>
fun cValuesOf(vararg elements: Short): CValues<ShortVar>
fun cValuesOf(vararg elements: UByte): CValues<UByteVar>
fun cValuesOf(vararg elements: UInt): CValues<UIntVar>
fun cValuesOf(vararg elements: ULong): CValues<ULongVar>
fun cValuesOf(vararg elements: UShort): CValues<UShortVar>
Since Kotlin 1.3
fun cValuesOf(vararg elements: Byte): CValues<ByteVar>

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

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline operator fun <T : CVariable> CPointer<T>.get(index: Int): T
inline operator fun <T : CVariable> CPointer<T>.get(index: Long): T
inline operator fun <T : Byte> CPointer<ByteVarOf<T>>.get(index: Int): T
inline operator fun <T : Byte> CPointer<ByteVarOf<T>>.get(index: Long): T
inline operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.get(index: Int): T?
inline operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.get(index: Long): T?
inline operator fun <T : Double> CPointer<DoubleVarOf<T>>.get(index: Int): T
inline operator fun <T : Double> CPointer<DoubleVarOf<T>>.get(index: Long): T
inline operator fun <T : Float> CPointer<FloatVarOf<T>>.get(index: Int): T
inline operator fun <T : Float> CPointer<FloatVarOf<T>>.get(index: Long): T
inline operator fun <T : Int> CPointer<IntVarOf<T>>.get(index: Int): T
inline operator fun <T : Int> CPointer<IntVarOf<T>>.get(index: Long): T
inline operator fun <T : Long> CPointer<LongVarOf<T>>.get(index: Int): T
inline operator fun <T : Long> CPointer<LongVarOf<T>>.get(index: Long): T
inline operator fun <T : Short> CPointer<ShortVarOf<T>>.get(index: Int): T
inline operator fun <T : Short> CPointer<ShortVarOf<T>>.get(index: Long): T
inline operator fun <T : UByte> CPointer<UByteVarOf<T>>.get(index: Int): T
inline operator fun <T : UByte> CPointer<UByteVarOf<T>>.get(index: Long): T
inline operator fun <T : UInt> CPointer<UIntVarOf<T>>.get(index: Int): T
inline operator fun <T : UInt> CPointer<UIntVarOf<T>>.get(index: Long): T
inline operator fun <T : ULong> CPointer<ULongVarOf<T>>.get(index: Int): T
inline operator fun <T : ULong> CPointer<ULongVarOf<T>>.get(index: Long): T
inline operator fun <T : UShort> CPointer<UShortVarOf<T>>.get(index: Int): T
inline operator fun <T : UShort> CPointer<UShortVarOf<T>>.get(index: Long): T
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard

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

Since Kotlin 1.3

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

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
external fun CPointer<*>.getRawValue(): NativePtr
Since Kotlin 1.3
Link copied to clipboard
external fun <T : ObjCObjectBase> T.initBy(constructorCall: T): T
Since Kotlin 1.3
Link copied to clipboard
external fun <T : CPointed> interpretCPointer(rawValue: NativePtr): CPointer<T>?

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

Since Kotlin 1.3
Link copied to clipboard
Link copied to clipboard

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

Since Kotlin 1.3
Link copied to clipboard
inline fun <T : Any> interpretObjCPointer(objcPtr: NativePtr): T
Since Kotlin 1.3
Link copied to clipboard
external fun <T> interpretObjCPointerOrNull(objcPtr: NativePtr): T?
Since Kotlin 1.3
Link copied to clipboard
Link copied to clipboard

Returns interpretation of entity with given pointer.

Since Kotlin 1.3
Link copied to clipboard
operator external fun <R> CPointer<CFunction<() -> R>>.invoke(): R
operator external fun <P1, R> CPointer<CFunction<(P1) -> R>>.invoke(p1: P1): R
operator external fun <P1, P2, R> CPointer<CFunction<(P1, P2) -> R>>.invoke(p1: P1, p2: P2): R
operator external fun <P1, P2, P3, R> CPointer<CFunction<(P1, P2, P3) -> R>>.invoke(p1: P1, p2: P2, p3: P3): R
operator external fun <P1, P2, P3, P4, R> CPointer<CFunction<(P1, P2, P3, P4) -> R>>.invoke(p1: P1, p2: P2, p3: P3, p4: P4): R
operator external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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 external 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
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CPointed> CStructVar.memberAt(offset: Long): T

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

Since Kotlin 1.3
Link copied to clipboard
inline fun <R> memScoped(block: MemScope.() -> R): R

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

Since Kotlin 1.3
Link copied to clipboard
inline external fun <R : Number> Number.narrow(): R
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
external fun objc_release(ptr: NativePtr)
Since Kotlin 1.3
Link copied to clipboard
external fun objc_retain(ptr: NativePtr): NativePtr
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
external fun Any?.objcPtr(): NativePtr
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : Any> T.pin(): Pinned<T>
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline operator fun <T : ByteVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : ByteVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : CPointerVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : CPointerVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : DoubleVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : DoubleVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : FloatVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : FloatVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : IntVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : IntVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : LongVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : LongVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : ShortVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : ShortVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : UByteVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : UByteVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : UIntVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : UIntVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : ULongVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : ULongVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
inline operator fun <T : UShortVarOf<*>> CPointer<T>?.plus(index: Int): CPointer<T>?
inline operator fun <T : UShortVarOf<*>> CPointer<T>?.plus(index: Long): CPointer<T>?
Since Kotlin 1.3
Link copied to clipboard
external fun readBits(ptr: NativePtr, offset: Long, size: Int, signed: Boolean): Long
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CStructVar> T.readValue(): CValue<T>
fun <T : CVariable> CPointed.readValue(size: Long, align: Int): CValue<T>
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> T.readValues(count: Int): CValues<T>
fun <T : CVariable> CPointed.readValues(size: Int, align: Int): CValues<T>
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3

Changes the interpretation of the pointed data or code.

Since Kotlin 1.3
Link copied to clipboard
inline operator fun <T : Byte> CPointer<ByteVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : Byte> CPointer<ByteVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.set(index: Int, value: T?)
inline operator fun <T : CPointer<*>> CPointer<CPointerVarOf<T>>.set(index: Long, value: T?)
inline operator fun <T : Double> CPointer<DoubleVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : Double> CPointer<DoubleVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : Float> CPointer<FloatVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : Float> CPointer<FloatVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : Int> CPointer<IntVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : Int> CPointer<IntVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : Long> CPointer<LongVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : Long> CPointer<LongVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : Short> CPointer<ShortVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : Short> CPointer<ShortVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : UByte> CPointer<UByteVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : UByte> CPointer<UByteVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : UInt> CPointer<UIntVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : UInt> CPointer<UIntVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : ULong> CPointer<ULongVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : ULong> CPointer<ULongVarOf<T>>.set(index: Long, value: T)
inline operator fun <T : UShort> CPointer<UShortVarOf<T>>.set(index: Int, value: T)
inline operator fun <T : UShort> CPointer<UShortVarOf<T>>.set(index: Long, value: T)
Since Kotlin 1.3
Link copied to clipboard
inline external fun <R : Number> Number.signExtend(): R
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> sizeOf(): Long
Since Kotlin 1.3
Link copied to clipboard
external fun <R> staticCFunction(function: () -> R): CPointer<CFunction<() -> R>>

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

Since Kotlin 1.3
external 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>>
external 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>>
external 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>>
external 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>>
external 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>>
external 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>>
external 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>>
external 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>>
external 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>>
external 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>>
external fun <P1, R> staticCFunction(function: (P1) -> R): CPointer<CFunction<(P1) -> R>>
external 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>>
external 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>>
external 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>>
external fun <P1, P2, R> staticCFunction(function: (P1, P2) -> R): CPointer<CFunction<(P1, P2) -> R>>
external fun <P1, P2, P3, R> staticCFunction(function: (P1, P2, P3) -> R): CPointer<CFunction<(P1, P2, P3) -> R>>
external fun <P1, P2, P3, P4, R> staticCFunction(function: (P1, P2, P3, P4) -> R): CPointer<CFunction<(P1, P2, P3, P4) -> R>>
external fun <P1, P2, P3, P4, P5, R> staticCFunction(function: (P1, P2, P3, P4, P5) -> R): CPointer<CFunction<(P1, P2, P3, P4, P5) -> R>>
external 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>>
external 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>>
external 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>>
external 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>>
Since Kotlin 1.3
Link copied to clipboard
inline fun Byte.toBoolean(): Boolean
Since Kotlin 1.3
Link copied to clipboard
inline fun Boolean.toByte(): Byte
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard

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

Since Kotlin 1.3

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

Since Kotlin 1.3
Link copied to clipboard

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.

Since Kotlin 1.3
Since Kotlin 1.3
Since Kotlin 1.3
fun ByteArray.toKString(startIndex: Int = 0, endIndex: Int = this.size, throwOnInvalidSequence: Boolean = false): 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.

Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : Any> unwrapKotlinObjectHolder(holder: Any?): T
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CStructVar, R> CValue<T>.useContents(block: T.() -> R): R

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

Since Kotlin 1.3
Link copied to clipboard
inline fun <T : Any, R> T.usePinned(block: (Pinned<T>) -> R): R
Since Kotlin 1.3
Link copied to clipboard
external fun vectorOf(f0: Float, f1: Float, f2: Float, f3: Float): Vector128
external fun vectorOf(f0: Int, f1: Int, f2: Int, f3: Int): Vector128
Since Kotlin 1.9
Link copied to clipboard
fun <T : CVariable> CValue<T>.write(location: NativePtr)
Since Kotlin 1.3
Link copied to clipboard
external fun writeBits(ptr: NativePtr, offset: Long, size: Int, value: Long)
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> zeroValue(): CValue<T>
inline fun <T : CVariable> zeroValue(size: Int, align: Int): CValue<T>
Since Kotlin 1.3