HISearchField.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. {
  2. File: HIToolbox/HISearchField.h
  3. Contains: Definition of the search field view provided by HIToolbox.
  4. Version: HIToolbox-624~3
  5. Copyright: © 2006-2008 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 308
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  18. {$mode macpas}
  19. {$modeswitch cblocks}
  20. {$packenum 1}
  21. {$macro on}
  22. {$inline on}
  23. {$calling mwpascal}
  24. {$IFNDEF FPC_DOTTEDUNITS}
  25. unit HISearchField;
  26. {$ENDIF FPC_DOTTEDUNITS}
  27. interface
  28. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  29. {$setc GAP_INTERFACES_VERSION := $0308}
  30. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  31. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  32. {$endc}
  33. {$ifc defined CPUPOWERPC and defined CPUI386}
  34. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  35. {$endc}
  36. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  37. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  38. {$endc}
  39. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  40. {$setc __ppc__ := 1}
  41. {$elsec}
  42. {$setc __ppc__ := 0}
  43. {$endc}
  44. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  45. {$setc __ppc64__ := 1}
  46. {$elsec}
  47. {$setc __ppc64__ := 0}
  48. {$endc}
  49. {$ifc not defined __i386__ and defined CPUI386}
  50. {$setc __i386__ := 1}
  51. {$elsec}
  52. {$setc __i386__ := 0}
  53. {$endc}
  54. {$ifc not defined __x86_64__ and defined CPUX86_64}
  55. {$setc __x86_64__ := 1}
  56. {$elsec}
  57. {$setc __x86_64__ := 0}
  58. {$endc}
  59. {$ifc not defined __arm__ and defined CPUARM}
  60. {$setc __arm__ := 1}
  61. {$elsec}
  62. {$setc __arm__ := 0}
  63. {$endc}
  64. {$ifc not defined __arm64__ and defined CPUAARCH64}
  65. {$setc __arm64__ := 1}
  66. {$elsec}
  67. {$setc __arm64__ := 0}
  68. {$endc}
  69. {$ifc defined cpu64}
  70. {$setc __LP64__ := 1}
  71. {$elsec}
  72. {$setc __LP64__ := 0}
  73. {$endc}
  74. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  75. {$error Conflicting definitions for __ppc__ and __i386__}
  76. {$endc}
  77. {$ifc defined __ppc__ and __ppc__}
  78. {$setc TARGET_CPU_PPC := TRUE}
  79. {$setc TARGET_CPU_PPC64 := FALSE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_CPU_ARM64 := FALSE}
  84. {$setc TARGET_OS_MAC := TRUE}
  85. {$setc TARGET_OS_IPHONE := FALSE}
  86. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  87. {$setc TARGET_OS_EMBEDDED := FALSE}
  88. {$elifc defined __ppc64__ and __ppc64__}
  89. {$setc TARGET_CPU_PPC := FALSE}
  90. {$setc TARGET_CPU_PPC64 := TRUE}
  91. {$setc TARGET_CPU_X86 := FALSE}
  92. {$setc TARGET_CPU_X86_64 := FALSE}
  93. {$setc TARGET_CPU_ARM := FALSE}
  94. {$setc TARGET_CPU_ARM64 := FALSE}
  95. {$setc TARGET_OS_MAC := TRUE}
  96. {$setc TARGET_OS_IPHONE := FALSE}
  97. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  98. {$setc TARGET_OS_EMBEDDED := FALSE}
  99. {$elifc defined __i386__ and __i386__}
  100. {$setc TARGET_CPU_PPC := FALSE}
  101. {$setc TARGET_CPU_PPC64 := FALSE}
  102. {$setc TARGET_CPU_X86 := TRUE}
  103. {$setc TARGET_CPU_X86_64 := FALSE}
  104. {$setc TARGET_CPU_ARM := FALSE}
  105. {$setc TARGET_CPU_ARM64 := FALSE}
  106. {$ifc defined iphonesim}
  107. {$setc TARGET_OS_MAC := FALSE}
  108. {$setc TARGET_OS_IPHONE := TRUE}
  109. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  110. {$elsec}
  111. {$setc TARGET_OS_MAC := TRUE}
  112. {$setc TARGET_OS_IPHONE := FALSE}
  113. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  114. {$endc}
  115. {$setc TARGET_OS_EMBEDDED := FALSE}
  116. {$elifc defined __x86_64__ and __x86_64__}
  117. {$setc TARGET_CPU_PPC := FALSE}
  118. {$setc TARGET_CPU_PPC64 := FALSE}
  119. {$setc TARGET_CPU_X86 := FALSE}
  120. {$setc TARGET_CPU_X86_64 := TRUE}
  121. {$setc TARGET_CPU_ARM := FALSE}
  122. {$setc TARGET_CPU_ARM64 := FALSE}
  123. {$ifc defined iphonesim}
  124. {$setc TARGET_OS_MAC := FALSE}
  125. {$setc TARGET_OS_IPHONE := TRUE}
  126. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  127. {$elsec}
  128. {$setc TARGET_OS_MAC := TRUE}
  129. {$setc TARGET_OS_IPHONE := FALSE}
  130. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  131. {$endc}
  132. {$setc TARGET_OS_EMBEDDED := FALSE}
  133. {$elifc defined __arm__ and __arm__}
  134. {$setc TARGET_CPU_PPC := FALSE}
  135. {$setc TARGET_CPU_PPC64 := FALSE}
  136. {$setc TARGET_CPU_X86 := FALSE}
  137. {$setc TARGET_CPU_X86_64 := FALSE}
  138. {$setc TARGET_CPU_ARM := TRUE}
  139. {$setc TARGET_CPU_ARM64 := FALSE}
  140. {$setc TARGET_OS_MAC := FALSE}
  141. {$setc TARGET_OS_IPHONE := TRUE}
  142. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  143. {$setc TARGET_OS_EMBEDDED := TRUE}
  144. {$elifc defined __arm64__ and __arm64__}
  145. {$setc TARGET_CPU_PPC := FALSE}
  146. {$setc TARGET_CPU_PPC64 := FALSE}
  147. {$setc TARGET_CPU_X86 := FALSE}
  148. {$setc TARGET_CPU_X86_64 := FALSE}
  149. {$setc TARGET_CPU_ARM := FALSE}
  150. {$setc TARGET_CPU_ARM64 := TRUE}
  151. {$ifc defined ios}
  152. {$setc TARGET_OS_MAC := FALSE}
  153. {$setc TARGET_OS_IPHONE := TRUE}
  154. {$setc TARGET_OS_EMBEDDED := TRUE}
  155. {$elsec}
  156. {$setc TARGET_OS_MAC := TRUE}
  157. {$setc TARGET_OS_IPHONE := FALSE}
  158. {$setc TARGET_OS_EMBEDDED := FALSE}
  159. {$endc}
  160. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  161. {$elsec}
  162. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  163. {$endc}
  164. {$ifc defined __LP64__ and __LP64__ }
  165. {$setc TARGET_CPU_64 := TRUE}
  166. {$elsec}
  167. {$setc TARGET_CPU_64 := FALSE}
  168. {$endc}
  169. {$ifc defined FPC_BIG_ENDIAN}
  170. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  171. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  172. {$elifc defined FPC_LITTLE_ENDIAN}
  173. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  174. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  175. {$elsec}
  176. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  177. {$endc}
  178. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  179. {$setc CALL_NOT_IN_CARBON := FALSE}
  180. {$setc OLDROUTINENAMES := FALSE}
  181. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  182. {$setc OPAQUE_UPP_TYPES := TRUE}
  183. {$setc OTCARBONAPPLICATION := TRUE}
  184. {$setc OTKERNEL := FALSE}
  185. {$setc PM_USE_SESSION_APIS := TRUE}
  186. {$setc TARGET_API_MAC_CARBON := TRUE}
  187. {$setc TARGET_API_MAC_OS8 := FALSE}
  188. {$setc TARGET_API_MAC_OSX := TRUE}
  189. {$setc TARGET_CARBON := TRUE}
  190. {$setc TARGET_CPU_68K := FALSE}
  191. {$setc TARGET_CPU_MIPS := FALSE}
  192. {$setc TARGET_CPU_SPARC := FALSE}
  193. {$setc TARGET_OS_UNIX := FALSE}
  194. {$setc TARGET_OS_WIN32 := FALSE}
  195. {$setc TARGET_RT_MAC_68881 := FALSE}
  196. {$setc TARGET_RT_MAC_CFM := FALSE}
  197. {$setc TARGET_RT_MAC_MACHO := TRUE}
  198. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  199. {$setc TYPE_BOOL := FALSE}
  200. {$setc TYPE_EXTENDED := FALSE}
  201. {$setc TYPE_LONGLONG := TRUE}
  202. {$IFDEF FPC_DOTTEDUNITS}
  203. uses MacOsApi.MacTypes,MacOsApi.Appearance,MacOsApi.CarbonEvents,MacOsApi.Controls,MacOsApi.Menus,MacOsApi.HIGeometry,MacOsApi.HIObject,MacOsApi.HIView,MacOsApi.CFBase;
  204. {$ELSE FPC_DOTTEDUNITS}
  205. uses MacTypes,Appearance,CarbonEvents,Controls,Menus,HIGeometry,HIObject,HIView,CFBase;
  206. {$ENDIF FPC_DOTTEDUNITS}
  207. {$endc} {not MACOSALLINCLUDE}
  208. {$ifc TARGET_OS_MAC}
  209. {$ALIGN POWER}
  210. {
  211. * HISearchField.h
  212. *
  213. * Discussion:
  214. * API definitions for the search field view.
  215. }
  216. {==============================================================================}
  217. { HISearchField }
  218. { HISearchField is a new view available in Mac OS X 10.3. }
  219. { This view is designed to be used for applications that provide searching }
  220. { functionality. Visually, it is a standard text field optionally adorned }
  221. { with a search icon on the left and/or a cancel image on the right. }
  222. { When the user has accepted the text by pressing the return or enter key }
  223. { a Carbon Event of kEventClassTextField / kEventTextAccepted will be sent }
  224. { to the view. This will be the indication that the search should begin. }
  225. { This view will also respond to all the standard control data tags that are }
  226. { used by the EditUnicodeText view. }
  227. {==============================================================================}
  228. { The HIObject class ID for the HISearchField class. }
  229. {$ifc USE_CFSTR_CONSTANT_MACROS}
  230. {$definec kHISearchFieldClassID CFSTRP('com.apple.HISearchField')}
  231. {$endc}
  232. { ControlKind}
  233. const
  234. kControlKindHISearchField = FourCharCode('srfd');
  235. { HISearchField part codes}
  236. const
  237. kControlSearchFieldCancelPart = 30;
  238. kControlSearchFieldMenuPart = 31;
  239. {
  240. The SearchField view supports those tags previously defined for the EditUnicodeText view.
  241. These tags are available through Get/SetControlData with ControlPartCode of kControlEditTextPart:
  242. kControlFontStyleTag
  243. kControlEditTextFixedTextTag
  244. kControlEditTextTextTag
  245. kControlEditTextKeyFilterTag
  246. kControlEditTextValidationProcTag
  247. kControlEditUnicodeTextPostUpdateProcTag
  248. kControlEditTextSelectionTag
  249. kControlEditTextKeyScriptBehaviorTag
  250. kControlEditTextCharCount
  251. kControlEditTextCFStringTag
  252. }
  253. {
  254. * Summary:
  255. * HISearchField attributes
  256. }
  257. const
  258. {
  259. * A constant with value zero; the lack of any attributes.
  260. }
  261. kHISearchFieldNoAttributes = 0;
  262. {
  263. * This view contains the cancel icon in the text field.
  264. }
  265. kHISearchFieldAttributesCancel = 1 shl 0;
  266. {
  267. * This view contains the search icon in the text field. If a menu is
  268. * associated with the search field, this attribute is implicitly set
  269. * and the search icon will display with a menu disclosure badge.
  270. * Available in Mac OS X 10.4 and later.
  271. }
  272. kHISearchFieldAttributesSearchIcon = 1 shl 1;
  273. { Event Classes}
  274. const
  275. kEventClassSearchField = FourCharCode('srfd');
  276. {
  277. * kEventClassSearchField / kEventSearchFieldCancelClicked
  278. *
  279. * Summary:
  280. * Notification that the cancel icon has been depressed.
  281. *
  282. * Discussion:
  283. * This event is sent by the HISearchField view if the cancel icon
  284. * is enabled (attribute of kHISearchFieldAtttributesCancel), and
  285. * the cancel has been clicked.
  286. *
  287. * Mac OS X threading:
  288. * Not thread safe
  289. *
  290. * Parameters:
  291. *
  292. * --> kEventParamDirectObject (in, typeControlRef)
  293. * The HISearchField that has sent the notification.
  294. *
  295. * Availability:
  296. * Mac OS X: in version 10.3 and later in Carbon.framework
  297. * CarbonLib: not available
  298. }
  299. const
  300. kEventSearchFieldCancelClicked = 1;
  301. {
  302. * kEventClassSearchField / kEventSearchFieldSearchClicked
  303. *
  304. * Summary:
  305. * Notification that the search icon has been depressed.
  306. *
  307. * Discussion:
  308. * This event is sent by the HISearchField view if the search icon
  309. * is enabled (attribute of kHISearchFieldAttributesSearchIcon or a
  310. * menu is associated with the search field), and the search icon
  311. * has been clicked. If a menu is associated with the search field,
  312. * the search field will handle the display and tracking of the menu
  313. * by default. This event is sent to the search field only, it will
  314. * not propagate.
  315. *
  316. * Mac OS X threading:
  317. * Not thread safe
  318. *
  319. * Parameters:
  320. *
  321. * --> kEventParamDirectObject (in, typeControlRef)
  322. * The HISearchField that has sent the notification.
  323. *
  324. * Availability:
  325. * Mac OS X: in version 10.4 and later in Carbon.framework
  326. * CarbonLib: not available
  327. }
  328. const
  329. kEventSearchFieldSearchClicked = 2;
  330. {$ifc not TARGET_CPU_64}
  331. {
  332. * HISearchFieldCreate()
  333. *
  334. * Summary:
  335. * Creates a search field view. The new view is initially invisible.
  336. *
  337. * Mac OS X threading:
  338. * Not thread safe
  339. *
  340. * Parameters:
  341. *
  342. * inBounds:
  343. * The initial bounds of the view. If this parameter is NULL, the
  344. * view defaults to have empty bounds ( 0, 0, 0, 0 ).
  345. *
  346. * inAttributes:
  347. * The initial attributes of the search field. Indicates whether
  348. * the field should contain the cancel icon.
  349. *
  350. * inSearchMenu:
  351. * The menu to be associated with this search field. If
  352. * inSearchMenu is non-NULL, it will be retained by the search
  353. * field and the search icon will be enabled in the left side of
  354. * the text field. If this parameter is NULL, the view will not
  355. * display the search icon in the left portion of the text field.
  356. * You are expected to install handlers on this menu to handle the
  357. * visual appearance of the menu (for example, to draw check marks
  358. * or enable items when the menu receives the
  359. * kEventMenuEnableItems Carbon Event), and to keep track of what
  360. * action should be performed by associating HICommands with each
  361. * menu item and installing a handler for the (
  362. * kEventClassCommand, kEventCommandProcess ) Carbon Event.
  363. *
  364. * inDescriptiveText:
  365. * The text to be displayed in the text field when the field does
  366. * not have focus and contains no user entered text. This is meant
  367. * to be an indication of what the search criteria is. For
  368. * example, you may wish to identify to the user that the search
  369. * will cover the "Subject" or "Contents" of a selected range of
  370. * items. If inDescriptiveText is non-NULL it will be retained by
  371. * the search field.
  372. *
  373. * outRef:
  374. * On exit, contains the new view.
  375. *
  376. * Result:
  377. * An operating system status code.
  378. *
  379. * Availability:
  380. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  381. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  382. * Non-Carbon CFM: not available
  383. }
  384. function HISearchFieldCreate( {const} inBounds: HIRectPtr { can be NULL }; inAttributes: OptionBits; inSearchMenu: MenuRef { can be NULL }; inDescriptiveText: CFStringRef { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISearchFieldCreate';
  385. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  386. {
  387. * HISearchFieldSetSearchMenu()
  388. *
  389. * Summary:
  390. * Set the search menu associated with the view.
  391. *
  392. * Mac OS X threading:
  393. * Not thread safe
  394. *
  395. * Parameters:
  396. *
  397. * inSearchField:
  398. * The search field to associate the search menu with.
  399. *
  400. * inSearchMenu:
  401. * The menu to associate with the search field. If there is
  402. * already a menu associated with the search field, that menu will
  403. * be released. If inSearchMenu is non-NULL, it will be retained
  404. * by the search field and the search icon will be enabled in the
  405. * left side of the text field. You are expected to install
  406. * handlers on this menu to handle the visual appearance of the
  407. * menu (for example, to draw check marks or enable items when the
  408. * menu receives the kEventMenuEnableItems Carbon Event), and to
  409. * keep track of what action should be performed by associating
  410. * HICommands with each menu item and installing a handler for the
  411. * ( kEventClassCommand, kEventCommandProcess ) Carbon Event. If
  412. * inSearchMenu is NULL, the search icon will be removed from the
  413. * left side of the text field and no menu will be associated with
  414. * this field.
  415. *
  416. * Result:
  417. * An operating system status code.
  418. *
  419. * Availability:
  420. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  421. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  422. * Non-Carbon CFM: not available
  423. }
  424. function HISearchFieldSetSearchMenu( inSearchField: HIViewRef; inSearchMenu: MenuRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetSearchMenu';
  425. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  426. {
  427. * HISearchFieldGetSearchMenu()
  428. *
  429. * Summary:
  430. * Get the menu that is associated with the search field
  431. *
  432. * Mac OS X threading:
  433. * Not thread safe
  434. *
  435. * Parameters:
  436. *
  437. * inSearchField:
  438. * The search field you wish to retrieve the search menu from.
  439. *
  440. * outSearchMenu:
  441. * On exit, will contain the menu that is associated with search
  442. * field. The menu will _not_ be retained on output and this
  443. * parameter cannot be NULL.
  444. *
  445. * Result:
  446. * An operating system status code.
  447. *
  448. * Availability:
  449. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  450. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  451. * Non-Carbon CFM: not available
  452. }
  453. function HISearchFieldGetSearchMenu( inSearchField: HIViewRef; var outSearchMenu: MenuRef ): OSStatus; external name '_HISearchFieldGetSearchMenu';
  454. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  455. {
  456. * HISearchFieldChangeAttributes()
  457. *
  458. * Summary:
  459. * Set the attributes for the given search field.
  460. *
  461. * Mac OS X threading:
  462. * Not thread safe
  463. *
  464. * Parameters:
  465. *
  466. * inSearchField:
  467. * The search field to change the attributes of.
  468. *
  469. * inAttributesToSet:
  470. * The attributes to set.
  471. *
  472. * inAttributesToClear:
  473. * The attributes to clear.
  474. *
  475. * Result:
  476. * An operating system status code.
  477. *
  478. * Availability:
  479. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  480. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  481. * Non-Carbon CFM: not available
  482. }
  483. function HISearchFieldChangeAttributes( inSearchField: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISearchFieldChangeAttributes';
  484. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  485. {
  486. * HISearchFieldGetAttributes()
  487. *
  488. * Summary:
  489. * Returns the attributes of the search field.
  490. *
  491. * Mac OS X threading:
  492. * Not thread safe
  493. *
  494. * Parameters:
  495. *
  496. * inSearchField:
  497. * The search field to get the attributes of.
  498. *
  499. * outAttributes:
  500. * On exit, will contain the attributes of the search field. This
  501. * parameter cannot be NULL.
  502. *
  503. * Result:
  504. * An operating system status code.
  505. *
  506. * Availability:
  507. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  508. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  509. * Non-Carbon CFM: not available
  510. }
  511. function HISearchFieldGetAttributes( inSearchField: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HISearchFieldGetAttributes';
  512. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  513. {
  514. * HISearchFieldSetDescriptiveText()
  515. *
  516. * Summary:
  517. * Set the description of the search action of the search field.
  518. *
  519. * Mac OS X threading:
  520. * Not thread safe
  521. *
  522. * Parameters:
  523. *
  524. * inSearchField:
  525. * The search field to change the description of.
  526. *
  527. * inDescription:
  528. * The new description for the search field. If the search field
  529. * contains a description, it will be released. If inDescription
  530. * is non-NULL, it will be retained by the search field. If it is
  531. * NULL, no description will be associated with the search field.
  532. *
  533. * Result:
  534. * An operating system status code.
  535. *
  536. * Availability:
  537. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  538. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  539. * Non-Carbon CFM: not available
  540. }
  541. function HISearchFieldSetDescriptiveText( inSearchField: HIViewRef; inDescription: CFStringRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetDescriptiveText';
  542. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  543. {
  544. * HISearchFieldCopyDescriptiveText()
  545. *
  546. * Summary:
  547. * Get the description that is associated with the search field.
  548. *
  549. * Mac OS X threading:
  550. * Not thread safe
  551. *
  552. * Parameters:
  553. *
  554. * inSearchField:
  555. * The search field you wish to retrieve the description from.
  556. *
  557. * outDescription:
  558. * On exit, will contain the description that is associated with
  559. * the search field. This parameter cannot be NULL. If there is no
  560. * description associated with the search field, outDescription
  561. * will be set to NULL. If there is a description, a CFStringRef
  562. * will be created that contains the contents of the description.
  563. * You posess ownership of this string and will need to release it
  564. * when you no longer need it.
  565. *
  566. * Result:
  567. * An operating system status code.
  568. *
  569. * Availability:
  570. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  571. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  572. * Non-Carbon CFM: not available
  573. }
  574. function HISearchFieldCopyDescriptiveText( inSearchField: HIViewRef; var outDescription: CFStringRef ): OSStatus; external name '_HISearchFieldCopyDescriptiveText';
  575. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  576. {$endc} {not TARGET_CPU_64}
  577. {$endc} {TARGET_OS_MAC}
  578. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  579. end.
  580. {$endc} {not MACOSALLINCLUDE}