@apollohg/react-native-prose-editor 0.5.11 → 0.5.13
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 +1 -0
- package/android/consumer-rules.pro +8 -0
- package/android/src/main/java/com/apollohg/editor/EditorEditText.kt +2 -2
- package/android/src/main/java/com/apollohg/editor/NativeEditorExpoView.kt +58 -4
- package/dist/EditorToolbar.js +37 -1
- package/dist/NativeRichTextEditor.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/package.json +2 -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 +1892 -1391
|
@@ -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,677 +713,868 @@ 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_destroy(): Short
|
|
677
809
|
|
|
810
|
+
fun uniffi_editor_core_checksum_func_editor_doc_to_scalar(): Short
|
|
678
811
|
|
|
812
|
+
fun uniffi_editor_core_checksum_func_editor_get_content_snapshot(): Short
|
|
679
813
|
|
|
814
|
+
fun uniffi_editor_core_checksum_func_editor_get_current_state(): Short
|
|
680
815
|
|
|
816
|
+
fun uniffi_editor_core_checksum_func_editor_get_html(): Short
|
|
681
817
|
|
|
818
|
+
fun uniffi_editor_core_checksum_func_editor_get_json(): Short
|
|
682
819
|
|
|
820
|
+
fun uniffi_editor_core_checksum_func_editor_get_selection(): Short
|
|
683
821
|
|
|
822
|
+
fun uniffi_editor_core_checksum_func_editor_get_selection_state(): Short
|
|
684
823
|
|
|
824
|
+
fun uniffi_editor_core_checksum_func_editor_indent_list_item(): Short
|
|
685
825
|
|
|
826
|
+
fun uniffi_editor_core_checksum_func_editor_indent_list_item_at_selection_scalar(): Short
|
|
686
827
|
|
|
828
|
+
fun uniffi_editor_core_checksum_func_editor_insert_content_html(): Short
|
|
687
829
|
|
|
830
|
+
fun uniffi_editor_core_checksum_func_editor_insert_content_json(): Short
|
|
688
831
|
|
|
832
|
+
fun uniffi_editor_core_checksum_func_editor_insert_content_json_at_selection_scalar(): Short
|
|
689
833
|
|
|
834
|
+
fun uniffi_editor_core_checksum_func_editor_insert_node(): Short
|
|
690
835
|
|
|
836
|
+
fun uniffi_editor_core_checksum_func_editor_insert_node_at_selection_scalar(): Short
|
|
691
837
|
|
|
838
|
+
fun uniffi_editor_core_checksum_func_editor_insert_text(): Short
|
|
692
839
|
|
|
840
|
+
fun uniffi_editor_core_checksum_func_editor_insert_text_scalar(): Short
|
|
693
841
|
|
|
842
|
+
fun uniffi_editor_core_checksum_func_editor_outdent_list_item(): Short
|
|
694
843
|
|
|
844
|
+
fun uniffi_editor_core_checksum_func_editor_outdent_list_item_at_selection_scalar(): Short
|
|
695
845
|
|
|
846
|
+
fun uniffi_editor_core_checksum_func_editor_redo(): Short
|
|
696
847
|
|
|
848
|
+
fun uniffi_editor_core_checksum_func_editor_replace_html(): Short
|
|
697
849
|
|
|
850
|
+
fun uniffi_editor_core_checksum_func_editor_replace_json(): Short
|
|
698
851
|
|
|
852
|
+
fun uniffi_editor_core_checksum_func_editor_replace_selection_text(): Short
|
|
699
853
|
|
|
854
|
+
fun uniffi_editor_core_checksum_func_editor_replace_text_scalar(): Short
|
|
700
855
|
|
|
856
|
+
fun uniffi_editor_core_checksum_func_editor_resize_image_at_doc_pos(): Short
|
|
701
857
|
|
|
858
|
+
fun uniffi_editor_core_checksum_func_editor_scalar_to_doc(): Short
|
|
702
859
|
|
|
860
|
+
fun uniffi_editor_core_checksum_func_editor_set_html(): Short
|
|
703
861
|
|
|
862
|
+
fun uniffi_editor_core_checksum_func_editor_set_json(): Short
|
|
704
863
|
|
|
864
|
+
fun uniffi_editor_core_checksum_func_editor_set_mark(): Short
|
|
705
865
|
|
|
866
|
+
fun uniffi_editor_core_checksum_func_editor_set_mark_at_selection_scalar(): Short
|
|
706
867
|
|
|
868
|
+
fun uniffi_editor_core_checksum_func_editor_set_selection(): Short
|
|
707
869
|
|
|
870
|
+
fun uniffi_editor_core_checksum_func_editor_set_selection_scalar(): Short
|
|
708
871
|
|
|
872
|
+
fun uniffi_editor_core_checksum_func_editor_split_block(): Short
|
|
709
873
|
|
|
874
|
+
fun uniffi_editor_core_checksum_func_editor_split_block_scalar(): Short
|
|
710
875
|
|
|
876
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote(): Short
|
|
711
877
|
|
|
878
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote_at_selection_scalar(): Short
|
|
712
879
|
|
|
880
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_heading(): Short
|
|
713
881
|
|
|
882
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_heading_at_selection_scalar(): Short
|
|
714
883
|
|
|
884
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_mark(): Short
|
|
715
885
|
|
|
886
|
+
fun uniffi_editor_core_checksum_func_editor_toggle_mark_at_selection_scalar(): Short
|
|
716
887
|
|
|
888
|
+
fun uniffi_editor_core_checksum_func_editor_undo(): Short
|
|
717
889
|
|
|
890
|
+
fun uniffi_editor_core_checksum_func_editor_unset_mark(): Short
|
|
718
891
|
|
|
892
|
+
fun uniffi_editor_core_checksum_func_editor_unset_mark_at_selection_scalar(): Short
|
|
719
893
|
|
|
894
|
+
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list(): Short
|
|
720
895
|
|
|
896
|
+
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list_at_selection_scalar(): Short
|
|
721
897
|
|
|
898
|
+
fun uniffi_editor_core_checksum_func_editor_wrap_in_list(): Short
|
|
722
899
|
|
|
900
|
+
fun uniffi_editor_core_checksum_func_editor_wrap_in_list_at_selection_scalar(): Short
|
|
723
901
|
|
|
902
|
+
fun ffi_editor_core_uniffi_contract_version(): Int
|
|
903
|
+
}
|
|
724
904
|
|
|
905
|
+
// A JNA Library to expose the extern-C FFI definitions.
|
|
906
|
+
// This is an implementation detail which will be called internally by the public API.
|
|
907
|
+
internal interface UniffiLib : Library {
|
|
908
|
+
companion object {
|
|
909
|
+
internal val INSTANCE: UniffiLib by lazy {
|
|
910
|
+
val componentName = "editor_core"
|
|
911
|
+
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
912
|
+
// N.B. the name of the extension is very misleading, since it is
|
|
913
|
+
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
914
|
+
// in the interface for large crates.
|
|
915
|
+
//
|
|
916
|
+
// By splitting the otherwise huge interface into two parts
|
|
917
|
+
// * UniffiLib (this)
|
|
918
|
+
// * IntegrityCheckingUniffiLib
|
|
919
|
+
// And all checksum methods are put into `IntegrityCheckingUniffiLib`
|
|
920
|
+
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
921
|
+
//
|
|
922
|
+
// Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib`
|
|
923
|
+
// so that we can (optionally!) call `uniffiCheckApiChecksums`...
|
|
924
|
+
loadIndirect<IntegrityCheckingUniffiLib>(componentName)
|
|
925
|
+
.also { lib: IntegrityCheckingUniffiLib ->
|
|
926
|
+
uniffiCheckContractApiVersion(lib)
|
|
927
|
+
uniffiCheckApiChecksums(lib)
|
|
928
|
+
}
|
|
929
|
+
// ... and then we load the library as `UniffiLib`
|
|
930
|
+
// N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib`
|
|
931
|
+
// => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...`
|
|
932
|
+
// error. So we must call `loadIndirect` twice. For crates large enough
|
|
933
|
+
// to trigger this issue, the performance impact is negligible, running on
|
|
934
|
+
// a macOS M1 machine the `loadIndirect` call takes ~50ms.
|
|
935
|
+
val lib = loadIndirect<UniffiLib>(componentName)
|
|
936
|
+
// No need to check the contract version and checksums, since
|
|
937
|
+
// we already did that with `IntegrityCheckingUniffiLib` above.
|
|
938
|
+
// Loading of library with integrity check done.
|
|
939
|
+
lib
|
|
940
|
+
}
|
|
941
|
+
}
|
|
725
942
|
|
|
943
|
+
// FFI functions
|
|
944
|
+
fun uniffi_editor_core_fn_func_collaboration_session_apply_encoded_state(
|
|
945
|
+
`id`: Long,
|
|
946
|
+
`encodedStateJson`: RustBuffer.ByValue,
|
|
947
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
948
|
+
): RustBuffer.ByValue
|
|
949
|
+
|
|
950
|
+
fun uniffi_editor_core_fn_func_collaboration_session_apply_local_document_json(
|
|
951
|
+
`id`: Long,
|
|
952
|
+
`json`: RustBuffer.ByValue,
|
|
953
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
954
|
+
): RustBuffer.ByValue
|
|
955
|
+
|
|
956
|
+
fun uniffi_editor_core_fn_func_collaboration_session_clear_local_awareness(
|
|
957
|
+
`id`: Long,
|
|
958
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
959
|
+
): RustBuffer.ByValue
|
|
960
|
+
|
|
961
|
+
fun uniffi_editor_core_fn_func_collaboration_session_create(
|
|
962
|
+
`configJson`: RustBuffer.ByValue,
|
|
963
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
964
|
+
): Long
|
|
965
|
+
|
|
966
|
+
fun uniffi_editor_core_fn_func_collaboration_session_destroy(
|
|
967
|
+
`id`: Long,
|
|
968
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
969
|
+
): Unit
|
|
970
|
+
|
|
971
|
+
fun uniffi_editor_core_fn_func_collaboration_session_get_document_json(
|
|
972
|
+
`id`: Long,
|
|
973
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
974
|
+
): RustBuffer.ByValue
|
|
975
|
+
|
|
976
|
+
fun uniffi_editor_core_fn_func_collaboration_session_get_encoded_state(
|
|
977
|
+
`id`: Long,
|
|
978
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
979
|
+
): RustBuffer.ByValue
|
|
980
|
+
|
|
981
|
+
fun uniffi_editor_core_fn_func_collaboration_session_get_peers_json(
|
|
982
|
+
`id`: Long,
|
|
983
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
984
|
+
): RustBuffer.ByValue
|
|
985
|
+
|
|
986
|
+
fun uniffi_editor_core_fn_func_collaboration_session_handle_message(
|
|
987
|
+
`id`: Long,
|
|
988
|
+
`messageJson`: RustBuffer.ByValue,
|
|
989
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
990
|
+
): RustBuffer.ByValue
|
|
991
|
+
|
|
992
|
+
fun uniffi_editor_core_fn_func_collaboration_session_replace_encoded_state(
|
|
993
|
+
`id`: Long,
|
|
994
|
+
`encodedStateJson`: RustBuffer.ByValue,
|
|
995
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
996
|
+
): RustBuffer.ByValue
|
|
997
|
+
|
|
998
|
+
fun uniffi_editor_core_fn_func_collaboration_session_set_local_awareness(
|
|
999
|
+
`id`: Long,
|
|
1000
|
+
`awarenessJson`: RustBuffer.ByValue,
|
|
1001
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1002
|
+
): RustBuffer.ByValue
|
|
1003
|
+
|
|
1004
|
+
fun uniffi_editor_core_fn_func_collaboration_session_start(
|
|
1005
|
+
`id`: Long,
|
|
1006
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1007
|
+
): RustBuffer.ByValue
|
|
1008
|
+
|
|
1009
|
+
fun uniffi_editor_core_fn_func_editor_can_redo(
|
|
1010
|
+
`id`: Long,
|
|
1011
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1012
|
+
): Byte
|
|
1013
|
+
|
|
1014
|
+
fun uniffi_editor_core_fn_func_editor_can_undo(
|
|
1015
|
+
`id`: Long,
|
|
1016
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1017
|
+
): Byte
|
|
1018
|
+
|
|
1019
|
+
fun uniffi_editor_core_fn_func_editor_core_version(uniffi_out_err: UniffiRustCallStatus): RustBuffer.ByValue
|
|
1020
|
+
|
|
1021
|
+
fun uniffi_editor_core_fn_func_editor_create(
|
|
1022
|
+
`configJson`: RustBuffer.ByValue,
|
|
1023
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1024
|
+
): Long
|
|
1025
|
+
|
|
1026
|
+
fun uniffi_editor_core_fn_func_editor_delete_and_split_scalar(
|
|
1027
|
+
`id`: Long,
|
|
1028
|
+
`scalarFrom`: Int,
|
|
1029
|
+
`scalarTo`: Int,
|
|
1030
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1031
|
+
): RustBuffer.ByValue
|
|
1032
|
+
|
|
1033
|
+
fun uniffi_editor_core_fn_func_editor_delete_backward_at_selection_scalar(
|
|
1034
|
+
`id`: Long,
|
|
1035
|
+
`scalarAnchor`: Int,
|
|
1036
|
+
`scalarHead`: Int,
|
|
1037
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1038
|
+
): RustBuffer.ByValue
|
|
1039
|
+
|
|
1040
|
+
fun uniffi_editor_core_fn_func_editor_delete_range(
|
|
1041
|
+
`id`: Long,
|
|
1042
|
+
`from`: Int,
|
|
1043
|
+
`to`: Int,
|
|
1044
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1045
|
+
): RustBuffer.ByValue
|
|
1046
|
+
|
|
1047
|
+
fun uniffi_editor_core_fn_func_editor_delete_scalar_range(
|
|
1048
|
+
`id`: Long,
|
|
1049
|
+
`scalarFrom`: Int,
|
|
1050
|
+
`scalarTo`: Int,
|
|
1051
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1052
|
+
): RustBuffer.ByValue
|
|
1053
|
+
|
|
1054
|
+
fun uniffi_editor_core_fn_func_editor_destroy(
|
|
1055
|
+
`id`: Long,
|
|
1056
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1057
|
+
): Unit
|
|
1058
|
+
|
|
1059
|
+
fun uniffi_editor_core_fn_func_editor_doc_to_scalar(
|
|
1060
|
+
`id`: Long,
|
|
1061
|
+
`docPos`: Int,
|
|
1062
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1063
|
+
): Int
|
|
1064
|
+
|
|
1065
|
+
fun uniffi_editor_core_fn_func_editor_get_content_snapshot(
|
|
1066
|
+
`id`: Long,
|
|
1067
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1068
|
+
): RustBuffer.ByValue
|
|
1069
|
+
|
|
1070
|
+
fun uniffi_editor_core_fn_func_editor_get_current_state(
|
|
1071
|
+
`id`: Long,
|
|
1072
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1073
|
+
): RustBuffer.ByValue
|
|
1074
|
+
|
|
1075
|
+
fun uniffi_editor_core_fn_func_editor_get_html(
|
|
1076
|
+
`id`: Long,
|
|
1077
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1078
|
+
): RustBuffer.ByValue
|
|
1079
|
+
|
|
1080
|
+
fun uniffi_editor_core_fn_func_editor_get_json(
|
|
1081
|
+
`id`: Long,
|
|
1082
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1083
|
+
): RustBuffer.ByValue
|
|
1084
|
+
|
|
1085
|
+
fun uniffi_editor_core_fn_func_editor_get_selection(
|
|
1086
|
+
`id`: Long,
|
|
1087
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1088
|
+
): RustBuffer.ByValue
|
|
1089
|
+
|
|
1090
|
+
fun uniffi_editor_core_fn_func_editor_get_selection_state(
|
|
1091
|
+
`id`: Long,
|
|
1092
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1093
|
+
): RustBuffer.ByValue
|
|
1094
|
+
|
|
1095
|
+
fun uniffi_editor_core_fn_func_editor_indent_list_item(
|
|
1096
|
+
`id`: Long,
|
|
1097
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1098
|
+
): RustBuffer.ByValue
|
|
1099
|
+
|
|
1100
|
+
fun uniffi_editor_core_fn_func_editor_indent_list_item_at_selection_scalar(
|
|
1101
|
+
`id`: Long,
|
|
1102
|
+
`scalarAnchor`: Int,
|
|
1103
|
+
`scalarHead`: Int,
|
|
1104
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1105
|
+
): RustBuffer.ByValue
|
|
1106
|
+
|
|
1107
|
+
fun uniffi_editor_core_fn_func_editor_insert_content_html(
|
|
1108
|
+
`id`: Long,
|
|
1109
|
+
`html`: RustBuffer.ByValue,
|
|
1110
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1111
|
+
): RustBuffer.ByValue
|
|
1112
|
+
|
|
1113
|
+
fun uniffi_editor_core_fn_func_editor_insert_content_json(
|
|
1114
|
+
`id`: Long,
|
|
1115
|
+
`json`: RustBuffer.ByValue,
|
|
1116
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1117
|
+
): RustBuffer.ByValue
|
|
1118
|
+
|
|
1119
|
+
fun uniffi_editor_core_fn_func_editor_insert_content_json_at_selection_scalar(
|
|
1120
|
+
`id`: Long,
|
|
1121
|
+
`scalarAnchor`: Int,
|
|
1122
|
+
`scalarHead`: Int,
|
|
1123
|
+
`json`: RustBuffer.ByValue,
|
|
1124
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1125
|
+
): RustBuffer.ByValue
|
|
1126
|
+
|
|
1127
|
+
fun uniffi_editor_core_fn_func_editor_insert_node(
|
|
1128
|
+
`id`: Long,
|
|
1129
|
+
`nodeType`: RustBuffer.ByValue,
|
|
1130
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1131
|
+
): RustBuffer.ByValue
|
|
1132
|
+
|
|
1133
|
+
fun uniffi_editor_core_fn_func_editor_insert_node_at_selection_scalar(
|
|
1134
|
+
`id`: Long,
|
|
1135
|
+
`scalarAnchor`: Int,
|
|
1136
|
+
`scalarHead`: Int,
|
|
1137
|
+
`nodeType`: RustBuffer.ByValue,
|
|
1138
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1139
|
+
): RustBuffer.ByValue
|
|
1140
|
+
|
|
1141
|
+
fun uniffi_editor_core_fn_func_editor_insert_text(
|
|
1142
|
+
`id`: Long,
|
|
1143
|
+
`pos`: Int,
|
|
1144
|
+
`text`: RustBuffer.ByValue,
|
|
1145
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1146
|
+
): RustBuffer.ByValue
|
|
1147
|
+
|
|
1148
|
+
fun uniffi_editor_core_fn_func_editor_insert_text_scalar(
|
|
1149
|
+
`id`: Long,
|
|
1150
|
+
`scalarPos`: Int,
|
|
1151
|
+
`text`: RustBuffer.ByValue,
|
|
1152
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1153
|
+
): RustBuffer.ByValue
|
|
1154
|
+
|
|
1155
|
+
fun uniffi_editor_core_fn_func_editor_outdent_list_item(
|
|
1156
|
+
`id`: Long,
|
|
1157
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1158
|
+
): RustBuffer.ByValue
|
|
1159
|
+
|
|
1160
|
+
fun uniffi_editor_core_fn_func_editor_outdent_list_item_at_selection_scalar(
|
|
1161
|
+
`id`: Long,
|
|
1162
|
+
`scalarAnchor`: Int,
|
|
1163
|
+
`scalarHead`: Int,
|
|
1164
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1165
|
+
): RustBuffer.ByValue
|
|
1166
|
+
|
|
1167
|
+
fun uniffi_editor_core_fn_func_editor_redo(
|
|
1168
|
+
`id`: Long,
|
|
1169
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1170
|
+
): RustBuffer.ByValue
|
|
1171
|
+
|
|
1172
|
+
fun uniffi_editor_core_fn_func_editor_replace_html(
|
|
1173
|
+
`id`: Long,
|
|
1174
|
+
`html`: RustBuffer.ByValue,
|
|
1175
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1176
|
+
): RustBuffer.ByValue
|
|
1177
|
+
|
|
1178
|
+
fun uniffi_editor_core_fn_func_editor_replace_json(
|
|
1179
|
+
`id`: Long,
|
|
1180
|
+
`json`: RustBuffer.ByValue,
|
|
1181
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1182
|
+
): RustBuffer.ByValue
|
|
1183
|
+
|
|
1184
|
+
fun uniffi_editor_core_fn_func_editor_replace_selection_text(
|
|
1185
|
+
`id`: Long,
|
|
1186
|
+
`text`: RustBuffer.ByValue,
|
|
1187
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1188
|
+
): RustBuffer.ByValue
|
|
1189
|
+
|
|
1190
|
+
fun uniffi_editor_core_fn_func_editor_replace_text_scalar(
|
|
1191
|
+
`id`: Long,
|
|
1192
|
+
`scalarFrom`: Int,
|
|
1193
|
+
`scalarTo`: Int,
|
|
1194
|
+
`text`: RustBuffer.ByValue,
|
|
1195
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1196
|
+
): RustBuffer.ByValue
|
|
1197
|
+
|
|
1198
|
+
fun uniffi_editor_core_fn_func_editor_resize_image_at_doc_pos(
|
|
1199
|
+
`id`: Long,
|
|
1200
|
+
`docPos`: Int,
|
|
1201
|
+
`width`: Int,
|
|
1202
|
+
`height`: Int,
|
|
1203
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1204
|
+
): RustBuffer.ByValue
|
|
1205
|
+
|
|
1206
|
+
fun uniffi_editor_core_fn_func_editor_scalar_to_doc(
|
|
1207
|
+
`id`: Long,
|
|
1208
|
+
`scalar`: Int,
|
|
1209
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1210
|
+
): Int
|
|
1211
|
+
|
|
1212
|
+
fun uniffi_editor_core_fn_func_editor_set_html(
|
|
1213
|
+
`id`: Long,
|
|
1214
|
+
`html`: RustBuffer.ByValue,
|
|
1215
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1216
|
+
): RustBuffer.ByValue
|
|
1217
|
+
|
|
1218
|
+
fun uniffi_editor_core_fn_func_editor_set_json(
|
|
1219
|
+
`id`: Long,
|
|
1220
|
+
`json`: RustBuffer.ByValue,
|
|
1221
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1222
|
+
): RustBuffer.ByValue
|
|
1223
|
+
|
|
1224
|
+
fun uniffi_editor_core_fn_func_editor_set_mark(
|
|
1225
|
+
`id`: Long,
|
|
1226
|
+
`markName`: RustBuffer.ByValue,
|
|
1227
|
+
`attrsJson`: RustBuffer.ByValue,
|
|
1228
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1229
|
+
): RustBuffer.ByValue
|
|
1230
|
+
|
|
1231
|
+
fun uniffi_editor_core_fn_func_editor_set_mark_at_selection_scalar(
|
|
1232
|
+
`id`: Long,
|
|
1233
|
+
`scalarAnchor`: Int,
|
|
1234
|
+
`scalarHead`: Int,
|
|
1235
|
+
`markName`: RustBuffer.ByValue,
|
|
1236
|
+
`attrsJson`: RustBuffer.ByValue,
|
|
1237
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1238
|
+
): RustBuffer.ByValue
|
|
1239
|
+
|
|
1240
|
+
fun uniffi_editor_core_fn_func_editor_set_selection(
|
|
1241
|
+
`id`: Long,
|
|
1242
|
+
`anchor`: Int,
|
|
1243
|
+
`head`: Int,
|
|
1244
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1245
|
+
): Unit
|
|
1246
|
+
|
|
1247
|
+
fun uniffi_editor_core_fn_func_editor_set_selection_scalar(
|
|
1248
|
+
`id`: Long,
|
|
1249
|
+
`scalarAnchor`: Int,
|
|
1250
|
+
`scalarHead`: Int,
|
|
1251
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1252
|
+
): Unit
|
|
1253
|
+
|
|
1254
|
+
fun uniffi_editor_core_fn_func_editor_split_block(
|
|
1255
|
+
`id`: Long,
|
|
1256
|
+
`pos`: Int,
|
|
1257
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1258
|
+
): RustBuffer.ByValue
|
|
1259
|
+
|
|
1260
|
+
fun uniffi_editor_core_fn_func_editor_split_block_scalar(
|
|
1261
|
+
`id`: Long,
|
|
1262
|
+
`scalarPos`: Int,
|
|
1263
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1264
|
+
): RustBuffer.ByValue
|
|
1265
|
+
|
|
1266
|
+
fun uniffi_editor_core_fn_func_editor_toggle_blockquote(
|
|
1267
|
+
`id`: Long,
|
|
1268
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1269
|
+
): RustBuffer.ByValue
|
|
1270
|
+
|
|
1271
|
+
fun uniffi_editor_core_fn_func_editor_toggle_blockquote_at_selection_scalar(
|
|
1272
|
+
`id`: Long,
|
|
1273
|
+
`scalarAnchor`: Int,
|
|
1274
|
+
`scalarHead`: Int,
|
|
1275
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1276
|
+
): RustBuffer.ByValue
|
|
1277
|
+
|
|
1278
|
+
fun uniffi_editor_core_fn_func_editor_toggle_heading(
|
|
1279
|
+
`id`: Long,
|
|
1280
|
+
`level`: Byte,
|
|
1281
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1282
|
+
): RustBuffer.ByValue
|
|
1283
|
+
|
|
1284
|
+
fun uniffi_editor_core_fn_func_editor_toggle_heading_at_selection_scalar(
|
|
1285
|
+
`id`: Long,
|
|
1286
|
+
`scalarAnchor`: Int,
|
|
1287
|
+
`scalarHead`: Int,
|
|
1288
|
+
`level`: Byte,
|
|
1289
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1290
|
+
): RustBuffer.ByValue
|
|
1291
|
+
|
|
1292
|
+
fun uniffi_editor_core_fn_func_editor_toggle_mark(
|
|
1293
|
+
`id`: Long,
|
|
1294
|
+
`markName`: RustBuffer.ByValue,
|
|
1295
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1296
|
+
): RustBuffer.ByValue
|
|
1297
|
+
|
|
1298
|
+
fun uniffi_editor_core_fn_func_editor_toggle_mark_at_selection_scalar(
|
|
1299
|
+
`id`: Long,
|
|
1300
|
+
`scalarAnchor`: Int,
|
|
1301
|
+
`scalarHead`: Int,
|
|
1302
|
+
`markName`: RustBuffer.ByValue,
|
|
1303
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1304
|
+
): RustBuffer.ByValue
|
|
1305
|
+
|
|
1306
|
+
fun uniffi_editor_core_fn_func_editor_undo(
|
|
1307
|
+
`id`: Long,
|
|
1308
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1309
|
+
): RustBuffer.ByValue
|
|
1310
|
+
|
|
1311
|
+
fun uniffi_editor_core_fn_func_editor_unset_mark(
|
|
1312
|
+
`id`: Long,
|
|
1313
|
+
`markName`: RustBuffer.ByValue,
|
|
1314
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1315
|
+
): RustBuffer.ByValue
|
|
1316
|
+
|
|
1317
|
+
fun uniffi_editor_core_fn_func_editor_unset_mark_at_selection_scalar(
|
|
1318
|
+
`id`: Long,
|
|
1319
|
+
`scalarAnchor`: Int,
|
|
1320
|
+
`scalarHead`: Int,
|
|
1321
|
+
`markName`: RustBuffer.ByValue,
|
|
1322
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1323
|
+
): RustBuffer.ByValue
|
|
1324
|
+
|
|
1325
|
+
fun uniffi_editor_core_fn_func_editor_unwrap_from_list(
|
|
1326
|
+
`id`: Long,
|
|
1327
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1328
|
+
): RustBuffer.ByValue
|
|
1329
|
+
|
|
1330
|
+
fun uniffi_editor_core_fn_func_editor_unwrap_from_list_at_selection_scalar(
|
|
1331
|
+
`id`: Long,
|
|
1332
|
+
`scalarAnchor`: Int,
|
|
1333
|
+
`scalarHead`: Int,
|
|
1334
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1335
|
+
): RustBuffer.ByValue
|
|
1336
|
+
|
|
1337
|
+
fun uniffi_editor_core_fn_func_editor_wrap_in_list(
|
|
1338
|
+
`id`: Long,
|
|
1339
|
+
`listType`: RustBuffer.ByValue,
|
|
1340
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1341
|
+
): RustBuffer.ByValue
|
|
1342
|
+
|
|
1343
|
+
fun uniffi_editor_core_fn_func_editor_wrap_in_list_at_selection_scalar(
|
|
1344
|
+
`id`: Long,
|
|
1345
|
+
`scalarAnchor`: Int,
|
|
1346
|
+
`scalarHead`: Int,
|
|
1347
|
+
`listType`: RustBuffer.ByValue,
|
|
1348
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1349
|
+
): RustBuffer.ByValue
|
|
1350
|
+
|
|
1351
|
+
fun ffi_editor_core_rustbuffer_alloc(
|
|
1352
|
+
`size`: Long,
|
|
1353
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1354
|
+
): RustBuffer.ByValue
|
|
1355
|
+
|
|
1356
|
+
fun ffi_editor_core_rustbuffer_from_bytes(
|
|
1357
|
+
`bytes`: ForeignBytes.ByValue,
|
|
1358
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1359
|
+
): RustBuffer.ByValue
|
|
1360
|
+
|
|
1361
|
+
fun ffi_editor_core_rustbuffer_free(
|
|
1362
|
+
`buf`: RustBuffer.ByValue,
|
|
1363
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1364
|
+
): Unit
|
|
1365
|
+
|
|
1366
|
+
fun ffi_editor_core_rustbuffer_reserve(
|
|
1367
|
+
`buf`: RustBuffer.ByValue,
|
|
1368
|
+
`additional`: Long,
|
|
1369
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1370
|
+
): RustBuffer.ByValue
|
|
1371
|
+
|
|
1372
|
+
fun ffi_editor_core_rust_future_poll_u8(
|
|
1373
|
+
`handle`: Long,
|
|
1374
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1375
|
+
`callbackData`: Long,
|
|
1376
|
+
): Unit
|
|
1377
|
+
|
|
1378
|
+
fun ffi_editor_core_rust_future_cancel_u8(`handle`: Long): Unit
|
|
1379
|
+
|
|
1380
|
+
fun ffi_editor_core_rust_future_free_u8(`handle`: Long): Unit
|
|
1381
|
+
|
|
1382
|
+
fun ffi_editor_core_rust_future_complete_u8(
|
|
1383
|
+
`handle`: Long,
|
|
1384
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1385
|
+
): Byte
|
|
1386
|
+
|
|
1387
|
+
fun ffi_editor_core_rust_future_poll_i8(
|
|
1388
|
+
`handle`: Long,
|
|
1389
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1390
|
+
`callbackData`: Long,
|
|
1391
|
+
): Unit
|
|
1392
|
+
|
|
1393
|
+
fun ffi_editor_core_rust_future_cancel_i8(`handle`: Long): Unit
|
|
1394
|
+
|
|
1395
|
+
fun ffi_editor_core_rust_future_free_i8(`handle`: Long): Unit
|
|
1396
|
+
|
|
1397
|
+
fun ffi_editor_core_rust_future_complete_i8(
|
|
1398
|
+
`handle`: Long,
|
|
1399
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1400
|
+
): Byte
|
|
1401
|
+
|
|
1402
|
+
fun ffi_editor_core_rust_future_poll_u16(
|
|
1403
|
+
`handle`: Long,
|
|
1404
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1405
|
+
`callbackData`: Long,
|
|
1406
|
+
): Unit
|
|
1407
|
+
|
|
1408
|
+
fun ffi_editor_core_rust_future_cancel_u16(`handle`: Long): Unit
|
|
1409
|
+
|
|
1410
|
+
fun ffi_editor_core_rust_future_free_u16(`handle`: Long): Unit
|
|
1411
|
+
|
|
1412
|
+
fun ffi_editor_core_rust_future_complete_u16(
|
|
1413
|
+
`handle`: Long,
|
|
1414
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1415
|
+
): Short
|
|
1416
|
+
|
|
1417
|
+
fun ffi_editor_core_rust_future_poll_i16(
|
|
1418
|
+
`handle`: Long,
|
|
1419
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1420
|
+
`callbackData`: Long,
|
|
1421
|
+
): Unit
|
|
1422
|
+
|
|
1423
|
+
fun ffi_editor_core_rust_future_cancel_i16(`handle`: Long): Unit
|
|
1424
|
+
|
|
1425
|
+
fun ffi_editor_core_rust_future_free_i16(`handle`: Long): Unit
|
|
1426
|
+
|
|
1427
|
+
fun ffi_editor_core_rust_future_complete_i16(
|
|
1428
|
+
`handle`: Long,
|
|
1429
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1430
|
+
): Short
|
|
726
1431
|
|
|
1432
|
+
fun ffi_editor_core_rust_future_poll_u32(
|
|
1433
|
+
`handle`: Long,
|
|
1434
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1435
|
+
`callbackData`: Long,
|
|
1436
|
+
): Unit
|
|
727
1437
|
|
|
1438
|
+
fun ffi_editor_core_rust_future_cancel_u32(`handle`: Long): Unit
|
|
728
1439
|
|
|
1440
|
+
fun ffi_editor_core_rust_future_free_u32(`handle`: Long): Unit
|
|
729
1441
|
|
|
1442
|
+
fun ffi_editor_core_rust_future_complete_u32(
|
|
1443
|
+
`handle`: Long,
|
|
1444
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1445
|
+
): Int
|
|
730
1446
|
|
|
1447
|
+
fun ffi_editor_core_rust_future_poll_i32(
|
|
1448
|
+
`handle`: Long,
|
|
1449
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1450
|
+
`callbackData`: Long,
|
|
1451
|
+
): Unit
|
|
731
1452
|
|
|
1453
|
+
fun ffi_editor_core_rust_future_cancel_i32(`handle`: Long): Unit
|
|
732
1454
|
|
|
1455
|
+
fun ffi_editor_core_rust_future_free_i32(`handle`: Long): Unit
|
|
733
1456
|
|
|
1457
|
+
fun ffi_editor_core_rust_future_complete_i32(
|
|
1458
|
+
`handle`: Long,
|
|
1459
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1460
|
+
): Int
|
|
734
1461
|
|
|
1462
|
+
fun ffi_editor_core_rust_future_poll_u64(
|
|
1463
|
+
`handle`: Long,
|
|
1464
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1465
|
+
`callbackData`: Long,
|
|
1466
|
+
): Unit
|
|
735
1467
|
|
|
1468
|
+
fun ffi_editor_core_rust_future_cancel_u64(`handle`: Long): Unit
|
|
736
1469
|
|
|
1470
|
+
fun ffi_editor_core_rust_future_free_u64(`handle`: Long): Unit
|
|
737
1471
|
|
|
1472
|
+
fun ffi_editor_core_rust_future_complete_u64(
|
|
1473
|
+
`handle`: Long,
|
|
1474
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1475
|
+
): Long
|
|
738
1476
|
|
|
1477
|
+
fun ffi_editor_core_rust_future_poll_i64(
|
|
1478
|
+
`handle`: Long,
|
|
1479
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1480
|
+
`callbackData`: Long,
|
|
1481
|
+
): Unit
|
|
739
1482
|
|
|
1483
|
+
fun ffi_editor_core_rust_future_cancel_i64(`handle`: Long): Unit
|
|
740
1484
|
|
|
1485
|
+
fun ffi_editor_core_rust_future_free_i64(`handle`: Long): Unit
|
|
741
1486
|
|
|
1487
|
+
fun ffi_editor_core_rust_future_complete_i64(
|
|
1488
|
+
`handle`: Long,
|
|
1489
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1490
|
+
): Long
|
|
742
1491
|
|
|
1492
|
+
fun ffi_editor_core_rust_future_poll_f32(
|
|
1493
|
+
`handle`: Long,
|
|
1494
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1495
|
+
`callbackData`: Long,
|
|
1496
|
+
): Unit
|
|
743
1497
|
|
|
1498
|
+
fun ffi_editor_core_rust_future_cancel_f32(`handle`: Long): Unit
|
|
744
1499
|
|
|
1500
|
+
fun ffi_editor_core_rust_future_free_f32(`handle`: Long): Unit
|
|
745
1501
|
|
|
1502
|
+
fun ffi_editor_core_rust_future_complete_f32(
|
|
1503
|
+
`handle`: Long,
|
|
1504
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1505
|
+
): Float
|
|
746
1506
|
|
|
1507
|
+
fun ffi_editor_core_rust_future_poll_f64(
|
|
1508
|
+
`handle`: Long,
|
|
1509
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1510
|
+
`callbackData`: Long,
|
|
1511
|
+
): Unit
|
|
747
1512
|
|
|
1513
|
+
fun ffi_editor_core_rust_future_cancel_f64(`handle`: Long): Unit
|
|
748
1514
|
|
|
1515
|
+
fun ffi_editor_core_rust_future_free_f64(`handle`: Long): Unit
|
|
749
1516
|
|
|
1517
|
+
fun ffi_editor_core_rust_future_complete_f64(
|
|
1518
|
+
`handle`: Long,
|
|
1519
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1520
|
+
): Double
|
|
750
1521
|
|
|
1522
|
+
fun ffi_editor_core_rust_future_poll_pointer(
|
|
1523
|
+
`handle`: Long,
|
|
1524
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1525
|
+
`callbackData`: Long,
|
|
1526
|
+
): Unit
|
|
751
1527
|
|
|
1528
|
+
fun ffi_editor_core_rust_future_cancel_pointer(`handle`: Long): Unit
|
|
752
1529
|
|
|
1530
|
+
fun ffi_editor_core_rust_future_free_pointer(`handle`: Long): Unit
|
|
753
1531
|
|
|
1532
|
+
fun ffi_editor_core_rust_future_complete_pointer(
|
|
1533
|
+
`handle`: Long,
|
|
1534
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1535
|
+
): Pointer
|
|
754
1536
|
|
|
1537
|
+
fun ffi_editor_core_rust_future_poll_rust_buffer(
|
|
1538
|
+
`handle`: Long,
|
|
1539
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1540
|
+
`callbackData`: Long,
|
|
1541
|
+
): Unit
|
|
755
1542
|
|
|
1543
|
+
fun ffi_editor_core_rust_future_cancel_rust_buffer(`handle`: Long): Unit
|
|
756
1544
|
|
|
1545
|
+
fun ffi_editor_core_rust_future_free_rust_buffer(`handle`: Long): Unit
|
|
757
1546
|
|
|
1547
|
+
fun ffi_editor_core_rust_future_complete_rust_buffer(
|
|
1548
|
+
`handle`: Long,
|
|
1549
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1550
|
+
): RustBuffer.ByValue
|
|
758
1551
|
|
|
1552
|
+
fun ffi_editor_core_rust_future_poll_void(
|
|
1553
|
+
`handle`: Long,
|
|
1554
|
+
`callback`: UniffiRustFutureContinuationCallback,
|
|
1555
|
+
`callbackData`: Long,
|
|
1556
|
+
): Unit
|
|
759
1557
|
|
|
1558
|
+
fun ffi_editor_core_rust_future_cancel_void(`handle`: Long): Unit
|
|
760
1559
|
|
|
1560
|
+
fun ffi_editor_core_rust_future_free_void(`handle`: Long): Unit
|
|
761
1561
|
|
|
1562
|
+
fun ffi_editor_core_rust_future_complete_void(
|
|
1563
|
+
`handle`: Long,
|
|
1564
|
+
uniffi_out_err: UniffiRustCallStatus,
|
|
1565
|
+
): Unit
|
|
1566
|
+
}
|
|
762
1567
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
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
|
-
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
849
|
-
// N.B. the name of the extension is very misleading, since it is
|
|
850
|
-
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
851
|
-
// in the interface for large crates.
|
|
852
|
-
//
|
|
853
|
-
// By splitting the otherwise huge interface into two parts
|
|
854
|
-
// * UniffiLib
|
|
855
|
-
// * IntegrityCheckingUniffiLib (this)
|
|
856
|
-
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
857
|
-
//
|
|
858
|
-
// The `ffi_uniffi_contract_version` method and all checksum methods are put
|
|
859
|
-
// into `IntegrityCheckingUniffiLib` and these methods are called only once,
|
|
860
|
-
// when the library is loaded.
|
|
861
|
-
internal interface IntegrityCheckingUniffiLib : Library {
|
|
862
|
-
// Integrity check functions only
|
|
863
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_apply_encoded_state(
|
|
864
|
-
): Short
|
|
865
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_apply_local_document_json(
|
|
866
|
-
): Short
|
|
867
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_clear_local_awareness(
|
|
868
|
-
): Short
|
|
869
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_create(
|
|
870
|
-
): Short
|
|
871
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_destroy(
|
|
872
|
-
): Short
|
|
873
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_get_document_json(
|
|
874
|
-
): Short
|
|
875
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_get_encoded_state(
|
|
876
|
-
): Short
|
|
877
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_get_peers_json(
|
|
878
|
-
): Short
|
|
879
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_handle_message(
|
|
880
|
-
): Short
|
|
881
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_replace_encoded_state(
|
|
882
|
-
): Short
|
|
883
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_set_local_awareness(
|
|
884
|
-
): Short
|
|
885
|
-
fun uniffi_editor_core_checksum_func_collaboration_session_start(
|
|
886
|
-
): Short
|
|
887
|
-
fun uniffi_editor_core_checksum_func_editor_can_redo(
|
|
888
|
-
): Short
|
|
889
|
-
fun uniffi_editor_core_checksum_func_editor_can_undo(
|
|
890
|
-
): Short
|
|
891
|
-
fun uniffi_editor_core_checksum_func_editor_core_version(
|
|
892
|
-
): Short
|
|
893
|
-
fun uniffi_editor_core_checksum_func_editor_create(
|
|
894
|
-
): Short
|
|
895
|
-
fun uniffi_editor_core_checksum_func_editor_delete_and_split_scalar(
|
|
896
|
-
): Short
|
|
897
|
-
fun uniffi_editor_core_checksum_func_editor_delete_backward_at_selection_scalar(
|
|
898
|
-
): Short
|
|
899
|
-
fun uniffi_editor_core_checksum_func_editor_delete_range(
|
|
900
|
-
): Short
|
|
901
|
-
fun uniffi_editor_core_checksum_func_editor_delete_scalar_range(
|
|
902
|
-
): Short
|
|
903
|
-
fun uniffi_editor_core_checksum_func_editor_destroy(
|
|
904
|
-
): Short
|
|
905
|
-
fun uniffi_editor_core_checksum_func_editor_doc_to_scalar(
|
|
906
|
-
): Short
|
|
907
|
-
fun uniffi_editor_core_checksum_func_editor_get_content_snapshot(
|
|
908
|
-
): Short
|
|
909
|
-
fun uniffi_editor_core_checksum_func_editor_get_current_state(
|
|
910
|
-
): Short
|
|
911
|
-
fun uniffi_editor_core_checksum_func_editor_get_html(
|
|
912
|
-
): Short
|
|
913
|
-
fun uniffi_editor_core_checksum_func_editor_get_json(
|
|
914
|
-
): Short
|
|
915
|
-
fun uniffi_editor_core_checksum_func_editor_get_selection(
|
|
916
|
-
): Short
|
|
917
|
-
fun uniffi_editor_core_checksum_func_editor_get_selection_state(
|
|
918
|
-
): Short
|
|
919
|
-
fun uniffi_editor_core_checksum_func_editor_indent_list_item(
|
|
920
|
-
): Short
|
|
921
|
-
fun uniffi_editor_core_checksum_func_editor_indent_list_item_at_selection_scalar(
|
|
922
|
-
): Short
|
|
923
|
-
fun uniffi_editor_core_checksum_func_editor_insert_content_html(
|
|
924
|
-
): Short
|
|
925
|
-
fun uniffi_editor_core_checksum_func_editor_insert_content_json(
|
|
926
|
-
): Short
|
|
927
|
-
fun uniffi_editor_core_checksum_func_editor_insert_content_json_at_selection_scalar(
|
|
928
|
-
): Short
|
|
929
|
-
fun uniffi_editor_core_checksum_func_editor_insert_node(
|
|
930
|
-
): Short
|
|
931
|
-
fun uniffi_editor_core_checksum_func_editor_insert_node_at_selection_scalar(
|
|
932
|
-
): Short
|
|
933
|
-
fun uniffi_editor_core_checksum_func_editor_insert_text(
|
|
934
|
-
): Short
|
|
935
|
-
fun uniffi_editor_core_checksum_func_editor_insert_text_scalar(
|
|
936
|
-
): Short
|
|
937
|
-
fun uniffi_editor_core_checksum_func_editor_outdent_list_item(
|
|
938
|
-
): Short
|
|
939
|
-
fun uniffi_editor_core_checksum_func_editor_outdent_list_item_at_selection_scalar(
|
|
940
|
-
): Short
|
|
941
|
-
fun uniffi_editor_core_checksum_func_editor_redo(
|
|
942
|
-
): Short
|
|
943
|
-
fun uniffi_editor_core_checksum_func_editor_replace_html(
|
|
944
|
-
): Short
|
|
945
|
-
fun uniffi_editor_core_checksum_func_editor_replace_json(
|
|
946
|
-
): Short
|
|
947
|
-
fun uniffi_editor_core_checksum_func_editor_replace_selection_text(
|
|
948
|
-
): Short
|
|
949
|
-
fun uniffi_editor_core_checksum_func_editor_replace_text_scalar(
|
|
950
|
-
): Short
|
|
951
|
-
fun uniffi_editor_core_checksum_func_editor_resize_image_at_doc_pos(
|
|
952
|
-
): Short
|
|
953
|
-
fun uniffi_editor_core_checksum_func_editor_scalar_to_doc(
|
|
954
|
-
): Short
|
|
955
|
-
fun uniffi_editor_core_checksum_func_editor_set_html(
|
|
956
|
-
): Short
|
|
957
|
-
fun uniffi_editor_core_checksum_func_editor_set_json(
|
|
958
|
-
): Short
|
|
959
|
-
fun uniffi_editor_core_checksum_func_editor_set_mark(
|
|
960
|
-
): Short
|
|
961
|
-
fun uniffi_editor_core_checksum_func_editor_set_mark_at_selection_scalar(
|
|
962
|
-
): Short
|
|
963
|
-
fun uniffi_editor_core_checksum_func_editor_set_selection(
|
|
964
|
-
): Short
|
|
965
|
-
fun uniffi_editor_core_checksum_func_editor_set_selection_scalar(
|
|
966
|
-
): Short
|
|
967
|
-
fun uniffi_editor_core_checksum_func_editor_split_block(
|
|
968
|
-
): Short
|
|
969
|
-
fun uniffi_editor_core_checksum_func_editor_split_block_scalar(
|
|
970
|
-
): Short
|
|
971
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote(
|
|
972
|
-
): Short
|
|
973
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_blockquote_at_selection_scalar(
|
|
974
|
-
): Short
|
|
975
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_heading(
|
|
976
|
-
): Short
|
|
977
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_heading_at_selection_scalar(
|
|
978
|
-
): Short
|
|
979
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_mark(
|
|
980
|
-
): Short
|
|
981
|
-
fun uniffi_editor_core_checksum_func_editor_toggle_mark_at_selection_scalar(
|
|
982
|
-
): Short
|
|
983
|
-
fun uniffi_editor_core_checksum_func_editor_undo(
|
|
984
|
-
): Short
|
|
985
|
-
fun uniffi_editor_core_checksum_func_editor_unset_mark(
|
|
986
|
-
): Short
|
|
987
|
-
fun uniffi_editor_core_checksum_func_editor_unset_mark_at_selection_scalar(
|
|
988
|
-
): Short
|
|
989
|
-
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list(
|
|
990
|
-
): Short
|
|
991
|
-
fun uniffi_editor_core_checksum_func_editor_unwrap_from_list_at_selection_scalar(
|
|
992
|
-
): Short
|
|
993
|
-
fun uniffi_editor_core_checksum_func_editor_wrap_in_list(
|
|
994
|
-
): Short
|
|
995
|
-
fun uniffi_editor_core_checksum_func_editor_wrap_in_list_at_selection_scalar(
|
|
996
|
-
): Short
|
|
997
|
-
fun ffi_editor_core_uniffi_contract_version(
|
|
998
|
-
): Int
|
|
999
|
-
|
|
1568
|
+
private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {
|
|
1569
|
+
// Get the bindings contract version from our ComponentInterface
|
|
1570
|
+
val bindings_contract_version = 29
|
|
1571
|
+
// Get the scaffolding contract version by calling the into the dylib
|
|
1572
|
+
val scaffolding_contract_version = lib.ffi_editor_core_uniffi_contract_version()
|
|
1573
|
+
if (bindings_contract_version != scaffolding_contract_version) {
|
|
1574
|
+
throw RuntimeException("UniFFI contract version mismatch: try cleaning and rebuilding your project")
|
|
1575
|
+
}
|
|
1000
1576
|
}
|
|
1001
1577
|
|
|
1002
|
-
// A JNA Library to expose the extern-C FFI definitions.
|
|
1003
|
-
// This is an implementation detail which will be called internally by the public API.
|
|
1004
|
-
internal interface UniffiLib : Library {
|
|
1005
|
-
companion object {
|
|
1006
|
-
internal val INSTANCE: UniffiLib by lazy {
|
|
1007
|
-
val componentName = "editor_core"
|
|
1008
|
-
// For large crates we prevent `MethodTooLargeException` (see #2340)
|
|
1009
|
-
// N.B. the name of the extension is very misleading, since it is
|
|
1010
|
-
// rather `InterfaceTooLargeException`, caused by too many methods
|
|
1011
|
-
// in the interface for large crates.
|
|
1012
|
-
//
|
|
1013
|
-
// By splitting the otherwise huge interface into two parts
|
|
1014
|
-
// * UniffiLib (this)
|
|
1015
|
-
// * IntegrityCheckingUniffiLib
|
|
1016
|
-
// And all checksum methods are put into `IntegrityCheckingUniffiLib`
|
|
1017
|
-
// we allow for ~2x as many methods in the UniffiLib interface.
|
|
1018
|
-
//
|
|
1019
|
-
// Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib`
|
|
1020
|
-
// so that we can (optionally!) call `uniffiCheckApiChecksums`...
|
|
1021
|
-
loadIndirect<IntegrityCheckingUniffiLib>(componentName)
|
|
1022
|
-
.also { lib: IntegrityCheckingUniffiLib ->
|
|
1023
|
-
uniffiCheckContractApiVersion(lib)
|
|
1024
|
-
uniffiCheckApiChecksums(lib)
|
|
1025
|
-
}
|
|
1026
|
-
// ... and then we load the library as `UniffiLib`
|
|
1027
|
-
// N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib`
|
|
1028
|
-
// => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...`
|
|
1029
|
-
// error. So we must call `loadIndirect` twice. For crates large enough
|
|
1030
|
-
// to trigger this issue, the performance impact is negligible, running on
|
|
1031
|
-
// a macOS M1 machine the `loadIndirect` call takes ~50ms.
|
|
1032
|
-
val lib = loadIndirect<UniffiLib>(componentName)
|
|
1033
|
-
// No need to check the contract version and checksums, since
|
|
1034
|
-
// we already did that with `IntegrityCheckingUniffiLib` above.
|
|
1035
|
-
// Loading of library with integrity check done.
|
|
1036
|
-
lib
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
// FFI functions
|
|
1042
|
-
fun uniffi_editor_core_fn_func_collaboration_session_apply_encoded_state(`id`: Long,`encodedStateJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1043
|
-
): RustBuffer.ByValue
|
|
1044
|
-
fun uniffi_editor_core_fn_func_collaboration_session_apply_local_document_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1045
|
-
): RustBuffer.ByValue
|
|
1046
|
-
fun uniffi_editor_core_fn_func_collaboration_session_clear_local_awareness(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1047
|
-
): RustBuffer.ByValue
|
|
1048
|
-
fun uniffi_editor_core_fn_func_collaboration_session_create(`configJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1049
|
-
): Long
|
|
1050
|
-
fun uniffi_editor_core_fn_func_collaboration_session_destroy(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1051
|
-
): Unit
|
|
1052
|
-
fun uniffi_editor_core_fn_func_collaboration_session_get_document_json(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1053
|
-
): RustBuffer.ByValue
|
|
1054
|
-
fun uniffi_editor_core_fn_func_collaboration_session_get_encoded_state(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1055
|
-
): RustBuffer.ByValue
|
|
1056
|
-
fun uniffi_editor_core_fn_func_collaboration_session_get_peers_json(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1057
|
-
): RustBuffer.ByValue
|
|
1058
|
-
fun uniffi_editor_core_fn_func_collaboration_session_handle_message(`id`: Long,`messageJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1059
|
-
): RustBuffer.ByValue
|
|
1060
|
-
fun uniffi_editor_core_fn_func_collaboration_session_replace_encoded_state(`id`: Long,`encodedStateJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1061
|
-
): RustBuffer.ByValue
|
|
1062
|
-
fun uniffi_editor_core_fn_func_collaboration_session_set_local_awareness(`id`: Long,`awarenessJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1063
|
-
): RustBuffer.ByValue
|
|
1064
|
-
fun uniffi_editor_core_fn_func_collaboration_session_start(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1065
|
-
): RustBuffer.ByValue
|
|
1066
|
-
fun uniffi_editor_core_fn_func_editor_can_redo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1067
|
-
): Byte
|
|
1068
|
-
fun uniffi_editor_core_fn_func_editor_can_undo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1069
|
-
): Byte
|
|
1070
|
-
fun uniffi_editor_core_fn_func_editor_core_version(uniffi_out_err: UniffiRustCallStatus,
|
|
1071
|
-
): RustBuffer.ByValue
|
|
1072
|
-
fun uniffi_editor_core_fn_func_editor_create(`configJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1073
|
-
): Long
|
|
1074
|
-
fun uniffi_editor_core_fn_func_editor_delete_and_split_scalar(`id`: Long,`scalarFrom`: Int,`scalarTo`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1075
|
-
): RustBuffer.ByValue
|
|
1076
|
-
fun uniffi_editor_core_fn_func_editor_delete_backward_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1077
|
-
): RustBuffer.ByValue
|
|
1078
|
-
fun uniffi_editor_core_fn_func_editor_delete_range(`id`: Long,`from`: Int,`to`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1079
|
-
): RustBuffer.ByValue
|
|
1080
|
-
fun uniffi_editor_core_fn_func_editor_delete_scalar_range(`id`: Long,`scalarFrom`: Int,`scalarTo`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1081
|
-
): RustBuffer.ByValue
|
|
1082
|
-
fun uniffi_editor_core_fn_func_editor_destroy(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1083
|
-
): Unit
|
|
1084
|
-
fun uniffi_editor_core_fn_func_editor_doc_to_scalar(`id`: Long,`docPos`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1085
|
-
): Int
|
|
1086
|
-
fun uniffi_editor_core_fn_func_editor_get_content_snapshot(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1087
|
-
): RustBuffer.ByValue
|
|
1088
|
-
fun uniffi_editor_core_fn_func_editor_get_current_state(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1089
|
-
): RustBuffer.ByValue
|
|
1090
|
-
fun uniffi_editor_core_fn_func_editor_get_html(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1091
|
-
): RustBuffer.ByValue
|
|
1092
|
-
fun uniffi_editor_core_fn_func_editor_get_json(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1093
|
-
): RustBuffer.ByValue
|
|
1094
|
-
fun uniffi_editor_core_fn_func_editor_get_selection(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1095
|
-
): RustBuffer.ByValue
|
|
1096
|
-
fun uniffi_editor_core_fn_func_editor_get_selection_state(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1097
|
-
): RustBuffer.ByValue
|
|
1098
|
-
fun uniffi_editor_core_fn_func_editor_indent_list_item(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1099
|
-
): RustBuffer.ByValue
|
|
1100
|
-
fun uniffi_editor_core_fn_func_editor_indent_list_item_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1101
|
-
): RustBuffer.ByValue
|
|
1102
|
-
fun uniffi_editor_core_fn_func_editor_insert_content_html(`id`: Long,`html`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1103
|
-
): RustBuffer.ByValue
|
|
1104
|
-
fun uniffi_editor_core_fn_func_editor_insert_content_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1105
|
-
): RustBuffer.ByValue
|
|
1106
|
-
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,
|
|
1107
|
-
): RustBuffer.ByValue
|
|
1108
|
-
fun uniffi_editor_core_fn_func_editor_insert_node(`id`: Long,`nodeType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1109
|
-
): RustBuffer.ByValue
|
|
1110
|
-
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,
|
|
1111
|
-
): RustBuffer.ByValue
|
|
1112
|
-
fun uniffi_editor_core_fn_func_editor_insert_text(`id`: Long,`pos`: Int,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1113
|
-
): RustBuffer.ByValue
|
|
1114
|
-
fun uniffi_editor_core_fn_func_editor_insert_text_scalar(`id`: Long,`scalarPos`: Int,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1115
|
-
): RustBuffer.ByValue
|
|
1116
|
-
fun uniffi_editor_core_fn_func_editor_outdent_list_item(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1117
|
-
): RustBuffer.ByValue
|
|
1118
|
-
fun uniffi_editor_core_fn_func_editor_outdent_list_item_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1119
|
-
): RustBuffer.ByValue
|
|
1120
|
-
fun uniffi_editor_core_fn_func_editor_redo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1121
|
-
): RustBuffer.ByValue
|
|
1122
|
-
fun uniffi_editor_core_fn_func_editor_replace_html(`id`: Long,`html`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1123
|
-
): RustBuffer.ByValue
|
|
1124
|
-
fun uniffi_editor_core_fn_func_editor_replace_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1125
|
-
): RustBuffer.ByValue
|
|
1126
|
-
fun uniffi_editor_core_fn_func_editor_replace_selection_text(`id`: Long,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1127
|
-
): RustBuffer.ByValue
|
|
1128
|
-
fun uniffi_editor_core_fn_func_editor_replace_text_scalar(`id`: Long,`scalarFrom`: Int,`scalarTo`: Int,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1129
|
-
): RustBuffer.ByValue
|
|
1130
|
-
fun uniffi_editor_core_fn_func_editor_resize_image_at_doc_pos(`id`: Long,`docPos`: Int,`width`: Int,`height`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1131
|
-
): RustBuffer.ByValue
|
|
1132
|
-
fun uniffi_editor_core_fn_func_editor_scalar_to_doc(`id`: Long,`scalar`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1133
|
-
): Int
|
|
1134
|
-
fun uniffi_editor_core_fn_func_editor_set_html(`id`: Long,`html`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1135
|
-
): RustBuffer.ByValue
|
|
1136
|
-
fun uniffi_editor_core_fn_func_editor_set_json(`id`: Long,`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1137
|
-
): RustBuffer.ByValue
|
|
1138
|
-
fun uniffi_editor_core_fn_func_editor_set_mark(`id`: Long,`markName`: RustBuffer.ByValue,`attrsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1139
|
-
): RustBuffer.ByValue
|
|
1140
|
-
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,
|
|
1141
|
-
): RustBuffer.ByValue
|
|
1142
|
-
fun uniffi_editor_core_fn_func_editor_set_selection(`id`: Long,`anchor`: Int,`head`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1143
|
-
): Unit
|
|
1144
|
-
fun uniffi_editor_core_fn_func_editor_set_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1145
|
-
): Unit
|
|
1146
|
-
fun uniffi_editor_core_fn_func_editor_split_block(`id`: Long,`pos`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1147
|
-
): RustBuffer.ByValue
|
|
1148
|
-
fun uniffi_editor_core_fn_func_editor_split_block_scalar(`id`: Long,`scalarPos`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1149
|
-
): RustBuffer.ByValue
|
|
1150
|
-
fun uniffi_editor_core_fn_func_editor_toggle_blockquote(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1151
|
-
): RustBuffer.ByValue
|
|
1152
|
-
fun uniffi_editor_core_fn_func_editor_toggle_blockquote_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1153
|
-
): RustBuffer.ByValue
|
|
1154
|
-
fun uniffi_editor_core_fn_func_editor_toggle_heading(`id`: Long,`level`: Byte,uniffi_out_err: UniffiRustCallStatus,
|
|
1155
|
-
): RustBuffer.ByValue
|
|
1156
|
-
fun uniffi_editor_core_fn_func_editor_toggle_heading_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,`level`: Byte,uniffi_out_err: UniffiRustCallStatus,
|
|
1157
|
-
): RustBuffer.ByValue
|
|
1158
|
-
fun uniffi_editor_core_fn_func_editor_toggle_mark(`id`: Long,`markName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1159
|
-
): RustBuffer.ByValue
|
|
1160
|
-
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,
|
|
1161
|
-
): RustBuffer.ByValue
|
|
1162
|
-
fun uniffi_editor_core_fn_func_editor_undo(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1163
|
-
): RustBuffer.ByValue
|
|
1164
|
-
fun uniffi_editor_core_fn_func_editor_unset_mark(`id`: Long,`markName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1165
|
-
): RustBuffer.ByValue
|
|
1166
|
-
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,
|
|
1167
|
-
): RustBuffer.ByValue
|
|
1168
|
-
fun uniffi_editor_core_fn_func_editor_unwrap_from_list(`id`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1169
|
-
): RustBuffer.ByValue
|
|
1170
|
-
fun uniffi_editor_core_fn_func_editor_unwrap_from_list_at_selection_scalar(`id`: Long,`scalarAnchor`: Int,`scalarHead`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
1171
|
-
): RustBuffer.ByValue
|
|
1172
|
-
fun uniffi_editor_core_fn_func_editor_wrap_in_list(`id`: Long,`listType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1173
|
-
): RustBuffer.ByValue
|
|
1174
|
-
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,
|
|
1175
|
-
): RustBuffer.ByValue
|
|
1176
|
-
fun ffi_editor_core_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1177
|
-
): RustBuffer.ByValue
|
|
1178
|
-
fun ffi_editor_core_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1179
|
-
): RustBuffer.ByValue
|
|
1180
|
-
fun ffi_editor_core_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
1181
|
-
): Unit
|
|
1182
|
-
fun ffi_editor_core_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1183
|
-
): RustBuffer.ByValue
|
|
1184
|
-
fun ffi_editor_core_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1185
|
-
): Unit
|
|
1186
|
-
fun ffi_editor_core_rust_future_cancel_u8(`handle`: Long,
|
|
1187
|
-
): Unit
|
|
1188
|
-
fun ffi_editor_core_rust_future_free_u8(`handle`: Long,
|
|
1189
|
-
): Unit
|
|
1190
|
-
fun ffi_editor_core_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1191
|
-
): Byte
|
|
1192
|
-
fun ffi_editor_core_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1193
|
-
): Unit
|
|
1194
|
-
fun ffi_editor_core_rust_future_cancel_i8(`handle`: Long,
|
|
1195
|
-
): Unit
|
|
1196
|
-
fun ffi_editor_core_rust_future_free_i8(`handle`: Long,
|
|
1197
|
-
): Unit
|
|
1198
|
-
fun ffi_editor_core_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1199
|
-
): Byte
|
|
1200
|
-
fun ffi_editor_core_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1201
|
-
): Unit
|
|
1202
|
-
fun ffi_editor_core_rust_future_cancel_u16(`handle`: Long,
|
|
1203
|
-
): Unit
|
|
1204
|
-
fun ffi_editor_core_rust_future_free_u16(`handle`: Long,
|
|
1205
|
-
): Unit
|
|
1206
|
-
fun ffi_editor_core_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1207
|
-
): Short
|
|
1208
|
-
fun ffi_editor_core_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1209
|
-
): Unit
|
|
1210
|
-
fun ffi_editor_core_rust_future_cancel_i16(`handle`: Long,
|
|
1211
|
-
): Unit
|
|
1212
|
-
fun ffi_editor_core_rust_future_free_i16(`handle`: Long,
|
|
1213
|
-
): Unit
|
|
1214
|
-
fun ffi_editor_core_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1215
|
-
): Short
|
|
1216
|
-
fun ffi_editor_core_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1217
|
-
): Unit
|
|
1218
|
-
fun ffi_editor_core_rust_future_cancel_u32(`handle`: Long,
|
|
1219
|
-
): Unit
|
|
1220
|
-
fun ffi_editor_core_rust_future_free_u32(`handle`: Long,
|
|
1221
|
-
): Unit
|
|
1222
|
-
fun ffi_editor_core_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1223
|
-
): Int
|
|
1224
|
-
fun ffi_editor_core_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1225
|
-
): Unit
|
|
1226
|
-
fun ffi_editor_core_rust_future_cancel_i32(`handle`: Long,
|
|
1227
|
-
): Unit
|
|
1228
|
-
fun ffi_editor_core_rust_future_free_i32(`handle`: Long,
|
|
1229
|
-
): Unit
|
|
1230
|
-
fun ffi_editor_core_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1231
|
-
): Int
|
|
1232
|
-
fun ffi_editor_core_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1233
|
-
): Unit
|
|
1234
|
-
fun ffi_editor_core_rust_future_cancel_u64(`handle`: Long,
|
|
1235
|
-
): Unit
|
|
1236
|
-
fun ffi_editor_core_rust_future_free_u64(`handle`: Long,
|
|
1237
|
-
): Unit
|
|
1238
|
-
fun ffi_editor_core_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1239
|
-
): Long
|
|
1240
|
-
fun ffi_editor_core_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1241
|
-
): Unit
|
|
1242
|
-
fun ffi_editor_core_rust_future_cancel_i64(`handle`: Long,
|
|
1243
|
-
): Unit
|
|
1244
|
-
fun ffi_editor_core_rust_future_free_i64(`handle`: Long,
|
|
1245
|
-
): Unit
|
|
1246
|
-
fun ffi_editor_core_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1247
|
-
): Long
|
|
1248
|
-
fun ffi_editor_core_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1249
|
-
): Unit
|
|
1250
|
-
fun ffi_editor_core_rust_future_cancel_f32(`handle`: Long,
|
|
1251
|
-
): Unit
|
|
1252
|
-
fun ffi_editor_core_rust_future_free_f32(`handle`: Long,
|
|
1253
|
-
): Unit
|
|
1254
|
-
fun ffi_editor_core_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1255
|
-
): Float
|
|
1256
|
-
fun ffi_editor_core_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1257
|
-
): Unit
|
|
1258
|
-
fun ffi_editor_core_rust_future_cancel_f64(`handle`: Long,
|
|
1259
|
-
): Unit
|
|
1260
|
-
fun ffi_editor_core_rust_future_free_f64(`handle`: Long,
|
|
1261
|
-
): Unit
|
|
1262
|
-
fun ffi_editor_core_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1263
|
-
): Double
|
|
1264
|
-
fun ffi_editor_core_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1265
|
-
): Unit
|
|
1266
|
-
fun ffi_editor_core_rust_future_cancel_pointer(`handle`: Long,
|
|
1267
|
-
): Unit
|
|
1268
|
-
fun ffi_editor_core_rust_future_free_pointer(`handle`: Long,
|
|
1269
|
-
): Unit
|
|
1270
|
-
fun ffi_editor_core_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1271
|
-
): Pointer
|
|
1272
|
-
fun ffi_editor_core_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1273
|
-
): Unit
|
|
1274
|
-
fun ffi_editor_core_rust_future_cancel_rust_buffer(`handle`: Long,
|
|
1275
|
-
): Unit
|
|
1276
|
-
fun ffi_editor_core_rust_future_free_rust_buffer(`handle`: Long,
|
|
1277
|
-
): Unit
|
|
1278
|
-
fun ffi_editor_core_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1279
|
-
): RustBuffer.ByValue
|
|
1280
|
-
fun ffi_editor_core_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long,
|
|
1281
|
-
): Unit
|
|
1282
|
-
fun ffi_editor_core_rust_future_cancel_void(`handle`: Long,
|
|
1283
|
-
): Unit
|
|
1284
|
-
fun ffi_editor_core_rust_future_free_void(`handle`: Long,
|
|
1285
|
-
): Unit
|
|
1286
|
-
fun ffi_editor_core_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1287
|
-
): Unit
|
|
1288
|
-
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {
|
|
1292
|
-
// Get the bindings contract version from our ComponentInterface
|
|
1293
|
-
val bindings_contract_version = 29
|
|
1294
|
-
// Get the scaffolding contract version by calling the into the dylib
|
|
1295
|
-
val scaffolding_contract_version = lib.ffi_editor_core_uniffi_contract_version()
|
|
1296
|
-
if (bindings_contract_version != scaffolding_contract_version) {
|
|
1297
|
-
throw RuntimeException("UniFFI contract version mismatch: try cleaning and rebuilding your project")
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
1578
|
@Suppress("UNUSED_PARAMETER")
|
|
1301
1579
|
private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
1302
1580
|
if (lib.uniffi_editor_core_checksum_func_collaboration_session_apply_encoded_state() != 4684.toShort()) {
|
|
@@ -1513,7 +1791,6 @@ public fun uniffiEnsureInitialized() {
|
|
|
1513
1791
|
|
|
1514
1792
|
// Public interface members begin here.
|
|
1515
1793
|
|
|
1516
|
-
|
|
1517
1794
|
// Interface implemented by anything that can contain an object reference.
|
|
1518
1795
|
//
|
|
1519
1796
|
// Such types expose a `destroy()` method that must be called to cleanly
|
|
@@ -1524,11 +1801,15 @@ public fun uniffiEnsureInitialized() {
|
|
|
1524
1801
|
// helper method to execute a block and destroy the object at the end.
|
|
1525
1802
|
interface Disposable {
|
|
1526
1803
|
fun destroy()
|
|
1804
|
+
|
|
1527
1805
|
companion object {
|
|
1528
1806
|
fun destroy(vararg args: Any?) {
|
|
1529
1807
|
for (arg in args) {
|
|
1530
1808
|
when (arg) {
|
|
1531
|
-
is Disposable ->
|
|
1809
|
+
is Disposable -> {
|
|
1810
|
+
arg.destroy()
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1532
1813
|
is ArrayList<*> -> {
|
|
1533
1814
|
for (idx in arg.indices) {
|
|
1534
1815
|
val element = arg[idx]
|
|
@@ -1537,6 +1818,7 @@ interface Disposable {
|
|
|
1537
1818
|
}
|
|
1538
1819
|
}
|
|
1539
1820
|
}
|
|
1821
|
+
|
|
1540
1822
|
is Map<*, *> -> {
|
|
1541
1823
|
for (element in arg.values) {
|
|
1542
1824
|
if (element is Disposable) {
|
|
@@ -1544,6 +1826,7 @@ interface Disposable {
|
|
|
1544
1826
|
}
|
|
1545
1827
|
}
|
|
1546
1828
|
}
|
|
1829
|
+
|
|
1547
1830
|
is Iterable<*> -> {
|
|
1548
1831
|
for (element in arg) {
|
|
1549
1832
|
if (element is Disposable) {
|
|
@@ -1572,7 +1855,7 @@ inline fun <T : Disposable?, R> T.use(block: (T) -> R) =
|
|
|
1572
1855
|
}
|
|
1573
1856
|
}
|
|
1574
1857
|
|
|
1575
|
-
/**
|
|
1858
|
+
/**
|
|
1576
1859
|
* Used to instantiate an interface without an actual pointer, for fakes in tests, mostly.
|
|
1577
1860
|
*
|
|
1578
1861
|
* @suppress
|
|
@@ -1582,22 +1865,19 @@ object NoPointer
|
|
|
1582
1865
|
/**
|
|
1583
1866
|
* @suppress
|
|
1584
1867
|
*/
|
|
1585
|
-
public object FfiConverterUByte: FfiConverter<UByte, Byte> {
|
|
1586
|
-
override fun lift(value: Byte): UByte
|
|
1587
|
-
return value.toUByte()
|
|
1588
|
-
}
|
|
1868
|
+
public object FfiConverterUByte : FfiConverter<UByte, Byte> {
|
|
1869
|
+
override fun lift(value: Byte): UByte = value.toUByte()
|
|
1589
1870
|
|
|
1590
|
-
override fun read(buf: ByteBuffer): UByte
|
|
1591
|
-
return lift(buf.get())
|
|
1592
|
-
}
|
|
1871
|
+
override fun read(buf: ByteBuffer): UByte = lift(buf.get())
|
|
1593
1872
|
|
|
1594
|
-
override fun lower(value: UByte): Byte
|
|
1595
|
-
return value.toByte()
|
|
1596
|
-
}
|
|
1873
|
+
override fun lower(value: UByte): Byte = value.toByte()
|
|
1597
1874
|
|
|
1598
1875
|
override fun allocationSize(value: UByte) = 1UL
|
|
1599
1876
|
|
|
1600
|
-
override fun write(
|
|
1877
|
+
override fun write(
|
|
1878
|
+
value: UByte,
|
|
1879
|
+
buf: ByteBuffer,
|
|
1880
|
+
) {
|
|
1601
1881
|
buf.put(value.toByte())
|
|
1602
1882
|
}
|
|
1603
1883
|
}
|
|
@@ -1605,22 +1885,19 @@ public object FfiConverterUByte: FfiConverter<UByte, Byte> {
|
|
|
1605
1885
|
/**
|
|
1606
1886
|
* @suppress
|
|
1607
1887
|
*/
|
|
1608
|
-
public object FfiConverterUInt: FfiConverter<UInt, Int> {
|
|
1609
|
-
override fun lift(value: Int): UInt
|
|
1610
|
-
return value.toUInt()
|
|
1611
|
-
}
|
|
1888
|
+
public object FfiConverterUInt : FfiConverter<UInt, Int> {
|
|
1889
|
+
override fun lift(value: Int): UInt = value.toUInt()
|
|
1612
1890
|
|
|
1613
|
-
override fun read(buf: ByteBuffer): UInt
|
|
1614
|
-
return lift(buf.getInt())
|
|
1615
|
-
}
|
|
1891
|
+
override fun read(buf: ByteBuffer): UInt = lift(buf.getInt())
|
|
1616
1892
|
|
|
1617
|
-
override fun lower(value: UInt): Int
|
|
1618
|
-
return value.toInt()
|
|
1619
|
-
}
|
|
1893
|
+
override fun lower(value: UInt): Int = value.toInt()
|
|
1620
1894
|
|
|
1621
1895
|
override fun allocationSize(value: UInt) = 4UL
|
|
1622
1896
|
|
|
1623
|
-
override fun write(
|
|
1897
|
+
override fun write(
|
|
1898
|
+
value: UInt,
|
|
1899
|
+
buf: ByteBuffer,
|
|
1900
|
+
) {
|
|
1624
1901
|
buf.putInt(value.toInt())
|
|
1625
1902
|
}
|
|
1626
1903
|
}
|
|
@@ -1628,22 +1905,19 @@ public object FfiConverterUInt: FfiConverter<UInt, Int> {
|
|
|
1628
1905
|
/**
|
|
1629
1906
|
* @suppress
|
|
1630
1907
|
*/
|
|
1631
|
-
public object FfiConverterULong: FfiConverter<ULong, Long> {
|
|
1632
|
-
override fun lift(value: Long): ULong
|
|
1633
|
-
return value.toULong()
|
|
1634
|
-
}
|
|
1908
|
+
public object FfiConverterULong : FfiConverter<ULong, Long> {
|
|
1909
|
+
override fun lift(value: Long): ULong = value.toULong()
|
|
1635
1910
|
|
|
1636
|
-
override fun read(buf: ByteBuffer): ULong
|
|
1637
|
-
return lift(buf.getLong())
|
|
1638
|
-
}
|
|
1911
|
+
override fun read(buf: ByteBuffer): ULong = lift(buf.getLong())
|
|
1639
1912
|
|
|
1640
|
-
override fun lower(value: ULong): Long
|
|
1641
|
-
return value.toLong()
|
|
1642
|
-
}
|
|
1913
|
+
override fun lower(value: ULong): Long = value.toLong()
|
|
1643
1914
|
|
|
1644
1915
|
override fun allocationSize(value: ULong) = 8UL
|
|
1645
1916
|
|
|
1646
|
-
override fun write(
|
|
1917
|
+
override fun write(
|
|
1918
|
+
value: ULong,
|
|
1919
|
+
buf: ByteBuffer,
|
|
1920
|
+
) {
|
|
1647
1921
|
buf.putLong(value.toLong())
|
|
1648
1922
|
}
|
|
1649
1923
|
}
|
|
@@ -1651,22 +1925,19 @@ public object FfiConverterULong: FfiConverter<ULong, Long> {
|
|
|
1651
1925
|
/**
|
|
1652
1926
|
* @suppress
|
|
1653
1927
|
*/
|
|
1654
|
-
public object FfiConverterBoolean: FfiConverter<Boolean, Byte> {
|
|
1655
|
-
override fun lift(value: Byte): Boolean
|
|
1656
|
-
return value.toInt() != 0
|
|
1657
|
-
}
|
|
1928
|
+
public object FfiConverterBoolean : FfiConverter<Boolean, Byte> {
|
|
1929
|
+
override fun lift(value: Byte): Boolean = value.toInt() != 0
|
|
1658
1930
|
|
|
1659
|
-
override fun read(buf: ByteBuffer): Boolean
|
|
1660
|
-
return lift(buf.get())
|
|
1661
|
-
}
|
|
1931
|
+
override fun read(buf: ByteBuffer): Boolean = lift(buf.get())
|
|
1662
1932
|
|
|
1663
|
-
override fun lower(value: Boolean): Byte
|
|
1664
|
-
return if (value) 1.toByte() else 0.toByte()
|
|
1665
|
-
}
|
|
1933
|
+
override fun lower(value: Boolean): Byte = if (value) 1.toByte() else 0.toByte()
|
|
1666
1934
|
|
|
1667
1935
|
override fun allocationSize(value: Boolean) = 1UL
|
|
1668
1936
|
|
|
1669
|
-
override fun write(
|
|
1937
|
+
override fun write(
|
|
1938
|
+
value: Boolean,
|
|
1939
|
+
buf: ByteBuffer,
|
|
1940
|
+
) {
|
|
1670
1941
|
buf.put(lower(value))
|
|
1671
1942
|
}
|
|
1672
1943
|
}
|
|
@@ -1674,7 +1945,7 @@ public object FfiConverterBoolean: FfiConverter<Boolean, Byte> {
|
|
|
1674
1945
|
/**
|
|
1675
1946
|
* @suppress
|
|
1676
1947
|
*/
|
|
1677
|
-
public object FfiConverterString: FfiConverter<String, RustBuffer.ByValue> {
|
|
1948
|
+
public object FfiConverterString : FfiConverter<String, RustBuffer.ByValue> {
|
|
1678
1949
|
// Note: we don't inherit from FfiConverterRustBuffer, because we use a
|
|
1679
1950
|
// special encoding when lowering/lifting. We can use `RustBuffer.len` to
|
|
1680
1951
|
// store our length and avoid writing it out to the buffer.
|
|
@@ -1721,822 +1992,1052 @@ public object FfiConverterString: FfiConverter<String, RustBuffer.ByValue> {
|
|
|
1721
1992
|
return sizeForLength + sizeForString
|
|
1722
1993
|
}
|
|
1723
1994
|
|
|
1724
|
-
override fun write(
|
|
1995
|
+
override fun write(
|
|
1996
|
+
value: String,
|
|
1997
|
+
buf: ByteBuffer,
|
|
1998
|
+
) {
|
|
1725
1999
|
val byteBuf = toUtf8(value)
|
|
1726
2000
|
buf.putInt(byteBuf.limit())
|
|
1727
2001
|
buf.put(byteBuf)
|
|
1728
2002
|
}
|
|
1729
2003
|
}
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* Apply a durable Yjs encoded state/update represented as a JSON byte array.
|
|
2007
|
+
*/
|
|
2008
|
+
fun `collaborationSessionApplyEncodedState`(
|
|
2009
|
+
`id`: kotlin.ULong,
|
|
2010
|
+
`encodedStateJson`: kotlin.String,
|
|
2011
|
+
): kotlin.String =
|
|
2012
|
+
FfiConverterString.lift(
|
|
2013
|
+
uniffiRustCall { _status ->
|
|
2014
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_apply_encoded_state(
|
|
2015
|
+
FfiConverterULong.lower(`id`),
|
|
2016
|
+
FfiConverterString.lower(`encodedStateJson`),
|
|
2017
|
+
_status,
|
|
2018
|
+
)
|
|
2019
|
+
},
|
|
1738
2020
|
)
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
2021
|
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
2022
|
+
/**
|
|
2023
|
+
* Apply a local ProseMirror JSON snapshot to the collaboration session.
|
|
2024
|
+
*/
|
|
2025
|
+
fun `collaborationSessionApplyLocalDocumentJson`(
|
|
2026
|
+
`id`: kotlin.ULong,
|
|
2027
|
+
`json`: kotlin.String,
|
|
2028
|
+
): kotlin.String =
|
|
2029
|
+
FfiConverterString.lift(
|
|
2030
|
+
uniffiRustCall { _status ->
|
|
2031
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_apply_local_document_json(
|
|
2032
|
+
FfiConverterULong.lower(`id`),
|
|
2033
|
+
FfiConverterString.lower(`json`),
|
|
2034
|
+
_status,
|
|
2035
|
+
)
|
|
2036
|
+
},
|
|
1750
2037
|
)
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
2038
|
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
2039
|
+
/**
|
|
2040
|
+
* Clear the local awareness payload for a collaboration session.
|
|
2041
|
+
*/
|
|
2042
|
+
fun `collaborationSessionClearLocalAwareness`(`id`: kotlin.ULong): kotlin.String =
|
|
2043
|
+
FfiConverterString.lift(
|
|
2044
|
+
uniffiRustCall { _status ->
|
|
2045
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_clear_local_awareness(
|
|
2046
|
+
FfiConverterULong.lower(`id`),
|
|
2047
|
+
_status,
|
|
2048
|
+
)
|
|
2049
|
+
},
|
|
1762
2050
|
)
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
2051
|
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
}
|
|
2052
|
+
/**
|
|
2053
|
+
* Create a Yjs collaboration session backed by yrs.
|
|
2054
|
+
*/
|
|
2055
|
+
fun `collaborationSessionCreate`(`configJson`: kotlin.String): kotlin.ULong =
|
|
2056
|
+
FfiConverterULong.lift(
|
|
2057
|
+
uniffiRustCall { _status ->
|
|
2058
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_create(FfiConverterString.lower(`configJson`), _status)
|
|
2059
|
+
},
|
|
1774
2060
|
)
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* Destroy a collaboration session and free its resources.
|
|
2064
|
+
*/
|
|
2065
|
+
fun `collaborationSessionDestroy`(`id`: kotlin.ULong) =
|
|
2066
|
+
uniffiRustCall { _status ->
|
|
2067
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_destroy(FfiConverterULong.lower(`id`), _status)
|
|
1775
2068
|
}
|
|
1776
|
-
|
|
1777
2069
|
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
/**
|
|
1790
|
-
* Return the current shared ProseMirror JSON document for a collaboration session.
|
|
1791
|
-
*/ fun `collaborationSessionGetDocumentJson`(`id`: kotlin.ULong): kotlin.String {
|
|
1792
|
-
return FfiConverterString.lift(
|
|
1793
|
-
uniffiRustCall() { _status ->
|
|
1794
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_document_json(
|
|
1795
|
-
FfiConverterULong.lower(`id`),_status)
|
|
1796
|
-
}
|
|
2070
|
+
/**
|
|
2071
|
+
* Return the current shared ProseMirror JSON document for a collaboration session.
|
|
2072
|
+
*/
|
|
2073
|
+
fun `collaborationSessionGetDocumentJson`(`id`: kotlin.ULong): kotlin.String =
|
|
2074
|
+
FfiConverterString.lift(
|
|
2075
|
+
uniffiRustCall { _status ->
|
|
2076
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_document_json(FfiConverterULong.lower(`id`), _status)
|
|
2077
|
+
},
|
|
1797
2078
|
)
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
2079
|
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
}
|
|
2080
|
+
/**
|
|
2081
|
+
* Return the current shared Yjs document state as a JSON byte array.
|
|
2082
|
+
*/
|
|
2083
|
+
fun `collaborationSessionGetEncodedState`(`id`: kotlin.ULong): kotlin.String =
|
|
2084
|
+
FfiConverterString.lift(
|
|
2085
|
+
uniffiRustCall { _status ->
|
|
2086
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_encoded_state(FfiConverterULong.lower(`id`), _status)
|
|
2087
|
+
},
|
|
1809
2088
|
)
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
2089
|
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Return the current awareness peers for a collaboration session.
|
|
2092
|
+
*/
|
|
2093
|
+
fun `collaborationSessionGetPeersJson`(`id`: kotlin.ULong): kotlin.String =
|
|
2094
|
+
FfiConverterString.lift(
|
|
2095
|
+
uniffiRustCall { _status ->
|
|
2096
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_get_peers_json(FfiConverterULong.lower(`id`), _status)
|
|
2097
|
+
},
|
|
1821
2098
|
)
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
2099
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
2100
|
+
/**
|
|
2101
|
+
* Apply an incoming y-sync binary message encoded as a JSON byte array.
|
|
2102
|
+
*/
|
|
2103
|
+
fun `collaborationSessionHandleMessage`(
|
|
2104
|
+
`id`: kotlin.ULong,
|
|
2105
|
+
`messageJson`: kotlin.String,
|
|
2106
|
+
): kotlin.String =
|
|
2107
|
+
FfiConverterString.lift(
|
|
2108
|
+
uniffiRustCall { _status ->
|
|
2109
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_handle_message(
|
|
2110
|
+
FfiConverterULong.lower(`id`),
|
|
2111
|
+
FfiConverterString.lower(`messageJson`),
|
|
2112
|
+
_status,
|
|
2113
|
+
)
|
|
2114
|
+
},
|
|
1833
2115
|
)
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
2116
|
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
2117
|
+
/**
|
|
2118
|
+
* Replace the collaboration document with a durable Yjs encoded state/update.
|
|
2119
|
+
*/
|
|
2120
|
+
fun `collaborationSessionReplaceEncodedState`(
|
|
2121
|
+
`id`: kotlin.ULong,
|
|
2122
|
+
`encodedStateJson`: kotlin.String,
|
|
2123
|
+
): kotlin.String =
|
|
2124
|
+
FfiConverterString.lift(
|
|
2125
|
+
uniffiRustCall { _status ->
|
|
2126
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_replace_encoded_state(
|
|
2127
|
+
FfiConverterULong.lower(`id`),
|
|
2128
|
+
FfiConverterString.lower(`encodedStateJson`),
|
|
2129
|
+
_status,
|
|
2130
|
+
)
|
|
2131
|
+
},
|
|
1845
2132
|
)
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
2133
|
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2134
|
+
/**
|
|
2135
|
+
* Update the local awareness payload for a collaboration session.
|
|
2136
|
+
*/
|
|
2137
|
+
fun `collaborationSessionSetLocalAwareness`(
|
|
2138
|
+
`id`: kotlin.ULong,
|
|
2139
|
+
`awarenessJson`: kotlin.String,
|
|
2140
|
+
): kotlin.String =
|
|
2141
|
+
FfiConverterString.lift(
|
|
2142
|
+
uniffiRustCall { _status ->
|
|
2143
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_set_local_awareness(
|
|
2144
|
+
FfiConverterULong.lower(`id`),
|
|
2145
|
+
FfiConverterString.lower(`awarenessJson`),
|
|
2146
|
+
_status,
|
|
2147
|
+
)
|
|
2148
|
+
},
|
|
1857
2149
|
)
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
2150
|
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
}
|
|
2151
|
+
/**
|
|
2152
|
+
* Start the sync handshake for a collaboration session.
|
|
2153
|
+
*/
|
|
2154
|
+
fun `collaborationSessionStart`(`id`: kotlin.ULong): kotlin.String =
|
|
2155
|
+
FfiConverterString.lift(
|
|
2156
|
+
uniffiRustCall { _status ->
|
|
2157
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_collaboration_session_start(FfiConverterULong.lower(`id`), _status)
|
|
2158
|
+
},
|
|
1869
2159
|
)
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
2160
|
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
}
|
|
2161
|
+
/**
|
|
2162
|
+
* Check if redo is available.
|
|
2163
|
+
*/
|
|
2164
|
+
fun `editorCanRedo`(`id`: kotlin.ULong): kotlin.Boolean =
|
|
2165
|
+
FfiConverterBoolean.lift(
|
|
2166
|
+
uniffiRustCall { _status ->
|
|
2167
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_can_redo(FfiConverterULong.lower(`id`), _status)
|
|
2168
|
+
},
|
|
1881
2169
|
)
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
2170
|
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
}
|
|
2171
|
+
/**
|
|
2172
|
+
* Check if undo is available.
|
|
2173
|
+
*/
|
|
2174
|
+
fun `editorCanUndo`(`id`: kotlin.ULong): kotlin.Boolean =
|
|
2175
|
+
FfiConverterBoolean.lift(
|
|
2176
|
+
uniffiRustCall { _status ->
|
|
2177
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_can_undo(FfiConverterULong.lower(`id`), _status)
|
|
2178
|
+
},
|
|
1893
2179
|
)
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
2180
|
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
}
|
|
2181
|
+
/**
|
|
2182
|
+
* Return the crate version string.
|
|
2183
|
+
*/
|
|
2184
|
+
fun `editorCoreVersion`(): kotlin.String =
|
|
2185
|
+
FfiConverterString.lift(
|
|
2186
|
+
uniffiRustCall { _status ->
|
|
2187
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_core_version(_status)
|
|
2188
|
+
},
|
|
1905
2189
|
)
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
FfiConverterString.lower(`configJson`),_status)
|
|
1926
|
-
}
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* Create a new editor from a JSON config object.
|
|
2193
|
+
*
|
|
2194
|
+
* Config fields (all optional):
|
|
2195
|
+
* - `"schema"`: custom schema definition (see `Schema::from_json`)
|
|
2196
|
+
* - `"maxLength"`: maximum document length in characters
|
|
2197
|
+
* - `"readOnly"`: if `true`, rejects non-API mutations
|
|
2198
|
+
* - `"inputFilter"`: regex pattern; only matching characters are inserted
|
|
2199
|
+
* - `"allowBase64Images"`: if `true`, parses `<img src="data:image/...">` as image nodes
|
|
2200
|
+
*
|
|
2201
|
+
* An empty object creates a default editor.
|
|
2202
|
+
* Falls back to the default Tiptap schema when `"schema"` is absent or invalid.
|
|
2203
|
+
*/
|
|
2204
|
+
fun `editorCreate`(`configJson`: kotlin.String): kotlin.ULong =
|
|
2205
|
+
FfiConverterULong.lift(
|
|
2206
|
+
uniffiRustCall { _status ->
|
|
2207
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_create(FfiConverterString.lower(`configJson`), _status)
|
|
2208
|
+
},
|
|
1927
2209
|
)
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
2210
|
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
2211
|
+
/**
|
|
2212
|
+
* Delete a scalar range then split the block (Enter with selection). Returns an update.
|
|
2213
|
+
*/
|
|
2214
|
+
fun `editorDeleteAndSplitScalar`(
|
|
2215
|
+
`id`: kotlin.ULong,
|
|
2216
|
+
`scalarFrom`: kotlin.UInt,
|
|
2217
|
+
`scalarTo`: kotlin.UInt,
|
|
2218
|
+
): kotlin.String =
|
|
2219
|
+
FfiConverterString.lift(
|
|
2220
|
+
uniffiRustCall { _status ->
|
|
2221
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_and_split_scalar(
|
|
2222
|
+
FfiConverterULong.lower(`id`),
|
|
2223
|
+
FfiConverterUInt.lower(`scalarFrom`),
|
|
2224
|
+
FfiConverterUInt.lower(`scalarTo`),
|
|
2225
|
+
_status,
|
|
2226
|
+
)
|
|
2227
|
+
},
|
|
1939
2228
|
)
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
2229
|
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
2230
|
+
/**
|
|
2231
|
+
* Delete backward relative to an explicit scalar selection. Returns an update JSON string.
|
|
2232
|
+
*/
|
|
2233
|
+
fun `editorDeleteBackwardAtSelectionScalar`(
|
|
2234
|
+
`id`: kotlin.ULong,
|
|
2235
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2236
|
+
`scalarHead`: kotlin.UInt,
|
|
2237
|
+
): kotlin.String =
|
|
2238
|
+
FfiConverterString.lift(
|
|
2239
|
+
uniffiRustCall { _status ->
|
|
2240
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_backward_at_selection_scalar(
|
|
2241
|
+
FfiConverterULong.lower(`id`),
|
|
2242
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2243
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2244
|
+
_status,
|
|
2245
|
+
)
|
|
2246
|
+
},
|
|
1951
2247
|
)
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
2248
|
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
2249
|
+
/**
|
|
2250
|
+
* Delete a range. Returns an update JSON string.
|
|
2251
|
+
*/
|
|
2252
|
+
fun `editorDeleteRange`(
|
|
2253
|
+
`id`: kotlin.ULong,
|
|
2254
|
+
`from`: kotlin.UInt,
|
|
2255
|
+
`to`: kotlin.UInt,
|
|
2256
|
+
): kotlin.String =
|
|
2257
|
+
FfiConverterString.lift(
|
|
2258
|
+
uniffiRustCall { _status ->
|
|
2259
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_range(
|
|
2260
|
+
FfiConverterULong.lower(`id`),
|
|
2261
|
+
FfiConverterUInt.lower(`from`),
|
|
2262
|
+
FfiConverterUInt.lower(`to`),
|
|
2263
|
+
_status,
|
|
2264
|
+
)
|
|
2265
|
+
},
|
|
1963
2266
|
)
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
2267
|
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2268
|
+
/**
|
|
2269
|
+
* Delete content between two scalar offsets. Returns an update JSON string.
|
|
2270
|
+
*/
|
|
2271
|
+
fun `editorDeleteScalarRange`(
|
|
2272
|
+
`id`: kotlin.ULong,
|
|
2273
|
+
`scalarFrom`: kotlin.UInt,
|
|
2274
|
+
`scalarTo`: kotlin.UInt,
|
|
2275
|
+
): kotlin.String =
|
|
2276
|
+
FfiConverterString.lift(
|
|
2277
|
+
uniffiRustCall { _status ->
|
|
2278
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_delete_scalar_range(
|
|
2279
|
+
FfiConverterULong.lower(`id`),
|
|
2280
|
+
FfiConverterUInt.lower(`scalarFrom`),
|
|
2281
|
+
FfiConverterUInt.lower(`scalarTo`),
|
|
2282
|
+
_status,
|
|
2283
|
+
)
|
|
2284
|
+
},
|
|
1975
2285
|
)
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* Destroy an editor instance, freeing its resources.
|
|
2289
|
+
*/
|
|
2290
|
+
fun `editorDestroy`(`id`: kotlin.ULong) =
|
|
2291
|
+
uniffiRustCall { _status ->
|
|
2292
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_destroy(FfiConverterULong.lower(`id`), _status)
|
|
1976
2293
|
}
|
|
1977
|
-
|
|
1978
2294
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
uniffiRustCall() { _status ->
|
|
1995
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_doc_to_scalar(
|
|
1996
|
-
FfiConverterULong.lower(`id`),FfiConverterUInt.lower(`docPos`),_status)
|
|
1997
|
-
}
|
|
2295
|
+
/**
|
|
2296
|
+
* Convert a document position to a rendered-text scalar offset.
|
|
2297
|
+
*/
|
|
2298
|
+
fun `editorDocToScalar`(
|
|
2299
|
+
`id`: kotlin.ULong,
|
|
2300
|
+
`docPos`: kotlin.UInt,
|
|
2301
|
+
): kotlin.UInt =
|
|
2302
|
+
FfiConverterUInt.lift(
|
|
2303
|
+
uniffiRustCall { _status ->
|
|
2304
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_doc_to_scalar(
|
|
2305
|
+
FfiConverterULong.lower(`id`),
|
|
2306
|
+
FfiConverterUInt.lower(`docPos`),
|
|
2307
|
+
_status,
|
|
2308
|
+
)
|
|
2309
|
+
},
|
|
1998
2310
|
)
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
2311
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
}
|
|
2312
|
+
/**
|
|
2313
|
+
* Get both HTML and ProseMirror JSON content in one payload.
|
|
2314
|
+
*/
|
|
2315
|
+
fun `editorGetContentSnapshot`(`id`: kotlin.ULong): kotlin.String =
|
|
2316
|
+
FfiConverterString.lift(
|
|
2317
|
+
uniffiRustCall { _status ->
|
|
2318
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_content_snapshot(FfiConverterULong.lower(`id`), _status)
|
|
2319
|
+
},
|
|
2010
2320
|
)
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
2321
|
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
}
|
|
2322
|
+
/**
|
|
2323
|
+
* Get the current editor state (render elements, selection, active state,
|
|
2324
|
+
* history state) without performing any edits. Used by native views to pull
|
|
2325
|
+
* initial state when binding to an already-loaded editor.
|
|
2326
|
+
*/
|
|
2327
|
+
fun `editorGetCurrentState`(`id`: kotlin.ULong): kotlin.String =
|
|
2328
|
+
FfiConverterString.lift(
|
|
2329
|
+
uniffiRustCall { _status ->
|
|
2330
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_current_state(FfiConverterULong.lower(`id`), _status)
|
|
2331
|
+
},
|
|
2024
2332
|
)
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
2333
|
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
}
|
|
2334
|
+
/**
|
|
2335
|
+
* Get the editor's content as HTML.
|
|
2336
|
+
*/
|
|
2337
|
+
fun `editorGetHtml`(`id`: kotlin.ULong): kotlin.String =
|
|
2338
|
+
FfiConverterString.lift(
|
|
2339
|
+
uniffiRustCall { _status ->
|
|
2340
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_html(FfiConverterULong.lower(`id`), _status)
|
|
2341
|
+
},
|
|
2036
2342
|
)
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
2343
|
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
}
|
|
2344
|
+
/**
|
|
2345
|
+
* Get the editor's content as ProseMirror JSON.
|
|
2346
|
+
*/
|
|
2347
|
+
fun `editorGetJson`(`id`: kotlin.ULong): kotlin.String =
|
|
2348
|
+
FfiConverterString.lift(
|
|
2349
|
+
uniffiRustCall { _status ->
|
|
2350
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_json(FfiConverterULong.lower(`id`), _status)
|
|
2351
|
+
},
|
|
2048
2352
|
)
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
2353
|
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
}
|
|
2354
|
+
/**
|
|
2355
|
+
* Get the current selection as JSON.
|
|
2356
|
+
*/
|
|
2357
|
+
fun `editorGetSelection`(`id`: kotlin.ULong): kotlin.String =
|
|
2358
|
+
FfiConverterString.lift(
|
|
2359
|
+
uniffiRustCall { _status ->
|
|
2360
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_selection(FfiConverterULong.lower(`id`), _status)
|
|
2361
|
+
},
|
|
2060
2362
|
)
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
2363
|
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
}
|
|
2364
|
+
/**
|
|
2365
|
+
* Get the current selection-related editor state without render elements.
|
|
2366
|
+
*/
|
|
2367
|
+
fun `editorGetSelectionState`(`id`: kotlin.ULong): kotlin.String =
|
|
2368
|
+
FfiConverterString.lift(
|
|
2369
|
+
uniffiRustCall { _status ->
|
|
2370
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_get_selection_state(FfiConverterULong.lower(`id`), _status)
|
|
2371
|
+
},
|
|
2072
2372
|
)
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
2373
|
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
}
|
|
2374
|
+
/**
|
|
2375
|
+
* Indent the current list item into a nested list. Returns an update JSON string.
|
|
2376
|
+
*/
|
|
2377
|
+
fun `editorIndentListItem`(`id`: kotlin.ULong): kotlin.String =
|
|
2378
|
+
FfiConverterString.lift(
|
|
2379
|
+
uniffiRustCall { _status ->
|
|
2380
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_indent_list_item(FfiConverterULong.lower(`id`), _status)
|
|
2381
|
+
},
|
|
2084
2382
|
)
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
2383
|
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2384
|
+
/**
|
|
2385
|
+
* Indent the list item at an explicit scalar selection. Returns an update JSON string.
|
|
2386
|
+
*/
|
|
2387
|
+
fun `editorIndentListItemAtSelectionScalar`(
|
|
2388
|
+
`id`: kotlin.ULong,
|
|
2389
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2390
|
+
`scalarHead`: kotlin.UInt,
|
|
2391
|
+
): kotlin.String =
|
|
2392
|
+
FfiConverterString.lift(
|
|
2393
|
+
uniffiRustCall { _status ->
|
|
2394
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_indent_list_item_at_selection_scalar(
|
|
2395
|
+
FfiConverterULong.lower(`id`),
|
|
2396
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2397
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2398
|
+
_status,
|
|
2399
|
+
)
|
|
2400
|
+
},
|
|
2096
2401
|
)
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
2402
|
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2403
|
+
/**
|
|
2404
|
+
* Insert HTML content at the current selection. Returns an update JSON string.
|
|
2405
|
+
*/
|
|
2406
|
+
fun `editorInsertContentHtml`(
|
|
2407
|
+
`id`: kotlin.ULong,
|
|
2408
|
+
`html`: kotlin.String,
|
|
2409
|
+
): kotlin.String =
|
|
2410
|
+
FfiConverterString.lift(
|
|
2411
|
+
uniffiRustCall { _status ->
|
|
2412
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_content_html(
|
|
2413
|
+
FfiConverterULong.lower(`id`),
|
|
2414
|
+
FfiConverterString.lower(`html`),
|
|
2415
|
+
_status,
|
|
2416
|
+
)
|
|
2417
|
+
},
|
|
2108
2418
|
)
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
2419
|
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2420
|
+
/**
|
|
2421
|
+
* Insert JSON content at the current selection. Returns an update JSON string.
|
|
2422
|
+
*/
|
|
2423
|
+
fun `editorInsertContentJson`(
|
|
2424
|
+
`id`: kotlin.ULong,
|
|
2425
|
+
`json`: kotlin.String,
|
|
2426
|
+
): kotlin.String =
|
|
2427
|
+
FfiConverterString.lift(
|
|
2428
|
+
uniffiRustCall { _status ->
|
|
2429
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_content_json(
|
|
2430
|
+
FfiConverterULong.lower(`id`),
|
|
2431
|
+
FfiConverterString.lower(`json`),
|
|
2432
|
+
_status,
|
|
2433
|
+
)
|
|
2434
|
+
},
|
|
2120
2435
|
)
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
2436
|
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2437
|
+
/**
|
|
2438
|
+
* Insert JSON content at an explicit scalar selection. Returns an update JSON string.
|
|
2439
|
+
*/
|
|
2440
|
+
fun `editorInsertContentJsonAtSelectionScalar`(
|
|
2441
|
+
`id`: kotlin.ULong,
|
|
2442
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2443
|
+
`scalarHead`: kotlin.UInt,
|
|
2444
|
+
`json`: kotlin.String,
|
|
2445
|
+
): kotlin.String =
|
|
2446
|
+
FfiConverterString.lift(
|
|
2447
|
+
uniffiRustCall { _status ->
|
|
2448
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_content_json_at_selection_scalar(
|
|
2449
|
+
FfiConverterULong.lower(`id`),
|
|
2450
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2451
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2452
|
+
FfiConverterString.lower(`json`),
|
|
2453
|
+
_status,
|
|
2454
|
+
)
|
|
2455
|
+
},
|
|
2132
2456
|
)
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
2457
|
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2458
|
+
/**
|
|
2459
|
+
* Insert a void node at the current selection. Returns an update JSON string.
|
|
2460
|
+
*/
|
|
2461
|
+
fun `editorInsertNode`(
|
|
2462
|
+
`id`: kotlin.ULong,
|
|
2463
|
+
`nodeType`: kotlin.String,
|
|
2464
|
+
): kotlin.String =
|
|
2465
|
+
FfiConverterString.lift(
|
|
2466
|
+
uniffiRustCall { _status ->
|
|
2467
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_node(
|
|
2468
|
+
FfiConverterULong.lower(`id`),
|
|
2469
|
+
FfiConverterString.lower(`nodeType`),
|
|
2470
|
+
_status,
|
|
2471
|
+
)
|
|
2472
|
+
},
|
|
2144
2473
|
)
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
2474
|
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2475
|
+
/**
|
|
2476
|
+
* Insert a node at an explicit scalar selection. Returns an update JSON string.
|
|
2477
|
+
*/
|
|
2478
|
+
fun `editorInsertNodeAtSelectionScalar`(
|
|
2479
|
+
`id`: kotlin.ULong,
|
|
2480
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2481
|
+
`scalarHead`: kotlin.UInt,
|
|
2482
|
+
`nodeType`: kotlin.String,
|
|
2483
|
+
): kotlin.String =
|
|
2484
|
+
FfiConverterString.lift(
|
|
2485
|
+
uniffiRustCall { _status ->
|
|
2486
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_node_at_selection_scalar(
|
|
2487
|
+
FfiConverterULong.lower(`id`),
|
|
2488
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2489
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2490
|
+
FfiConverterString.lower(`nodeType`),
|
|
2491
|
+
_status,
|
|
2492
|
+
)
|
|
2493
|
+
},
|
|
2156
2494
|
)
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
2495
|
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2496
|
+
/**
|
|
2497
|
+
* Insert text at a position. Returns an update JSON string.
|
|
2498
|
+
*/
|
|
2499
|
+
fun `editorInsertText`(
|
|
2500
|
+
`id`: kotlin.ULong,
|
|
2501
|
+
`pos`: kotlin.UInt,
|
|
2502
|
+
`text`: kotlin.String,
|
|
2503
|
+
): kotlin.String =
|
|
2504
|
+
FfiConverterString.lift(
|
|
2505
|
+
uniffiRustCall { _status ->
|
|
2506
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_text(
|
|
2507
|
+
FfiConverterULong.lower(`id`),
|
|
2508
|
+
FfiConverterUInt.lower(`pos`),
|
|
2509
|
+
FfiConverterString.lower(`text`),
|
|
2510
|
+
_status,
|
|
2511
|
+
)
|
|
2512
|
+
},
|
|
2168
2513
|
)
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
2514
|
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2515
|
+
/**
|
|
2516
|
+
* Insert text at a scalar offset. Returns an update JSON string.
|
|
2517
|
+
*/
|
|
2518
|
+
fun `editorInsertTextScalar`(
|
|
2519
|
+
`id`: kotlin.ULong,
|
|
2520
|
+
`scalarPos`: kotlin.UInt,
|
|
2521
|
+
`text`: kotlin.String,
|
|
2522
|
+
): kotlin.String =
|
|
2523
|
+
FfiConverterString.lift(
|
|
2524
|
+
uniffiRustCall { _status ->
|
|
2525
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_insert_text_scalar(
|
|
2526
|
+
FfiConverterULong.lower(`id`),
|
|
2527
|
+
FfiConverterUInt.lower(`scalarPos`),
|
|
2528
|
+
FfiConverterString.lower(`text`),
|
|
2529
|
+
_status,
|
|
2530
|
+
)
|
|
2531
|
+
},
|
|
2180
2532
|
)
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
2533
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
}
|
|
2534
|
+
/**
|
|
2535
|
+
* Outdent the current list item to the parent list level. Returns an update JSON string.
|
|
2536
|
+
*/
|
|
2537
|
+
fun `editorOutdentListItem`(`id`: kotlin.ULong): kotlin.String =
|
|
2538
|
+
FfiConverterString.lift(
|
|
2539
|
+
uniffiRustCall { _status ->
|
|
2540
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_outdent_list_item(FfiConverterULong.lower(`id`), _status)
|
|
2541
|
+
},
|
|
2192
2542
|
)
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
2543
|
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2544
|
+
/**
|
|
2545
|
+
* Outdent the list item at an explicit scalar selection. Returns an update JSON string.
|
|
2546
|
+
*/
|
|
2547
|
+
fun `editorOutdentListItemAtSelectionScalar`(
|
|
2548
|
+
`id`: kotlin.ULong,
|
|
2549
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2550
|
+
`scalarHead`: kotlin.UInt,
|
|
2551
|
+
): kotlin.String =
|
|
2552
|
+
FfiConverterString.lift(
|
|
2553
|
+
uniffiRustCall { _status ->
|
|
2554
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_outdent_list_item_at_selection_scalar(
|
|
2555
|
+
FfiConverterULong.lower(`id`),
|
|
2556
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2557
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2558
|
+
_status,
|
|
2559
|
+
)
|
|
2560
|
+
},
|
|
2204
2561
|
)
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
2562
|
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
}
|
|
2563
|
+
/**
|
|
2564
|
+
* Redo. Returns an update JSON string, or empty string if nothing to redo.
|
|
2565
|
+
*/
|
|
2566
|
+
fun `editorRedo`(`id`: kotlin.ULong): kotlin.String =
|
|
2567
|
+
FfiConverterString.lift(
|
|
2568
|
+
uniffiRustCall { _status ->
|
|
2569
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_redo(FfiConverterULong.lower(`id`), _status)
|
|
2570
|
+
},
|
|
2216
2571
|
)
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
2572
|
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2573
|
+
/**
|
|
2574
|
+
* Replace entire document content with HTML via a transaction (preserves history).
|
|
2575
|
+
*/
|
|
2576
|
+
fun `editorReplaceHtml`(
|
|
2577
|
+
`id`: kotlin.ULong,
|
|
2578
|
+
`html`: kotlin.String,
|
|
2579
|
+
): kotlin.String =
|
|
2580
|
+
FfiConverterString.lift(
|
|
2581
|
+
uniffiRustCall { _status ->
|
|
2582
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_html(
|
|
2583
|
+
FfiConverterULong.lower(`id`),
|
|
2584
|
+
FfiConverterString.lower(`html`),
|
|
2585
|
+
_status,
|
|
2586
|
+
)
|
|
2587
|
+
},
|
|
2228
2588
|
)
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
2589
|
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2590
|
+
/**
|
|
2591
|
+
* Replace entire document content with JSON via a transaction (preserves history).
|
|
2592
|
+
*/
|
|
2593
|
+
fun `editorReplaceJson`(
|
|
2594
|
+
`id`: kotlin.ULong,
|
|
2595
|
+
`json`: kotlin.String,
|
|
2596
|
+
): kotlin.String =
|
|
2597
|
+
FfiConverterString.lift(
|
|
2598
|
+
uniffiRustCall { _status ->
|
|
2599
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_json(
|
|
2600
|
+
FfiConverterULong.lower(`id`),
|
|
2601
|
+
FfiConverterString.lower(`json`),
|
|
2602
|
+
_status,
|
|
2603
|
+
)
|
|
2604
|
+
},
|
|
2240
2605
|
)
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
2606
|
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2607
|
+
/**
|
|
2608
|
+
* Replace the current selection with plain text. Returns an update JSON string.
|
|
2609
|
+
*/
|
|
2610
|
+
fun `editorReplaceSelectionText`(
|
|
2611
|
+
`id`: kotlin.ULong,
|
|
2612
|
+
`text`: kotlin.String,
|
|
2613
|
+
): kotlin.String =
|
|
2614
|
+
FfiConverterString.lift(
|
|
2615
|
+
uniffiRustCall { _status ->
|
|
2616
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_selection_text(
|
|
2617
|
+
FfiConverterULong.lower(`id`),
|
|
2618
|
+
FfiConverterString.lower(`text`),
|
|
2619
|
+
_status,
|
|
2620
|
+
)
|
|
2621
|
+
},
|
|
2252
2622
|
)
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
2623
|
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* Replace a scalar range with text (atomic delete + insert). Returns an update JSON string.
|
|
2626
|
+
*/
|
|
2627
|
+
fun `editorReplaceTextScalar`(
|
|
2628
|
+
`id`: kotlin.ULong,
|
|
2629
|
+
`scalarFrom`: kotlin.UInt,
|
|
2630
|
+
`scalarTo`: kotlin.UInt,
|
|
2631
|
+
`text`: kotlin.String,
|
|
2632
|
+
): kotlin.String =
|
|
2633
|
+
FfiConverterString.lift(
|
|
2634
|
+
uniffiRustCall { _status ->
|
|
2635
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_replace_text_scalar(
|
|
2636
|
+
FfiConverterULong.lower(`id`),
|
|
2637
|
+
FfiConverterUInt.lower(`scalarFrom`),
|
|
2638
|
+
FfiConverterUInt.lower(`scalarTo`),
|
|
2639
|
+
FfiConverterString.lower(`text`),
|
|
2640
|
+
_status,
|
|
2641
|
+
)
|
|
2642
|
+
},
|
|
2264
2643
|
)
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
2644
|
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2645
|
+
/**
|
|
2646
|
+
* Resize an image node at a document position. Returns an update JSON string.
|
|
2647
|
+
*/
|
|
2648
|
+
fun `editorResizeImageAtDocPos`(
|
|
2649
|
+
`id`: kotlin.ULong,
|
|
2650
|
+
`docPos`: kotlin.UInt,
|
|
2651
|
+
`width`: kotlin.UInt,
|
|
2652
|
+
`height`: kotlin.UInt,
|
|
2653
|
+
): kotlin.String =
|
|
2654
|
+
FfiConverterString.lift(
|
|
2655
|
+
uniffiRustCall { _status ->
|
|
2656
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_resize_image_at_doc_pos(
|
|
2657
|
+
FfiConverterULong.lower(`id`),
|
|
2658
|
+
FfiConverterUInt.lower(`docPos`),
|
|
2659
|
+
FfiConverterUInt.lower(`width`),
|
|
2660
|
+
FfiConverterUInt.lower(`height`),
|
|
2661
|
+
_status,
|
|
2662
|
+
)
|
|
2663
|
+
},
|
|
2276
2664
|
)
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
2665
|
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2666
|
+
/**
|
|
2667
|
+
* Convert a rendered-text scalar offset to a document position.
|
|
2668
|
+
*/
|
|
2669
|
+
fun `editorScalarToDoc`(
|
|
2670
|
+
`id`: kotlin.ULong,
|
|
2671
|
+
`scalar`: kotlin.UInt,
|
|
2672
|
+
): kotlin.UInt =
|
|
2673
|
+
FfiConverterUInt.lift(
|
|
2674
|
+
uniffiRustCall { _status ->
|
|
2675
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_scalar_to_doc(
|
|
2676
|
+
FfiConverterULong.lower(`id`),
|
|
2677
|
+
FfiConverterUInt.lower(`scalar`),
|
|
2678
|
+
_status,
|
|
2679
|
+
)
|
|
2680
|
+
},
|
|
2288
2681
|
)
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2291
2682
|
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2683
|
+
/**
|
|
2684
|
+
* Set the editor's content from an HTML string. Returns render elements as JSON.
|
|
2685
|
+
*/
|
|
2686
|
+
fun `editorSetHtml`(
|
|
2687
|
+
`id`: kotlin.ULong,
|
|
2688
|
+
`html`: kotlin.String,
|
|
2689
|
+
): kotlin.String =
|
|
2690
|
+
FfiConverterString.lift(
|
|
2691
|
+
uniffiRustCall { _status ->
|
|
2692
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_html(
|
|
2693
|
+
FfiConverterULong.lower(`id`),
|
|
2694
|
+
FfiConverterString.lower(`html`),
|
|
2695
|
+
_status,
|
|
2696
|
+
)
|
|
2697
|
+
},
|
|
2300
2698
|
)
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
2699
|
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2700
|
+
/**
|
|
2701
|
+
* Set the editor's content from a ProseMirror JSON string.
|
|
2702
|
+
*/
|
|
2703
|
+
fun `editorSetJson`(
|
|
2704
|
+
`id`: kotlin.ULong,
|
|
2705
|
+
`json`: kotlin.String,
|
|
2706
|
+
): kotlin.String =
|
|
2707
|
+
FfiConverterString.lift(
|
|
2708
|
+
uniffiRustCall { _status ->
|
|
2709
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_json(
|
|
2710
|
+
FfiConverterULong.lower(`id`),
|
|
2711
|
+
FfiConverterString.lower(`json`),
|
|
2712
|
+
_status,
|
|
2713
|
+
)
|
|
2714
|
+
},
|
|
2312
2715
|
)
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
2716
|
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2717
|
+
/**
|
|
2718
|
+
* Set a mark with attrs on the current selection. Returns an update JSON string.
|
|
2719
|
+
*/
|
|
2720
|
+
fun `editorSetMark`(
|
|
2721
|
+
`id`: kotlin.ULong,
|
|
2722
|
+
`markName`: kotlin.String,
|
|
2723
|
+
`attrsJson`: kotlin.String,
|
|
2724
|
+
): kotlin.String =
|
|
2725
|
+
FfiConverterString.lift(
|
|
2726
|
+
uniffiRustCall { _status ->
|
|
2727
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_mark(
|
|
2728
|
+
FfiConverterULong.lower(`id`),
|
|
2729
|
+
FfiConverterString.lower(`markName`),
|
|
2730
|
+
FfiConverterString.lower(`attrsJson`),
|
|
2731
|
+
_status,
|
|
2732
|
+
)
|
|
2733
|
+
},
|
|
2324
2734
|
)
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
2735
|
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2736
|
+
/**
|
|
2737
|
+
* Set a mark with attrs at an explicit scalar selection. Returns an update JSON string.
|
|
2738
|
+
*/
|
|
2739
|
+
fun `editorSetMarkAtSelectionScalar`(
|
|
2740
|
+
`id`: kotlin.ULong,
|
|
2741
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2742
|
+
`scalarHead`: kotlin.UInt,
|
|
2743
|
+
`markName`: kotlin.String,
|
|
2744
|
+
`attrsJson`: kotlin.String,
|
|
2745
|
+
): kotlin.String =
|
|
2746
|
+
FfiConverterString.lift(
|
|
2747
|
+
uniffiRustCall { _status ->
|
|
2748
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_mark_at_selection_scalar(
|
|
2749
|
+
FfiConverterULong.lower(`id`),
|
|
2750
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2751
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2752
|
+
FfiConverterString.lower(`markName`),
|
|
2753
|
+
FfiConverterString.lower(`attrsJson`),
|
|
2754
|
+
_status,
|
|
2755
|
+
)
|
|
2756
|
+
},
|
|
2336
2757
|
)
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
2758
|
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2759
|
+
/**
|
|
2760
|
+
* Set the selection. Anchor and head are document positions.
|
|
2761
|
+
*/
|
|
2762
|
+
fun `editorSetSelection`(
|
|
2763
|
+
`id`: kotlin.ULong,
|
|
2764
|
+
`anchor`: kotlin.UInt,
|
|
2765
|
+
`head`: kotlin.UInt,
|
|
2766
|
+
) = uniffiRustCall { _status ->
|
|
2345
2767
|
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_selection(
|
|
2346
|
-
FfiConverterULong.lower(`id`),
|
|
2768
|
+
FfiConverterULong.lower(`id`),
|
|
2769
|
+
FfiConverterUInt.lower(`anchor`),
|
|
2770
|
+
FfiConverterUInt.lower(`head`),
|
|
2771
|
+
_status,
|
|
2772
|
+
)
|
|
2347
2773
|
}
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2774
|
+
|
|
2775
|
+
/**
|
|
2776
|
+
* Set the selection from scalar offsets, converting to document positions internally.
|
|
2777
|
+
*/
|
|
2778
|
+
fun `editorSetSelectionScalar`(
|
|
2779
|
+
`id`: kotlin.ULong,
|
|
2780
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2781
|
+
`scalarHead`: kotlin.UInt,
|
|
2782
|
+
) = uniffiRustCall { _status ->
|
|
2356
2783
|
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_set_selection_scalar(
|
|
2357
|
-
FfiConverterULong.lower(`id`),
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
/**
|
|
2363
|
-
* Split the block at a position (Enter key). Returns an update JSON string.
|
|
2364
|
-
*/ fun `editorSplitBlock`(`id`: kotlin.ULong, `pos`: kotlin.UInt): kotlin.String {
|
|
2365
|
-
return FfiConverterString.lift(
|
|
2366
|
-
uniffiRustCall() { _status ->
|
|
2367
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block(
|
|
2368
|
-
FfiConverterULong.lower(`id`),FfiConverterUInt.lower(`pos`),_status)
|
|
2369
|
-
}
|
|
2784
|
+
FfiConverterULong.lower(`id`),
|
|
2785
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2786
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2787
|
+
_status,
|
|
2370
2788
|
)
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
/**
|
|
2375
|
-
* Split a block at a scalar offset. Returns an update JSON string.
|
|
2376
|
-
*/ fun `editorSplitBlockScalar`(`id`: kotlin.ULong, `scalarPos`: kotlin.UInt): kotlin.String {
|
|
2377
|
-
return FfiConverterString.lift(
|
|
2378
|
-
uniffiRustCall() { _status ->
|
|
2379
|
-
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block_scalar(
|
|
2380
|
-
FfiConverterULong.lower(`id`),FfiConverterUInt.lower(`scalarPos`),_status)
|
|
2381
2789
|
}
|
|
2382
|
-
)
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
2790
|
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2791
|
+
/**
|
|
2792
|
+
* Split the block at a position (Enter key). Returns an update JSON string.
|
|
2793
|
+
*/
|
|
2794
|
+
fun `editorSplitBlock`(
|
|
2795
|
+
`id`: kotlin.ULong,
|
|
2796
|
+
`pos`: kotlin.UInt,
|
|
2797
|
+
): kotlin.String =
|
|
2798
|
+
FfiConverterString.lift(
|
|
2799
|
+
uniffiRustCall { _status ->
|
|
2800
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block(
|
|
2801
|
+
FfiConverterULong.lower(`id`),
|
|
2802
|
+
FfiConverterUInt.lower(`pos`),
|
|
2803
|
+
_status,
|
|
2804
|
+
)
|
|
2805
|
+
},
|
|
2394
2806
|
)
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
2807
|
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2808
|
+
/**
|
|
2809
|
+
* Split a block at a scalar offset. Returns an update JSON string.
|
|
2810
|
+
*/
|
|
2811
|
+
fun `editorSplitBlockScalar`(
|
|
2812
|
+
`id`: kotlin.ULong,
|
|
2813
|
+
`scalarPos`: kotlin.UInt,
|
|
2814
|
+
): kotlin.String =
|
|
2815
|
+
FfiConverterString.lift(
|
|
2816
|
+
uniffiRustCall { _status ->
|
|
2817
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_split_block_scalar(
|
|
2818
|
+
FfiConverterULong.lower(`id`),
|
|
2819
|
+
FfiConverterUInt.lower(`scalarPos`),
|
|
2820
|
+
_status,
|
|
2821
|
+
)
|
|
2822
|
+
},
|
|
2406
2823
|
)
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
2824
|
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
}
|
|
2825
|
+
/**
|
|
2826
|
+
* Toggle a blockquote around the current block selection. Returns an update JSON string.
|
|
2827
|
+
*/
|
|
2828
|
+
fun `editorToggleBlockquote`(`id`: kotlin.ULong): kotlin.String =
|
|
2829
|
+
FfiConverterString.lift(
|
|
2830
|
+
uniffiRustCall { _status ->
|
|
2831
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_blockquote(FfiConverterULong.lower(`id`), _status)
|
|
2832
|
+
},
|
|
2418
2833
|
)
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
2834
|
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2835
|
+
/**
|
|
2836
|
+
* Toggle a blockquote at an explicit scalar selection. Returns an update JSON string.
|
|
2837
|
+
*/
|
|
2838
|
+
fun `editorToggleBlockquoteAtSelectionScalar`(
|
|
2839
|
+
`id`: kotlin.ULong,
|
|
2840
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2841
|
+
`scalarHead`: kotlin.UInt,
|
|
2842
|
+
): kotlin.String =
|
|
2843
|
+
FfiConverterString.lift(
|
|
2844
|
+
uniffiRustCall { _status ->
|
|
2845
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_blockquote_at_selection_scalar(
|
|
2846
|
+
FfiConverterULong.lower(`id`),
|
|
2847
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2848
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2849
|
+
_status,
|
|
2850
|
+
)
|
|
2851
|
+
},
|
|
2430
2852
|
)
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
2853
|
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2854
|
+
/**
|
|
2855
|
+
* Toggle a heading level on the current text-block selection. Returns an update JSON string.
|
|
2856
|
+
*/
|
|
2857
|
+
fun `editorToggleHeading`(
|
|
2858
|
+
`id`: kotlin.ULong,
|
|
2859
|
+
`level`: kotlin.UByte,
|
|
2860
|
+
): kotlin.String =
|
|
2861
|
+
FfiConverterString.lift(
|
|
2862
|
+
uniffiRustCall { _status ->
|
|
2863
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_heading(
|
|
2864
|
+
FfiConverterULong.lower(`id`),
|
|
2865
|
+
FfiConverterUByte.lower(`level`),
|
|
2866
|
+
_status,
|
|
2867
|
+
)
|
|
2868
|
+
},
|
|
2442
2869
|
)
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
2870
|
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2871
|
+
/**
|
|
2872
|
+
* Toggle a heading level at an explicit scalar selection. Returns an update JSON string.
|
|
2873
|
+
*/
|
|
2874
|
+
fun `editorToggleHeadingAtSelectionScalar`(
|
|
2875
|
+
`id`: kotlin.ULong,
|
|
2876
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2877
|
+
`scalarHead`: kotlin.UInt,
|
|
2878
|
+
`level`: kotlin.UByte,
|
|
2879
|
+
): kotlin.String =
|
|
2880
|
+
FfiConverterString.lift(
|
|
2881
|
+
uniffiRustCall { _status ->
|
|
2882
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_heading_at_selection_scalar(
|
|
2883
|
+
FfiConverterULong.lower(`id`),
|
|
2884
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2885
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2886
|
+
FfiConverterUByte.lower(`level`),
|
|
2887
|
+
_status,
|
|
2888
|
+
)
|
|
2889
|
+
},
|
|
2454
2890
|
)
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
2891
|
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2892
|
+
/**
|
|
2893
|
+
* Toggle a mark on the current selection. Returns an update JSON string.
|
|
2894
|
+
*/
|
|
2895
|
+
fun `editorToggleMark`(
|
|
2896
|
+
`id`: kotlin.ULong,
|
|
2897
|
+
`markName`: kotlin.String,
|
|
2898
|
+
): kotlin.String =
|
|
2899
|
+
FfiConverterString.lift(
|
|
2900
|
+
uniffiRustCall { _status ->
|
|
2901
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_mark(
|
|
2902
|
+
FfiConverterULong.lower(`id`),
|
|
2903
|
+
FfiConverterString.lower(`markName`),
|
|
2904
|
+
_status,
|
|
2905
|
+
)
|
|
2906
|
+
},
|
|
2466
2907
|
)
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
2908
|
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2909
|
+
/**
|
|
2910
|
+
* Toggle a mark at an explicit scalar selection. Returns an update JSON string.
|
|
2911
|
+
*/
|
|
2912
|
+
fun `editorToggleMarkAtSelectionScalar`(
|
|
2913
|
+
`id`: kotlin.ULong,
|
|
2914
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2915
|
+
`scalarHead`: kotlin.UInt,
|
|
2916
|
+
`markName`: kotlin.String,
|
|
2917
|
+
): kotlin.String =
|
|
2918
|
+
FfiConverterString.lift(
|
|
2919
|
+
uniffiRustCall { _status ->
|
|
2920
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_toggle_mark_at_selection_scalar(
|
|
2921
|
+
FfiConverterULong.lower(`id`),
|
|
2922
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2923
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2924
|
+
FfiConverterString.lower(`markName`),
|
|
2925
|
+
_status,
|
|
2926
|
+
)
|
|
2927
|
+
},
|
|
2478
2928
|
)
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
2929
|
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
}
|
|
2930
|
+
/**
|
|
2931
|
+
* Undo. Returns an update JSON string, or empty string if nothing to undo.
|
|
2932
|
+
*/
|
|
2933
|
+
fun `editorUndo`(`id`: kotlin.ULong): kotlin.String =
|
|
2934
|
+
FfiConverterString.lift(
|
|
2935
|
+
uniffiRustCall { _status ->
|
|
2936
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_undo(FfiConverterULong.lower(`id`), _status)
|
|
2937
|
+
},
|
|
2490
2938
|
)
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
2939
|
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2940
|
+
/**
|
|
2941
|
+
* Remove a mark from the current selection. Returns an update JSON string.
|
|
2942
|
+
*/
|
|
2943
|
+
fun `editorUnsetMark`(
|
|
2944
|
+
`id`: kotlin.ULong,
|
|
2945
|
+
`markName`: kotlin.String,
|
|
2946
|
+
): kotlin.String =
|
|
2947
|
+
FfiConverterString.lift(
|
|
2948
|
+
uniffiRustCall { _status ->
|
|
2949
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unset_mark(
|
|
2950
|
+
FfiConverterULong.lower(`id`),
|
|
2951
|
+
FfiConverterString.lower(`markName`),
|
|
2952
|
+
_status,
|
|
2953
|
+
)
|
|
2954
|
+
},
|
|
2502
2955
|
)
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
2956
|
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2957
|
+
/**
|
|
2958
|
+
* Remove a mark at an explicit scalar selection. Returns an update JSON string.
|
|
2959
|
+
*/
|
|
2960
|
+
fun `editorUnsetMarkAtSelectionScalar`(
|
|
2961
|
+
`id`: kotlin.ULong,
|
|
2962
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2963
|
+
`scalarHead`: kotlin.UInt,
|
|
2964
|
+
`markName`: kotlin.String,
|
|
2965
|
+
): kotlin.String =
|
|
2966
|
+
FfiConverterString.lift(
|
|
2967
|
+
uniffiRustCall { _status ->
|
|
2968
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unset_mark_at_selection_scalar(
|
|
2969
|
+
FfiConverterULong.lower(`id`),
|
|
2970
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
2971
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
2972
|
+
FfiConverterString.lower(`markName`),
|
|
2973
|
+
_status,
|
|
2974
|
+
)
|
|
2975
|
+
},
|
|
2514
2976
|
)
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
2977
|
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
}
|
|
2978
|
+
/**
|
|
2979
|
+
* Unwrap the current list item back to a paragraph. Returns an update JSON string.
|
|
2980
|
+
*/
|
|
2981
|
+
fun `editorUnwrapFromList`(`id`: kotlin.ULong): kotlin.String =
|
|
2982
|
+
FfiConverterString.lift(
|
|
2983
|
+
uniffiRustCall { _status ->
|
|
2984
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unwrap_from_list(FfiConverterULong.lower(`id`), _status)
|
|
2985
|
+
},
|
|
2526
2986
|
)
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
2987
|
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2988
|
+
/**
|
|
2989
|
+
* Unwrap the list item at an explicit scalar selection. Returns an update JSON string.
|
|
2990
|
+
*/
|
|
2991
|
+
fun `editorUnwrapFromListAtSelectionScalar`(
|
|
2992
|
+
`id`: kotlin.ULong,
|
|
2993
|
+
`scalarAnchor`: kotlin.UInt,
|
|
2994
|
+
`scalarHead`: kotlin.UInt,
|
|
2995
|
+
): kotlin.String =
|
|
2996
|
+
FfiConverterString.lift(
|
|
2997
|
+
uniffiRustCall { _status ->
|
|
2998
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_unwrap_from_list_at_selection_scalar(
|
|
2999
|
+
FfiConverterULong.lower(`id`),
|
|
3000
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3001
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3002
|
+
_status,
|
|
3003
|
+
)
|
|
3004
|
+
},
|
|
2538
3005
|
)
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
3006
|
|
|
3007
|
+
/**
|
|
3008
|
+
* Wrap the current selection in a list. Returns an update JSON string.
|
|
3009
|
+
*/
|
|
3010
|
+
fun `editorWrapInList`(
|
|
3011
|
+
`id`: kotlin.ULong,
|
|
3012
|
+
`listType`: kotlin.String,
|
|
3013
|
+
): kotlin.String =
|
|
3014
|
+
FfiConverterString.lift(
|
|
3015
|
+
uniffiRustCall { _status ->
|
|
3016
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_wrap_in_list(
|
|
3017
|
+
FfiConverterULong.lower(`id`),
|
|
3018
|
+
FfiConverterString.lower(`listType`),
|
|
3019
|
+
_status,
|
|
3020
|
+
)
|
|
3021
|
+
},
|
|
3022
|
+
)
|
|
2542
3023
|
|
|
3024
|
+
/**
|
|
3025
|
+
* Wrap or convert a list at an explicit scalar selection. Returns an update JSON string.
|
|
3026
|
+
*/
|
|
3027
|
+
fun `editorWrapInListAtSelectionScalar`(
|
|
3028
|
+
`id`: kotlin.ULong,
|
|
3029
|
+
`scalarAnchor`: kotlin.UInt,
|
|
3030
|
+
`scalarHead`: kotlin.UInt,
|
|
3031
|
+
`listType`: kotlin.String,
|
|
3032
|
+
): kotlin.String =
|
|
3033
|
+
FfiConverterString.lift(
|
|
3034
|
+
uniffiRustCall { _status ->
|
|
3035
|
+
UniffiLib.INSTANCE.uniffi_editor_core_fn_func_editor_wrap_in_list_at_selection_scalar(
|
|
3036
|
+
FfiConverterULong.lower(`id`),
|
|
3037
|
+
FfiConverterUInt.lower(`scalarAnchor`),
|
|
3038
|
+
FfiConverterUInt.lower(`scalarHead`),
|
|
3039
|
+
FfiConverterString.lower(`listType`),
|
|
3040
|
+
_status,
|
|
3041
|
+
)
|
|
3042
|
+
},
|
|
3043
|
+
)
|