Garbage collection capable wrappers for skia interop
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlinx.cinterop
|
||||
|
||||
import kotlinx.cinterop.CStructVar
|
||||
|
||||
interface SkiaRefCnt
|
||||
interface CPlusPlusClass
|
||||
|
||||
abstract class ManagedType<T : CStructVar>(val cpp: T)
|
||||
|
||||
val <T : CStructVar> ManagedType<T>.ptr: CPointer<T> get() = this.cpp.ptr
|
||||
+4
@@ -24,6 +24,10 @@ annotation class CStruct(val spelling: String) {
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class VarType(val size: Long, val align: Int)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class CPlusPlusClass
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class ManagedType
|
||||
|
||||
Reference in New Issue
Block a user