aboutsummaryrefslogtreecommitdiff
path: root/src/ui_input.c
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2015-11-14 15:28:48 +0100
committertoni <matzeton@googlemail.com>2015-11-14 16:23:49 +0100
commit6f7ce363ee56f96fe797433ed48b18a0787ed110 (patch)
tree516e76898679d3f2cfedf27e3c7ed544514c3b13 /src/ui_input.c
parentf2f6ea5029c6c43dc43d714978daca38c03a8a83 (diff)
trying to fix ncurses problerms .. fixed
Diffstat (limited to 'src/ui_input.c')
-rw-r--r--src/ui_input.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ui_input.c b/src/ui_input.c
index 5f9a679..3065f1d 100644
--- a/src/ui_input.c
+++ b/src/ui_input.c
@@ -125,6 +125,7 @@ activate_input(WINDOW *win, struct input *a)
{
if (a == NULL) return (UICB_ERR_UNDEF);
size_t p_len = strlen(a->prompt);
+ curs_set(1);
if (win == NULL) {
move(a->y, a->x + p_len + a->cur_pos);
} else {
@@ -134,6 +135,13 @@ activate_input(WINDOW *win, struct input *a)
}
int
+deactivate_input(struct input *a)
+{
+ curs_set(0);
+ return (deactivate_ui_input(a));
+}
+
+int
add_input(WINDOW *win, struct input *a, int key)
{
if (a == NULL) return (UICB_ERR_UNDEF);
@@ -142,7 +150,8 @@ add_input(WINDOW *win, struct input *a, int key)
++a->input_pos;
++a->input_len;
a->cur_pos = (a->cur_pos+1 < a->width ? a->cur_pos+1 : a->cur_pos);
- print_input(win, a);
+ //print_input(win, a);
+ ui_thrd_force_update();
return (UICB_OK);
}