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 libraries 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: GlobSearchP.h /main/4 1995/10/26 12:22:52 rswiston $ */
24 /************************************<+>*************************************
25 ****************************************************************************
27 ** File: GlobSearchP.h
29 ** Project: DtHelp Project
31 ** Description: Builds and displays an instance of a DtHelp GlobSearch
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.
42 ****************************************************************************
43 ************************************<+>*************************************/
44 #ifndef _GlobSearchP_h
45 #define _GlobSearchP_h
48 #include "FileListUtilsI.h"
49 #include "StringFuncsI.h" /* for _CEStrcollProc */
52 _DtHelpGlobSrchVolumeUndef = 0,
53 _DtHelpGlobSrchCurVolume = 1,
54 _DtHelpGlobSrchSelectedVolumes,
55 _DtHelpGlobSrchAllVolumes
56 } _DtHelpGlobSrchSources;
59 _DtHelpGlobSrchSearchThisVolume = 32,
60 _DtHelpGlobSrchNothingDone = 0,
61 _DtHelpGlobSrchTopicSearchInProgress = 1,
62 _DtHelpGlobSrchTopicSearchDone = 2,
63 _DtHelpGlobSrchIndexSearchInProgress = 4,
64 _DtHelpGlobSrchIndexSearchDone = 8,
65 _DtHelpGlobSrchEverySearchDone = 15
66 } _DtHelpGlobSrchState;
68 /* maintained for each volume searched thus far */
69 /* this data is stored in a struct pointed to by 'clientData' in _DtHelpFileList */
70 typedef struct _DtHelpGlobSrchVol {
71 unsigned int searchThisVolume:1;
72 unsigned int nothingDone:1;
73 unsigned int topicSearchInProgress:1;
74 unsigned int topicSearchDone:1;
75 unsigned int indexSearchInProgress:1;
76 unsigned int indexSearchDone:1;
77 unsigned int searchCompleted:1;
78 unsigned int showVolInList:1; /* show vol in srchResultList? */
79 unsigned int zeroHitsOk:1; /* show vol with zero hits? */
80 unsigned int hitsDisplayed:1; /* are hits shown in list? */
81 unsigned int showHitsWithVol:1; /* show hits of the volume? */
82 unsigned int gatheredFullIndex:1; /* full index was gathered */
83 unsigned int gotLocale:1; /* got locale already */
84 struct _DtHelpGlobSrchHit * hitListHead;
85 struct _DtHelpGlobSrchHit * hitListTail;
86 int hitCnt; /* number hits for this volume */
87 int startPosition; /* position of volume item */
88 int nextVolPosition; /* pos of next vol with hits */
89 size_t searchedCnt; /* number items searched thus far */
90 char * * indexEntriesList;/* entries for searching */
91 XmString * indexXmStrsList; /* entries for display */
92 XmString * curIndexXmStr; /* position in indexXmStrsList */
93 _DtHelpVolumeHdl volHandle;
94 char * stdLocale; /* CDE standard locale of the volume */
95 char * iconv3Codeset; /* iconv-compatible codeset of volume locale */
96 _CEStrcollProc strcollProc; /* proc to do string coll */
99 /* maintained for each location hit encountered */
100 typedef struct _DtHelpGlobSrchHit {
101 struct _DtHelpGlobSrchHit * next;
102 _DtHelpFileEntry volume;
103 int indexKey; /* hash value for quick compares */
104 XmString indexTitle; /* title used for display */
105 char * indexEntry; /* string used for retrieval */
106 char ** topicIdList; /* list of topic ids of this index */
107 char ** topicFileList;/* list of files of the topics */
108 XmString * topicTitles; /* list of titles of the topics */
109 short topicCnt; /* number of topics in the list */
110 unsigned int topicsLoaded:1; /* loaded topics of this index*/
111 unsigned int topicsDisplayed:1; /* are topics shown in list */
112 unsigned int showTopicsWithHit:1;/* show topics if showing hit?*/
113 } _DtHelpGlobSrchHit;
115 #endif /* _GlobSearchP_h */
116 /* DON'T ADD ANYTHING AFTER THIS #endif */