about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index b6032c8e..d069ba53 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -94,15 +94,15 @@ _ui_init(void)
     display = XOpenDisplay(0);
 #endif
     ui_idle_time = g_timer_new();
-    wins_refresh_current();
+    wins_update_virtual_current();
 }
 
 static void
-_ui_refresh(void)
+_ui_update_screen(void)
 {
     _ui_draw_win_title();
-    title_bar_refresh();
-    status_bar_refresh();
+    title_bar_update_virtual();
+    status_bar_update_virtual();
     inp_put_back();
     doupdate();
 }
@@ -148,7 +148,7 @@ _ui_resize(const int ch, const char * const input, const int size)
     status_bar_resize();
     wins_resize_all();
     inp_win_resize(input, size);
-    wins_refresh_current();
+    wins_update_virtual_current();
 }
 
 static void
@@ -187,7 +187,7 @@ _ui_contact_typing(const char * const barejid)
         // have chat window but not currently in it
         } else if (!wins_is_current(window)) {
             cons_show_typing(barejid);
-            wins_refresh_current();
+            wins_update_virtual_current();
 
         // in chat window with user
         } else {
@@ -195,7 +195,7 @@ _ui_contact_typing(const char * const barejid)
 
             int num = wins_get_num(window);
             status_bar_active(num);
-            wins_refresh_current();
+            wins_update_virtual_current();
        }
     }
 
@@ -261,7 +261,7 @@ _ui_incoming_msg(const char * const from, const char * const message,
         win_print_incoming_message(window, tv_stamp, display_from, message);
         title_bar_set_typing(FALSE);
         status_bar_active(num);
-        wins_refresh_current();
+        wins_update_virtual_current();
 
     // not currently viewing chat window with sender
     } else {
@@ -301,7 +301,7 @@ _ui_incoming_msg(const char * const from, const char * const message,
     ProfWin *current = wins_get_current();
     if (!current->paged) {
         win_move_to_end(current);
-        win_refresh(current);
+        win_update_virtual(current);
     }
 }
 
@@ -373,7 +373,7 @@ _ui_handle_recipient_not_found(const char * const recipient, const char * const
         win_print_line(win, '!', COLOUR_ERROR, msg->str);
     }
 
-    wins_refresh_current();
+    wins_update_virtual_current();
 
     g_string_free(msg, TRUE);
 }
@@ -393,7 +393,7 @@ _ui_handle_recipient_error(const char * const recipient, const char * const err_
         win_print_line(win, '!', COLOUR_ERROR, msg->str);
     }
 
-    wins_refresh_current();
+    wins_update_virtual_current();
 
     g_string_free(msg, TRUE);
 }
@@ -406,7 +406,7 @@ _ui_handle_error(const char * const err_msg)
 
     cons_show_error(msg->str);
 
-    wins_refresh_current();
+    wins_update_virtual_current();
 
     g_string_free(msg, TRUE);
 }
@@ -417,7 +417,7 @@ _ui_disconnected(void)
     wins_lost_connection();
     title_bar_set_presence(CONTACT_OFFLINE);
     status_bar_clear_message();
-    status_bar_refresh();
+    status_bar_update_virtual();
 }
 
 static void
@@ -553,12 +553,12 @@ _ui_switch_win(const int i)
             status_bar_current(i);
             status_bar_active(i);
         }
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
 static void
-_ui_current_refresh(void)
+_ui_current_update_virtual(void)
 {
     ui_switch_win(wins_get_current_num());
 }
@@ -585,7 +585,7 @@ _ui_next_win(void)
         status_bar_current(i);
         status_bar_active(i);
     }
-    wins_refresh_current();
+    wins_update_virtual_current();
 }
 
 static void
@@ -605,7 +605,7 @@ _ui_gone_secure(const char * const recipient, gboolean trusted)
             GString *recipient_str = _get_recipient_string(window);
             title_bar_set_recipient(recipient_str->str);
             g_string_free(recipient_str, TRUE);
-            wins_refresh_current();
+            wins_update_virtual_current();
         }
     }
 }
@@ -623,7 +623,7 @@ _ui_gone_insecure(const char * const recipient)
             GString *recipient_str = _get_recipient_string(window);
             title_bar_set_recipient(recipient_str->str);
             g_string_free(recipient_str, TRUE);
-            wins_refresh_current();
+            wins_update_virtual_current();
         }
     }
 }
@@ -641,7 +641,7 @@ _ui_trust(const char * const recipient)
             GString *recipient_str = _get_recipient_string(window);
             title_bar_set_recipient(recipient_str->str);
             g_string_free(recipient_str, TRUE);
-            wins_refresh_current();
+            wins_update_virtual_current();
         }
     }
 }
@@ -659,7 +659,7 @@ _ui_untrust(const char * const recipient)
             GString *recipient_str = _get_recipient_string(window);
             title_bar_set_recipient(recipient_str->str);
             g_string_free(recipient_str, TRUE);
-            wins_refresh_current();
+            wins_update_virtual_current();
         }
     }
 }
@@ -686,7 +686,7 @@ _ui_previous_win(void)
         status_bar_current(i);
         status_bar_active(i);
     }
-    wins_refresh_current();
+    wins_update_virtual_current();
 }
 
 static void
@@ -714,7 +714,7 @@ _ui_close_win(int index)
     status_bar_current(1);
     status_bar_active(1);
 
-    wins_refresh_current();
+    wins_update_virtual_current();
 }
 
 static void
@@ -833,7 +833,7 @@ _ui_current_print_line(const char * const msg, ...)
     win_print_line(current, '-', 0, fmt_msg->str);
     va_end(arg);
     g_string_free(fmt_msg, TRUE);
-    win_refresh(current);
+    win_update_virtual(current);
 }
 
 static void
@@ -847,7 +847,7 @@ _ui_current_print_formatted_line(const char show_char, int attrs, const char * c
     win_print_line(current, show_char, attrs, fmt_msg->str);
     va_end(arg);
     g_string_free(fmt_msg, TRUE);
-    win_refresh(current);
+    win_update_virtual(current);
 }
 
 static void
@@ -855,7 +855,7 @@ _ui_current_error_line(const char * const msg)
 {
     ProfWin *current = wins_get_current();
     win_print_line(current, '-', COLOUR_ERROR, msg);
-    win_refresh(current);
+    win_update_virtual(current);
 }
 
 static void
@@ -863,7 +863,7 @@ _ui_current_page_off(void)
 {
     ProfWin *current = wins_get_current();
     win_move_to_end(current);
-    win_refresh(current);
+    win_update_virtual(current);
 }
 
 static void
@@ -897,7 +897,7 @@ _ui_print_system_msg_from_recipient(const char * const from, const char *message
 
     // this is the current window
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -919,7 +919,7 @@ _ui_recipient_gone(const char * const barejid)
     if (window != NULL) {
         win_vprint_line(window, '!', COLOUR_GONE, "<- %s has left the conversation.", display_usr);
         if (wins_is_current(window)) {
-            wins_refresh_current();
+            wins_update_virtual_current();
         }
     }
 }
@@ -1154,7 +1154,7 @@ _ui_room_roster(const char * const room, GList *roster, const char * const prese
     }
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1169,7 +1169,7 @@ _ui_room_member_offline(const char * const room, const char * const nick)
     wattroff(window->win, COLOUR_OFFLINE);
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1185,7 +1185,7 @@ _ui_room_member_online(const char * const room, const char * const nick,
     wattroff(window->win, COLOUR_ONLINE);
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1200,7 +1200,7 @@ _ui_room_member_presence(const char * const room, const char * const nick,
     }
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1216,7 +1216,7 @@ _ui_room_member_nick_change(const char * const room,
     wattroff(window->win, COLOUR_THEM);
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1231,7 +1231,7 @@ _ui_room_nick_change(const char * const room, const char * const nick)
     wattroff(window->win, COLOUR_ME);
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1257,7 +1257,7 @@ _ui_room_history(const char * const room_jid, const char * const nick,
     }
 
     if (wins_is_current(window)) {
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 }
 
@@ -1297,14 +1297,14 @@ _ui_room_message(const char * const room_jid, const char * const nick,
     // currently in groupchat window
     if (wins_is_current(window)) {
         status_bar_active(num);
-        wins_refresh_current();
+        wins_update_virtual_current();
 
     // not currenlty on groupchat window
     } else {
         status_bar_new(num);
         cons_show_incoming_message(nick, num);
         if (wins_get_current_num() == 0) {
-            wins_refresh_current();
+            wins_update_virtual_current();
         }
 
         if (strcmp(nick, muc_get_room_nick(room_jid)) != 0) {
@@ -1335,7 +1335,7 @@ _ui_room_message(const char * const room_jid, const char * const nick,
     ProfWin *current = wins_get_current();
     if (!current->paged) {
         win_move_to_end(current);
-        win_refresh(current);
+        win_update_virtual(current);
     }
 }
 
@@ -1354,7 +1354,7 @@ _ui_room_subject(const char * const room_jid, const char * const subject)
     // currently in groupchat window
     if (wins_is_current(window)) {
         status_bar_active(num);
-        wins_refresh_current();
+        wins_update_virtual_current();
 
     // not currenlty on groupchat window
     } else {
@@ -1377,7 +1377,7 @@ _ui_room_broadcast(const char * const room_jid, const char * const message)
     // currently in groupchat window
     if (wins_is_current(window)) {
         status_bar_active(num);
-        wins_refresh_current();
+        wins_update_virtual_current();
 
     // not currenlty on groupchat window
     } else {
@@ -1450,7 +1450,7 @@ _ui_ask_password(void)
 {
   char *passwd = malloc(sizeof(char) * (MAX_PASSWORD_SIZE + 1));
   status_bar_get_password();
-  status_bar_refresh();
+  status_bar_update_virtual();
   inp_block();
   inp_get_password(passwd);
   inp_non_block();
@@ -1471,7 +1471,7 @@ _ui_chat_win_contact_online(PContact contact, Resource *resource, GDateTime *las
             last_activity, "++", "online");
 
         if (wins_is_current(window)) {
-            wins_refresh_current();
+            wins_update_virtual_current();
             ui_current_page_off();
         }
     }
@@ -1491,7 +1491,7 @@ _ui_chat_win_contact_offline(PContact contact, char *resource, char *status)
             "offline");
 
         if (wins_is_current(window)) {
-            wins_refresh_current();
+            wins_update_virtual_current();
             ui_current_page_off();
         }
     }
@@ -1632,7 +1632,7 @@ _win_handle_page(const wint_t * const ch)
                         *page_start = y - page_space;
 
                     current->paged = 1;
-                    wins_refresh_current();
+                    wins_update_virtual_current();
                 } else if (mouse_event.bstate & BUTTON4_PRESSED) { // mouse wheel up
                     *page_start -= 4;
 
@@ -1641,7 +1641,7 @@ _win_handle_page(const wint_t * const ch)
                         *page_start = 0;
 
                     current->paged = 1;
-                    wins_refresh_current();
+                    wins_update_virtual_current();
                 }
             }
         }
@@ -1656,7 +1656,7 @@ _win_handle_page(const wint_t * const ch)
             *page_start = 0;
 
         current->paged = 1;
-        wins_refresh_current();
+        wins_update_virtual_current();
 
     // page down
     } else if (*ch == KEY_NPAGE) {
@@ -1671,7 +1671,7 @@ _win_handle_page(const wint_t * const ch)
             *page_start = y - page_space;
 
         current->paged = 1;
-        wins_refresh_current();
+        wins_update_virtual_current();
     }
 
     // switch off page if last line visible
@@ -1703,7 +1703,7 @@ void
 ui_init_module(void)
 {
     ui_init = _ui_init;
-    ui_refresh = _ui_refresh;
+    ui_update_screen = _ui_update_screen;
     ui_get_idle_time = _ui_get_idle_time;
     ui_reset_idle_time = _ui_reset_idle_time;
     ui_close = _ui_close;
@@ -1778,5 +1778,5 @@ ui_init_module(void)
     ui_handle_recipient_not_found = _ui_handle_recipient_not_found;
     ui_handle_recipient_error = _ui_handle_recipient_error;
     ui_handle_error = _ui_handle_error;
-    ui_current_refresh = _ui_current_refresh;
+    ui_current_update_virtual = _ui_current_update_virtual;
 }