1 /* $XConsortium: ilefs.h /main/3 1995/10/23 15:47:11 rswiston $ */
2 /**---------------------------------------------------------------------
6 *** description: Public include file for Image Library (IL) EFS support.
9 *** (c)Copyright 1992 Hewlett-Packard Co.
11 *** RESTRICTED RIGHTS LEGEND
12 *** Use, duplication, or disclosure by the U.S. Government is subject to
13 *** restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
14 *** Technical Data and Computer Software clause in DFARS 252.227-7013.
15 *** Hewlett-Packard Company
16 *** 3000 Hanover Street
17 *** Palo Alto, CA 94304 U.S.A.
18 *** Rights for non-DOD U.S. Government Departments and Agencies are as set
19 *** forth in FAR 52.227-19(c)(1,2).
21 ***-------------------------------------------------------------------*/
32 #ifndef NeedFunctionPrototypes
33 #if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
34 #define NeedFunctionPrototypes 1
36 #define NeedFunctionPrototypes 0
38 #endif /* NeedFunctionPrototypes */
40 #ifndef NeedWidePrototypes
41 #if defined(NARROWPROTO)
42 #define NeedWidePrototypes 0
44 #define NeedWidePrototypes 1
53 /* openMode to ilEFSOpen() */
55 #define IL_EFS_READ_SEQUENTIAL 1
56 #define IL_EFS_WRITE 2
58 /* readMode to ilEFSReadImage() */
59 #define IL_EFS_READ_MAIN 0
60 #define IL_EFS_READ_MASK 1
62 /* masks for bits in ilEFSFileInfo/ilEFSFileTypeInfo.attributes */
63 #define IL_EFS_MULTI_PAGE_READS (1<<0)
64 #define IL_EFS_MULTI_PAGE_WRITES (1<<1)
65 #define IL_EFS_MASK_READS (1<<2)
66 #define IL_EFS_MASK_WRITES (1<<3)
67 #define IL_EFS_SCALEABLE_READS (1<<4)
69 /* masks for bits in ilEFSPageInfo.attributes */
70 #define IL_EFS_EOF (1<<0)
71 #define IL_EFS_MASKED (1<<1)
72 #define IL_EFS_SCALEABLE (1<<2)
74 /* masks for bits in searchOptions to ilEFSOpen() */
75 #define IL_EFS_BY_TYPE_NAME (1<<0)
76 #define IL_EFS_BY_EXTENSION (1<<1)
77 #define IL_EFS_BY_CHECKING (1<<2)
78 #define IL_EFS_READ_SEARCH (IL_EFS_BY_EXTENSION | IL_EFS_BY_CHECKING)
80 /* String lengths; all values include trailing null. */
81 #define IL_EFS_MAX_NAME_CHARS 12
82 #define IL_EFS_MAX_DISPLAY_NAME_CHARS 24
83 #define IL_EFS_MAX_EXTENSION_CHARS 8
85 #define IL_EFS_MAX_EXTENSIONS 8
87 #define IL_EFS_TYPE_RESERVED_SIZE 10
90 typedef ilObject ilEFSFile;
91 typedef ilObject ilEFSFileType;
94 ilEFSFileType fileType;
95 unsigned short openMode;
96 unsigned short howFound;
97 unsigned long attributes;
104 unsigned long attributes;
109 ilImageFormat format;
113 char name [IL_EFS_MAX_NAME_CHARS];
114 char displayName [IL_EFS_MAX_DISPLAY_NAME_CHARS];
115 unsigned short checkOrder;
117 char extensions [IL_EFS_MAX_EXTENSIONS]
118 [IL_EFS_MAX_EXTENSION_CHARS];
119 unsigned long openModes;
120 unsigned long attributes;
124 ilBool (*GetPageInfo)();
125 ilBool (*ReadImage)();
126 ilBool (*WriteImage)();
129 long reserved [IL_EFS_TYPE_RESERVED_SIZE];
133 extern ilEFSFile ilEFSOpen (
134 #if NeedFunctionPrototypes
137 unsigned int openMode,
138 unsigned long searchOptions,
144 extern ilBool ilEFSGetFileInfo (
145 #if NeedFunctionPrototypes
147 ilEFSFileInfo *pInfo /* RETURNED */
151 extern ilBool ilEFSSeek (
152 #if NeedFunctionPrototypes
159 extern ilBool ilEFSGetPageInfo (
160 #if NeedFunctionPrototypes
162 ilEFSPageInfo *pInfo /* RETURNED */
166 extern ilBool ilEFSReadImage (
167 #if NeedFunctionPrototypes
170 unsigned int readMode,
177 extern ilBool ilEFSWriteImage (
178 #if NeedFunctionPrototypes
183 ilClientImage maskImage,
188 extern ilBool ilEFSListFileTypes (
189 #if NeedFunctionPrototypes
191 int *pNFileTypes, /* RETURNED */
192 ilEFSFileType **pFileTypes /* RETURNED */
196 extern ilBool ilEFSGetFileTypeInfo (
197 #if NeedFunctionPrototypes
198 ilEFSFileType fileType,
199 ilEFSFileTypeInfo *pInfo /* RETURNED */
203 extern ilEFSFileType ilEFSAddFileType (
204 #if NeedFunctionPrototypes
206 ilEFSFileTypeInfo *pInfo,