libghostty
Loading...
Searching...
No Matches
point.h
Go to the documentation of this file.
1
6
7
#ifndef GHOSTTY_VT_POINT_H
8
#define GHOSTTY_VT_POINT_H
9
10
#include <stdint.h>
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
24
30
typedef
struct
{
32
uint16_t
x
;
33
35
uint32_t
y
;
36
}
GhosttyPointCoordinate
;
37
45
typedef
enum
GHOSTTY_ENUM_TYPED
{
47
GHOSTTY_POINT_TAG_ACTIVE
= 0,
48
50
GHOSTTY_POINT_TAG_VIEWPORT
= 1,
51
53
GHOSTTY_POINT_TAG_SCREEN
= 2,
54
56
GHOSTTY_POINT_TAG_HISTORY
= 3,
57
GHOSTTY_POINT_TAG_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
58
}
GhosttyPointTag
;
59
65
typedef
union
{
67
GhosttyPointCoordinate
coordinate
;
68
70
uint64_t
_padding
[2];
71
}
GhosttyPointValue
;
72
78
typedef
struct
{
79
GhosttyPointTag
tag;
80
GhosttyPointValue
value;
81
}
GhosttyPoint
;
82
84
85
#ifdef __cplusplus
86
}
87
#endif
88
89
#endif
/* GHOSTTY_VT_POINT_H */
GhosttyPointTag
GhosttyPointTag
Definition
point.h:45
GHOSTTY_POINT_TAG_ACTIVE
@ GHOSTTY_POINT_TAG_ACTIVE
Definition
point.h:47
GHOSTTY_POINT_TAG_SCREEN
@ GHOSTTY_POINT_TAG_SCREEN
Definition
point.h:53
GHOSTTY_POINT_TAG_VIEWPORT
@ GHOSTTY_POINT_TAG_VIEWPORT
Definition
point.h:50
GHOSTTY_POINT_TAG_HISTORY
@ GHOSTTY_POINT_TAG_HISTORY
Definition
point.h:56
GhosttyPointCoordinate
Definition
point.h:30
GhosttyPointCoordinate::x
uint16_t x
Definition
point.h:32
GhosttyPointCoordinate::y
uint32_t y
Definition
point.h:35
GhosttyPoint
Definition
point.h:78
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:67
GhosttyPointValue
Definition
point.h:65
GhosttyPointValue::_padding
uint64_t _padding[2]
Definition
point.h:70
GhosttyPointValue::coordinate
GhosttyPointCoordinate coordinate
Definition
point.h:67
include
ghostty
vt
point.h
Generated by
1.16.1