about summary refs log tree commit diff stats
path: root/src/ui/inputwin.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-02 01:57:05 +0000
committerJames Booth <boothj5@gmail.com>2014-01-02 01:57:05 +0000
commit170af88c0dc736087d40d3591c1880d8af17b5e6 (patch)
tree29c912e2fe3261e758691254dbddbe43c6d139c7 /src/ui/inputwin.c
parentbc700fbfeac560946991063313f293a9861d4d1d (diff)
parent3fbd45bd0603d51255c9e6df2a56d5cd5de4dd2b (diff)
downloadprofani-tty-170af88c0dc736087d40d3591c1880d8af17b5e6.tar.gz
Merge branch 'master' into otr
Conflicts:
	Makefile.am
Diffstat (limited to 'src/ui/inputwin.c')
-rw-r--r--src/ui/inputwin.c50
1 files changed, 32 insertions, 18 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 3306a246..dd02ed70 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -58,8 +58,8 @@ static int _printable(const wint_t ch);
 static void _clear_input(void);
 static void _go_to_end(int display_size);
 
-void
-create_input_window(void)
+static void
+_create_input_window(void)
 {
 #ifdef NCURSES_REENTRANT
     set_escdelay(25);
@@ -74,8 +74,8 @@ create_input_window(void)
     _inp_win_refresh();
 }
 
-void
-inp_win_resize(const char * const input, const int size)
+static void
+_inp_win_resize(const char * const input, const int size)
 {
     int inp_x;
     getmaxyx(stdscr, rows, cols);
@@ -92,20 +92,20 @@ inp_win_resize(const char * const input, const int size)
     _inp_win_refresh();
 }
 
-void
-inp_non_block(void)
+static void
+_inp_non_block(void)
 {
     wtimeout(inp_win, 20);
 }
 
-void
-inp_block(void)
+static void
+_inp_block(void)
 {
     wtimeout(inp_win, -1);
 }
 
-wint_t
-inp_get_char(char *input, int *size)
+static wint_t
+_inp_get_char(char *input, int *size)
 {
     int inp_x = 0;
     int i;
@@ -203,8 +203,8 @@ inp_get_char(char *input, int *size)
     return ch;
 }
 
-void
-inp_get_password(char *passwd)
+static void
+_inp_get_password(char *passwd)
 {
     _clear_input();
     _inp_win_refresh();
@@ -215,14 +215,14 @@ inp_get_password(char *passwd)
     status_bar_clear();
 }
 
-void
-inp_put_back(void)
+static void
+_inp_put_back(void)
 {
     _inp_win_refresh();
 }
 
-void
-inp_replace_input(char *input, const char * const new_input, int *size)
+static void
+_inp_replace_input(char *input, const char * const new_input, int *size)
 {
     int display_size;
     strcpy(input, new_input);
@@ -234,8 +234,8 @@ inp_replace_input(char *input, const char * const new_input, int *size)
     _go_to_end(display_size);
 }
 
-void
-inp_win_reset(void)
+static void
+_inp_win_reset(void)
 {
     _clear_input();
     pad_start = 0;
@@ -703,3 +703,17 @@ _printable(const wint_t ch)
     gunichar unichar = g_utf8_get_char(bytes);
     return g_unichar_isprint(unichar) && (ch != KEY_MOUSE);
 }
+
+void
+inputwin_init_module(void)
+{
+    create_input_window = _create_input_window;
+    inp_win_resize = _inp_win_resize;
+    inp_non_block = _inp_non_block;
+    inp_block = _inp_block;
+    inp_get_char = _inp_get_char;
+    inp_get_password = _inp_get_password;
+    inp_put_back = _inp_put_back;
+    inp_replace_input = _inp_replace_input;
+    inp_win_reset = _inp_win_reset;
+}
0c2'>d3c120c1 ^
f3760b0f ^
f22250a1 ^
4adb09bc ^

1b76245c ^
4adb09bc ^
f22250a1 ^
4adb09bc ^

dc1323e9 ^
6c96a437 ^
795f5244 ^
e6692482 ^
fa6d93b2 ^
2b250717 ^
fa6d93b2 ^

4071055a ^
dc1323e9 ^
e6692482 ^
fa6d93b2 ^
2b250717 ^
fa6d93b2 ^

4071055a ^
dc1323e9 ^
e6692482 ^
fa6d93b2 ^
4071055a ^
dc1323e9 ^
e6692482 ^

fa6d93b2 ^
4071055a ^
dc1323e9 ^



b24eb476 ^
e4630643 ^
9dcbec39 ^
4adb09bc ^
e4630643 ^

ef96f57c ^
0f125d5f ^
4adb09bc ^
9dcbec39 ^
4adb09bc ^


f3760b0f ^
9dcbec39 ^
4adb09bc ^


f22250a1 ^
dc1323e9 ^


1ead3562 ^
dc1323e9 ^

8ba8f0f6 ^
192d59d3 ^
dc1323e9 ^






1ead3562 ^
dc1323e9 ^

bc643692 ^
192d59d3 ^
dc1323e9 ^






1ead3562 ^
dc1323e9 ^

bc643692 ^
192d59d3 ^
dc1323e9 ^




4071055a ^

1ead3562 ^
4071055a ^
192d59d3 ^


8ba8f0f6 ^
192d59d3 ^
4071055a ^
192d59d3 ^
4071055a ^


4adb09bc ^
fa6d93b2 ^

1ead3562 ^
fa6d93b2 ^

e62aa7e3 ^
fa6d93b2 ^


1ead3562 ^
fa6d93b2 ^

e62aa7e3 ^
fa6d93b2 ^
5f98a10c ^

1ead3562 ^
4adb09bc ^
192d59d3 ^
4adb09bc ^
192d59d3 ^
4adb09bc ^
5f98a10c ^
4adb09bc ^

5f98a10c ^
1ead3562 ^
4adb09bc ^
192d59d3 ^


4adb09bc ^
192d59d3 ^
4adb09bc ^
192d59d3 ^
4adb09bc ^
9dcbec39 ^
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183