This repository has been archived by the owner on Jul 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
dat.h
107 lines (91 loc) · 1.32 KB
/
dat.h
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
#define _XOPEN_SOURCE 600
#define IXP_P9_STRUCTS
#define IXP_NO_P9_
#include <fmt.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ixp.h>
#include <stuff/x.h>
#include <stuff/util.h>
#ifndef EXTERN
# define EXTERN extern
#endif
enum {
FORWARD,
BACKWARD,
LINE,
WORD,
CHAR,
CARET_LAST,
};
enum {
LACCEPT,
LBACKWARD,
LCHAR,
LCOMPLETE,
LFIRST,
LFORWARD,
LHISTORY,
LKILL,
LLAST,
LLINE,
LLITERAL,
LNEXT,
LNEXTPAGE,
LPASTE,
LPREV,
LPREVPAGE,
LREJECT,
LWORD,
};
typedef struct Item Item;
struct Item {
char* string;
char* retstring;
Item* next_link;
Item* next;
Item* prev;
int len;
int width;
};
EXTERN struct {
char* string;
char* end;
char* pos;
char* pos_end;
int size;
char* filter;
int filter_start;
} input;
EXTERN struct {
Window* win;
Image* buf;
char* prompt;
int height;
int rows;
bool ontop;
Rectangle itemr;
Point arrow;
} menu;
extern char binding_spec[];
EXTERN IxpServer srv;
EXTERN struct {
Item* all;
Item* first;
Item* start;
Item* end;
Item* sel;
int maxwidth;
} match;
Font* font;
CTuple cnorm;
CTuple csel;
EXTERN Item hist;
EXTERN Item* histsel;
EXTERN int itempad;
EXTERN int result;
EXTERN char* (*find)(const char*, const char*);
EXTERN int (*compare)(const char*, const char*, size_t);