diff --git a/src/protocols/kubernetes/argv.c b/src/protocols/kubernetes/argv.c index 009e2480..0cbc7160 100644 --- a/src/protocols/kubernetes/argv.c +++ b/src/protocols/kubernetes/argv.c @@ -69,16 +69,16 @@ void* guac_kubernetes_send_current_argv(guac_user* user, void* data) { /* Send current color scheme */ guac_user_stream_argv(user, user->socket, "text/plain", GUAC_KUBERNETES_ARGV_COLOR_SCHEME, - guac_terminal_color_scheme(terminal)); + guac_terminal_get_color_scheme(terminal)); /* Send current font name */ guac_user_stream_argv(user, user->socket, "text/plain", GUAC_KUBERNETES_ARGV_FONT_NAME, - guac_terminal_font_name(terminal)); + guac_terminal_get_font_name(terminal)); /* Send current font size */ char font_size[64]; - sprintf(font_size, "%i", guac_terminal_font_size(terminal)); + sprintf(font_size, "%i", guac_terminal_get_font_size(terminal)); guac_user_stream_argv(user, user->socket, "text/plain", GUAC_KUBERNETES_ARGV_FONT_SIZE, font_size); diff --git a/src/protocols/ssh/argv.c b/src/protocols/ssh/argv.c index af191f4e..446d0169 100644 --- a/src/protocols/ssh/argv.c +++ b/src/protocols/ssh/argv.c @@ -75,16 +75,16 @@ void* guac_ssh_send_current_argv(guac_user* user, void* data) { /* Send current color scheme */ guac_user_stream_argv(user, user->socket, "text/plain", GUAC_SSH_ARGV_COLOR_SCHEME, - guac_terminal_color_scheme(terminal)); + guac_terminal_get_color_scheme(terminal)); /* Send current font name */ guac_user_stream_argv(user, user->socket, "text/plain", GUAC_SSH_ARGV_FONT_NAME, - guac_terminal_font_name(terminal)); + guac_terminal_get_font_name(terminal)); /* Send current font size */ char font_size[64]; - sprintf(font_size, "%i", guac_terminal_font_size(terminal)); + sprintf(font_size, "%i", guac_terminal_get_font_size(terminal)); guac_user_stream_argv(user, user->socket, "text/plain", GUAC_SSH_ARGV_FONT_SIZE, font_size); diff --git a/src/protocols/telnet/argv.c b/src/protocols/telnet/argv.c index 59814a71..966584c6 100644 --- a/src/protocols/telnet/argv.c +++ b/src/protocols/telnet/argv.c @@ -70,16 +70,16 @@ void* guac_telnet_send_current_argv(guac_user* user, void* data) { /* Send current color scheme */ guac_user_stream_argv(user, user->socket, "text/plain", GUAC_TELNET_ARGV_COLOR_SCHEME, - guac_terminal_color_scheme(terminal)); + guac_terminal_get_color_scheme(terminal)); /* Send current font name */ guac_user_stream_argv(user, user->socket, "text/plain", GUAC_TELNET_ARGV_FONT_NAME, - guac_terminal_font_name(terminal)); + guac_terminal_get_font_name(terminal)); /* Send current font size */ char font_size[64]; - sprintf(font_size, "%i", guac_terminal_font_size(terminal)); + sprintf(font_size, "%i", guac_terminal_get_font_size(terminal)); guac_user_stream_argv(user, user->socket, "text/plain", GUAC_TELNET_ARGV_FONT_SIZE, font_size); diff --git a/src/protocols/telnet/input.c b/src/protocols/telnet/input.c index dbd2e5f8..3c3a5890 100644 --- a/src/protocols/telnet/input.c +++ b/src/protocols/telnet/input.c @@ -101,7 +101,7 @@ int guac_telnet_user_key_handler(guac_user* user, int keysym, int pressed) { keysym == 0xFF13 /* Pause */ || keysym == 0xFF6B /* Break */ || ( - guac_terminal_mod_ctrl(term) + guac_terminal_get_mod_ctrl(term) && keysym == '0' ) /* Ctrl + 0 */ )) { diff --git a/src/terminal/terminal-handlers.c b/src/terminal/terminal-handlers.c index 1603d4f5..f5b10beb 100644 --- a/src/terminal/terminal-handlers.c +++ b/src/terminal/terminal-handlers.c @@ -1227,7 +1227,7 @@ int guac_terminal_set_scrollback(guac_terminal* term, unsigned char c) { /* Update scrollbar bounds */ guac_terminal_scrollbar_set_bounds(term->scrollbar, - -guac_terminal_available_scroll(term), 0); + -guac_terminal_get_available_scroll(term), 0); /* Return to echo mode */ term->char_handler = guac_terminal_echo; diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index cd469703..bfe8936a 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -186,7 +186,7 @@ static int guac_terminal_effective_buffer_length(guac_terminal* term) { } -int guac_terminal_available_scroll(guac_terminal* term) { +int guac_terminal_get_available_scroll(guac_terminal* term) { return guac_terminal_effective_buffer_length(term) - term->term_height; } @@ -897,7 +897,7 @@ int guac_terminal_scroll_up(guac_terminal* term, /* Reset scrollbar bounds */ guac_terminal_scrollbar_set_bounds(term->scrollbar, - -guac_terminal_available_scroll(term), 0); + -guac_terminal_get_available_scroll(term), 0); /* Update cursor location if within region */ if (term->visible_cursor_row >= start_row && @@ -1107,7 +1107,7 @@ void guac_terminal_scroll_display_up(guac_terminal* terminal, int row, column; /* Limit scroll amount by size of scrollback buffer */ - int available_scroll = guac_terminal_available_scroll(terminal); + int available_scroll = guac_terminal_get_available_scroll(terminal); if (terminal->scroll_offset + scroll_amount > available_scroll) scroll_amount = available_scroll - terminal->scroll_offset; @@ -1308,7 +1308,7 @@ static void __guac_terminal_resize(guac_terminal* term, int width, int height) { if (height > term->term_height) { /* If undisplayed rows exist in the buffer, shift them into view */ - int available_scroll = guac_terminal_available_scroll(term); + int available_scroll = guac_terminal_get_available_scroll(term); if (available_scroll > 0) { /* If the new terminal bottom reveals N rows, shift down N rows */ @@ -1433,7 +1433,7 @@ int guac_terminal_resize(guac_terminal* terminal, int width, int height) { /* Notify scrollbar of resize */ guac_terminal_scrollbar_parent_resized(terminal->scrollbar, width, height, rows); guac_terminal_scrollbar_set_bounds(terminal->scrollbar, - -guac_terminal_available_scroll(terminal), 0); + -guac_terminal_get_available_scroll(terminal), 0); /* Release terminal */ @@ -2027,7 +2027,7 @@ void guac_terminal_apply_color_scheme(guac_terminal* terminal, } -const char* guac_terminal_color_scheme(guac_terminal* terminal) { +const char* guac_terminal_get_color_scheme(guac_terminal* terminal) { return terminal->color_scheme; } @@ -2079,15 +2079,15 @@ void guac_terminal_set_file_download_handler(guac_terminal* terminal, terminal->file_download_handler = file_download_handler; } -const char* guac_terminal_font_name(guac_terminal* terminal) { +const char* guac_terminal_get_font_name(guac_terminal* terminal) { return terminal->font_name; } -int guac_terminal_font_size(guac_terminal* terminal) { +int guac_terminal_get_font_size(guac_terminal* terminal) { return terminal->font_size; } -int guac_terminal_mod_ctrl(guac_terminal* terminal) { +int guac_terminal_get_mod_ctrl(guac_terminal* terminal) { return terminal->mod_ctrl; } diff --git a/src/terminal/terminal/color-scheme.h b/src/terminal/terminal/color-scheme.h index 51d27be7..5b9a93db 100644 --- a/src/terminal/terminal/color-scheme.h +++ b/src/terminal/terminal/color-scheme.h @@ -17,8 +17,8 @@ * under the License. */ -#ifndef GUAC_TERMINAL_COLOR_SCHEME_H -#define GUAC_TERMINAL_COLOR_SCHEME_H +#ifndef GUAC_TERMINAL_GET_COLOR_SCHEME_H +#define GUAC_TERMINAL_GET_COLOR_SCHEME_H /** * Definitions and functions related to color scheme handling. diff --git a/src/terminal/terminal/terminal.h b/src/terminal/terminal/terminal.h index dba68e32..50aa27dd 100644 --- a/src/terminal/terminal/terminal.h +++ b/src/terminal/terminal/terminal.h @@ -525,7 +525,7 @@ void guac_terminal_dup(guac_terminal* term, guac_user* user, * The number of rows within the buffer which are not currently displayed * on screen. */ -int guac_terminal_available_scroll(guac_terminal* term); +int guac_terminal_get_available_scroll(guac_terminal* term); /** * Returns the height of the given terminal, in characters. @@ -899,7 +899,7 @@ void guac_terminal_apply_color_scheme(guac_terminal* terminal, * @return * The name of the color scheme currently in use by the given terminal. */ -const char* guac_terminal_color_scheme(guac_terminal* terminal); +const char* guac_terminal_get_color_scheme(guac_terminal* terminal); /** * Alters the font of the terminal. The terminal will automatically be redrawn @@ -934,7 +934,7 @@ void guac_terminal_apply_font(guac_terminal* terminal, const char* font_name, * @return * The name of the font in use by the given terminal. */ -const char* guac_terminal_font_name(guac_terminal* terminal); +const char* guac_terminal_get_font_name(guac_terminal* terminal); /** * Returns the font size currently in use by the given terminal. @@ -945,7 +945,7 @@ const char* guac_terminal_font_name(guac_terminal* terminal); * @return * The size of the font in use by the given terminal. */ -int guac_terminal_font_size(guac_terminal* terminal); +int guac_terminal_get_font_size(guac_terminal* terminal); /** * Returns the current state of the mod_ctrl flag in the given terminal. @@ -956,6 +956,6 @@ int guac_terminal_font_size(guac_terminal* terminal); * @return * The current state of the mod_ctrl flag. */ -int guac_terminal_mod_ctrl(guac_terminal* terminal); +int guac_terminal_get_mod_ctrl(guac_terminal* terminal); #endif