PageRenderTime 122ms CodeModel.GetById 99ms app.highlight 8ms RepoModel.GetById 0ms app.codeStats 1ms

/packages/univint/src/HIAccessibility.pas

https://github.com/slibre/freepascal
Pascal | 1071 lines | 34 code | 48 blank | 989 comment | 0 complexity | 206aa7f359c1cf9ca007d0b4a58633c3 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
   1{
   2     File:       HIToolbox/HIAccessibility.h
   3 
   4     Contains:   Accessibility Carbon events and API for HIToolbox
   5 
   6     Version:    HIToolbox-624~3
   7 
   8     Copyright:  � 2005-2008 by Apple Computer, Inc., all rights reserved.
   9 
  10     Bugs?:      For bug reports, consult the following page on
  11                 the World Wide Web:
  12 
  13                     http://www.freepascal.org/bugs.html
  14 
  15}
  16{       Pascal Translation:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
  17{       Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
  18{
  19    Modified for use with Free Pascal
  20    Version 308
  21    Please report any bugs to <gpc@microbizz.nl>
  22}
  23
  24{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  25{$mode macpas}
  26{$packenum 1}
  27{$macro on}
  28{$inline on}
  29{$calling mwpascal}
  30
  31unit HIAccessibility;
  32interface
  33{$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  34{$setc GAP_INTERFACES_VERSION := $0308}
  35
  36{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  37    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  38{$endc}
  39
  40{$ifc defined CPUPOWERPC and defined CPUI386}
  41	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  42{$endc}
  43{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  44	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  45{$endc}
  46
  47{$ifc not defined __ppc__ and defined CPUPOWERPC32}
  48	{$setc __ppc__ := 1}
  49{$elsec}
  50	{$setc __ppc__ := 0}
  51{$endc}
  52{$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  53	{$setc __ppc64__ := 1}
  54{$elsec}
  55	{$setc __ppc64__ := 0}
  56{$endc}
  57{$ifc not defined __i386__ and defined CPUI386}
  58	{$setc __i386__ := 1}
  59{$elsec}
  60	{$setc __i386__ := 0}
  61{$endc}
  62{$ifc not defined __x86_64__ and defined CPUX86_64}
  63	{$setc __x86_64__ := 1}
  64{$elsec}
  65	{$setc __x86_64__ := 0}
  66{$endc}
  67{$ifc not defined __arm__ and defined CPUARM}
  68	{$setc __arm__ := 1}
  69{$elsec}
  70	{$setc __arm__ := 0}
  71{$endc}
  72
  73{$ifc defined cpu64}
  74  {$setc __LP64__ := 1}
  75{$elsec}
  76  {$setc __LP64__ := 0}
  77{$endc}
  78
  79
  80{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  81	{$error Conflicting definitions for __ppc__ and __i386__}
  82{$endc}
  83
  84{$ifc defined __ppc__ and __ppc__}
  85	{$setc TARGET_CPU_PPC := TRUE}
  86	{$setc TARGET_CPU_PPC64 := FALSE}
  87	{$setc TARGET_CPU_X86 := FALSE}
  88	{$setc TARGET_CPU_X86_64 := FALSE}
  89	{$setc TARGET_CPU_ARM := FALSE}
  90	{$setc TARGET_OS_MAC := TRUE}
  91	{$setc TARGET_OS_IPHONE := FALSE}
  92	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
  93	{$setc TARGET_OS_EMBEDDED := FALSE}
  94{$elifc defined __ppc64__ and __ppc64__}
  95	{$setc TARGET_CPU_PPC := FALSE}
  96	{$setc TARGET_CPU_PPC64 := TRUE}
  97	{$setc TARGET_CPU_X86 := FALSE}
  98	{$setc TARGET_CPU_X86_64 := FALSE}
  99	{$setc TARGET_CPU_ARM := FALSE}
 100	{$setc TARGET_OS_MAC := TRUE}
 101	{$setc TARGET_OS_IPHONE := FALSE}
 102	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 103	{$setc TARGET_OS_EMBEDDED := FALSE}
 104{$elifc defined __i386__ and __i386__}
 105	{$setc TARGET_CPU_PPC := FALSE}
 106	{$setc TARGET_CPU_PPC64 := FALSE}
 107	{$setc TARGET_CPU_X86 := TRUE}
 108	{$setc TARGET_CPU_X86_64 := FALSE}
 109	{$setc TARGET_CPU_ARM := FALSE}
 110{$ifc defined(iphonesim)}
 111 	{$setc TARGET_OS_MAC := FALSE}
 112	{$setc TARGET_OS_IPHONE := TRUE}
 113	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
 114{$elsec}
 115	{$setc TARGET_OS_MAC := TRUE}
 116	{$setc TARGET_OS_IPHONE := FALSE}
 117	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 118{$endc}
 119	{$setc TARGET_OS_EMBEDDED := FALSE}
 120{$elifc defined __x86_64__ and __x86_64__}
 121	{$setc TARGET_CPU_PPC := FALSE}
 122	{$setc TARGET_CPU_PPC64 := FALSE}
 123	{$setc TARGET_CPU_X86 := FALSE}
 124	{$setc TARGET_CPU_X86_64 := TRUE}
 125	{$setc TARGET_CPU_ARM := FALSE}
 126	{$setc TARGET_OS_MAC := TRUE}
 127	{$setc TARGET_OS_IPHONE := FALSE}
 128	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 129	{$setc TARGET_OS_EMBEDDED := FALSE}
 130{$elifc defined __arm__ and __arm__}
 131	{$setc TARGET_CPU_PPC := FALSE}
 132	{$setc TARGET_CPU_PPC64 := FALSE}
 133	{$setc TARGET_CPU_X86 := FALSE}
 134	{$setc TARGET_CPU_X86_64 := FALSE}
 135	{$setc TARGET_CPU_ARM := TRUE}
 136	{ will require compiler define when/if other Apple devices with ARM cpus ship }
 137	{$setc TARGET_OS_MAC := FALSE}
 138	{$setc TARGET_OS_IPHONE := TRUE}
 139	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 140	{$setc TARGET_OS_EMBEDDED := TRUE}
 141{$elsec}
 142	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
 143{$endc}
 144
 145{$ifc defined __LP64__ and __LP64__ }
 146  {$setc TARGET_CPU_64 := TRUE}
 147{$elsec}
 148  {$setc TARGET_CPU_64 := FALSE}
 149{$endc}
 150
 151{$ifc defined FPC_BIG_ENDIAN}
 152	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
 153	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 154{$elifc defined FPC_LITTLE_ENDIAN}
 155	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
 156	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 157{$elsec}
 158	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 159{$endc}
 160{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 161{$setc CALL_NOT_IN_CARBON := FALSE}
 162{$setc OLDROUTINENAMES := FALSE}
 163{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 164{$setc OPAQUE_UPP_TYPES := TRUE}
 165{$setc OTCARBONAPPLICATION := TRUE}
 166{$setc OTKERNEL := FALSE}
 167{$setc PM_USE_SESSION_APIS := TRUE}
 168{$setc TARGET_API_MAC_CARBON := TRUE}
 169{$setc TARGET_API_MAC_OS8 := FALSE}
 170{$setc TARGET_API_MAC_OSX := TRUE}
 171{$setc TARGET_CARBON := TRUE}
 172{$setc TARGET_CPU_68K := FALSE}
 173{$setc TARGET_CPU_MIPS := FALSE}
 174{$setc TARGET_CPU_SPARC := FALSE}
 175{$setc TARGET_OS_UNIX := FALSE}
 176{$setc TARGET_OS_WIN32 := FALSE}
 177{$setc TARGET_RT_MAC_68881 := FALSE}
 178{$setc TARGET_RT_MAC_CFM := FALSE}
 179{$setc TARGET_RT_MAC_MACHO := TRUE}
 180{$setc TYPED_FUNCTION_POINTERS := TRUE}
 181{$setc TYPE_BOOL := FALSE}
 182{$setc TYPE_EXTENDED := FALSE}
 183{$setc TYPE_LONGLONG := TRUE}
 184uses MacTypes,CFBase,CarbonEvents,Events,Menus,Controls,MacWindows,HIObject,AXUIElement;
 185{$endc} {not MACOSALLINCLUDE}
 186
 187
 188{$ifc TARGET_OS_MAC}
 189
 190{$ALIGN POWER}
 191
 192
 193{--------------------------------------------------------------------------------------}
 194{  Accessibility Events                                                                }
 195{--------------------------------------------------------------------------------------}
 196{
 197    kEventClassAccessibility quick reference:
 198    
 199    kEventAccessibleGetChildAtPoint                     =   1,
 200    kEventAccessibleGetFocusedChild                     =   2,
 201    
 202    kEventAccessibleGetAllAttributeNames                =   21,
 203    kEventAccessibleGetAllParameterizedAttributeNames   =   25,
 204    kEventAccessibleGetNamedAttribute                   =   22,
 205    kEventAccessibleSetNamedAttribute                   =   23,
 206    kEventAccessibleIsNamedAttributeSettable            =   24,
 207    
 208    kEventAccessibleGetAllActionNames                   =   41,
 209    kEventAccessiblePerformNamedAction                  =   42,
 210    kEventAccessibleGetNamedActionDescription           =   44
 211}
 212{
 213 *  kEventClassAccessibility / kEventAccessibleGetChildAtPoint
 214 *  
 215 *  Summary:
 216 *    Finds the child of an accessible object at a given point.
 217 *  
 218 *  Discussion:
 219 *    The kEventParamMouseLocation parameter will contain a global
 220 *    point. Your handler for this event should find the child of
 221 *    yourself which is underneath that point and return it in the
 222 *    kEventParamAccessibleChild parameter.
 223 *  
 224 *  Mac OS X threading:
 225 *    Not thread safe
 226 *  
 227 *  Parameters:
 228 *    
 229 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 230 *          The accessible object, in the form of an AXUIElementRef.
 231 *    
 232 *    --> kEventParamMouseLocation (in, typeHIPoint)
 233 *          The location in global coordinates.
 234 *    
 235 *    <-- kEventParamAccessibleChild (out, typeCFTypeRef)
 236 *          On exit, contains the child of the accessible object at the
 237 *          specified point, in the form of an AXUIElementRef. If there
 238 *          is no child at the given point, you should still return
 239 *          noErr, but leave the parameter empty (do not call
 240 *          SetEventParameter). Only return immediate children; do not
 241 *          return grandchildren of yourself.
 242 *  
 243 *  Availability:
 244 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 245 *    CarbonLib:        not available
 246 }
 247const
 248	kEventAccessibleGetChildAtPoint = 1;
 249
 250{
 251 *  kEventClassAccessibility / kEventAccessibleGetFocusedChild
 252 *  
 253 *  Summary:
 254 *    Finds the focused child of an accessible object.
 255 *  
 256 *  Discussion:
 257 *    Your handler for this event should find the child of itself which
 258 *    is part of the focus chain and return it in the
 259 *    kEventParamAccessibleChild parameter.
 260 *  
 261 *  Mac OS X threading:
 262 *    Not thread safe
 263 *  
 264 *  Parameters:
 265 *    
 266 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 267 *          The accessible object, in the form of an AXUIElementRef.
 268 *    
 269 *    <-- kEventParamAccessibleChild (out, typeCFTypeRef)
 270 *          On exit, contains the focused child of the accessible
 271 *          object, in the form of an AXUIElementRef. If there is no
 272 *          child in the focus chain, you should still return noErr,
 273 *          but leave the parameter empty (do not call
 274 *          SetEventParameter). Only return immediate children; do not
 275 *          return grandchildren of yourself.
 276 *  
 277 *  Availability:
 278 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 279 *    CarbonLib:        not available
 280 }
 281const
 282	kEventAccessibleGetFocusedChild = 2;
 283
 284{
 285 *  kEventClassAccessibility / kEventAccessibleGetAllAttributeNames
 286 *  
 287 *  Summary:
 288 *    Returns the attributes supported by an accessible object. You
 289 *    must only return the names of your regular (non-parameterized)
 290 *    attributes via this event. If you support parameterized
 291 *    attributes, you must return them via the new
 292 *    kEventAccessibleGetAllParameterizedAttributeNames event.
 293 *  
 294 *  Mac OS X threading:
 295 *    Not thread safe
 296 *  
 297 *  Parameters:
 298 *    
 299 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 300 *          The accessible object, in the form of an AXUIElementRef.
 301 *    
 302 *    <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
 303 *          Add each of the regular (non-parameterized) attribute names
 304 *          supported by the accessible object to this array, as
 305 *          CFStringRefs.
 306 *  
 307 *  Availability:
 308 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 309 *    CarbonLib:        not available
 310 }
 311const
 312	kEventAccessibleGetAllAttributeNames = 21;
 313
 314{
 315 *  kEventClassAccessibility / kEventAccessibleGetAllParameterizedAttributeNames
 316 *  
 317 *  Summary:
 318 *    Returns the parameterized attributes supported by an accessible
 319 *    object. You must not return the names of your regular
 320 *    (non-parameterized) attributes via this event. If you support
 321 *    regular attributes, you must return them via the original
 322 *    kEventAccessibleGetAllAttributeNames event. Parameterized
 323 *    attributes are introduced in Mac OS X 10.3.
 324 *  
 325 *  Mac OS X threading:
 326 *    Not thread safe
 327 *  
 328 *  Parameters:
 329 *    
 330 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 331 *          The accessible object, in the form of an AXUIElementRef.
 332 *    
 333 *    <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
 334 *          Add each of the parameterized attribute names supported by
 335 *          the accessible object to this array, as CFStringRefs.
 336 *  
 337 *  Availability:
 338 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 339 *    CarbonLib:        not available
 340 }
 341const
 342	kEventAccessibleGetAllParameterizedAttributeNames = 25;
 343
 344{
 345 *  kEventClassAccessibility / kEventAccessibleGetNamedAttribute
 346 *  
 347 *  Summary:
 348 *    Returns the value of an attribute of an accessible object.
 349 *  
 350 *  Discussion:
 351 *    The kEventParamAccessibleAttributeName parameter will contain an
 352 *    attribute name in the form of a CFStringRef. If you support the
 353 *    named attribute, return the attribute�s value in the
 354 *    kEventParamAccessibleAttributeValue parameter.
 355 *  
 356 *  Mac OS X threading:
 357 *    Not thread safe
 358 *  
 359 *  Parameters:
 360 *    
 361 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 362 *          The accessible object, in the form of an AXUIElementRef.
 363 *    
 364 *    --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
 365 *          The name of the requested attribute.
 366 *    
 367 *    --> kEventParamAccessibleAttributeParameter (in, typeCFTypeRef)
 368 *          This parameter is optional and will only exist if your
 369 *          accessible object is being asked for the value of a
 370 *          parameterized attribute. When present, this event parameter
 371 *          will contain a CFTypeRef describing the parameters of the
 372 *          request. Parameterized attributes are introduced in Mac OS
 373 *          X 10.3.
 374 *    
 375 *    <-- kEventParamAccessibleAttributeValue (out, typeCFTypeRef)
 376 *          On exit, contains the attribute's value. The type of this
 377 *          parameter varies according to the attribute; it might
 378 *          typically be typeCFStringRef (for a textual attribute),
 379 *          typeBoolean (for a boolean attribute), or typeSInt32 (for
 380 *          an integer-valued attribute).
 381 *  
 382 *  Availability:
 383 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 384 *    CarbonLib:        not available
 385 }
 386const
 387	kEventAccessibleGetNamedAttribute = 22;
 388
 389{
 390 *  kEventClassAccessibility / kEventAccessibleSetNamedAttribute
 391 *  
 392 *  Summary:
 393 *    Sets the value of an attribute of an accessible object.
 394 *  
 395 *  Discussion:
 396 *    The kEventParamAccessibleAttributeName parameter will contain an
 397 *    attribute name in the form of a CFStringRef. The
 398 *    kEventParamAccessibleAttributeValue parameter will contain data
 399 *    in an arbitrary format. If you support the named attribute, set
 400 *    the named attribute�s value to the data provided in the event.
 401 *  
 402 *  Mac OS X threading:
 403 *    Not thread safe
 404 *  
 405 *  Parameters:
 406 *    
 407 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 408 *          The accessible object, in the form of an AXUIElementRef.
 409 *    
 410 *    --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
 411 *          The name of the requested attribute.
 412 *    
 413 *    --> kEventParamAccessibleAttributeValue (in, typeCFTypeRef)
 414 *          The new value of the attribute. The type of this parameter
 415 *          varies according to the attribute; it might typically be
 416 *          typeCFStringRef (for a textual attribute), typeBoolean (for
 417 *          a boolean attribute), or typeSInt32 (for an integer-valued
 418 *          attribute).
 419 *  
 420 *  Availability:
 421 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 422 *    CarbonLib:        not available
 423 }
 424const
 425	kEventAccessibleSetNamedAttribute = 23;
 426
 427{
 428 *  kEventClassAccessibility / kEventAccessibleIsNamedAttributeSettable
 429 *  
 430 *  Summary:
 431 *    Determines whether an attribute of an accessible object can be
 432 *    modified.
 433 *  
 434 *  Discussion:
 435 *    The kEventParamAccessibleAttributeName parameter will contain an
 436 *    attribute name in the form of a CFStringRef. If you support the
 437 *    named attribute, set the kEventParamAccessibleAttributeSettable
 438 *    parameter to a Boolean indicating whether the named attribute can
 439 *    have its value changed via the kEventAccessibleSetNamedAttribute
 440 *    event.
 441 *  
 442 *  Mac OS X threading:
 443 *    Not thread safe
 444 *  
 445 *  Parameters:
 446 *    
 447 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 448 *          The accessible object, in the form of an AXUIElementRef.
 449 *    
 450 *    --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
 451 *          The name of the requested attribute.
 452 *    
 453 *    <-- kEventParamAccessibleAttributeSettable (out, typeBoolean)
 454 *          On exit, indicates whether the attribute may be modified.
 455 *  
 456 *  Availability:
 457 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 458 *    CarbonLib:        not available
 459 }
 460const
 461	kEventAccessibleIsNamedAttributeSettable = 24;
 462
 463{
 464 *  kEventClassAccessibility / kEventAccessibleGetAllActionNames
 465 *  
 466 *  Summary:
 467 *    Returns the actions supported by an accessible object.
 468 *  
 469 *  Discussion:
 470 *    The kEventParamAccessibleActionNames parameter will contain a
 471 *    CFMutableArrayRef. Add each of the action names you support to
 472 *    this array in the form of a CFStringRef.
 473 *  
 474 *  Mac OS X threading:
 475 *    Not thread safe
 476 *  
 477 *  Parameters:
 478 *    
 479 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 480 *          The accessible object, in the form of an AXUIElementRef.
 481 *    
 482 *    <-> kEventParamAccessibleActionNames (in/out, typeCFMutableArrayRef)
 483 *          Add each of the actions supported by the accessible object
 484 *          to this array, as CFStringRefs.
 485 *  
 486 *  Availability:
 487 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 488 *    CarbonLib:        not available
 489 }
 490const
 491	kEventAccessibleGetAllActionNames = 41;
 492
 493{
 494 *  kEventClassAccessibility / kEventAccessiblePerformNamedAction
 495 *  
 496 *  Summary:
 497 *    Requests that a specific action be performed by an accessible
 498 *    object.
 499 *  
 500 *  Discussion:
 501 *    The kEventParamAccessibleActionName parameter will contain an
 502 *    attribute name in the form of a CFStringRef. If you support the
 503 *    named action, perform the action. There are times, however, when
 504 *    performing an action causes an accessible object to call a
 505 *    routine which may not return immediately, such as StandardAlert
 506 *    or PopUpMenuSelect. You should only call such routines when you
 507 *    receive an action request that was queued; if you call such a
 508 *    routine when processing an event that was directly dispatched,
 509 *    you will probably cause the assistive app to receive a timeout
 510 *    error. On Mac OS X 10.3 and later, the
 511 *    kEventParamAccessibilityEventQueued parameter will indicate
 512 *    whether the event was queued. If so, process the request
 513 *    normally. If not, you can request that the event be posted to the
 514 *    queue and sent to you later by returning
 515 *    eventDeferAccessibilityEventErr from your handler. On Mac OS X
 516 *    10.2, the parameter will not exist, the event will always be
 517 *    directly dispatched, and there is no way to request that it be
 518 *    posted to the queue; in this case, you should perform the action
 519 *    even if it will cause the assistive app to receive a timeout
 520 *    error.
 521 *  
 522 *  Mac OS X threading:
 523 *    Not thread safe
 524 *  
 525 *  Parameters:
 526 *    
 527 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 528 *          The accessible object, in the form of an AXUIElementRef.
 529 *    
 530 *    --> kEventParamAccessibleActionName (in, typeCFStringRef)
 531 *          The name of the requested action.
 532 *    
 533 *    --> kEventParamAccessibilityEventQueued (in, typeBoolean)
 534 *          An indication of whether this event was delivered to you
 535 *          via the main event queue. This parameter only exists on Mac
 536 *          OS X 10.3 and later. See the discussion for more details.
 537 *  
 538 *  Availability:
 539 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 540 *    CarbonLib:        not available
 541 }
 542const
 543	kEventAccessiblePerformNamedAction = 42;
 544
 545{
 546 *  kEventClassAccessibility / kEventAccessibleGetNamedActionDescription
 547 *  
 548 *  Summary:
 549 *    Returns a human-language description of an action supported by an
 550 *    accessible object.
 551 *  
 552 *  Discussion:
 553 *    The kEventParamAccessibleActionName parameter will contain an
 554 *    attribute name in the form of a CFStringRef. The
 555 *    kEventParamAccessibleActionDescription parameter will contain a
 556 *    CFMutableStringRef. If you support the named action, alter the
 557 *    mutable string to contain a textual description of the action�s
 558 *    significance.
 559 *  
 560 *  Mac OS X threading:
 561 *    Not thread safe
 562 *  
 563 *  Parameters:
 564 *    
 565 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 566 *          The accessible object, in the form of an AXUIElementRef.
 567 *    
 568 *    --> kEventParamAccessibleActionName (in, typeCFStringRef)
 569 *          The name of the requested action.
 570 *    
 571 *    <-> kEventParamAccessibleActionDescription (in/out, typeCFMutableStringRef)
 572 *          If you support the action, extract this parameter from the
 573 *          event and set the contents of the mutable string to contain
 574 *          a description of the action. Do not set this event
 575 *          parameter to a CFStringRef of your own creation; you must
 576 *          modify the preexisting mutable string stored in the event
 577 *          parameter.
 578 *  
 579 *  Availability:
 580 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 581 *    CarbonLib:        not available
 582 }
 583const
 584	kEventAccessibleGetNamedActionDescription = 44;
 585
 586{$ifc not TARGET_CPU_64}
 587{
 588 *  AXUIElementCreateWithHIObjectAndIdentifier()
 589 *  
 590 *  Discussion:
 591 *    This routine creates an AXUIElementRef to represent an accessible
 592 *    object for a Carbon application. A Carbon accessible object is
 593 *    comprised of an HIObjectRef and a 64-bit identifier. The
 594 *    resulting AXUIElementRef is a CFTypeRef, and must be managed as
 595 *    such. You can create a new AXUIElementRef every time you need
 596 *    one. Even though the actual hex values of two AXUIElementRefs
 597 *    might be different, they may represent the same accessible
 598 *    object; because AXUIElementRefs are Core Foundation objects, you
 599 *    can use CFEqual to compare them.
 600 *  
 601 *  Mac OS X threading:
 602 *    Not thread safe
 603 *  
 604 *  Parameters:
 605 *    
 606 *    inHIObject:
 607 *      The HIObjectRef of the accessible object.
 608 *    
 609 *    inIdentifier:
 610 *      The 64-bit identifier of the accessible object.
 611 *  
 612 *  Result:
 613 *    An AXUIElementRef that represents the Carbon accessible object
 614 *    identified by the given HIObjectRef and 64-bit identifier. This
 615 *    follows CoreFoundation semantics in that it will return NULL for
 616 *    failure, and because it is a "Create" function you will need to
 617 *    CFRelease() this AXUIElementRef when it is no longer needed.
 618 *  
 619 *  Availability:
 620 *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
 621 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 622 *    Non-Carbon CFM:   not available
 623 }
 624function AXUIElementCreateWithHIObjectAndIdentifier( inHIObject: HIObjectRef; inIdentifier: UInt64 ): AXUIElementRef; external name '_AXUIElementCreateWithHIObjectAndIdentifier';
 625(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 626
 627
 628{
 629 *  AXUIElementGetHIObject()
 630 *  
 631 *  Discussion:
 632 *    If the incoming AXUIElementRef is a Carbon accessible object,
 633 *    this routine will return the HIObjectRef of the accessible object.
 634 *  
 635 *  Mac OS X threading:
 636 *    Not thread safe
 637 *  
 638 *  Parameters:
 639 *    
 640 *    inUIElement:
 641 *      The AXUIElementRef of whom you'd like to get the HIObjectRef.
 642 *  
 643 *  Result:
 644 *    The HIObjectRef of the AXUIElementRef. If the incoming
 645 *    AXUIElementRef is not a Carbon accessible object, this routine
 646 *    will return NULL.
 647 *  
 648 *  Availability:
 649 *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
 650 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 651 *    Non-Carbon CFM:   not available
 652 }
 653function AXUIElementGetHIObject( inUIElement: AXUIElementRef ): HIObjectRef; external name '_AXUIElementGetHIObject';
 654(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 655
 656
 657{
 658 *  AXUIElementGetIdentifier()
 659 *  
 660 *  Discussion:
 661 *    If the incoming AXUIElementRef is a Carbon accessible object,
 662 *    this routine will pass back the 64-bit identifier of the
 663 *    accessible object.
 664 *  
 665 *  Mac OS X threading:
 666 *    Not thread safe
 667 *  
 668 *  Parameters:
 669 *    
 670 *    inUIElement:
 671 *      The AXUIElementRef of whom you'd like to get the 64-bit
 672 *      identifier.
 673 *    
 674 *    outIdentifier:
 675 *      The 64-bit identifier of the AXUIElementRef. If the incoming
 676 *      AXUIElementRef is not a Carbon accessible object, this routine
 677 *      will pass back zero. Note that zero is often a legal value for
 678 *      Carbon accessible object, so do not assume that the accessible
 679 *      object is not a Carbon accessible object just because you get a
 680 *      result of zero.
 681 *  
 682 *  Availability:
 683 *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
 684 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 685 *    Non-Carbon CFM:   not available
 686 }
 687procedure AXUIElementGetIdentifier( inUIElement: AXUIElementRef; var outIdentifier: UInt64 ); external name '_AXUIElementGetIdentifier';
 688(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 689
 690
 691{
 692 *  AXNotificationHIObjectNotify()
 693 *  
 694 *  Discussion:
 695 *    Posts a notification for the given pseudo-AXUIElementRef. Though
 696 *    an actual AXUIElementRef is not actually passed in to this
 697 *    function, its component parts are. This saves the implementation
 698 *    the hassle of dismantling the AXUIElementRef into its component
 699 *    parts.
 700 *  
 701 *  Mac OS X threading:
 702 *    Not thread safe
 703 *  
 704 *  Parameters:
 705 *    
 706 *    inNotification:
 707 *      The notification name string.
 708 *    
 709 *    inHIObject:
 710 *      The HIObjectRef component of the AXUIElementRef to whom the
 711 *      notification applies.
 712 *    
 713 *    inIdentifier:
 714 *      The 64-bit identifier component of the AXUIElementRef to whom
 715 *      the notification applies.
 716 *  
 717 *  Availability:
 718 *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
 719 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 720 *    Non-Carbon CFM:   not available
 721 }
 722procedure AXNotificationHIObjectNotify( inNotification: CFStringRef; inHIObject: HIObjectRef; inIdentifier: UInt64 ); external name '_AXNotificationHIObjectNotify';
 723(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 724
 725
 726{
 727 *  HICopyAccessibilityRoleDescription()
 728 *  
 729 *  Summary:
 730 *    Returns the role description string for a standard role or a
 731 *    standard role-subrole pair.
 732 *  
 733 *  Discussion:
 734 *    This routine is useful if you are implementing an accessible
 735 *    object that has a standard role or role-subrole pair and you want
 736 *    to make sure your object provides the same role description
 737 *    string that the equivalent system-supplied object provides. In
 738 *    other words, if you are implementing an accessible object of role
 739 *    kAXButtonRole, you can use this routine to make sure it provides
 740 *    the same role description that the standard push button provides.
 741 *    
 742 *    This routine can provide role description strings for all roles
 743 *    and role-subrole pairs that are used in the standard/system
 744 *    accessible objects on Mac OS X 10.4 and later. Once this routine
 745 *    is able to provide a role description string for a role or
 746 *    role-subrole pair, it will continue to do so on subsequent system
 747 *    releases, even if the system no longer produces a standard
 748 *    accessible object with that role or role-subrole pair.
 749 *  
 750 *  Mac OS X threading:
 751 *    Not thread safe
 752 *  
 753 *  Parameters:
 754 *    
 755 *    inRole:
 756 *      The role CFStringRef for your accessible object. Callers
 757 *      typically pass one of the kAXFooRole constant strings from
 758 *      within the HIServices framework.
 759 *    
 760 *    inSubrole:
 761 *      The subrole CFStringRef for your accessible object. Callers
 762 *      typically pass one of the kAXFooSubrole constant strings from
 763 *      within the HIServices framework. Pass NULL if your accessible
 764 *      object does not have a subrole.
 765 *  
 766 *  Result:
 767 *    A CFStringRef with the standard role description for the role or
 768 *    role-subrole pair. You must release the role description when you
 769 *    are finished with it. If there is no standard role description
 770 *    for the role or role-subrole pair, this routine will return NULL.
 771 *    If you pass either an unknown role or an unknown subrole, this
 772 *    routine will return NULL.
 773 *  
 774 *  Availability:
 775 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 776 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 777 *    Non-Carbon CFM:   not available
 778 }
 779function HICopyAccessibilityRoleDescription( inRole: CFStringRef; inSubrole: CFStringRef { can be NULL } ): CFStringRef; external name '_HICopyAccessibilityRoleDescription';
 780(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 781
 782
 783{
 784 *  HICopyAccessibilityActionDescription()
 785 *  
 786 *  Summary:
 787 *    Returns the action description string for a standard
 788 *    accessibility action.
 789 *  
 790 *  Discussion:
 791 *    This routine is useful if you are implementing an accessible
 792 *    object that implements a standard action and you want to make
 793 *    sure your object provides the same role action string that the a
 794 *    system-supplied object provides. 
 795 *    This routine can provide action description strings for all
 796 *    actions that are used in the standard/system accessible objects
 797 *    on Mac OS X 10.4 and later. Once this routine is able to provide
 798 *    a description string for an action, it will continue to do so on
 799 *    subsequent system releases, even if the system no longer produces
 800 *    a standard accessible object that supports the action.
 801 *  
 802 *  Mac OS X threading:
 803 *    Not thread safe
 804 *  
 805 *  Parameters:
 806 *    
 807 *    inAction:
 808 *      The action CFStringRef for which you'd like to generate a
 809 *      description. Callers must pass one of the kAXFooAction constant
 810 *      strings from within the HIServices framework.
 811 *  
 812 *  Result:
 813 *    A CFStringRef with the standard description for the action. You
 814 *    must release the description when you are finished with it. If
 815 *    you pass an unsupported action to this routine, the behavior is
 816 *    undefined.
 817 *  
 818 *  Availability:
 819 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 820 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 821 *    Non-Carbon CFM:   not available
 822 }
 823function HICopyAccessibilityActionDescription( inAction: CFStringRef ): CFStringRef; external name '_HICopyAccessibilityActionDescription';
 824(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 825
 826
 827{
 828 *  HIObjectIsAccessibilityIgnored()
 829 *  
 830 *  Discussion:
 831 *    Reports whether or not the given HIObject is marked as ignored
 832 *    for accessibility. 
 833 *    
 834 *    See the discussion of HIObjectSetAccessibilityIgnored for details
 835 *    on what it means to be accessibility ignored.
 836 *  
 837 *  Mac OS X threading:
 838 *    Not thread safe
 839 *  
 840 *  Parameters:
 841 *    
 842 *    inObject:
 843 *      The object whose accessibility ignored state you wish to query.
 844 *  
 845 *  Result:
 846 *    A Boolean value indicating whether or not the HIObject is ignored
 847 *    for accessibility.
 848 *  
 849 *  Availability:
 850 *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
 851 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 852 *    Non-Carbon CFM:   not available
 853 }
 854function HIObjectIsAccessibilityIgnored( inObject: HIObjectRef ): Boolean; external name '_HIObjectIsAccessibilityIgnored';
 855(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 856
 857
 858{
 859 *  HIObjectSetAccessibilityIgnored()
 860 *  
 861 *  Discussion:
 862 *    Marks an HIObject as ignored (or not) for the purposes of the
 863 *    accessibility APIs. 
 864 *    
 865 *    An HIObject that is ignored for accessibility will never be shown
 866 *    to an assistive application that uses the accessibility APIs to
 867 *    examine an interface. Your application's accessibility
 868 *    implementation can (and should) still report an ignored HIObject
 869 *    as usual. Carbon's accessibility engine will automatically prune
 870 *    any ignored HIObjects out of the data that is shown to an
 871 *    assistive application. 
 872 *    <BR>By default, an HIObject is *not* accessibility ignored.
 873 *  
 874 *  Mac OS X threading:
 875 *    Not thread safe
 876 *  
 877 *  Parameters:
 878 *    
 879 *    inObject:
 880 *      The object whose accessibility ignored state you wish to change.
 881 *    
 882 *    inIgnored:
 883 *      A Boolean value indicating whether or not to ignore the object.
 884 *  
 885 *  Result:
 886 *    An OSStatus signifying success or failure.
 887 *  
 888 *  Availability:
 889 *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
 890 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 891 *    Non-Carbon CFM:   not available
 892 }
 893function HIObjectSetAccessibilityIgnored( inObject: HIObjectRef; inIgnored: Boolean ): OSStatus; external name '_HIObjectSetAccessibilityIgnored';
 894(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 895
 896
 897{
 898 *  HIObjectSetAuxiliaryAccessibilityAttribute()
 899 *  
 900 *  Summary:
 901 *    Associates an additional accessibility attribute with a UIElement
 902 *    that is used to represent a given HIObject or a part thereof.
 903 *  
 904 *  Discussion:
 905 *    This routine lets your application provide the name of and data
 906 *    for an accessibility attribute that you want to add to the
 907 *    UIElement used to represent a given HIObject-identifier pair.
 908 *    Normally, accessibility attributes can only be supplied
 909 *    dynamically via Carbon Events, but this routine allows you to
 910 *    supply them statically. 
 911 *    
 912 *    When an accessibility attribute Carbon Event is handled by the
 913 *    HIObject with a given identifier, the toolbox automatically
 914 *    supplies the names and/or values of any auxiliary attributes
 915 *    associated with that HIObject- identifier pair. 
 916 *    
 917 *    This routine is particularly useful for supplying values for the
 918 *    kAXDescriptionAttribute, kAXTitleUIElementAttribute,
 919 *    kAXServesAsTitleUIElementAttribute, kAXLinkedUIElementsAttribute
 920 *    and other attributes whose value is specific to the layout and
 921 *    usage of your application. 
 922 *    
 923 *    This routine only allows you to associate attributes whose values
 924 *    never change. If you need to supply attributes whose values are
 925 *    determined dynamically or whose values are settable, you must
 926 *    install the normal accessibility Carbon Event handlers. 
 927 *    
 928 *    The auxiliary attribute store is consulted during the HIObject's
 929 *    default handling of the accessibility attribute Carbon Events.
 930 *    This means that any programmatic handling of a given
 931 *    accessibility attribute will have a chance to override or block
 932 *    the consultation of the store. The general rule is that if the
 933 *    toolbox or a Carbon Event handler can provide the attribute value
 934 *    some other way, the store will not be consulted.
 935 *  
 936 *  Mac OS X threading:
 937 *    Not thread safe
 938 *  
 939 *  Parameters:
 940 *    
 941 *    inHIObject:
 942 *      The HIObjectRef part of the object-identifier pair to which the
 943 *      attribute data is associated.
 944 *    
 945 *    inIdentifier:
 946 *      The 64-bit identifier part of the object-identifier pair to
 947 *      which the attribute data is associated. When you want to
 948 *      associate the attribute data to the HIObject as a whole -- such
 949 *      as when you want to give a description attribute to a push
 950 *      button -- you should pass zero in this parameter.
 951 *    
 952 *    inAttributeName:
 953 *      A CFStringRef of the name of the attribute you wish to
 954 *      associate with the object-identifier pair. This string will be
 955 *      retained before adding it to the auxiliary attribute store.
 956 *    
 957 *    inAttributeData:
 958 *      A CFTypeRef with the data to be supplied as the attribute's
 959 *      value. This data will be retained before adding it to the
 960 *      auxiliary attribute store; you may release inAttributeData
 961 *      after you have called this routine. The inAttributeData
 962 *      parameter may also be NULL, which indicates that the named
 963 *      auxiliary attribute should no longer be associated with the
 964 *      object-identifier pair; any named attribute data previously
 965 *      associated with the object-identifier pair will be released.
 966 *  
 967 *  Result:
 968 *    An OSStatus result code. The function will return noErr if it was
 969 *    able to associate the attribute data with the HIObjectRef. If the
 970 *    HIObjectRef is invalid, paramErr will be returned. Other results
 971 *    may be returned in other situations.
 972 *  
 973 *  Availability:
 974 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 975 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 976 *    Non-Carbon CFM:   not available
 977 }
 978function HIObjectSetAuxiliaryAccessibilityAttribute( inHIObject: HIObjectRef; inIdentifier: UInt64; inAttributeName: CFStringRef; inAttributeData: CFTypeRef { can be NULL } ): OSStatus; external name '_HIObjectSetAuxiliaryAccessibilityAttribute';
 979(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 980
 981
 982{
 983 *  HIObjectOverrideAccessibilityContainment()
 984 *  
 985 *  Summary:
 986 *    Allows you to override the AXUIElementRefs that an HIObject would
 987 *    normally supply as the values of its AXParent, AXWindow, and
 988 *    AXTopLevelUIElement attributes.
 989 *  
 990 *  Discussion:
 991 *    This routine allows you to change the parent that an HIObject
 992 *    would normally supply in the accessibility hierarchy. For
 993 *    instance, a popup control could call this routine on its menu so
 994 *    that the menu returned the popup control as the menu's parent;
 995 *    normally the menu would return the application as its parent.
 996 *    Optionally, this routine also allows you to change the window and
 997 *    top-level element that an HIObject would normally supply. 
 998 *     
 999 *    If the input HIObject is a standard toolbox construct like an
1000 *    HIView or a Menu, the input HIObject will not be added as an
1001 *    accessibility child of its normal parent. In all other cases, it
1002 *    is the client's responsibility to ensure that the input HIObject
1003 *    is not added as an accessibility child of its normal parent. 
1004 *     
1005 *    If the desired AXUIElementRef parent represents an HIView, a
1006 *    Menu, or a Window, the input HIObject will be automatically added
1007 *    as an accessibility child of the specified parent. In all other
1008 *    cases, it is the client's responsibility to manually add the
1009 *    input HIObject as a child of the specified parent. To represent
1010 *    an HIView, a Menu, or a Window, an AXUIElementRef must contain
1011 *    the appropriate HIObjectRef as well as an identifier value of
1012 *    zero. 
1013 *    
1014 *    Similar rules don't have to apply for the handling of the window
1015 *    and top-level element attributes because those attributes don't
1016 *    represent two-way relationships. 
1017 *    
1018 *    A containment override is not necessarily supported by every type
1019 *    of HIObject. Currently, it is supported by HIViews, Menus, and
1020 *    Windows.
1021 *  
1022 *  Mac OS X threading:
1023 *    Not thread safe
1024 *  
1025 *  Parameters:
1026 *    
1027 *    inHIObject:
1028 *      The HIObjectRef whose parent attribute you want to override.
1029 *    
1030 *    inDesiredParent:
1031 *      The AXUIElementRef that you wish the HIObject to return as the
1032 *      value of its AXParent attribute. This routine makes a copy of
1033 *      the AXUIElementRef; you must release inDesiredParent after you
1034 *      have called this routine. Passing NULL indicates that you want
1035 *      the HIObject to revert to its normal, un-overridden behavior.
1036 *    
1037 *    inDesiredWindow:
1038 *      The AXUIElementRef that you wish the HIObject to return as the
1039 *      value of its AXWindow attribute. This routine makes a copy of
1040 *      the AXUIElementRef; you must release inDesiredWindow after you
1041 *      have called this routine. Passing NULL indicates that you want
1042 *      the HIObject to report its normal window, if any.
1043 *    
1044 *    inDesiredTopLevelUIElement:
1045 *      The AXUIElementRef that you wish the HIObject to return as the
1046 *      value of its AXTopLevelUIElement attribute. This routine makes
1047 *      a copy of the AXUIElementRef; you must release
1048 *      inDesiredTopLevelUIElement after you have called this routine.
1049 *      Passing NULL indicates that you want the HIObject to report its
1050 *      normal top-level element, if any.
1051 *  
1052 *  Result:
1053 *    An OSStatus result code. If the HIObjectRef is invalid, this
1054 *    routine will return paramErr.
1055 *  
1056 *  Availability:
1057 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1058 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1059 *    Non-Carbon CFM:   not available
1060 }
1061function HIObjectOverrideAccessibilityContainment( inHIObject: HIObjectRef; inDesiredParent: AXUIElementRef; inDesiredWindow: AXUIElementRef; inDesiredTopLevelUIElement: AXUIElementRef ): OSStatus; external name '_HIObjectOverrideAccessibilityContainment';
1062(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1063
1064
1065{$endc} {not TARGET_CPU_64}
1066
1067{$endc} {TARGET_OS_MAC}
1068{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1069
1070end.
1071{$endc} {not MACOSALLINCLUDE}