Merge branch 'master' of git://cadel.mutabah.net/acess2
[tpg/acess2.git] / Usermode / Applications / gui_ate_src / include / file.h
1 /*
2  * Acess Text Editor (ATE)
3  * - By John Hodge (thePowersGang)
4  *
5  * include/file.h
6  * - In-memory file structures
7  */
8 #ifndef _ATE__FILE_H_
9 #define _ATE__FILE_H_
10 #include <stdio.h>
11
12 typedef struct sFileLine        tFileLine;
13
14 struct sFileLine
15 {
16         tFileLine       *Next;
17         tFileLine       *Prev;
18          int    Num;
19
20         // State data for hilighting
21          int    HilightState;
22         char    *Rendered;
23
24          int    Space;
25          int    Length;
26         char    *Data;
27 };
28
29 typedef struct sFile
30 {
31          int    nLines;
32         tFileLine       *FirstLine;
33         tFileLine       *CurrentLine;
34          int    CursorOfs;
35         
36          int    NameOfs;
37         const char      Path[];
38 } tFile;
39
40 enum eFile_DeleteType
41 {
42         DELTYPE_BACK,
43         DELTYPE_BACK_WORD,
44         DELTYPE_FORWARD,
45         DELTYPE_FORWARD_WORD,
46         DELTYPE_TO_EOL,
47         DELTYPE_TO_SOL,
48         DELTYPE_LINE
49 };
50
51 #endif
52

UCC git Repository :: git.ucc.asn.au