home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / libs / lib_coll.lha / FRQLIB.LZH / Programming.LZH / kdbase.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-29  |  7.3 KB  |  183 lines

  1. /*
  2.  
  3. Filename: kdbase.h
  4. Release : 3.13
  5. Date    : 29 April 1992
  6.  
  7. (C) 1990-1992 Khalid Aldoseri
  8.  
  9. */
  10.  
  11.  
  12. #define KLIBNAME        "kd_freq.library"
  13. #define    KLIBVERSION        3L
  14.  
  15. #define    FRB_PRIVATE        0L    /* Private flag - do not use */
  16. #define    FRB_DUALWILD        1L    /* Dual wildcard facility */
  17. #define FRB_NOINFO        2L    /* Don't show .info files */
  18. #define    FRB_NOTITLEBAR        3L    /* No titlebar/dragbar/front/back/close gads */
  19. #define FRB_AUTOPOSITION    4L    /* Use autopositioning */
  20. #define FRB_AUTOSIZE        5L    /* Use autosizing */
  21. #define FRB_NORESIZE        6L    /* Forbid resizing */
  22. #define FRB_OKTEXT        7L    /* New OK text defined */
  23. #define FRB_FRONTSCREEN        8L    /* Show up on front screen */
  24. #define FRB_NOTEXTSHADOW    9L    /* Do not use text shadows */
  25. #define FRB_REPLACEIMAGES    10L    /* Give user program images to FR */
  26. #define FRB_CANCELTEXT        11L    /* New Cancel text defined */
  27. #define FRB_NEWFONT        12L    /* Use a special font */
  28. #define FRB_SCREENFONT        13L    /* Use the screen's font */
  29. #define FRB_EXTENDEDSELECT    14L    /* -- old flag -- use SELECTLIST instead -- */
  30. #define FRB_INVERTLOOK        15L    /* Gives an inverted look.. use for Save */
  31. #define FRB_HIDEWILD        16L    /* Hide Wildcard to be defined in extras->Hide */
  32. #define FRB_NEWLOOK        17L    /* Make FR use that WB 2.0 look */
  33. #define FRB_NONEWLOOK        18L    /* Disable auto-enable of FR_NEWLOOK */
  34. #define FRB_SELECTLIST        19L    /* Allow user to select multiple files */
  35. #define    FRB_SLSHOWNAMES        20L    /* Show filenames only in Select List */
  36. #define    FRB_KEEPBUFFERS        21L    /* Don't flush buffers at exit. i.e. next
  37.                        call of NewFReq() will not re-read the
  38.                        directories. */
  39. #define    FRB_EXTRABUTTONS    22L    /* Activate the ExtraButtons feature */
  40. #define FRB_SELECTLISTTIME    23L    /* The select list is returned to the caller
  41.                        with the files in order of their selection
  42.                        and not sorted alphabetically */
  43. #define FRB_DIRSONLY        24L    /* Only show/select directories */
  44. #define FRB_USEPENS        25L    /* Makes FR uses pens defined in extras struct */
  45.                     /* note that higher pen numbers cause slower
  46.                        rendering speed. */
  47.  
  48. #define FRB_DEFSIZES        26L    /* Makes FR uses the default sizes defined
  49.                        in the extras struct */
  50.  
  51. #define FRB_NOAUTOSORT        27L    /* Disables auto sort when FR is done reading
  52.                        the directory */
  53.  
  54. #define FRB_DEVSLIST        28L    /* Show a list of devices instead of
  55.                        disk icons */
  56.  
  57. #define    FRB_SPECIAL2        29L    /* Private flag - do not use */
  58. #define    FRB_SPECIAL1        30L    /* Private flag - do not use */
  59. #define    FRB_INUSE        31L    /* Private flag - do not use */
  60.  
  61.  
  62. #define    FR_PRIVATE        1L << FRB_PRIVATE        /* !! */
  63. #define    FR_DUALWILD        1L << FRB_DUALWILD
  64. #define FR_NOINFO        1L << FRB_NOINFO        /* !! */
  65. #define    FR_NOTITLEBAR        1L << FRB_NOTITLEBAR
  66. #define FR_AUTOPOSITION        1L << FRB_AUTOPOSITION
  67. #define FR_AUTOSIZE        1L << FRB_AUTOSIZE
  68. #define FR_NORESIZE        1L << FRB_NORESIZE
  69. #define FR_OKTEXT        1L << FRB_OKTEXT
  70. #define FR_FRONTSCREEN        1L << FRB_FRONTSCREEN
  71. #define FR_NOTEXTSHADOW        1L << FRB_NOTEXTSHADOW
  72. #define FR_REPLACEIMAGES    1L << FRB_REPLACEIMAGES
  73. #define FR_CANCELTEXT        1L << FRB_CANCELTEXT
  74. #define FR_NEWFONT        1L << FRB_NEWFONT
  75. #define FR_SCREENFONT        1L << FRB_SCREENFONT
  76. #define FR_EXTENDEDSELECT    1L << FRB_EXTENDEDSELECT
  77. #define FR_INVERTLOOK        1L << FRB_INVERTLOOK
  78. #define FR_HIDEWILD        1L << FRB_HIDEWILD
  79. #define FR_NEWLOOK        1L << FRB_NEWLOOK        /* !! */
  80. #define FR_NONEWLOOK        1L << FRB_NONEWLOOK
  81. #define FR_SELECTLIST        1L << FRB_SELECTLIST
  82. #define    FR_SLSHOWNAMES        1L << FRB_SLSHOWNAMES        /* !! */
  83. #define FR_KEEPBUFFERS        1L << FRB_KEEPBUFFERS
  84. #define FR_EXTRABUTTONS        1L << FRB_EXTRABUTTONS
  85. #define FR_SELECTLISTTIME    1L << FRB_SELECTLISTTIME
  86. #define FR_DIRSONLY        1L << FRB_DIRSONLY
  87. #define FR_USEPENS        1L << FRB_USEPENS
  88. #define FR_DEFSIZES        1L << FRB_DEFSIZES
  89. #define FR_NOAUTOSORT        1L << FRB_NOAUTOSORT
  90. #define FR_DEVSLIST        1L << FRB_DEVSLIST
  91.  
  92. #define    FR_SPECIAL2        1L << FRB_SPECIAL2
  93. #define    FR_SPECIAL1        1L << FRB_SPECIAL1
  94. #define    FR_INUSE        1L << FRB_INUSE
  95.  
  96. /*  Flags marked with !! above can be changed by the FR */
  97.  
  98. #define FR_STDFLAGS (FR_AUTOPOSITION|FR_AUTOSIZE|FR_NOINFO|FR_SCREENFONT|FR_HIDEWILD)
  99.  
  100. struct FileList {    /* Structure for returned multiple select */
  101.  struct FileList *next;    /* Pointer to next FileList structure */ 
  102.  LONG   private;    /* private -- do not use */
  103.  LONG   FileSize;    /* File size  */
  104.  LONG   FileDate;    /* Date stamp (in days since 1978) */
  105.  USHORT FileTime;    /* Time stamp (in minutes since midnight) */
  106.  UBYTE  FileProtection;    /* Protection flags */
  107.  UBYTE  FileFlags;    /* Special file flags */
  108.  UBYTE  FileName[32];    /* The file name itself */
  109.  };
  110.  
  111.             /* return codes for ExtraButton callback function */
  112.  
  113. #define EB_CONTINUE    0    /* FR just continues */
  114. #define EB_OK        1    /* FR is OK'd and exits immediately */
  115. #define EB_CANCEL    2    /* FR is cancelled and exits immediately */
  116.  
  117. struct ExtraButton {
  118.  struct ExtraButton *next;    /* pointer to next button */
  119.  ULONG  flags;            /* flags to define button */
  120.  ULONG  (*button_function)(struct ExtraButton *);
  121.                 /* function to be called when button is hit */
  122.  UBYTE  *text;            /* actual text of button, up to 10 chars */
  123.  UBYTE  *help1, *help2, *help3; /* pointers to help lines */
  124.  VOID    *UserData;        /* for your use... */
  125.  struct Window *window;        /* current FR window.. read only. */
  126.  };
  127.  
  128. struct ExtraData {
  129.  struct Image *UpArrow;        /* replacement image for Up Arrow */
  130.  struct Image *DnArrow;        /* replacement image for Down Arrow */
  131.  struct Image *DiskNormal;    /* replacement image for Disks */
  132.  struct Image *DiskSelected;    /* replacement select image for Disks */
  133.  
  134.                 /* NO LONGER VALID... DO NOT USE */
  135.  struct Image *SizeStrip;    /* replacement image for Size gadgets */
  136.  
  137.  UBYTE    *oktext;        /* text to be used as OK text */
  138.  UBYTE    *canceltext;        /* text to be used as CANCEL text */
  139.  USHORT    LeftEdge,TopEdge,Width,Height;
  140.  
  141.  struct    TextAttr *NewFont;    /* New font to use instead of Topaz 8 */    
  142.  
  143.                 /* THIS IS NOW OBSOLETE.. USE NextSelect() */
  144.  struct    FileList *ExtendedList;    /* Always set to NULL at first call.  */
  145.                 /* If FR_EXTENDEDSELECT is set, this will */
  146.                 /* return a linked list of FileList structs. */
  147.                 /* WARNING!  DO NOT USE THIS ANYMORE... */
  148.                 /* I MIGHT REMOVE IT FOR RELEASE 4. */
  149.  
  150.  UBYTE    *Hide;            /* Hide wildcard pattern */
  151.  
  152.  UBYTE    *SelectList;        /* Pointer to the internal Select List */
  153.  UBYTE    *NextEntry;        /* Pointer to next entry, used by NextSelectEntry() */
  154.  ULONG  SelectListSize;        /* Size of SelectList.. in bytes */
  155.  
  156.  UBYTE    *buffer;        /* private storage for temp stuff */
  157.  struct ExtraButton *button;    /* pointer to additional button, if exists */
  158.  
  159.  UBYTE  pen0;            /* shadow pen */
  160.  UBYTE  pen1;            /* text pen  - file names */
  161.  UBYTE  pen2;            /* text2 pen - titles and info */
  162.  UBYTE  pen3;            /* text3 pen - directories */
  163.  
  164.  SHORT    width1, height1;    /* default FR sizes, these are only used.. */
  165.  SHORT    width2, height2;    /* if the FR_DEFSIZES flag is used. */
  166.  SHORT    width3, height3;
  167.  };
  168.  
  169.                 /* Use this structure for the NewFReq() call */
  170.                 /* This allows you to call the FR with just */
  171. struct FRequest {        /* one argument, a struct FRequest */
  172.  struct Screen *screen;        /* Pointer to a screen structure */
  173.  UBYTE *reqtitle;        /* Pointer to title text */
  174.  UBYTE *filename;        /* Pointer to the filename buffer */
  175.  UBYTE *directory;        /* Pointer to the directory buffer */
  176.  UBYTE *fullname;        /* Pointer to the full path to the file */
  177.  UBYTE *pattern;        /* Pointer to the pattern buffer */
  178.  ULONG flags;            /* FR flags */
  179.  struct ExtraData *extras;    /* pointer to an ExtraData struct */
  180.  };
  181.  
  182. /*                   Copyright 1990-1992  Khalid Aldoseri.                   */
  183.