@openeditor/react-native-prose-editor 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +35 -0
- package/android/src/main/java/com/apollohg/editor/CaretGeometry.kt +2 -2
- package/android/src/main/java/com/apollohg/editor/EditorEditText.kt +138 -597
- package/android/src/main/java/com/apollohg/editor/EditorInputConnection.kt +13 -3
- package/android/src/main/java/com/apollohg/editor/InputSnapshotSupport.kt +6 -0
- package/android/src/main/java/com/apollohg/editor/NativeBlockEditorSurface.kt +1086 -0
- package/android/src/main/java/com/apollohg/editor/NativeEditorExpoView.kt +1 -1
- package/android/src/main/java/com/apollohg/editor/NativeEditorModule.kt +26 -50
- package/android/src/main/java/com/apollohg/editor/NativeImageLoader.kt +89 -0
- package/android/src/main/java/com/apollohg/editor/RemoteSelectionOverlayView.kt +31 -66
- package/android/src/main/java/com/apollohg/editor/RichTextEditorView.kt +98 -33
- package/dist/EditorToolbar.d.ts +1 -1
- package/dist/EditorToolbar.js +19 -0
- package/dist/NativeEditorBridge.d.ts +62 -35
- package/dist/NativeEditorBridge.js +122 -79
- package/dist/NativeProseViewer.d.ts +13 -34
- package/dist/NativeProseViewer.js +40 -465
- package/dist/NativeRichTextEditor.d.ts +10 -1
- package/dist/NativeRichTextEditor.js +72 -34
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/schemas.d.ts +11 -0
- package/dist/schemas.js +149 -0
- package/dist/useNativeEditor.d.ts +3 -3
- package/dist/useNativeEditor.js +3 -3
- package/ios/EditorCore.xcframework/ios-arm64/libeditor_core.a +0 -0
- package/ios/EditorCore.xcframework/ios-arm64_x86_64-simulator/libeditor_core.a +0 -0
- package/ios/Generated_editor_core.swift +97 -2
- package/ios/NativeBlockEditorSurface.swift +1393 -0
- package/ios/NativeEditorExpoView.swift +3 -3
- package/ios/NativeEditorModule.swift +30 -45
- package/ios/NativeInputSupport.swift +396 -0
- package/ios/PositionBridge.swift +4 -4
- package/ios/RichTextEditorView.swift +333 -786
- package/ios/editor_coreFFI/editor_coreFFI.h +147 -70
- package/package.json +1 -1
- package/rust/android/arm64-v8a/libeditor_core.so +0 -0
- package/rust/android/armeabi-v7a/libeditor_core.so +0 -0
- package/rust/android/x86_64/libeditor_core.so +0 -0
- package/rust/bindings/kotlin/uniffi/editor_core/editor_core.kt +2087 -1399
- package/android/src/androidTest/AndroidManifest.xml +0 -8
- package/android/src/androidTest/java/com/apollohg/editor/MeasureHeightInstrumentedTest.kt +0 -53
- package/android/src/androidTest/java/com/apollohg/editor/NativeDeviceCollaborationInitialSyncTest.kt +0 -241
- package/android/src/androidTest/java/com/apollohg/editor/NativeDeviceImeRegressionTest.kt +0 -338
- package/android/src/androidTest/java/com/apollohg/editor/NativeDeviceOutsideTapTest.kt +0 -789
- package/android/src/androidTest/java/com/apollohg/editor/NativeDevicePerformanceTest.kt +0 -350
- package/android/src/androidTest/java/com/apollohg/editor/NativeEditorOutsideTapActivity.kt +0 -5
- package/android/src/main/java/com/apollohg/editor/NativeProseViewerExpoView.kt +0 -315
- package/android/src/main/java/com/apollohg/editor/RenderBridge.kt +0 -2172
- package/android/src/sharedTest/java/com/apollohg/editor/NativePerformanceSupport.kt +0 -482
- package/android/src/test/java/com/apollohg/editor/CaretGeometryTest.kt +0 -137
- package/android/src/test/java/com/apollohg/editor/EditorEditTextHardwareKeyTest.kt +0 -321
- package/android/src/test/java/com/apollohg/editor/EditorInputConnectionTest.kt +0 -4202
- package/android/src/test/java/com/apollohg/editor/NativeEditorExpoViewTest.kt +0 -2581
- package/android/src/test/java/com/apollohg/editor/NativeEditorModuleTest.kt +0 -27
- package/android/src/test/java/com/apollohg/editor/NativePerformanceTest.kt +0 -197
- package/android/src/test/java/com/apollohg/editor/NativeProseViewerExpoViewTest.kt +0 -84
- package/android/src/test/java/com/apollohg/editor/NativeToolbarTest.kt +0 -544
- package/android/src/test/java/com/apollohg/editor/PositionBridgeTest.kt +0 -461
- package/android/src/test/java/com/apollohg/editor/RenderBridgeTest.kt +0 -2054
- package/android/src/test/java/com/apollohg/editor/RichTextEditorViewTest.kt +0 -1367
- package/ios/EditorLayoutManager.swift +0 -774
- package/ios/NativeProseViewerExpoView.swift +0 -276
- package/ios/RenderBridge.swift +0 -1708
- package/ios/Tests/NativePerformanceTests.swift +0 -687
- package/ios/Tests/PositionBridgeTests.swift +0 -706
- package/ios/Tests/RenderBridgeTests.swift +0 -2236
- package/ios/Tests/RichTextEditorViewTests.swift +0 -6548
|
@@ -17,19 +17,19 @@ package uniffi.editor_core
|
|
|
17
17
|
// compile the Rust component. The easiest way to ensure this is to bundle the Kotlin
|
|
18
18
|
// helpers directly inline like we're doing here.
|
|
19
19
|
|
|
20
|
-
import com.sun.jna.
|
|
20
|
+
import com.sun.jna.Callback
|
|
21
21
|
import com.sun.jna.IntegerType
|
|
22
|
+
import com.sun.jna.Library
|
|
22
23
|
import com.sun.jna.Native
|
|
23
24
|
import com.sun.jna.Pointer
|
|
24
25
|
import com.sun.jna.Structure
|
|
25
|
-
import com.sun.jna.Callback
|
|
26
26
|
import com.sun.jna.ptr.*
|
|
27
27
|
import java.nio.ByteBuffer
|
|
28
28
|
import java.nio.ByteOrder
|
|
29
29
|
import java.nio.CharBuffer
|
|
30
30
|
import java.nio.charset.CodingErrorAction
|
|
31
|
-
import java.util.concurrent.atomic.AtomicLong
|
|
32
31
|
import java.util.concurrent.ConcurrentHashMap
|
|
32
|
+
import java.util.concurrent.atomic.AtomicLong
|
|
33
33
|
|
|
34
34
|
// This is a helper for safely working with byte buffers returned from the Rust code.
|
|
35
35
|
// A rust-owned buffer is represented by its capacity, its current length, and a
|
|
@@ -43,29 +43,41 @@ open class RustBuffer : Structure() {
|
|
|
43
43
|
// Note: `capacity` and `len` are actually `ULong` values, but JVM only supports signed values.
|
|
44
44
|
// When dealing with these fields, make sure to call `toULong()`.
|
|
45
45
|
@JvmField var capacity: Long = 0
|
|
46
|
+
|
|
46
47
|
@JvmField var len: Long = 0
|
|
48
|
+
|
|
47
49
|
@JvmField var data: Pointer? = null
|
|
48
50
|
|
|
49
|
-
class ByValue:
|
|
50
|
-
|
|
51
|
+
class ByValue :
|
|
52
|
+
RustBuffer(),
|
|
53
|
+
Structure.ByValue
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
class ByReference :
|
|
56
|
+
RustBuffer(),
|
|
57
|
+
Structure.ByReference
|
|
58
|
+
|
|
59
|
+
internal fun setValue(other: RustBuffer) {
|
|
53
60
|
capacity = other.capacity
|
|
54
61
|
len = other.len
|
|
55
62
|
data = other.data
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
companion object {
|
|
59
|
-
internal fun alloc(size: ULong = 0UL) =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
internal fun alloc(size: ULong = 0UL) =
|
|
67
|
+
uniffiRustCall { status ->
|
|
68
|
+
// Note: need to convert the size to a `Long` value to make this work with JVM.
|
|
69
|
+
UniffiLib.INSTANCE.ffi_editor_core_rustbuffer_alloc(size.toLong(), status)
|
|
70
|
+
}.also {
|
|
71
|
+
if (it.data == null) {
|
|
72
|
+
throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=$size)")
|
|
73
|
+
}
|
|
74
|
+
}
|
|
67
75
|
|
|
68
|
-
internal fun create(
|
|
76
|
+
internal fun create(
|
|
77
|
+
capacity: ULong,
|
|
78
|
+
len: ULong,
|
|
79
|
+
data: Pointer?,
|
|
80
|
+
): RustBuffer.ByValue {
|
|
69
81
|
var buf = RustBuffer.ByValue()
|
|
70
82
|
buf.capacity = capacity.toLong()
|
|
71
83
|
buf.len = len.toLong()
|
|
@@ -73,9 +85,10 @@ open class RustBuffer : Structure() {
|
|
|
73
85
|
return buf
|
|
74
86
|
}
|
|
75
87
|
|
|
76
|
-
internal fun free(buf: RustBuffer.ByValue) =
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
internal fun free(buf: RustBuffer.ByValue) =
|
|
89
|
+
uniffiRustCall { status ->
|
|
90
|
+
UniffiLib.INSTANCE.ffi_editor_core_rustbuffer_free(buf, status)
|
|
91
|
+
}
|
|
79
92
|
}
|
|
80
93
|
|
|
81
94
|
@Suppress("TooGenericExceptionThrown")
|
|
@@ -128,10 +141,14 @@ class RustBufferByReference : ByReference(16) {
|
|
|
128
141
|
@Structure.FieldOrder("len", "data")
|
|
129
142
|
internal open class ForeignBytes : Structure() {
|
|
130
143
|
@JvmField var len: Int = 0
|
|
144
|
+
|
|
131
145
|
@JvmField var data: Pointer? = null
|
|
132
146
|
|
|
133
|
-
class ByValue :
|
|
147
|
+
class ByValue :
|
|
148
|
+
ForeignBytes(),
|
|
149
|
+
Structure.ByValue
|
|
134
150
|
}
|
|
151
|
+
|
|
135
152
|
/**
|
|
136
153
|
* The FfiConverter interface handles converter types to and from the FFI
|
|
137
154
|
*
|
|
@@ -161,7 +178,10 @@ public interface FfiConverter<KotlinType, FfiType> {
|
|
|
161
178
|
fun allocationSize(value: KotlinType): ULong
|
|
162
179
|
|
|
163
180
|
// Write a Kotlin type to a `ByteBuffer`
|
|
164
|
-
fun write(
|
|
181
|
+
fun write(
|
|
182
|
+
value: KotlinType,
|
|
183
|
+
buf: ByteBuffer,
|
|
184
|
+
)
|
|
165
185
|
|
|
166
186
|
// Lower a value into a `RustBuffer`
|
|
167
187
|
//
|
|
@@ -172,9 +192,10 @@ public interface FfiConverter<KotlinType, FfiType> {
|
|
|
172
192
|
fun lowerIntoRustBuffer(value: KotlinType): RustBuffer.ByValue {
|
|
173
193
|
val rbuf = RustBuffer.alloc(allocationSize(value))
|
|
174
194
|
try {
|
|
175
|
-
val bbuf =
|
|
176
|
-
|
|
177
|
-
|
|
195
|
+
val bbuf =
|
|
196
|
+
rbuf.data!!.getByteBuffer(0, rbuf.capacity).also {
|
|
197
|
+
it.order(ByteOrder.BIG_ENDIAN)
|
|
198
|
+
}
|
|
178
199
|
write(value, bbuf)
|
|
179
200
|
rbuf.writeField("len", bbuf.position().toLong())
|
|
180
201
|
return rbuf
|
|
@@ -191,11 +212,11 @@ public interface FfiConverter<KotlinType, FfiType> {
|
|
|
191
212
|
fun liftFromRustBuffer(rbuf: RustBuffer.ByValue): KotlinType {
|
|
192
213
|
val byteBuf = rbuf.asByteBuffer()!!
|
|
193
214
|
try {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
215
|
+
val item = read(byteBuf)
|
|
216
|
+
if (byteBuf.hasRemaining()) {
|
|
217
|
+
throw RuntimeException("junk remaining in buffer after lifting, something is very wrong!!")
|
|
218
|
+
}
|
|
219
|
+
return item
|
|
199
220
|
} finally {
|
|
200
221
|
RustBuffer.free(rbuf)
|
|
201
222
|
}
|
|
@@ -207,8 +228,9 @@ public interface FfiConverter<KotlinType, FfiType> {
|
|
|
207
228
|
*
|
|
208
229
|
* @suppress
|
|
209
230
|
*/
|
|
210
|
-
public interface FfiConverterRustBuffer<KotlinType
|
|
231
|
+
public interface FfiConverterRustBuffer<KotlinType> : FfiConverter<KotlinType, RustBuffer.ByValue> {
|
|
211
232
|
override fun lift(value: RustBuffer.ByValue) = liftFromRustBuffer(value)
|
|
233
|
+
|
|
212
234
|
override fun lower(value: KotlinType) = lowerIntoRustBuffer(value)
|
|
213
235
|
}
|
|
214
236
|
// A handful of classes and functions to support the generated data structures.
|
|
@@ -221,24 +243,24 @@ internal const val UNIFFI_CALL_UNEXPECTED_ERROR = 2.toByte()
|
|
|
221
243
|
@Structure.FieldOrder("code", "error_buf")
|
|
222
244
|
internal open class UniffiRustCallStatus : Structure() {
|
|
223
245
|
@JvmField var code: Byte = 0
|
|
246
|
+
|
|
224
247
|
@JvmField var error_buf: RustBuffer.ByValue = RustBuffer.ByValue()
|
|
225
248
|
|
|
226
|
-
class ByValue:
|
|
249
|
+
class ByValue :
|
|
250
|
+
UniffiRustCallStatus(),
|
|
251
|
+
Structure.ByValue
|
|
227
252
|
|
|
228
|
-
fun isSuccess(): Boolean
|
|
229
|
-
return code == UNIFFI_CALL_SUCCESS
|
|
230
|
-
}
|
|
253
|
+
fun isSuccess(): Boolean = code == UNIFFI_CALL_SUCCESS
|
|
231
254
|
|
|
232
|
-
fun isError(): Boolean
|
|
233
|
-
return code == UNIFFI_CALL_ERROR
|
|
234
|
-
}
|
|
255
|
+
fun isError(): Boolean = code == UNIFFI_CALL_ERROR
|
|
235
256
|
|
|
236
|
-
fun isPanic(): Boolean
|
|
237
|
-
return code == UNIFFI_CALL_UNEXPECTED_ERROR
|
|
238
|
-
}
|
|
257
|
+
fun isPanic(): Boolean = code == UNIFFI_CALL_UNEXPECTED_ERROR
|
|
239
258
|
|
|
240
259
|
companion object {
|
|
241
|
-
fun create(
|
|
260
|
+
fun create(
|
|
261
|
+
code: Byte,
|
|
262
|
+
errorBuf: RustBuffer.ByValue,
|
|
263
|
+
): UniffiRustCallStatus.ByValue {
|
|
242
264
|
val callStatus = UniffiRustCallStatus.ByValue()
|
|
243
265
|
callStatus.code = code
|
|
244
266
|
callStatus.error_buf = errorBuf
|
|
@@ -247,7 +269,9 @@ internal open class UniffiRustCallStatus : Structure() {
|
|
|
247
269
|
}
|
|
248
270
|
}
|
|
249
271
|
|
|
250
|
-
class InternalException(
|
|
272
|
+
class InternalException(
|
|
273
|
+
message: String,
|
|
274
|
+
) : kotlin.Exception(message)
|
|
251
275
|
|
|
252
276
|
/**
|
|
253
277
|
* Each top-level error class has a companion object that can lift the error from the call status's rust buffer
|
|
@@ -255,7 +279,7 @@ class InternalException(message: String) : kotlin.Exception(message)
|
|
|
255
279
|
* @suppress
|
|
256
280
|
*/
|
|
257
281
|
interface UniffiRustCallStatusErrorHandler<E> {
|
|
258
|
-
fun lift(error_buf: RustBuffer.ByValue): E
|
|
282
|
+
fun lift(error_buf: RustBuffer.ByValue): E
|
|
259
283
|
}
|
|
260
284
|
|
|
261
285
|
// Helpers for calling Rust
|
|
@@ -263,7 +287,10 @@ interface UniffiRustCallStatusErrorHandler<E> {
|
|
|
263
287
|
// synchronize itself
|
|
264
288
|
|
|
265
289
|
// Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err
|
|
266
|
-
private inline fun <U, E: kotlin.Exception> uniffiRustCallWithError(
|
|
290
|
+
private inline fun <U, E : kotlin.Exception> uniffiRustCallWithError(
|
|
291
|
+
errorHandler: UniffiRustCallStatusErrorHandler<E>,
|
|
292
|
+
callback: (UniffiRustCallStatus) -> U,
|
|
293
|
+
): U {
|
|
267
294
|
var status = UniffiRustCallStatus()
|
|
268
295
|
val return_value = callback(status)
|
|
269
296
|
uniffiCheckCallStatus(errorHandler, status)
|
|
@@ -271,7 +298,10 @@ private inline fun <U, E: kotlin.Exception> uniffiRustCallWithError(errorHandler
|
|
|
271
298
|
}
|
|
272
299
|
|
|
273
300
|
// Check UniffiRustCallStatus and throw an error if the call wasn't successful
|
|
274
|
-
private fun<E: kotlin.Exception> uniffiCheckCallStatus(
|
|
301
|
+
private fun <E : kotlin.Exception> uniffiCheckCallStatus(
|
|
302
|
+
errorHandler: UniffiRustCallStatusErrorHandler<E>,
|
|
303
|
+
status: UniffiRustCallStatus,
|
|
304
|
+
) {
|
|
275
305
|
if (status.isSuccess()) {
|
|
276
306
|
return
|
|
277
307
|
} else if (status.isError()) {
|
|
@@ -295,7 +325,7 @@ private fun<E: kotlin.Exception> uniffiCheckCallStatus(errorHandler: UniffiRustC
|
|
|
295
325
|
*
|
|
296
326
|
* @suppress
|
|
297
327
|
*/
|
|
298
|
-
object UniffiNullRustCallStatusErrorHandler: UniffiRustCallStatusErrorHandler<InternalException> {
|
|
328
|
+
object UniffiNullRustCallStatusErrorHandler : UniffiRustCallStatusErrorHandler<InternalException> {
|
|
299
329
|
override fun lift(error_buf: RustBuffer.ByValue): InternalException {
|
|
300
330
|
RustBuffer.free(error_buf)
|
|
301
331
|
return InternalException("Unexpected CALL_ERROR")
|
|
@@ -303,32 +333,31 @@ object UniffiNullRustCallStatusErrorHandler: UniffiRustCallStatusErrorHandler<In
|
|
|
303
333
|
}
|
|
304
334
|
|
|
305
335
|
// Call a rust function that returns a plain value
|
|
306
|
-
private inline fun <U> uniffiRustCall(callback: (UniffiRustCallStatus) -> U): U
|
|
307
|
-
|
|
308
|
-
}
|
|
336
|
+
private inline fun <U> uniffiRustCall(callback: (UniffiRustCallStatus) -> U): U =
|
|
337
|
+
uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback)
|
|
309
338
|
|
|
310
|
-
internal inline fun<T> uniffiTraitInterfaceCall(
|
|
339
|
+
internal inline fun <T> uniffiTraitInterfaceCall(
|
|
311
340
|
callStatus: UniffiRustCallStatus,
|
|
312
341
|
makeCall: () -> T,
|
|
313
342
|
writeReturn: (T) -> Unit,
|
|
314
343
|
) {
|
|
315
344
|
try {
|
|
316
345
|
writeReturn(makeCall())
|
|
317
|
-
} catch(e: kotlin.Exception) {
|
|
346
|
+
} catch (e: kotlin.Exception) {
|
|
318
347
|
callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR
|
|
319
348
|
callStatus.error_buf = FfiConverterString.lower(e.toString())
|
|
320
349
|
}
|
|
321
350
|
}
|
|
322
351
|
|
|
323
|
-
internal inline fun<T, reified E: Throwable> uniffiTraitInterfaceCallWithError(
|
|
352
|
+
internal inline fun <T, reified E : Throwable> uniffiTraitInterfaceCallWithError(
|
|
324
353
|
callStatus: UniffiRustCallStatus,
|
|
325
354
|
makeCall: () -> T,
|
|
326
355
|
writeReturn: (T) -> Unit,
|
|
327
|
-
lowerError: (E) -> RustBuffer.ByValue
|
|
356
|
+
lowerError: (E) -> RustBuffer.ByValue,
|
|
328
357
|
) {
|
|
329
358
|
try {
|
|
330
359
|
writeReturn(makeCall())
|
|
331
|
-
} catch(e: kotlin.Exception) {
|
|
360
|
+
} catch (e: kotlin.Exception) {
|
|
332
361
|
if (e is E) {
|
|
333
362
|
callStatus.code = UNIFFI_CALL_ERROR
|
|
334
363
|
callStatus.error_buf = lowerError(e)
|
|
@@ -338,12 +367,15 @@ internal inline fun<T, reified E: Throwable> uniffiTraitInterfaceCallWithError(
|
|
|
338
367
|
}
|
|
339
368
|
}
|
|
340
369
|
}
|
|
370
|
+
|
|
341
371
|
// Map handles to objects
|
|
342
372
|
//
|
|
343
373
|
// This is used pass an opaque 64-bit handle representing a foreign object to the Rust code.
|
|
344
|
-
internal class UniffiHandleMap<T: Any> {
|
|
374
|
+
internal class UniffiHandleMap<T : Any> {
|
|
345
375
|
private val map = ConcurrentHashMap<Long, T>()
|
|
346
|
-
private val counter =
|
|
376
|
+
private val counter =
|
|
377
|
+
java.util.concurrent.atomic
|
|
378
|
+
.AtomicLong(0)
|
|
347
379
|
|
|
348
380
|
val size: Int
|
|
349
381
|
get() = map.size
|
|
@@ -356,14 +388,10 @@ internal class UniffiHandleMap<T: Any> {
|
|
|
356
388
|
}
|
|
357
389
|
|
|
358
390
|
// Get an object from the handle map
|
|
359
|
-
fun get(handle: Long): T
|
|
360
|
-
return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle")
|
|
361
|
-
}
|
|
391
|
+
fun get(handle: Long): T = map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle")
|
|
362
392
|
|
|
363
393
|
// Remove an entry from the handlemap and get the Kotlin object back
|
|
364
|
-
fun remove(handle: Long): T
|
|
365
|
-
return map.remove(handle) ?: throw InternalException("UniffiHandleMap: Invalid handle")
|
|
366
|
-
}
|
|
394
|
+
fun remove(handle: Long): T = map.remove(handle) ?: throw InternalException("UniffiHandleMap: Invalid handle")
|
|
367
395
|
}
|
|
368
396
|
|
|
369
397
|
// Contains loading, initialization code,
|
|
@@ -377,22 +405,25 @@ private fun findLibraryName(componentName: String): String {
|
|
|
377
405
|
return "editor_core"
|
|
378
406
|
}
|
|
379
407
|
|
|
380
|
-
private inline fun <reified Lib : Library> loadIndirect(
|
|
381
|
-
componentName
|
|
382
|
-
): Lib {
|
|
383
|
-
return Native.load<Lib>(findLibraryName(componentName), Lib::class.java)
|
|
384
|
-
}
|
|
408
|
+
private inline fun <reified Lib : Library> loadIndirect(componentName: String): Lib =
|
|
409
|
+
Native.load<Lib>(findLibraryName(componentName), Lib::class.java)
|
|
385
410
|
|
|
386
411
|
// Define FFI callback types
|
|
387
412
|
internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback {
|
|
388
|
-
fun callback(
|
|
413
|
+
fun callback(
|
|
414
|
+
`data`: Long,
|
|
415
|
+
`pollResult`: Byte,
|
|
416
|
+
)
|
|
389
417
|
}
|
|
418
|
+
|
|
390
419
|
internal interface UniffiForeignFutureFree : com.sun.jna.Callback {
|
|
391
|
-
fun callback(`handle`: Long
|
|
420
|
+
fun callback(`handle`: Long)
|
|
392
421
|
}
|
|
422
|
+
|
|
393
423
|
internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback {
|
|
394
|
-
fun callback(`handle`: Long
|
|
424
|
+
fun callback(`handle`: Long)
|
|
395
425
|
}
|
|
426
|
+
|
|
396
427
|
@Structure.FieldOrder("handle", "free")
|
|
397
428
|
internal open class UniffiForeignFuture(
|
|
398
429
|
@JvmField internal var `handle`: Long = 0.toLong(),
|
|
@@ -401,14 +432,15 @@ internal open class UniffiForeignFuture(
|
|
|
401
432
|
class UniffiByValue(
|
|
402
433
|
`handle`: Long = 0.toLong(),
|
|
403
434
|
`free`: UniffiForeignFutureFree? = null,
|
|
404
|
-
): UniffiForeignFuture(`handle
|
|
435
|
+
) : UniffiForeignFuture(`handle`, `free`),
|
|
436
|
+
Structure.ByValue
|
|
405
437
|
|
|
406
|
-
|
|
438
|
+
internal fun uniffiSetValue(other: UniffiForeignFuture) {
|
|
407
439
|
`handle` = other.`handle`
|
|
408
440
|
`free` = other.`free`
|
|
409
441
|
}
|
|
410
|
-
|
|
411
442
|
}
|
|
443
|
+
|
|
412
444
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
413
445
|
internal open class UniffiForeignFutureStructU8(
|
|
414
446
|
@JvmField internal var `returnValue`: Byte = 0.toByte(),
|
|
@@ -417,17 +449,22 @@ internal open class UniffiForeignFutureStructU8(
|
|
|
417
449
|
class UniffiByValue(
|
|
418
450
|
`returnValue`: Byte = 0.toByte(),
|
|
419
451
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
420
|
-
): UniffiForeignFutureStructU8(`returnValue
|
|
452
|
+
) : UniffiForeignFutureStructU8(`returnValue`, `callStatus`),
|
|
453
|
+
Structure.ByValue
|
|
421
454
|
|
|
422
|
-
|
|
455
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) {
|
|
423
456
|
`returnValue` = other.`returnValue`
|
|
424
457
|
`callStatus` = other.`callStatus`
|
|
425
458
|
}
|
|
426
|
-
|
|
427
459
|
}
|
|
460
|
+
|
|
428
461
|
internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback {
|
|
429
|
-
fun callback(
|
|
462
|
+
fun callback(
|
|
463
|
+
`callbackData`: Long,
|
|
464
|
+
`result`: UniffiForeignFutureStructU8.UniffiByValue,
|
|
465
|
+
)
|
|
430
466
|
}
|
|
467
|
+
|
|
431
468
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
432
469
|
internal open class UniffiForeignFutureStructI8(
|
|
433
470
|
@JvmField internal var `returnValue`: Byte = 0.toByte(),
|
|
@@ -436,17 +473,22 @@ internal open class UniffiForeignFutureStructI8(
|
|
|
436
473
|
class UniffiByValue(
|
|
437
474
|
`returnValue`: Byte = 0.toByte(),
|
|
438
475
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
439
|
-
): UniffiForeignFutureStructI8(`returnValue
|
|
476
|
+
) : UniffiForeignFutureStructI8(`returnValue`, `callStatus`),
|
|
477
|
+
Structure.ByValue
|
|
440
478
|
|
|
441
|
-
|
|
479
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) {
|
|
442
480
|
`returnValue` = other.`returnValue`
|
|
443
481
|
`callStatus` = other.`callStatus`
|
|
444
482
|
}
|
|
445
|
-
|
|
446
483
|
}
|
|
484
|
+
|
|
447
485
|
internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback {
|
|
448
|
-
fun callback(
|
|
486
|
+
fun callback(
|
|
487
|
+
`callbackData`: Long,
|
|
488
|
+
`result`: UniffiForeignFutureStructI8.UniffiByValue,
|
|
489
|
+
)
|
|
449
490
|
}
|
|
491
|
+
|
|
450
492
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
451
493
|
internal open class UniffiForeignFutureStructU16(
|
|
452
494
|
@JvmField internal var `returnValue`: Short = 0.toShort(),
|
|
@@ -455,17 +497,22 @@ internal open class UniffiForeignFutureStructU16(
|
|
|
455
497
|
class UniffiByValue(
|
|
456
498
|
`returnValue`: Short = 0.toShort(),
|
|
457
499
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
458
|
-
): UniffiForeignFutureStructU16(`returnValue
|
|
500
|
+
) : UniffiForeignFutureStructU16(`returnValue`, `callStatus`),
|
|
501
|
+
Structure.ByValue
|
|
459
502
|
|
|
460
|
-
|
|
503
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) {
|
|
461
504
|
`returnValue` = other.`returnValue`
|
|
462
505
|
`callStatus` = other.`callStatus`
|
|
463
506
|
}
|
|
464
|
-
|
|
465
507
|
}
|
|
508
|
+
|
|
466
509
|
internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback {
|
|
467
|
-
fun callback(
|
|
510
|
+
fun callback(
|
|
511
|
+
`callbackData`: Long,
|
|
512
|
+
`result`: UniffiForeignFutureStructU16.UniffiByValue,
|
|
513
|
+
)
|
|
468
514
|
}
|
|
515
|
+
|
|
469
516
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
470
517
|
internal open class UniffiForeignFutureStructI16(
|
|
471
518
|
@JvmField internal var `returnValue`: Short = 0.toShort(),
|
|
@@ -474,17 +521,22 @@ internal open class UniffiForeignFutureStructI16(
|
|
|
474
521
|
class UniffiByValue(
|
|
475
522
|
`returnValue`: Short = 0.toShort(),
|
|
476
523
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
477
|
-
): UniffiForeignFutureStructI16(`returnValue
|
|
524
|
+
) : UniffiForeignFutureStructI16(`returnValue`, `callStatus`),
|
|
525
|
+
Structure.ByValue
|
|
478
526
|
|
|
479
|
-
|
|
527
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) {
|
|
480
528
|
`returnValue` = other.`returnValue`
|
|
481
529
|
`callStatus` = other.`callStatus`
|
|
482
530
|
}
|
|
483
|
-
|
|
484
531
|
}
|
|
532
|
+
|
|
485
533
|
internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback {
|
|
486
|
-
fun callback(
|
|
534
|
+
fun callback(
|
|
535
|
+
`callbackData`: Long,
|
|
536
|
+
`result`: UniffiForeignFutureStructI16.UniffiByValue,
|
|
537
|
+
)
|
|
487
538
|
}
|
|
539
|
+
|
|
488
540
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
489
541
|
internal open class UniffiForeignFutureStructU32(
|
|
490
542
|
@JvmField internal var `returnValue`: Int = 0,
|
|
@@ -493,17 +545,22 @@ internal open class UniffiForeignFutureStructU32(
|
|
|
493
545
|
class UniffiByValue(
|
|
494
546
|
`returnValue`: Int = 0,
|
|
495
547
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
496
|
-
): UniffiForeignFutureStructU32(`returnValue
|
|
548
|
+
) : UniffiForeignFutureStructU32(`returnValue`, `callStatus`),
|
|
549
|
+
Structure.ByValue
|
|
497
550
|
|
|
498
|
-
|
|
551
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) {
|
|
499
552
|
`returnValue` = other.`returnValue`
|
|
500
553
|
`callStatus` = other.`callStatus`
|
|
501
554
|
}
|
|
502
|
-
|
|
503
555
|
}
|
|
556
|
+
|
|
504
557
|
internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback {
|
|
505
|
-
fun callback(
|
|
558
|
+
fun callback(
|
|
559
|
+
`callbackData`: Long,
|
|
560
|
+
`result`: UniffiForeignFutureStructU32.UniffiByValue,
|
|
561
|
+
)
|
|
506
562
|
}
|
|
563
|
+
|
|
507
564
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
508
565
|
internal open class UniffiForeignFutureStructI32(
|
|
509
566
|
@JvmField internal var `returnValue`: Int = 0,
|
|
@@ -512,17 +569,22 @@ internal open class UniffiForeignFutureStructI32(
|
|
|
512
569
|
class UniffiByValue(
|
|
513
570
|
`returnValue`: Int = 0,
|
|
514
571
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
515
|
-
): UniffiForeignFutureStructI32(`returnValue
|
|
572
|
+
) : UniffiForeignFutureStructI32(`returnValue`, `callStatus`),
|
|
573
|
+
Structure.ByValue
|
|
516
574
|
|
|
517
|
-
|
|
575
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) {
|
|
518
576
|
`returnValue` = other.`returnValue`
|
|
519
577
|
`callStatus` = other.`callStatus`
|
|
520
578
|
}
|
|
521
|
-
|
|
522
579
|
}
|
|
580
|
+
|
|
523
581
|
internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback {
|
|
524
|
-
fun callback(
|
|
582
|
+
fun callback(
|
|
583
|
+
`callbackData`: Long,
|
|
584
|
+
`result`: UniffiForeignFutureStructI32.UniffiByValue,
|
|
585
|
+
)
|
|
525
586
|
}
|
|
587
|
+
|
|
526
588
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
527
589
|
internal open class UniffiForeignFutureStructU64(
|
|
528
590
|
@JvmField internal var `returnValue`: Long = 0.toLong(),
|
|
@@ -531,17 +593,22 @@ internal open class UniffiForeignFutureStructU64(
|
|
|
531
593
|
class UniffiByValue(
|
|
532
594
|
`returnValue`: Long = 0.toLong(),
|
|
533
595
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
534
|
-
): UniffiForeignFutureStructU64(`returnValue
|
|
596
|
+
) : UniffiForeignFutureStructU64(`returnValue`, `callStatus`),
|
|
597
|
+
Structure.ByValue
|
|
535
598
|
|
|
536
|
-
|
|
599
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) {
|
|
537
600
|
`returnValue` = other.`returnValue`
|
|
538
601
|
`callStatus` = other.`callStatus`
|
|
539
602
|
}
|
|
540
|
-
|
|
541
603
|
}
|
|
604
|
+
|
|
542
605
|
internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback {
|
|
543
|
-
fun callback(
|
|
606
|
+
fun callback(
|
|
607
|
+
`callbackData`: Long,
|
|
608
|
+
`result`: UniffiForeignFutureStructU64.UniffiByValue,
|
|
609
|
+
)
|
|
544
610
|
}
|
|
611
|
+
|
|
545
612
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
546
613
|
internal open class UniffiForeignFutureStructI64(
|
|
547
614
|
@JvmField internal var `returnValue`: Long = 0.toLong(),
|
|
@@ -550,17 +617,22 @@ internal open class UniffiForeignFutureStructI64(
|
|
|
550
617
|
class UniffiByValue(
|
|
551
618
|
`returnValue`: Long = 0.toLong(),
|
|
552
619
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
553
|
-
): UniffiForeignFutureStructI64(`returnValue
|
|
620
|
+
) : UniffiForeignFutureStructI64(`returnValue`, `callStatus`),
|
|
621
|
+
Structure.ByValue
|
|
554
622
|
|
|
555
|
-
|
|
623
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) {
|
|
556
624
|
`returnValue` = other.`returnValue`
|
|
557
625
|
`callStatus` = other.`callStatus`
|
|
558
626
|
}
|
|
559
|
-
|
|
560
627
|
}
|
|
628
|
+
|
|
561
629
|
internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback {
|
|
562
|
-
fun callback(
|
|
630
|
+
fun callback(
|
|
631
|
+
`callbackData`: Long,
|
|
632
|
+
`result`: UniffiForeignFutureStructI64.UniffiByValue,
|
|
633
|
+
)
|
|
563
634
|
}
|
|
635
|
+
|
|
564
636
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
565
637
|
internal open class UniffiForeignFutureStructF32(
|
|
566
638
|
@JvmField internal var `returnValue`: Float = 0.0f,
|
|
@@ -569,17 +641,22 @@ internal open class UniffiForeignFutureStructF32(
|
|
|
569
641
|
class UniffiByValue(
|
|
570
642
|
`returnValue`: Float = 0.0f,
|
|
571
643
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
572
|
-
): UniffiForeignFutureStructF32(`returnValue
|
|
644
|
+
) : UniffiForeignFutureStructF32(`returnValue`, `callStatus`),
|
|
645
|
+
Structure.ByValue
|
|
573
646
|
|
|
574
|
-
|
|
647
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) {
|
|
575
648
|
`returnValue` = other.`returnValue`
|
|
576
649
|
`callStatus` = other.`callStatus`
|
|
577
650
|
}
|
|
578
|
-
|
|
579
651
|
}
|
|
652
|
+
|
|
580
653
|
internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback {
|
|
581
|
-
fun callback(
|
|
654
|
+
fun callback(
|
|
655
|
+
`callbackData`: Long,
|
|
656
|
+
`result`: UniffiForeignFutureStructF32.UniffiByValue,
|
|
657
|
+
)
|
|
582
658
|
}
|
|
659
|
+
|
|
583
660
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
584
661
|
internal open class UniffiForeignFutureStructF64(
|
|
585
662
|
@JvmField internal var `returnValue`: Double = 0.0,
|
|
@@ -588,17 +665,22 @@ internal open class UniffiForeignFutureStructF64(
|
|
|
588
665
|
class UniffiByValue(
|
|
589
666
|
`returnValue`: Double = 0.0,
|
|
590
667
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
591
|
-
): UniffiForeignFutureStructF64(`returnValue
|
|
668
|
+
) : UniffiForeignFutureStructF64(`returnValue`, `callStatus`),
|
|
669
|
+
Structure.ByValue
|
|
592
670
|
|
|
593
|
-
|
|
671
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) {
|
|
594
672
|
`returnValue` = other.`returnValue`
|
|
595
673
|
`callStatus` = other.`callStatus`
|
|
596
674
|
}
|
|
597
|
-
|
|
598
675
|
}
|
|
676
|
+
|
|
599
677
|
internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback {
|
|
600
|
-
fun callback(
|
|
678
|
+
fun callback(
|
|
679
|
+
`callbackData`: Long,
|
|
680
|
+
`result`: UniffiForeignFutureStructF64.UniffiByValue,
|
|
681
|
+
)
|
|
601
682
|
}
|
|
683
|
+
|
|
602
684
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
603
685
|
internal open class UniffiForeignFutureStructPointer(
|
|
604
686
|
@JvmField internal var `returnValue`: Pointer = Pointer.NULL,
|
|
@@ -607,17 +689,22 @@ internal open class UniffiForeignFutureStructPointer(
|
|
|
607
689
|
class UniffiByValue(
|
|
608
690
|
`returnValue`: Pointer = Pointer.NULL,
|
|
609
691
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
610
|
-
): UniffiForeignFutureStructPointer(`returnValue
|
|
692
|
+
) : UniffiForeignFutureStructPointer(`returnValue`, `callStatus`),
|
|
693
|
+
Structure.ByValue
|
|
611
694
|
|
|
612
|
-
|
|
695
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) {
|
|
613
696
|
`returnValue` = other.`returnValue`
|
|
614
697
|
`callStatus` = other.`callStatus`
|
|
615
698
|
}
|
|
616
|
-
|
|
617
699
|
}
|
|
700
|
+
|
|
618
701
|
internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback {
|
|
619
|
-
fun callback(
|
|
702
|
+
fun callback(
|
|
703
|
+
`callbackData`: Long,
|
|
704
|
+
`result`: UniffiForeignFutureStructPointer.UniffiByValue,
|
|
705
|
+
)
|
|
620
706
|
}
|
|
707
|
+
|
|
621
708
|
@Structure.FieldOrder("returnValue", "callStatus")
|
|
622
709
|
internal open class UniffiForeignFutureStructRustBuffer(
|
|
623
710
|
@JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(),
|
|
@@ -626,683 +713,932 @@ internal open class UniffiForeignFutureStructRustBuffer(
|
|
|
626
713
|
class UniffiByValue(
|
|
627
714
|
`returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(),
|
|
628
715
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
629
|
-
): UniffiForeignFutureStructRustBuffer(`returnValue
|
|
716
|
+
) : UniffiForeignFutureStructRustBuffer(`returnValue`, `callStatus`),
|
|
717
|
+
Structure.ByValue
|
|
630
718
|
|
|
631
|
-
|
|
719
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) {
|
|
632
720
|
`returnValue` = other.`returnValue`
|
|
633
721
|
`callStatus` = other.`callStatus`
|
|
634
722
|
}
|
|
635
|
-
|
|
636
723
|
}
|
|
724
|
+
|
|
637
725
|
internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback {
|
|
638
|
-
fun callback(
|
|
726
|
+
fun callback(
|
|
727
|
+
`callbackData`: Long,
|
|
728
|
+
`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,
|
|
729
|
+
)
|
|
639
730
|
}
|
|
731
|
+
|
|
640
732
|
@Structure.FieldOrder("callStatus")
|
|
641
733
|
internal open class UniffiForeignFutureStructVoid(
|
|
642
734
|
@JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
643
735
|
) : Structure() {
|
|
644
736
|
class UniffiByValue(
|
|
645
737
|
`callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(),
|
|
646
|
-
): UniffiForeignFutureStructVoid(`callStatus
|
|
738
|
+
) : UniffiForeignFutureStructVoid(`callStatus`),
|
|
739
|
+
Structure.ByValue
|
|
647
740
|
|
|
648
|
-
|
|
741
|
+
internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) {
|
|
649
742
|
`callStatus` = other.`callStatus`
|
|
650
743
|
}
|
|
651
|
-
|
|
652
744
|
}
|
|
745
|
+
|
|
653
746
|
internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback {
|
|
654
|
-
fun callback(
|
|
747
|
+
fun callback(
|
|
748
|
+
`callbackData`: Long,
|
|
749
|
+
`result`: UniffiForeignFutureStructVoid.UniffiByValue,
|
|
750
|
+
)
|
|
655
751
|
}
|
|
656
752
|
|
|
753
|
+
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
754
|
+
// N.B. the name of the extension is very misleading, since it is
|
|
755
|
+
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
756
|
+
// in the interface for large crates.
|
|
757
|
+
//
|
|
758
|
+
// By splitting the otherwise huge interface into two parts
|
|
759
|
+
// * UniffiLib
|
|
760
|
+
// * IntegrityCheckingUniffiLib (this)
|
|
761
|
+
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
762
|
+
//
|
|
763
|
+
// The `ffi_uniffi_contract_version` method and all checksum methods are put
|
|
764
|
+
// into `IntegrityCheckingUniffiLib` and these methods are called only once,
|
|
765
|
+
// when the library is loaded.
|
|
766
|
+
internal interface IntegrityCheckingUniffiLib : Library {
|
|
767
|
+
// Integrity check functions only
|
|
768
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_apply_encoded_state(): Short
|
|
657
769
|
|
|
770
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_apply_local_document_json(): Short
|
|
658
771
|
|
|
772
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_clear_local_awareness(): Short
|
|
659
773
|
|
|
774
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_create(): Short
|
|
660
775
|
|
|
776
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_destroy(): Short
|
|
661
777
|
|
|
778
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_get_document_json(): Short
|
|
662
779
|
|
|
780
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_get_encoded_state(): Short
|
|
663
781
|
|
|
782
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_get_peers_json(): Short
|
|
664
783
|
|
|
784
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_handle_message(): Short
|
|
665
785
|
|
|
786
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_replace_encoded_state(): Short
|
|
666
787
|
|
|
788
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_set_local_awareness(): Short
|
|
667
789
|
|
|
790
|
+
fun uniffi_editor_core_checksum_func_collaboration_session_start(): Short
|
|
668
791
|
|
|
792
|
+
fun uniffi_editor_core_checksum_func_editor_can_redo(): Short
|
|
669
793
|
|
|
794
|
+
fun uniffi_editor_core_checksum_func_editor_can_undo(): Short
|
|
670
795
|
|
|
796
|
+
fun uniffi_editor_core_checksum_func_editor_core_version(): Short
|
|
671
797
|
|
|
798
|
+
fun uniffi_editor_core_checksum_func_editor_create(): Short
|
|
672
799
|
|
|
800
|
+
fun uniffi_editor_core_checksum_func_editor_delete_and_split_scalar(): Short
|
|
673
801
|
|
|
802
|
+
fun uniffi_editor_core_checksum_func_editor_delete_backward_at_selection_scalar(): Short
|
|
674
803
|
|
|
804
|
+
fun uniffi_editor_core_checksum_func_editor_delete_range(): Short
|
|
675
805
|
|
|
806
|
+
fun uniffi_editor_core_checksum_func_editor_delete_scalar_range(): Short
|
|
676
807
|
|
|
808
|
+
fun uniffi_editor_core_checksum_func_editor_delete_table_column(): Short
|
|
677
809
|
|
|
810
|
+
fun uniffi_editor_core_checksum_func_editor_delete_table_row(): Short
|
|
678
811
|
|
|
812
|
+
fun uniffi_editor_core_checksum_func_editor_destroy(): Short
|
|
679
813
|
|
|
814
|
+
fun uniffi_editor_core_checksum_func_editor_doc_to_scalar(): Short
|
|
680
815
|
|
|
816
|
+
fun uniffi_editor_core_checksum_func_editor_get_content_snapshot(): Short
|
|
681
817
|
|
|
818
|
+
fun uniffi_editor_core_checksum_func_editor_get_current_state(): Short
|
|
682
819
|
|
|
820
|
+
fun uniffi_editor_core_checksum_func_editor_get_html(): Short
|
|
683
821
|
|
|
822
|
+
fun uniffi_editor_core_checksum_func_editor_get_json(): Short
|
|
684
823
|
|
|
824
|
+
fun uniffi_editor_core_checksum_func_editor_get_selection(): Short
|
|
685
825
|
|
|
826
|
+
fun uniffi_editor_core_checksum_func_editor_get_selection_state(): Short
|
|
686
827
|
|
|
828
|
+
fun uniffi_editor_core_checksum_func_editor_indent_list_item(): Short
|
|
687
829
|
|
|
830
|
+
fun uniffi_editor_core_checksum_func_editor_indent_list_item_at_selection_scalar(): Short
|
|
688
831
|
|
|
832
|
+
fun uniffi_editor_core_checksum_func_editor_insert_content_html(): Short
|
|
689
833
|
|
|
834
|
+
fun uniffi_editor_core_checksum_func_editor_insert_content_json(): Short
|
|
690
835
|
|
|
836
|
+
fun uniffi_editor_core_checksum_func_editor_insert_content_json_at_selection_scalar(): Short
|
|
691
837
|
|
|
838
|
+
fun uniffi_editor_core_checksum_func_editor_insert_node(): Short
|
|
692
839
|
|
|
840
|
+
fun uniffi_editor_core_checksum_func_editor_insert_node_at_selection_scalar(): Short
|
|
693
841
|
|
|
842
|
+
fun uniffi_editor_core_checksum_func_editor_insert_table_column(): Short
|
|
694
843
|
|
|
844
|
+
fun uniffi_editor_core_checksum_func_editor_insert_table_row(): Short
|
|
695
845
|
|
|
846
|
+
fun uniffi_editor_core_checksum_func_editor_insert_text(): Short
|
|
696
847
|
|
|
848
|
+
fun uniffi_editor_core_checksum_func_editor_insert_text_scalar(): Short
|
|
697
849
|
|
|
850
|
+
fun uniffi_editor_core_checksum_func_editor_move_table_cell(): Short
|
|
698
851
|
|
|
852
|
+
fun uniffi_editor_core_checksum_func_editor_outdent_list_item(): Short
|
|
699
853
|
|
|
854
|
+
fun uniffi_editor_core_checksum_func_editor_outdent_list_item_at_selection_scalar(): Short
|
|
700
855
|
|
|
856
|
+
fun uniffi_editor_core_checksum_func_editor_redo(): Short
|
|
701
857
|
|
|
858
|
+
fun uniffi_editor_core_checksum_func_editor_replace_html(): Short
|
|
702
859
|
|
|
860
|
+
fun uniffi_editor_core_checksum_func_editor_replace_json(): Short
|
|
703
861
|
|
|
862
|
+
fun uniffi_editor_core_checksum_func_editor_replace_selection_text(): Short
|
|
704
863
|
|
|
864
|
+
fun uniffi_editor_core_checksum_func_editor_replace_text_scalar(): Short
|
|
705
865
|
|
|
866
|
+
fun uniffi_editor_core_checksum_func_editor_resize_image_at_doc_pos(): Short
|
|
706
867
|
|
|
868
|
+
fun uniffi_editor_core_checksum_func_editor_scalar_to_doc(): Short
|
|
707
869
|
|
|
870
|
+
fun uniffi_editor_core_checksum_func_editor_set_cell_selection(): Short
|
|
708
871
|
|
|
872
|
+
fun uniffi_editor_core_checksum_func_editor_set_html(): Short
|
|
709
873
|
|
|
874
|
+
fun uniffi_editor_core_checksum_func_editor_set_json(): Short
|
|
710
875
|
|
|
876
|
+
fun uniffi_editor_core_checksum_func_editor_set_mark(): Short
|
|
711
877
|
|
|
878
|
+
fun uniffi_editor_core_checksum_func_editor_set_mark_at_selection_scalar(): Short
|
|
712
879
|
|
|
880
|
+
fun uniffi_editor_core_checksum_func_editor_set_node_selection(): Short
|
|
713
881
|
|
|
882
|
+
fun uniffi_editor_core_checksum_func_editor_set_selection(): Short
|
|
714
883
|
|
|
884
|
+
fun uniffi_editor_core_checksum_func_editor_set_selection_scalar(): Short
|
|
715
885
|
|
|
886
|
+
fun uniffi_editor_core_checksum_func_editor_split_block(): Short
|
|
716
887
|
|
|
888
|
+
fun uniffi_editor_core_checksum_func_editor_split_block_scalar(): Short
|
|
717
889
|
|
|
890
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote(): Short
|
|
718
891
|
|
|
892
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote_at_selection_scalar(): Short
|
|
719
893
|
|
|
894
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_heading(): Short
|
|
720
895
|
|
|
896
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_heading_at_selection_scalar(): Short
|
|
721
897
|
|
|
898
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_mark(): Short
|
|
722
899
|
|
|
900
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_mark_at_selection_scalar(): Short
|
|
723
901
|
|
|
902
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_task_item_checked_at_selection_scalar(): Short
|
|
724
903
|
|
|
904
|
+
fun uniffi_editor_core_checksum_func_editor_undo(): Short
|
|
725
905
|
|
|
906
|
+
fun uniffi_editor_core_checksum_func_editor_unset_mark(): Short
|
|
726
907
|
|
|
908
|
+
fun uniffi_editor_core_checksum_func_editor_unset_mark_at_selection_scalar(): Short
|
|
727
909
|
|
|
910
|
+
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list(): Short
|
|
728
911
|
|
|
912
|
+
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list_at_selection_scalar(): Short
|
|
729
913
|
|
|
914
|
+
fun uniffi_editor_core_checksum_func_editor_wrap_in_list(): Short
|
|
730
915
|
|
|
916
|
+
fun uniffi_editor_core_checksum_func_editor_wrap_in_list_at_selection_scalar(): Short
|
|
731
917
|
|
|
918
|
+
fun ffi_editor_core_uniffi_contract_version(): Int
|
|
919
|
+
}
|
|
732
920
|
|
|
921
|
+
// A JNA Library to expose the extern-C FFI definitions.
|
|
922
|
+
// This is an implementation detail which will be called internally by the public API.
|
|
923
|
+
internal interface UniffiLib : Library {
|
|
924
|
+
companion object {
|
|
925
|
+
internal val INSTANCE: UniffiLib by lazy {
|
|
926
|
+
val componentName = "editor_core"
|
|
927
|
+
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
928
|
+
// N.B. the name of the extension is very misleading, since it is
|
|
929
|
+
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
930
|
+
// in the interface for large crates.
|
|
931
|
+
//
|
|
932
|
+
// By splitting the otherwise huge interface into two parts
|
|
933
|
+
// * UniffiLib (this)
|
|
934
|
+
// * IntegrityCheckingUniffiLib
|
|
935
|
+
// And all checksum methods are put into `IntegrityCheckingUniffiLib`
|
|
936
|
+
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
937
|
+
//
|
|
938
|
+
// Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib`
|
|
939
|
+
// so that we can (optionally!) call `uniffiCheckApiChecksums`...
|
|
940
|
+
loadIndirect<IntegrityCheckingUniffiLib>(componentName)
|
|
941
|
+
.also { lib: IntegrityCheckingUniffiLib ->
|
|
942
|
+
uniffiCheckContractApiVersion(lib)
|
|
943
|
+
uniffiCheckApiChecksums(lib)
|
|
944
|
+
}
|
|
945
|
+
// ... and then we load the library as `UniffiLib`
|
|
946
|
+
// N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib`
|
|
947
|
+
// => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...`
|
|
948
|
+
// error. So we must call `loadIndirect` twice. For crates large enough
|
|
949
|
+
// to trigger this issue, the performance impact is negligible, running on
|
|
950
|
+
// a macOS M1 machine the `loadIndirect` call takes ~50ms.
|
|
951
|
+
val lib = loadIndirect<UniffiLib>(componentName)
|
|
952
|
+
// No need to check the contract version and checksums, since
|
|
953
|
+
// we already did that with `IntegrityCheckingUniffiLib` above.
|
|
954
|
+
// Loading of library with integrity check done.
|
|
955
|
+
lib
|
|
956
|
+
}
|
|
957
|
+
}
|
|
733
958
|
|
|
959
|
+
// FFI functions
|
|
960
|
+
fun uniffi_editor_core_fn_func_collaboration_session_apply_encoded_state(
|
|
961
|
+
`id`: Long,
|
|
962
|
+
`encodedStateJson`: RustBuffer.ByValue,
|
|
963
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
964
|
+
): RustBuffer.ByValue
|
|
965
|
+
|
|
966
|
+
fun uniffi_editor_core_fn_func_collaboration_session_apply_local_document_json(
|
|
967
|
+
`id`: Long,
|
|
968
|
+
`json`: RustBuffer.ByValue,
|
|
969
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
970
|
+
): RustBuffer.ByValue
|
|
971
|
+
|
|
972
|
+
fun uniffi_editor_core_fn_func_collaboration_session_clear_local_awareness(
|
|
973
|
+
`id`: Long,
|
|
974
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
975
|
+
): RustBuffer.ByValue
|
|
976
|
+
|
|
977
|
+
fun uniffi_editor_core_fn_func_collaboration_session_create(
|
|
978
|
+
`configJson`: RustBuffer.ByValue,
|
|
979
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
980
|
+
): Long
|
|
981
|
+
|
|
982
|
+
fun uniffi_editor_core_fn_func_collaboration_session_destroy(
|
|
983
|
+
`id`: Long,
|
|
984
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
985
|
+
): Unit
|
|
986
|
+
|
|
987
|
+
fun uniffi_editor_core_fn_func_collaboration_session_get_document_json(
|
|
988
|
+
`id`: Long,
|
|
989
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
990
|
+
): RustBuffer.ByValue
|
|
991
|
+
|
|
992
|
+
fun uniffi_editor_core_fn_func_collaboration_session_get_encoded_state(
|
|
993
|
+
`id`: Long,
|
|
994
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
995
|
+
): RustBuffer.ByValue
|
|
996
|
+
|
|
997
|
+
fun uniffi_editor_core_fn_func_collaboration_session_get_peers_json(
|
|
998
|
+
`id`: Long,
|
|
999
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1000
|
+
): RustBuffer.ByValue
|
|
1001
|
+
|
|
1002
|
+
fun uniffi_editor_core_fn_func_collaboration_session_handle_message(
|
|
1003
|
+
`id`: Long,
|
|
1004
|
+
`messageJson`: RustBuffer.ByValue,
|
|
1005
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1006
|
+
): RustBuffer.ByValue
|
|
1007
|
+
|
|
1008
|
+
fun uniffi_editor_core_fn_func_collaboration_session_replace_encoded_state(
|
|
1009
|
+
`id`: Long,
|
|
1010
|
+
`encodedStateJson`: RustBuffer.ByValue,
|
|
1011
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1012
|
+
): RustBuffer.ByValue
|
|
1013
|
+
|
|
1014
|
+
fun uniffi_editor_core_fn_func_collaboration_session_set_local_awareness(
|
|
1015
|
+
`id`: Long,
|
|
1016
|
+
`awarenessJson`: RustBuffer.ByValue,
|
|
1017
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1018
|
+
): RustBuffer.ByValue
|
|
1019
|
+
|
|
1020
|
+
fun uniffi_editor_core_fn_func_collaboration_session_start(
|
|
1021
|
+
`id`: Long,
|
|
1022
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1023
|
+
): RustBuffer.ByValue
|
|
1024
|
+
|
|
1025
|
+
fun uniffi_editor_core_fn_func_editor_can_redo(
|
|
1026
|
+
`id`: Long,
|
|
1027
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1028
|
+
): Byte
|
|
1029
|
+
|
|
1030
|
+
fun uniffi_editor_core_fn_func_editor_can_undo(
|
|
1031
|
+
`id`: Long,
|
|
1032
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1033
|
+
): Byte
|
|
1034
|
+
|
|
1035
|
+
fun uniffi_editor_core_fn_func_editor_core_version(uniffi_out_err: UniffiRustCallStatus): RustBuffer.ByValue
|
|
1036
|
+
|
|
1037
|
+
fun uniffi_editor_core_fn_func_editor_create(
|
|
1038
|
+
`configJson`: RustBuffer.ByValue,
|
|
1039
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1040
|
+
): Long
|
|
1041
|
+
|
|
1042
|
+
fun uniffi_editor_core_fn_func_editor_delete_and_split_scalar(
|
|
1043
|
+
`id`: Long,
|
|
1044
|
+
`scalarFrom`: Int,
|
|
1045
|
+
`scalarTo`: Int,
|
|
1046
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1047
|
+
): RustBuffer.ByValue
|
|
1048
|
+
|
|
1049
|
+
fun uniffi_editor_core_fn_func_editor_delete_backward_at_selection_scalar(
|
|
1050
|
+
`id`: Long,
|
|
1051
|
+
`scalarAnchor`: Int,
|
|
1052
|
+
`scalarHead`: Int,
|
|
1053
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1054
|
+
): RustBuffer.ByValue
|
|
1055
|
+
|
|
1056
|
+
fun uniffi_editor_core_fn_func_editor_delete_range(
|
|
1057
|
+
`id`: Long,
|
|
1058
|
+
`from`: Int,
|
|
1059
|
+
`to`: Int,
|
|
1060
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1061
|
+
): RustBuffer.ByValue
|
|
1062
|
+
|
|
1063
|
+
fun uniffi_editor_core_fn_func_editor_delete_scalar_range(
|
|
1064
|
+
`id`: Long,
|
|
1065
|
+
`scalarFrom`: Int,
|
|
1066
|
+
`scalarTo`: Int,
|
|
1067
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1068
|
+
): RustBuffer.ByValue
|
|
1069
|
+
|
|
1070
|
+
fun uniffi_editor_core_fn_func_editor_delete_table_column(
|
|
1071
|
+
`id`: Long,
|
|
1072
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1073
|
+
): RustBuffer.ByValue
|
|
1074
|
+
|
|
1075
|
+
fun uniffi_editor_core_fn_func_editor_delete_table_row(
|
|
1076
|
+
`id`: Long,
|
|
1077
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1078
|
+
): RustBuffer.ByValue
|
|
1079
|
+
|
|
1080
|
+
fun uniffi_editor_core_fn_func_editor_destroy(
|
|
1081
|
+
`id`: Long,
|
|
1082
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1083
|
+
): Unit
|
|
1084
|
+
|
|
1085
|
+
fun uniffi_editor_core_fn_func_editor_doc_to_scalar(
|
|
1086
|
+
`id`: Long,
|
|
1087
|
+
`docPos`: Int,
|
|
1088
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1089
|
+
): Int
|
|
1090
|
+
|
|
1091
|
+
fun uniffi_editor_core_fn_func_editor_get_content_snapshot(
|
|
1092
|
+
`id`: Long,
|
|
1093
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1094
|
+
): RustBuffer.ByValue
|
|
1095
|
+
|
|
1096
|
+
fun uniffi_editor_core_fn_func_editor_get_current_state(
|
|
1097
|
+
`id`: Long,
|
|
1098
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1099
|
+
): RustBuffer.ByValue
|
|
1100
|
+
|
|
1101
|
+
fun uniffi_editor_core_fn_func_editor_get_html(
|
|
1102
|
+
`id`: Long,
|
|
1103
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1104
|
+
): RustBuffer.ByValue
|
|
1105
|
+
|
|
1106
|
+
fun uniffi_editor_core_fn_func_editor_get_json(
|
|
1107
|
+
`id`: Long,
|
|
1108
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1109
|
+
): RustBuffer.ByValue
|
|
1110
|
+
|
|
1111
|
+
fun uniffi_editor_core_fn_func_editor_get_selection(
|
|
1112
|
+
`id`: Long,
|
|
1113
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1114
|
+
): RustBuffer.ByValue
|
|
1115
|
+
|
|
1116
|
+
fun uniffi_editor_core_fn_func_editor_get_selection_state(
|
|
1117
|
+
`id`: Long,
|
|
1118
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1119
|
+
): RustBuffer.ByValue
|
|
1120
|
+
|
|
1121
|
+
fun uniffi_editor_core_fn_func_editor_indent_list_item(
|
|
1122
|
+
`id`: Long,
|
|
1123
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1124
|
+
): RustBuffer.ByValue
|
|
1125
|
+
|
|
1126
|
+
fun uniffi_editor_core_fn_func_editor_indent_list_item_at_selection_scalar(
|
|
1127
|
+
`id`: Long,
|
|
1128
|
+
`scalarAnchor`: Int,
|
|
1129
|
+
`scalarHead`: Int,
|
|
1130
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1131
|
+
): RustBuffer.ByValue
|
|
1132
|
+
|
|
1133
|
+
fun uniffi_editor_core_fn_func_editor_insert_content_html(
|
|
1134
|
+
`id`: Long,
|
|
1135
|
+
`html`: RustBuffer.ByValue,
|
|
1136
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1137
|
+
): RustBuffer.ByValue
|
|
1138
|
+
|
|
1139
|
+
fun uniffi_editor_core_fn_func_editor_insert_content_json(
|
|
1140
|
+
`id`: Long,
|
|
1141
|
+
`json`: RustBuffer.ByValue,
|
|
1142
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1143
|
+
): RustBuffer.ByValue
|
|
1144
|
+
|
|
1145
|
+
fun uniffi_editor_core_fn_func_editor_insert_content_json_at_selection_scalar(
|
|
1146
|
+
`id`: Long,
|
|
1147
|
+
`scalarAnchor`: Int,
|
|
1148
|
+
`scalarHead`: Int,
|
|
1149
|
+
`json`: RustBuffer.ByValue,
|
|
1150
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1151
|
+
): RustBuffer.ByValue
|
|
1152
|
+
|
|
1153
|
+
fun uniffi_editor_core_fn_func_editor_insert_node(
|
|
1154
|
+
`id`: Long,
|
|
1155
|
+
`nodeType`: RustBuffer.ByValue,
|
|
1156
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1157
|
+
): RustBuffer.ByValue
|
|
1158
|
+
|
|
1159
|
+
fun uniffi_editor_core_fn_func_editor_insert_node_at_selection_scalar(
|
|
1160
|
+
`id`: Long,
|
|
1161
|
+
`scalarAnchor`: Int,
|
|
1162
|
+
`scalarHead`: Int,
|
|
1163
|
+
`nodeType`: RustBuffer.ByValue,
|
|
1164
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1165
|
+
): RustBuffer.ByValue
|
|
1166
|
+
|
|
1167
|
+
fun uniffi_editor_core_fn_func_editor_insert_table_column(
|
|
1168
|
+
`id`: Long,
|
|
1169
|
+
`after`: Byte,
|
|
1170
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1171
|
+
): RustBuffer.ByValue
|
|
1172
|
+
|
|
1173
|
+
fun uniffi_editor_core_fn_func_editor_insert_table_row(
|
|
1174
|
+
`id`: Long,
|
|
1175
|
+
`after`: Byte,
|
|
1176
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1177
|
+
): RustBuffer.ByValue
|
|
1178
|
+
|
|
1179
|
+
fun uniffi_editor_core_fn_func_editor_insert_text(
|
|
1180
|
+
`id`: Long,
|
|
1181
|
+
`pos`: Int,
|
|
1182
|
+
`text`: RustBuffer.ByValue,
|
|
1183
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1184
|
+
): RustBuffer.ByValue
|
|
1185
|
+
|
|
1186
|
+
fun uniffi_editor_core_fn_func_editor_insert_text_scalar(
|
|
1187
|
+
`id`: Long,
|
|
1188
|
+
`scalarPos`: Int,
|
|
1189
|
+
`text`: RustBuffer.ByValue,
|
|
1190
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1191
|
+
): RustBuffer.ByValue
|
|
1192
|
+
|
|
1193
|
+
fun uniffi_editor_core_fn_func_editor_move_table_cell(
|
|
1194
|
+
`id`: Long,
|
|
1195
|
+
`forward`: Byte,
|
|
1196
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1197
|
+
): RustBuffer.ByValue
|
|
1198
|
+
|
|
1199
|
+
fun uniffi_editor_core_fn_func_editor_outdent_list_item(
|
|
1200
|
+
`id`: Long,
|
|
1201
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1202
|
+
): RustBuffer.ByValue
|
|
1203
|
+
|
|
1204
|
+
fun uniffi_editor_core_fn_func_editor_outdent_list_item_at_selection_scalar(
|
|
1205
|
+
`id`: Long,
|
|
1206
|
+
`scalarAnchor`: Int,
|
|
1207
|
+
`scalarHead`: Int,
|
|
1208
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1209
|
+
): RustBuffer.ByValue
|
|
1210
|
+
|
|
1211
|
+
fun uniffi_editor_core_fn_func_editor_redo(
|
|
1212
|
+
`id`: Long,
|
|
1213
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1214
|
+
): RustBuffer.ByValue
|
|
1215
|
+
|
|
1216
|
+
fun uniffi_editor_core_fn_func_editor_replace_html(
|
|
1217
|
+
`id`: Long,
|
|
1218
|
+
`html`: RustBuffer.ByValue,
|
|
1219
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1220
|
+
): RustBuffer.ByValue
|
|
1221
|
+
|
|
1222
|
+
fun uniffi_editor_core_fn_func_editor_replace_json(
|
|
1223
|
+
`id`: Long,
|
|
1224
|
+
`json`: RustBuffer.ByValue,
|
|
1225
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1226
|
+
): RustBuffer.ByValue
|
|
1227
|
+
|
|
1228
|
+
fun uniffi_editor_core_fn_func_editor_replace_selection_text(
|
|
1229
|
+
`id`: Long,
|
|
1230
|
+
`text`: RustBuffer.ByValue,
|
|
1231
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1232
|
+
): RustBuffer.ByValue
|
|
1233
|
+
|
|
1234
|
+
fun uniffi_editor_core_fn_func_editor_replace_text_scalar(
|
|
1235
|
+
`id`: Long,
|
|
1236
|
+
`scalarFrom`: Int,
|
|
1237
|
+
`scalarTo`: Int,
|
|
1238
|
+
`text`: RustBuffer.ByValue,
|
|
1239
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1240
|
+
): RustBuffer.ByValue
|
|
1241
|
+
|
|
1242
|
+
fun uniffi_editor_core_fn_func_editor_resize_image_at_doc_pos(
|
|
1243
|
+
`id`: Long,
|
|
1244
|
+
`docPos`: Int,
|
|
1245
|
+
`width`: Int,
|
|
1246
|
+
`height`: Int,
|
|
1247
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1248
|
+
): RustBuffer.ByValue
|
|
1249
|
+
|
|
1250
|
+
fun uniffi_editor_core_fn_func_editor_scalar_to_doc(
|
|
1251
|
+
`id`: Long,
|
|
1252
|
+
`scalar`: Int,
|
|
1253
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1254
|
+
): Int
|
|
1255
|
+
|
|
1256
|
+
fun uniffi_editor_core_fn_func_editor_set_cell_selection(
|
|
1257
|
+
`id`: Long,
|
|
1258
|
+
`anchor`: Int,
|
|
1259
|
+
`head`: Int,
|
|
1260
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1261
|
+
): Unit
|
|
1262
|
+
|
|
1263
|
+
fun uniffi_editor_core_fn_func_editor_set_html(
|
|
1264
|
+
`id`: Long,
|
|
1265
|
+
`html`: RustBuffer.ByValue,
|
|
1266
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1267
|
+
): RustBuffer.ByValue
|
|
1268
|
+
|
|
1269
|
+
fun uniffi_editor_core_fn_func_editor_set_json(
|
|
1270
|
+
`id`: Long,
|
|
1271
|
+
`json`: RustBuffer.ByValue,
|
|
1272
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1273
|
+
): RustBuffer.ByValue
|
|
1274
|
+
|
|
1275
|
+
fun uniffi_editor_core_fn_func_editor_set_mark(
|
|
1276
|
+
`id`: Long,
|
|
1277
|
+
`markName`: RustBuffer.ByValue,
|
|
1278
|
+
`attrsJson`: RustBuffer.ByValue,
|
|
1279
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1280
|
+
): RustBuffer.ByValue
|
|
1281
|
+
|
|
1282
|
+
fun uniffi_editor_core_fn_func_editor_set_mark_at_selection_scalar(
|
|
1283
|
+
`id`: Long,
|
|
1284
|
+
`scalarAnchor`: Int,
|
|
1285
|
+
`scalarHead`: Int,
|
|
1286
|
+
`markName`: RustBuffer.ByValue,
|
|
1287
|
+
`attrsJson`: RustBuffer.ByValue,
|
|
1288
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1289
|
+
): RustBuffer.ByValue
|
|
1290
|
+
|
|
1291
|
+
fun uniffi_editor_core_fn_func_editor_set_node_selection(
|
|
1292
|
+
`id`: Long,
|
|
1293
|
+
`pos`: Int,
|
|
1294
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1295
|
+
): Unit
|
|
1296
|
+
|
|
1297
|
+
fun uniffi_editor_core_fn_func_editor_set_selection(
|
|
1298
|
+
`id`: Long,
|
|
1299
|
+
`anchor`: Int,
|
|
1300
|
+
`head`: Int,
|
|
1301
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1302
|
+
): Unit
|
|
1303
|
+
|
|
1304
|
+
fun uniffi_editor_core_fn_func_editor_set_selection_scalar(
|
|
1305
|
+
`id`: Long,
|
|
1306
|
+
`scalarAnchor`: Int,
|
|
1307
|
+
`scalarHead`: Int,
|
|
1308
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1309
|
+
): Unit
|
|
1310
|
+
|
|
1311
|
+
fun uniffi_editor_core_fn_func_editor_split_block(
|
|
1312
|
+
`id`: Long,
|
|
1313
|
+
`pos`: Int,
|
|
1314
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1315
|
+
): RustBuffer.ByValue
|
|
1316
|
+
|
|
1317
|
+
fun uniffi_editor_core_fn_func_editor_split_block_scalar(
|
|
1318
|
+
`id`: Long,
|
|
1319
|
+
`scalarPos`: Int,
|
|
1320
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1321
|
+
): RustBuffer.ByValue
|
|
1322
|
+
|
|
1323
|
+
fun uniffi_editor_core_fn_func_editor_toggle_blockquote(
|
|
1324
|
+
`id`: Long,
|
|
1325
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1326
|
+
): RustBuffer.ByValue
|
|
1327
|
+
|
|
1328
|
+
fun uniffi_editor_core_fn_func_editor_toggle_blockquote_at_selection_scalar(
|
|
1329
|
+
`id`: Long,
|
|
1330
|
+
`scalarAnchor`: Int,
|
|
1331
|
+
`scalarHead`: Int,
|
|
1332
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1333
|
+
): RustBuffer.ByValue
|
|
1334
|
+
|
|
1335
|
+
fun uniffi_editor_core_fn_func_editor_toggle_heading(
|
|
1336
|
+
`id`: Long,
|
|
1337
|
+
`level`: Byte,
|
|
1338
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1339
|
+
): RustBuffer.ByValue
|
|
1340
|
+
|
|
1341
|
+
fun uniffi_editor_core_fn_func_editor_toggle_heading_at_selection_scalar(
|
|
1342
|
+
`id`: Long,
|
|
1343
|
+
`scalarAnchor`: Int,
|
|
1344
|
+
`scalarHead`: Int,
|
|
1345
|
+
`level`: Byte,
|
|
1346
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1347
|
+
): RustBuffer.ByValue
|
|
1348
|
+
|
|
1349
|
+
fun uniffi_editor_core_fn_func_editor_toggle_mark(
|
|
1350
|
+
`id`: Long,
|
|
1351
|
+
`markName`: RustBuffer.ByValue,
|
|
1352
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1353
|
+
): RustBuffer.ByValue
|
|
1354
|
+
|
|
1355
|
+
fun uniffi_editor_core_fn_func_editor_toggle_mark_at_selection_scalar(
|
|
1356
|
+
`id`: Long,
|
|
1357
|
+
`scalarAnchor`: Int,
|
|
1358
|
+
`scalarHead`: Int,
|
|
1359
|
+
`markName`: RustBuffer.ByValue,
|
|
1360
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1361
|
+
): RustBuffer.ByValue
|
|
1362
|
+
|
|
1363
|
+
fun uniffi_editor_core_fn_func_editor_toggle_task_item_checked_at_selection_scalar(
|
|
1364
|
+
`id`: Long,
|
|
1365
|
+
`scalarAnchor`: Int,
|
|
1366
|
+
`scalarHead`: Int,
|
|
1367
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1368
|
+
): RustBuffer.ByValue
|
|
1369
|
+
|
|
1370
|
+
fun uniffi_editor_core_fn_func_editor_undo(
|
|
1371
|
+
`id`: Long,
|
|
1372
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1373
|
+
): RustBuffer.ByValue
|
|
1374
|
+
|
|
1375
|
+
fun uniffi_editor_core_fn_func_editor_unset_mark(
|
|
1376
|
+
`id`: Long,
|
|
1377
|
+
`markName`: RustBuffer.ByValue,
|
|
1378
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1379
|
+
): RustBuffer.ByValue
|
|
1380
|
+
|
|
1381
|
+
fun uniffi_editor_core_fn_func_editor_unset_mark_at_selection_scalar(
|
|
1382
|
+
`id`: Long,
|
|
1383
|
+
`scalarAnchor`: Int,
|
|
1384
|
+
`scalarHead`: Int,
|
|
1385
|
+
`markName`: RustBuffer.ByValue,
|
|
1386
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1387
|
+
): RustBuffer.ByValue
|
|
1388
|
+
|
|
1389
|
+
fun uniffi_editor_core_fn_func_editor_unwrap_from_list(
|
|
1390
|
+
`id`: Long,
|
|
1391
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1392
|
+
): RustBuffer.ByValue
|
|
1393
|
+
|
|
1394
|
+
fun uniffi_editor_core_fn_func_editor_unwrap_from_list_at_selection_scalar(
|
|
1395
|
+
`id`: Long,
|
|
1396
|
+
`scalarAnchor`: Int,
|
|
1397
|
+
`scalarHead`: Int,
|
|
1398
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1399
|
+
): RustBuffer.ByValue
|
|
1400
|
+
|
|
1401
|
+
fun uniffi_editor_core_fn_func_editor_wrap_in_list(
|
|
1402
|
+
`id`: Long,
|
|
1403
|
+
`listType`: RustBuffer.ByValue,
|
|
1404
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1405
|
+
): RustBuffer.ByValue
|
|
1406
|
+
|
|
1407
|
+
fun uniffi_editor_core_fn_func_editor_wrap_in_list_at_selection_scalar(
|
|
1408
|
+
`id`: Long,
|
|
1409
|
+
`scalarAnchor`: Int,
|
|
1410
|
+
`scalarHead`: Int,
|
|
1411
|
+
`listType`: RustBuffer.ByValue,
|
|
1412
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1413
|
+
): RustBuffer.ByValue
|
|
1414
|
+
|
|
1415
|
+
fun ffi_editor_core_rustbuffer_alloc(
|
|
1416
|
+
`size`: Long,
|
|
1417
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1418
|
+
): RustBuffer.ByValue
|
|
1419
|
+
|
|
1420
|
+
fun ffi_editor_core_rustbuffer_from_bytes(
|
|
1421
|
+
`bytes`: ForeignBytes.ByValue,
|
|
1422
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1423
|
+
): RustBuffer.ByValue
|
|
1424
|
+
|
|
1425
|
+
fun ffi_editor_core_rustbuffer_free(
|
|
1426
|
+
`buf`: RustBuffer.ByValue,
|
|
1427
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1428
|
+
): Unit
|
|
1429
|
+
|
|
1430
|
+
fun ffi_editor_core_rustbuffer_reserve(
|
|
1431
|
+
`buf`: RustBuffer.ByValue,
|
|
1432
|
+
`additional`: Long,
|
|
1433
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1434
|
+
): RustBuffer.ByValue
|
|
1435
|
+
|
|
1436
|
+
fun ffi_editor_core_rust_future_poll_u8(
|
|
1437
|
+
`handle`: Long,
|
|
1438
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1439
|
+
`callbackData`: Long,
|
|
1440
|
+
): Unit
|
|
1441
|
+
|
|
1442
|
+
fun ffi_editor_core_rust_future_cancel_u8(`handle`: Long): Unit
|
|
1443
|
+
|
|
1444
|
+
fun ffi_editor_core_rust_future_free_u8(`handle`: Long): Unit
|
|
1445
|
+
|
|
1446
|
+
fun ffi_editor_core_rust_future_complete_u8(
|
|
1447
|
+
`handle`: Long,
|
|
1448
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1449
|
+
): Byte
|
|
1450
|
+
|
|
1451
|
+
fun ffi_editor_core_rust_future_poll_i8(
|
|
1452
|
+
`handle`: Long,
|
|
1453
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1454
|
+
`callbackData`: Long,
|
|
1455
|
+
): Unit
|
|
1456
|
+
|
|
1457
|
+
fun ffi_editor_core_rust_future_cancel_i8(`handle`: Long): Unit
|
|
1458
|
+
|
|
1459
|
+
fun ffi_editor_core_rust_future_free_i8(`handle`: Long): Unit
|
|
1460
|
+
|
|
1461
|
+
fun ffi_editor_core_rust_future_complete_i8(
|
|
1462
|
+
`handle`: Long,
|
|
1463
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1464
|
+
): Byte
|
|
1465
|
+
|
|
1466
|
+
fun ffi_editor_core_rust_future_poll_u16(
|
|
1467
|
+
`handle`: Long,
|
|
1468
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1469
|
+
`callbackData`: Long,
|
|
1470
|
+
): Unit
|
|
1471
|
+
|
|
1472
|
+
fun ffi_editor_core_rust_future_cancel_u16(`handle`: Long): Unit
|
|
1473
|
+
|
|
1474
|
+
fun ffi_editor_core_rust_future_free_u16(`handle`: Long): Unit
|
|
1475
|
+
|
|
1476
|
+
fun ffi_editor_core_rust_future_complete_u16(
|
|
1477
|
+
`handle`: Long,
|
|
1478
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1479
|
+
): Short
|
|
1480
|
+
|
|
1481
|
+
fun ffi_editor_core_rust_future_poll_i16(
|
|
1482
|
+
`handle`: Long,
|
|
1483
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1484
|
+
`callbackData`: Long,
|
|
1485
|
+
): Unit
|
|
1486
|
+
|
|
1487
|
+
fun ffi_editor_core_rust_future_cancel_i16(`handle`: Long): Unit
|
|
1488
|
+
|
|
1489
|
+
fun ffi_editor_core_rust_future_free_i16(`handle`: Long): Unit
|
|
1490
|
+
|
|
1491
|
+
fun ffi_editor_core_rust_future_complete_i16(
|
|
1492
|
+
`handle`: Long,
|
|
1493
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1494
|
+
): Short
|
|
734
1495
|
|
|
1496
|
+
fun ffi_editor_core_rust_future_poll_u32(
|
|
1497
|
+
`handle`: Long,
|
|
1498
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1499
|
+
`callbackData`: Long,
|
|
1500
|
+
): Unit
|
|
735
1501
|
|
|
1502
|
+
fun ffi_editor_core_rust_future_cancel_u32(`handle`: Long): Unit
|
|
736
1503
|
|
|
1504
|
+
fun ffi_editor_core_rust_future_free_u32(`handle`: Long): Unit
|
|
737
1505
|
|
|
1506
|
+
fun ffi_editor_core_rust_future_complete_u32(
|
|
1507
|
+
`handle`: Long,
|
|
1508
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1509
|
+
): Int
|
|
738
1510
|
|
|
1511
|
+
fun ffi_editor_core_rust_future_poll_i32(
|
|
1512
|
+
`handle`: Long,
|
|
1513
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1514
|
+
`callbackData`: Long,
|
|
1515
|
+
): Unit
|
|
739
1516
|
|
|
1517
|
+
fun ffi_editor_core_rust_future_cancel_i32(`handle`: Long): Unit
|
|
740
1518
|
|
|
1519
|
+
fun ffi_editor_core_rust_future_free_i32(`handle`: Long): Unit
|
|
741
1520
|
|
|
1521
|
+
fun ffi_editor_core_rust_future_complete_i32(
|
|
1522
|
+
`handle`: Long,
|
|
1523
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1524
|
+
): Int
|
|
742
1525
|
|
|
1526
|
+
fun ffi_editor_core_rust_future_poll_u64(
|
|
1527
|
+
`handle`: Long,
|
|
1528
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1529
|
+
`callbackData`: Long,
|
|
1530
|
+
): Unit
|
|
743
1531
|
|
|
1532
|
+
fun ffi_editor_core_rust_future_cancel_u64(`handle`: Long): Unit
|
|
744
1533
|
|
|
1534
|
+
fun ffi_editor_core_rust_future_free_u64(`handle`: Long): Unit
|
|
745
1535
|
|
|
1536
|
+
fun ffi_editor_core_rust_future_complete_u64(
|
|
1537
|
+
`handle`: Long,
|
|
1538
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1539
|
+
): Long
|
|
746
1540
|
|
|
1541
|
+
fun ffi_editor_core_rust_future_poll_i64(
|
|
1542
|
+
`handle`: Long,
|
|
1543
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1544
|
+
`callbackData`: Long,
|
|
1545
|
+
): Unit
|
|
747
1546
|
|
|
1547
|
+
fun ffi_editor_core_rust_future_cancel_i64(`handle`: Long): Unit
|
|
748
1548
|
|
|
1549
|
+
fun ffi_editor_core_rust_future_free_i64(`handle`: Long): Unit
|
|
749
1550
|
|
|
1551
|
+
fun ffi_editor_core_rust_future_complete_i64(
|
|
1552
|
+
`handle`: Long,
|
|
1553
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1554
|
+
): Long
|
|
750
1555
|
|
|
1556
|
+
fun ffi_editor_core_rust_future_poll_f32(
|
|
1557
|
+
`handle`: Long,
|
|
1558
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1559
|
+
`callbackData`: Long,
|
|
1560
|
+
): Unit
|
|
751
1561
|
|
|
1562
|
+
fun ffi_editor_core_rust_future_cancel_f32(`handle`: Long): Unit
|
|
752
1563
|
|
|
1564
|
+
fun ffi_editor_core_rust_future_free_f32(`handle`: Long): Unit
|
|
753
1565
|
|
|
1566
|
+
fun ffi_editor_core_rust_future_complete_f32(
|
|
1567
|
+
`handle`: Long,
|
|
1568
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1569
|
+
): Float
|
|
754
1570
|
|
|
1571
|
+
fun ffi_editor_core_rust_future_poll_f64(
|
|
1572
|
+
`handle`: Long,
|
|
1573
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1574
|
+
`callbackData`: Long,
|
|
1575
|
+
): Unit
|
|
755
1576
|
|
|
1577
|
+
fun ffi_editor_core_rust_future_cancel_f64(`handle`: Long): Unit
|
|
756
1578
|
|
|
1579
|
+
fun ffi_editor_core_rust_future_free_f64(`handle`: Long): Unit
|
|
757
1580
|
|
|
1581
|
+
fun ffi_editor_core_rust_future_complete_f64(
|
|
1582
|
+
`handle`: Long,
|
|
1583
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1584
|
+
): Double
|
|
758
1585
|
|
|
1586
|
+
fun ffi_editor_core_rust_future_poll_pointer(
|
|
1587
|
+
`handle`: Long,
|
|
1588
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1589
|
+
`callbackData`: Long,
|
|
1590
|
+
): Unit
|
|
759
1591
|
|
|
1592
|
+
fun ffi_editor_core_rust_future_cancel_pointer(`handle`: Long): Unit
|
|
760
1593
|
|
|
1594
|
+
fun ffi_editor_core_rust_future_free_pointer(`handle`: Long): Unit
|
|
761
1595
|
|
|
1596
|
+
fun ffi_editor_core_rust_future_complete_pointer(
|
|
1597
|
+
`handle`: Long,
|
|
1598
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1599
|
+
): Pointer
|
|
762
1600
|
|
|
1601
|
+
fun ffi_editor_core_rust_future_poll_rust_buffer(
|
|
1602
|
+
`handle`: Long,
|
|
1603
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1604
|
+
`callbackData`: Long,
|
|
1605
|
+
): Unit
|
|
763
1606
|
|
|
1607
|
+
fun ffi_editor_core_rust_future_cancel_rust_buffer(`handle`: Long): Unit
|
|
764
1608
|
|
|
1609
|
+
fun ffi_editor_core_rust_future_free_rust_buffer(`handle`: Long): Unit
|
|
765
1610
|
|
|
1611
|
+
fun ffi_editor_core_rust_future_complete_rust_buffer(
|
|
1612
|
+
`handle`: Long,
|
|
1613
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1614
|
+
): RustBuffer.ByValue
|
|
766
1615
|
|
|
1616
|
+
fun ffi_editor_core_rust_future_poll_void(
|
|
1617
|
+
`handle`: Long,
|
|
1618
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1619
|
+
`callbackData`: Long,
|
|
1620
|
+
): Unit
|
|
767
1621
|
|
|
1622
|
+
fun ffi_editor_core_rust_future_cancel_void(`handle`: Long): Unit
|
|
768
1623
|
|
|
1624
|
+
fun ffi_editor_core_rust_future_free_void(`handle`: Long): Unit
|
|
769
1625
|
|
|
1626
|
+
fun ffi_editor_core_rust_future_complete_void(
|
|
1627
|
+
`handle`: Long,
|
|
1628
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1629
|
+
): Unit
|
|
1630
|
+
}
|
|
770
1631
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
851
|
-
// N.B. the name of the extension is very misleading, since it is
|
|
852
|
-
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
853
|
-
// in the interface for large crates.
|
|
854
|
-
//
|
|
855
|
-
// By splitting the otherwise huge interface into two parts
|
|
856
|
-
// * UniffiLib
|
|
857
|
-
// * IntegrityCheckingUniffiLib (this)
|
|
858
|
-
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
859
|
-
//
|
|
860
|
-
// The `ffi_uniffi_contract_version` method and all checksum methods are put
|
|
861
|
-
// into `IntegrityCheckingUniffiLib` and these methods are called only once,
|
|
862
|
-
// when the library is loaded.
|
|
863
|
-
internal interface IntegrityCheckingUniffiLib : Library {
|
|
864
|
-
// Integrity check functions only
|
|
865
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_apply_encoded_state(
|
|
866
|
-
): Short
|
|
867
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_apply_local_document_json(
|
|
868
|
-
): Short
|
|
869
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_clear_local_awareness(
|
|
870
|
-
): Short
|
|
871
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_create(
|
|
872
|
-
): Short
|
|
873
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_destroy(
|
|
874
|
-
): Short
|
|
875
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_get_document_json(
|
|
876
|
-
): Short
|
|
877
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_get_encoded_state(
|
|
878
|
-
): Short
|
|
879
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_get_peers_json(
|
|
880
|
-
): Short
|
|
881
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_handle_message(
|
|
882
|
-
): Short
|
|
883
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_replace_encoded_state(
|
|
884
|
-
): Short
|
|
885
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_set_local_awareness(
|
|
886
|
-
): Short
|
|
887
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_start(
|
|
888
|
-
): Short
|
|
889
|
-
fun uniffi_editor_core_checksum_func_editor_can_redo(
|
|
890
|
-
): Short
|
|
891
|
-
fun uniffi_editor_core_checksum_func_editor_can_undo(
|
|
892
|
-
): Short
|
|
893
|
-
fun uniffi_editor_core_checksum_func_editor_core_version(
|
|
894
|
-
): Short
|
|
895
|
-
fun uniffi_editor_core_checksum_func_editor_create(
|
|
896
|
-
): Short
|
|
897
|
-
fun uniffi_editor_core_checksum_func_editor_delete_and_split_scalar(
|
|
898
|
-
): Short
|
|
899
|
-
fun uniffi_editor_core_checksum_func_editor_delete_backward_at_selection_scalar(
|
|
900
|
-
): Short
|
|
901
|
-
fun uniffi_editor_core_checksum_func_editor_delete_range(
|
|
902
|
-
): Short
|
|
903
|
-
fun uniffi_editor_core_checksum_func_editor_delete_scalar_range(
|
|
904
|
-
): Short
|
|
905
|
-
fun uniffi_editor_core_checksum_func_editor_destroy(
|
|
906
|
-
): Short
|
|
907
|
-
fun uniffi_editor_core_checksum_func_editor_doc_to_scalar(
|
|
908
|
-
): Short
|
|
909
|
-
fun uniffi_editor_core_checksum_func_editor_get_content_snapshot(
|
|
910
|
-
): Short
|
|
911
|
-
fun uniffi_editor_core_checksum_func_editor_get_current_state(
|
|
912
|
-
): Short
|
|
913
|
-
fun uniffi_editor_core_checksum_func_editor_get_html(
|
|
914
|
-
): Short
|
|
915
|
-
fun uniffi_editor_core_checksum_func_editor_get_json(
|
|
916
|
-
): Short
|
|
917
|
-
fun uniffi_editor_core_checksum_func_editor_get_selection(
|
|
918
|
-
): Short
|
|
919
|
-
fun uniffi_editor_core_checksum_func_editor_get_selection_state(
|
|
920
|
-
): Short
|
|
921
|
-
fun uniffi_editor_core_checksum_func_editor_indent_list_item(
|
|
922
|
-
): Short
|
|
923
|
-
fun uniffi_editor_core_checksum_func_editor_indent_list_item_at_selection_scalar(
|
|
924
|
-
): Short
|
|
925
|
-
fun uniffi_editor_core_checksum_func_editor_insert_content_html(
|
|
926
|
-
): Short
|
|
927
|
-
fun uniffi_editor_core_checksum_func_editor_insert_content_json(
|
|
928
|
-
): Short
|
|
929
|
-
fun uniffi_editor_core_checksum_func_editor_insert_content_json_at_selection_scalar(
|
|
930
|
-
): Short
|
|
931
|
-
fun uniffi_editor_core_checksum_func_editor_insert_node(
|
|
932
|
-
): Short
|
|
933
|
-
fun uniffi_editor_core_checksum_func_editor_insert_node_at_selection_scalar(
|
|
934
|
-
): Short
|
|
935
|
-
fun uniffi_editor_core_checksum_func_editor_insert_text(
|
|
936
|
-
): Short
|
|
937
|
-
fun uniffi_editor_core_checksum_func_editor_insert_text_scalar(
|
|
938
|
-
): Short
|
|
939
|
-
fun uniffi_editor_core_checksum_func_editor_outdent_list_item(
|
|
940
|
-
): Short
|
|
941
|
-
fun uniffi_editor_core_checksum_func_editor_outdent_list_item_at_selection_scalar(
|
|
942
|
-
): Short
|
|
943
|
-
fun uniffi_editor_core_checksum_func_editor_redo(
|
|
944
|
-
): Short
|
|
945
|
-
fun uniffi_editor_core_checksum_func_editor_replace_html(
|
|
946
|
-
): Short
|
|
947
|
-
fun uniffi_editor_core_checksum_func_editor_replace_json(
|
|
948
|
-
): Short
|
|
949
|
-
fun uniffi_editor_core_checksum_func_editor_replace_selection_text(
|
|
950
|
-
): Short
|
|
951
|
-
fun uniffi_editor_core_checksum_func_editor_replace_text_scalar(
|
|
952
|
-
): Short
|
|
953
|
-
fun uniffi_editor_core_checksum_func_editor_resize_image_at_doc_pos(
|
|
954
|
-
): Short
|
|
955
|
-
fun uniffi_editor_core_checksum_func_editor_scalar_to_doc(
|
|
956
|
-
): Short
|
|
957
|
-
fun uniffi_editor_core_checksum_func_editor_set_html(
|
|
958
|
-
): Short
|
|
959
|
-
fun uniffi_editor_core_checksum_func_editor_set_json(
|
|
960
|
-
): Short
|
|
961
|
-
fun uniffi_editor_core_checksum_func_editor_set_mark(
|
|
962
|
-
): Short
|
|
963
|
-
fun uniffi_editor_core_checksum_func_editor_set_mark_at_selection_scalar(
|
|
964
|
-
): Short
|
|
965
|
-
fun uniffi_editor_core_checksum_func_editor_set_selection(
|
|
966
|
-
): Short
|
|
967
|
-
fun uniffi_editor_core_checksum_func_editor_set_selection_scalar(
|
|
968
|
-
): Short
|
|
969
|
-
fun uniffi_editor_core_checksum_func_editor_split_block(
|
|
970
|
-
): Short
|
|
971
|
-
fun uniffi_editor_core_checksum_func_editor_split_block_scalar(
|
|
972
|
-
): Short
|
|
973
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote(
|
|
974
|
-
): Short
|
|
975
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote_at_selection_scalar(
|
|
976
|
-
): Short
|
|
977
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_heading(
|
|
978
|
-
): Short
|
|
979
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_heading_at_selection_scalar(
|
|
980
|
-
): Short
|
|
981
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_mark(
|
|
982
|
-
): Short
|
|
983
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_mark_at_selection_scalar(
|
|
984
|
-
): Short
|
|
985
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_task_item_checked_at_selection_scalar(
|
|
986
|
-
): Short
|
|
987
|
-
fun uniffi_editor_core_checksum_func_editor_undo(
|
|
988
|
-
): Short
|
|
989
|
-
fun uniffi_editor_core_checksum_func_editor_unset_mark(
|
|
990
|
-
): Short
|
|
991
|
-
fun uniffi_editor_core_checksum_func_editor_unset_mark_at_selection_scalar(
|
|
992
|
-
): Short
|
|
993
|
-
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list(
|
|
994
|
-
): Short
|
|
995
|
-
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list_at_selection_scalar(
|
|
996
|
-
): Short
|
|
997
|
-
fun uniffi_editor_core_checksum_func_editor_wrap_in_list(
|
|
998
|
-
): Short
|
|
999
|
-
fun uniffi_editor_core_checksum_func_editor_wrap_in_list_at_selection_scalar(
|
|
1000
|
-
): Short
|
|
1001
|
-
fun ffi_editor_core_uniffi_contract_version(
|
|
1002
|
-
): Int
|
|
1003
|
-
|
|
1632
|
+
private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {
|
|
1633
|
+
// Get the bindings contract version from our ComponentInterface
|
|
1634
|
+
val bindings_contract_version = 29
|
|
1635
|
+
// Get the scaffolding contract version by calling the into the dylib
|
|
1636
|
+
val scaffolding_contract_version = lib.ffi_editor_core_uniffi_contract_version()
|
|
1637
|
+
if (bindings_contract_version != scaffolding_contract_version) {
|
|
1638
|
+
throw RuntimeException("UniFFI contract version mismatch: try cleaning and rebuilding your project")
|
|
1639
|
+
}
|
|
1004
1640
|
}
|
|
1005
1641
|
|
|
1006
|
-
// A JNA Library to expose the extern-C FFI definitions.
|
|
1007
|
-
// This is an implementation detail which will be called internally by the public API.
|
|
1008
|
-
internal interface UniffiLib : Library {
|
|
1009
|
-
companion object {
|
|
1010
|
-
internal val INSTANCE: UniffiLib by lazy {
|
|
1011
|
-
val componentName = "editor_core"
|
|
1012
|
-
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
1013
|
-
// N.B. the name of the extension is very misleading, since it is
|
|
1014
|
-
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
1015
|
-
// in the interface for large crates.
|
|
1016
|
-
//
|
|
1017
|
-
// By splitting the otherwise huge interface into two parts
|
|
1018
|
-
// * UniffiLib (this)
|
|
1019
|
-
// * IntegrityCheckingUniffiLib
|
|
1020
|
-
// And all checksum methods are put into `IntegrityCheckingUniffiLib`
|
|
1021
|
-
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
1022
|
-
//
|
|
1023
|
-
// Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib`
|
|
1024
|
-
// so that we can (optionally!) call `uniffiCheckApiChecksums`...
|
|
1025
|
-
loadIndirect<IntegrityCheckingUniffiLib>(componentName)
|
|
1026
|
-
.also { lib: IntegrityCheckingUniffiLib ->
|
|
1027
|
-
uniffiCheckContractApiVersion(lib)
|
|
1028
|
-
uniffiCheckApiChecksums(lib)
|
|
1029
|
-
}
|
|
1030
|
-
// ... and then we load the library as `UniffiLib`
|
|
1031
|
-
// N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib`
|
|
1032
|
-
// => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...`
|
|
1033
|
-
// error. So we must call `loadIndirect` twice. For crates large enough
|
|
1034
|
-
// to trigger this issue, the performance impact is negligible, running on
|
|
1035
|
-
// a macOS M1 machine the `loadIndirect` call takes ~50ms.
|
|
1036
|
-
val lib = loadIndirect<UniffiLib>(componentName)
|
|
1037
|
-
// No need to check the contract version and checksums, since
|
|
1038
|
-
// we already did that with `IntegrityCheckingUniffiLib` above.
|
|
1039
|
-
// Loading of library with integrity check done.
|
|
1040
|
-
lib
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
// FFI functions
|
|
1046
|
-
fun uniffi_editor_core_fn_func_collaboration_session_apply_encoded_state(`id`: Long,`encodedStateJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1047
|
-
): RustBuffer.ByValue
|
|
1048
|
-
fun uniffi_editor_core_fn_func_collaboration_session_apply_local_document_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1049
|
-
): RustBuffer.ByValue
|
|
1050
|
-
fun uniffi_editor_core_fn_func_collaboration_session_clear_local_awareness(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1051
|
-
): RustBuffer.ByValue
|
|
1052
|
-
fun uniffi_editor_core_fn_func_collaboration_session_create(`configJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1053
|
-
): Long
|
|
1054
|
-
fun uniffi_editor_core_fn_func_collaboration_session_destroy(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1055
|
-
): Unit
|
|
1056
|
-
fun uniffi_editor_core_fn_func_collaboration_session_get_document_json(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1057
|
-
): RustBuffer.ByValue
|
|
1058
|
-
fun uniffi_editor_core_fn_func_collaboration_session_get_encoded_state(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1059
|
-
): RustBuffer.ByValue
|
|
1060
|
-
fun uniffi_editor_core_fn_func_collaboration_session_get_peers_json(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1061
|
-
): RustBuffer.ByValue
|
|
1062
|
-
fun uniffi_editor_core_fn_func_collaboration_session_handle_message(`id`: Long,`messageJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1063
|
-
): RustBuffer.ByValue
|
|
1064
|
-
fun uniffi_editor_core_fn_func_collaboration_session_replace_encoded_state(`id`: Long,`encodedStateJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1065
|
-
): RustBuffer.ByValue
|
|
1066
|
-
fun uniffi_editor_core_fn_func_collaboration_session_set_local_awareness(`id`: Long,`awarenessJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1067
|
-
): RustBuffer.ByValue
|
|
1068
|
-
fun uniffi_editor_core_fn_func_collaboration_session_start(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1069
|
-
): RustBuffer.ByValue
|
|
1070
|
-
fun uniffi_editor_core_fn_func_editor_can_redo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1071
|
-
): Byte
|
|
1072
|
-
fun uniffi_editor_core_fn_func_editor_can_undo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1073
|
-
): Byte
|
|
1074
|
-
fun uniffi_editor_core_fn_func_editor_core_version(uniffi_out_err: UniffiRustCallStatus,
|
|
1075
|
-
): RustBuffer.ByValue
|
|
1076
|
-
fun uniffi_editor_core_fn_func_editor_create(`configJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1077
|
-
): Long
|
|
1078
|
-
fun uniffi_editor_core_fn_func_editor_delete_and_split_scalar(`id`: Long,`scalarFrom`: Int,`scalarTo`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1079
|
-
): RustBuffer.ByValue
|
|
1080
|
-
fun uniffi_editor_core_fn_func_editor_delete_backward_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1081
|
-
): RustBuffer.ByValue
|
|
1082
|
-
fun uniffi_editor_core_fn_func_editor_delete_range(`id`: Long,`from`: Int,`to`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1083
|
-
): RustBuffer.ByValue
|
|
1084
|
-
fun uniffi_editor_core_fn_func_editor_delete_scalar_range(`id`: Long,`scalarFrom`: Int,`scalarTo`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1085
|
-
): RustBuffer.ByValue
|
|
1086
|
-
fun uniffi_editor_core_fn_func_editor_destroy(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1087
|
-
): Unit
|
|
1088
|
-
fun uniffi_editor_core_fn_func_editor_doc_to_scalar(`id`: Long,`docPos`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1089
|
-
): Int
|
|
1090
|
-
fun uniffi_editor_core_fn_func_editor_get_content_snapshot(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1091
|
-
): RustBuffer.ByValue
|
|
1092
|
-
fun uniffi_editor_core_fn_func_editor_get_current_state(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1093
|
-
): RustBuffer.ByValue
|
|
1094
|
-
fun uniffi_editor_core_fn_func_editor_get_html(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1095
|
-
): RustBuffer.ByValue
|
|
1096
|
-
fun uniffi_editor_core_fn_func_editor_get_json(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1097
|
-
): RustBuffer.ByValue
|
|
1098
|
-
fun uniffi_editor_core_fn_func_editor_get_selection(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1099
|
-
): RustBuffer.ByValue
|
|
1100
|
-
fun uniffi_editor_core_fn_func_editor_get_selection_state(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1101
|
-
): RustBuffer.ByValue
|
|
1102
|
-
fun uniffi_editor_core_fn_func_editor_indent_list_item(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1103
|
-
): RustBuffer.ByValue
|
|
1104
|
-
fun uniffi_editor_core_fn_func_editor_indent_list_item_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1105
|
-
): RustBuffer.ByValue
|
|
1106
|
-
fun uniffi_editor_core_fn_func_editor_insert_content_html(`id`: Long,`html`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1107
|
-
): RustBuffer.ByValue
|
|
1108
|
-
fun uniffi_editor_core_fn_func_editor_insert_content_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1109
|
-
): RustBuffer.ByValue
|
|
1110
|
-
fun uniffi_editor_core_fn_func_editor_insert_content_json_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1111
|
-
): RustBuffer.ByValue
|
|
1112
|
-
fun uniffi_editor_core_fn_func_editor_insert_node(`id`: Long,`nodeType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1113
|
-
): RustBuffer.ByValue
|
|
1114
|
-
fun uniffi_editor_core_fn_func_editor_insert_node_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`nodeType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1115
|
-
): RustBuffer.ByValue
|
|
1116
|
-
fun uniffi_editor_core_fn_func_editor_insert_text(`id`: Long,`pos`: Int,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1117
|
-
): RustBuffer.ByValue
|
|
1118
|
-
fun uniffi_editor_core_fn_func_editor_insert_text_scalar(`id`: Long,`scalarPos`: Int,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1119
|
-
): RustBuffer.ByValue
|
|
1120
|
-
fun uniffi_editor_core_fn_func_editor_outdent_list_item(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1121
|
-
): RustBuffer.ByValue
|
|
1122
|
-
fun uniffi_editor_core_fn_func_editor_outdent_list_item_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1123
|
-
): RustBuffer.ByValue
|
|
1124
|
-
fun uniffi_editor_core_fn_func_editor_redo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1125
|
-
): RustBuffer.ByValue
|
|
1126
|
-
fun uniffi_editor_core_fn_func_editor_replace_html(`id`: Long,`html`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1127
|
-
): RustBuffer.ByValue
|
|
1128
|
-
fun uniffi_editor_core_fn_func_editor_replace_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1129
|
-
): RustBuffer.ByValue
|
|
1130
|
-
fun uniffi_editor_core_fn_func_editor_replace_selection_text(`id`: Long,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1131
|
-
): RustBuffer.ByValue
|
|
1132
|
-
fun uniffi_editor_core_fn_func_editor_replace_text_scalar(`id`: Long,`scalarFrom`: Int,`scalarTo`: Int,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1133
|
-
): RustBuffer.ByValue
|
|
1134
|
-
fun uniffi_editor_core_fn_func_editor_resize_image_at_doc_pos(`id`: Long,`docPos`: Int,`width`: Int,`height`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1135
|
-
): RustBuffer.ByValue
|
|
1136
|
-
fun uniffi_editor_core_fn_func_editor_scalar_to_doc(`id`: Long,`scalar`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1137
|
-
): Int
|
|
1138
|
-
fun uniffi_editor_core_fn_func_editor_set_html(`id`: Long,`html`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1139
|
-
): RustBuffer.ByValue
|
|
1140
|
-
fun uniffi_editor_core_fn_func_editor_set_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1141
|
-
): RustBuffer.ByValue
|
|
1142
|
-
fun uniffi_editor_core_fn_func_editor_set_mark(`id`: Long,`markName`: RustBuffer.ByValue,`attrsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1143
|
-
): RustBuffer.ByValue
|
|
1144
|
-
fun uniffi_editor_core_fn_func_editor_set_mark_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`markName`: RustBuffer.ByValue,`attrsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1145
|
-
): RustBuffer.ByValue
|
|
1146
|
-
fun uniffi_editor_core_fn_func_editor_set_selection(`id`: Long,`anchor`: Int,`head`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1147
|
-
): Unit
|
|
1148
|
-
fun uniffi_editor_core_fn_func_editor_set_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1149
|
-
): Unit
|
|
1150
|
-
fun uniffi_editor_core_fn_func_editor_split_block(`id`: Long,`pos`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1151
|
-
): RustBuffer.ByValue
|
|
1152
|
-
fun uniffi_editor_core_fn_func_editor_split_block_scalar(`id`: Long,`scalarPos`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1153
|
-
): RustBuffer.ByValue
|
|
1154
|
-
fun uniffi_editor_core_fn_func_editor_toggle_blockquote(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1155
|
-
): RustBuffer.ByValue
|
|
1156
|
-
fun uniffi_editor_core_fn_func_editor_toggle_blockquote_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1157
|
-
): RustBuffer.ByValue
|
|
1158
|
-
fun uniffi_editor_core_fn_func_editor_toggle_heading(`id`: Long,`level`: Byte,uniffi_out_err: UniffiRustCallStatus,
|
|
1159
|
-
): RustBuffer.ByValue
|
|
1160
|
-
fun uniffi_editor_core_fn_func_editor_toggle_heading_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`level`: Byte,uniffi_out_err: UniffiRustCallStatus,
|
|
1161
|
-
): RustBuffer.ByValue
|
|
1162
|
-
fun uniffi_editor_core_fn_func_editor_toggle_mark(`id`: Long,`markName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1163
|
-
): RustBuffer.ByValue
|
|
1164
|
-
fun uniffi_editor_core_fn_func_editor_toggle_mark_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`markName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1165
|
-
): RustBuffer.ByValue
|
|
1166
|
-
fun uniffi_editor_core_fn_func_editor_toggle_task_item_checked_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1167
|
-
): RustBuffer.ByValue
|
|
1168
|
-
fun uniffi_editor_core_fn_func_editor_undo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1169
|
-
): RustBuffer.ByValue
|
|
1170
|
-
fun uniffi_editor_core_fn_func_editor_unset_mark(`id`: Long,`markName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1171
|
-
): RustBuffer.ByValue
|
|
1172
|
-
fun uniffi_editor_core_fn_func_editor_unset_mark_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`markName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1173
|
-
): RustBuffer.ByValue
|
|
1174
|
-
fun uniffi_editor_core_fn_func_editor_unwrap_from_list(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1175
|
-
): RustBuffer.ByValue
|
|
1176
|
-
fun uniffi_editor_core_fn_func_editor_unwrap_from_list_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1177
|
-
): RustBuffer.ByValue
|
|
1178
|
-
fun uniffi_editor_core_fn_func_editor_wrap_in_list(`id`: Long,`listType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1179
|
-
): RustBuffer.ByValue
|
|
1180
|
-
fun uniffi_editor_core_fn_func_editor_wrap_in_list_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`listType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1181
|
-
): RustBuffer.ByValue
|
|
1182
|
-
fun ffi_editor_core_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1183
|
-
): RustBuffer.ByValue
|
|
1184
|
-
fun ffi_editor_core_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1185
|
-
): RustBuffer.ByValue
|
|
1186
|
-
fun ffi_editor_core_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1187
|
-
): Unit
|
|
1188
|
-
fun ffi_editor_core_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1189
|
-
): RustBuffer.ByValue
|
|
1190
|
-
fun ffi_editor_core_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1191
|
-
): Unit
|
|
1192
|
-
fun ffi_editor_core_rust_future_cancel_u8(`handle`: Long,
|
|
1193
|
-
): Unit
|
|
1194
|
-
fun ffi_editor_core_rust_future_free_u8(`handle`: Long,
|
|
1195
|
-
): Unit
|
|
1196
|
-
fun ffi_editor_core_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1197
|
-
): Byte
|
|
1198
|
-
fun ffi_editor_core_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1199
|
-
): Unit
|
|
1200
|
-
fun ffi_editor_core_rust_future_cancel_i8(`handle`: Long,
|
|
1201
|
-
): Unit
|
|
1202
|
-
fun ffi_editor_core_rust_future_free_i8(`handle`: Long,
|
|
1203
|
-
): Unit
|
|
1204
|
-
fun ffi_editor_core_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1205
|
-
): Byte
|
|
1206
|
-
fun ffi_editor_core_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1207
|
-
): Unit
|
|
1208
|
-
fun ffi_editor_core_rust_future_cancel_u16(`handle`: Long,
|
|
1209
|
-
): Unit
|
|
1210
|
-
fun ffi_editor_core_rust_future_free_u16(`handle`: Long,
|
|
1211
|
-
): Unit
|
|
1212
|
-
fun ffi_editor_core_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1213
|
-
): Short
|
|
1214
|
-
fun ffi_editor_core_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1215
|
-
): Unit
|
|
1216
|
-
fun ffi_editor_core_rust_future_cancel_i16(`handle`: Long,
|
|
1217
|
-
): Unit
|
|
1218
|
-
fun ffi_editor_core_rust_future_free_i16(`handle`: Long,
|
|
1219
|
-
): Unit
|
|
1220
|
-
fun ffi_editor_core_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1221
|
-
): Short
|
|
1222
|
-
fun ffi_editor_core_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1223
|
-
): Unit
|
|
1224
|
-
fun ffi_editor_core_rust_future_cancel_u32(`handle`: Long,
|
|
1225
|
-
): Unit
|
|
1226
|
-
fun ffi_editor_core_rust_future_free_u32(`handle`: Long,
|
|
1227
|
-
): Unit
|
|
1228
|
-
fun ffi_editor_core_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1229
|
-
): Int
|
|
1230
|
-
fun ffi_editor_core_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1231
|
-
): Unit
|
|
1232
|
-
fun ffi_editor_core_rust_future_cancel_i32(`handle`: Long,
|
|
1233
|
-
): Unit
|
|
1234
|
-
fun ffi_editor_core_rust_future_free_i32(`handle`: Long,
|
|
1235
|
-
): Unit
|
|
1236
|
-
fun ffi_editor_core_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1237
|
-
): Int
|
|
1238
|
-
fun ffi_editor_core_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1239
|
-
): Unit
|
|
1240
|
-
fun ffi_editor_core_rust_future_cancel_u64(`handle`: Long,
|
|
1241
|
-
): Unit
|
|
1242
|
-
fun ffi_editor_core_rust_future_free_u64(`handle`: Long,
|
|
1243
|
-
): Unit
|
|
1244
|
-
fun ffi_editor_core_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1245
|
-
): Long
|
|
1246
|
-
fun ffi_editor_core_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1247
|
-
): Unit
|
|
1248
|
-
fun ffi_editor_core_rust_future_cancel_i64(`handle`: Long,
|
|
1249
|
-
): Unit
|
|
1250
|
-
fun ffi_editor_core_rust_future_free_i64(`handle`: Long,
|
|
1251
|
-
): Unit
|
|
1252
|
-
fun ffi_editor_core_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1253
|
-
): Long
|
|
1254
|
-
fun ffi_editor_core_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1255
|
-
): Unit
|
|
1256
|
-
fun ffi_editor_core_rust_future_cancel_f32(`handle`: Long,
|
|
1257
|
-
): Unit
|
|
1258
|
-
fun ffi_editor_core_rust_future_free_f32(`handle`: Long,
|
|
1259
|
-
): Unit
|
|
1260
|
-
fun ffi_editor_core_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1261
|
-
): Float
|
|
1262
|
-
fun ffi_editor_core_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1263
|
-
): Unit
|
|
1264
|
-
fun ffi_editor_core_rust_future_cancel_f64(`handle`: Long,
|
|
1265
|
-
): Unit
|
|
1266
|
-
fun ffi_editor_core_rust_future_free_f64(`handle`: Long,
|
|
1267
|
-
): Unit
|
|
1268
|
-
fun ffi_editor_core_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1269
|
-
): Double
|
|
1270
|
-
fun ffi_editor_core_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1271
|
-
): Unit
|
|
1272
|
-
fun ffi_editor_core_rust_future_cancel_pointer(`handle`: Long,
|
|
1273
|
-
): Unit
|
|
1274
|
-
fun ffi_editor_core_rust_future_free_pointer(`handle`: Long,
|
|
1275
|
-
): Unit
|
|
1276
|
-
fun ffi_editor_core_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1277
|
-
): Pointer
|
|
1278
|
-
fun ffi_editor_core_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1279
|
-
): Unit
|
|
1280
|
-
fun ffi_editor_core_rust_future_cancel_rust_buffer(`handle`: Long,
|
|
1281
|
-
): Unit
|
|
1282
|
-
fun ffi_editor_core_rust_future_free_rust_buffer(`handle`: Long,
|
|
1283
|
-
): Unit
|
|
1284
|
-
fun ffi_editor_core_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1285
|
-
): RustBuffer.ByValue
|
|
1286
|
-
fun ffi_editor_core_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1287
|
-
): Unit
|
|
1288
|
-
fun ffi_editor_core_rust_future_cancel_void(`handle`: Long,
|
|
1289
|
-
): Unit
|
|
1290
|
-
fun ffi_editor_core_rust_future_free_void(`handle`: Long,
|
|
1291
|
-
): Unit
|
|
1292
|
-
fun ffi_editor_core_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1293
|
-
): Unit
|
|
1294
|
-
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {
|
|
1298
|
-
// Get the bindings contract version from our ComponentInterface
|
|
1299
|
-
val bindings_contract_version = 29
|
|
1300
|
-
// Get the scaffolding contract version by calling the into the dylib
|
|
1301
|
-
val scaffolding_contract_version = lib.ffi_editor_core_uniffi_contract_version()
|
|
1302
|
-
if (bindings_contract_version != scaffolding_contract_version) {
|
|
1303
|
-
throw RuntimeException("UniFFI contract version mismatch: try cleaning and rebuilding your project")
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
1642
|
@Suppress("UNUSED_PARAMETER")
|
|
1307
1643
|
private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
1308
1644
|
if (lib.uniffi_editor_core_checksum_func_collaboration_session_apply_encoded_state() != 4684.toShort()) {
|
|
@@ -1365,6 +1701,12 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
1365
1701
|
if (lib.uniffi_editor_core_checksum_func_editor_delete_scalar_range() != 60098.toShort()) {
|
|
1366
1702
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1367
1703
|
}
|
|
1704
|
+
if (lib.uniffi_editor_core_checksum_func_editor_delete_table_column() != 12282.toShort()) {
|
|
1705
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1706
|
+
}
|
|
1707
|
+
if (lib.uniffi_editor_core_checksum_func_editor_delete_table_row() != 32001.toShort()) {
|
|
1708
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1709
|
+
}
|
|
1368
1710
|
if (lib.uniffi_editor_core_checksum_func_editor_destroy() != 35774.toShort()) {
|
|
1369
1711
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1370
1712
|
}
|
|
@@ -1410,12 +1752,21 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
1410
1752
|
if (lib.uniffi_editor_core_checksum_func_editor_insert_node_at_selection_scalar() != 32254.toShort()) {
|
|
1411
1753
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1412
1754
|
}
|
|
1755
|
+
if (lib.uniffi_editor_core_checksum_func_editor_insert_table_column() != 13873.toShort()) {
|
|
1756
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1757
|
+
}
|
|
1758
|
+
if (lib.uniffi_editor_core_checksum_func_editor_insert_table_row() != 58307.toShort()) {
|
|
1759
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1760
|
+
}
|
|
1413
1761
|
if (lib.uniffi_editor_core_checksum_func_editor_insert_text() != 22584.toShort()) {
|
|
1414
1762
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1415
1763
|
}
|
|
1416
1764
|
if (lib.uniffi_editor_core_checksum_func_editor_insert_text_scalar() != 30263.toShort()) {
|
|
1417
1765
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1418
1766
|
}
|
|
1767
|
+
if (lib.uniffi_editor_core_checksum_func_editor_move_table_cell() != 56610.toShort()) {
|
|
1768
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1769
|
+
}
|
|
1419
1770
|
if (lib.uniffi_editor_core_checksum_func_editor_outdent_list_item() != 55796.toShort()) {
|
|
1420
1771
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1421
1772
|
}
|
|
@@ -1443,7 +1794,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
1443
1794
|
if (lib.uniffi_editor_core_checksum_func_editor_scalar_to_doc() != 40126.toShort()) {
|
|
1444
1795
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1445
1796
|
}
|
|
1446
|
-
if (lib.
|
|
1797
|
+
if (lib.uniffi_editor_core_checksum_func_editor_set_cell_selection() != 40422.toShort()) {
|
|
1798
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1799
|
+
}
|
|
1800
|
+
if (lib.uniffi_editor_core_checksum_func_editor_set_html() != 47581.toShort()) {
|
|
1447
1801
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1448
1802
|
}
|
|
1449
1803
|
if (lib.uniffi_editor_core_checksum_func_editor_set_json() != 18497.toShort()) {
|
|
@@ -1455,6 +1809,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
1455
1809
|
if (lib.uniffi_editor_core_checksum_func_editor_set_mark_at_selection_scalar() != 43994.toShort()) {
|
|
1456
1810
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1457
1811
|
}
|
|
1812
|
+
if (lib.uniffi_editor_core_checksum_func_editor_set_node_selection() != 61000.toShort()) {
|
|
1813
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1814
|
+
}
|
|
1458
1815
|
if (lib.uniffi_editor_core_checksum_func_editor_set_selection() != 28236.toShort()) {
|
|
1459
1816
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1460
1817
|
}
|
|
@@ -1522,7 +1879,6 @@ public fun uniffiEnsureInitialized() {
|
|
|
1522
1879
|
|
|
1523
1880
|
// Public interface members begin here.
|
|
1524
1881
|
|
|
1525
|
-
|
|
1526
1882
|
// Interface implemented by anything that can contain an object reference.
|
|
1527
1883
|
//
|
|
1528
1884
|
// Such types expose a `destroy()` method that must be called to cleanly
|
|
@@ -1533,11 +1889,15 @@ public fun uniffiEnsureInitialized() {
|
|
|
1533
1889
|
// helper method to execute a block and destroy the object at the end.
|
|
1534
1890
|
interface Disposable {
|
|
1535
1891
|
fun destroy()
|
|
1892
|
+
|
|
1536
1893
|
companion object {
|
|
1537
1894
|
fun destroy(vararg args: Any?) {
|
|
1538
1895
|
for (arg in args) {
|
|
1539
1896
|
when (arg) {
|
|
1540
|
-
is Disposable ->
|
|
1897
|
+
is Disposable -> {
|
|
1898
|
+
arg.destroy()
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1541
1901
|
is ArrayList<*> -> {
|
|
1542
1902
|
for (idx in arg.indices) {
|
|
1543
1903
|
val element = arg[idx]
|
|
@@ -1546,6 +1906,7 @@ interface Disposable {
|
|
|
1546
1906
|
}
|
|
1547
1907
|
}
|
|
1548
1908
|
}
|
|
1909
|
+
|
|
1549
1910
|
is Map<*, *> -> {
|
|
1550
1911
|
for (element in arg.values) {
|
|
1551
1912
|
if (element is Disposable) {
|
|
@@ -1553,6 +1914,7 @@ interface Disposable {
|
|
|
1553
1914
|
}
|
|
1554
1915
|
}
|
|
1555
1916
|
}
|
|
1917
|
+
|
|
1556
1918
|
is Iterable<*> -> {
|
|
1557
1919
|
for (element in arg) {
|
|
1558
1920
|
if (element is Disposable) {
|
|
@@ -1581,7 +1943,7 @@ inline fun <T : Disposable?, R> T.use(block: (T) -> R) =
|
|
|
1581
1943
|
}
|
|
1582
1944
|
}
|
|
1583
1945
|
|
|
1584
|
-
/**
|
|
1946
|
+
/**
|
|
1585
1947
|
* Used to instantiate an interface without an actual pointer, for fakes in tests, mostly.
|
|
1586
1948
|
*
|
|
1587
1949
|
* @suppress
|
|
@@ -1591,22 +1953,19 @@ object NoPointer
|
|
|
1591
1953
|
/**
|
|
1592
1954
|
* @suppress
|
|
1593
1955
|
*/
|
|
1594
|
-
public object FfiConverterUByte: FfiConverter<UByte, Byte> {
|
|
1595
|
-
override fun lift(value: Byte): UByte
|
|
1596
|
-
return value.toUByte()
|
|
1597
|
-
}
|
|
1956
|
+
public object FfiConverterUByte : FfiConverter<UByte, Byte> {
|
|
1957
|
+
override fun lift(value: Byte): UByte = value.toUByte()
|
|
1598
1958
|
|
|
1599
|
-
override fun read(buf: ByteBuffer): UByte
|
|
1600
|
-
return lift(buf.get())
|
|
1601
|
-
}
|
|
1959
|
+
override fun read(buf: ByteBuffer): UByte = lift(buf.get())
|
|
1602
1960
|
|
|
1603
|
-
override fun lower(value: UByte): Byte
|
|
1604
|
-
return value.toByte()
|
|
1605
|
-
}
|
|
1961
|
+
override fun lower(value: UByte): Byte = value.toByte()
|
|
1606
1962
|
|
|
1607
1963
|
override fun allocationSize(value: UByte) = 1UL
|
|
1608
1964
|
|
|
1609
|
-
override fun write(
|
|
1965
|
+
override fun write(
|
|
1966
|
+
value: UByte,
|
|
1967
|
+
buf: ByteBuffer,
|
|
1968
|
+
) {
|
|
1610
1969
|
buf.put(value.toByte())
|
|
1611
1970
|
}
|
|
1612
1971
|
}
|
|
@@ -1614,22 +1973,19 @@ public object FfiConverterUByte: FfiConverter<UByte, Byte> {
|
|
|
1614
1973
|
/**
|
|
1615
1974
|
* @suppress
|
|
1616
1975
|
*/
|
|
1617
|
-
public object FfiConverterUInt: FfiConverter<UInt, Int> {
|
|
1618
|
-
override fun lift(value: Int): UInt
|
|
1619
|
-
return value.toUInt()
|
|
1620
|
-
}
|
|
1976
|
+
public object FfiConverterUInt : FfiConverter<UInt, Int> {
|
|
1977
|
+
override fun lift(value: Int): UInt = value.toUInt()
|
|
1621
1978
|
|
|
1622
|
-
override fun read(buf: ByteBuffer): UInt
|
|
1623
|
-
return lift(buf.getInt())
|
|
1624
|
-
}
|
|
1979
|
+
override fun read(buf: ByteBuffer): UInt = lift(buf.getInt())
|
|
1625
1980
|
|
|
1626
|
-
override fun lower(value: UInt): Int
|
|
1627
|
-
return value.toInt()
|
|
1628
|
-
}
|
|
1981
|
+
override fun lower(value: UInt): Int = value.toInt()
|
|
1629
1982
|
|
|
1630
1983
|
override fun allocationSize(value: UInt) = 4UL
|
|
1631
1984
|
|
|
1632
|
-
override fun write(
|
|
1985
|
+
override fun write(
|
|
1986
|
+
value: UInt,
|
|
1987
|
+
buf: ByteBuffer,
|
|
1988
|
+
) {
|
|
1633
1989
|
buf.putInt(value.toInt())
|
|
1634
1990
|
}
|
|
1635
1991
|
}
|
|
@@ -1637,22 +1993,19 @@ public object FfiConverterUInt: FfiConverter<UInt, Int> {
|
|
|
1637
1993
|
/**
|
|
1638
1994
|
* @suppress
|
|
1639
1995
|
*/
|
|
1640
|
-
public object FfiConverterULong: FfiConverter<ULong, Long> {
|
|
1641
|
-
override fun lift(value: Long): ULong
|
|
1642
|
-
return value.toULong()
|
|
1643
|
-
}
|
|
1996
|
+
public object FfiConverterULong : FfiConverter<ULong, Long> {
|
|
1997
|
+
override fun lift(value: Long): ULong = value.toULong()
|
|
1644
1998
|
|
|
1645
|
-
override fun read(buf: ByteBuffer): ULong
|
|
1646
|
-
return lift(buf.getLong())
|
|
1647
|
-
}
|
|
1999
|
+
override fun read(buf: ByteBuffer): ULong = lift(buf.getLong())
|
|
1648
2000
|
|
|
1649
|
-
override fun lower(value: ULong): Long
|
|
1650
|
-
return value.toLong()
|
|
1651
|
-
}
|
|
2001
|
+
override fun lower(value: ULong): Long = value.toLong()
|
|
1652
2002
|
|
|
1653
2003
|
override fun allocationSize(value: ULong) = 8UL
|
|
1654
2004
|
|
|
1655
|
-
override fun write(
|
|
2005
|
+
override fun write(
|
|
2006
|
+
value: ULong,
|
|
2007
|
+
buf: ByteBuffer,
|
|
2008
|
+
) {
|
|
1656
2009
|
buf.putLong(value.toLong())
|
|
1657
2010
|
}
|
|
1658
2011
|
}
|
|
@@ -1660,22 +2013,19 @@ public object FfiConverterULong: FfiConverter<ULong, Long> {
|
|
|
1660
2013
|
/**
|
|
1661
2014
|
* @suppress
|
|
1662
2015
|
*/
|
|
1663
|
-
public object FfiConverterBoolean: FfiConverter<Boolean, Byte> {
|
|
1664
|
-
override fun lift(value: Byte): Boolean
|
|
1665
|
-
return value.toInt() != 0
|
|
1666
|
-
}
|
|
2016
|
+
public object FfiConverterBoolean : FfiConverter<Boolean, Byte> {
|
|
2017
|
+
override fun lift(value: Byte): Boolean = value.toInt() != 0
|
|
1667
2018
|
|
|
1668
|
-
override fun read(buf: ByteBuffer): Boolean
|
|
1669
|
-
return lift(buf.get())
|
|
1670
|
-
}
|
|
2019
|
+
override fun read(buf: ByteBuffer): Boolean = lift(buf.get())
|
|
1671
2020
|
|
|
1672
|
-
override fun lower(value: Boolean): Byte
|
|
1673
|
-
return if (value) 1.toByte() else 0.toByte()
|
|
1674
|
-
}
|
|
2021
|
+
override fun lower(value: Boolean): Byte = if (value) 1.toByte() else 0.toByte()
|
|
1675
2022
|
|
|
1676
2023
|
override fun allocationSize(value: Boolean) = 1UL
|
|
1677
2024
|
|
|
1678
|
-
override fun write(
|
|
2025
|
+
override fun write(
|
|
2026
|
+
value: Boolean,
|
|
2027
|
+
buf: ByteBuffer,
|
|
2028
|
+
) {
|
|
1679
2029
|
buf.put(lower(value))
|
|
1680
2030
|
}
|
|
1681
2031
|
}
|
|
@@ -1683,7 +2033,7 @@ public object FfiConverterBoolean: FfiConverter<Boolean, Byte> {
|
|
|
1683
2033
|
/**
|
|
1684
2034
|
* @suppress
|
|
1685
2035
|
*/
|
|
1686
|
-
public object FfiConverterString: FfiConverter<String, RustBuffer.ByValue> {
|
|
2036
|
+
public object FfiConverterString : FfiConverter<String, RustBuffer.ByValue> {
|
|
1687
2037
|
// Note: we don't inherit from FfiConverterRustBuffer, because we use a
|
|
1688
2038
|
// special encoding when lowering/lifting. We can use `RustBuffer.len` to
|
|
1689
2039
|
// store our length and avoid writing it out to the buffer.
|
|
@@ -1730,834 +2080,1172 @@ public object FfiConverterString: FfiConverter<String, RustBuffer.ByValue> {
|
|
|
1730
2080
|
return sizeForLength + sizeForString
|
|
1731
2081
|
}
|
|
1732
2082
|
|
|
1733
|
-
override fun write(
|
|
2083
|
+
override fun write(
|
|
2084
|
+
value: String,
|
|
2085
|
+
buf: ByteBuffer,
|
|
2086
|
+
) {
|
|
1734
2087
|
val byteBuf = toUtf8(value)
|
|
1735
2088
|
buf.putInt(byteBuf.limit())
|
|
1736
2089
|
buf.put(byteBuf)
|
|
1737
2090
|
}
|
|
1738
2091
|
}
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* Apply a durable Yjs encoded state/update represented as a JSON byte array.
|
|
2095
|
+
*/
|
|
2096
|
+
fun `collaborationSessionApplyEncodedState`(
|
|
2097
|
+
`id`: kotlin.ULong,
|
|
2098
|
+
`encodedStateJson`: kotlin.String,
|
|
2099
|
+
): kotlin.String =
|
|
2100
|
+
FfiConverterString.lift(
|
|
2101
|
+
uniffiRustCall { _status ->
|
|
2102
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_apply_encoded_state(
|
|
2103
|
+
FfiConverterULong.lower(`id`),
|
|
2104
|
+
FfiConverterString.lower(`encodedStateJson`),
|
|
2105
|
+
_status,
|
|
2106
|
+
)
|
|
2107
|
+
},
|
|
1747
2108
|
)
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
2109
|
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
2110
|
+
/**
|
|
2111
|
+
* Apply a local ProseMirror JSON snapshot to the collaboration session.
|
|
2112
|
+
*/
|
|
2113
|
+
fun `collaborationSessionApplyLocalDocumentJson`(
|
|
2114
|
+
`id`: kotlin.ULong,
|
|
2115
|
+
`json`: kotlin.String,
|
|
2116
|
+
): kotlin.String =
|
|
2117
|
+
FfiConverterString.lift(
|
|
2118
|
+
uniffiRustCall { _status ->
|
|
2119
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_apply_local_document_json(
|
|
2120
|
+
FfiConverterULong.lower(`id`),
|
|
2121
|
+
FfiConverterString.lower(`json`),
|
|
2122
|
+
_status,
|
|
2123
|
+
)
|
|
2124
|
+
},
|
|
1759
2125
|
)
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
2126
|
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
2127
|
+
/**
|
|
2128
|
+
* Clear the local awareness payload for a collaboration session.
|
|
2129
|
+
*/
|
|
2130
|
+
fun `collaborationSessionClearLocalAwareness`(`id`: kotlin.ULong): kotlin.String =
|
|
2131
|
+
FfiConverterString.lift(
|
|
2132
|
+
uniffiRustCall { _status ->
|
|
2133
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_clear_local_awareness(
|
|
2134
|
+
FfiConverterULong.lower(`id`),
|
|
2135
|
+
_status,
|
|
2136
|
+
)
|
|
2137
|
+
},
|
|
1771
2138
|
)
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
2139
|
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
}
|
|
2140
|
+
/**
|
|
2141
|
+
* Create a Yjs collaboration session backed by yrs.
|
|
2142
|
+
*/
|
|
2143
|
+
fun `collaborationSessionCreate`(`configJson`: kotlin.String): kotlin.ULong =
|
|
2144
|
+
FfiConverterULong.lift(
|
|
2145
|
+
uniffiRustCall { _status ->
|
|
2146
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_create(FfiConverterString.lower(`configJson`), _status)
|
|
2147
|
+
},
|
|
1783
2148
|
)
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* Destroy a collaboration session and free its resources.
|
|
2152
|
+
*/
|
|
2153
|
+
fun `collaborationSessionDestroy`(`id`: kotlin.ULong) =
|
|
2154
|
+
uniffiRustCall { _status ->
|
|
2155
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_destroy(FfiConverterULong.lower(`id`), _status)
|
|
1784
2156
|
}
|
|
1785
|
-
|
|
1786
2157
|
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
/**
|
|
1799
|
-
* Return the current shared ProseMirror JSON document for a collaboration session.
|
|
1800
|
-
*/ fun `collaborationSessionGetDocumentJson`(`id`: kotlin.ULong): kotlin.String {
|
|
1801
|
-
return FfiConverterString.lift(
|
|
1802
|
-
uniffiRustCall() { _status ->
|
|
1803
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_document_json(
|
|
1804
|
-
FfiConverterULong.lower(`id`),_status)
|
|
1805
|
-
}
|
|
2158
|
+
/**
|
|
2159
|
+
* Return the current shared ProseMirror JSON document for a collaboration session.
|
|
2160
|
+
*/
|
|
2161
|
+
fun `collaborationSessionGetDocumentJson`(`id`: kotlin.ULong): kotlin.String =
|
|
2162
|
+
FfiConverterString.lift(
|
|
2163
|
+
uniffiRustCall { _status ->
|
|
2164
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_document_json(FfiConverterULong.lower(`id`), _status)
|
|
2165
|
+
},
|
|
1806
2166
|
)
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
2167
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Return the current shared Yjs document state as a JSON byte array.
|
|
2170
|
+
*/
|
|
2171
|
+
fun `collaborationSessionGetEncodedState`(`id`: kotlin.ULong): kotlin.String =
|
|
2172
|
+
FfiConverterString.lift(
|
|
2173
|
+
uniffiRustCall { _status ->
|
|
2174
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_encoded_state(FfiConverterULong.lower(`id`), _status)
|
|
2175
|
+
},
|
|
1818
2176
|
)
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
2177
|
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
}
|
|
2178
|
+
/**
|
|
2179
|
+
* Return the current awareness peers for a collaboration session.
|
|
2180
|
+
*/
|
|
2181
|
+
fun `collaborationSessionGetPeersJson`(`id`: kotlin.ULong): kotlin.String =
|
|
2182
|
+
FfiConverterString.lift(
|
|
2183
|
+
uniffiRustCall { _status ->
|
|
2184
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_peers_json(FfiConverterULong.lower(`id`), _status)
|
|
2185
|
+
},
|
|
1830
2186
|
)
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
2187
|
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
2188
|
+
/**
|
|
2189
|
+
* Apply an incoming y-sync binary message encoded as a JSON byte array.
|
|
2190
|
+
*/
|
|
2191
|
+
fun `collaborationSessionHandleMessage`(
|
|
2192
|
+
`id`: kotlin.ULong,
|
|
2193
|
+
`messageJson`: kotlin.String,
|
|
2194
|
+
): kotlin.String =
|
|
2195
|
+
FfiConverterString.lift(
|
|
2196
|
+
uniffiRustCall { _status ->
|
|
2197
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_handle_message(
|
|
2198
|
+
FfiConverterULong.lower(`id`),
|
|
2199
|
+
FfiConverterString.lower(`messageJson`),
|
|
2200
|
+
_status,
|
|
2201
|
+
)
|
|
2202
|
+
},
|
|
1842
2203
|
)
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
2204
|
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
2205
|
+
/**
|
|
2206
|
+
* Replace the collaboration document with a durable Yjs encoded state/update.
|
|
2207
|
+
*/
|
|
2208
|
+
fun `collaborationSessionReplaceEncodedState`(
|
|
2209
|
+
`id`: kotlin.ULong,
|
|
2210
|
+
`encodedStateJson`: kotlin.String,
|
|
2211
|
+
): kotlin.String =
|
|
2212
|
+
FfiConverterString.lift(
|
|
2213
|
+
uniffiRustCall { _status ->
|
|
2214
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_replace_encoded_state(
|
|
2215
|
+
FfiConverterULong.lower(`id`),
|
|
2216
|
+
FfiConverterString.lower(`encodedStateJson`),
|
|
2217
|
+
_status,
|
|
2218
|
+
)
|
|
2219
|
+
},
|
|
1854
2220
|
)
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
2221
|
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
2222
|
+
/**
|
|
2223
|
+
* Update the local awareness payload for a collaboration session.
|
|
2224
|
+
*/
|
|
2225
|
+
fun `collaborationSessionSetLocalAwareness`(
|
|
2226
|
+
`id`: kotlin.ULong,
|
|
2227
|
+
`awarenessJson`: kotlin.String,
|
|
2228
|
+
): kotlin.String =
|
|
2229
|
+
FfiConverterString.lift(
|
|
2230
|
+
uniffiRustCall { _status ->
|
|
2231
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_set_local_awareness(
|
|
2232
|
+
FfiConverterULong.lower(`id`),
|
|
2233
|
+
FfiConverterString.lower(`awarenessJson`),
|
|
2234
|
+
_status,
|
|
2235
|
+
)
|
|
2236
|
+
},
|
|
1866
2237
|
)
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
2238
|
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
}
|
|
2239
|
+
/**
|
|
2240
|
+
* Start the sync handshake for a collaboration session.
|
|
2241
|
+
*/
|
|
2242
|
+
fun `collaborationSessionStart`(`id`: kotlin.ULong): kotlin.String =
|
|
2243
|
+
FfiConverterString.lift(
|
|
2244
|
+
uniffiRustCall { _status ->
|
|
2245
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_start(FfiConverterULong.lower(`id`), _status)
|
|
2246
|
+
},
|
|
1878
2247
|
)
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
2248
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
}
|
|
2249
|
+
/**
|
|
2250
|
+
* Check if redo is available.
|
|
2251
|
+
*/
|
|
2252
|
+
fun `editorCanRedo`(`id`: kotlin.ULong): kotlin.Boolean =
|
|
2253
|
+
FfiConverterBoolean.lift(
|
|
2254
|
+
uniffiRustCall { _status ->
|
|
2255
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_can_redo(FfiConverterULong.lower(`id`), _status)
|
|
2256
|
+
},
|
|
1890
2257
|
)
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
2258
|
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Check if undo is available.
|
|
2261
|
+
*/
|
|
2262
|
+
fun `editorCanUndo`(`id`: kotlin.ULong): kotlin.Boolean =
|
|
2263
|
+
FfiConverterBoolean.lift(
|
|
2264
|
+
uniffiRustCall { _status ->
|
|
2265
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_can_undo(FfiConverterULong.lower(`id`), _status)
|
|
2266
|
+
},
|
|
1902
2267
|
)
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
2268
|
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
}
|
|
2269
|
+
/**
|
|
2270
|
+
* Return the crate version string.
|
|
2271
|
+
*/
|
|
2272
|
+
fun `editorCoreVersion`(): kotlin.String =
|
|
2273
|
+
FfiConverterString.lift(
|
|
2274
|
+
uniffiRustCall { _status ->
|
|
2275
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_core_version(_status)
|
|
2276
|
+
},
|
|
1914
2277
|
)
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
FfiConverterString.lower(`configJson`),_status)
|
|
1935
|
-
}
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Create a new editor from a JSON config object.
|
|
2281
|
+
*
|
|
2282
|
+
* Config fields (all optional):
|
|
2283
|
+
* - `"schema"`: custom schema definition (see `Schema::from_json`)
|
|
2284
|
+
* - `"maxLength"`: maximum document length in characters
|
|
2285
|
+
* - `"readOnly"`: if `true`, rejects non-API mutations
|
|
2286
|
+
* - `"inputFilter"`: regex pattern; only matching characters are inserted
|
|
2287
|
+
* - `"allowBase64Images"`: if `true`, parses `<img src="data:image/...">` as image nodes
|
|
2288
|
+
*
|
|
2289
|
+
* An empty object creates a default editor.
|
|
2290
|
+
* Falls back to the default Tiptap schema when `"schema"` is absent or invalid.
|
|
2291
|
+
*/
|
|
2292
|
+
fun `editorCreate`(`configJson`: kotlin.String): kotlin.ULong =
|
|
2293
|
+
FfiConverterULong.lift(
|
|
2294
|
+
uniffiRustCall { _status ->
|
|
2295
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_create(FfiConverterString.lower(`configJson`), _status)
|
|
2296
|
+
},
|
|
1936
2297
|
)
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
2298
|
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2299
|
+
/**
|
|
2300
|
+
* Delete a scalar range then split the block (Enter with selection). Returns an update.
|
|
2301
|
+
*/
|
|
2302
|
+
fun `editorDeleteAndSplitScalar`(
|
|
2303
|
+
`id`: kotlin.ULong,
|
|
2304
|
+
`scalarFrom`: kotlin.UInt,
|
|
2305
|
+
`scalarTo`: kotlin.UInt,
|
|
2306
|
+
): kotlin.String =
|
|
2307
|
+
FfiConverterString.lift(
|
|
2308
|
+
uniffiRustCall { _status ->
|
|
2309
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_and_split_scalar(
|
|
2310
|
+
FfiConverterULong.lower(`id`),
|
|
2311
|
+
FfiConverterUInt.lower(`scalarFrom`),
|
|
2312
|
+
FfiConverterUInt.lower(`scalarTo`),
|
|
2313
|
+
_status,
|
|
2314
|
+
)
|
|
2315
|
+
},
|
|
1948
2316
|
)
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
2317
|
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2318
|
+
/**
|
|
2319
|
+
* Delete backward relative to an explicit scalar selection. Returns an update JSON string.
|
|
2320
|
+
*/
|
|
2321
|
+
fun `editorDeleteBackwardAtSelectionScalar`(
|
|
2322
|
+
`id`: kotlin.ULong,
|
|
2323
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2324
|
+
`scalarHead`: kotlin.UInt,
|
|
2325
|
+
): kotlin.String =
|
|
2326
|
+
FfiConverterString.lift(
|
|
2327
|
+
uniffiRustCall { _status ->
|
|
2328
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_backward_at_selection_scalar(
|
|
2329
|
+
FfiConverterULong.lower(`id`),
|
|
2330
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2331
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2332
|
+
_status,
|
|
2333
|
+
)
|
|
2334
|
+
},
|
|
1960
2335
|
)
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
2336
|
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2337
|
+
/**
|
|
2338
|
+
* Delete a range. Returns an update JSON string.
|
|
2339
|
+
*/
|
|
2340
|
+
fun `editorDeleteRange`(
|
|
2341
|
+
`id`: kotlin.ULong,
|
|
2342
|
+
`from`: kotlin.UInt,
|
|
2343
|
+
`to`: kotlin.UInt,
|
|
2344
|
+
): kotlin.String =
|
|
2345
|
+
FfiConverterString.lift(
|
|
2346
|
+
uniffiRustCall { _status ->
|
|
2347
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_range(
|
|
2348
|
+
FfiConverterULong.lower(`id`),
|
|
2349
|
+
FfiConverterUInt.lower(`from`),
|
|
2350
|
+
FfiConverterUInt.lower(`to`),
|
|
2351
|
+
_status,
|
|
2352
|
+
)
|
|
2353
|
+
},
|
|
1972
2354
|
)
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
2355
|
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
2356
|
+
/**
|
|
2357
|
+
* Delete content between two scalar offsets. Returns an update JSON string.
|
|
2358
|
+
*/
|
|
2359
|
+
fun `editorDeleteScalarRange`(
|
|
2360
|
+
`id`: kotlin.ULong,
|
|
2361
|
+
`scalarFrom`: kotlin.UInt,
|
|
2362
|
+
`scalarTo`: kotlin.UInt,
|
|
2363
|
+
): kotlin.String =
|
|
2364
|
+
FfiConverterString.lift(
|
|
2365
|
+
uniffiRustCall { _status ->
|
|
2366
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_scalar_range(
|
|
2367
|
+
FfiConverterULong.lower(`id`),
|
|
2368
|
+
FfiConverterUInt.lower(`scalarFrom`),
|
|
2369
|
+
FfiConverterUInt.lower(`scalarTo`),
|
|
2370
|
+
_status,
|
|
2371
|
+
)
|
|
2372
|
+
},
|
|
1984
2373
|
)
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
2374
|
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
/**
|
|
2000
|
-
* Convert a document position to a rendered-text scalar offset.
|
|
2001
|
-
*/ fun `editorDocToScalar`(`id`: kotlin.ULong, `docPos`: kotlin.UInt): kotlin.UInt {
|
|
2002
|
-
return FfiConverterUInt.lift(
|
|
2003
|
-
uniffiRustCall() { _status ->
|
|
2004
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_doc_to_scalar(
|
|
2005
|
-
FfiConverterULong.lower(`id`),FfiConverterUInt.lower(`docPos`),_status)
|
|
2006
|
-
}
|
|
2375
|
+
/**
|
|
2376
|
+
* Delete the current table column.
|
|
2377
|
+
*/
|
|
2378
|
+
fun `editorDeleteTableColumn`(`id`: kotlin.ULong): kotlin.String =
|
|
2379
|
+
FfiConverterString.lift(
|
|
2380
|
+
uniffiRustCall { _status ->
|
|
2381
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_table_column(FfiConverterULong.lower(`id`), _status)
|
|
2382
|
+
},
|
|
2007
2383
|
)
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
2384
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
}
|
|
2385
|
+
/**
|
|
2386
|
+
* Delete the current table row.
|
|
2387
|
+
*/
|
|
2388
|
+
fun `editorDeleteTableRow`(`id`: kotlin.ULong): kotlin.String =
|
|
2389
|
+
FfiConverterString.lift(
|
|
2390
|
+
uniffiRustCall { _status ->
|
|
2391
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_table_row(FfiConverterULong.lower(`id`), _status)
|
|
2392
|
+
},
|
|
2019
2393
|
)
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* Destroy an editor instance, freeing its resources.
|
|
2397
|
+
*/
|
|
2398
|
+
fun `editorDestroy`(`id`: kotlin.ULong) =
|
|
2399
|
+
uniffiRustCall { _status ->
|
|
2400
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_destroy(FfiConverterULong.lower(`id`), _status)
|
|
2020
2401
|
}
|
|
2021
|
-
|
|
2022
2402
|
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2403
|
+
/**
|
|
2404
|
+
* Convert a document position to a rendered-text scalar offset.
|
|
2405
|
+
*/
|
|
2406
|
+
fun `editorDocToScalar`(
|
|
2407
|
+
`id`: kotlin.ULong,
|
|
2408
|
+
`docPos`: kotlin.UInt,
|
|
2409
|
+
): kotlin.UInt =
|
|
2410
|
+
FfiConverterUInt.lift(
|
|
2411
|
+
uniffiRustCall { _status ->
|
|
2412
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_doc_to_scalar(
|
|
2413
|
+
FfiConverterULong.lower(`id`),
|
|
2414
|
+
FfiConverterUInt.lower(`docPos`),
|
|
2415
|
+
_status,
|
|
2416
|
+
)
|
|
2417
|
+
},
|
|
2033
2418
|
)
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
2419
|
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
}
|
|
2420
|
+
/**
|
|
2421
|
+
* Get both HTML and ProseMirror JSON content in one payload.
|
|
2422
|
+
*/
|
|
2423
|
+
fun `editorGetContentSnapshot`(`id`: kotlin.ULong): kotlin.String =
|
|
2424
|
+
FfiConverterString.lift(
|
|
2425
|
+
uniffiRustCall { _status ->
|
|
2426
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_content_snapshot(FfiConverterULong.lower(`id`), _status)
|
|
2427
|
+
},
|
|
2045
2428
|
)
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
2429
|
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2430
|
+
/**
|
|
2431
|
+
* Get the current editor state (render elements, selection, active state,
|
|
2432
|
+
* history state) without performing any edits. Used by native views to pull
|
|
2433
|
+
* initial state when binding to an already-loaded editor.
|
|
2434
|
+
*/
|
|
2435
|
+
fun `editorGetCurrentState`(`id`: kotlin.ULong): kotlin.String =
|
|
2436
|
+
FfiConverterString.lift(
|
|
2437
|
+
uniffiRustCall { _status ->
|
|
2438
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_current_state(FfiConverterULong.lower(`id`), _status)
|
|
2439
|
+
},
|
|
2057
2440
|
)
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
2441
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Get the editor's content as HTML.
|
|
2444
|
+
*/
|
|
2445
|
+
fun `editorGetHtml`(`id`: kotlin.ULong): kotlin.String =
|
|
2446
|
+
FfiConverterString.lift(
|
|
2447
|
+
uniffiRustCall { _status ->
|
|
2448
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_html(FfiConverterULong.lower(`id`), _status)
|
|
2449
|
+
},
|
|
2069
2450
|
)
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
2451
|
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
}
|
|
2452
|
+
/**
|
|
2453
|
+
* Get the editor's content as ProseMirror JSON.
|
|
2454
|
+
*/
|
|
2455
|
+
fun `editorGetJson`(`id`: kotlin.ULong): kotlin.String =
|
|
2456
|
+
FfiConverterString.lift(
|
|
2457
|
+
uniffiRustCall { _status ->
|
|
2458
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_json(FfiConverterULong.lower(`id`), _status)
|
|
2459
|
+
},
|
|
2081
2460
|
)
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
2461
|
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
}
|
|
2462
|
+
/**
|
|
2463
|
+
* Get the current selection as JSON.
|
|
2464
|
+
*/
|
|
2465
|
+
fun `editorGetSelection`(`id`: kotlin.ULong): kotlin.String =
|
|
2466
|
+
FfiConverterString.lift(
|
|
2467
|
+
uniffiRustCall { _status ->
|
|
2468
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_selection(FfiConverterULong.lower(`id`), _status)
|
|
2469
|
+
},
|
|
2093
2470
|
)
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
2471
|
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
}
|
|
2472
|
+
/**
|
|
2473
|
+
* Get the current selection-related editor state without render elements.
|
|
2474
|
+
*/
|
|
2475
|
+
fun `editorGetSelectionState`(`id`: kotlin.ULong): kotlin.String =
|
|
2476
|
+
FfiConverterString.lift(
|
|
2477
|
+
uniffiRustCall { _status ->
|
|
2478
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_selection_state(FfiConverterULong.lower(`id`), _status)
|
|
2479
|
+
},
|
|
2105
2480
|
)
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
2481
|
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
}
|
|
2482
|
+
/**
|
|
2483
|
+
* Indent the current list item into a nested list. Returns an update JSON string.
|
|
2484
|
+
*/
|
|
2485
|
+
fun `editorIndentListItem`(`id`: kotlin.ULong): kotlin.String =
|
|
2486
|
+
FfiConverterString.lift(
|
|
2487
|
+
uniffiRustCall { _status ->
|
|
2488
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_indent_list_item(FfiConverterULong.lower(`id`), _status)
|
|
2489
|
+
},
|
|
2117
2490
|
)
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
2491
|
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2492
|
+
/**
|
|
2493
|
+
* Indent the list item at an explicit scalar selection. Returns an update JSON string.
|
|
2494
|
+
*/
|
|
2495
|
+
fun `editorIndentListItemAtSelectionScalar`(
|
|
2496
|
+
`id`: kotlin.ULong,
|
|
2497
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2498
|
+
`scalarHead`: kotlin.UInt,
|
|
2499
|
+
): kotlin.String =
|
|
2500
|
+
FfiConverterString.lift(
|
|
2501
|
+
uniffiRustCall { _status ->
|
|
2502
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_indent_list_item_at_selection_scalar(
|
|
2503
|
+
FfiConverterULong.lower(`id`),
|
|
2504
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2505
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2506
|
+
_status,
|
|
2507
|
+
)
|
|
2508
|
+
},
|
|
2129
2509
|
)
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
2510
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2511
|
+
/**
|
|
2512
|
+
* Insert HTML content at the current selection. Returns an update JSON string.
|
|
2513
|
+
*/
|
|
2514
|
+
fun `editorInsertContentHtml`(
|
|
2515
|
+
`id`: kotlin.ULong,
|
|
2516
|
+
`html`: kotlin.String,
|
|
2517
|
+
): kotlin.String =
|
|
2518
|
+
FfiConverterString.lift(
|
|
2519
|
+
uniffiRustCall { _status ->
|
|
2520
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_content_html(
|
|
2521
|
+
FfiConverterULong.lower(`id`),
|
|
2522
|
+
FfiConverterString.lower(`html`),
|
|
2523
|
+
_status,
|
|
2524
|
+
)
|
|
2525
|
+
},
|
|
2141
2526
|
)
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
2527
|
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2528
|
+
/**
|
|
2529
|
+
* Insert JSON content at the current selection. Returns an update JSON string.
|
|
2530
|
+
*/
|
|
2531
|
+
fun `editorInsertContentJson`(
|
|
2532
|
+
`id`: kotlin.ULong,
|
|
2533
|
+
`json`: kotlin.String,
|
|
2534
|
+
): kotlin.String =
|
|
2535
|
+
FfiConverterString.lift(
|
|
2536
|
+
uniffiRustCall { _status ->
|
|
2537
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_content_json(
|
|
2538
|
+
FfiConverterULong.lower(`id`),
|
|
2539
|
+
FfiConverterString.lower(`json`),
|
|
2540
|
+
_status,
|
|
2541
|
+
)
|
|
2542
|
+
},
|
|
2153
2543
|
)
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
2544
|
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2545
|
+
/**
|
|
2546
|
+
* Insert JSON content at an explicit scalar selection. Returns an update JSON string.
|
|
2547
|
+
*/
|
|
2548
|
+
fun `editorInsertContentJsonAtSelectionScalar`(
|
|
2549
|
+
`id`: kotlin.ULong,
|
|
2550
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2551
|
+
`scalarHead`: kotlin.UInt,
|
|
2552
|
+
`json`: kotlin.String,
|
|
2553
|
+
): kotlin.String =
|
|
2554
|
+
FfiConverterString.lift(
|
|
2555
|
+
uniffiRustCall { _status ->
|
|
2556
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_content_json_at_selection_scalar(
|
|
2557
|
+
FfiConverterULong.lower(`id`),
|
|
2558
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2559
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2560
|
+
FfiConverterString.lower(`json`),
|
|
2561
|
+
_status,
|
|
2562
|
+
)
|
|
2563
|
+
},
|
|
2165
2564
|
)
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
2565
|
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2566
|
+
/**
|
|
2567
|
+
* Insert a void node at the current selection. Returns an update JSON string.
|
|
2568
|
+
*/
|
|
2569
|
+
fun `editorInsertNode`(
|
|
2570
|
+
`id`: kotlin.ULong,
|
|
2571
|
+
`nodeType`: kotlin.String,
|
|
2572
|
+
): kotlin.String =
|
|
2573
|
+
FfiConverterString.lift(
|
|
2574
|
+
uniffiRustCall { _status ->
|
|
2575
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_node(
|
|
2576
|
+
FfiConverterULong.lower(`id`),
|
|
2577
|
+
FfiConverterString.lower(`nodeType`),
|
|
2578
|
+
_status,
|
|
2579
|
+
)
|
|
2580
|
+
},
|
|
2177
2581
|
)
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
2582
|
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2583
|
+
/**
|
|
2584
|
+
* Insert a node at an explicit scalar selection. Returns an update JSON string.
|
|
2585
|
+
*/
|
|
2586
|
+
fun `editorInsertNodeAtSelectionScalar`(
|
|
2587
|
+
`id`: kotlin.ULong,
|
|
2588
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2589
|
+
`scalarHead`: kotlin.UInt,
|
|
2590
|
+
`nodeType`: kotlin.String,
|
|
2591
|
+
): kotlin.String =
|
|
2592
|
+
FfiConverterString.lift(
|
|
2593
|
+
uniffiRustCall { _status ->
|
|
2594
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_node_at_selection_scalar(
|
|
2595
|
+
FfiConverterULong.lower(`id`),
|
|
2596
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2597
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2598
|
+
FfiConverterString.lower(`nodeType`),
|
|
2599
|
+
_status,
|
|
2600
|
+
)
|
|
2601
|
+
},
|
|
2189
2602
|
)
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
2603
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2604
|
+
/**
|
|
2605
|
+
* Insert a table column before or after the current column.
|
|
2606
|
+
*/
|
|
2607
|
+
fun `editorInsertTableColumn`(
|
|
2608
|
+
`id`: kotlin.ULong,
|
|
2609
|
+
`after`: kotlin.Boolean,
|
|
2610
|
+
): kotlin.String =
|
|
2611
|
+
FfiConverterString.lift(
|
|
2612
|
+
uniffiRustCall { _status ->
|
|
2613
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_table_column(
|
|
2614
|
+
FfiConverterULong.lower(`id`),
|
|
2615
|
+
FfiConverterBoolean.lower(`after`),
|
|
2616
|
+
_status,
|
|
2617
|
+
)
|
|
2618
|
+
},
|
|
2201
2619
|
)
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
2620
|
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2621
|
+
/**
|
|
2622
|
+
* Insert a table row before or after the current row.
|
|
2623
|
+
*/
|
|
2624
|
+
fun `editorInsertTableRow`(
|
|
2625
|
+
`id`: kotlin.ULong,
|
|
2626
|
+
`after`: kotlin.Boolean,
|
|
2627
|
+
): kotlin.String =
|
|
2628
|
+
FfiConverterString.lift(
|
|
2629
|
+
uniffiRustCall { _status ->
|
|
2630
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_table_row(
|
|
2631
|
+
FfiConverterULong.lower(`id`),
|
|
2632
|
+
FfiConverterBoolean.lower(`after`),
|
|
2633
|
+
_status,
|
|
2634
|
+
)
|
|
2635
|
+
},
|
|
2213
2636
|
)
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
2637
|
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2638
|
+
/**
|
|
2639
|
+
* Insert text at a position. Returns an update JSON string.
|
|
2640
|
+
*/
|
|
2641
|
+
fun `editorInsertText`(
|
|
2642
|
+
`id`: kotlin.ULong,
|
|
2643
|
+
`pos`: kotlin.UInt,
|
|
2644
|
+
`text`: kotlin.String,
|
|
2645
|
+
): kotlin.String =
|
|
2646
|
+
FfiConverterString.lift(
|
|
2647
|
+
uniffiRustCall { _status ->
|
|
2648
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_text(
|
|
2649
|
+
FfiConverterULong.lower(`id`),
|
|
2650
|
+
FfiConverterUInt.lower(`pos`),
|
|
2651
|
+
FfiConverterString.lower(`text`),
|
|
2652
|
+
_status,
|
|
2653
|
+
)
|
|
2654
|
+
},
|
|
2225
2655
|
)
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
2656
|
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2657
|
+
/**
|
|
2658
|
+
* Insert text at a scalar offset. Returns an update JSON string.
|
|
2659
|
+
*/
|
|
2660
|
+
fun `editorInsertTextScalar`(
|
|
2661
|
+
`id`: kotlin.ULong,
|
|
2662
|
+
`scalarPos`: kotlin.UInt,
|
|
2663
|
+
`text`: kotlin.String,
|
|
2664
|
+
): kotlin.String =
|
|
2665
|
+
FfiConverterString.lift(
|
|
2666
|
+
uniffiRustCall { _status ->
|
|
2667
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_text_scalar(
|
|
2668
|
+
FfiConverterULong.lower(`id`),
|
|
2669
|
+
FfiConverterUInt.lower(`scalarPos`),
|
|
2670
|
+
FfiConverterString.lower(`text`),
|
|
2671
|
+
_status,
|
|
2672
|
+
)
|
|
2673
|
+
},
|
|
2237
2674
|
)
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
2675
|
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2676
|
+
/**
|
|
2677
|
+
* Move the selection to the next or previous table cell.
|
|
2678
|
+
*/
|
|
2679
|
+
fun `editorMoveTableCell`(
|
|
2680
|
+
`id`: kotlin.ULong,
|
|
2681
|
+
`forward`: kotlin.Boolean,
|
|
2682
|
+
): kotlin.String =
|
|
2683
|
+
FfiConverterString.lift(
|
|
2684
|
+
uniffiRustCall { _status ->
|
|
2685
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_move_table_cell(
|
|
2686
|
+
FfiConverterULong.lower(`id`),
|
|
2687
|
+
FfiConverterBoolean.lower(`forward`),
|
|
2688
|
+
_status,
|
|
2689
|
+
)
|
|
2690
|
+
},
|
|
2249
2691
|
)
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
2692
|
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
}
|
|
2693
|
+
/**
|
|
2694
|
+
* Outdent the current list item to the parent list level. Returns an update JSON string.
|
|
2695
|
+
*/
|
|
2696
|
+
fun `editorOutdentListItem`(`id`: kotlin.ULong): kotlin.String =
|
|
2697
|
+
FfiConverterString.lift(
|
|
2698
|
+
uniffiRustCall { _status ->
|
|
2699
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_outdent_list_item(FfiConverterULong.lower(`id`), _status)
|
|
2700
|
+
},
|
|
2261
2701
|
)
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2264
2702
|
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2703
|
+
/**
|
|
2704
|
+
* Outdent the list item at an explicit scalar selection. Returns an update JSON string.
|
|
2705
|
+
*/
|
|
2706
|
+
fun `editorOutdentListItemAtSelectionScalar`(
|
|
2707
|
+
`id`: kotlin.ULong,
|
|
2708
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2709
|
+
`scalarHead`: kotlin.UInt,
|
|
2710
|
+
): kotlin.String =
|
|
2711
|
+
FfiConverterString.lift(
|
|
2712
|
+
uniffiRustCall { _status ->
|
|
2713
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_outdent_list_item_at_selection_scalar(
|
|
2714
|
+
FfiConverterULong.lower(`id`),
|
|
2715
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2716
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2717
|
+
_status,
|
|
2718
|
+
)
|
|
2719
|
+
},
|
|
2273
2720
|
)
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
2721
|
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
}
|
|
2722
|
+
/**
|
|
2723
|
+
* Redo. Returns an update JSON string, or empty string if nothing to redo.
|
|
2724
|
+
*/
|
|
2725
|
+
fun `editorRedo`(`id`: kotlin.ULong): kotlin.String =
|
|
2726
|
+
FfiConverterString.lift(
|
|
2727
|
+
uniffiRustCall { _status ->
|
|
2728
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_redo(FfiConverterULong.lower(`id`), _status)
|
|
2729
|
+
},
|
|
2285
2730
|
)
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
2731
|
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2732
|
+
/**
|
|
2733
|
+
* Replace entire document content with HTML via a transaction (preserves history).
|
|
2734
|
+
*/
|
|
2735
|
+
fun `editorReplaceHtml`(
|
|
2736
|
+
`id`: kotlin.ULong,
|
|
2737
|
+
`html`: kotlin.String,
|
|
2738
|
+
): kotlin.String =
|
|
2739
|
+
FfiConverterString.lift(
|
|
2740
|
+
uniffiRustCall { _status ->
|
|
2741
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_html(
|
|
2742
|
+
FfiConverterULong.lower(`id`),
|
|
2743
|
+
FfiConverterString.lower(`html`),
|
|
2744
|
+
_status,
|
|
2745
|
+
)
|
|
2746
|
+
},
|
|
2297
2747
|
)
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
2748
|
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2749
|
+
/**
|
|
2750
|
+
* Replace entire document content with JSON via a transaction (preserves history).
|
|
2751
|
+
*/
|
|
2752
|
+
fun `editorReplaceJson`(
|
|
2753
|
+
`id`: kotlin.ULong,
|
|
2754
|
+
`json`: kotlin.String,
|
|
2755
|
+
): kotlin.String =
|
|
2756
|
+
FfiConverterString.lift(
|
|
2757
|
+
uniffiRustCall { _status ->
|
|
2758
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_json(
|
|
2759
|
+
FfiConverterULong.lower(`id`),
|
|
2760
|
+
FfiConverterString.lower(`json`),
|
|
2761
|
+
_status,
|
|
2762
|
+
)
|
|
2763
|
+
},
|
|
2309
2764
|
)
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
2765
|
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2766
|
+
/**
|
|
2767
|
+
* Replace the current selection with plain text. Returns an update JSON string.
|
|
2768
|
+
*/
|
|
2769
|
+
fun `editorReplaceSelectionText`(
|
|
2770
|
+
`id`: kotlin.ULong,
|
|
2771
|
+
`text`: kotlin.String,
|
|
2772
|
+
): kotlin.String =
|
|
2773
|
+
FfiConverterString.lift(
|
|
2774
|
+
uniffiRustCall { _status ->
|
|
2775
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_selection_text(
|
|
2776
|
+
FfiConverterULong.lower(`id`),
|
|
2777
|
+
FfiConverterString.lower(`text`),
|
|
2778
|
+
_status,
|
|
2779
|
+
)
|
|
2780
|
+
},
|
|
2321
2781
|
)
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
2782
|
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2783
|
+
/**
|
|
2784
|
+
* Replace a scalar range with text (atomic delete + insert). Returns an update JSON string.
|
|
2785
|
+
*/
|
|
2786
|
+
fun `editorReplaceTextScalar`(
|
|
2787
|
+
`id`: kotlin.ULong,
|
|
2788
|
+
`scalarFrom`: kotlin.UInt,
|
|
2789
|
+
`scalarTo`: kotlin.UInt,
|
|
2790
|
+
`text`: kotlin.String,
|
|
2791
|
+
): kotlin.String =
|
|
2792
|
+
FfiConverterString.lift(
|
|
2793
|
+
uniffiRustCall { _status ->
|
|
2794
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_text_scalar(
|
|
2795
|
+
FfiConverterULong.lower(`id`),
|
|
2796
|
+
FfiConverterUInt.lower(`scalarFrom`),
|
|
2797
|
+
FfiConverterUInt.lower(`scalarTo`),
|
|
2798
|
+
FfiConverterString.lower(`text`),
|
|
2799
|
+
_status,
|
|
2800
|
+
)
|
|
2801
|
+
},
|
|
2333
2802
|
)
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
2803
|
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2804
|
+
/**
|
|
2805
|
+
* Resize an image node at a document position. Returns an update JSON string.
|
|
2806
|
+
*/
|
|
2807
|
+
fun `editorResizeImageAtDocPos`(
|
|
2808
|
+
`id`: kotlin.ULong,
|
|
2809
|
+
`docPos`: kotlin.UInt,
|
|
2810
|
+
`width`: kotlin.UInt,
|
|
2811
|
+
`height`: kotlin.UInt,
|
|
2812
|
+
): kotlin.String =
|
|
2813
|
+
FfiConverterString.lift(
|
|
2814
|
+
uniffiRustCall { _status ->
|
|
2815
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_resize_image_at_doc_pos(
|
|
2816
|
+
FfiConverterULong.lower(`id`),
|
|
2817
|
+
FfiConverterUInt.lower(`docPos`),
|
|
2818
|
+
FfiConverterUInt.lower(`width`),
|
|
2819
|
+
FfiConverterUInt.lower(`height`),
|
|
2820
|
+
_status,
|
|
2821
|
+
)
|
|
2822
|
+
},
|
|
2345
2823
|
)
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2348
2824
|
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
uniffiRustCall() { _status ->
|
|
2365
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_selection_scalar(
|
|
2366
|
-
FfiConverterULong.lower(`id`),FfiConverterUInt.lower(`scalarAnchor`),FfiConverterUInt.lower(`scalarHead`),_status)
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
/**
|
|
2372
|
-
* Split the block at a position (Enter key). Returns an update JSON string.
|
|
2373
|
-
*/ fun `editorSplitBlock`(`id`: kotlin.ULong, `pos`: kotlin.UInt): kotlin.String {
|
|
2374
|
-
return FfiConverterString.lift(
|
|
2375
|
-
uniffiRustCall() { _status ->
|
|
2376
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block(
|
|
2377
|
-
FfiConverterULong.lower(`id`),FfiConverterUInt.lower(`pos`),_status)
|
|
2378
|
-
}
|
|
2825
|
+
/**
|
|
2826
|
+
* Convert a rendered-text scalar offset to a document position.
|
|
2827
|
+
*/
|
|
2828
|
+
fun `editorScalarToDoc`(
|
|
2829
|
+
`id`: kotlin.ULong,
|
|
2830
|
+
`scalar`: kotlin.UInt,
|
|
2831
|
+
): kotlin.UInt =
|
|
2832
|
+
FfiConverterUInt.lift(
|
|
2833
|
+
uniffiRustCall { _status ->
|
|
2834
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_scalar_to_doc(
|
|
2835
|
+
FfiConverterULong.lower(`id`),
|
|
2836
|
+
FfiConverterUInt.lower(`scalar`),
|
|
2837
|
+
_status,
|
|
2838
|
+
)
|
|
2839
|
+
},
|
|
2379
2840
|
)
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
2841
|
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2842
|
+
/**
|
|
2843
|
+
* Set a table cell selection. Anchor and head are document positions of cell nodes.
|
|
2844
|
+
*/
|
|
2845
|
+
fun `editorSetCellSelection`(
|
|
2846
|
+
`id`: kotlin.ULong,
|
|
2847
|
+
`anchor`: kotlin.UInt,
|
|
2848
|
+
`head`: kotlin.UInt,
|
|
2849
|
+
) = uniffiRustCall { _status ->
|
|
2850
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_cell_selection(
|
|
2851
|
+
FfiConverterULong.lower(`id`),
|
|
2852
|
+
FfiConverterUInt.lower(`anchor`),
|
|
2853
|
+
FfiConverterUInt.lower(`head`),
|
|
2854
|
+
_status,
|
|
2855
|
+
)
|
|
2390
2856
|
}
|
|
2857
|
+
|
|
2858
|
+
/**
|
|
2859
|
+
* Set the editor's content from an HTML string. Returns an editor update JSON payload.
|
|
2860
|
+
*/
|
|
2861
|
+
fun `editorSetHtml`(
|
|
2862
|
+
`id`: kotlin.ULong,
|
|
2863
|
+
`html`: kotlin.String,
|
|
2864
|
+
): kotlin.String =
|
|
2865
|
+
FfiConverterString.lift(
|
|
2866
|
+
uniffiRustCall { _status ->
|
|
2867
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_html(
|
|
2868
|
+
FfiConverterULong.lower(`id`),
|
|
2869
|
+
FfiConverterString.lower(`html`),
|
|
2870
|
+
_status,
|
|
2871
|
+
)
|
|
2872
|
+
},
|
|
2391
2873
|
)
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
2874
|
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2875
|
+
/**
|
|
2876
|
+
* Set the editor's content from a ProseMirror JSON string.
|
|
2877
|
+
*/
|
|
2878
|
+
fun `editorSetJson`(
|
|
2879
|
+
`id`: kotlin.ULong,
|
|
2880
|
+
`json`: kotlin.String,
|
|
2881
|
+
): kotlin.String =
|
|
2882
|
+
FfiConverterString.lift(
|
|
2883
|
+
uniffiRustCall { _status ->
|
|
2884
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_json(
|
|
2885
|
+
FfiConverterULong.lower(`id`),
|
|
2886
|
+
FfiConverterString.lower(`json`),
|
|
2887
|
+
_status,
|
|
2888
|
+
)
|
|
2889
|
+
},
|
|
2403
2890
|
)
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
2891
|
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2892
|
+
/**
|
|
2893
|
+
* Set a mark with attrs on the current selection. Returns an update JSON string.
|
|
2894
|
+
*/
|
|
2895
|
+
fun `editorSetMark`(
|
|
2896
|
+
`id`: kotlin.ULong,
|
|
2897
|
+
`markName`: kotlin.String,
|
|
2898
|
+
`attrsJson`: kotlin.String,
|
|
2899
|
+
): kotlin.String =
|
|
2900
|
+
FfiConverterString.lift(
|
|
2901
|
+
uniffiRustCall { _status ->
|
|
2902
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_mark(
|
|
2903
|
+
FfiConverterULong.lower(`id`),
|
|
2904
|
+
FfiConverterString.lower(`markName`),
|
|
2905
|
+
FfiConverterString.lower(`attrsJson`),
|
|
2906
|
+
_status,
|
|
2907
|
+
)
|
|
2908
|
+
},
|
|
2415
2909
|
)
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
2910
|
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2911
|
+
/**
|
|
2912
|
+
* Set a mark with attrs at an explicit scalar selection. Returns an update JSON string.
|
|
2913
|
+
*/
|
|
2914
|
+
fun `editorSetMarkAtSelectionScalar`(
|
|
2915
|
+
`id`: kotlin.ULong,
|
|
2916
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2917
|
+
`scalarHead`: kotlin.UInt,
|
|
2918
|
+
`markName`: kotlin.String,
|
|
2919
|
+
`attrsJson`: kotlin.String,
|
|
2920
|
+
): kotlin.String =
|
|
2921
|
+
FfiConverterString.lift(
|
|
2922
|
+
uniffiRustCall { _status ->
|
|
2923
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_mark_at_selection_scalar(
|
|
2924
|
+
FfiConverterULong.lower(`id`),
|
|
2925
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2926
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2927
|
+
FfiConverterString.lower(`markName`),
|
|
2928
|
+
FfiConverterString.lower(`attrsJson`),
|
|
2929
|
+
_status,
|
|
2930
|
+
)
|
|
2931
|
+
},
|
|
2427
2932
|
)
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
2933
|
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2934
|
+
/**
|
|
2935
|
+
* Set a node selection at a selectable node's document position.
|
|
2936
|
+
*/
|
|
2937
|
+
fun `editorSetNodeSelection`(
|
|
2938
|
+
`id`: kotlin.ULong,
|
|
2939
|
+
`pos`: kotlin.UInt,
|
|
2940
|
+
) = uniffiRustCall { _status ->
|
|
2941
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_node_selection(
|
|
2942
|
+
FfiConverterULong.lower(`id`),
|
|
2943
|
+
FfiConverterUInt.lower(`pos`),
|
|
2944
|
+
_status,
|
|
2945
|
+
)
|
|
2438
2946
|
}
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* Set the selection. Anchor and head are document positions.
|
|
2950
|
+
*/
|
|
2951
|
+
fun `editorSetSelection`(
|
|
2952
|
+
`id`: kotlin.ULong,
|
|
2953
|
+
`anchor`: kotlin.UInt,
|
|
2954
|
+
`head`: kotlin.UInt,
|
|
2955
|
+
) = uniffiRustCall { _status ->
|
|
2956
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_selection(
|
|
2957
|
+
FfiConverterULong.lower(`id`),
|
|
2958
|
+
FfiConverterUInt.lower(`anchor`),
|
|
2959
|
+
FfiConverterUInt.lower(`head`),
|
|
2960
|
+
_status,
|
|
2439
2961
|
)
|
|
2440
|
-
|
|
2441
|
-
|
|
2962
|
+
}
|
|
2442
2963
|
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2964
|
+
/**
|
|
2965
|
+
* Set the selection from scalar offsets, converting to document positions internally.
|
|
2966
|
+
*/
|
|
2967
|
+
fun `editorSetSelectionScalar`(
|
|
2968
|
+
`id`: kotlin.ULong,
|
|
2969
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2970
|
+
`scalarHead`: kotlin.UInt,
|
|
2971
|
+
) = uniffiRustCall { _status ->
|
|
2972
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_selection_scalar(
|
|
2973
|
+
FfiConverterULong.lower(`id`),
|
|
2974
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2975
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2976
|
+
_status,
|
|
2977
|
+
)
|
|
2450
2978
|
}
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* Split the block at a position (Enter key). Returns an update JSON string.
|
|
2982
|
+
*/
|
|
2983
|
+
fun `editorSplitBlock`(
|
|
2984
|
+
`id`: kotlin.ULong,
|
|
2985
|
+
`pos`: kotlin.UInt,
|
|
2986
|
+
): kotlin.String =
|
|
2987
|
+
FfiConverterString.lift(
|
|
2988
|
+
uniffiRustCall { _status ->
|
|
2989
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block(
|
|
2990
|
+
FfiConverterULong.lower(`id`),
|
|
2991
|
+
FfiConverterUInt.lower(`pos`),
|
|
2992
|
+
_status,
|
|
2993
|
+
)
|
|
2994
|
+
},
|
|
2451
2995
|
)
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
2996
|
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2997
|
+
/**
|
|
2998
|
+
* Split a block at a scalar offset. Returns an update JSON string.
|
|
2999
|
+
*/
|
|
3000
|
+
fun `editorSplitBlockScalar`(
|
|
3001
|
+
`id`: kotlin.ULong,
|
|
3002
|
+
`scalarPos`: kotlin.UInt,
|
|
3003
|
+
): kotlin.String =
|
|
3004
|
+
FfiConverterString.lift(
|
|
3005
|
+
uniffiRustCall { _status ->
|
|
3006
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block_scalar(
|
|
3007
|
+
FfiConverterULong.lower(`id`),
|
|
3008
|
+
FfiConverterUInt.lower(`scalarPos`),
|
|
3009
|
+
_status,
|
|
3010
|
+
)
|
|
3011
|
+
},
|
|
2463
3012
|
)
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
3013
|
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
}
|
|
3014
|
+
/**
|
|
3015
|
+
* Toggle a blockquote around the current block selection. Returns an update JSON string.
|
|
3016
|
+
*/
|
|
3017
|
+
fun `editorToggleBlockquote`(`id`: kotlin.ULong): kotlin.String =
|
|
3018
|
+
FfiConverterString.lift(
|
|
3019
|
+
uniffiRustCall { _status ->
|
|
3020
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_blockquote(FfiConverterULong.lower(`id`), _status)
|
|
3021
|
+
},
|
|
2475
3022
|
)
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
3023
|
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
3024
|
+
/**
|
|
3025
|
+
* Toggle a blockquote at an explicit scalar selection. Returns an update JSON string.
|
|
3026
|
+
*/
|
|
3027
|
+
fun `editorToggleBlockquoteAtSelectionScalar`(
|
|
3028
|
+
`id`: kotlin.ULong,
|
|
3029
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3030
|
+
`scalarHead`: kotlin.UInt,
|
|
3031
|
+
): kotlin.String =
|
|
3032
|
+
FfiConverterString.lift(
|
|
3033
|
+
uniffiRustCall { _status ->
|
|
3034
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_blockquote_at_selection_scalar(
|
|
3035
|
+
FfiConverterULong.lower(`id`),
|
|
3036
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3037
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3038
|
+
_status,
|
|
3039
|
+
)
|
|
3040
|
+
},
|
|
2487
3041
|
)
|
|
2488
|
-
}
|
|
2489
|
-
|
|
2490
3042
|
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
3043
|
+
/**
|
|
3044
|
+
* Toggle a heading level on the current text-block selection. Returns an update JSON string.
|
|
3045
|
+
*/
|
|
3046
|
+
fun `editorToggleHeading`(
|
|
3047
|
+
`id`: kotlin.ULong,
|
|
3048
|
+
`level`: kotlin.UByte,
|
|
3049
|
+
): kotlin.String =
|
|
3050
|
+
FfiConverterString.lift(
|
|
3051
|
+
uniffiRustCall { _status ->
|
|
3052
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_heading(
|
|
3053
|
+
FfiConverterULong.lower(`id`),
|
|
3054
|
+
FfiConverterUByte.lower(`level`),
|
|
3055
|
+
_status,
|
|
3056
|
+
)
|
|
3057
|
+
},
|
|
2499
3058
|
)
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
3059
|
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
3060
|
+
/**
|
|
3061
|
+
* Toggle a heading level at an explicit scalar selection. Returns an update JSON string.
|
|
3062
|
+
*/
|
|
3063
|
+
fun `editorToggleHeadingAtSelectionScalar`(
|
|
3064
|
+
`id`: kotlin.ULong,
|
|
3065
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3066
|
+
`scalarHead`: kotlin.UInt,
|
|
3067
|
+
`level`: kotlin.UByte,
|
|
3068
|
+
): kotlin.String =
|
|
3069
|
+
FfiConverterString.lift(
|
|
3070
|
+
uniffiRustCall { _status ->
|
|
3071
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_heading_at_selection_scalar(
|
|
3072
|
+
FfiConverterULong.lower(`id`),
|
|
3073
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3074
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3075
|
+
FfiConverterUByte.lower(`level`),
|
|
3076
|
+
_status,
|
|
3077
|
+
)
|
|
3078
|
+
},
|
|
2511
3079
|
)
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
3080
|
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
3081
|
+
/**
|
|
3082
|
+
* Toggle a mark on the current selection. Returns an update JSON string.
|
|
3083
|
+
*/
|
|
3084
|
+
fun `editorToggleMark`(
|
|
3085
|
+
`id`: kotlin.ULong,
|
|
3086
|
+
`markName`: kotlin.String,
|
|
3087
|
+
): kotlin.String =
|
|
3088
|
+
FfiConverterString.lift(
|
|
3089
|
+
uniffiRustCall { _status ->
|
|
3090
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_mark(
|
|
3091
|
+
FfiConverterULong.lower(`id`),
|
|
3092
|
+
FfiConverterString.lower(`markName`),
|
|
3093
|
+
_status,
|
|
3094
|
+
)
|
|
3095
|
+
},
|
|
2523
3096
|
)
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
3097
|
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
3098
|
+
/**
|
|
3099
|
+
* Toggle a mark at an explicit scalar selection. Returns an update JSON string.
|
|
3100
|
+
*/
|
|
3101
|
+
fun `editorToggleMarkAtSelectionScalar`(
|
|
3102
|
+
`id`: kotlin.ULong,
|
|
3103
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3104
|
+
`scalarHead`: kotlin.UInt,
|
|
3105
|
+
`markName`: kotlin.String,
|
|
3106
|
+
): kotlin.String =
|
|
3107
|
+
FfiConverterString.lift(
|
|
3108
|
+
uniffiRustCall { _status ->
|
|
3109
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_mark_at_selection_scalar(
|
|
3110
|
+
FfiConverterULong.lower(`id`),
|
|
3111
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3112
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3113
|
+
FfiConverterString.lower(`markName`),
|
|
3114
|
+
_status,
|
|
3115
|
+
)
|
|
3116
|
+
},
|
|
2535
3117
|
)
|
|
2536
|
-
}
|
|
2537
|
-
|
|
2538
3118
|
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
3119
|
+
/**
|
|
3120
|
+
* Toggle the checked state of the task item at an explicit scalar selection.
|
|
3121
|
+
*/
|
|
3122
|
+
fun `editorToggleTaskItemCheckedAtSelectionScalar`(
|
|
3123
|
+
`id`: kotlin.ULong,
|
|
3124
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3125
|
+
`scalarHead`: kotlin.UInt,
|
|
3126
|
+
): kotlin.String =
|
|
3127
|
+
FfiConverterString.lift(
|
|
3128
|
+
uniffiRustCall { _status ->
|
|
3129
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_task_item_checked_at_selection_scalar(
|
|
3130
|
+
FfiConverterULong.lower(`id`),
|
|
3131
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3132
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3133
|
+
_status,
|
|
3134
|
+
)
|
|
3135
|
+
},
|
|
2547
3136
|
)
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2550
3137
|
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
}
|
|
3138
|
+
/**
|
|
3139
|
+
* Undo. Returns an update JSON string, or empty string if nothing to undo.
|
|
3140
|
+
*/
|
|
3141
|
+
fun `editorUndo`(`id`: kotlin.ULong): kotlin.String =
|
|
3142
|
+
FfiConverterString.lift(
|
|
3143
|
+
uniffiRustCall { _status ->
|
|
3144
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_undo(FfiConverterULong.lower(`id`), _status)
|
|
3145
|
+
},
|
|
2559
3146
|
)
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
3147
|
|
|
3148
|
+
/**
|
|
3149
|
+
* Remove a mark from the current selection. Returns an update JSON string.
|
|
3150
|
+
*/
|
|
3151
|
+
fun `editorUnsetMark`(
|
|
3152
|
+
`id`: kotlin.ULong,
|
|
3153
|
+
`markName`: kotlin.String,
|
|
3154
|
+
): kotlin.String =
|
|
3155
|
+
FfiConverterString.lift(
|
|
3156
|
+
uniffiRustCall { _status ->
|
|
3157
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unset_mark(
|
|
3158
|
+
FfiConverterULong.lower(`id`),
|
|
3159
|
+
FfiConverterString.lower(`markName`),
|
|
3160
|
+
_status,
|
|
3161
|
+
)
|
|
3162
|
+
},
|
|
3163
|
+
)
|
|
3164
|
+
|
|
3165
|
+
/**
|
|
3166
|
+
* Remove a mark at an explicit scalar selection. Returns an update JSON string.
|
|
3167
|
+
*/
|
|
3168
|
+
fun `editorUnsetMarkAtSelectionScalar`(
|
|
3169
|
+
`id`: kotlin.ULong,
|
|
3170
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3171
|
+
`scalarHead`: kotlin.UInt,
|
|
3172
|
+
`markName`: kotlin.String,
|
|
3173
|
+
): kotlin.String =
|
|
3174
|
+
FfiConverterString.lift(
|
|
3175
|
+
uniffiRustCall { _status ->
|
|
3176
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unset_mark_at_selection_scalar(
|
|
3177
|
+
FfiConverterULong.lower(`id`),
|
|
3178
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3179
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3180
|
+
FfiConverterString.lower(`markName`),
|
|
3181
|
+
_status,
|
|
3182
|
+
)
|
|
3183
|
+
},
|
|
3184
|
+
)
|
|
3185
|
+
|
|
3186
|
+
/**
|
|
3187
|
+
* Unwrap the current list item back to a paragraph. Returns an update JSON string.
|
|
3188
|
+
*/
|
|
3189
|
+
fun `editorUnwrapFromList`(`id`: kotlin.ULong): kotlin.String =
|
|
3190
|
+
FfiConverterString.lift(
|
|
3191
|
+
uniffiRustCall { _status ->
|
|
3192
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unwrap_from_list(FfiConverterULong.lower(`id`), _status)
|
|
3193
|
+
},
|
|
3194
|
+
)
|
|
2563
3195
|
|
|
3196
|
+
/**
|
|
3197
|
+
* Unwrap the list item at an explicit scalar selection. Returns an update JSON string.
|
|
3198
|
+
*/
|
|
3199
|
+
fun `editorUnwrapFromListAtSelectionScalar`(
|
|
3200
|
+
`id`: kotlin.ULong,
|
|
3201
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3202
|
+
`scalarHead`: kotlin.UInt,
|
|
3203
|
+
): kotlin.String =
|
|
3204
|
+
FfiConverterString.lift(
|
|
3205
|
+
uniffiRustCall { _status ->
|
|
3206
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unwrap_from_list_at_selection_scalar(
|
|
3207
|
+
FfiConverterULong.lower(`id`),
|
|
3208
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3209
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3210
|
+
_status,
|
|
3211
|
+
)
|
|
3212
|
+
},
|
|
3213
|
+
)
|
|
3214
|
+
|
|
3215
|
+
/**
|
|
3216
|
+
* Wrap the current selection in a list. Returns an update JSON string.
|
|
3217
|
+
*/
|
|
3218
|
+
fun `editorWrapInList`(
|
|
3219
|
+
`id`: kotlin.ULong,
|
|
3220
|
+
`listType`: kotlin.String,
|
|
3221
|
+
): kotlin.String =
|
|
3222
|
+
FfiConverterString.lift(
|
|
3223
|
+
uniffiRustCall { _status ->
|
|
3224
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_wrap_in_list(
|
|
3225
|
+
FfiConverterULong.lower(`id`),
|
|
3226
|
+
FfiConverterString.lower(`listType`),
|
|
3227
|
+
_status,
|
|
3228
|
+
)
|
|
3229
|
+
},
|
|
3230
|
+
)
|
|
3231
|
+
|
|
3232
|
+
/**
|
|
3233
|
+
* Wrap or convert a list at an explicit scalar selection. Returns an update JSON string.
|
|
3234
|
+
*/
|
|
3235
|
+
fun `editorWrapInListAtSelectionScalar`(
|
|
3236
|
+
`id`: kotlin.ULong,
|
|
3237
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3238
|
+
`scalarHead`: kotlin.UInt,
|
|
3239
|
+
`listType`: kotlin.String,
|
|
3240
|
+
): kotlin.String =
|
|
3241
|
+
FfiConverterString.lift(
|
|
3242
|
+
uniffiRustCall { _status ->
|
|
3243
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_wrap_in_list_at_selection_scalar(
|
|
3244
|
+
FfiConverterULong.lower(`id`),
|
|
3245
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3246
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3247
|
+
FfiConverterString.lower(`listType`),
|
|
3248
|
+
_status,
|
|
3249
|
+
)
|
|
3250
|
+
},
|
|
3251
|
+
)
|