home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / Internet Config 1.2 / Internet Config / APIs / ICAPI.p < prev    next >
Encoding:
Text File  |  1995-09-25  |  25.3 KB  |  153 lines  |  [TEXT/CWIE]

  1. * If the routine returns an error, count is set to 0.}
  2. {     *)
  3.  
  4.     function ICGetIndPref (inst: ICInstance; n: longint; var key: Str255): ICError;
  5.     (* You must specify a configuration before calling this routine.}
  6. {     * You must be inside an ICBegin/End pair to call this routine.}
  7. {     * Returns the key of the Nth preference.}
  8. {     * n must be positive.}
  9. {     * Returns icPrefNotFoundErr if n is greater than the total number of preferences.}
  10. {     * If the routine returns an error, key is undefined.}
  11. {     *)
  12.  
  13.     function ICDeletePref (inst: ICInstance; key: Str255): ICError;
  14.     (* You must specify a configuration before calling this routine.}
  15. {     * You must be inside an ICBegin/End pair to call this routine.}
  16. {     * Deletes the preference specified by key.}
  17. {     * key must not be the empty string.}
  18. {     * Returns icPrefNotFound if the preference specified by key is not present.}
  19. {     *)
  20.  
  21.     function ICEnd (inst: ICInstance): ICError;
  22.     (* You must specify a configuration before calling this routine.}
  23. {     * You must be inside an ICBegin/End pair to call this routine.}
  24. {     * Terminates a preference session, as started by ICBegin.}
  25. {     * You must have called ICBegin before calling this routine.}
  26. {     *)
  27.  
  28.   (* ***** User Interface Stuff ***** *)
  29.  
  30.     function ICEditPreferences (inst: ICInstance; key: Str255): ICError;
  31.     (* Requires IC 1.1.}
  32. {     * You must specify a configuration before calling this routine.}
  33. {     * You do not have to be inside an ICBegin/End pair to call this routine.}
  34. {     * Instructs IC to display the user interface associated with editing}
  35. {     * preferences and focusing on the preference specified by key.}
  36. {     * If key is the empty string then no preference should be focused upon.}
  37. {     * You must have specified a configuration before calling this routine.}
  38. {     * You do not need to call ICBegin before calling this routine.}
  39. {     * In the current implementation this launches the IC application}
  40. {     * (or brings it to the front) and displays the window containing}
  41. {     * the preference specified by key.}
  42. {     * It may have a radically different implementation in future}
  43. {     * IC systems.}
  44. {     *)
  45.  
  46.   (* ***** URL Handling ***** *)
  47.  
  48.     function ICParseURL (inst: ICInstance; hint: Str255; data: Ptr; len: longint; var selStart: longint; var selEnd: longint; url: Handle): ICError;
  49.     (* Requires IC 1.1.}
  50. {     * You must specify a configuration before calling this routine.}
  51. {     * You do not have to be inside an ICBegin/End pair to call this routine.}
  52. {     * Parses a URL out of the specified text and returns it in a canonical form}
  53. {     * in a handle.}
  54. {     * hint indicates the default scheme for URLs of the form "name@address".}
  55. {     * If hint is the empty string then URLs of that form are not allowed.}
  56. {     * data points to the start of the text. It must not be nil.}
  57. {     * len indicates the length of the text. It must be non-negative.}
  58. {     * selStart and selEnd should be passed in as the current selection of}
  59. {     * the text. This selection is given in the same manner as TextEdit,}
  60. {     * ie if selStart = selEnd then there is no selection only an insertion}
  61. {     * point. Also selStart ≤ selEnd and 0 ≤ selStart ≤ len and 0 ≤ selEnd ≤ len.}
  62. {     * selStart and selEnd are returned as the bounds of the URL. If the}
  63. {     * routine returns an error then these new boundaries may be}
  64. {     * invalid but they will be close.}
  65. {     * The incoming url handle must not be nil.  The resulting URL is normalised}
  66. {     * and copied into the url handle, which is resized to fit.}
  67. {     *)
  68.  
  69.     function ICLaunchURL (inst: ICInstance; hint: Str255; data: Ptr; len: longint; var selStart: longint; var selEnd: longint): ICError;
  70.     (* Requires IC 1.1.}
  71. {     * You must specify a configuration before calling this routine.}
  72. {     * You do not have to be inside an ICBegin/End pair to call this routine.}
  73. {     * Parses a URL out of the specified text and feeds it off to the}
  74. {     * appropriate helper.}
  75. {     * hint indicates the default scheme for URLs of the form "name@address".}
  76. {     * If hint is the empty string then URLs of that form are not allowed.}
  77. {     * data points to the start of the text. It must not be nil.}
  78. {     * len indicates the length of the text. It must be non-negative.}
  79. {     * selStart and selEnd should be passed in as the current selection of}
  80. {     * the text. This selection is given in the same manner as TextEdit,}
  81. {     * ie if selStart = selEnd then there is no selection only an insertion}
  82. {     * point. Also selStart ≤ selEnd and 0 ≤ selStart ≤ len and 0 ≤ selEnd ≤ len.}
  83. {     * selStart and selEnd are returned as the bounds of the URL. If the}
  84. {     * routine returns an error then these new boundaries may be}
  85. {     * invalid but they will be close.}
  86. {     * The URL is parsed out of the text and passed off to the appropriate}
  87. {     * helper using the GURL AppleEvent.}
  88. {     *)
  89.  
  90.   (* ***** Mappings Routines *****}
  91. {   * }
  92. {   * Routines for interrogating mappings database.}
  93. {   * }
  94. {   * ----- High Level Routines -----}
  95. {   *)
  96.  
  97.     function ICMapFilename (inst: ICInstance; filename: Str255; var entry: ICMapEntry): ICError;
  98.     (* Requires IC 1.1.}
  99. {     * You must specify a configuration before calling this routine.}
  100. {     * If you are getting or setting multiple preferences, you should place}
  101. {     * these calls within an ICBegin/ICEnd pair.}
  102. {     * If you call this routine outside of such a pair, it implicitly}
  103. {     * calls ICBegin(inst, icReadWritePerm).}
  104. {     * Takes the name of an incoming file and returns the most appropriate}
  105. {     * mappings database entry, based on its extension.}
  106. {     * filename must not be the empty string.}
  107. {     * Returns icPrefNotFoundErr if no suitable entry is found.}
  108. {     *)
  109.  
  110.     function ICMapTypeCreator (inst: ICInstance; fType: OSType; fCreator: OSType; filename: Str255; var entry: ICMapEntry): ICError;
  111.     (* Requires IC 1.1.}
  112. {     * You must specify a configuration before calling this routine.}
  113. {     * You must be inside an ICBegin/End pair to call this routine.}
  114. {     * Takes the type and creator (and optionally the name) of an outgoing}
  115. {     * file and returns the most appropriate mappings database entry.}
  116. {     * The filename may be either the name of the outgoing file or}
  117. {     * the empty string.}
  118. {     * Returns icPrefNotFoundErr if no suitable entry found.}
  119. {     *)
  120.  
  121.   (* ----- Mid Level Routines ----- *)
  122.  
  123.     function ICMapEntriesFilename (inst: ICInstance; entries: Handle; filename: Str255; var entry: ICMapEntry): ICError;
  124.     (* Requires IC 1.1.}
  125. {     * You must specify a configuration before calling this routine.}
  126. {     * You do not have to be inside an ICBegin/End pair to call this routine.}
  127. {     * Takes the name of an incoming file and returns the most appropriate}
  128. {     * mappings database entry, based on its extension.}
  129. {     * entries must be a handle to a valid IC mappings database preference.}
  130. {     * filename must not be the empty string.}
  131. {     * Returns icPrefNotFoundErr if no suitable entry is found.}
  132. {     *)
  133.  
  134.     function ICMapEntriesTypeCreator (inst: ICInstance; entries: Handle; fType: OSType; fCreator: OSType; filename: Str255; var entry: ICMapEntry): ICError;
  135.     (* Requires IC 1.1.}
  136. {     * You must specify a configuration before calling this routine.}
  137. {     * You do not have to be inside an ICBegin/End pair to call this routine.}
  138. {     * Takes the type and creator (and optionally the name) of an outgoing}
  139. {     * file and returns the most appropriate mappings database entry.}
  140. {     * entries must be a handle to a valid IC mappings database preference.}
  141. {     * The filename may be either the name of the outgoing file or}
  142. {     * the empty string.}
  143. {     * Returns icPrefNotFoundErr if no suitable entry found.}
  144. {     *)
  145.  
  146.   (* ----- Low Level Routines ----- *)
  147.  
  148.     function ICCountMapEntries (inst: ICInstance; entries: Handle; var count: longint): ICError;
  149.     (* Requires IC 1.1.}
  150. {     * You must specify a configuration before calling this routine.}
  151. {     * You do not have to be inside an ICBegin/End pair to call this routine.}
  152. {     * Counts the number of entries in the mappings database.}
  153. {     * entries must be a