/*********************************************************/
/* This source code copyright (c) 1991-2001, Aaron Giles */
/* See the Read Me file for licensing information.       */
/* Contact email: mac@aarongiles.com                     */
/*********************************************************/

#ifndef __CDOCUMENT__
#define __CDOCUMENT__

pascal OSErr DocumentAccessor(DescType classWanted, AEDesc *container, 
	DescType containerClass, DescType keyForm, AEDesc *keyData, 
	AEDesc *resultToken, long theRefCon);
pascal OSErr DocPropertyAccessor(DescType classWanted, AEDesc *container, 
	DescType containerClass, DescType keyForm, AEDesc *keyData, 
	AEDesc *resultToken, long theRefCon);
OSErr GetDocumentData(WindowPtr theWindow, DescType typeWanted, AEDesc *theData);
OSErr GetDocPropertyData(WindowPtr theWindow, DescType theProperty, DescType typeWanted, 
	AEDesc *theData);
OSErr SetDocPropertyData(WindowPtr theWindow, DescType theProperty, AEDesc *theData);
OSErr MakeDocumentObject(WindowPtr theWindow, AEDesc *theObject);
OSErr MakeDocPropertyObject(WindowPtr theWindow, DescType theProperty, AEDesc *theObject);
Boolean IsValidForOne(DescType keyForm, AEDesc *keyData);
void PurgeNonDocuments(ObjectTokenHandle theList);
OSErr GetNamedDocument(AEDesc *keyData, ObjectTokenHandle *theList);
short CountDocuments(void);
WindowPtr IndexedDocument(short index);
short GetDocumentIndex(WindowPtr theWindow);

#endif
