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: FileListUtilsI.h /main/5 1995/10/26 12:19:25 rswiston $ */
24 /************************************<+>*************************************
25 ****************************************************************************
27 ** File: FileListUtilsI.h
29 ** Project: DtHelp Project
31 ** Description: File locating and handling utilities
34 ** (c) Copyright 1993, 1994 Hewlett-Packard Company
35 ** (c) Copyright 1993, 1994 International Business Machines Corp.
36 ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
37 ** (c) Copyright 1993, 1994 Novell, Inc.
40 ****************************************************************************
41 ************************************<+>*************************************/
42 #ifndef _FileListUtilsI_h
43 #define _FileListUtilsI_h
47 typedef struct _DtHelpFileRec {
48 struct _DtHelpFileRec * next; /* next file in list */
49 char * fileName; /* basename plus extensions */
50 char * fullFilePath; /* full path of the file */
51 int nameKey; /* used for quick identity compare*/
52 char * fileTitle; /* comparable title of file */
53 XmString fileTitleXmStr; /* displayable title of file */
54 char * docId; /* string identifying doc */
55 char * timeStamp; /* string with time of doc */
56 void * clientData; /* data assoc with the file */
57 unsigned int fileSelected:1; /* file selected for activity */
58 unsigned int reservedFlag1:1;
59 unsigned int reservedFlag2:1;
60 unsigned int reservedFlag3:1;
61 unsigned int clientFlag1:1;
62 unsigned int clientFlag2:1;
63 unsigned int clientFlag3:1;
64 unsigned int clientFlag4:1;
65 } _DtHelpFileRec, * _DtHelpFileEntry, * _DtHelpFileList;
67 typedef void (*_DtHelpFileScanProcCB)(
69 XtPointer clientData);
71 typedef Boolean (*_DtHelpFileInfoProc)(
72 XtPointer pDisplayArea, /* in: display area in use */
73 char * volumePath, /* in: full path to file */
74 char ** ret_title, /* out: mallocd doc title string */
75 XmString * ret_titleXmStr,/* out: mallocd doc title XmStr */
76 char ** ret_docId, /* out: mallocd doc Id string */
77 char ** ret_timeStamp, /* out: mallocd doc time string */
78 int * ret_nameKey, /* out: hash value for fast discimination */
79 XmFontList * io_fontList, /* io: fontList for title */
80 Boolean * ret_mod); /* out: has font list been changed */
83 /* Bitwise-ORable flags that affect the comparisons
84 done when comparing two files. */
86 _DtHELP_FILE_NAME = 0x01,
87 _DtHELP_FILE_DIR = 0x02,
88 _DtHELP_FILE_TITLE = 0x04,
89 _DtHELP_FILE_TIME = 0x08,
90 _DtHELP_FILE_IDSTR = 0x10,
91 _DtHELP_FILE_LOCALE = 0x20
92 } _DtHelpFileAttributes;
94 Boolean _DtHelpFileListAddFile (
95 _DtHelpFileList * in_out_list,
96 XmFontList * io_fontList,
100 _DtHelpFileInfoProc infoProc,
103 XtPointer pDisplayArea);
104 _DtHelpFileList _DtHelpFileListGetMatch (
105 _DtHelpFileList fileListHead,
107 _DtHelpFileInfoProc infoProc,
109 XtPointer pDisplayArea);
110 Boolean _DtHelpFileIsSameP(
113 _DtHelpFileInfoProc infoProc,
115 XtPointer pDisplayArea);
116 _DtHelpFileList _DtHelpFileListGetNext (
117 _DtHelpFileList fileListHead,
118 _DtHelpFileList curFile);
119 int _DtHelpFileListScanPaths (
120 _DtHelpFileList * in_out_list,
121 XmFontList * io_fontList,
124 const char * suffixList[],
125 Boolean searchHomeDir,
126 _DtHelpFileInfoProc infoProc,
127 XtPointer pDisplayArea,
128 int sysPathCompareFlags,
129 int otherPathCompareFlags,
131 _DtHelpFileScanProcCB scanProc,
132 XtPointer clientData);
133 void _DtHelpFileFreeEntry (
134 _DtHelpFileEntry entry);
136 #endif /* _FileListUtilsI_h */
137 /* DON'T ADD ANYTHING AFTER THIS #endif */