Commit afa9e4f
authored
libghostty: add configurable mode defaults, remove mode_set/get (ghostty-org#13661)
ABI BREAKING: This removes `ghostty_terminal_mode_get` and `_mode_set`.
We can now represent these operations completely with standard
`ghostty_terminal_get` and `ghostty_terminal_set`, which makes it much
more flexible to preserve ABI in the future.
This is all centered around a new `GhosttyTerminalModeConfig` structure
that is an in or out parameter depending on use case.
This also adds a new `GHOSTTY_TERMINAL_OPT_MODE_DEFAULT` option that can
be used to set the _default_ value of mode that happens when a RIS event
(full reset) is sent. Note that not all modes are configurable because
some are set based on live terminal state and aren't modes in and of
themselves.
## Why Delete Functions? Why Not Add?
Once tagged, the goal of `libghostty-vt` is to remain HIGHLY ABI
compatible. We are striving for top tier ABI compatibility similar to
legendary C libraries. That means we need to be highly confident in our
API shapes: functions, structs, etc. and using shapes that we can retain
ABI compatibility even as we add features. Every function is a risk. By
pushing stuff into our `_get/_set` patterns, its easier to maintain ABI
compatibility.6 files changed
Lines changed: 316 additions & 136 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
698 | 716 | | |
699 | 717 | | |
700 | 718 | | |
| |||
1060 | 1078 | | |
1061 | 1079 | | |
1062 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1063 | 1106 | | |
1064 | 1107 | | |
1065 | 1108 | | |
| |||
1420 | 1463 | | |
1421 | 1464 | | |
1422 | 1465 | | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
1423 | 1477 | | |
1424 | 1478 | | |
1425 | 1479 | | |
| |||
1709 | 1763 | | |
1710 | 1764 | | |
1711 | 1765 | | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | 1766 | | |
1748 | 1767 | | |
1749 | 1768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | 287 | | |
290 | 288 | | |
291 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
| |||
0 commit comments