Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

259 lines
6.4 KiB

  1. /*
  2. File: AppleHelp.h
  3. Contains: Apple Help
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 2000-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __APPLEHELP__
  11. #define __APPLEHELP__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #ifndef __FILES__
  16. #include <Files.h>
  17. #endif
  18. #ifndef __CFSTRING__
  19. #include <CFString.h>
  20. #endif
  21. #if PRAGMA_ONCE
  22. #pragma once
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. #if PRAGMA_IMPORT
  28. #pragma import on
  29. #endif
  30. #if PRAGMA_STRUCT_ALIGN
  31. #pragma options align=mac68k
  32. #elif PRAGMA_STRUCT_PACKPUSH
  33. #pragma pack(push, 2)
  34. #elif PRAGMA_STRUCT_PACK
  35. #pragma pack(2)
  36. #endif
  37. /* AppleHelp Error Codes */
  38. enum {
  39. kAHInternalErr = -10790,
  40. kAHInternetConfigPrefErr = -10791
  41. };
  42. typedef SInt16 AHTOCType;
  43. enum {
  44. kAHTOCTypeUser = 0,
  45. kAHTOCTypeDeveloper = 1
  46. };
  47. /*
  48. * AHSearch()
  49. *
  50. * Discussion:
  51. * Delivers a request to perform the specified search to the Help
  52. * Viewer application.
  53. *
  54. * Parameters:
  55. *
  56. * bookname:
  57. * Optionally, the AppleTitle of the Help book to be searched. If
  58. * NULL, all installed Help books are searched.
  59. *
  60. * query:
  61. * The query to be made. This string can, if desired, have boolean
  62. * operators or be a natural language phrase.
  63. *
  64. * Result:
  65. * An operating system result code that indicates whether the
  66. * request was successfully sent to the Help Viewer application.
  67. * Possible values: noErr, paramErr, kAHInternalErr,
  68. * kAHInternetConfigPrefErr.
  69. *
  70. * Availability:
  71. * Non-Carbon CFM: not available
  72. * CarbonLib: in CarbonLib 1.1 and later
  73. * Mac OS X: in version 10.0 and later
  74. */
  75. EXTERN_API_C( OSStatus )
  76. AHSearch(
  77. CFStringRef bookname,
  78. CFStringRef query);
  79. /*
  80. * AHGotoMainTOC()
  81. *
  82. * Discussion:
  83. * Delivers a request to load the main table of contents of
  84. * installed help books to the Help Viewer application.
  85. *
  86. * Parameters:
  87. *
  88. * toctype:
  89. * The type of table of contents to be loaded: user or developer.
  90. *
  91. * Result:
  92. * An operating system result code that indicates whether the
  93. * request was successfully sent to the Help Viewer application.
  94. * Possible values: noErr, paramErr, kAHInternalErr,
  95. * kAHInternetConfigPrefErr.
  96. *
  97. * Availability:
  98. * Non-Carbon CFM: not available
  99. * CarbonLib: in CarbonLib 1.1 and later
  100. * Mac OS X: in version 10.0 and later
  101. */
  102. EXTERN_API_C( OSStatus )
  103. AHGotoMainTOC(AHTOCType toctype);
  104. /*
  105. * AHGotoPage()
  106. *
  107. * Discussion:
  108. * Delivers a request to load a specific text/html file to the Help
  109. * Viewer application.
  110. *
  111. * Parameters:
  112. *
  113. * bookname:
  114. * Optionally, the AppleTitle of an installed Help book. If NULL,
  115. * the path parameter must be a full file: URL to the file to be
  116. * opened.
  117. *
  118. * path:
  119. * Optionally, one of two types of paths: 1) a URL-style path to a
  120. * file that is relative to the main folder of the book supplied
  121. * in the bookname parameter, or 2) if bookname is NULL, a full
  122. * file: URL to the file to be opened. If this parameter is NULL,
  123. * then bookname must not be NULL, and is used to open the Help
  124. * Viewer to the main page of Help content for the specified book.
  125. *
  126. * anchor:
  127. * Optionally, the name of anchor tag to scroll to in the newly
  128. * opened file. Can be NULL.
  129. *
  130. * Result:
  131. * An operating system result code that indicates whether the
  132. * request was successfully sent to the Help Viewer application.
  133. * Possible values: noErr, paramErr, kAHInternalErr,
  134. * kAHInternetConfigPrefErr.
  135. *
  136. * Availability:
  137. * Non-Carbon CFM: not available
  138. * CarbonLib: in CarbonLib 1.1 and later
  139. * Mac OS X: in version 10.0 and later
  140. */
  141. EXTERN_API_C( OSStatus )
  142. AHGotoPage(
  143. CFStringRef bookname,
  144. CFStringRef path,
  145. CFStringRef anchor);
  146. /*
  147. * AHLookupAnchor()
  148. *
  149. * Discussion:
  150. * Delivers a request to perform an anchor lookup to the Help Viewer
  151. * application. Note: anchor lookups will fail unless you have
  152. * indexed your help content with anchor indexing turned on in the
  153. * indexing tool's preferences panel.
  154. *
  155. * Parameters:
  156. *
  157. * bookname:
  158. * Optionally, the AppleTitle of the Help book to searched. If
  159. * NULL, the anchor lookup is performed using all installed Help
  160. * books.
  161. *
  162. * anchor:
  163. * The name of the anchor tag to look up.
  164. *
  165. * Result:
  166. * An operating system result code that indicates whether the
  167. * request was successfully sent to the Help Viewer application.
  168. * Possible values: noErr, paramErr, kAHInternalErr,
  169. * kAHInternetConfigPrefErr.
  170. *
  171. * Availability:
  172. * Non-Carbon CFM: not available
  173. * CarbonLib: in CarbonLib 1.1 and later
  174. * Mac OS X: in version 10.0 and later
  175. */
  176. EXTERN_API_C( OSStatus )
  177. AHLookupAnchor(
  178. CFStringRef bookname,
  179. CFStringRef anchor);
  180. /*
  181. * AHRegisterHelpBook()
  182. *
  183. * Discussion:
  184. * Registers a book of Help content such that the book will appear
  185. * in the current user's main table of contents (Help Center) in the
  186. * Help Viewer application. To be used when help books reside
  187. * outside of the known help folders (i.e. help books that are kept
  188. * inside of application bundles).
  189. *
  190. * Parameters:
  191. *
  192. * appBundleRef:
  193. * An FSRef pointer to the bundle within which one or more Help
  194. * books is stored. This is likely an FSRef to your application's
  195. * main bundle.
  196. *
  197. * Result:
  198. * An operating system result code that indicates whether all help
  199. * books contained within the specified bundle were registered.
  200. * Possible values: noErr, paramErr, kAHInternalErr, dirNFErr.
  201. *
  202. * Availability:
  203. * Non-Carbon CFM: not available
  204. * CarbonLib: in CarbonLib 1.1 and later
  205. * Mac OS X: in version 10.0 and later
  206. */
  207. EXTERN_API_C( OSStatus )
  208. AHRegisterHelpBook(const FSRef * appBundleRef);
  209. #if PRAGMA_STRUCT_ALIGN
  210. #pragma options align=reset
  211. #elif PRAGMA_STRUCT_PACKPUSH
  212. #pragma pack(pop)
  213. #elif PRAGMA_STRUCT_PACK
  214. #pragma pack()
  215. #endif
  216. #ifdef PRAGMA_IMPORT_OFF
  217. #pragma import off
  218. #elif PRAGMA_IMPORT
  219. #pragma import reset
  220. #endif
  221. #ifdef __cplusplus
  222. }
  223. #endif
  224. #endif /* __APPLEHELP__ */