Carbon


TXNGetDataEncoded

Header: MacTextEditor.h Carbon status: Supported

Copies the text in the a specified range, and if necessary, translates the text to match the application’s preferred encoding.

OSStatus TXNGetDataEncoded (
    TXNObject iTXNObject, 
    TXNOffset iStartOffset, 
    TXNOffset iEndOffset, 
    Handle *oDataHandle, 
    TXNDataType encoding
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object that has the data you want to copy.

iStartOffset

A variable of type TXNOffset. Pass the absolute offset from which data copying should begin. You can use the TXNGetSelection function to get the absolute offsets of the current selection.

iEndOffset

A variable of type TXNOffset. Pass the absolute offset at which data copying should end. You can use the TXNGetSelection function to get the absolute offsets of the current selection.

oDataHandle

A “Supported Data Types” value of type TXNDataType. You should specify kTXNTextData or kTXNUnicodeTextData. If the iEncoding parameter specifies an encoding different from that used to store the text data internally, the Text Encoding Conversion Manager translates the data to the specified type (text or Unicode). If the iEncoding parameter is not recognized, the data is returned in the current encoding.

encoding

A pointer to a handle. On return, the handle points to the requested data.

function result

A result code.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)