home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 1.2 / amidev_cd_12.iso / reference_library / devices / dev_examples / cb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-20  |  1.8 KB  |  53 lines

  1. /***********************************************************************
  2.  *
  3.  * cb.h - Include file used by clipdemo.c, changehook_test.c and cbio.c
  4.  *
  5.  ***********************************************************************/
  6.  
  7. struct cbbuf {
  8.  
  9.         ULONG size;     /* size of memory allocation            */
  10.         ULONG count;    /* number of characters after stripping */
  11.         UBYTE *mem;     /* pointer to memory containing data    */
  12. };
  13.  
  14. #define MAKE_ID(a,b,c,d) ((a<<24L) | (b<<16L) | (c<<8L) | d)
  15.  
  16. #define ID_FORM MAKE_ID('F','O','R','M')
  17. #define ID_FTXT MAKE_ID('F','T','X','T')
  18. #define ID_CHRS MAKE_ID('C','H','R','S')
  19.  
  20. #ifdef CBIO
  21.  
  22. /* prototypes */
  23.  
  24. struct IOClipReq        *CBOpen         ( ULONG );
  25. void                    CBClose         (struct IOClipReq *);
  26. int                     CBWriteFTXT     (struct IOClipReq *, char *);
  27. int                     CBQueryFTXT     (struct IOClipReq *);
  28. struct cbbuf            *CBReadCHRS     (struct IOClipReq *);
  29. void                    CBReadDone      (struct IOClipReq *);
  30. void                    CBFreeBuf       (struct cbbuf *);
  31.  
  32.  
  33. /* routines which are meant to be used internally by routines in cbio */
  34.  
  35. int                     WriteLong       (struct IOClipReq *, long *);
  36. int                     ReadLong        (struct IOClipReq *, ULONG *);
  37. struct cbbuf            *FillCBData     (struct IOClipReq *, ULONG);
  38.  
  39. #else
  40.  
  41. /* prototypes */
  42.  
  43. extern struct IOClipReq *CBOpen         ( ULONG );
  44. extern void             CBClose         (struct IOClipReq *);
  45. extern int              CBWriteFTXT     (struct IOClipReq *, char *);
  46. extern int              CBQueryFTXT     (struct IOClipReq *);
  47. extern struct cbbuf     *CBReadCHRS     (struct IOClipReq *);
  48. extern void             CBReadDone      (struct IOClipReq *);
  49. extern void             CBFreeBuf       (struct cbbuf *);
  50.  
  51. #endif
  52.  
  53.