2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: AccessSDLP.h /main/7 1995/12/18 16:30:11 cde-hp $ */
24 /************************************<+>*************************************
25 ****************************************************************************
29 ** Project: Run Time Project File Access
31 ** Description: Header file for Access.h
33 ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
35 ** (c) Copyright 1993, 1994 Hewlett-Packard Company
36 ** (c) Copyright 1993, 1994 International Business Machines Corp.
37 ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
38 ** (c) Copyright 1993, 1994 Novell, Inc.
41 ****************************************************************************
42 ************************************<+>*************************************/
43 #ifndef _DtHelpAccessSDLP_h
44 #define _DtHelpAccessSDLP_h
46 #include "CanvasSegP.h"
49 /****************************************************************************
51 ****************************************************************************/
53 * The following structure holds the sdl document specific information
55 typedef struct _sdlDocInfo {
65 * The following structure holds the id specific information
67 typedef struct _sdlIdInfo {
75 * The following structure holds the toss style specific information
77 typedef struct _sdlTossInfo {
78 unsigned long enum_values;
79 unsigned long num_values;
80 unsigned long str1_values;
81 unsigned long str2_values;
83 enum SdlElement el_type;
99 _DtHelpFontHints font_specs;
103 * The following structure holds the entry or index specific strings
105 typedef struct _sdlEntryInfo {
113 * The following structure holds loaded volumes. The fields of this
114 * structure should not be accessed by any code outside of the volume
117 typedef struct _sdlVolume {
118 SDLDocInfo *sdl_info; /* A pointer to the SDL doc info */
119 _DtCvSegment *toss; /* A pointer to the Table of Styles */
120 /* and Semantics withing the volume */
121 _DtCvSegment *loids; /* A pointer to the List of Ids */
122 _DtCvSegment *index; /* A pointer to the List of Keywords */
123 _DtCvSegment *title; /* A pointer to the document head */
124 _DtCvSegment *snb; /* A pointer to the document's snb */
125 _DtCvPointer client_data; /* data that must be used to free the title
127 void (*destroy_region)(); /* The destroy region routine specified
128 when the title was read */
129 short minor_no; /* The minor number of the sdl version */
130 short title_processed; /* If the title has already been searched for */
134 /****************************************************************************
136 ****************************************************************************/
137 /*********************/
138 /* SDLDocInfo macros */
139 /*********************/
141 #ifndef _SdlDocInfoPtrCharSet
142 #define _SdlDocInfoPtrCharSet(x) ((x)->char_set)
145 #ifndef _SdlDocInfoPtrDocId
146 #define _SdlDocInfoPtrDocId(x) ((x)->doc_id)
149 #ifndef _SdlDocInfoPtrFirstPg
150 #define _SdlDocInfoPtrFirstPg(x) ((x)->first_pg)
153 #ifndef _SdlDocInfoPtrLanguage
154 #define _SdlDocInfoPtrLanguage(x) ((x)->language)
157 #ifndef _SdlDocInfoPtrSdlDtd
158 #define _SdlDocInfoPtrSdlDtd(x) ((x)->sdldtd)
161 #ifndef _SdlDocInfoPtrStamp
162 #define _SdlDocInfoPtrStamp(x) ((x)->timestamp)
165 /***********************/
166 /* SDLEntryInfo macros */
167 /***********************/
169 #ifndef _SdlSegEntryInfo
170 #define _SdlSegEntryInfo(x) ((FrmtPrivInfoPtr(x))->entry)
173 #ifndef _SdlSegToSdlEntryInfo
174 #define _SdlSegToSdlEntryInfo(x) ((SDLEntryInfo *) _SdlSegEntryInfo(x))
177 /********************/
178 /* SDLIdInfo macros */
179 /********************/
181 #ifndef _SdlIdInfoPtrOffset
182 #define _SdlIdInfoPtrOffset(x) ((x)->offset)
185 #ifndef _SdlIdInfoPtrRlevel
186 #define _SdlIdInfoPtrRlevel(x) ((x)->rlevel)
189 #ifndef _SdlIdInfoPtrRssi
190 #define _SdlIdInfoPtrRssi(x) ((x)->rssi)
193 #ifndef _SdlIdInfoPtrType
194 #define _SdlIdInfoPtrType(x) ((x)->type)
197 #ifndef _SdlSegToSdlIdInfoPtr
198 #define _SdlSegToSdlIdInfoPtr(x) \
199 ((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))
202 #ifndef _SdlSegToSdlIdInfoRssi
203 #define _SdlSegToSdlIdInfoRssi(x) \
204 (((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))->rssi)
207 #ifndef _SdlSegToSdlIdInfoType
208 #define _SdlSegToSdlIdInfoType(x) \
209 (((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))->type)
212 #ifndef _SdlSegToSdlIdInfoLevel
213 #define _SdlSegToSdlIdInfoLevel(x) \
214 (((SDLIdInfo *)((FrmtPrivInfoPtr(x))->id_info))->rlevel)
217 /**********************/
218 /* SDLTossInfo macros */
219 /**********************/
221 #ifndef _SdlTossInfoPtrFlag1
222 #define _SdlTossInfoPtrFlag1(x) ((x)->enum_values)
225 #ifndef _SdlTossInfoPtrFlag2
226 #define _SdlTossInfoPtrFlag2(x) ((x)->num_values)
229 #ifndef _SdlTossInfoPtrFlag3
230 #define _SdlTossInfoPtrFlag3(x) ((x)->str1_values)
233 #ifndef _SdlTossInfoPtrFlag4
234 #define _SdlTossInfoPtrFlag4(x) ((x)->str2_values)
237 #ifndef _SdlTossInfoPtrEnter
238 #define _SdlTossInfoPtrEnter(x) ((x)->str1.enter)
241 #ifndef _SdlTossInfoPtrExit
242 #define _SdlTossInfoPtrExit(x) ((x)->str2.exit)
245 #ifndef _SdlTossInfoPtrColJ
246 #define _SdlTossInfoPtrColJ(x) ((x)->str1.colj)
249 #ifndef _SdlTossInfoPtrColW
250 #define _SdlTossInfoPtrColW(x) ((x)->str2.colw)
253 #ifndef _SdlTossInfoPtrRlevel
254 #define _SdlTossInfoPtrRlevel(x) ((x)->rlevel)
257 #ifndef _SdlTossInfoPtrStr1
258 #define _SdlTossInfoPtrStr1(x) ((x)->str1.str)
261 #ifndef _SdlTossInfoPtrStr2
262 #define _SdlTossInfoPtrStr2(x) ((x)->str2.str)
265 #ifndef _SdlTossInfoPtrSsi
266 #define _SdlTossInfoPtrSsi(x) ((x)->ssi)
269 #ifndef _SdlTossInfoPtrFontSpecs
270 #define _SdlTossInfoPtrFontSpecs(x) ((x)->font_specs)
273 #ifndef _SdlTossInfoPtrClan
274 #define _SdlTossInfoPtrClan(x) ((x)->clan)
277 #ifndef _SdlTossInfoPtrType
278 #define _SdlTossInfoPtrType(x) ((x)->el_type)
281 #ifndef _SdlSegTossInfo
282 #define _SdlSegTossInfo(x) ((FrmtPrivInfoPtr(x))->toss)
285 #ifndef _SdlSegPtrToTossInfo
286 #define _SdlSegPtrToTossInfo(x) ((SDLTossInfo *) _SdlSegTossInfo(x))
289 #ifndef _SdlSegPtrToTossType
290 #define _SdlSegPtrToTossType(x) ((_SdlSegPtrToTossInfo(x))->el_type)
297 #ifndef _SdlVolumeMinorNumber
298 #define _SdlVolumeMinorNumber(x) ((x)->minor_no)
301 /*******************/
302 /* Language macros */
303 /*******************/
305 #ifndef _SdlSegLangChar
306 #define _SdlSegLangChar(x) ((FrmtPrivInfoPtr(x))->lang_char)
309 #ifndef _SdlSegPtrToLangChar
310 #define _SdlSegPtrToLangChar(x) ((char **)_SdlSegLangChar(x))
313 #endif /* _DtHelpAccessSDLP_h */