From 0dabc5607640f385da4fa5eb73a6bbf6e104371d Mon Sep 17 00:00:00 2001 From: Leroy Hopson Date: Thu, 24 Sep 2020 14:27:26 +0700 Subject: [PATCH] Update file format Automatically updated by VSCode upon saving the files. --- .../godot_xterm/native/src/pseudoterminal.h | 48 +++++------ addons/godot_xterm/native/src/terminal.h | 82 +++++++++---------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/addons/godot_xterm/native/src/pseudoterminal.h b/addons/godot_xterm/native/src/pseudoterminal.h index 82c044b..98bd1a3 100644 --- a/addons/godot_xterm/native/src/pseudoterminal.h +++ b/addons/godot_xterm/native/src/pseudoterminal.h @@ -9,39 +9,39 @@ namespace godot { -class Pseudoterminal : public Node -{ - GODOT_CLASS(Pseudoterminal, Node) + class Pseudoterminal : public Node + { + GODOT_CLASS(Pseudoterminal, Node) -public: - static const int MAX_READ_BUFFER_LENGTH = 1024; - static const int MAX_WRITE_BUFFER_LENGTH = 1024; + public: + static const int MAX_READ_BUFFER_LENGTH = 1024; + static const int MAX_WRITE_BUFFER_LENGTH = 1024; -private: - std::thread pty_thread; - bool should_process_pty; + private: + std::thread pty_thread; + bool should_process_pty; - char write_buffer[MAX_WRITE_BUFFER_LENGTH]; - int bytes_to_write; - std::mutex write_buffer_mutex; + char write_buffer[MAX_WRITE_BUFFER_LENGTH]; + int bytes_to_write; + std::mutex write_buffer_mutex; - char read_buffer[MAX_READ_BUFFER_LENGTH]; - int bytes_to_read; - std::mutex read_buffer_mutex; + char read_buffer[MAX_READ_BUFFER_LENGTH]; + int bytes_to_read; + std::mutex read_buffer_mutex; - void process_pty(); + void process_pty(); -public: - static void _register_methods(); + public: + static void _register_methods(); - Pseudoterminal(); - ~Pseudoterminal(); + Pseudoterminal(); + ~Pseudoterminal(); - void _init(); - void _ready(); + void _init(); + void _ready(); - void put_data(PoolByteArray data); -}; + void put_data(PoolByteArray data); + }; } // namespace godot #endif // PSEUDOTERMINAL_H \ No newline at end of file diff --git a/addons/godot_xterm/native/src/terminal.h b/addons/godot_xterm/native/src/terminal.h index b10447a..e15d1b6 100644 --- a/addons/godot_xterm/native/src/terminal.h +++ b/addons/godot_xterm/native/src/terminal.h @@ -11,63 +11,63 @@ namespace godot { -class Terminal : public Control -{ - GODOT_CLASS(Terminal, Control) - -public: - struct cell + class Terminal : public Control { - char ch[5]; - struct tsm_screen_attr attr; - } empty_cell = {ch : {0, 0, 0, 0, 0}, attr : {}}; + GODOT_CLASS(Terminal, Control) -public: - typedef std::vector> Cells; - typedef std::vector Row; + public: + struct cell + { + char ch[5]; + struct tsm_screen_attr attr; + } empty_cell = {ch : {0, 0, 0, 0, 0}, attr : {}}; - Cells cells; + public: + typedef std::vector> Cells; + typedef std::vector Row; -protected: - tsm_screen *screen; - tsm_vte *vte; + Cells cells; -private: - static const uint8_t default_color_palette[TSM_COLOR_NUM][3]; + protected: + tsm_screen *screen; + tsm_vte *vte; - Vector2 cell_size; - std::map palette = {}; + private: + static const uint8_t default_color_palette[TSM_COLOR_NUM][3]; - void update_size(); + Vector2 cell_size; + std::map palette = {}; - void update_color_palette(); - std::pair get_cell_colors(int row, int col); - void draw_background(int row, int col, Color bgcol); - void draw_foreground(int row, int col, Color fgcol); + void update_size(); -public: - static void _register_methods(); + void update_color_palette(); + std::pair get_cell_colors(int row, int col); + void draw_background(int row, int col, Color bgcol); + void draw_foreground(int row, int col, Color fgcol); - Terminal(); - ~Terminal(); + public: + static void _register_methods(); - void _init(); - void _ready(); - void _notification(int what); - void _input(Variant event); - void _draw(); + Terminal(); + ~Terminal(); - void write(PoolByteArray bytes); + void _init(); + void _ready(); + void _notification(int what); + void _input(Variant event); + void _draw(); - int rows; - int cols; + void write(PoolByteArray bytes); - bool sleep; + int rows; + int cols; - uint8_t color_palette[TSM_COLOR_NUM][3]; + bool sleep; - tsm_age_t framebuffer_age; -}; + uint8_t color_palette[TSM_COLOR_NUM][3]; + + tsm_age_t framebuffer_age; + }; } // namespace godot #endif // TERMINAL_H \ No newline at end of file