home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / fish / code_examples / pfiler / pfiler.h < prev    next >
C/C++ Source or Header  |  1990-10-29  |  2KB  |  50 lines

  1. /*
  2.  * Header file for the PFiler.
  3.  */
  4.                 /* These are the defines for the Flags field             */
  5. #define FSB_NOINFO     0    /* Don't want to see '.info' files                */
  6. #define FSB_NOFILE     1    /* Don't want to see files                    */
  7. #define FSB_NODIR      2    /* Don't want to see dirs                    */
  8. #define FSB_NODRIVE    3    /* Don't want to see drives                    */
  9. #define FSB_NOVOL      4    /* Don't want to see volumes                    */
  10. #define FSB_NOASSIGN   5    /* Don't want to see logical devices                */
  11. #define FSB_NOFILESIZE 6    /* Don't want to see file-sizes                    */
  12.  
  13. #define FSF_NOINFO     (1<<FSB_NOINFO)
  14. #define FSF_NOFILE     (1<<FSB_NOFILE)
  15. #define FSF_NODIR      (1<<FSB_NODIR)
  16. #define FSF_NODRIVE    (1<<FSB_NODRIVE)
  17. #define FSF_NOVOL      (1<<FSB_NOVOL)
  18. #define FSF_NOASSIGN   (1<<FSB_NOASSIGN)
  19. #define FSF_NODEV      FSF_NODRIVE+FSF_NOVOL+FSF_NOASSIGN
  20. #define FSF_NOFILESIZE (1<<FSB_NOFILESIZE)
  21.  
  22.                 /* Results codes returned by FileSelect                */
  23. #define FSENoMem  -3        /* Could not get memory for internal use            */
  24. #define FSENoWin  -2        /* Could not open window                    */
  25. #define FSENoLib  -1        /* Could not open either dos/graphics/intuition.library        */
  26. #define FSENeg    0        /* No file has been selected                    */
  27. #define FSEPos    1        /* A file has been selected                    */
  28.  
  29.                 /* The FileRequest is what the                    */
  30.                 /* user has to pass as the only parameter            */
  31. struct FileRequest
  32. {
  33.   WORD LeftEdge;        /* Initial x position of the window                */
  34.   WORD TopEdge;            /* Initial y position of the window                */
  35.   WORD Flags;            /* See below                            */
  36.   WORD PathChars;        /* Number of bytes in PathBuffer                */
  37.   WORD FileChars;        /* Number of bytes in FileBuffer (Should be at least 32)    */
  38.   UBYTE *PathBuffer;        /* Ptr to buffer of size PathChars (in bytes)            */
  39.   UBYTE *FileBuffer;        /* Ptr to buffer of size FileChars (in bytes)            */
  40.   UBYTE *TitleTxt;        /* Text to use as window-title (0L for 'Select a file'        */
  41.   UBYTE *PosTxt;        /* Text to put in the 'Ok' gadget (Max. 6 bytes+NULL)      or 0L    */
  42.   UBYTE *NegTxt;        /* Text to put in the 'Cancel' gadget (Max. 6 bytes+NULL) or 0L    */
  43.   struct Screen *Screen;    /* Screen to open requester on or 0L for WBenchScreen         */
  44. /* These are -PRIVATE-. The user SHOULDN'T modify them. Only set them to 0            */
  45. /* or call FreeFileSelect() before the first call to FileSelect() with this structure    */
  46.   LONG Priv1[2];
  47.   WORD Priv2[6];
  48. };
  49.  
  50.