![]() |
SetFallbackUnicodeToTextRun |
||||
Header: | UnicodeConverter.h | Carbon status: | Supported | |
You use this function to specify a fallback handler to be used for converting a Unicode text segment to another encoding when the Unicode Converter cannot convert the text using the mapping table specified by the Unicode converter object passed to the function ConvertFromUnicodeToTextRun
,
OSStatus SetFallbackUnicodeToTextRun ( UnicodeToTextRunInfo iUnicodeToTextRunInfo, UnicodeToTextFallbackUPP iFallback, OptionBits iControlFlags, LogicalAddress iInfoPtr );
The Unicode converter object to which the fallback handler is to be associated. You use the function CreateUnicodeToTextRunInfo, CreateUnicodeToTextRunInfoByEncoding, or CreateUnicodeToTextRunInfoByScriptCode to obtain a Unicode converter object to specify for this parameter.
A universal procedure pointer to the application-defined fallback routine. For a description of the function prototype to which your fallback handler must adhere and how to create your own fallback handler, see UnicodeToTextFallbackProcPtr. You should use the NewUnicodeToTextFallbackProc macro described in the discussion of the function SetFallbackUnicodeToText.
Control flags that stipulate which fallback handler the Unicode Converter should callthe application-defined fallback handler or the default handlerif a fallback handler is required, and the sequence in which the Unicode Converter should call the fallback handlers if either can be used when the other fails or is unavailable. See
A pointer to a block of memory to be passed to the application-defined fallback handler. The Unicode Converter passes this pointer to the application-defined fallback handler as the last parameter when it calls the fallback handler. Your application can use this block to store data required by your fallback handler whenever it is called. This is similar in use to a reference constant (refcon). If you dont need to use a memory block, specify NULL for this parameter.
A result code.
You can define multiple fallback handlers and associate them with different Unicode converter objects, depending on your requirements. See UnicodeToTextFallbackProcPtr for a description of how to create and install an application-defined fallback handler.
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)