UniversalAccess.pas 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. {
  2. File: HIServices/UniversalAccess.h
  3. Contains: Universal Access Interfaces.
  4. Version: HIServices-169~377
  5. Copyright: © 2005-2006 by Apple Computer, Inc., all rights reserved.
  6. }
  7. { Pascal Translation: Gale R Paeper, <[email protected]>, 2006 }
  8. {
  9. Modified for use with Free Pascal
  10. Version 200
  11. Please report any bugs to <[email protected]>
  12. }
  13. {$mode macpas}
  14. {$packenum 1}
  15. {$macro on}
  16. {$inline on}
  17. {$CALLING MWPASCAL}
  18. unit UniversalAccess;
  19. interface
  20. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  21. {$setc GAP_INTERFACES_VERSION := $0200}
  22. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  23. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  24. {$endc}
  25. {$ifc defined CPUPOWERPC and defined CPUI386}
  26. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  27. {$endc}
  28. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  29. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  30. {$endc}
  31. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  32. {$setc __ppc__ := 1}
  33. {$elsec}
  34. {$setc __ppc__ := 0}
  35. {$endc}
  36. {$ifc not defined __i386__ and defined CPUI386}
  37. {$setc __i386__ := 1}
  38. {$elsec}
  39. {$setc __i386__ := 0}
  40. {$endc}
  41. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  42. {$error Conflicting definitions for __ppc__ and __i386__}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__}
  45. {$setc TARGET_CPU_PPC := TRUE}
  46. {$setc TARGET_CPU_X86 := FALSE}
  47. {$elifc defined __i386__ and __i386__}
  48. {$setc TARGET_CPU_PPC := FALSE}
  49. {$setc TARGET_CPU_X86 := TRUE}
  50. {$elsec}
  51. {$error Neither __ppc__ nor __i386__ is defined.}
  52. {$endc}
  53. {$setc TARGET_CPU_PPC_64 := FALSE}
  54. {$ifc defined FPC_BIG_ENDIAN}
  55. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  56. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  57. {$elifc defined FPC_LITTLE_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  60. {$elsec}
  61. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  62. {$endc}
  63. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  64. {$setc CALL_NOT_IN_CARBON := FALSE}
  65. {$setc OLDROUTINENAMES := FALSE}
  66. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  67. {$setc OPAQUE_UPP_TYPES := TRUE}
  68. {$setc OTCARBONAPPLICATION := TRUE}
  69. {$setc OTKERNEL := FALSE}
  70. {$setc PM_USE_SESSION_APIS := TRUE}
  71. {$setc TARGET_API_MAC_CARBON := TRUE}
  72. {$setc TARGET_API_MAC_OS8 := FALSE}
  73. {$setc TARGET_API_MAC_OSX := TRUE}
  74. {$setc TARGET_CARBON := TRUE}
  75. {$setc TARGET_CPU_68K := FALSE}
  76. {$setc TARGET_CPU_MIPS := FALSE}
  77. {$setc TARGET_CPU_SPARC := FALSE}
  78. {$setc TARGET_OS_MAC := TRUE}
  79. {$setc TARGET_OS_UNIX := FALSE}
  80. {$setc TARGET_OS_WIN32 := FALSE}
  81. {$setc TARGET_RT_MAC_68881 := FALSE}
  82. {$setc TARGET_RT_MAC_CFM := FALSE}
  83. {$setc TARGET_RT_MAC_MACHO := TRUE}
  84. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  85. {$setc TYPE_BOOL := FALSE}
  86. {$setc TYPE_EXTENDED := FALSE}
  87. {$setc TYPE_LONGLONG := TRUE}
  88. uses MacTypes, CGGeometry;
  89. {$ALIGN POWER}
  90. {
  91. * Universal Access
  92. *
  93. * Discussion:
  94. * Universal Access provides apps the ability to control the zoom
  95. * focus. The following functions are provided so that applications
  96. * can tell Universal Access what part of the UI needs focus.
  97. }
  98. {
  99. * UAZoomChangeFocusType
  100. *
  101. * Summary:
  102. * Universal Access Zoom Change Focus Types
  103. *
  104. * Discussion:
  105. * The following constants are used to tell Universal Access Zoom
  106. * the type of event that is driving the change in the zoom focus.
  107. }
  108. type
  109. UAZoomChangeFocusType = UInt32;
  110. const
  111. {
  112. * Some event would like focus.
  113. }
  114. kUAZoomFocusTypeOther = 0;
  115. {
  116. * The text insertion point has moved.
  117. }
  118. kUAZoomFocusTypeInsertionPoint = 1;
  119. {
  120. * UAZoomEnabled()
  121. *
  122. * Summary:
  123. * Determine if Universal Access Zoom is enabled.
  124. *
  125. * Discussion:
  126. * This queries the state of Universal Access Zoom
  127. *
  128. * Mac OS X threading:
  129. * Thread safe
  130. *
  131. * Result:
  132. * TRUE if Universal Access Zoom is on, FALSE if Zoom is off or the
  133. * user has zoomed all the way out.
  134. *
  135. * Availability:
  136. * Mac OS X: in version 10.4 and later in ApplicationServices.framework
  137. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  138. * Non-Carbon CFM: not available
  139. }
  140. function UAZoomEnabled: Boolean; external name '_UAZoomEnabled';
  141. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  142. {
  143. * UAZoomChangeFocus()
  144. *
  145. * Summary:
  146. * Tell Universal Access where Zoom should focus.
  147. *
  148. * Discussion:
  149. * Tells Universal Access the frame of the element in focus and the
  150. * part of the element that should be in focus.
  151. *
  152. * Mac OS X threading:
  153. * Thread safe
  154. *
  155. * Parameters:
  156. *
  157. * inRect:
  158. * - The frame of the element in focus in global 72dpi coordinates.
  159. *
  160. * inHighlightRect:
  161. * - The frame of highlighted part of the element in focus in
  162. * global 72dpi coordinates. If the whole element is in focus,
  163. * and not just a smaller part of it, pass the inRect parameter
  164. * and pass NULL for inHighlightRect.
  165. *
  166. * inType:
  167. * - Universal Access Zoom change focus type.
  168. *
  169. * Result:
  170. * OSStatus - noErr if there were no problems or Universal Access
  171. * Zoom is off or zoomed all the way out. paramErr if inRect is
  172. * NULL or inType is out of range.
  173. *
  174. * Availability:
  175. * Mac OS X: in version 10.4 and later in ApplicationServices.framework
  176. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  177. * Non-Carbon CFM: not available
  178. }
  179. function UAZoomChangeFocus( const (*var*) inRect: CGRect; inHighlightRect: CGRectPtr; inType: UAZoomChangeFocusType ): OSStatus; external name '_UAZoomChangeFocus';
  180. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  181. end.