aboutsummaryrefslogtreecommitdiff
path: root/src/ui_ani.h
blob: 3d6ece2ded70ef1169a7c11f683e3c3144c6dbd3 (plain)
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
#ifndef UI_ANIC_H
#define UI_ANIC_H 1

#include <ncurses.h>


typedef int (*uicb_anic)(WINDOW *, void *, bool);

struct anic_default {
  char state;
  char *fmt;
};

struct anic {
  unsigned int x;
  unsigned int y;
  uicb_anic uicb;
  void *data;
  chtype attrs;
};

struct anic *
init_anic_default(unsigned int x, unsigned int y, chtype attrs, char *fmt);

struct anic *
init_anic(unsigned int x, unsigned int y, chtype attrs, uicb_anic uicb);

void
free_anic_default(struct anic *a);

void
free_anic(struct anic *a);

int
anic_cb(WINDOW *win, void *data, bool timed_out);

void
register_anic(struct anic *a, uicb_anic uicb);

void
register_anic_default(struct anic *a);

#endif