Sources/MSAECreate.h

// MSAECreate.h
//
// Original version by Jon Lansdell and Nigel Humphreys.
// 4.0 and 3.1 updates by Greg Sutton.
// ©Apple Computer Inc 1996, all rights reserved.
 
#ifndef __MSAECREATE__
#define __MSAECREATE__
 
#include <AppleEvents.h>
#include <AEObjects.h>
#include <AERegistry.h>
 
#include "MSToken.h"
 
pascal OSErr    DoNewElement(const AppleEvent   *theAppleEvent,
                                    AppleEvent  *reply, 
                                    long        handlerRefCon);
 
OSErr           CreateDocument(AEDesc* dataDesc, AEDesc* insertHereDesc,
                                        AEDesc* propertyDesc, AEDesc* result);
 
OSErr           GetBehindWindow(AEDesc* insertDesc, DescType insertType, WindowPtr* behindWindow);
OSErr           SetDocumentPropertyRecord(WindowPtr theWindow, AEDesc* propertyRecord);
OSErr           SetDocumentData(WindowPtr theWindow, AEDesc* dataDesc);
 
OSErr           CreateText(DescType textType, AEDesc* dataDesc, AEDesc* insertHereDesc,
                                                    AEDesc* propertyDesc, AEDesc* result);
OSErr           GetInsertToken(AEDesc* insertDesc, DescType insertType, TextToken* resultToken);
OSErr           CreateAtTextToken(DescType textType, const AEDesc* dataDesc, TextToken* theToken,
                                                        AEDesc* propertyDesc, AEDesc* result);
OSErr           SetTextPropertyRecord(TextToken* aTextToken, AEDesc* propertyRecord);
 
#endif