aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/include/ghostty/vt/screen.h
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/include/ghostty/vt/screen.h
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/include/ghostty/vt/screen.h')
-rw-r--r--vendor/libghostty-vt/include/ghostty/vt/screen.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/vendor/libghostty-vt/include/ghostty/vt/screen.h b/vendor/libghostty-vt/include/ghostty/vt/screen.h
index 9f639b58..2899989d 100644
--- a/vendor/libghostty-vt/include/ghostty/vt/screen.h
+++ b/vendor/libghostty-vt/include/ghostty/vt/screen.h
@@ -21,19 +21,21 @@ extern "C" {
* Terminal screen cell and row types.
*
* These types represent the contents of a terminal screen. A GhosttyCell
- * is a single grid cell and a GhosttyRow is a single row. Both are opaque
- * values whose fields are accessed via ghostty_cell_get() and
- * ghostty_row_get() respectively.
+ * is a single grid cell and a GhosttyRow is a single row. Cell fields can
+ * be accessed via ghostty_cell_get() or decoded from the packed layout in
+ * ghostty_type_json(). Rows are opaque and accessed via ghostty_row_get().
*
* @{
*/
/**
- * Opaque cell value.
+ * Packed cell value.
*
- * Represents a single terminal cell. The internal layout is opaque and
- * must be queried via ghostty_cell_get(). Obtain cell values from
- * terminal query APIs.
+ * Represents a single terminal cell. Portable callers can query fields via
+ * ghostty_cell_get(). Boundary-sensitive callers can decode the packed value
+ * using the GhosttyCell descriptor returned by ghostty_type_json(). The
+ * manifest is authoritative for the linked build; hardcoding bit positions
+ * is unsupported.
*
* @ingroup screen
*/
@@ -51,6 +53,24 @@ typedef uint64_t GhosttyCell;
typedef uint64_t GhosttyRow;
/**
+ * A borrowed view of contiguous raw cell values.
+ *
+ * The memory is not owned by this struct. The pointer is only valid
+ * for the lifetime documented by the API that produces it. Each value
+ * can be queried via ghostty_cell_get() or decoded using the GhosttyCell
+ * packed descriptor returned by ghostty_type_json().
+ *
+ * @ingroup screen
+ */
+typedef struct {
+ /** Pointer to len contiguous cell values. */
+ const GhosttyCell* ptr;
+
+ /** Number of cells. */
+ size_t len;
+} GhosttyCellsView;
+
+/**
* Cell content tag.
*
* Describes what kind of content a cell holds.