libghostty
Toggle main menu visibility
Loading...
Searching...
No Matches
device.h
Go to the documentation of this file.
1
7
8
#ifndef GHOSTTY_VT_DEVICE_H
9
#define GHOSTTY_VT_DEVICE_H
10
11
#include <stddef.h>
12
#include <stdint.h>
13
14
#include <
ghostty/vt/types.h
>
15
16
/* DA1 conformance levels (Pp parameter). */
17
#define GHOSTTY_DA_CONFORMANCE_VT100 1
18
#define GHOSTTY_DA_CONFORMANCE_VT101 1
19
#define GHOSTTY_DA_CONFORMANCE_VT102 6
20
#define GHOSTTY_DA_CONFORMANCE_VT125 12
21
#define GHOSTTY_DA_CONFORMANCE_VT131 7
22
#define GHOSTTY_DA_CONFORMANCE_VT132 4
23
#define GHOSTTY_DA_CONFORMANCE_VT220 62
24
#define GHOSTTY_DA_CONFORMANCE_VT240 62
25
#define GHOSTTY_DA_CONFORMANCE_VT320 63
26
#define GHOSTTY_DA_CONFORMANCE_VT340 63
27
#define GHOSTTY_DA_CONFORMANCE_VT420 64
28
#define GHOSTTY_DA_CONFORMANCE_VT510 65
29
#define GHOSTTY_DA_CONFORMANCE_VT520 65
30
#define GHOSTTY_DA_CONFORMANCE_VT525 65
31
#define GHOSTTY_DA_CONFORMANCE_LEVEL_2 62
32
#define GHOSTTY_DA_CONFORMANCE_LEVEL_3 63
33
#define GHOSTTY_DA_CONFORMANCE_LEVEL_4 64
34
#define GHOSTTY_DA_CONFORMANCE_LEVEL_5 65
35
36
/* DA1 feature codes (Ps parameters). */
37
#define GHOSTTY_DA_FEATURE_COLUMNS_132 1
38
#define GHOSTTY_DA_FEATURE_PRINTER 2
39
#define GHOSTTY_DA_FEATURE_REGIS 3
40
#define GHOSTTY_DA_FEATURE_SIXEL 4
41
#define GHOSTTY_DA_FEATURE_SELECTIVE_ERASE 6
42
#define GHOSTTY_DA_FEATURE_USER_DEFINED_KEYS 8
43
#define GHOSTTY_DA_FEATURE_NATIONAL_REPLACEMENT 9
44
#define GHOSTTY_DA_FEATURE_TECHNICAL_CHARACTERS 15
45
#define GHOSTTY_DA_FEATURE_LOCATOR 16
46
#define GHOSTTY_DA_FEATURE_TERMINAL_STATE 17
47
#define GHOSTTY_DA_FEATURE_WINDOWING 18
48
#define GHOSTTY_DA_FEATURE_HORIZONTAL_SCROLLING 21
49
#define GHOSTTY_DA_FEATURE_ANSI_COLOR 22
50
#define GHOSTTY_DA_FEATURE_RECTANGULAR_EDITING 28
51
#define GHOSTTY_DA_FEATURE_ANSI_TEXT_LOCATOR 29
52
#define GHOSTTY_DA_FEATURE_CLIPBOARD 52
53
54
/* DA2 device type identifiers (Pp parameter). */
55
#define GHOSTTY_DA_DEVICE_TYPE_VT100 0
56
#define GHOSTTY_DA_DEVICE_TYPE_VT220 1
57
#define GHOSTTY_DA_DEVICE_TYPE_VT240 2
58
#define GHOSTTY_DA_DEVICE_TYPE_VT330 18
59
#define GHOSTTY_DA_DEVICE_TYPE_VT340 19
60
#define GHOSTTY_DA_DEVICE_TYPE_VT320 24
61
#define GHOSTTY_DA_DEVICE_TYPE_VT382 32
62
#define GHOSTTY_DA_DEVICE_TYPE_VT420 41
63
#define GHOSTTY_DA_DEVICE_TYPE_VT510 61
64
#define GHOSTTY_DA_DEVICE_TYPE_VT520 64
65
#define GHOSTTY_DA_DEVICE_TYPE_VT525 65
66
67
#ifdef __cplusplus
68
extern
"C"
{
69
#endif
70
76
typedef
enum
GHOSTTY_ENUM_TYPED
{
77
GHOSTTY_COLOR_SCHEME_LIGHT = 0,
78
GHOSTTY_COLOR_SCHEME_DARK = 1,
79
GHOSTTY_COLOR_SCHEME_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
80
}
GhosttyColorScheme
;
81
91
typedef
struct
{
93
uint16_t
conformance_level
;
94
96
uint16_t
features
[64];
97
99
size_t
num_features
;
100
}
GhosttyDeviceAttributesPrimary
;
101
110
typedef
struct
{
112
uint16_t
device_type
;
113
115
uint16_t
firmware_version
;
116
118
uint16_t
rom_cartridge
;
119
}
GhosttyDeviceAttributesSecondary
;
120
129
typedef
struct
{
131
uint32_t
unit_id
;
132
}
GhosttyDeviceAttributesTertiary
;
133
143
typedef
struct
{
144
GhosttyDeviceAttributesPrimary
primary;
145
GhosttyDeviceAttributesSecondary
secondary;
146
GhosttyDeviceAttributesTertiary
tertiary;
147
}
GhosttyDeviceAttributes
;
148
149
#ifdef __cplusplus
150
}
151
#endif
152
153
#endif
/* GHOSTTY_VT_DEVICE_H */
GhosttyColorScheme
GhosttyColorScheme
Definition
device.h:76
GhosttyDeviceAttributesPrimary
Definition
device.h:91
GhosttyDeviceAttributesPrimary::num_features
size_t num_features
Definition
device.h:99
GhosttyDeviceAttributesPrimary::conformance_level
uint16_t conformance_level
Definition
device.h:93
GhosttyDeviceAttributesPrimary::features
uint16_t features[64]
Definition
device.h:96
GhosttyDeviceAttributesSecondary
Definition
device.h:110
GhosttyDeviceAttributesSecondary::firmware_version
uint16_t firmware_version
Definition
device.h:115
GhosttyDeviceAttributesSecondary::device_type
uint16_t device_type
Definition
device.h:112
GhosttyDeviceAttributesSecondary::rom_cartridge
uint16_t rom_cartridge
Definition
device.h:118
GhosttyDeviceAttributesTertiary
Definition
device.h:129
GhosttyDeviceAttributesTertiary::unit_id
uint32_t unit_id
Definition
device.h:131
GhosttyDeviceAttributes
Definition
device.h:143
types.h
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:81
include
ghostty
vt
device.h
Generated by
1.18.0