mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-25 02:30:27 +01:00
Update file format
Automatically updated by VSCode upon saving the files.
Former-commit-id: 0dabc56076
This commit is contained in:
parent
e59db03d11
commit
9d06d7c313
2 changed files with 65 additions and 65 deletions
|
@ -9,15 +9,15 @@
|
|||
namespace godot
|
||||
{
|
||||
|
||||
class Pseudoterminal : public Node
|
||||
{
|
||||
class Pseudoterminal : public Node
|
||||
{
|
||||
GODOT_CLASS(Pseudoterminal, Node)
|
||||
|
||||
public:
|
||||
public:
|
||||
static const int MAX_READ_BUFFER_LENGTH = 1024;
|
||||
static const int MAX_WRITE_BUFFER_LENGTH = 1024;
|
||||
|
||||
private:
|
||||
private:
|
||||
std::thread pty_thread;
|
||||
bool should_process_pty;
|
||||
|
||||
|
@ -31,7 +31,7 @@ private:
|
|||
|
||||
void process_pty();
|
||||
|
||||
public:
|
||||
public:
|
||||
static void _register_methods();
|
||||
|
||||
Pseudoterminal();
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
void _ready();
|
||||
|
||||
void put_data(PoolByteArray data);
|
||||
};
|
||||
};
|
||||
} // namespace godot
|
||||
|
||||
#endif // PSEUDOTERMINAL_H
|
|
@ -11,28 +11,28 @@
|
|||
namespace godot
|
||||
{
|
||||
|
||||
class Terminal : public Control
|
||||
{
|
||||
class Terminal : public Control
|
||||
{
|
||||
GODOT_CLASS(Terminal, Control)
|
||||
|
||||
public:
|
||||
public:
|
||||
struct cell
|
||||
{
|
||||
char ch[5];
|
||||
struct tsm_screen_attr attr;
|
||||
} empty_cell = {ch : {0, 0, 0, 0, 0}, attr : {}};
|
||||
|
||||
public:
|
||||
public:
|
||||
typedef std::vector<std::vector<struct cell>> Cells;
|
||||
typedef std::vector<struct cell> Row;
|
||||
|
||||
Cells cells;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
tsm_screen *screen;
|
||||
tsm_vte *vte;
|
||||
|
||||
private:
|
||||
private:
|
||||
static const uint8_t default_color_palette[TSM_COLOR_NUM][3];
|
||||
|
||||
Vector2 cell_size;
|
||||
|
@ -45,7 +45,7 @@ private:
|
|||
void draw_background(int row, int col, Color bgcol);
|
||||
void draw_foreground(int row, int col, Color fgcol);
|
||||
|
||||
public:
|
||||
public:
|
||||
static void _register_methods();
|
||||
|
||||
Terminal();
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
uint8_t color_palette[TSM_COLOR_NUM][3];
|
||||
|
||||
tsm_age_t framebuffer_age;
|
||||
};
|
||||
};
|
||||
} // namespace godot
|
||||
|
||||
#endif // TERMINAL_H
|
Loading…
Reference in a new issue