libghostty
Toggle main menu visibility
Loading...
Searching...
No Matches
style.h
Go to the documentation of this file.
1
6
7
#ifndef GHOSTTY_VT_STYLE_H
8
#define GHOSTTY_VT_STYLE_H
9
10
#include <
ghostty/vt/color.h
>
11
#include <
ghostty/vt/types.h
>
12
#include <stdbool.h>
13
#include <stddef.h>
14
#include <stdint.h>
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
30
39
typedef
uint16_t
GhosttyStyleId
;
40
49
typedef
enum
GHOSTTY_ENUM_TYPED
{
50
GHOSTTY_STYLE_COLOR_NONE = 0,
51
GHOSTTY_STYLE_COLOR_PALETTE = 1,
52
GHOSTTY_STYLE_COLOR_RGB = 2,
53
GHOSTTY_STYLE_COLOR_TAG_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
54
}
GhosttyStyleColorTag
;
55
63
typedef
union
{
64
GhosttyColorPaletteIndex
palette;
65
GhosttyColorRgb
rgb;
66
uint64_t _padding;
67
}
GhosttyStyleColorValue
;
68
77
typedef
struct
{
78
GhosttyStyleColorTag
tag;
79
GhosttyStyleColorValue
value;
80
}
GhosttyStyleColor
;
81
94
typedef
struct
{
95
size_t
size;
96
GhosttyStyleColor
fg_color;
97
GhosttyStyleColor
bg_color;
98
GhosttyStyleColor
underline_color;
99
bool
bold;
100
bool
italic;
101
bool
faint;
102
bool
blink;
103
bool
inverse;
104
bool
invisible;
105
bool
strikethrough;
106
bool
overline;
107
int
underline
;
108
}
GhosttyStyle
;
109
119
GHOSTTY_API
void
ghostty_style_default
(
GhosttyStyle
* style);
120
131
GHOSTTY_API
bool
ghostty_style_is_default
(
const
GhosttyStyle
* style);
132
133
#ifdef __cplusplus
134
}
135
#endif
136
138
139
#endif
/* GHOSTTY_VT_STYLE_H */
color.h
GhosttyColorPaletteIndex
uint8_t GhosttyColorPaletteIndex
Definition
color.h:141
GhosttyStyleId
uint16_t GhosttyStyleId
Definition
style.h:39
GhosttyStyleColorTag
GhosttyStyleColorTag
Definition
style.h:49
ghostty_style_is_default
GHOSTTY_API bool ghostty_style_is_default(const GhosttyStyle *style)
ghostty_style_default
GHOSTTY_API void ghostty_style_default(GhosttyStyle *style)
GhosttyColorRgb
Definition
color.h:130
GhosttyStyleColor
Definition
style.h:77
GhosttyStyle
Definition
style.h:94
GhosttyStyle::underline
int underline
Definition
style.h:107
types.h
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:81
GhosttyStyleColorValue
Definition
style.h:63
include
ghostty
vt
style.h
Generated by
1.18.0