aboutsummaryrefslogtreecommitdiff
path: root/src/ghostty/bindings.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
commitdcfe11a7588fcd42471159453810abc9b7720a57 (patch)
treec32a77266028e73ca2382b96c96f8438a5fcd621 /src/ghostty/bindings.rs
parent2dfed860103c4e4505ac7f25def9fe37da1e1e6a (diff)
build: update libghostty-vt vendor
vendor ghostty 063ac3e and remove the musl libc++ link workaround. expose the new selection formatter and hyperlink uri apis for follow-up rendering work. add manual artifact validation for static linux builds.
Diffstat (limited to 'src/ghostty/bindings.rs')
-rw-r--r--src/ghostty/bindings.rs37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/ghostty/bindings.rs b/src/ghostty/bindings.rs
index db2d412d..6e77288f 100644
--- a/src/ghostty/bindings.rs
+++ b/src/ghostty/bindings.rs
@@ -707,6 +707,28 @@ impl Default for GhosttyGridRef {
}
}
}
+#[doc = " A selection range defined by two grid references."]
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct GhosttySelection {
+ pub size: usize,
+ pub start: GhosttyGridRef,
+ pub end: GhosttyGridRef,
+ pub rectangle: bool,
+}
+#[allow(clippy::unnecessary_operation, clippy::identity_op)]
+const _: () = {
+ ["Size of GhosttySelection"][::std::mem::size_of::<GhosttySelection>() - 64usize];
+ ["Alignment of GhosttySelection"][::std::mem::align_of::<GhosttySelection>() - 8usize];
+ ["Offset of field: GhosttySelection::size"]
+ [::std::mem::offset_of!(GhosttySelection, size) - 0usize];
+ ["Offset of field: GhosttySelection::start"]
+ [::std::mem::offset_of!(GhosttySelection, start) - 8usize];
+ ["Offset of field: GhosttySelection::end"]
+ [::std::mem::offset_of!(GhosttySelection, end) - 32usize];
+ ["Offset of field: GhosttySelection::rectangle"]
+ [::std::mem::offset_of!(GhosttySelection, rectangle) - 56usize];
+};
unsafe extern "C" {
#[doc = " Get the cell from a grid reference.\n\n @param ref Pointer to the grid reference\n @param[out] out_cell On success, set to the cell at the ref's position (may be NULL)\n @return GHOSTTY_SUCCESS on success, GHOSTTY_INVALID_VALUE if the ref's\n node is NULL\n\n @ingroup grid_ref"]
pub fn ghostty_grid_ref_cell(
@@ -731,6 +753,15 @@ unsafe extern "C" {
) -> GhosttyResult;
}
unsafe extern "C" {
+ #[doc = " Get the hyperlink URI for the cell at the grid reference's position."]
+ pub fn ghostty_grid_ref_hyperlink_uri(
+ ref_: *const GhosttyGridRef,
+ buf: *mut u8,
+ buf_len: usize,
+ out_len: *mut usize,
+ ) -> GhosttyResult;
+}
+unsafe extern "C" {
#[doc = " Get the style of the cell at the grid reference's position.\n\n @param ref Pointer to the grid reference\n @param[out] out_style On success, set to the cell's style (may be NULL)\n @return GHOSTTY_SUCCESS on success, GHOSTTY_INVALID_VALUE if the ref's\n node is NULL\n\n @ingroup grid_ref"]
pub fn ghostty_grid_ref_style(
ref_: *const GhosttyGridRef,
@@ -1250,11 +1281,13 @@ pub struct GhosttyFormatterTerminalOptions {
pub trim: bool,
#[doc = " Extra terminal state to include in styled output."]
pub extra: GhosttyFormatterTerminalExtra,
+ #[doc = " Optional selection to restrict output to a range."]
+ pub selection: *const GhosttySelection,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of GhosttyFormatterTerminalOptions"]
- [::std::mem::size_of::<GhosttyFormatterTerminalOptions>() - 48usize];
+ [::std::mem::size_of::<GhosttyFormatterTerminalOptions>() - 56usize];
["Alignment of GhosttyFormatterTerminalOptions"]
[::std::mem::align_of::<GhosttyFormatterTerminalOptions>() - 8usize];
["Offset of field: GhosttyFormatterTerminalOptions::size"]
@@ -1267,6 +1300,8 @@ const _: () = {
[::std::mem::offset_of!(GhosttyFormatterTerminalOptions, trim) - 13usize];
["Offset of field: GhosttyFormatterTerminalOptions::extra"]
[::std::mem::offset_of!(GhosttyFormatterTerminalOptions, extra) - 16usize];
+ ["Offset of field: GhosttyFormatterTerminalOptions::selection"]
+ [::std::mem::offset_of!(GhosttyFormatterTerminalOptions, selection) - 48usize];
};
impl Default for GhosttyFormatterTerminalOptions {
fn default() -> Self {