home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TextObjectUtilities.h
-
- Contains: Text object Utilities Interfaces.
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __TEXTOBJECTUTILITIES__
- #define __TEXTOBJECTUTILITIES__
-
- #ifndef __CONDITIONALMACROS__
- #include <ConditionalMacros.h>
- #endif
- #ifndef __UNICODE__
- #include <Unicode.h>
- #endif
- #ifndef __TEXTOBJECTS__
- #include <TextObjects.h>
- #endif
- #ifndef __AEDATAMODEL__
- #include <AEDataModel.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern OSStatus ConvertPStringToTextObject(ConstStr255Param srcString, TextEncoding srcEncoding, LocaleIdentifier localeID, TextObject oldTextObject, TextObject *newTextObject, OptionBits optionBits);
-
- extern OSStatus ConvertTextObjectToPString(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, StringPtr destString, ByteCount destMaxStringLength, TextEncoding destEncoding, TextObjectIndex *nextIndex);
-
- extern OSStatus ConvertCStringToTextObject(const char *srcString, TextEncoding srcEncoding, LocaleIdentifier localeID, TextObject oldTextObject, TextObject *newTextObject, OptionBits optionBits);
-
- extern OSStatus ConvertTextObjectToCString(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, char *destString, ByteCount destMaxStringLength, TextEncoding destEncoding, TextObjectIndex *nextIndex);
-
- extern OSStatus ConvertUnicodeStringToTextObject(const UniChar *srcString, ByteCount stringLength, TextEncoding srcEncoding, LocaleIdentifier srcLocaleID, TextObject oldTextObject, TextObject *newTextObject, OptionBits optionBits);
-
- extern OSStatus ConvertTextObjectToUnicodeString(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, UniChar *destString, ByteCount destMaxStringLength, TextEncoding destEncoding, TextObjectIndex *nextIndex, ByteCount *destLength);
-
- extern OSStatus ConcatTextObjects(ConstTextObject textObject1, ConstTextObject textObject2, TextObject *newTextObject, OptionBits optionBits);
-
- /* Text object resource types */
-
- enum {
- kTextObjResourceType = 'txto', /* single text object*/
- kTextObjListResourceType = 'txt#' /* list of text objects*/
- };
-
- #endif
- #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
- extern OSStatus GetTextObject(TextObject *newTextObject, short textObjResID);
-
- extern OSStatus GetTextObjectListCount(short textObjListResID, UInt16 *count);
-
- extern OSStatus GetIndTextObject(TextObject *newTextObject, short textObjListResID, UInt16 index);
-
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #if FOR_PTR_BASED_AE
- /* The caller must provide the text object to be filled in. */
- extern OSStatus ConvertAESubDescToTextObject(const AESubDesc *subDesc, TextObject textObject);
-
- extern OSStatus ConvertTextObjectToAEDesc(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, AEDesc *descriptor);
-
- extern OSStatus WriteTextObjectToAEStream(AEStream stream, ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex);
-
- #endif
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TEXTOBJECTUTILITIES__ */
-
-