1 #ifndef CLIB_IFFPARSE_PROTOS_H 2 #define CLIB_IFFPARSE_PROTOS_H 3 4 /* 5 iffparse.library C prototypes 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_TYPES_H 11 # include <exec/types.h> 12 #endif 13 14 #ifndef LIBRARIES_IFFPARSE_H 15 # include <libraries/iffparse.h> 16 #endif 17 18 #ifndef UTILITY_HOOKS_H 19 # include <utility/hooks.h> 20 #endif 21 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif /* __cplusplus */ 26 27 struct IFFHandle *AllocIFF( VOID ); 28 LONG OpenIFF( struct IFFHandle *iff, LONG rwMode ); 29 LONG ParseIFF( struct IFFHandle *iff, LONG control ); 30 VOID CloseIFF( struct IFFHandle *iff ); 31 VOID FreeIFF( struct IFFHandle *iff ); 32 33 LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, LONG numBytes ); 34 LONG WriteChunkBytes( struct IFFHandle *iff, CONST APTR buf, LONG numBytes ); 35 LONG SeekChunkBytes( struct IFFHandle *iff, LONG numBytes, LONG mode); 36 LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, LONG bytesPerRecord, LONG numRecords ); 37 LONG WriteChunkRecords( struct IFFHandle *iff, CONST APTR buf, LONG bytesPerRecord, LONG numRecords ); 38 LONG SeekChunkRecords( struct IFFHandle *iff, LONG bytesPerRecord, LONG numRecords, LONG mode); 39 40 LONG PushChunk( struct IFFHandle *iff, LONG type, LONG id, LONG size ); 41 LONG PopChunk( struct IFFHandle *iff ); 42 43 LONG EntryHandler( struct IFFHandle *iff, LONG type, LONG id, LONG position, struct Hook *handler, APTR object ); 44 LONG ExitHandler( struct IFFHandle *iff, LONG type, LONG id, LONG position, struct Hook *handler, APTR object ); 45 46 LONG PropChunk( struct IFFHandle *iff, LONG type, LONG id ); 47 LONG PropChunks( struct IFFHandle *iff, CONST LONG *propArray, LONG numPairs ); 48 LONG StopChunk( struct IFFHandle *iff, LONG type, LONG id ); 49 LONG StopChunks( struct IFFHandle *iff, CONST LONG *propArray, LONG numPairs ); 50 LONG CollectionChunk( struct IFFHandle *iff, LONG type, LONG id ); 51 LONG CollectionChunks( struct IFFHandle *iff, CONST LONG *propArray, LONG numPairs ); 52 LONG StopOnExit( struct IFFHandle *iff, LONG type, LONG id ); 53 54 struct StoredProperty *FindProp( CONST struct IFFHandle *iff, LONG type, LONG id ); 55 struct CollectionItem *FindCollection( CONST struct IFFHandle *iff, LONG type, LONG id ); 56 struct ContextNode *FindPropContext( CONST struct IFFHandle *iff ); 57 struct ContextNode *CurrentChunk( CONST struct IFFHandle *iff ); 58 struct ContextNode *ParentChunk( CONST struct ContextNode *contextNode ); 59 60 struct LocalContextItem *AllocLocalItem( LONG type, LONG id, LONG ident, LONG dataSize ); 61 APTR LocalItemData( CONST struct LocalContextItem *localItem ); 62 VOID SetLocalItemPurge( struct LocalContextItem *localItem, CONST struct Hook *purgeHook ); 63 VOID FreeLocalItem( struct LocalContextItem *localItem ); 64 struct LocalContextItem *FindLocalItem( CONST struct IFFHandle *iff, LONG type, LONG id, LONG ident ); 65 LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem, LONG position ); 66 VOID StoreItemInContext( struct IFFHandle *iff, struct LocalContextItem *localItem, struct ContextNode *contextNode ); 67 68 VOID InitIFF( struct IFFHandle *iff, LONG flags, CONST struct Hook *streamHook ); 69 VOID InitIFFasDOS( struct IFFHandle *iff ); 70 VOID InitIFFasClip( struct IFFHandle *iff ); 71 72 struct ClipboardHandle *OpenClipboard( LONG unitNumber ); 73 VOID CloseClipboard( struct ClipboardHandle *clipHandle ); 74 75 LONG GoodID( LONG id ); 76 LONG GoodType( LONG type ); 77 STRPTR IDtoStr( LONG id, STRPTR buf ); 78 79 #ifdef __cplusplus 80 } 81 #endif /* __cplusplus */ 82 83 84 #endif /* CLIB_IFFPARSE_PROTOS_H */