home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-06 | 2.7 KB | 89 lines | [TEXT/KAHL] |
- /* ObText.h
- * ©1992 Working Software, Inc.
- * This source code is copyrighted. Permission is granted to use the Word Services
- * portion of the Writeswell Jr. source code in your own programs, but you
- * may not distribute the Writeswell Jr. word-processor code as a
- * commercial product. If you modify the code, please do not call it
- * Writeswell Jr. (or Writeswell.) This will ensure that people understand the
- * program and don’t have to deal with a number of different versions with
- * who-knows-what going on in the code.
- *
- * Writeswell Jr. and Writeswell are trademarks of Working Software, Inc.
- * 26 Dec 91 Mike Crawford
- */
-
- #undef HACK_OSPECS /* (doesn't work) Define this to make it looks like there's two blocks */
-
- enum {
- typePString = 'PStr' /* Descriptor type for a pascal string */
- };
-
- enum {
- typeTEText = 'TETx' /* Text in a TextEdit field */
- };
-
- typedef struct {
- TEHandle textH;
- short startPos; /* Short cuz TE only handles 32k o' text! */
- short length;
- DescType propertyCode;
- } TETextTokenBody;
-
- OSErr DispatchTEText( AEDesc *tokenPtr,
- AppleEvent *theAppleEventPtr,
- AppleEvent *replyEventPtr,
- long refCon );
-
- OSErr TETextGetDataHandler( AEDesc *tokenPtr,
- AppleEvent *theAppleEventPtr,
- AppleEvent *replyEventPtr,
- long refCon );
-
- OSErr TETextSetDataHandler( AEDesc *tokenPtr,
- AppleEvent *theAppleEventPtr,
- AppleEvent *replyEventPtr,
- long refCon );
-
- pascal OSErr TextFromWind(DescType desiredClass,
- const AEDesc *container,
- DescType containerClass,
- DescType form,
- const AEDesc *selectionData,
- AEDesc *theToken,
- long LongInt);
-
- pascal OSErr WordFromTEText(DescType desiredClass,
- const AEDesc *container,
- DescType containerClass,
- DescType form,
- const AEDesc *selectionData,
- AEDesc *theToken,
- long LongInt);
-
- pascal OSErr CharFromTEText(DescType desiredClass,
- const AEDesc *container,
- DescType containerClass,
- DescType form,
- const AEDesc *selectionData,
- AEDesc *theToken,
- long LongInt);
-
- pascal OSErr PropFromTEText(DescType desiredClass,
- const AEDesc *container,
- DescType containerClass,
- DescType form,
- const AEDesc *selectionData,
- AEDesc *theToken,
- long LongInt);
-
- pascal OSErr TextPtrToPString( DescType typeCode,
- Ptr dataPtr,
- Size dataSize,
- DescType toType,
- long handlerRefCon,
- AEDesc *resultPtr );
- void MakeTETextTokenBody( WindowPtr wp, TETextTokenBody* tokDataPtr, DescType propCode );
- OSErr CreateTextSpecifier( long windowNumber, long textNumber, AEDesc *specPtr );
- OSErr CreateWindTextSpec( WindowPtr wp, long textNumber, AEDesc *specPtr );
- OSErr CountTextInWind( WindowPtr wp, long *countPtr );
-