New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / libs / iffparse / findcollection.c
blobd8e2cf246385d141a9599e8dee7f8b045d50889a
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "iffparse_intern.h"
8 /*****************************************************************************
10 NAME */
11 #include <proto/iffparse.h>
13 AROS_LH3(struct CollectionItem *, FindCollection,
15 /* SYNOPSIS */
16 AROS_LHA(struct IFFHandle *, iff, A0),
17 AROS_LHA(LONG , type, D0),
18 AROS_LHA(LONG , id, D1),
20 /* LOCATION */
21 struct Library *, IFFParseBase, 27, IFFParse)
23 /* FUNCTION
24 Returns a pointer to a list of CollectionItems the installed
25 CollectionChunk of that type and ID.
27 INPUTS
28 iff - pointer to an IFFHandle struct.
29 type - type code to search for.
30 id - id code to search for.
33 RESULT
34 ci - pointer to the last collection chunk encountered
35 with pointers to previous ones.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 CollectionChunk(), CollectionChunks()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
51 AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
53 struct LocalContextItem *lci;
55 DEBUG_FINDCOLLECTION(dprintf("FindCollection: iff 0x%lx type 0x%08lx (%c%c%c%c) id 0x%08lx (%c%c%c%c)\n",
56 iff, type, dmkid(type), id, dmkid(id)));
58 if (!(lci = FindLocalItem(
59 iff,
60 type,
61 id,
62 IFFLCI_COLLECTION)))
64 DEBUG_FINDCOLLECTION(dprintf("FindCollection: return NULL\n"));
65 return NULL;
68 /* The userdata of the found LCI contains a struct CIPtr,
69 which is just a pointer to the first CollectionItem */
71 return
73 ((struct CIPtr*)LocalItemData(lci) )->FirstCI
77 AROS_LIBFUNC_EXIT
78 } /* FindCollection */