Spec-Zone.ru › Kotlin 2

Объявления уровня пакета

kotlin-stdlib/kotlinx.cinterop

Экспериментальный API для работы с неуправляемой и внешней памятью, а также для взаимодействия с другими языками, такими как Objective-C и C.

Типы

Arena

В Kotlin начиная с версии: 1.3

class Arena(parent: NativeFreeablePlacement = nativeHeap) : ArenaBase
ArenaBase

В Kotlin начиная с версии: 1.3

open class ArenaBase(parent: NativeFreeablePlacement = nativeHeap) : AutofreeScope
AutofreeScope

В Kotlin начиная с версии: 1.3

abstract class AutofreeScope : DeferScope, NativePlacement
BetaInteropApi

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS])
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
annotation class BetaInteropApi

Помечает API взаимодействия с Objective-C и Swift как бета-версию.

BooleanVar

В Kotlin начиная с версии: 1.3

typealias BooleanVar = BooleanVarOf<Boolean>
BooleanVarOf

В Kotlin начиная с версии: 1.3

class BooleanVarOf<T : Boolean>(rawPtr: NativePtr) : CPrimitiveVar
ByteVar

В Kotlin начиная с версии: 1.3

typealias ByteVar = ByteVarOf<Byte>
ByteVarOf

В Kotlin начиная с версии: 1.3

class ByteVarOf<T : Byte>(rawPtr: NativePtr) : CPrimitiveVar
CArrayPointer

В Kotlin начиная с версии: 1.3

typealias CArrayPointer<T> = CPointer<T>
CArrayPointerVar

В Kotlin начиная с версии: 1.3

typealias CArrayPointerVar<T> = CPointerVar<T>
CEnum

В Kotlin начиная с версии: 1.3

interface CEnum
CEnumVar

В Kotlin начиная с версии: 1.3

abstract class CEnumVar(rawPtr: NativePtr) : CPrimitiveVar
CFunction

В Kotlin начиная с версии: 1.3

class CFunction<T : Function<*>>(rawPtr: NativePtr) : CPointed

Функция C.

COpaque

В Kotlin начиная с версии: 1.3

abstract class COpaque(rawPtr: NativePtr) : CPointed

CPointed без заданной интерпретации.

COpaquePointer

В Kotlin начиная с версии: 1.3

typealias COpaquePointer = CPointer<out CPointed>

Указатель с непрозрачным типом.

COpaquePointerVar

В Kotlin начиная с версии: 1.3

typealias COpaquePointerVar = CPointerVarOf<COpaquePointer>

Переменная, содержащая COpaquePointer.

CPointed

В Kotlin начиная с версии: 1.3

abstract class CPointed(rawPtr: NativePtr) : NativePointed

Данные или код C.

CPointer

В Kotlin начиная с версии: 1.3

class CPointer<T : CPointed> : CValuesRef<T> 

Указатель C.

CPointerVar

В Kotlin начиная с версии: 1.3

typealias CPointerVar<T> = CPointerVarOf<CPointer<T>>

Переменная данных C, содержащая указатель на T.

CPointerVarOf

В Kotlin начиная с версии: 1.3

class CPointerVarOf<T : CPointer<*>>(rawPtr: NativePtr) : CVariable
CPrimitiveVar

В Kotlin начиная с версии: 1.3

sealed class CPrimitiveVar(rawPtr: NativePtr) : CVariable

Переменная с примитивным типом C, расположенная в памяти.

CStructVar

В Kotlin начиная с версии: 1.3

abstract class CStructVar(rawPtr: NativePtr) : CVariable

Переменная со структурным типом C, расположенная в памяти.

CValue

В Kotlin начиная с версии: 1.3

abstract class CValue<T : CVariable> : CValues<T> 

Единственное неизменяемое значение C. Оно самодостаточно и не зависит от нативной памяти.

CValues

В Kotlin начиная с версии: 1.3

abstract class CValues<T : CVariable> : CValuesRef<T> 

Последовательность (возможно, пустая) неизменяемых значений C. Она самодостаточна и не зависит от нативной памяти.

CValuesRef

В Kotlin начиная с версии: 1.3

abstract class CValuesRef<T : CPointed>

Представляет ссылку на последовательность (возможно, пустую) значений C. Это может быть стабильный указатель CPointer или последовательность неизменяемых значений CValues.

CVariable

В Kotlin начиная с версии: 1.3

abstract class CVariable(rawPtr: NativePtr) : CPointed

Переменная данных C, расположенная в памяти.

DeferScope

В Kotlin начиная с версии: 1.3

open class DeferScope
DoubleVar

В Kotlin начиная с версии: 1.3

typealias DoubleVar = DoubleVarOf<Double>
DoubleVarOf

В Kotlin начиная с версии: 1.3

class DoubleVarOf<T : Double>(rawPtr: NativePtr) : CPrimitiveVar
ExperimentalForeignApi

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.CLASS])
@RequiresOptIn(level = RequiresOptIn.Level.ERROR)
annotation class ExperimentalForeignApi

Помечает API, связанный с иностранными языками, как бета-версию.

ExportObjCClass

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExportObjCClass(val name: String = "")

Делает подкласс Kotlin класса Objective-C доступным для поиска во время выполнения после вызова функции Kotlin main.

ExternalObjCClass

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExternalObjCClass(val protocolGetter: String = "", val binaryName: String = "")
FloatVar

В Kotlin начиная с версии: 1.3

typealias FloatVar = FloatVarOf<Float>
FloatVarOf

В Kotlin начиная с версии: 1.3

class FloatVarOf<T : Float>(rawPtr: NativePtr) : CPrimitiveVar
ForeignException

В Kotlin начиная с версии: 1.3

class ForeignException : Exception
InteropStubs

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.FILE])
annotation class InteropStubs
IntVar

В Kotlin начиная с версии: 1.3

typealias IntVar = IntVarOf<Int>
IntVarOf

В Kotlin начиная с версии: 1.3

class IntVarOf<T : Int>(rawPtr: NativePtr) : CPrimitiveVar
LongVar

В Kotlin начиная с версии: 1.3

typealias LongVar = LongVarOf<Long>
LongVarOf

В Kotlin начиная с версии: 1.3

class LongVarOf<T : Long>(rawPtr: NativePtr) : CPrimitiveVar
MemScope

В Kotlin начиная с версии: 1.3

class MemScope : ArenaBase
NativeFreeablePlacement

В Kotlin начиная с версии: 1.3

interface NativeFreeablePlacement : NativePlacement
nativeHeap

В Kotlin начиная с версии: 1.3

object nativeHeap : NativeFreeablePlacement
NativePlacement

В Kotlin начиная с версии: 1.3

interface NativePlacement
NativePointed

В Kotlin начиная с версии: 1.3

open class NativePointed

Сущность, связанная с нативным указателем. Предполагается, что подтипы представляют интерпретации данных или кода, на которые указывает указатель.

NativePtr

В Kotlin начиная с версии: 1.3

typealias NativePtr = kotlin.native.internal.NativePtr
ObjCAction

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCAction

Делает метод Kotlin в классе Objective-C доступным через диспетчеризацию Objective-C, чтобы его можно было использовать как действие, отправляемое элементом управления в UIKit или AppKit.

ObjCBlockVar

В Kotlin начиная с версии: 1.3

typealias ObjCBlockVar<T> = ObjCNotImplementedVar<T>
ObjCClass

В Kotlin начиная с версии: 1.3

interface ObjCClass : ObjCObject
ObjCClassOf

В Kotlin начиная с версии: 1.3

interface ObjCClassOf<T : ObjCObject> : ObjCClass
ObjCConstructor

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.CONSTRUCTOR])
annotation class ObjCConstructor(val initSelector: String, val designated: Boolean)
ObjCDirect

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCDirect(val symbol: String)
ObjCFactory

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCFactory(val selector: String, val encoding: String, val isStret: Boolean = false)
ObjCMethod

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER])
annotation class ObjCMethod(val selector: String, val encoding: String, val isStret: Boolean = false)
ObjCNotImplementedVar

В Kotlin начиная с версии: 1.3

class ObjCNotImplementedVar<T>(rawPtr: NativePtr) : CVariable
ObjCObject

В Kotlin начиная с версии: 1.3

interface ObjCObject
ObjCObjectBase

В Kotlin начиная с версии: 1.3

abstract class ObjCObjectBase : ObjCObject
ObjCObjectBaseMeta

В Kotlin начиная с версии: 1.3

abstract class ObjCObjectBaseMeta : ObjCObjectBase, ObjCClass
ObjCObjectMeta

В Kotlin начиная с версии: 1.3

typealias ObjCObjectMeta = ObjCClass
ObjCObjectVar

В Kotlin начиная с версии: 1.3

class ObjCObjectVar<T>(rawPtr: NativePtr) : CVariable
ObjCOutlet

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ObjCOutlet

Делает свойство Kotlin в классе Objective-C доступным для установки через диспетчеризацию Objective-C, чтобы использовать его как выходной элемент IB.

ObjCProtocol

В Kotlin начиная с версии: 1.3

interface ObjCProtocol : ObjCObject
ObjCSignatureOverride

В Kotlin начиная с версии: 2.0

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ObjCSignatureOverride

Помечает функции, для которых следует использовать правила Objective-C при определении того, конфликтуют ли две функции.

ObjCStringVarOf

В Kotlin начиная с версии: 1.3

typealias ObjCStringVarOf<T> = ObjCNotImplementedVar<T>
ObjCUnavailable

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR])
annotation class ObjCUnavailable
Pinned

В Kotlin начиная с версии: 1.3

class Pinned<T : Any>
ShortVar

В Kotlin начиная с версии: 1.3

typealias ShortVar = ShortVarOf<Short>
ShortVarOf

В Kotlin начиная с версии: 1.3

class ShortVarOf<T : Short>(rawPtr: NativePtr) : CPrimitiveVar
StableRef

В Kotlin начиная с версии: 1.3

@JvmInline
value class StableRef<out T : Any>

Этот класс позволяет создавать стабильный дескриптор для любого объекта Kotlin. После преобразования в CPointer его можно безопасно передать в нативный код, например, чтобы получить его в обратном вызове Kotlin.

UByteVar

В Kotlin начиная с версии: 1.3

typealias UByteVar = UByteVarOf<UByte>
UByteVarOf

В Kotlin начиная с версии: 1.3

class UByteVarOf<T : UByte>(rawPtr: NativePtr) : CPrimitiveVar
UIntVar

В Kotlin начиная с версии: 1.3

typealias UIntVar = UIntVarOf<UInt>
UIntVarOf

В Kotlin начиная с версии: 1.3

class UIntVarOf<T : UInt>(rawPtr: NativePtr) : CPrimitiveVar
ULongVar

В Kotlin начиная с версии: 1.3

typealias ULongVar = ULongVarOf<ULong>
ULongVarOf

В Kotlin начиная с версии: 1.3

class ULongVarOf<T : ULong>(rawPtr: NativePtr) : CPrimitiveVar
UnsafeNumber

В Kotlin начиная с версии: 1.3

@Target(allowedTargets = [AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY])
@RequiresOptIn(message = "The declaration is using numbers with different bit widths in least two actual platforms. Such types shall not be used in user-defined 'expect fun' signatures", level = RequiresOptIn.Level.ERROR)
annotation class UnsafeNumber(val actualPlatformTypes: Array<String>)

Маркер для объявлений, которые зависят от числовых типов разной разрядности как минимум на двух платформах.

UShortVar

В Kotlin начиная с версии: 1.3

typealias UShortVar = UShortVarOf<UShort>
UShortVarOf

Начиная с Kotlin: 1.3

class UShortVarOf<T : UShort>(rawPtr: NativePtr) : CPrimitiveVar
Vector128

Начиная с Kotlin: 1.9

class Vector128
Vector128Var

Начиная с Kotlin: 1.9

typealias Vector128Var = Vector128VarOf<Vector128>
Vector128VarOf

Начиная с Kotlin: 1.9

class Vector128VarOf<T : Vector128>(rawPtr: NativePtr) : CVariable

Свойства

cstr

Начиная с Kotlin: 1.3

val String.cstr: CValues<ByteVar>
nativeNullPtr

Начиная с Kotlin: 1.3

val nativeNullPtr: NativePtr
pointed

Начиная с Kotlin: 1.3

var <T : CPointed, P : CPointer<T>> CPointerVarOf<P>.pointed: T?

Код или данные, на которые указывает значение этой переменной.

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

Возвращает соответствующий объект CPointed.

ptr

Начиная с Kotlin: 1.3

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

Возвращает указатель на эти данные или код.

rawPtr

Начиная с Kotlin: 1.3

val NativePointed?.rawPtr: NativePtr
rawValue

Начиная с Kotlin: 1.3

val CPointer<*>?.rawValue: NativePtr
utf16

Начиная с Kotlin: 1.3

val String.utf16: CValues<UShortVar>
utf32

Начиная с Kotlin: 1.3

val String.utf32: CValues<IntVar>
utf8

Начиная с Kotlin: 1.3

val String.utf8: CValues<ByteVar>
value

Начиная с Kotlin: 1.3

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

Значение этой переменной.

var <T : Vector128> Vector128VarOf<T>.value: T
wcstr

Начиная с Kotlin: 1.3

val String.wcstr: CValues<UShortVar>

Функции

addressOf

Начиная с Kotlin: 1.3

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

Начиная с Kotlin: 1.3

inline fun <T : CVariable> alignOf(): Int
alloc

Начиная с Kotlin: 1.3

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

Выделяет память для переменной указанного типа.

fun <T : Boolean> NativePlacement.alloc(value: T): BooleanVarOf<T>
fun <T : Byte> NativePlacement.alloc(value: T): ByteVarOf<T>
fun <T : Double> NativePlacement.alloc(value: T): DoubleVarOf<T>
fun <T : Float> NativePlacement.alloc(value: T): FloatVarOf<T>
fun <T : Int> NativePlacement.alloc(value: T): IntVarOf<T>
fun <T : Long> NativePlacement.alloc(value: T): LongVarOf<T>
fun <T : Short> NativePlacement.alloc(value: T): ShortVarOf<T>
fun <T : UByte> NativePlacement.alloc(value: T): UByteVarOf<T>
fun <T : UInt> NativePlacement.alloc(value: T): UIntVarOf<T>
fun <T : ULong> NativePlacement.alloc(value: T): ULongVarOf<T>
fun <T : UShort> NativePlacement.alloc(value: T): UShortVarOf<T>

Выделяет память для переменной указанного типа значения и инициализирует её заданным значением.

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

Выделяет память для переменной указанного типа и инициализирует её, применяя заданный блок.

allocArray

Начиная с Kotlin: 1.3

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

Выделяет память для массива C с указанными типом элементов и длиной.

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>

Выделяет память для массива C с указанными типом элементов и длиной и инициализирует его элементы, применяя заданный блок.

allocArrayOf

Начиная с Kotlin: 1.3

fun NativePlacement.allocArrayOf(elements: ByteArray): CArrayPointer<ByteVar>
fun NativePlacement.allocArrayOf(vararg elements: Float): CArrayPointer<FloatVar>
inline fun <T : CPointer<*>> NativePlacement.allocArrayOf(elements: List<T?>): CArrayPointer<CPointerVarOf<T>>
inline fun <T : CPointer<*>> NativePlacement.allocArrayOf(vararg elements: T?): CArrayPointer<CPointerVarOf<T>>

Выделяет память для массива C с указанными значениями.

allocArrayOfPointersTo

Начиная с Kotlin: 1.3

fun <T : CPointed> NativePlacement.allocArrayOfPointersTo(elements: List<T?>): CArrayPointer<CPointerVar<T>>
fun <T : CPointed> NativePlacement.allocArrayOfPointersTo(vararg elements: T?): CArrayPointer<CPointerVar<T>>

Выделяет память для массива C указателей на заданные элементы.

allocPointerTo

Начиная с Kotlin: 1.3

fun <T : CPointed> NativePlacement.allocPointerTo(): CPointerVar<T>
arrayMemberAt

Начиная с Kotlin: 1.3

inline fun <T : CVariable> CStructVar.arrayMemberAt(offset: Long): CArrayPointer<T>
asStableRef

Начиная с Kotlin: 1.3

inline fun <T : Any> CPointer<*>.asStableRef(): StableRef<T>

Преобразует этот непрозрачный указатель, созданный с помощью StableRef.asCPointer, в StableRef.

autoreleasepool

Начиная с Kotlin: 1.3

inline fun <R> autoreleasepool(block: () -> R): R
bitsToDouble

Начиная с Kotlin: 1.3

external fun bitsToDouble(bits: Long): Double
bitsToFloat

Начиная с Kotlin: 1.3

external fun bitsToFloat(bits: Int): Float
convert

Начиная с Kotlin: 1.3

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
copy

Начиная с Kotlin: 1.3

inline fun <T : CStructVar> CValue<T>.copy(modify: T.() -> Unit): CValue<T>
createKotlinObjectHolder

Начиная с Kotlin: 1.3

external fun createKotlinObjectHolder(any: Any?): NativePtr
createValues

Начиная с Kotlin: 1.3

inline fun <T : CVariable> createValues(count: Int, initializer: T.(index: Int) -> Unit): CValues<T>
cValue

Начиная с Kotlin: 1.3

inline fun <T : CVariable> cValue(): CValue<T>
inline fun <T : CStructVar> cValue(initialize: T.() -> Unit): CValue<T>
cValuesOf

Начиная с Kotlin: 1.3

fun cValuesOf(vararg elements: Byte): CValues<ByteVar>

Возвращает последовательность неизменяемых значений CValues для передачи в код C.

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>
fun <T : CPointed> cValuesOf(vararg elements: CPointer<T>?): CValues<CPointerVar<T>>
free

Начиная с Kotlin: 1.3

fun NativeFreeablePlacement.free(pointer: CPointer<*>)
fun NativeFreeablePlacement.free(pointed: NativePointed)
get

Начиная с Kotlin: 1.3

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
getBytes

Начиная с Kotlin: 1.3

fun <T : CVariable> CValues<T>.getBytes(): ByteArray
getOriginalKotlinClass

Начиная с Kotlin: 1.3

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

Если objCClass — класс, сгенерированный в заголовок Objective-C для класса Kotlin, возвращает KClass исходного класса Kotlin.

fun getOriginalKotlinClass(objCProtocol: ObjCProtocol): KClass<*>?

Если objCProtocol — протокол, сгенерированный в заголовок Objective-C для класса Kotlin, возвращает KClass исходного класса Kotlin.

getRawPointer

Начиная с Kotlin: 1.3

external fun NativePointed.getRawPointer(): NativePtr
getRawValue

Начиная с Kotlin: 1.3

external fun CPointer<*>.getRawValue(): NativePtr
initBy

Начиная с Kotlin: 1.3

external fun <T : ObjCObjectBase> T.initBy(constructorCall: T): T
interpretCPointer

Начиная с Kotlin: 1.3

external fun <T : CPointed> interpretCPointer(rawValue: NativePtr): CPointer<T>?

Выполняет приведение типа CPointer из заданного указателя на необработанные данные.

interpretNullableOpaquePointed

Начиная с Kotlin: 1.3

fun interpretNullableOpaquePointed(ptr: NativePtr): NativePointed?
interpretNullablePointed

Начиная с Kotlin: 1.3

external fun <T : NativePointed> interpretNullablePointed(ptr: NativePtr): T?

Выполняет приведение типа нативного указателя к заданному типу взаимодействия, включая значения null.

interpretObjCPointer

Начиная с Kotlin: 1.3

inline fun <T : Any> interpretObjCPointer(objcPtr: NativePtr): T
interpretObjCPointerOrNull

Начиная с Kotlin: 1.3

external fun <T> interpretObjCPointerOrNull(objcPtr: NativePtr): T?
interpretOpaquePointed

Начиная с Kotlin: 1.3

fun interpretOpaquePointed(ptr: NativePtr): NativePointed
interpretPointed

Начиная с Kotlin: 1.3

inline fun <T : NativePointed> interpretPointed(ptr: NativePtr): T

Возвращает интерпретацию сущности по заданному указателю.

invoke

Начиная с Kotlin: 1.3

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
memberAt

Начиная с Kotlin: 1.3

inline fun <T : CPointed> CStructVar.memberAt(offset: Long): T

Возвращает член этого CStructVar, расположенный по заданному смещению в байтах.

memScoped

Начиная с Kotlin: 1.3

inline fun <R> memScoped(block: MemScope.() -> R): R

Выполняет заданный блок, выделяя память, которая будет автоматически освобождена в конце этой области видимости.

narrow

Начиная с Kotlin: 1.3

inline external fun <R : Number> Number.narrow(): R
objc_autoreleasePoolPop

Начиная с Kotlin: 1.3

external fun objc_autoreleasePoolPop(ptr: NativePtr)
objc_autoreleasePoolPush

Начиная с Kotlin: 1.3

external fun objc_autoreleasePoolPush(): NativePtr
objc_release

Начиная с Kotlin: 1.3

external fun objc_release(ptr: NativePtr)
objc_retain

Начиная с Kotlin: 1.3

external fun objc_retain(ptr: NativePtr): NativePtr
objc_retainAutoreleaseReturnValue

Начиная с Kotlin: 1.3

external fun objc_retainAutoreleaseReturnValue(ptr: NativePtr): NativePtr
objcPtr

Начиная с Kotlin: 1.3

external fun Any?.objcPtr(): NativePtr
optional

Начиная с Kotlin: 1.3

fun optional(): Nothing
pin

Начиная с Kotlin: 1.3

inline fun <T : Any> T.pin(): Pinned<T>
placeTo

Начиная с Kotlin: 1.3

fun <T : CVariable> CValues<T>.placeTo(scope: AutofreeScope): CPointer<T>
plus

Начиная с Kotlin: 1.3

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>?
readBits

Начиная с Kotlin: 1.3

external fun readBits(ptr: NativePtr, offset: Long, size: Int, signed: Boolean): Long
readBytes

Начиная с Kotlin: 1.3

fun COpaquePointer.readBytes(count: Int): ByteArray
readValue

Начиная с Kotlin: 1.3

inline fun <T : CStructVar> T.readValue(): CValue<T>
fun <T : CVariable> CPointed.readValue(size: Long, align: Int): CValue<T>
readValues

Начиная с Kotlin: 1.3

inline fun <T : CVariable> T.readValues(count: Int): CValues<T>
fun <T : CVariable> CPointed.readValues(size: Int, align: Int): CValues<T>
refTo

Начиная с Kotlin: 1.3

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

Начиная с Kotlin: 1.3

fun <T : CPointed> CPointer<*>.reinterpret(): CPointer<T>
inline fun <T : NativePointed> NativePointed.reinterpret(): T

Изменяет интерпретацию данных или кода, на которые указывает указатель.

set

Начиная с Kotlin: 1.3

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)
signExtend

Начиная с Kotlin: 1.3

inline external fun <R : Number> Number.signExtend(): R
sizeOf

Начиная с Kotlin: 1.3

inline fun <T : CVariable> sizeOf(): Long
staticCFunction

Начиная с Kotlin: 1.3

external fun <R> staticCFunction(function: () -> R): CPointer<CFunction<() -> R>>

Возвращает указатель на функцию C, которая вызывает заданную статическую функцию Kotlin.

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>>
toBoolean

Начиная с Kotlin: 1.3

inline fun Byte.toBoolean(): Boolean
toByte

Начиная с Kotlin: 1.3

inline fun Boolean.toByte(): Byte
toCPointer

Начиная с Kotlin: 1.3

fun <T : CPointed> Long.toCPointer(): CPointer<T>?
toCStringArray

Начиная с Kotlin: 1.3

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

Преобразует этот массив строк Kotlin в массив строк C, выделяя память для массива и строк C с помощью заданного AutofreeScope.

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

Преобразует этот список строк Kotlin в массив строк C, выделяя память для массива и строк C с помощью заданного AutofreeScope.

toCValues

Начиная с Kotlin: 1.3

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

Начиная с Kotlin: 1.3

fun ByteArray.toKString(): String

Декодирует строку из байтов этого массива в кодировке UTF-8. Байты после первого вхождения байта 0, если он встречается, не декодируются.

fun CPointer<ByteVar>.toKString(): String
fun CPointer<ShortVar>.toKString(): String
fun CPointer<UShortVar>.toKString(): String
fun ByteArray.toKString(startIndex: Int = 0, endIndex: Int = this.size, throwOnInvalidSequence: Boolean = false): String

Декодирует строку из байтов этого массива или его поддиапазона в кодировке UTF-8. Байты после первого вхождения байта 0, если он встречается, не декодируются.

toKStringFromUtf16

Начиная с Kotlin: 1.3

fun CPointer<ShortVar>.toKStringFromUtf16(): String
fun CPointer<UShortVar>.toKStringFromUtf16(): String
toKStringFromUtf32

Начиная с Kotlin: 1.3

fun CPointer<IntVar>.toKStringFromUtf32(): String
toKStringFromUtf8

Начиная с Kotlin: 1.3

fun CPointer<ByteVar>.toKStringFromUtf8(): String
toLong

Начиная с Kotlin: 1.3

fun <T : CPointed> CPointer<T>?.toLong(): Long
typeOf

Начиная с Kotlin: 1.3

fun <T : CVariable> typeOf(): CVariable.Type
unwrapKotlinObjectHolder

Начиная с Kotlin: 1.3

inline fun <T : Any> unwrapKotlinObjectHolder(holder: Any?): T
useContents

Начиная с Kotlin: 1.3

inline fun <T : CStructVar, R> CValue<T>.useContents(block: T.() -> R): R

Вызывает block, передавая ему временную копию этого значения в качестве получателя.

usePinned

Начиная с Kotlin: 1.3

inline fun <T : Any, R> T.usePinned(block: (Pinned<T>) -> R): R
vectorOf

Начиная с Kotlin: 1.9

external fun vectorOf(f0: Float, f1: Float, f2: Float, f3: Float): Vector128
external fun vectorOf(f0: Int, f1: Int, f2: Int, f3: Int): Vector128
write

Начиная с Kotlin: 1.3

fun <T : CVariable> CValue<T>.write(location: NativePtr)
writeBits

Начиная с Kotlin: 1.3

external fun writeBits(ptr: NativePtr, offset: Long, size: Int, value: Long)
zeroValue

Начиная с Kotlin: 1.3

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

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API