ABTypedefs.pas 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {
  2. * ABTypedefs.h
  3. * AddressBook Framework
  4. *
  5. * Copyright (c) 2002-2003 Apple Computer. All rights reserved.
  6. *
  7. }
  8. { Pascal Translation: Peter N Lewis, <[email protected]>, 2004 }
  9. {
  10. Modified for use with Free Pascal
  11. Version 200
  12. Please report any bugs to <[email protected]>
  13. }
  14. {$mode macpas}
  15. {$packenum 1}
  16. {$macro on}
  17. {$inline on}
  18. {$CALLING MWPASCAL}
  19. unit ABTypedefs;
  20. interface
  21. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  22. {$setc GAP_INTERFACES_VERSION := $0200}
  23. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  24. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  25. {$endc}
  26. {$ifc defined CPUPOWERPC and defined CPUI386}
  27. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  28. {$endc}
  29. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  30. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  31. {$endc}
  32. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  33. {$setc __ppc__ := 1}
  34. {$elsec}
  35. {$setc __ppc__ := 0}
  36. {$endc}
  37. {$ifc not defined __i386__ and defined CPUI386}
  38. {$setc __i386__ := 1}
  39. {$elsec}
  40. {$setc __i386__ := 0}
  41. {$endc}
  42. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  43. {$error Conflicting definitions for __ppc__ and __i386__}
  44. {$endc}
  45. {$ifc defined __ppc__ and __ppc__}
  46. {$setc TARGET_CPU_PPC := TRUE}
  47. {$setc TARGET_CPU_X86 := FALSE}
  48. {$elifc defined __i386__ and __i386__}
  49. {$setc TARGET_CPU_PPC := FALSE}
  50. {$setc TARGET_CPU_X86 := TRUE}
  51. {$elsec}
  52. {$error Neither __ppc__ nor __i386__ is defined.}
  53. {$endc}
  54. {$setc TARGET_CPU_PPC_64 := FALSE}
  55. {$ifc defined FPC_BIG_ENDIAN}
  56. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  57. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  58. {$elifc defined FPC_LITTLE_ENDIAN}
  59. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  60. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  61. {$elsec}
  62. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  63. {$endc}
  64. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  65. {$setc CALL_NOT_IN_CARBON := FALSE}
  66. {$setc OLDROUTINENAMES := FALSE}
  67. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  68. {$setc OPAQUE_UPP_TYPES := TRUE}
  69. {$setc OTCARBONAPPLICATION := TRUE}
  70. {$setc OTKERNEL := FALSE}
  71. {$setc PM_USE_SESSION_APIS := TRUE}
  72. {$setc TARGET_API_MAC_CARBON := TRUE}
  73. {$setc TARGET_API_MAC_OS8 := FALSE}
  74. {$setc TARGET_API_MAC_OSX := TRUE}
  75. {$setc TARGET_CARBON := TRUE}
  76. {$setc TARGET_CPU_68K := FALSE}
  77. {$setc TARGET_CPU_MIPS := FALSE}
  78. {$setc TARGET_CPU_SPARC := FALSE}
  79. {$setc TARGET_OS_MAC := TRUE}
  80. {$setc TARGET_OS_UNIX := FALSE}
  81. {$setc TARGET_OS_WIN32 := FALSE}
  82. {$setc TARGET_RT_MAC_68881 := FALSE}
  83. {$setc TARGET_RT_MAC_CFM := FALSE}
  84. {$setc TARGET_RT_MAC_MACHO := TRUE}
  85. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  86. {$setc TYPE_BOOL := FALSE}
  87. {$setc TYPE_EXTENDED := FALSE}
  88. {$setc TYPE_LONGLONG := TRUE}
  89. uses MacTypes;
  90. {$ALIGN MAC68K}
  91. const
  92. kABMultiValueMask = $100;
  93. type
  94. ABPropertyType = SInt32;
  95. const
  96. kABErrorInProperty = 0;
  97. kABStringProperty = 1;
  98. kABIntegerProperty = 2;
  99. kABRealProperty = 3;
  100. kABDateProperty = 4;
  101. kABArrayProperty = 5;
  102. kABDictionaryProperty = 6;
  103. kABDataProperty = 7;
  104. kABMultiStringProperty = kABMultiValueMask or kABStringProperty;
  105. kABMultiIntegerProperty = kABMultiValueMask or kABIntegerProperty;
  106. kABMultiRealProperty = kABMultiValueMask or kABRealProperty;
  107. kABMultiDateProperty = kABMultiValueMask or kABDateProperty;
  108. kABMultiArrayProperty = kABMultiValueMask or kABArrayProperty;
  109. kABMultiDictionaryProperty = kABMultiValueMask or kABDictionaryProperty;
  110. kABMultiDataProperty = kABMultiValueMask or kABDataProperty;
  111. // ================================================================
  112. // Search APIs
  113. // ================================================================
  114. type
  115. ABSearchComparison = SInt32;
  116. const
  117. kABEqual = 0;
  118. kABNotEqual = 1;
  119. kABLessThan = 2;
  120. kABLessThanOrEqual = 3;
  121. kABGreaterThan = 4;
  122. kABGreaterThanOrEqual = 5;
  123. kABEqualCaseInsensitive = 6;
  124. kABContainsSubString = 7;
  125. kABContainsSubStringCaseInsensitive = 8;
  126. kABPrefixMatch = 9;
  127. kABPrefixMatchCaseInsensitive = 10;
  128. // #if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED
  129. kABBitsInBitFieldMatch = 11;
  130. // #endif
  131. type
  132. ABSearchConjunction = SInt32;
  133. const
  134. kABSearchAnd = 0;
  135. kABSearchOr = 1;
  136. end.