diff options
author | toni <toni@devlap.local> | 2014-12-04 15:34:40 +0100 |
---|---|---|
committer | toni <toni@devlap.local> | 2014-12-04 15:34:40 +0100 |
commit | 26f91f28f8d14951df16d1d1a3a17f2d9b0e6a83 (patch) | |
tree | 7049cfec1f4acf31d0eac55295f3bdce676f1e62 /ui_ani.c | |
parent | 0e5470619a8d2054db56f2154f68c7f77502bb83 (diff) |
- preparing major naskpass upgrade ..
Diffstat (limited to 'ui_ani.c')
-rw-r--r-- | ui_ani.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ui_ani.c b/ui_ani.c new file mode 100644 index 0000000..40a07e9 --- /dev/null +++ b/ui_ani.c @@ -0,0 +1,37 @@ +#include <stdlib.h> + +#include "ui_ani.h" + +#define ANIC_INITSTATE '\0' + + +struct anic * +init_anic(unsigned int x, unsigned int y) +{ + struct anic *a = calloc(1, sizeof(struct anic)); + + a->x = x; + a->y = y; + a->state = ANIC_INITSTATE; + return (a); +} + +void +free_anic(struct anic *a) +{ + free(a); +} + +int +anic_cb(WINDOW *win, void *data) +{ + struct anic *a = (struct anic *) data; + + switch (a->state) { + default: + case '|': return ('/'); + case '/': return ('-'); + case '-': return ('\\'); + case '\\': return ('|'); + } +} |