flayer.h - sam - An updated version of the sam text editor. | |
git clone git://vernunftzentrum.de/sam.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
flayer.h (1428B) | |
--- | |
1 /* Copyright (c) 1998 Lucent Technologies - All rights reserved. */ | |
2 #undef None | |
3 typedef enum Vis{ | |
4 None=0, | |
5 Some, | |
6 All | |
7 }Vis; | |
8 | |
9 enum{ | |
10 Clicktime=1000 /* one second */ | |
11 }; | |
12 | |
13 typedef struct Flayer Flayer; | |
14 | |
15 /* note that we track background color, but not foreground | |
16 * all layers have the same foreground color | |
17 */ | |
18 struct Flayer | |
19 { | |
20 uint64_t bg; | |
21 Frame f; | |
22 int64_t origin; /* offset of first char in flayer */ | |
23 int64_t p0, p1; | |
24 int64_t click; /* time at which selection click occurred, in… | |
25 wchar_t *(*textfn)(Flayer*, int64_t, uint64_t*); | |
26 int user0; | |
27 void *user1; | |
28 Rectangle entire; | |
29 Rectangle scroll; | |
30 Vis visible; | |
31 }; | |
32 | |
33 void flborder(Flayer*, bool); | |
34 void flclose(Flayer*); | |
35 void fldelete(Flayer*, int64_t, int64_t); | |
36 void flfp0p1(Flayer*, uint64_t*, uint64_t*); | |
37 void flinit(Flayer*, Rectangle, XftFont*, uint64_t bg); | |
38 void flinsert(Flayer*, wchar_t*, wchar_t*, int64_t); | |
39 void flnew(Flayer*, wchar_t *(*fn)(Flayer*, int64_t, uint64_t*), int,… | |
40 int flprepare(Flayer*); | |
41 Rectangle flrect(Flayer*, Rectangle); | |
42 void flrefresh(Flayer*, Rectangle, int); | |
43 void flreshape(Rectangle); | |
44 bool flselect(Flayer*); | |
45 void flsetselect(Flayer*, int64_t, int64_t); | |
46 void flstart(Rectangle); | |
47 void flupfront(Flayer*); | |
48 Flayer *flwhich(Point); | |
49 | |
50 #define FLMARGIN 4 | |
51 #define FLSCROLLWID 12 | |
52 #define FLGAP 4 |