MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / engine_commit_scrollback

Function engine_commit_scrollback

packages/native/src/lib.rs:347–363  ·  view source on GitHub ↗
(engine_id: u32, drawlist: Uint8Array, rows: u32)

Source from the content-addressed store, hash-verified

345
346#[napi(js_name = "engineCommitScrollback")]
347pub fn engine_commit_scrollback(engine_id: u32, drawlist: Uint8Array, rows: u32) -> i32 {
348 let guard = match get_engine_guard(engine_id) {
349 Ok(guard) => guard,
350 Err(rc) => return rc,
351 };
352 if !guard.slot.is_owner_thread() {
353 return ffi::ZR_ERR_INVALID_ARGUMENT;
354 }
355
356 if drawlist.len() > (i32::MAX as usize) {
357 return ffi::ZR_ERR_LIMIT;
358 }
359 let bytes = drawlist.as_ref();
360 unsafe {
361 ffi::engine_commit_scrollback(guard.slot.engine, bytes.as_ptr(), bytes.len() as i32, rows)
362 }
363}
364
365#[napi(js_name = "enginePresent")]
366pub fn engine_present(engine_id: u32) -> i32 {

Callers

nothing calls this directly

Calls 2

get_engine_guardFunction · 0.85
is_owner_threadMethod · 0.80

Tested by

no test coverage detected