Ports ZIG/src/apprt/{action,structs,surface,ipc,runtime}.zig into
ghostty-apprt: the Action enum performed by the core on the app runtime
(all 65 variants with docs), Target<S> generic over the runtime's
surface handle, clipboard/size/scale/selection structs, the core->surface
Message enum with a Mailbox over an AppMailbox trait, and IPC action
types for +new-window.
Owned Strings and Arc<Config> replace Zig's borrowed slices/pointers.
Scrollbar and RendererHealth are local stand-ins until core integration.
The embedded C API and browser runtime are out of scope.
Test Plan:
- cargo test -p ghostty-apprt (16 tests)
18 lines
572 B
Rust
18 lines
572 B
Rust
//! ghostty-apprt: the contract between the core and app runtimes
|
|
//! (ZIG/src/apprt/{action,structs,surface,ipc,runtime,none}.zig).
|
|
//!
|
|
//! The C-ABI parts of the Zig sources (`C` structs, `cval`, `CValue`,
|
|
//! `ghostty.h` sync tests) belong to the embedded runtime and are not ported.
|
|
|
|
pub mod action;
|
|
pub mod ipc;
|
|
pub mod runtime;
|
|
pub mod structs;
|
|
pub mod surface;
|
|
|
|
pub use action::{Action, Target};
|
|
pub use structs::{
|
|
Clipboard, ClipboardContent, ClipboardRequest, ClipboardRequestType, ColorScheme, ContentScale,
|
|
CursorPos, ImePos, Selection, SurfaceSize,
|
|
};
|