First attempt at debianization
[erwise] / HText / HText.h
1 /*
2  * HText.h --
3  *
4  * Author: Teemu Rantanen <tvr@cs.hut.fi>
5  * Copyright (c) 1992 Teemu Rantanen
6  *                    All rights reserved
7  *
8  * Created: Wed Feb 26 15:57:03 1992 tvr
9  * Last modified: Mon Apr 27 23:55:47 1992 tvr
10  *
11  */
12
13
14 /*
15  * Maximum Htext object data size
16  */
17
18 #define HTEXT_MAX_OBJECT_SIZE   1024
19
20 /*
21  * Region changes on hypertext
22  */
23 #define HTEXT_PARAGRAPH         1
24 #define HTEXT_TAB               2
25 #define HTEXT_NEWLINE           3
26 #define HTEXT_CONTINUE          4
27
28
29 /*
30  * Hypertext object structure.
31  */
32
33 typedef struct HTextObject
34 {
35   /*
36    * Pointers to next and previous objects
37    */
38
39   struct HTextObject *prev;
40   struct HTextObject *next;
41
42   /*
43    * All Hypertext specific fields here
44    */
45
46   /*
47    * If object is an anchor, have anchordata here
48    */
49   HTChildAnchor *anchor;
50
51   /*
52    * Style of this object.
53    */
54   HTStyle *style;
55
56   /*
57    * what data on this object
58    */
59   char *data;
60
61   /*
62    * How many bytes data
63    */
64   int length;
65
66   /*
67    * Marks paragraph change at the end of this object
68    */
69   int paragraph;
70
71   /*
72    * All Xl specific data here
73    */
74
75   /*
76    * Position of an object on a virtual screen. These will be set when
77    * object is being positioned.
78    */
79   long x;
80   long y;
81
82   /*
83    * Size of an object. These are calculated once (as these does
84    * not change).
85    */
86   long width;
87   long height;
88
89   /*
90    * Xl specific data of this object
91    */
92   struct XlObjectData *xl_data;
93 } HTextObject_t;
94
95
96 /*
97  * Hypertext structure of a page
98  */
99
100 typedef struct HText
101 {
102   /*
103    * First and last hypertext objects
104    */
105
106   struct HTextObject *first;
107   struct HTextObject *last;
108
109   /*
110    * Node anchor of this page
111    */
112   HTParentAnchor *node_anchor;
113
114   /*
115    * Xl specific global data for a page
116    */
117   struct XlGlobalData *xl_global;
118
119   /*
120    * HREF pointer list
121    */
122   struct HTextAnchor *anchorlist;
123
124   /*
125    * Cursor object of this page
126    */
127   struct HTextObject *cursor;
128
129 } HText_t;
130
131
132 /*
133  * HREF pointer list on a page
134  */
135 typedef struct HTextAnchor
136 {
137   /*
138    * Pointer to next
139    */
140   struct HTextAnchor *next;
141
142   /*
143    * Anchor data
144    */
145   HTChildAnchor *anchor;
146
147   /*
148    * To which hypertextobject is this connected to
149    */
150   struct HTextObject *object;
151 } HTextAnchor_t;
152
153
154
155 /*
156  * Prototype
157  */
158
159 HText_t *HtDuplicate (HText_t * text);