123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- {
- File: SearchKit/SKSummary.h
-
- Contains: SearchKit Interfaces.
-
- Version: SearchKit-407~38
-
- Copyright: © 2004-2008 by Apple Computer, Inc., all rights reserved
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- }
- {
- Modified for use with Free Pascal
- Version 308
- Please report any bugs to <[email protected]>
- }
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- {$mode macpas}
- {$modeswitch cblocks}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$calling mwpascal}
- unit SKSummary;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
- {$setc GAP_INTERFACES_VERSION := $0308}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC32}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
- {$setc __ppc64__ := 1}
- {$elsec}
- {$setc __ppc64__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc not defined __x86_64__ and defined CPUX86_64}
- {$setc __x86_64__ := 1}
- {$elsec}
- {$setc __x86_64__ := 0}
- {$endc}
- {$ifc not defined __arm__ and defined CPUARM}
- {$setc __arm__ := 1}
- {$elsec}
- {$setc __arm__ := 0}
- {$endc}
- {$ifc not defined __arm64__ and defined CPUAARCH64}
- {$setc __arm64__ := 1}
- {$elsec}
- {$setc __arm64__ := 0}
- {$endc}
- {$ifc defined cpu64}
- {$setc __LP64__ := 1}
- {$elsec}
- {$setc __LP64__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __ppc64__ and __ppc64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __x86_64__ and __x86_64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := TRUE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __arm__ and __arm__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := TRUE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elifc defined __arm64__ and __arm64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := TRUE}
- {$ifc defined ios}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$endc}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$elsec}
- {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
- {$endc}
- {$ifc defined __LP64__ and __LP64__ }
- {$setc TARGET_CPU_64 := TRUE}
- {$elsec}
- {$setc TARGET_CPU_64 := FALSE}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes,CFBase,CFString;
- {$endc} {not MACOSALLINCLUDE}
- {$ALIGN POWER}
- {$ifc TARGET_OS_MAC}
- {
- * Summarization API
- }
- {
- * SKSummaryRef
- *
- * Summary:
- * An opaque data type representing summary information.
- *
- * Discussion:
- * A summary reference contains summary information, from which
- * summary text can be obtained.
- }
- type
- SKSummaryRef = ^__SKSummary; { an opaque type }
- __SKSummary = record end;
- SKSummaryRefPtr = ^SKSummaryRef;
- {
- * SKSummaryGetTypeID()
- *
- * Summary:
- * Returns the type identifier of the SKSummaryRef type.
- *
- * Result:
- * Returns a CFTypeID object, or <tt>NULL</tt> on failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryGetTypeID: CFTypeID; external name '_SKSummaryGetTypeID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryCreateWithString()
- *
- * Summary:
- * Creates a summary reference with text string.
- *
- * Discussion:
- * Creates a summary reference that pre-computes what is needed for
- * fast summarization. This function must be balanced with a call at
- * a later time to CFRelease.
- *
- * Parameters:
- *
- * inString:
- * the text string.
- *
- * Result:
- * Returns a summary reference, or <tt>NULL</tt> on failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryCreateWithString( inString: CFStringRef ): SKSummaryRef; external name '_SKSummaryCreateWithString';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryGetSentenceCount()
- *
- * Summary:
- * Gets the number of sentences available.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryGetSentenceCount( summary: SKSummaryRef ): CFIndex; external name '_SKSummaryGetSentenceCount';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryGetParagraphCount()
- *
- * Summary:
- * Gets the number of paragraphs available.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryGetParagraphCount( summary: SKSummaryRef ): CFIndex; external name '_SKSummaryGetParagraphCount';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryCopySentenceAtIndex()
- *
- * Summary:
- * Gets the ith sentence from the original text.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * i:
- * zero-based index
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryCopySentenceAtIndex( summary: SKSummaryRef; i: CFIndex ): CFStringRef; external name '_SKSummaryCopySentenceAtIndex';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryCopyParagraphAtIndex()
- *
- * Summary:
- * Gets the ith paragraph from the original text.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * i:
- * zero-based index
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryCopyParagraphAtIndex( summary: SKSummaryRef; i: CFIndex ): CFStringRef; external name '_SKSummaryCopyParagraphAtIndex';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryCopySentenceSummaryString()
- *
- * Summary:
- * Gets a summary string that includes at most the requested number
- * of sentences.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * numSentences:
- * the number of sentences desired
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryCopySentenceSummaryString( summary: SKSummaryRef; numSentences: CFIndex ): CFStringRef; external name '_SKSummaryCopySentenceSummaryString';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryCopyParagraphSummaryString()
- *
- * Summary:
- * Gets a summary string that includes at most the requested number
- * of paragraphs.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * numParagraphs:
- * the number of paragraphs desired
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryCopyParagraphSummaryString( summary: SKSummaryRef; numParagraphs: CFIndex ): CFStringRef; external name '_SKSummaryCopyParagraphSummaryString';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryGetSentenceSummaryInfo()
- *
- * Summary:
- * Get detailed information about a sentence-based summary. Useful
- * for constructing your own summary string. Arrays must be of size
- * numSentences or they can be nil. Return value is the number of
- * sentences actually returned. Sentences are returned in text order
- * via outSentenceIndexOfSentences.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * numSentencesInSummary:
- * the number of sentences desired
- *
- * outRankOrderOfSentences:
- * array for returning the rank of each sentence; most important
- * sentence is rank 1
- *
- * outSentenceIndexOfSentences:
- * array for returning the index of each sentence; use
- * SKSummaryCopySentenceAtIndex to get sentence
- *
- * outParagraphIndexOfSentences:
- * array for returning the index of the paragraph in which
- * sentence occured
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryGetSentenceSummaryInfo( summary: SKSummaryRef; numSentencesInSummary: CFIndex; outRankOrderOfSentences: CFIndexPtr { array }; outSentenceIndexOfSentences: CFIndexPtr { array }; outParagraphIndexOfSentences: CFIndexPtr { array } ): CFIndex; external name '_SKSummaryGetSentenceSummaryInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * SKSummaryGetParagraphSummaryInfo()
- *
- * Summary:
- * Get detailed information about a paragraph-based summary. Useful
- * for constructing your own summary string. Arrays must be of size
- * numParagraphs or they can be nil. Return value is the number of
- * paragraphs actually returned. Paragraphs are returned in text
- * order via outParagraphIndexOfParagraphs.
- *
- * Parameters:
- *
- * summary:
- * A reference to the summary object
- *
- * numParagraphsInSummary:
- * the number of sentences desired
- *
- * outRankOrderOfParagraphs:
- * array for returning the rank of each paragraph; most important
- * paragraph is rank 1
- *
- * outParagraphIndexOfParagraphs:
- * array for returning the index of each paragraph; use
- * SKSummaryCopyParagraphAtIndex to get paragraph
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SKSummaryGetParagraphSummaryInfo( summary: SKSummaryRef; numParagraphsInSummary: CFIndex; outRankOrderOfParagraphs: CFIndexPtr { array }; outParagraphIndexOfParagraphs: CFIndexPtr {array} ): CFIndex; external name '_SKSummaryGetParagraphSummaryInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {$endc} {TARGET_OS_MAC}
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- end.
- {$endc} {not MACOSALLINCLUDE}
|