From 24cb6f970e89b6c2dffb5fcca8736881fd2decf7 Mon Sep 17 00:00:00 2001 From: Jonathan Griffitts Date: Tue, 28 Nov 2023 12:04:08 -0700 Subject: [PATCH 1/3] Added interface to Terminal widget --- .gitignore | 6 +- fltk | 2 +- include/cfl_group.h | 161 +++++++++++++++++++++++ src/cfl_group.cpp | 302 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 469 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c12bc4b..8c1b86d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,8 @@ compile_commands.json /bin /temp /.cache -/examples/bin \ No newline at end of file +/examples/bin +/out +/\.vs/cfltk/FileContentIndex +/\.vs/cfltk/v17 +.*\.sqlite diff --git a/fltk b/fltk index 01d30ed..5737136 160000 --- a/fltk +++ b/fltk @@ -1 +1 @@ -Subproject commit 01d30ed9cc4c080dea45ee85ec7af76cbd7e61bb +Subproject commit 57371365d8933542ebe7c78651f621e1273733cf diff --git a/include/cfl_group.h b/include/cfl_group.h index c149f66..f980179 100644 --- a/include/cfl_group.h +++ b/include/cfl_group.h @@ -151,6 +151,167 @@ void Fl_Grid_debug(Fl_Grid *self, int level); GROUP_DECLARE(Fl_Grid) +WIDGET_DECLARE(Fl_Terminal) + +int Fl_Terminal_ansi(Fl_Terminal *self); + +void Fl_Terminal_set_ansi(Fl_Terminal *self, int boolean); + +void Fl_Terminal_append(Fl_Terminal *self, const char *txt); + +void Fl_Terminal_append2(Fl_Terminal *self, const char *txt, int len); + +void Fl_Terminal_append_ascii(Fl_Terminal *self, const char *txt); + +// void Fl_Terminal_append_ascii2(Fl_Terminal *self, const char *txt, int len); + +void Fl_Terminal_append_utf8(Fl_Terminal *self, const char *txt); + +void Fl_Terminal_append_utf8_2(Fl_Terminal *self, const char *txt, int len); + +// int Fl_Terminal_box(Fl_Terminal *self); // Actually Fl_BoxType todo?: +// handled in cfl_macros.h + +// void Fl_Terminal_set_box(Fl_Terminal *self, int set); + +void Fl_Terminal_clear_history(Fl_Terminal *self); + +int Fl_Terminal_cursor_col(Fl_Terminal *self); + +// void Fl_Terminal_set_cursor_col(Fl_Terminal *self, int set); // Can't +// use: not public + +int Fl_Terminal_cursor_row(Fl_Terminal *self); + +// void Fl_Terminal_set_cursor_row(Fl_Terminal *self, int set); // Can't +// use: not public + +unsigned Fl_Terminal_cursor_bg_color(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_cursor_bg_color(Fl_Terminal *self, unsigned set); + +unsigned Fl_Terminal_cursor_fg_color(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_cursor_fg_color(Fl_Terminal *self, unsigned set); + +int Fl_Terminal_display_columns(Fl_Terminal *self); + +void Fl_Terminal_set_display_columns(Fl_Terminal *self, int set); + +int Fl_Terminal_display_rows(Fl_Terminal *self); + +void Fl_Terminal_set_display_rows(Fl_Terminal *self, int set); + +// todo? int Fl_Terminal_draw(Fl_Terminal *self); + +// todo? constructor? + +// todo? int Fl_Terminal_handle(Fl_Terminal *self); + +int Fl_Terminal_history_lines(Fl_Terminal *self); + +void Fl_Terminal_set_history_lines(Fl_Terminal *self, int set); + +int Fl_Terminal_history_rows(Fl_Terminal *self); + +void Fl_Terminal_set_history_rows(Fl_Terminal *self, int set); + +int Fl_Terminal_history_use(Fl_Terminal *self); + +int Fl_Terminal_margin_bottom(Fl_Terminal *self); + +void Fl_Terminal_set_margin_bottom(Fl_Terminal *self, int set); + +int Fl_Terminal_margin_left(Fl_Terminal *self); + +void Fl_Terminal_set_margin_left(Fl_Terminal *self, int set); + +int Fl_Terminal_margin_right(Fl_Terminal *self); + +void Fl_Terminal_set_margin_right(Fl_Terminal *self, int set); + +int Fl_Terminal_margin_top(Fl_Terminal *self); + +void Fl_Terminal_set_margin_top(Fl_Terminal *self, int set); + +void Fl_Terminal_print_char(Fl_Terminal *self, char c); + +void Fl_Terminal_print_char2(Fl_Terminal *self, const char *txt, int len); + +// Fl_Terminal_printf not supported for Rust + +void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col); + +void Fl_Terminal_put_char2(Fl_Terminal *self, const char *txt, int len, int row, + int col); + +float Fl_Terminal_redraw_rate(Fl_Terminal *self); + +void Fl_Terminal_set_redraw_rate(Fl_Terminal *self, float set); + +int Fl_Terminal_redraw_style(Fl_Terminal *self); // Actually enum RedrawStyle + +void Fl_Terminal_set_redraw_style(Fl_Terminal *self, int set); + +void Fl_Terminal_reset_terminal(Fl_Terminal *self); + +// todo? int Fl_Terminal_resize(Fl_Terminal *self, int X, int Y, int W, int H); + +int Fl_Terminal_scrollbar_actual_size(Fl_Terminal *self); + +int Fl_Terminal_scrollbar_size(Fl_Terminal *self); + +void Fl_Terminal_set_scrollbar_size(Fl_Terminal *self, int set); + +unsigned Fl_Terminal_selection_bg_color(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_selection_bg_color(Fl_Terminal *self, unsigned set); + +unsigned Fl_Terminal_selection_fg_color(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_selection_fg_color(Fl_Terminal *self, unsigned set); + +int Fl_Terminal_show_unknown(Fl_Terminal *self); + +void Fl_Terminal_set_show_unknown(Fl_Terminal *self, int boolean); + +void Fl_Terminal_text_attrib(Fl_Terminal *self, + unsigned set); // Actually Fl_Color + +unsigned Fl_Terminal_text_bg_color(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_text_bg_color(Fl_Terminal *self, unsigned set); + +unsigned +Fl_Terminal_text_bg_color_default(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_text_bg_color_default(Fl_Terminal *self, unsigned set); + +void Fl_Terminal_set_text_bg_color_xterm(Fl_Terminal *self, unsigned char set); + +unsigned Fl_Terminal_text_fg_color(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_text_fg_color(Fl_Terminal *self, unsigned set); + +unsigned +Fl_Terminal_text_fg_color_default(Fl_Terminal *self); // Actually Fl_Color + +void Fl_Terminal_set_text_fg_color_default(Fl_Terminal *self, unsigned set); + +void Fl_Terminal_set_text_fg_color_xterm(Fl_Terminal *self, unsigned char set); + +int Fl_Terminal_text_font(Fl_Terminal *self); // Actually Fl_Font + +void Fl_Terminal_set_text_font(Fl_Terminal *self, int set); + +int Fl_Terminal_text_size(Fl_Terminal *self); + +void Fl_Terminal_set_text_size(Fl_Terminal *self, int set); + +// Fl_Terminal_vprintf not supported for Rust + +GROUP_DECLARE(Fl_Terminal) + #ifdef __cplusplus } #endif diff --git a/src/cfl_group.cpp b/src/cfl_group.cpp index 14f3888..d49ee07 100644 --- a/src/cfl_group.cpp +++ b/src/cfl_group.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -304,3 +305,304 @@ void Fl_Grid_debug(Fl_Grid *self, int level) { } GROUP_DEFINE(Fl_Grid) + +WIDGET_CLASS(Fl_Terminal) + +WIDGET_DEFINE(Fl_Terminal) + +void Fl_Terminal_set_ansi(Fl_Terminal *self, int boolean) { + LOCK(self->ansi(boolean)); +} + +int Fl_Terminal_ansi(Fl_Terminal *self) { + LOCK(auto ret = self->ansi()); + return ret; +} + +void Fl_Terminal_append(Fl_Terminal *self, const char *txt) { + LOCK(self->append(txt)); +} + +void Fl_Terminal_append2(Fl_Terminal *self, const char *txt, int len) { + LOCK(self->append(txt)); +} + +void Fl_Terminal_append_ascii(Fl_Terminal *self, const char *txt) { + LOCK(self->append_ascii(txt)); +} + +// void Fl_Terminal_append_ascii2(Fl_Terminal *self, const char *txt, int len) { +// LOCK(self->append_ascii(txt)); +// } + +void Fl_Terminal_append_utf8(Fl_Terminal *self, const char *txt) { + LOCK(self->append_utf8(txt)); +} + +void Fl_Terminal_append_utf8_2(Fl_Terminal *self, const char *txt, int len) { + LOCK(self->append_utf8(txt)); +} + +void Fl_Terminal_clear_history(Fl_Terminal *self) { + LOCK(self->clear_history()); +} + +int Fl_Terminal_cursor_col(Fl_Terminal *self) { + LOCK(auto ret = self->cursor_col()); + return ret; +} + +int Fl_Terminal_cursor_row(Fl_Terminal *self) { + LOCK(auto ret = self->cursor_row()); + return ret; +} + +unsigned Fl_Terminal_cursor_bg_color(Fl_Terminal *self) { + LOCK(auto ret = self->cursorbgcolor()); + return ret; +} + +void Fl_Terminal_set_cursor_bg_color(Fl_Terminal *self, unsigned set) { + LOCK(self->cursorbgcolor((Fl_Color)set)); +} + +unsigned Fl_Terminal_cursor_fg_color(Fl_Terminal *self) { + LOCK(auto ret = self->cursorfgcolor()); + return ret; +} + +void Fl_Terminal_set_cursor_fg_color(Fl_Terminal *self, unsigned set) { + LOCK(self->cursorfgcolor((Fl_Color)set)); +} + +int Fl_Terminal_display_columns(Fl_Terminal *self) { + LOCK(auto ret = self->display_columns()); + return ret; +} + +void Fl_Terminal_set_display_columns(Fl_Terminal *self, int set) { + LOCK(self->display_columns(set)); +} + +int Fl_Terminal_display_rows(Fl_Terminal *self) { + LOCK(auto ret = self->display_rows()); + return ret; +} + +void Fl_Terminal_set_display_rows(Fl_Terminal *self, int set) { + LOCK(self->display_rows(set)); +} + +int Fl_Terminal_history_lines(Fl_Terminal *self) { + LOCK(auto ret = self->history_lines()); + return ret; +} + +void Fl_Terminal_set_history_lines(Fl_Terminal *self, int set) { + LOCK(self->history_lines(set)); +} + +int Fl_Terminal_history_rows(Fl_Terminal *self) { + LOCK(auto ret = self->history_rows()); + return ret; +} + +void Fl_Terminal_set_history_rows(Fl_Terminal *self, int set) { + LOCK(self->history_rows(set)); +} + +int Fl_Terminal_history_use(Fl_Terminal *self) { + LOCK(auto ret = self->history_use()); + return ret; +} + +int Fl_Terminal_margin_bottom(Fl_Terminal *self) { + LOCK(auto ret = self->margin_bottom()); + return ret; +} + +void Fl_Terminal_set_margin_bottom(Fl_Terminal *self, int set) { + LOCK(self->margin_bottom(set)); +} + +int Fl_Terminal_margin_left(Fl_Terminal *self) { + LOCK(auto ret = self->margin_left()); + return ret; +} + +void Fl_Terminal_set_margin_left(Fl_Terminal *self, int set) { + LOCK(self->margin_left(set)); +} + +int Fl_Terminal_margin_right(Fl_Terminal *self) { + LOCK(auto ret = self->margin_right()); + return ret; +} + +void Fl_Terminal_set_margin_right(Fl_Terminal *self, int set) { + LOCK(self->margin_right(set)); +} + +int Fl_Terminal_margin_top(Fl_Terminal *self) { + LOCK(auto ret = self->margin_top()); + return ret; +} + +void Fl_Terminal_set_margin_top(Fl_Terminal *self, int set) { + LOCK(self->margin_top(set)); +} + +void Fl_Terminal_print_char(Fl_Terminal *self, char c) { + LOCK(self->print_char(c)); +} + +void Fl_Terminal_print_char2(Fl_Terminal *self, const char *txt, int len) { + LOCK(self->print_char(txt, len)); +} + +void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col) { + LOCK(self->putchar(c, row, col)); +} + +void Fl_Terminal_put_char2(Fl_Terminal *self, const char *txt, int len, int row, + int col) { + LOCK(self->putchar(txt, len, row, col)); +} + +float Fl_Terminal_redraw_rate(Fl_Terminal *self) { + LOCK(auto ret = self->redraw_rate()); + return ret; +} + +void Fl_Terminal_set_redraw_rate(Fl_Terminal *self, float set) { + LOCK(self->redraw_rate(set)); +} + +int Fl_Terminal_redraw_style( + Fl_Terminal *self) { // Actually returns enum RedrawStyle + LOCK(auto ret = self->redraw_style()); + return ret; +} + +void Fl_Terminal_set_redraw_style(Fl_Terminal *self, int set) { + LOCK(self->redraw_style((Fl_Terminal::RedrawStyle)set)); +} + +void Fl_Terminal_reset_terminal(Fl_Terminal *self) { + LOCK(self->reset_terminal()); +} + +int Fl_Terminal_scrollbar_actual_size(Fl_Terminal *self) { + LOCK(auto ret = self->scrollbar_actual_size()); + return ret; +} + +int Fl_Terminal_scrollbar_size(Fl_Terminal *self) { + LOCK(auto ret = self->scrollbar_size()); + return ret; +} + +void Fl_Terminal_set_scrollbar_size(Fl_Terminal *self, int set) { + LOCK(self->scrollbar_size(set)); +} + +unsigned +Fl_Terminal_selection_bg_color(Fl_Terminal *self) { // Actually returns Fl_Color + LOCK(auto ret = self->selectionbgcolor()); + return ret; +} + +void Fl_Terminal_set_selection_bg_color(Fl_Terminal *self, unsigned set) { + LOCK(self->selectionbgcolor(set)); +} + +unsigned +Fl_Terminal_selection_fg_color(Fl_Terminal *self) { // Actually returns Fl_Color + LOCK(auto ret = self->selectionfgcolor()); + return ret; +} + +void Fl_Terminal_set_selection_fg_color(Fl_Terminal *self, unsigned set) { + LOCK(self->selectionfgcolor(set)); +} + +int Fl_Terminal_show_unknown(Fl_Terminal *self) { + LOCK(auto ret = self->show_unknown()); + return ret; +} + +void Fl_Terminal_set_show_unknown(Fl_Terminal *self, int boolean) { + LOCK(self->show_unknown(boolean)); +} + +void Fl_Terminal_text_attrib(Fl_Terminal *self, unsigned set) { + LOCK(self->textattrib(set)); +} + +unsigned +Fl_Terminal_text_bg_color(Fl_Terminal *self) { // Actually returns Fl_Color + LOCK(auto ret = self->textbgcolor()); + return ret; +} + +void Fl_Terminal_set_text_bg_color(Fl_Terminal *self, unsigned set) { + LOCK(self->textbgcolor(set)); +} + +unsigned Fl_Terminal_text_bg_color_default( + Fl_Terminal *self) { // Actually returns Fl_Color + LOCK(auto ret = self->textbgcolor_default()); + return ret; +} + +void Fl_Terminal_set_text_bg_color_default(Fl_Terminal *self, unsigned set) { + LOCK(self->textbgcolor_default(set)); +} + +void Fl_Terminal_set_text_bg_color_xterm(Fl_Terminal *self, unsigned char set) { + LOCK(self->textbgcolor_xterm(set)); +} + +unsigned +Fl_Terminal_text_fg_color(Fl_Terminal *self) { // Actually returns Fl_Color + LOCK(auto ret = self->textfgcolor()); + return ret; +} + +void Fl_Terminal_set_text_fg_color(Fl_Terminal *self, unsigned set) { + LOCK(self->textfgcolor(set)); +} + +unsigned Fl_Terminal_text_fg_color_default( + Fl_Terminal *self) { // Actually returns Fl_Color + LOCK(auto ret = self->textfgcolor_default()); + return ret; +} + +void Fl_Terminal_set_text_fg_color_default(Fl_Terminal *self, unsigned set) { + LOCK(self->textfgcolor_default(set)); +} + +void Fl_Terminal_set_text_fg_color_xterm(Fl_Terminal *self, unsigned char set) { + LOCK(self->textfgcolor_xterm(set)); +} + +int Fl_Terminal_text_font(Fl_Terminal *self) { // Actually Fl_Font + LOCK(auto ret = self->textfont()); + return ret; +} + +void Fl_Terminal_set_text_font(Fl_Terminal *self, int set) { + LOCK(self->textfont(set)); +} + +int Fl_Terminal_text_size(Fl_Terminal *self) { + LOCK(auto ret = self->textsize()); + return ret; +} + +void Fl_Terminal_set_text_size(Fl_Terminal *self, int set) { + LOCK(self->textsize(set)); +} + +GROUP_DEFINE(Fl_Terminal) From 02e2a12d5d6c1fa5b5b715c132a837199abbe779 Mon Sep 17 00:00:00 2001 From: Jonathan Griffitts Date: Wed, 29 Nov 2023 20:26:45 -0700 Subject: [PATCH 2/3] Bug fixes --- include/cfl_group.h | 10 ++++------ src/cfl_group.cpp | 20 ++++++++------------ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/include/cfl_group.h b/include/cfl_group.h index f980179..c7fa438 100644 --- a/include/cfl_group.h +++ b/include/cfl_group.h @@ -159,15 +159,13 @@ void Fl_Terminal_set_ansi(Fl_Terminal *self, int boolean); void Fl_Terminal_append(Fl_Terminal *self, const char *txt); -void Fl_Terminal_append2(Fl_Terminal *self, const char *txt, int len); +void Fl_Terminal_append_u8(Fl_Terminal *self, const char *txt, int len); void Fl_Terminal_append_ascii(Fl_Terminal *self, const char *txt); -// void Fl_Terminal_append_ascii2(Fl_Terminal *self, const char *txt, int len); - void Fl_Terminal_append_utf8(Fl_Terminal *self, const char *txt); -void Fl_Terminal_append_utf8_2(Fl_Terminal *self, const char *txt, int len); +void Fl_Terminal_append_utf8_u8(Fl_Terminal *self, const char *txt, int len); // int Fl_Terminal_box(Fl_Terminal *self); // Actually Fl_BoxType todo?: // handled in cfl_macros.h @@ -236,13 +234,13 @@ void Fl_Terminal_set_margin_top(Fl_Terminal *self, int set); void Fl_Terminal_print_char(Fl_Terminal *self, char c); -void Fl_Terminal_print_char2(Fl_Terminal *self, const char *txt, int len); +//void Fl_Terminal_print_char_u8(Fl_Terminal *self, const char *txt, int len); // Fl_Terminal_printf not supported for Rust void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col); -void Fl_Terminal_put_char2(Fl_Terminal *self, const char *txt, int len, int row, +void Fl_Terminal_put_char_u8(Fl_Terminal *self, const char *txt, int len, int row, int col); float Fl_Terminal_redraw_rate(Fl_Terminal *self); diff --git a/src/cfl_group.cpp b/src/cfl_group.cpp index d49ee07..0d8423d 100644 --- a/src/cfl_group.cpp +++ b/src/cfl_group.cpp @@ -323,24 +323,20 @@ void Fl_Terminal_append(Fl_Terminal *self, const char *txt) { LOCK(self->append(txt)); } -void Fl_Terminal_append2(Fl_Terminal *self, const char *txt, int len) { - LOCK(self->append(txt)); +void Fl_Terminal_append_u8(Fl_Terminal *self, const char *txt, int len) { + LOCK(self->append(txt, len)); } void Fl_Terminal_append_ascii(Fl_Terminal *self, const char *txt) { LOCK(self->append_ascii(txt)); } -// void Fl_Terminal_append_ascii2(Fl_Terminal *self, const char *txt, int len) { -// LOCK(self->append_ascii(txt)); -// } - void Fl_Terminal_append_utf8(Fl_Terminal *self, const char *txt) { LOCK(self->append_utf8(txt)); } -void Fl_Terminal_append_utf8_2(Fl_Terminal *self, const char *txt, int len) { - LOCK(self->append_utf8(txt)); +void Fl_Terminal_append_utf8_u8(Fl_Terminal *self, const char *txt, int len) { + LOCK(self->append_utf8(txt, len)); } void Fl_Terminal_clear_history(Fl_Terminal *self) { @@ -456,15 +452,15 @@ void Fl_Terminal_print_char(Fl_Terminal *self, char c) { LOCK(self->print_char(c)); } -void Fl_Terminal_print_char2(Fl_Terminal *self, const char *txt, int len) { - LOCK(self->print_char(txt, len)); -} +//void Fl_Terminal_print_char_u8(Fl_Terminal *self, const char *txt, int len) { +// LOCK(self->print_char(txt, len)); +//} void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col) { LOCK(self->putchar(c, row, col)); } -void Fl_Terminal_put_char2(Fl_Terminal *self, const char *txt, int len, int row, +void Fl_Terminal_put_char_u8(Fl_Terminal *self, const char *txt, int len, int row, int col) { LOCK(self->putchar(txt, len, row, col)); } From 2c3da41e7866a3f2be1107d4eb9ff6c5aa3b48c5 Mon Sep 17 00:00:00 2001 From: Jonathan Griffitts Date: Thu, 30 Nov 2023 11:17:11 -0700 Subject: [PATCH 3/3] Name change for print_char_utf8() and put_char_utf8() --- include/cfl_group.h | 4 ++-- src/cfl_group.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/cfl_group.h b/include/cfl_group.h index c7fa438..97c98b8 100644 --- a/include/cfl_group.h +++ b/include/cfl_group.h @@ -234,13 +234,13 @@ void Fl_Terminal_set_margin_top(Fl_Terminal *self, int set); void Fl_Terminal_print_char(Fl_Terminal *self, char c); -//void Fl_Terminal_print_char_u8(Fl_Terminal *self, const char *txt, int len); +void Fl_Terminal_print_char_utf8(Fl_Terminal *self, const char *txt, int len); // Fl_Terminal_printf not supported for Rust void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col); -void Fl_Terminal_put_char_u8(Fl_Terminal *self, const char *txt, int len, int row, +void Fl_Terminal_put_char_utf8(Fl_Terminal *self, const char *txt, int len, int row, int col); float Fl_Terminal_redraw_rate(Fl_Terminal *self); diff --git a/src/cfl_group.cpp b/src/cfl_group.cpp index 0d8423d..a68bdab 100644 --- a/src/cfl_group.cpp +++ b/src/cfl_group.cpp @@ -452,17 +452,17 @@ void Fl_Terminal_print_char(Fl_Terminal *self, char c) { LOCK(self->print_char(c)); } -//void Fl_Terminal_print_char_u8(Fl_Terminal *self, const char *txt, int len) { -// LOCK(self->print_char(txt, len)); -//} +void Fl_Terminal_print_char_utf8(Fl_Terminal *self, const char *txt, int len) { + LOCK(self->print_char(txt, len)); +} void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col) { LOCK(self->putchar(c, row, col)); } -void Fl_Terminal_put_char_u8(Fl_Terminal *self, const char *txt, int len, int row, - int col) { - LOCK(self->putchar(txt, len, row, col)); +void Fl_Terminal_put_char_utf8(Fl_Terminal *self, const char *txt, int len, int drow, + int dcol) { + LOCK(self->putchar(txt, len, drow, dcol)); } float Fl_Terminal_redraw_rate(Fl_Terminal *self) {