home *** CD-ROM | disk | FTP | other *** search
- #ifndef PCG_FILEREQ_H
- #define PCG_FILEREQ_H
-
- #include "Precognition.h"
- #include <libraries/dos.h>
-
-
- typedef BOOL (*frFileFilter)( struct FileInfoBlock *fib );
-
- /*
- ** an 'frFileFilter' is a pointer to a function which accepts a
- ** a 'FileInfoBlock' and returns TRUE iff that file should appear
- ** in the requester.
- **
- ** This allows applications to filter out unwanted files from the
- ** the requester. e.g. the filter 'frsf_NoIcons' filters out ".info"
- ** files.
- */
-
- BOOL frff_NoIcons( struct FileInfoBlock *fib );
- /*
- ** This filters out all files ending in ".info"
- */
-
- #define FULLPATHNAME_SIZE 129
-
- typedef struct FileReqInfo
- {
- Screen *screen;
- MsgPort *SharedUserPort;
- char *title;
- BOOL MustExist;
- char *FullPathName; /* This needs to be a BIG (129) string */
- frFileFilter filter;
- } FileReqInfo;
-
- /*
- ** File Requester information.
- **
- ** 'screen' is the screen on which to open (NULL for workbench)
- **
- ** 'title' is the title of the file requester window
- **
- ** 'MustExist' is a flag which indicates that the selected file
- ** must already exist.
- **
- ** 'filter' is a pointer to a function which filters out unwanted
- ** files. Use NULL to have all files. Use 'frff_NoIcons'
- ** to filter out ".info" files. (Or create your own.)
- **
- ** FullPathName, if not null, is the default pathname. The user
- ** selection is also returned here.
- **
- */
-
- BOOL pcg_FileReq( FileReqInfo *frInfo );
-
- /*
- ** Precognition file requester.
- **
- ** Returns FALSE if the user selected "Cancel"
- ** (or some other error occurred.)
- */
-
- #endif