1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-02-02 15:08:15 -05:00

Added win_clear() function

This commit is contained in:
James Booth 2015-06-15 17:54:47 +01:00
parent e9aa4ea084
commit a849b200b3
8 changed files with 13 additions and 18 deletions

View File

@ -3229,7 +3229,8 @@ cmd_tiny(gchar **args, struct cmd_help_t help)
gboolean
cmd_clear(gchar **args, struct cmd_help_t help)
{
ui_clear_current();
ProfWin *win = wins_get_current();
win_clear(win);
return TRUE;
}

View File

@ -1082,12 +1082,6 @@ ui_untrust(const char * const barejid)
}
}
void
ui_clear_current(void)
{
wins_clear_current();
}
void
ui_close_win(int index)
{

View File

@ -422,7 +422,8 @@ _inp_rl_getc(FILE *stream)
static int
_inp_rl_clear_handler(int count, int key)
{
ui_clear_current();
ProfWin *win = wins_get_current();
win_clear(win);
return 0;
}

View File

@ -88,7 +88,6 @@ int ui_close_all_wins(void);
int ui_close_read_wins(void);
// current window actions
void ui_clear_current(void);
win_type_t ui_current_win_type(void);
gboolean ui_current_win_is_otr(void);

View File

@ -458,6 +458,13 @@ win_sub_page_up(ProfWin *window)
}
}
void
win_clear(ProfWin *window)
{
werase(window->layout->win);
win_update_virtual(window);
}
void
win_mouse(ProfWin *window, const wint_t ch, const int result)
{

View File

@ -192,6 +192,8 @@ void win_mark_received(ProfWin *window, const char * const id);
int win_unread(ProfWin *window);
gboolean win_has_active_subwin(ProfWin *window);
void win_clear(ProfWin *window);
void win_page_up(ProfWin *window);
void win_page_down(ProfWin *window);
void win_sub_page_down(ProfWin *window);

View File

@ -378,14 +378,6 @@ wins_close_by_num(int i)
}
}
void
wins_clear_current(void)
{
ProfWin *window = wins_get_current();
werase(window->layout->win);
win_update_virtual(window);
}
gboolean
wins_is_current(ProfWin *window)
{

View File

@ -68,7 +68,6 @@ int wins_get_num(ProfWin *window);
int wins_get_current_num(void);
void wins_close_current(void);
void wins_close_by_num(int i);
void wins_clear_current(void);
gboolean wins_is_current(ProfWin *window);
int wins_get_total_unread(void);
void wins_resize_all(void);