aboutsummaryrefslogtreecommitdiff
path: root/src/Globals.h
blob: 95a61ea943d45cf3445d117c50579329ccb25802 (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
#ifndef INSEL_GLOBALS_H
#define INSEL_GLOBALS_H

#include <stddef.h>

#define INITIAL_CAPACITY 64
#define DEFAULT_LINES 10

typedef struct {
  char **items;
  size_t count;
  size_t capacity;
} ItemList;

typedef struct {
  char *prompt;
  int insensitive;
} Options;

extern Options opts;
extern ItemList all_items;
extern ItemList filtered;
extern char *input;
extern size_t input_len;
extern size_t input_capacity;
extern int cursor;
extern int scroll;
extern int needs_redraw;
extern int tty_fd;
extern int tty_out_fd;
extern int orig_stdout;
extern int stdin_is_tty;

#endif