home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / OTL-MC6.DMS / in.adf / incl.lha / INCLUDE / clib / iffparse_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-29  |  3.5 KB  |  116 lines

  1. #ifndef  CLIB_IFFPARSE_PROTOS_H
  2. #define  CLIB_IFFPARSE_PROTOS_H
  3.  
  4. /*
  5. **    $VER: iffparse_protos.h 39.1 (1.6.92)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef  LIBRARIES_IFFPARSE_H
  18. #include <libraries/iffparse.h>
  19. #endif
  20.  
  21. #ifdef __cplusplus
  22. #define CLIBCPLUSON
  23. #pragma -
  24. #endif
  25.  
  26. /*--- functions in V36 or higher (Release 2.0) ---*/
  27.  
  28. /* Basic functions */
  29.  
  30. struct IFFHandle *AllocIFF( void );
  31. LONG OpenIFF( struct IFFHandle *iff, long rwMode );
  32. LONG ParseIFF( struct IFFHandle *iff, long control );
  33. void CloseIFF( struct IFFHandle *iff );
  34. void FreeIFF( struct IFFHandle *iff );
  35.  
  36. /* Read/Write functions */
  37.  
  38. LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
  39. LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
  40. LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  41.     long numRecords );
  42. LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  43.     long numRecords );
  44.  
  45. /* Context entry/exit */
  46.  
  47. LONG PushChunk( struct IFFHandle *iff, long type, long id, long size );
  48. LONG PopChunk( struct IFFHandle *iff );
  49.  
  50. /* Low-level handler installation */
  51.  
  52. LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position,
  53.     struct Hook *handler, APTR object );
  54. LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position,
  55.     struct Hook *handler, APTR object );
  56.  
  57. /* Built-in chunk/property handlers */
  58.  
  59. LONG PropChunk( struct IFFHandle *iff, long type, long id );
  60. LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
  61. LONG StopChunk( struct IFFHandle *iff, long type, long id );
  62. LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
  63. LONG CollectionChunk( struct IFFHandle *iff, long type, long id );
  64. LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray,
  65.     long numPairs );
  66. LONG StopOnExit( struct IFFHandle *iff, long type, long id );
  67.  
  68. /* Context utilities */
  69.  
  70. struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id );
  71. struct CollectionItem *FindCollection( struct IFFHandle *iff, long type,
  72.     long id );
  73. struct ContextNode *FindPropContext( struct IFFHandle *iff );
  74. struct ContextNode *CurrentChunk( struct IFFHandle *iff );
  75. struct ContextNode *ParentChunk( struct ContextNode *contextNode );
  76.  
  77. /* LocalContextItem support functions */
  78.  
  79. struct LocalContextItem *AllocLocalItem( long type, long id, long ident,
  80.     long dataSize );
  81. APTR LocalItemData( struct LocalContextItem *localItem );
  82. void SetLocalItemPurge( struct LocalContextItem *localItem,
  83.     struct Hook *purgeHook );
  84. void FreeLocalItem( struct LocalContextItem *localItem );
  85. struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type,
  86.     long id, long ident );
  87. LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem,
  88.     long position );
  89. void StoreItemInContext( struct IFFHandle *iff,
  90.     struct LocalContextItem *localItem,
  91.     struct ContextNode *contextNode );
  92.  
  93. /* IFFHandle initialization */
  94.  
  95. void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook );
  96. void InitIFFasDOS( struct IFFHandle *iff );
  97. void InitIFFasClip( struct IFFHandle *iff );
  98.  
  99. /* Internal clipboard support */
  100.  
  101. struct ClipboardHandle *OpenClipboard( long unitNumber );
  102. void CloseClipboard( struct ClipboardHandle *clipHandle );
  103.  
  104. /* Miscellaneous */
  105.  
  106. LONG GoodID( long id );
  107. LONG GoodType( long type );
  108. STRPTR IDtoStr( long id, STRPTR buf );
  109.  
  110. #ifdef CLIBCPLUSON
  111. #undef CLIBCPLUSON
  112. #pragma +
  113. #endif
  114.  
  115. #endif     /* CLIB_IFFPARSE_PROTOS_H */
  116.