about summary refs log tree commit diff stats
path: root/src/ui/statusbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/statusbar.c')
-rw-r--r--src/ui/statusbar.c65
1 files changed, 41 insertions, 24 deletions
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c
index 16bd31c9..4d0ab7ef 100644
--- a/src/ui/statusbar.c
+++ b/src/ui/statusbar.c
@@ -54,8 +54,8 @@ static void _mark_new(int num);
 static void _mark_active(int num);
 static void _mark_inactive(int num);
 
-void
-create_status_bar(void)
+static void
+_create_status_bar(void)
 {
     int rows, cols, i;
     getmaxyx(stdscr, rows, cols);
@@ -84,8 +84,8 @@ create_status_bar(void)
     dirty = TRUE;
 }
 
-void
-status_bar_refresh(void)
+static void
+_status_bar_refresh(void)
 {
     GDateTime *now_time = g_date_time_new_now_local();
     GTimeSpan elapsed = g_date_time_difference(now_time, last_time);
@@ -108,8 +108,8 @@ status_bar_refresh(void)
     g_date_time_unref(now_time);
 }
 
-void
-status_bar_resize(void)
+static void
+_status_bar_resize(void)
 {
     int rows, cols;
     getmaxyx(stdscr, rows, cols);
@@ -134,8 +134,8 @@ status_bar_resize(void)
     dirty = TRUE;
 }
 
-void
-status_bar_set_all_inactive(void)
+static void
+_status_bar_set_all_inactive(void)
 {
     int i = 0;
     for (i = 0; i < 12; i++) {
@@ -148,8 +148,8 @@ status_bar_set_all_inactive(void)
     g_hash_table_remove_all(remaining_new);
 }
 
-void
-status_bar_current(int i)
+static void
+_status_bar_current(int i)
 {
     if (i == 0) {
         current = 10;
@@ -165,8 +165,8 @@ status_bar_current(int i)
     wattroff(status_bar, COLOUR_STATUS_BRACKET);
 }
 
-void
-status_bar_inactive(const int win)
+static void
+_status_bar_inactive(const int win)
 {
     int true_win = win;
     if (true_win == 0) {
@@ -205,8 +205,8 @@ status_bar_inactive(const int win)
     }
 }
 
-void
-status_bar_active(const int win)
+static void
+_status_bar_active(const int win)
 {
     int true_win = win;
     if (true_win == 0) {
@@ -239,8 +239,8 @@ status_bar_active(const int win)
     }
 }
 
-void
-status_bar_new(const int win)
+static void
+_status_bar_new(const int win)
 {
     int true_win = win;
     if (true_win == 0) {
@@ -262,15 +262,15 @@ status_bar_new(const int win)
     }
 }
 
-void
-status_bar_get_password(void)
+static void
+_status_bar_get_password(void)
 {
     status_bar_print_message("Enter password:");
     dirty = TRUE;
 }
 
-void
-status_bar_print_message(const char * const msg)
+static void
+_status_bar_print_message(const char * const msg)
 {
     werase(status_bar);
 
@@ -292,8 +292,8 @@ status_bar_print_message(const char * const msg)
     dirty = TRUE;
 }
 
-void
-status_bar_clear(void)
+static void
+_status_bar_clear(void)
 {
     if (message != NULL) {
         free(message);
@@ -320,8 +320,8 @@ status_bar_clear(void)
     dirty = TRUE;
 }
 
-void
-status_bar_clear_message(void)
+static void
+_status_bar_clear_message(void)
 {
     if (message != NULL) {
         free(message);
@@ -421,3 +421,20 @@ _mark_inactive(int num)
     mvwaddch(status_bar, 0, cols - 34 + active_pos, ' ');
     dirty = TRUE;
 }
+
+void
+statusbar_init_module(void)
+{
+    create_status_bar = _create_status_bar;
+    status_bar_refresh = _status_bar_refresh;
+    status_bar_resize = _status_bar_resize;
+    status_bar_set_all_inactive = _status_bar_set_all_inactive;
+    status_bar_current = _status_bar_current;
+    status_bar_inactive = _status_bar_inactive;
+    status_bar_active = _status_bar_active;
+    status_bar_new = _status_bar_new;
+    status_bar_get_password = _status_bar_get_password;
+    status_bar_print_message = _status_bar_print_message;
+    status_bar_clear = _status_bar_clear;
+    status_bar_clear_message = _status_bar_clear_message;
+}
59f35fbe2f6a78157b875e12eb7dc8cd95c1152'>^
672e3e50 ^

a654e4ec ^
672e3e50 ^







3e1349d2 ^
32b8fac2 ^
f344b250 ^

32b8fac2 ^
f344b250 ^

d009e158 ^
f344b250 ^



672e3e50 ^
3e1349d2 ^
76755b28 ^
cd9bb850 ^
d009e158 ^
cd9bb850 ^
d009e158 ^
cd9bb850 ^
d009e158 ^
672e3e50 ^
d990e8f0 ^


672e3e50 ^



a654e4ec ^


d009e158 ^
672e3e50 ^

a654e4ec ^
4690ce81 ^
672e3e50 ^
a654e4ec ^
672e3e50 ^


a654e4ec ^

4690ce81 ^

2f02189d ^
76755b28 ^
65361948 ^
672e3e50 ^


c5ffb6e1 ^

3e1349d2 ^
f344b250 ^
c5ffb6e1 ^
672e3e50 ^


a654e4ec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104