11/* automatically generated by rust-bindgen 0.72.1 */
22
3- // Ghostty revision: ab0b9da9e88fcb4b0533a1854e84628f663930af
3+ // Ghostty revision: 83fb95624b0439ee660c2679b43b38c8b63769cd
44// Generated from the official C API; regenerate with script/ghostty-bindings.
55#![ allow(
66 dead_code,
@@ -15,6 +15,9 @@ pub const GHOSTTY_OUT_OF_MEMORY: GhosttyResult = -1;
1515pub const GHOSTTY_INVALID_VALUE : GhosttyResult = -2 ;
1616pub const GHOSTTY_OUT_OF_SPACE : GhosttyResult = -3 ;
1717pub const GHOSTTY_NO_VALUE : GhosttyResult = -4 ;
18+ pub const GHOSTTY_IO_ERROR : GhosttyResult = -5 ;
19+ pub const GHOSTTY_LIMIT_EXCEEDED : GhosttyResult = -6 ;
20+ pub const GHOSTTY_REJECTED : GhosttyResult = -7 ;
1821pub const GHOSTTY_RESULT_MAX_VALUE : GhosttyResult = 2147483647 ;
1922pub type GhosttyResult = :: std:: os:: raw:: c_int ;
2023#[ repr( C ) ]
@@ -33,7 +36,7 @@ pub const GHOSTTY_FORMATTER_FORMAT_PLAIN: GhosttyFormatterFormat = 0;
3336pub const GHOSTTY_FORMATTER_FORMAT_VT : GhosttyFormatterFormat = 1 ;
3437pub const GHOSTTY_FORMATTER_FORMAT_HTML : GhosttyFormatterFormat = 2 ;
3538pub const GHOSTTY_FORMATTER_FORMAT_MAX_VALUE : GhosttyFormatterFormat = 2147483647 ;
36- pub type GhosttyFormatterFormat = :: std:: os:: raw:: c_uint ;
39+ pub type GhosttyFormatterFormat = :: std:: os:: raw:: c_int ;
3740#[ repr( C ) ]
3841#[ derive( Debug , Copy , Clone ) ]
3942pub struct GhosttyString {
@@ -187,7 +190,7 @@ pub const GHOSTTY_POINT_TAG_VIEWPORT: GhosttyPointTag = 1;
187190pub const GHOSTTY_POINT_TAG_SCREEN : GhosttyPointTag = 2 ;
188191pub const GHOSTTY_POINT_TAG_HISTORY : GhosttyPointTag = 3 ;
189192pub const GHOSTTY_POINT_TAG_MAX_VALUE : GhosttyPointTag = 2147483647 ;
190- pub type GhosttyPointTag = :: std:: os:: raw:: c_uint ;
193+ pub type GhosttyPointTag = :: std:: os:: raw:: c_int ;
191194#[ repr( C ) ]
192195#[ derive( Copy , Clone ) ]
193196pub union GhosttyPointValue {
@@ -308,36 +311,19 @@ unsafe extern "C" {
308311 out_written : * mut usize ,
309312 ) -> GhosttyResult ;
310313}
311- #[ repr( C ) ]
312- #[ derive( Debug , Default , Copy , Clone ) ]
313- pub struct GhosttyTerminalOptions {
314- pub cols : u16 ,
315- pub rows : u16 ,
316- pub max_scrollback : usize ,
317- }
318- #[ allow( clippy:: unnecessary_operation, clippy:: identity_op) ]
319- const _: ( ) = {
320- [ "Size of GhosttyTerminalOptions" ] [ :: std:: mem:: size_of :: < GhosttyTerminalOptions > ( ) - 16usize ] ;
321- [ "Alignment of GhosttyTerminalOptions" ]
322- [ :: std:: mem:: align_of :: < GhosttyTerminalOptions > ( ) - 8usize ] ;
323- [ "Offset of field: GhosttyTerminalOptions::cols" ]
324- [ :: std:: mem:: offset_of!( GhosttyTerminalOptions , cols) - 0usize ] ;
325- [ "Offset of field: GhosttyTerminalOptions::rows" ]
326- [ :: std:: mem:: offset_of!( GhosttyTerminalOptions , rows) - 2usize ] ;
327- [ "Offset of field: GhosttyTerminalOptions::max_scrollback" ]
328- [ :: std:: mem:: offset_of!( GhosttyTerminalOptions , max_scrollback) - 8usize ] ;
329- } ;
330314pub const GHOSTTY_SCROLL_VIEWPORT_TOP : GhosttyTerminalScrollViewportTag = 0 ;
331315pub const GHOSTTY_SCROLL_VIEWPORT_BOTTOM : GhosttyTerminalScrollViewportTag = 1 ;
332316pub const GHOSTTY_SCROLL_VIEWPORT_DELTA : GhosttyTerminalScrollViewportTag = 2 ;
333317pub const GHOSTTY_SCROLL_VIEWPORT_ROW : GhosttyTerminalScrollViewportTag = 3 ;
318+ pub const GHOSTTY_SCROLL_VIEWPORT_DELTA_PROMPT : GhosttyTerminalScrollViewportTag = 4 ;
334319pub const GHOSTTY_SCROLL_VIEWPORT_MAX_VALUE : GhosttyTerminalScrollViewportTag = 2147483647 ;
335- pub type GhosttyTerminalScrollViewportTag = :: std:: os:: raw:: c_uint ;
320+ pub type GhosttyTerminalScrollViewportTag = :: std:: os:: raw:: c_int ;
336321#[ repr( C ) ]
337322#[ derive( Copy , Clone ) ]
338323pub union GhosttyTerminalScrollViewportValue {
339324 pub delta : isize ,
340325 pub row : usize ,
326+ pub delta_prompt : isize ,
341327 pub _padding : [ u64 ; 2usize ] ,
342328}
343329#[ allow( clippy:: unnecessary_operation, clippy:: identity_op) ]
@@ -350,6 +336,8 @@ const _: () = {
350336 [ :: std:: mem:: offset_of!( GhosttyTerminalScrollViewportValue , delta) - 0usize ] ;
351337 [ "Offset of field: GhosttyTerminalScrollViewportValue::row" ]
352338 [ :: std:: mem:: offset_of!( GhosttyTerminalScrollViewportValue , row) - 0usize ] ;
339+ [ "Offset of field: GhosttyTerminalScrollViewportValue::delta_prompt" ]
340+ [ :: std:: mem:: offset_of!( GhosttyTerminalScrollViewportValue , delta_prompt) - 0usize ] ;
353341 [ "Offset of field: GhosttyTerminalScrollViewportValue::_padding" ]
354342 [ :: std:: mem:: offset_of!( GhosttyTerminalScrollViewportValue , _padding) - 0usize ] ;
355343} ;
@@ -426,8 +414,29 @@ pub const GHOSTTY_TERMINAL_OPT_DEFAULT_CURSOR_BLINK: GhosttyTerminalOption = 23;
426414pub const GHOSTTY_TERMINAL_OPT_GLYPH_PROTOCOL : GhosttyTerminalOption = 24 ;
427415pub const GHOSTTY_TERMINAL_OPT_PWD_CHANGED : GhosttyTerminalOption = 25 ;
428416pub const GHOSTTY_TERMINAL_OPT_CLIPBOARD_WRITE : GhosttyTerminalOption = 26 ;
417+ pub const GHOSTTY_TERMINAL_OPT_SCROLLBACK_MAX_BYTES : GhosttyTerminalOption = 27 ;
418+ pub const GHOSTTY_TERMINAL_OPT_SCROLLBACK_MAX_LINES : GhosttyTerminalOption = 28 ;
419+ pub const GHOSTTY_TERMINAL_OPT_DESKTOP_NOTIFICATION : GhosttyTerminalOption = 29 ;
420+ pub const GHOSTTY_TERMINAL_OPT_PROGRESS_REPORT : GhosttyTerminalOption = 30 ;
421+ pub const GHOSTTY_TERMINAL_OPT_CONTINUATION_MAX_BYTES : GhosttyTerminalOption = 31 ;
422+ pub const GHOSTTY_TERMINAL_OPT_TITLE_REPORT : GhosttyTerminalOption = 32 ;
423+ pub const GHOSTTY_TERMINAL_OPT_MODE_DEFAULT : GhosttyTerminalOption = 33 ;
424+ pub const GHOSTTY_TERMINAL_OPT_MODE : GhosttyTerminalOption = 34 ;
425+ pub const GHOSTTY_TERMINAL_OPT_UNKNOWN_SEQUENCE : GhosttyTerminalOption = 35 ;
426+ pub const GHOSTTY_TERMINAL_OPT_UNKNOWN_MAX_BYTES : GhosttyTerminalOption = 36 ;
427+ pub const GHOSTTY_TERMINAL_OPT_TERMINFO_NAME : GhosttyTerminalOption = 37 ;
428+ pub const GHOSTTY_TERMINAL_OPT_CLIPBOARD_READ : GhosttyTerminalOption = 38 ;
429+ pub const GHOSTTY_TERMINAL_OPT_CLIPBOARD_WRITE_MAX_BYTES : GhosttyTerminalOption = 39 ;
430+ pub const GHOSTTY_TERMINAL_OPT_RESIZE_PULL_SCROLLBACK : GhosttyTerminalOption = 40 ;
431+ pub const GHOSTTY_TERMINAL_OPT_RENDER_HOLD : GhosttyTerminalOption = 41 ;
432+ pub const GHOSTTY_TERMINAL_OPT_SEMANTIC_PROMPT : GhosttyTerminalOption = 42 ;
433+ pub const GHOSTTY_TERMINAL_OPT_RESET : GhosttyTerminalOption = 43 ;
434+ pub const GHOSTTY_TERMINAL_OPT_XT_CHECKSUM_REPORT : GhosttyTerminalOption = 44 ;
435+ pub const GHOSTTY_TERMINAL_OPT_XT_CHECKSUM_EXTENSION : GhosttyTerminalOption = 45 ;
436+ pub const GHOSTTY_TERMINAL_OPT_PROGRAM_STATUS : GhosttyTerminalOption = 46 ;
437+ pub const GHOSTTY_TERMINAL_OPT_RESIZE_WINDOW : GhosttyTerminalOption = 47 ;
429438pub const GHOSTTY_TERMINAL_OPT_MAX_VALUE : GhosttyTerminalOption = 2147483647 ;
430- pub type GhosttyTerminalOption = :: std:: os:: raw:: c_uint ;
439+ pub type GhosttyTerminalOption = :: std:: os:: raw:: c_int ;
431440pub const GHOSTTY_TERMINAL_DATA_INVALID : GhosttyTerminalData = 0 ;
432441pub const GHOSTTY_TERMINAL_DATA_COLS : GhosttyTerminalData = 1 ;
433442pub const GHOSTTY_TERMINAL_DATA_ROWS : GhosttyTerminalData = 2 ;
@@ -462,13 +471,23 @@ pub const GHOSTTY_TERMINAL_DATA_KITTY_GRAPHICS: GhosttyTerminalData = 30;
462471pub const GHOSTTY_TERMINAL_DATA_SELECTION : GhosttyTerminalData = 31 ;
463472pub const GHOSTTY_TERMINAL_DATA_VIEWPORT_ACTIVE : GhosttyTerminalData = 32 ;
464473pub const GHOSTTY_TERMINAL_DATA_VT_PROCESSING_ERROR : GhosttyTerminalData = 33 ;
474+ pub const GHOSTTY_TERMINAL_DATA_SCROLLBACK_MAX_BYTES : GhosttyTerminalData = 34 ;
475+ pub const GHOSTTY_TERMINAL_DATA_SCROLLBACK_MAX_LINES : GhosttyTerminalData = 35 ;
476+ pub const GHOSTTY_TERMINAL_DATA_CONTINUATION_MAX_BYTES : GhosttyTerminalData = 36 ;
477+ pub const GHOSTTY_TERMINAL_DATA_MODE : GhosttyTerminalData = 37 ;
478+ pub const GHOSTTY_TERMINAL_DATA_VT_GROUND : GhosttyTerminalData = 38 ;
479+ pub const GHOSTTY_TERMINAL_DATA_CURSOR_AT_PROMPT : GhosttyTerminalData = 39 ;
480+ pub const GHOSTTY_TERMINAL_DATA_CLIPBOARD_WRITE_MAX_BYTES : GhosttyTerminalData = 40 ;
481+ pub const GHOSTTY_TERMINAL_DATA_MOUSE_SHAPE : GhosttyTerminalData = 41 ;
482+ pub const GHOSTTY_TERMINAL_DATA_MEMORY_USAGE : GhosttyTerminalData = 42 ;
465483pub const GHOSTTY_TERMINAL_DATA_MAX_VALUE : GhosttyTerminalData = 2147483647 ;
466- pub type GhosttyTerminalData = :: std:: os:: raw:: c_uint ;
484+ pub type GhosttyTerminalData = :: std:: os:: raw:: c_int ;
467485unsafe extern "C" {
468486 pub fn ghostty_terminal_new (
469487 allocator : * const GhosttyAllocator ,
470488 terminal : * mut GhosttyTerminal ,
471- options : GhosttyTerminalOptions ,
489+ cols : u16 ,
490+ rows : u16 ,
472491 ) -> GhosttyResult ;
473492}
474493unsafe extern "C" {
0 commit comments