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: Mmdb.h /main/4 1996/05/29 13:01:24 rcs $ */
25 * (c) Copyright 1996 Digital Equipment Corporation.
26 * (c) Copyright 1996 Hewlett-Packard Company.
27 * (c) Copyright 1996 International Business Machines Corp.
28 * (c) Copyright 1996 Sun Microsystems, Inc.
29 * (c) Copyright 1996 Novell, Inc.
30 * (c) Copyright 1994, 1995, 1996 FUJITSU LIMITED.
31 * (c) Copyright 1996 Hitachi.
39 #define DtMmdb_PROTO1(x) (x)
40 #define DtMmdb_PROTO2(x,y) (x,y)
41 #define DtMmdb_PROTO3(x,y,z) (x,y,z)
47 #define DtMmdb_PROTO1(x) ()
48 #define DtMmdb_PROTO2(x,y) ()
49 #define DtMmdb_PROTO3(x,y,z) ()
57 typedef unsigned int DtMmdbBool;
61 /*****************************************************/
62 /* info lib structure */
63 /*****************************************************/
64 typedef struct _DtMmdbInfoLibInfo
68 unsigned int num_bookcases;
71 /*****************************************************/
72 /* basecase structure */
73 /*****************************************************/
74 typedef struct _DtMmdbBookCaseInfo
77 unsigned int num_books;
80 /*****************************************************/
81 /* oid handler structure */
82 /*****************************************************/
83 typedef struct _DtMmdbObjectId
88 extern DtMmdbHandle* DtMmdbGroundId;
90 /*****************************************************/
91 /* info request structure */
92 /*****************************************************/
93 typedef struct _DtMmdbInfoRequest
95 int bookcase_descriptor;
97 DtMmdbHandle* primary_oid;
98 DtMmdbHandle* secondary_oid;
100 } DtMmdbInfoRequest ;
103 /*****************************************************/
104 /* graphic info structure */
105 /*****************************************************/
106 typedef struct _DtMmdbGraphicInfo
109 unsigned short width;
110 unsigned short height;
111 unsigned int llx, lly ;
112 unsigned int urx, ury ;
117 /*****************************************************/
119 /*****************************************************/
123 /*****************************************************/
124 /* Handle space release*/
125 /*****************************************************/
126 void DtMmdbFreeHandle(DtMmdbHandle*);
127 void DtMmdbFreeHandleList(DtMmdbHandle**);
129 /*****************************************************/
131 /*****************************************************/
132 int DtMmdbOpenInfoLib DtMmdb_PROTO3(
133 const char* infolib_path,
134 const char* selected_base_name,
135 DtMmdbBool delayed_infolib_init
138 void DtMmdbCloseInfoLib DtMmdb_PROTO1(int infolib_descriptor);
140 DtMmdbInfoLibInfo* DtMmdbInfoLibGetInfo DtMmdb_PROTO1(int infolib_descriptor);
142 void DtMmdbInfoLibFreeInfo DtMmdb_PROTO1(DtMmdbInfoLibInfo*);
145 /*****************************************************/
147 /*****************************************************/
149 DtMmdbGetBookCaseByName
150 DtMmdb_PROTO2(int infolib_descriptor, const char* name);
153 DtMmdbGetBookCaseByIndex DtMmdb_PROTO2(int infolib_descriptor, int index);
156 DtMmdbGetBookCaseByLoc DtMmdb_PROTO2(
157 int infolib_descriptor,
162 DtMmdbGetBookCaseByLocs DtMmdb_PROTO2(
163 int infolib_descriptor,
164 const char** locators
167 DtMmdbBookCaseInfo* DtMmdbBookCaseGetInfo DtMmdb_PROTO1(int bookcase_descriptor);
168 void DtMmdbBookCaseFreeInfo DtMmdb_PROTO1(DtMmdbBookCaseInfo*);
170 /*****************************************************/
172 /*****************************************************/
173 const char* DtMmdbSectionGetLoc DtMmdb_PROTO1(DtMmdbInfoRequest* request);
176 DtMmdbSectionGetLongTitle DtMmdb_PROTO2(
177 DtMmdbInfoRequest* request,
178 unsigned int* title_length
182 DtMmdbSectionGetShortTitle DtMmdb_PROTO2(
183 DtMmdbInfoRequest* request,
184 unsigned int* title_length
188 DtMmdbSectionGetData DtMmdb_PROTO2(
189 DtMmdbInfoRequest* request,
190 unsigned int* data_length
193 int DtMmdbSectionGetDataSize DtMmdb_PROTO1(DtMmdbInfoRequest* request);
195 const char* DtMmdbSectionGetTocLoc DtMmdb_PROTO1( DtMmdbInfoRequest* request);
198 DtMmdbSectionGetBookId DtMmdb_PROTO1( DtMmdbInfoRequest* request);
201 DtMmdbSectionGetStyleSheetId DtMmdb_PROTO1(DtMmdbInfoRequest* request);
203 /*****************************************************/
205 /*****************************************************/
207 DtMmdbTocGetParentId DtMmdb_PROTO1(DtMmdbInfoRequest* request);
210 DtMmdbTocGetChildIds DtMmdb_PROTO2(
211 DtMmdbInfoRequest* request,
212 unsigned int* list_length
215 int DtMmdbTocGetNumOfChildren DtMmdb_PROTO1( DtMmdbInfoRequest* request);
217 /*****************************************************/
219 /*****************************************************/
221 DtMmdbLocatorGetSectionLoc DtMmdb_PROTO1(DtMmdbInfoRequest* request);
224 DtMmdbLocatorGetSectionObjectId DtMmdb_PROTO1(DtMmdbInfoRequest* request);
226 /*****************************************************/
228 /*****************************************************/
230 DtMmdbGraphicGetData DtMmdb_PROTO2(
231 DtMmdbInfoRequest* request,
232 unsigned int* data_length
236 DtMmdbGraphicGetInfo DtMmdb_PROTO1(DtMmdbInfoRequest* request);
237 void DtMmdbFreeGraphicInfo(DtMmdbGraphicInfo*);
240 /*****************************************************/
242 /*****************************************************/
244 DtMmdbStylesheetGetName DtMmdb_PROTO1(DtMmdbInfoRequest* request);
247 DtMmdbStylesheetGetata DtMmdb_PROTO2(
248 DtMmdbInfoRequest* request,
249 unsigned int* data_length
252 /*****************************************************/
254 /*****************************************************/
256 DtMmdbBookGetTocObjectId DtMmdb_PROTO1(DtMmdbInfoRequest* request);
259 DtMmdbBookGetShortTitle DtMmdb_PROTO2(
260 DtMmdbInfoRequest* request,
265 DtMmdbBookGetLongTitle DtMmdb_PROTO2(
266 DtMmdbInfoRequest* request,
270 int DtMmdbBookGetSeqNum DtMmdb_PROTO1(DtMmdbInfoRequest* request);
273 DtMmdbBookGetSeqLIcense DtMmdb_PROTO2(
274 DtMmdbInfoRequest* request,
278 DtMmdbHandle** DtMmdbBookGetTabList DtMmdb_PROTO2(
279 DtMmdbInfoRequest* request, unsigned int* length
282 /*****************************************************/
284 /*****************************************************/
286 DtMmdbDlpGetPrevSectionId DtMmdb_PROTO1(DtMmdbInfoRequest* request);
289 DtMmdbDlpGetNextSectionId DtMmdb_PROTO1(DtMmdbInfoRequest* request);
291 DtMmdbInfoRequest* newDtMmdbInfoRequestWithLoc(int bc_id, char* loc);
292 DtMmdbInfoRequest* newDtMmdbInfoRequestWithPrimaryOid(int bc_id, char* oid_str);
293 DtMmdbInfoRequest* newDtMmdbInfoRequestWithSecondaryOid(int bc_id, char* oid_str);
294 DtMmdbInfoRequest* newDtMmdbInfoRequestWithSeqnum(int bc_id, char* oid_str);
295 char* DtMmdbHandleToString(DtMmdbHandle* x);
296 void DtMmdbFreeInfoRequest(DtMmdbInfoRequest*);