1 /* $XConsortium: AccessSDLP.h /main/7 1995/12/18 16:30:11 cde-hp $ */
2 /************************************<+>*************************************
3 ****************************************************************************
7 ** Project: Run Time Project File Access
9 ** Description: Header file for Access.h
11 ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
13 ** (c) Copyright 1993, 1994 Hewlett-Packard Company
14 ** (c) Copyright 1993, 1994 International Business Machines Corp.
15 ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
16 ** (c) Copyright 1993, 1994 Novell, Inc.
19 ****************************************************************************
20 ************************************<+>*************************************/
21 #ifndef _DtHelpAccessSDLP_h
22 #define _DtHelpAccessSDLP_h
24 #include "CanvasSegP.h"
27 /****************************************************************************
29 ****************************************************************************/
31 * The following structure holds the sdl document specific information
33 typedef struct _sdlDocInfo {
43 * The following structure holds the id specific information
45 typedef struct _sdlIdInfo {
53 * The following structure holds the toss style specific information
55 typedef struct _sdlTossInfo {
56 unsigned long enum_values;
57 unsigned long num_values;
58 unsigned long str1_values;
59 unsigned long str2_values;
61 enum SdlElement el_type;
77 _DtHelpFontHints font_specs;
81 * The following structure holds the entry or index specific strings
83 typedef struct _sdlEntryInfo {
91 * The following structure holds loaded volumes. The fields of this
92 * structure should not be accessed by any code outside of the volume
95 typedef struct _sdlVolume {
96 SDLDocInfo *sdl_info; /* A pointer to the SDL doc info */
97 _DtCvSegment *toss; /* A pointer to the Table of Styles */
98 /* and Semantics withing the volume */
99 _DtCvSegment *loids; /* A pointer to the List of Ids */
100 _DtCvSegment *index; /* A pointer to the List of Keywords */
101 _DtCvSegment *title; /* A pointer to the document head */
102 _DtCvSegment *snb; /* A pointer to the document's snb */
103 _DtCvPointer client_data; /* data that must be used to free the title
105 void (*destroy_region)(); /* The destroy region routine specified
106 when the title was read */
107 short minor_no; /* The minor number of the sdl version */
108 short title_processed; /* If the title has already been searched for */
112 /****************************************************************************
114 ****************************************************************************/
115 /*********************/
116 /* SDLDocInfo macros */
117 /*********************/
119 #ifndef _SdlDocInfoPtrCharSet
120 #define _SdlDocInfoPtrCharSet(x) ((x)->char_set)
123 #ifndef _SdlDocInfoPtrDocId
124 #define _SdlDocInfoPtrDocId(x) ((x)->doc_id)
127 #ifndef _SdlDocInfoPtrFirstPg
128 #define _SdlDocInfoPtrFirstPg(x) ((x)->first_pg)
131 #ifndef _SdlDocInfoPtrLanguage
132 #define _SdlDocInfoPtrLanguage(x) ((x)->language)
135 #ifndef _SdlDocInfoPtrSdlDtd
136 #define _SdlDocInfoPtrSdlDtd(x) ((x)->sdldtd)
139 #ifndef _SdlDocInfoPtrStamp
140 #define _SdlDocInfoPtrStamp(x) ((x)->timestamp)
143 /***********************/
144 /* SDLEntryInfo macros */
145 /***********************/
147 #ifndef _SdlSegEntryInfo
148 #define _SdlSegEntryInfo(x) ((FrmtPrivInfoPtr(x))->entry)
151 #ifndef _SdlSegToSdlEntryInfo
152 #define _SdlSegToSdlEntryInfo(x) ((SDLEntryInfo *) _SdlSegEntryInfo(x))
155 /********************/
156 /* SDLIdInfo macros */
157 /********************/
159 #ifndef _SdlIdInfoPtrOffset
160 #define _SdlIdInfoPtrOffset(x) ((x)->offset)
163 #ifndef _SdlIdInfoPtrRlevel
164 #define _SdlIdInfoPtrRlevel(x) ((x)->rlevel)
167 #ifndef _SdlIdInfoPtrRssi
168 #define _SdlIdInfoPtrRssi(x) ((x)->rssi)
171 #ifndef _SdlIdInfoPtrType
172 #define _SdlIdInfoPtrType(x) ((x)->type)
175 #ifndef _SdlSegToSdlIdInfoPtr
176 #define _SdlSegToSdlIdInfoPtr(x) \
177 ((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))
180 #ifndef _SdlSegToSdlIdInfoRssi
181 #define _SdlSegToSdlIdInfoRssi(x) \
182 (((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))->rssi)
185 #ifndef _SdlSegToSdlIdInfoType
186 #define _SdlSegToSdlIdInfoType(x) \
187 (((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))->type)
190 #ifndef _SdlSegToSdlIdInfoLevel
191 #define _SdlSegToSdlIdInfoLevel(x) \
192 (((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))->rlevel)
195 /**********************/
196 /* SDLTossInfo macros */
197 /**********************/
199 #ifndef _SdlTossInfoPtrFlag1
200 #define _SdlTossInfoPtrFlag1(x) ((x)->enum_values)
203 #ifndef _SdlTossInfoPtrFlag2
204 #define _SdlTossInfoPtrFlag2(x) ((x)->num_values)
207 #ifndef _SdlTossInfoPtrFlag3
208 #define _SdlTossInfoPtrFlag3(x) ((x)->str1_values)
211 #ifndef _SdlTossInfoPtrFlag4
212 #define _SdlTossInfoPtrFlag4(x) ((x)->str2_values)
215 #ifndef _SdlTossInfoPtrEnter
216 #define _SdlTossInfoPtrEnter(x) ((x)->str1.enter)
219 #ifndef _SdlTossInfoPtrExit
220 #define _SdlTossInfoPtrExit(x) ((x)->str2.exit)
223 #ifndef _SdlTossInfoPtrColJ
224 #define _SdlTossInfoPtrColJ(x) ((x)->str1.colj)
227 #ifndef _SdlTossInfoPtrColW
228 #define _SdlTossInfoPtrColW(x) ((x)->str2.colw)
231 #ifndef _SdlTossInfoPtrRlevel
232 #define _SdlTossInfoPtrRlevel(x) ((x)->rlevel)
235 #ifndef _SdlTossInfoPtrStr1
236 #define _SdlTossInfoPtrStr1(x) ((x)->str1.str)
239 #ifndef _SdlTossInfoPtrStr2
240 #define _SdlTossInfoPtrStr2(x) ((x)->str2.str)
243 #ifndef _SdlTossInfoPtrSsi
244 #define _SdlTossInfoPtrSsi(x) ((x)->ssi)
247 #ifndef _SdlTossInfoPtrFontSpecs
248 #define _SdlTossInfoPtrFontSpecs(x) ((x)->font_specs)
251 #ifndef _SdlTossInfoPtrClan
252 #define _SdlTossInfoPtrClan(x) ((x)->clan)
255 #ifndef _SdlTossInfoPtrType
256 #define _SdlTossInfoPtrType(x) ((x)->el_type)
259 #ifndef _SdlSegTossInfo
260 #define _SdlSegTossInfo(x) ((FrmtPrivInfoPtr(x))->toss)
263 #ifndef _SdlSegPtrToTossInfo
264 #define _SdlSegPtrToTossInfo(x) ((SDLTossInfo *) _SdlSegTossInfo(x))
267 #ifndef _SdlSegPtrToTossType
268 #define _SdlSegPtrToTossType(x) ((_SdlSegPtrToTossInfo(x))->el_type)
275 #ifndef _SdlVolumeMinorNumber
276 #define _SdlVolumeMinorNumber(x) ((x)->minor_no)
279 /*******************/
280 /* Language macros */
281 /*******************/
283 #ifndef _SdlSegLangChar
284 #define _SdlSegLangChar(x) ((FrmtPrivInfoPtr(x))->lang_char)
287 #ifndef _SdlSegPtrToLangChar
288 #define _SdlSegPtrToLangChar(x) ((char **)_SdlSegLangChar(x))
291 #endif /* _DtHelpAccessSDLP_h */