HIContainerViews.pas 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. {
  2. File: HIToolbox/HIContainerViews.h
  3. Contains: Definition of the container views 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. { Initial Pascal Translation: 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. unit HIContainerViews;
  25. interface
  26. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  27. {$setc GAP_INTERFACES_VERSION := $0308}
  28. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  29. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  30. {$endc}
  31. {$ifc defined CPUPOWERPC and defined CPUI386}
  32. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  33. {$endc}
  34. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  35. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  36. {$endc}
  37. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  38. {$setc __ppc__ := 1}
  39. {$elsec}
  40. {$setc __ppc__ := 0}
  41. {$endc}
  42. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  43. {$setc __ppc64__ := 1}
  44. {$elsec}
  45. {$setc __ppc64__ := 0}
  46. {$endc}
  47. {$ifc not defined __i386__ and defined CPUI386}
  48. {$setc __i386__ := 1}
  49. {$elsec}
  50. {$setc __i386__ := 0}
  51. {$endc}
  52. {$ifc not defined __x86_64__ and defined CPUX86_64}
  53. {$setc __x86_64__ := 1}
  54. {$elsec}
  55. {$setc __x86_64__ := 0}
  56. {$endc}
  57. {$ifc not defined __arm__ and defined CPUARM}
  58. {$setc __arm__ := 1}
  59. {$elsec}
  60. {$setc __arm__ := 0}
  61. {$endc}
  62. {$ifc not defined __arm64__ and defined CPUAARCH64}
  63. {$setc __arm64__ := 1}
  64. {$elsec}
  65. {$setc __arm64__ := 0}
  66. {$endc}
  67. {$ifc defined cpu64}
  68. {$setc __LP64__ := 1}
  69. {$elsec}
  70. {$setc __LP64__ := 0}
  71. {$endc}
  72. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  73. {$error Conflicting definitions for __ppc__ and __i386__}
  74. {$endc}
  75. {$ifc defined __ppc__ and __ppc__}
  76. {$setc TARGET_CPU_PPC := TRUE}
  77. {$setc TARGET_CPU_PPC64 := FALSE}
  78. {$setc TARGET_CPU_X86 := FALSE}
  79. {$setc TARGET_CPU_X86_64 := FALSE}
  80. {$setc TARGET_CPU_ARM := FALSE}
  81. {$setc TARGET_CPU_ARM64 := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_IPHONE := FALSE}
  84. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  85. {$setc TARGET_OS_EMBEDDED := FALSE}
  86. {$elifc defined __ppc64__ and __ppc64__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := TRUE}
  89. {$setc TARGET_CPU_X86 := FALSE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$setc TARGET_CPU_ARM64 := FALSE}
  93. {$setc TARGET_OS_MAC := TRUE}
  94. {$setc TARGET_OS_IPHONE := FALSE}
  95. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  96. {$setc TARGET_OS_EMBEDDED := FALSE}
  97. {$elifc defined __i386__ and __i386__}
  98. {$setc TARGET_CPU_PPC := FALSE}
  99. {$setc TARGET_CPU_PPC64 := FALSE}
  100. {$setc TARGET_CPU_X86 := TRUE}
  101. {$setc TARGET_CPU_X86_64 := FALSE}
  102. {$setc TARGET_CPU_ARM := FALSE}
  103. {$setc TARGET_CPU_ARM64 := FALSE}
  104. {$ifc defined(iphonesim)}
  105. {$setc TARGET_OS_MAC := FALSE}
  106. {$setc TARGET_OS_IPHONE := TRUE}
  107. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  108. {$elsec}
  109. {$setc TARGET_OS_MAC := TRUE}
  110. {$setc TARGET_OS_IPHONE := FALSE}
  111. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  112. {$endc}
  113. {$setc TARGET_OS_EMBEDDED := FALSE}
  114. {$elifc defined __x86_64__ and __x86_64__}
  115. {$setc TARGET_CPU_PPC := FALSE}
  116. {$setc TARGET_CPU_PPC64 := FALSE}
  117. {$setc TARGET_CPU_X86 := FALSE}
  118. {$setc TARGET_CPU_X86_64 := TRUE}
  119. {$setc TARGET_CPU_ARM := FALSE}
  120. {$setc TARGET_CPU_ARM64 := FALSE}
  121. {$ifc defined(iphonesim)}
  122. {$setc TARGET_OS_MAC := FALSE}
  123. {$setc TARGET_OS_IPHONE := TRUE}
  124. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  125. {$elsec}
  126. {$setc TARGET_OS_MAC := TRUE}
  127. {$setc TARGET_OS_IPHONE := FALSE}
  128. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  129. {$endc}
  130. {$setc TARGET_OS_EMBEDDED := FALSE}
  131. {$elifc defined __arm__ and __arm__}
  132. {$setc TARGET_CPU_PPC := FALSE}
  133. {$setc TARGET_CPU_PPC64 := FALSE}
  134. {$setc TARGET_CPU_X86 := FALSE}
  135. {$setc TARGET_CPU_X86_64 := FALSE}
  136. {$setc TARGET_CPU_ARM := TRUE}
  137. {$setc TARGET_CPU_ARM64 := FALSE}
  138. { will require compiler define when/if other Apple devices with ARM cpus ship }
  139. {$setc TARGET_OS_MAC := FALSE}
  140. {$setc TARGET_OS_IPHONE := TRUE}
  141. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  142. {$setc TARGET_OS_EMBEDDED := TRUE}
  143. {$elifc defined __arm64__ and __arm64__}
  144. {$setc TARGET_CPU_PPC := FALSE}
  145. {$setc TARGET_CPU_PPC64 := FALSE}
  146. {$setc TARGET_CPU_X86 := FALSE}
  147. {$setc TARGET_CPU_X86_64 := FALSE}
  148. {$setc TARGET_CPU_ARM := FALSE}
  149. {$setc TARGET_CPU_ARM64 := TRUE}
  150. { will require compiler define when/if other Apple devices with ARM cpus ship }
  151. {$setc TARGET_OS_MAC := FALSE}
  152. {$setc TARGET_OS_IPHONE := TRUE}
  153. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  154. {$setc TARGET_OS_EMBEDDED := TRUE}
  155. {$elsec}
  156. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  157. {$endc}
  158. {$ifc defined __LP64__ and __LP64__ }
  159. {$setc TARGET_CPU_64 := TRUE}
  160. {$elsec}
  161. {$setc TARGET_CPU_64 := FALSE}
  162. {$endc}
  163. {$ifc defined FPC_BIG_ENDIAN}
  164. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  165. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  166. {$elifc defined FPC_LITTLE_ENDIAN}
  167. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  168. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  169. {$elsec}
  170. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  171. {$endc}
  172. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  173. {$setc CALL_NOT_IN_CARBON := FALSE}
  174. {$setc OLDROUTINENAMES := FALSE}
  175. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  176. {$setc OPAQUE_UPP_TYPES := TRUE}
  177. {$setc OTCARBONAPPLICATION := TRUE}
  178. {$setc OTKERNEL := FALSE}
  179. {$setc PM_USE_SESSION_APIS := TRUE}
  180. {$setc TARGET_API_MAC_CARBON := TRUE}
  181. {$setc TARGET_API_MAC_OS8 := FALSE}
  182. {$setc TARGET_API_MAC_OSX := TRUE}
  183. {$setc TARGET_CARBON := TRUE}
  184. {$setc TARGET_CPU_68K := FALSE}
  185. {$setc TARGET_CPU_MIPS := FALSE}
  186. {$setc TARGET_CPU_SPARC := FALSE}
  187. {$setc TARGET_OS_UNIX := FALSE}
  188. {$setc TARGET_OS_WIN32 := FALSE}
  189. {$setc TARGET_RT_MAC_68881 := FALSE}
  190. {$setc TARGET_RT_MAC_CFM := FALSE}
  191. {$setc TARGET_RT_MAC_MACHO := TRUE}
  192. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  193. {$setc TYPE_BOOL := FALSE}
  194. {$setc TYPE_EXTENDED := FALSE}
  195. {$setc TYPE_LONGLONG := TRUE}
  196. uses MacTypes,Appearance,CarbonEvents,Controls,Menus,QuickdrawTypes,CFBase,HIObject;
  197. {$endc} {not MACOSALLINCLUDE}
  198. {$ifc TARGET_OS_MAC}
  199. {$ALIGN POWER}
  200. {
  201. * HIContainerViews.h
  202. *
  203. * Discussion:
  204. * API definitions for the views that can contain other views: group
  205. * box, placard, window header, and user pane.
  206. }
  207. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  208. { ¥ GROUP BOX (CDEF 10) }
  209. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  210. { The group box CDEF can be use in several ways. It can have no title, a text title, }
  211. { a check box as the title, or a popup button as a title. There are two versions of }
  212. { group boxes, primary and secondary, which look slightly different. }
  213. { Group Box proc IDs }
  214. const
  215. kControlGroupBoxTextTitleProc = 160;
  216. kControlGroupBoxCheckBoxProc = 161;
  217. kControlGroupBoxPopupButtonProc = 162;
  218. kControlGroupBoxSecondaryTextTitleProc = 164;
  219. kControlGroupBoxSecondaryCheckBoxProc = 165;
  220. kControlGroupBoxSecondaryPopupButtonProc = 166;
  221. { Control Kind Tag }
  222. const
  223. kControlKindGroupBox = FourCharCode('grpb');
  224. kControlKindCheckGroupBox = FourCharCode('cgrp');
  225. kControlKindPopupGroupBox = FourCharCode('pgrp');
  226. { The HIObject class ID for the HIGroupBox class. }
  227. {$ifc USE_CFSTR_CONSTANT_MACROS}
  228. {$definec kHIGroupBoxClassID CFSTRP('com.apple.HIGroupBox')}
  229. {$endc}
  230. { The HIObject class ID for the HICheckBoxGroup class. }
  231. {$ifc USE_CFSTR_CONSTANT_MACROS}
  232. {$definec kHICheckBoxGroupClassID CFSTRP('com.apple.HICheckBoxGroup')}
  233. {$endc}
  234. { Creation APIs: Carbon only }
  235. {$ifc not TARGET_CPU_64}
  236. {
  237. * CreateGroupBoxControl()
  238. *
  239. * Summary:
  240. * Creates a group box control.
  241. *
  242. * Mac OS X threading:
  243. * Not thread safe
  244. *
  245. * Parameters:
  246. *
  247. * window:
  248. * The window that should contain the control.
  249. *
  250. * boundsRect:
  251. * The bounding box of the control.
  252. *
  253. * title:
  254. * The title of the control.
  255. *
  256. * primary:
  257. * Whether to create a primary or secondary group box.
  258. *
  259. * outControl:
  260. * On exit, contains the new control.
  261. *
  262. * Availability:
  263. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  264. * CarbonLib: in CarbonLib 1.1 and later
  265. * Non-Carbon CFM: not available
  266. }
  267. function CreateGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; primary: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateGroupBoxControl';
  268. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  269. {
  270. * CreateCheckGroupBoxControl()
  271. *
  272. * Summary:
  273. * Creates a group box control that has a check box as its title.
  274. *
  275. * Mac OS X threading:
  276. * Not thread safe
  277. *
  278. * Parameters:
  279. *
  280. * window:
  281. * The window that should contain the control.
  282. *
  283. * boundsRect:
  284. * The bounding box of the control.
  285. *
  286. * title:
  287. * The title of the control (used as the title of the check box).
  288. *
  289. * initialValue:
  290. * The initial value of the check box.
  291. *
  292. * primary:
  293. * Whether to create a primary or secondary group box.
  294. *
  295. * autoToggle:
  296. * Whether to create an auto-toggling check box. Auto-toggling
  297. * check box titles are only supported on Mac OS X; this parameter
  298. * must be false when used with CarbonLib.
  299. *
  300. * outControl:
  301. * On exit, contains the new control.
  302. *
  303. * Availability:
  304. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  305. * CarbonLib: in CarbonLib 1.1 and later
  306. * Non-Carbon CFM: not available
  307. }
  308. function CreateCheckGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; initialValue: SInt32; primary: Boolean; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateCheckGroupBoxControl';
  309. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  310. {
  311. * CreatePopupGroupBoxControl()
  312. *
  313. * Summary:
  314. * Creates a group box control that has a popup button as its title.
  315. *
  316. * Mac OS X threading:
  317. * Not thread safe
  318. *
  319. * Parameters:
  320. *
  321. * window:
  322. * The window that should contain the control.
  323. *
  324. * boundsRect:
  325. * The bounding box of the control.
  326. *
  327. * title:
  328. * The title of the control (used as the title of the popup
  329. * button).
  330. *
  331. * primary:
  332. * Whether to create a primary or secondary group box.
  333. *
  334. * menuID:
  335. * The menu ID of the menu to be displayed by the popup button.
  336. *
  337. * variableWidth:
  338. * Whether the popup button should have a variable-width title.
  339. * Fixed-width titles are only supported by Mac OS X; this
  340. * parameter must be true when used with CarbonLib.
  341. *
  342. * titleWidth:
  343. * The width in pixels of the popup button title.
  344. *
  345. * titleJustification:
  346. * The justification of the popup button title. Use one of the
  347. * TextEdit justification constants here (teFlushDefault,
  348. * teCenter, teFlushRight, or teFlushLeft).
  349. *
  350. * titleStyle:
  351. * The QuickDraw text style of the popup button title.
  352. *
  353. * outControl:
  354. * On exit, contains the new control.
  355. *
  356. * Availability:
  357. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  358. * CarbonLib: in CarbonLib 1.1 and later
  359. * Non-Carbon CFM: not available
  360. }
  361. function CreatePopupGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; primary: Boolean; menuID_: MenuID; variableWidth: Boolean; titleWidth: SInt16; titleJustification: SInt16; titleStyle: Style; var outControl: ControlRef ): OSStatus; external name '_CreatePopupGroupBoxControl';
  362. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  363. { Tagged data supported by group box }
  364. {$endc} {not TARGET_CPU_64}
  365. const
  366. kControlGroupBoxMenuHandleTag = FourCharCode('mhan'); { MenuRef (popup title only)}
  367. kControlGroupBoxMenuRefTag = FourCharCode('mhan'); { MenuRef (popup title only)}
  368. kControlGroupBoxFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  369. { tags available with Appearance 1.1 or later }
  370. const
  371. kControlGroupBoxTitleRectTag = FourCharCode('trec'); { Rect. Rectangle that the title text/control is drawn in. (get only)}
  372. {
  373. * Summary:
  374. * Tags available with Mac OS X 10.3 or later
  375. }
  376. const
  377. {
  378. * Passed data is a Rect. Returns the full rectangle that content is
  379. * drawn in (get only). This is slightly different than the content
  380. * region, as it also includes the frame drawn around the content.
  381. }
  382. kControlGroupBoxFrameRectTag = FourCharCode('frec');
  383. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  384. { ¥ PLACARD (CDEF 14) }
  385. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  386. { Placard proc IDs }
  387. const
  388. kControlPlacardProc = 224;
  389. { Control Kind Tag }
  390. const
  391. kControlKindPlacard = FourCharCode('plac');
  392. { The HIObject class ID for the HIPlacardView class. }
  393. {$ifc USE_CFSTR_CONSTANT_MACROS}
  394. {$definec kHIPlacardViewClassID CFSTRP('com.apple.HIPlacardView')}
  395. {$endc}
  396. {$ifc not TARGET_CPU_64}
  397. {
  398. * CreatePlacardControl()
  399. *
  400. * Summary:
  401. * Creates a placard control.
  402. *
  403. * Mac OS X threading:
  404. * Not thread safe
  405. *
  406. * Parameters:
  407. *
  408. * window:
  409. * The window that should contain the control. May be NULL on 10.3
  410. * and later.
  411. *
  412. * boundsRect:
  413. * The bounding box of the control.
  414. *
  415. * outControl:
  416. * On exit, contains the new control.
  417. *
  418. * Availability:
  419. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  420. * CarbonLib: in CarbonLib 1.1 and later
  421. * Non-Carbon CFM: not available
  422. }
  423. function CreatePlacardControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreatePlacardControl';
  424. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  425. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  426. { ¥ WINDOW HEADER (CDEF 21) }
  427. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  428. { Window Header proc IDs }
  429. {$endc} {not TARGET_CPU_64}
  430. const
  431. kControlWindowHeaderProc = 336; { normal header}
  432. kControlWindowListViewHeaderProc = 337; { variant for list views - no bottom line}
  433. { Control Kind Tag }
  434. const
  435. kControlKindWindowHeader = FourCharCode('whed');
  436. {
  437. * Summary:
  438. * Tags available with Mac OS X 10.3 or later
  439. }
  440. const
  441. {
  442. * Passed data is a Boolean. Set to true if the control is to draw
  443. * as a list header.
  444. }
  445. kControlWindowHeaderIsListHeaderTag = FourCharCode('islh');
  446. { The HIObject class ID for the HIWindowHeaderView class. }
  447. {$ifc USE_CFSTR_CONSTANT_MACROS}
  448. {$definec kHIWindowHeaderViewClassID CFSTRP('com.apple.HIWindowHeaderView')}
  449. {$endc}
  450. { Creation API: Carbon Only }
  451. {$ifc not TARGET_CPU_64}
  452. {
  453. * CreateWindowHeaderControl()
  454. *
  455. * Mac OS X threading:
  456. * Not thread safe
  457. *
  458. * Availability:
  459. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  460. * CarbonLib: in CarbonLib 1.1 and later
  461. * Non-Carbon CFM: not available
  462. }
  463. function CreateWindowHeaderControl( window: WindowRef; const (*var*) boundsRect: Rect; isListHeader: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateWindowHeaderControl';
  464. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  465. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  466. { ¥ USER PANE (CDEF 16) }
  467. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  468. { User panes have two primary purposes: to allow easy implementation of a custom }
  469. { control by the developer, and to provide a generic container for embedding other }
  470. { controls. }
  471. { In Carbon, with the advent of Carbon-event-based controls, you may find it easier }
  472. { to simply write a new control from scratch than to customize a user pane control. }
  473. { The set of callbacks provided by the user pane will not be extended to support }
  474. { new Control Manager features; instead, you should just write a real control. }
  475. { User panes do not, by default, support embedding. If you try to embed a control }
  476. { into a user pane, you will get back errControlIsNotEmbedder. You can make a user }
  477. { pane support embedding by passing the kControlSupportsEmbedding flag in the 'value' }
  478. { parameter when you create the control. }
  479. { User panes support the following overloaded control initialization options: }
  480. { Parameter What Goes Here }
  481. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  482. { Value Control feature flags }
  483. { User Pane proc IDs }
  484. {$endc} {not TARGET_CPU_64}
  485. const
  486. kControlUserPaneProc = 256;
  487. { Control Kind Tag }
  488. const
  489. kControlKindUserPane = FourCharCode('upan');
  490. { The HIObject class ID for the HIUserPane class. Valid in Mac OS X 10.4 and later. }
  491. {$ifc USE_CFSTR_CONSTANT_MACROS}
  492. {$definec kHIUserPaneClassID CFSTRP('com.apple.HIUserPane')}
  493. {$endc}
  494. { Creation API: Carbon only }
  495. {$ifc not TARGET_CPU_64}
  496. {
  497. * CreateUserPaneControl()
  498. *
  499. * Mac OS X threading:
  500. * Not thread safe
  501. *
  502. * Availability:
  503. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  504. * CarbonLib: in CarbonLib 1.1 and later
  505. * Non-Carbon CFM: not available
  506. }
  507. function CreateUserPaneControl( window: WindowRef; const (*var*) boundsRect: Rect; features: UInt32; var outControl: ControlRef ): OSStatus; external name '_CreateUserPaneControl';
  508. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  509. { Tagged data supported by user panes }
  510. { Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. }
  511. {$endc} {not TARGET_CPU_64}
  512. const
  513. kControlUserItemDrawProcTag = FourCharCode('uidp'); { UserItemUPP}
  514. kControlUserPaneDrawProcTag = FourCharCode('draw'); { ControlUserPaneDrawUPP}
  515. kControlUserPaneHitTestProcTag = FourCharCode('hitt'); { ControlUserPaneHitTestUPP}
  516. kControlUserPaneTrackingProcTag = FourCharCode('trak'); { ControlUserPaneTrackingUPP}
  517. kControlUserPaneIdleProcTag = FourCharCode('idle'); { ControlUserPaneIdleUPP}
  518. kControlUserPaneKeyDownProcTag = FourCharCode('keyd'); { ControlUserPaneKeyDownUPP}
  519. kControlUserPaneActivateProcTag = FourCharCode('acti'); { ControlUserPaneActivateUPP}
  520. kControlUserPaneFocusProcTag = FourCharCode('foci'); { ControlUserPaneFocusUPP}
  521. kControlUserPaneBackgroundProcTag = FourCharCode('back'); { ControlUserPaneBackgroundUPP (32-bit only)}
  522. type
  523. ControlUserPaneDrawProcPtr = procedure( control: ControlRef; part: ControlPartCode );
  524. ControlUserPaneHitTestProcPtr = function( control: ControlRef; where: Point ): ControlPartCode;
  525. ControlUserPaneTrackingProcPtr = function( control: ControlRef; startPt: Point; actionProc: ControlActionUPP ): ControlPartCode;
  526. ControlUserPaneIdleProcPtr = procedure( control: ControlRef );
  527. ControlUserPaneKeyDownProcPtr = function( control: ControlRef; keyCode: SInt16; charCode: SInt16; modifiers: SInt16 ): ControlPartCode;
  528. ControlUserPaneActivateProcPtr = procedure( control: ControlRef; activating: Boolean );
  529. ControlUserPaneFocusProcPtr = function( control: ControlRef; action: ControlFocusPart ): ControlPartCode;
  530. ControlUserPaneDrawUPP = ControlUserPaneDrawProcPtr;
  531. ControlUserPaneHitTestUPP = ControlUserPaneHitTestProcPtr;
  532. ControlUserPaneTrackingUPP = ControlUserPaneTrackingProcPtr;
  533. ControlUserPaneIdleUPP = ControlUserPaneIdleProcPtr;
  534. ControlUserPaneKeyDownUPP = ControlUserPaneKeyDownProcPtr;
  535. ControlUserPaneActivateUPP = ControlUserPaneActivateProcPtr;
  536. ControlUserPaneFocusUPP = ControlUserPaneFocusProcPtr;
  537. {
  538. * NewControlUserPaneDrawUPP()
  539. *
  540. * Availability:
  541. * Mac OS X: in version 10.0 and later in Carbon.framework
  542. * CarbonLib: in CarbonLib 1.0 and later
  543. * Non-Carbon CFM: available as macro/inline
  544. }
  545. function NewControlUserPaneDrawUPP( userRoutine: ControlUserPaneDrawProcPtr ): ControlUserPaneDrawUPP; external name '_NewControlUserPaneDrawUPP';
  546. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  547. {
  548. * NewControlUserPaneHitTestUPP()
  549. *
  550. * Availability:
  551. * Mac OS X: in version 10.0 and later in Carbon.framework
  552. * CarbonLib: in CarbonLib 1.0 and later
  553. * Non-Carbon CFM: available as macro/inline
  554. }
  555. function NewControlUserPaneHitTestUPP( userRoutine: ControlUserPaneHitTestProcPtr ): ControlUserPaneHitTestUPP; external name '_NewControlUserPaneHitTestUPP';
  556. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  557. {
  558. * NewControlUserPaneTrackingUPP()
  559. *
  560. * Availability:
  561. * Mac OS X: in version 10.0 and later in Carbon.framework
  562. * CarbonLib: in CarbonLib 1.0 and later
  563. * Non-Carbon CFM: available as macro/inline
  564. }
  565. function NewControlUserPaneTrackingUPP( userRoutine: ControlUserPaneTrackingProcPtr ): ControlUserPaneTrackingUPP; external name '_NewControlUserPaneTrackingUPP';
  566. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  567. {
  568. * NewControlUserPaneIdleUPP()
  569. *
  570. * Availability:
  571. * Mac OS X: in version 10.0 and later in Carbon.framework
  572. * CarbonLib: in CarbonLib 1.0 and later
  573. * Non-Carbon CFM: available as macro/inline
  574. }
  575. function NewControlUserPaneIdleUPP( userRoutine: ControlUserPaneIdleProcPtr ): ControlUserPaneIdleUPP; external name '_NewControlUserPaneIdleUPP';
  576. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  577. {
  578. * NewControlUserPaneKeyDownUPP()
  579. *
  580. * Availability:
  581. * Mac OS X: in version 10.0 and later in Carbon.framework
  582. * CarbonLib: in CarbonLib 1.0 and later
  583. * Non-Carbon CFM: available as macro/inline
  584. }
  585. function NewControlUserPaneKeyDownUPP( userRoutine: ControlUserPaneKeyDownProcPtr ): ControlUserPaneKeyDownUPP; external name '_NewControlUserPaneKeyDownUPP';
  586. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  587. {
  588. * NewControlUserPaneActivateUPP()
  589. *
  590. * Availability:
  591. * Mac OS X: in version 10.0 and later in Carbon.framework
  592. * CarbonLib: in CarbonLib 1.0 and later
  593. * Non-Carbon CFM: available as macro/inline
  594. }
  595. function NewControlUserPaneActivateUPP( userRoutine: ControlUserPaneActivateProcPtr ): ControlUserPaneActivateUPP; external name '_NewControlUserPaneActivateUPP';
  596. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  597. {
  598. * NewControlUserPaneFocusUPP()
  599. *
  600. * Availability:
  601. * Mac OS X: in version 10.0 and later in Carbon.framework
  602. * CarbonLib: in CarbonLib 1.0 and later
  603. * Non-Carbon CFM: available as macro/inline
  604. }
  605. function NewControlUserPaneFocusUPP( userRoutine: ControlUserPaneFocusProcPtr ): ControlUserPaneFocusUPP; external name '_NewControlUserPaneFocusUPP';
  606. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  607. {
  608. * DisposeControlUserPaneDrawUPP()
  609. *
  610. * Availability:
  611. * Mac OS X: in version 10.0 and later in Carbon.framework
  612. * CarbonLib: in CarbonLib 1.0 and later
  613. * Non-Carbon CFM: available as macro/inline
  614. }
  615. procedure DisposeControlUserPaneDrawUPP( userUPP: ControlUserPaneDrawUPP ); external name '_DisposeControlUserPaneDrawUPP';
  616. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  617. {
  618. * DisposeControlUserPaneHitTestUPP()
  619. *
  620. * Availability:
  621. * Mac OS X: in version 10.0 and later in Carbon.framework
  622. * CarbonLib: in CarbonLib 1.0 and later
  623. * Non-Carbon CFM: available as macro/inline
  624. }
  625. procedure DisposeControlUserPaneHitTestUPP( userUPP: ControlUserPaneHitTestUPP ); external name '_DisposeControlUserPaneHitTestUPP';
  626. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  627. {
  628. * DisposeControlUserPaneTrackingUPP()
  629. *
  630. * Availability:
  631. * Mac OS X: in version 10.0 and later in Carbon.framework
  632. * CarbonLib: in CarbonLib 1.0 and later
  633. * Non-Carbon CFM: available as macro/inline
  634. }
  635. procedure DisposeControlUserPaneTrackingUPP( userUPP: ControlUserPaneTrackingUPP ); external name '_DisposeControlUserPaneTrackingUPP';
  636. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  637. {
  638. * DisposeControlUserPaneIdleUPP()
  639. *
  640. * Availability:
  641. * Mac OS X: in version 10.0 and later in Carbon.framework
  642. * CarbonLib: in CarbonLib 1.0 and later
  643. * Non-Carbon CFM: available as macro/inline
  644. }
  645. procedure DisposeControlUserPaneIdleUPP( userUPP: ControlUserPaneIdleUPP ); external name '_DisposeControlUserPaneIdleUPP';
  646. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  647. {
  648. * DisposeControlUserPaneKeyDownUPP()
  649. *
  650. * Availability:
  651. * Mac OS X: in version 10.0 and later in Carbon.framework
  652. * CarbonLib: in CarbonLib 1.0 and later
  653. * Non-Carbon CFM: available as macro/inline
  654. }
  655. procedure DisposeControlUserPaneKeyDownUPP( userUPP: ControlUserPaneKeyDownUPP ); external name '_DisposeControlUserPaneKeyDownUPP';
  656. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  657. {
  658. * DisposeControlUserPaneActivateUPP()
  659. *
  660. * Availability:
  661. * Mac OS X: in version 10.0 and later in Carbon.framework
  662. * CarbonLib: in CarbonLib 1.0 and later
  663. * Non-Carbon CFM: available as macro/inline
  664. }
  665. procedure DisposeControlUserPaneActivateUPP( userUPP: ControlUserPaneActivateUPP ); external name '_DisposeControlUserPaneActivateUPP';
  666. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  667. {
  668. * DisposeControlUserPaneFocusUPP()
  669. *
  670. * Availability:
  671. * Mac OS X: in version 10.0 and later in Carbon.framework
  672. * CarbonLib: in CarbonLib 1.0 and later
  673. * Non-Carbon CFM: available as macro/inline
  674. }
  675. procedure DisposeControlUserPaneFocusUPP( userUPP: ControlUserPaneFocusUPP ); external name '_DisposeControlUserPaneFocusUPP';
  676. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  677. {
  678. * InvokeControlUserPaneDrawUPP()
  679. *
  680. * Availability:
  681. * Mac OS X: in version 10.0 and later in Carbon.framework
  682. * CarbonLib: in CarbonLib 1.0 and later
  683. * Non-Carbon CFM: available as macro/inline
  684. }
  685. procedure InvokeControlUserPaneDrawUPP( control: ControlRef; part: ControlPartCode; userUPP: ControlUserPaneDrawUPP ); external name '_InvokeControlUserPaneDrawUPP';
  686. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  687. {
  688. * InvokeControlUserPaneHitTestUPP()
  689. *
  690. * Availability:
  691. * Mac OS X: in version 10.0 and later in Carbon.framework
  692. * CarbonLib: in CarbonLib 1.0 and later
  693. * Non-Carbon CFM: available as macro/inline
  694. }
  695. function InvokeControlUserPaneHitTestUPP( control: ControlRef; where: Point; userUPP: ControlUserPaneHitTestUPP ): ControlPartCode; external name '_InvokeControlUserPaneHitTestUPP';
  696. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  697. {
  698. * InvokeControlUserPaneTrackingUPP()
  699. *
  700. * Availability:
  701. * Mac OS X: in version 10.0 and later in Carbon.framework
  702. * CarbonLib: in CarbonLib 1.0 and later
  703. * Non-Carbon CFM: available as macro/inline
  704. }
  705. function InvokeControlUserPaneTrackingUPP( control: ControlRef; startPt: Point; actionProc: ControlActionUPP; userUPP: ControlUserPaneTrackingUPP ): ControlPartCode; external name '_InvokeControlUserPaneTrackingUPP';
  706. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  707. {
  708. * InvokeControlUserPaneIdleUPP()
  709. *
  710. * Availability:
  711. * Mac OS X: in version 10.0 and later in Carbon.framework
  712. * CarbonLib: in CarbonLib 1.0 and later
  713. * Non-Carbon CFM: available as macro/inline
  714. }
  715. procedure InvokeControlUserPaneIdleUPP( control: ControlRef; userUPP: ControlUserPaneIdleUPP ); external name '_InvokeControlUserPaneIdleUPP';
  716. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  717. {
  718. * InvokeControlUserPaneKeyDownUPP()
  719. *
  720. * Availability:
  721. * Mac OS X: in version 10.0 and later in Carbon.framework
  722. * CarbonLib: in CarbonLib 1.0 and later
  723. * Non-Carbon CFM: available as macro/inline
  724. }
  725. function InvokeControlUserPaneKeyDownUPP( control: ControlRef; keyCode: SInt16; charCode: SInt16; modifiers: SInt16; userUPP: ControlUserPaneKeyDownUPP ): ControlPartCode; external name '_InvokeControlUserPaneKeyDownUPP';
  726. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  727. {
  728. * InvokeControlUserPaneActivateUPP()
  729. *
  730. * Availability:
  731. * Mac OS X: in version 10.0 and later in Carbon.framework
  732. * CarbonLib: in CarbonLib 1.0 and later
  733. * Non-Carbon CFM: available as macro/inline
  734. }
  735. procedure InvokeControlUserPaneActivateUPP( control: ControlRef; activating: Boolean; userUPP: ControlUserPaneActivateUPP ); external name '_InvokeControlUserPaneActivateUPP';
  736. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  737. {
  738. * InvokeControlUserPaneFocusUPP()
  739. *
  740. * Availability:
  741. * Mac OS X: in version 10.0 and later in Carbon.framework
  742. * CarbonLib: in CarbonLib 1.0 and later
  743. * Non-Carbon CFM: available as macro/inline
  744. }
  745. function InvokeControlUserPaneFocusUPP( control: ControlRef; action: ControlFocusPart; userUPP: ControlUserPaneFocusUPP ): ControlPartCode; external name '_InvokeControlUserPaneFocusUPP';
  746. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  747. {$ifc not TARGET_CPU_64}
  748. type
  749. ControlUserPaneBackgroundProcPtr = procedure( control: ControlRef; info: ControlBackgroundPtr );
  750. ControlUserPaneBackgroundUPP = ControlUserPaneBackgroundProcPtr;
  751. {
  752. * NewControlUserPaneBackgroundUPP()
  753. *
  754. * Availability:
  755. * Mac OS X: in version 10.0 and later in Carbon.framework
  756. * CarbonLib: in CarbonLib 1.0 and later
  757. * Non-Carbon CFM: available as macro/inline
  758. }
  759. function NewControlUserPaneBackgroundUPP( userRoutine: ControlUserPaneBackgroundProcPtr ): ControlUserPaneBackgroundUPP; external name '_NewControlUserPaneBackgroundUPP';
  760. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  761. {
  762. * DisposeControlUserPaneBackgroundUPP()
  763. *
  764. * Availability:
  765. * Mac OS X: in version 10.0 and later in Carbon.framework
  766. * CarbonLib: in CarbonLib 1.0 and later
  767. * Non-Carbon CFM: available as macro/inline
  768. }
  769. procedure DisposeControlUserPaneBackgroundUPP( userUPP: ControlUserPaneBackgroundUPP ); external name '_DisposeControlUserPaneBackgroundUPP';
  770. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  771. {
  772. * InvokeControlUserPaneBackgroundUPP()
  773. *
  774. * Availability:
  775. * Mac OS X: in version 10.0 and later in Carbon.framework
  776. * CarbonLib: in CarbonLib 1.0 and later
  777. * Non-Carbon CFM: available as macro/inline
  778. }
  779. procedure InvokeControlUserPaneBackgroundUPP( control: ControlRef; info: ControlBackgroundPtr; userUPP: ControlUserPaneBackgroundUPP ); external name '_InvokeControlUserPaneBackgroundUPP';
  780. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  781. {$endc} {not TARGET_CPU_64}
  782. {$endc} {TARGET_OS_MAC}
  783. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  784. end.
  785. {$endc} {not MACOSALLINCLUDE}