NSImage.inc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. { Parsed from Appkit.framework NSImage.h }
  2. { Version: 2.1.5 - Fri Feb 11 21:45:55 CET 2011 }
  3. {$ifdef TYPES}
  4. {$ifndef NSIMAGE_PAS_T}
  5. {$define NSIMAGE_PAS_T}
  6. { Constants }
  7. const
  8. NSImageLoadStatusCompleted = 0;
  9. NSImageLoadStatusCancelled = 1;
  10. NSImageLoadStatusInvalidData = 2;
  11. NSImageLoadStatusUnexpectedEOF = 3;
  12. NSImageLoadStatusReadError = 4;
  13. const
  14. NSImageCacheDefault = 0;
  15. NSImageCacheAlways = 1;
  16. NSImageCacheBySize = 2;
  17. NSImageCacheNever = 3;
  18. { Types }
  19. type
  20. NSImageLoadStatus = NSUInteger;
  21. NSImageLoadStatusPtr = ^NSImageLoadStatus;
  22. NSImageCacheMode = NSUInteger;
  23. NSImageCacheModePtr = ^NSImageCacheMode;
  24. {$endif}
  25. {$endif}
  26. {$ifdef RECORDS}
  27. {$ifndef NSIMAGE_PAS_R}
  28. {$define NSIMAGE_PAS_R}
  29. {$endif}
  30. {$endif}
  31. {$ifdef FUNCTIONS}
  32. {$ifndef NSIMAGE_PAS_F}
  33. {$define NSIMAGE_PAS_F}
  34. {$endif}
  35. {$endif}
  36. {$ifdef EXTERNAL_SYMBOLS}
  37. {$ifndef NSIMAGE_PAS_S}
  38. {$define NSIMAGE_PAS_S}
  39. { External string constants }
  40. var
  41. NSImageHintCTM: NSString; cvar; external;
  42. NSImageHintInterpolation: NSString; cvar; external;
  43. NSImageNameQuickLookTemplate: NSString; cvar; external;
  44. NSImageNameBluetoothTemplate: NSString; cvar; external;
  45. NSImageNameIChatTheaterTemplate: NSString; cvar; external;
  46. NSImageNameSlideshowTemplate: NSString; cvar; external;
  47. NSImageNameActionTemplate: NSString; cvar; external;
  48. NSImageNameSmartBadgeTemplate: NSString; cvar; external;
  49. NSImageNameIconViewTemplate: NSString; cvar; external;
  50. NSImageNameListViewTemplate: NSString; cvar; external;
  51. NSImageNameColumnViewTemplate: NSString; cvar; external;
  52. NSImageNameFlowViewTemplate: NSString; cvar; external;
  53. NSImageNamePathTemplate: NSString; cvar; external;
  54. NSImageNameInvalidDataFreestandingTemplate: NSString; cvar; external;
  55. NSImageNameLockLockedTemplate: NSString; cvar; external;
  56. NSImageNameLockUnlockedTemplate: NSString; cvar; external;
  57. NSImageNameGoRightTemplate: NSString; cvar; external;
  58. NSImageNameGoLeftTemplate: NSString; cvar; external;
  59. NSImageNameRightFacingTriangleTemplate: NSString; cvar; external;
  60. NSImageNameLeftFacingTriangleTemplate: NSString; cvar; external;
  61. NSImageNameAddTemplate: NSString; cvar; external;
  62. NSImageNameRemoveTemplate: NSString; cvar; external;
  63. NSImageNameRevealFreestandingTemplate: NSString; cvar; external;
  64. NSImageNameFollowLinkFreestandingTemplate: NSString; cvar; external;
  65. NSImageNameEnterFullScreenTemplate: NSString; cvar; external;
  66. NSImageNameExitFullScreenTemplate: NSString; cvar; external;
  67. NSImageNameStopProgressTemplate: NSString; cvar; external;
  68. NSImageNameStopProgressFreestandingTemplate: NSString; cvar; external;
  69. NSImageNameRefreshTemplate: NSString; cvar; external;
  70. NSImageNameRefreshFreestandingTemplate: NSString; cvar; external;
  71. NSImageNameBonjour: NSString; cvar; external;
  72. NSImageNameComputer: NSString; cvar; external;
  73. NSImageNameFolderBurnable: NSString; cvar; external;
  74. NSImageNameFolderSmart: NSString; cvar; external;
  75. NSImageNameFolder: NSString; cvar; external;
  76. NSImageNameNetwork: NSString; cvar; external;
  77. NSImageNameDotMac: NSString; cvar; external;
  78. NSImageNameMobileMe: NSString; cvar; external;
  79. NSImageNameMultipleDocuments: NSString; cvar; external;
  80. NSImageNameUserAccounts: NSString; cvar; external;
  81. NSImageNamePreferencesGeneral: NSString; cvar; external;
  82. NSImageNameAdvanced: NSString; cvar; external;
  83. NSImageNameInfo: NSString; cvar; external;
  84. NSImageNameFontPanel: NSString; cvar; external;
  85. NSImageNameColorPanel: NSString; cvar; external;
  86. NSImageNameUser: NSString; cvar; external;
  87. NSImageNameUserGroup: NSString; cvar; external;
  88. NSImageNameEveryone: NSString; cvar; external;
  89. NSImageNameUserGuest: NSString; cvar; external;
  90. NSImageNameMenuOnStateTemplate: NSString; cvar; external;
  91. NSImageNameMenuMixedStateTemplate: NSString; cvar; external;
  92. NSImageNameApplicationIcon: NSString; cvar; external;
  93. NSImageNameTrashEmpty: NSString; cvar; external;
  94. NSImageNameTrashFull: NSString; cvar; external;
  95. NSImageNameHomeTemplate: NSString; cvar; external;
  96. NSImageNameBookmarksTemplate: NSString; cvar; external;
  97. NSImageNameCaution: NSString; cvar; external;
  98. NSImageNameStatusAvailable: NSString; cvar; external;
  99. NSImageNameStatusPartiallyAvailable: NSString; cvar; external;
  100. NSImageNameStatusUnavailable: NSString; cvar; external;
  101. NSImageNameStatusNone: NSString; cvar; external;
  102. {$endif}
  103. {$endif}
  104. {$ifdef FORWARD}
  105. NSImageDelegateProtocol = objcprotocol;
  106. NSImage = objcclass;
  107. NSImagePointer = ^NSImage;
  108. NSImagePtr = NSImagePointer;
  109. {$endif}
  110. {$ifdef CLASSES}
  111. {$ifndef NSIMAGE_PAS_C}
  112. {$define NSIMAGE_PAS_C}
  113. { NSImage }
  114. NSImage = objcclass external (NSObject)
  115. private
  116. _name: NSString;
  117. _size: NSSize;
  118. __flags: bitpacked record
  119. case byte of
  120. 0: (_anonbitfield_NSImage0: cuint);
  121. 1: (
  122. scalable: 0..1;
  123. dataRetained: 0..1;
  124. uniqueWindow: 0..1;
  125. sizeWasExplicitlySet: 0..1;
  126. builtIn: 0..1;
  127. needsToExpand: 0..1;
  128. useEPSOnResolutionMismatch: 0..1;
  129. colorMatchPreferred: 0..1;
  130. multipleResolutionMatching: 0..1;
  131. focusedWhilePrinting: 0..1;
  132. archiveByName: 0..1;
  133. unboundedCacheDepth: 0..1;
  134. flipped: 0..1;
  135. aliased: 0..1;
  136. dirtied: 0..1;
  137. _cacheMode: 0..((1 shl 2)-1);
  138. sampleMode: 0..((1 shl 3)-1);
  139. reserved2: 0..1;
  140. _isTemplate: 0..1;
  141. failedToExpand: 0..1;
  142. reserved1: 0..((1 shl 9)-1);
  143. );
  144. end;
  145. _reps: id; {garbage collector: volatile }
  146. _imageAuxiliary: _NSImageAuxiliary;
  147. public
  148. class function imageNamed(name_: NSString): id; message 'imageNamed:';
  149. function initWithSize(aSize: NSSize): id; message 'initWithSize:';
  150. function initWithData(data: NSData): id; message 'initWithData:';
  151. function initWithContentsOfFile(fileName: NSString): id; message 'initWithContentsOfFile:';
  152. function initWithContentsOfURL(url: NSURL): id; message 'initWithContentsOfURL:';
  153. function initByReferencingFile(fileName: NSString): id; message 'initByReferencingFile:';
  154. function initByReferencingURL(url: NSURL): id; message 'initByReferencingURL:';
  155. function initWithIconRef(iconRef_: IconRef): id; message 'initWithIconRef:';
  156. function initWithPasteboard(pasteboard: NSPasteboard): id; message 'initWithPasteboard:';
  157. function initWithDataIgnoringOrientation(data: NSData): id; message 'initWithDataIgnoringOrientation:';
  158. procedure setSize(aSize: NSSize); message 'setSize:';
  159. function size: NSSize; message 'size';
  160. function setName(string_: NSString): Boolean; message 'setName:';
  161. function name: NSString; message 'name';
  162. procedure setBackgroundColor(aColor: NSColor); message 'setBackgroundColor:';
  163. function backgroundColor: NSColor; message 'backgroundColor';
  164. procedure setUsesEPSOnResolutionMismatch(flag: Boolean); message 'setUsesEPSOnResolutionMismatch:';
  165. function usesEPSOnResolutionMismatch: Boolean; message 'usesEPSOnResolutionMismatch';
  166. procedure setPrefersColorMatch(flag: Boolean); message 'setPrefersColorMatch:';
  167. function prefersColorMatch: Boolean; message 'prefersColorMatch';
  168. procedure setMatchesOnMultipleResolution(flag: Boolean); message 'setMatchesOnMultipleResolution:';
  169. function matchesOnMultipleResolution: Boolean; message 'matchesOnMultipleResolution';
  170. procedure drawAtPoint_fromRect_operation_fraction(point: NSPoint; fromRect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'drawAtPoint:fromRect:operation:fraction:';
  171. procedure drawInRect_fromRect_operation_fraction(rect: NSRect; fromRect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'drawInRect:fromRect:operation:fraction:';
  172. procedure drawInRect_fromRect_operation_fraction_respectFlipped_hints(dstSpacePortionRect: NSRect; srcSpacePortionRect: NSRect; op: NSCompositingOperation; requestedAlpha: CGFloat; respectContextIsFlipped: Boolean; hints: NSDictionary); message 'drawInRect:fromRect:operation:fraction:respectFlipped:hints:';
  173. function drawRepresentation_inRect(imageRep: NSImageRep; rect: NSRect): Boolean; message 'drawRepresentation:inRect:';
  174. procedure recache; message 'recache';
  175. function TIFFRepresentation: NSData; message 'TIFFRepresentation';
  176. function TIFFRepresentationUsingCompression_factor(comp: NSTIFFCompression; aFloat: single): NSData; message 'TIFFRepresentationUsingCompression:factor:';
  177. function representations: NSArray; message 'representations';
  178. procedure addRepresentations(imageReps: NSArray); message 'addRepresentations:';
  179. procedure addRepresentation(imageRep: NSImageRep); message 'addRepresentation:';
  180. procedure removeRepresentation(imageRep: NSImageRep); message 'removeRepresentation:';
  181. function isValid: Boolean; message 'isValid';
  182. procedure lockFocus; message 'lockFocus';
  183. procedure lockFocusFlipped(flipped: Boolean); message 'lockFocusFlipped:';
  184. procedure unlockFocus; message 'unlockFocus';
  185. function bestRepresentationForDevice(deviceDescription: NSDictionary): NSImageRep; message 'bestRepresentationForDevice:'; deprecated 'in Mac OS X 10.6 and later';
  186. procedure setDelegate(anObject: NSImageDelegateProtocol); message 'setDelegate:';
  187. function delegate: NSImageDelegateProtocol; message 'delegate';
  188. class function imageUnfilteredFileTypes: NSArray; message 'imageUnfilteredFileTypes';
  189. class function imageUnfilteredPasteboardTypes: NSArray; message 'imageUnfilteredPasteboardTypes';
  190. class function imageFileTypes: NSArray; message 'imageFileTypes';
  191. class function imagePasteboardTypes: NSArray; message 'imagePasteboardTypes';
  192. class function imageTypes: NSArray; message 'imageTypes';
  193. class function imageUnfilteredTypes: NSArray; message 'imageUnfilteredTypes';
  194. class function canInitWithPasteboard(pasteboard: NSPasteboard): Boolean; message 'canInitWithPasteboard:';
  195. procedure cancelIncrementalLoad; message 'cancelIncrementalLoad';
  196. procedure setCacheMode(mode: NSImageCacheMode); message 'setCacheMode:';
  197. function cacheMode: NSImageCacheMode; message 'cacheMode';
  198. function alignmentRect: NSRect; message 'alignmentRect';
  199. procedure setAlignmentRect(rect: NSRect); message 'setAlignmentRect:';
  200. function isTemplate: Boolean; message 'isTemplate';
  201. procedure setTemplate(isTemplate_: Boolean); message 'setTemplate:';
  202. function accessibilityDescription: NSString; message 'accessibilityDescription';
  203. procedure setAccessibilityDescription(description_: NSString); message 'setAccessibilityDescription:';
  204. function initWithCGImage_size(cgImage: CGImageRef; size_: NSSize): id; message 'initWithCGImage:size:';
  205. function CGImageForProposedRect_context_hints(proposedDestRect: NSRectPtr; referenceContext: NSGraphicsContext; hints: NSDictionary): CGImageRef; message 'CGImageForProposedRect:context:hints:';
  206. function bestRepresentationForRect_context_hints(rect: NSRect; referenceContext: NSGraphicsContext; hints: NSDictionary): NSImageRep; message 'bestRepresentationForRect:context:hints:';
  207. function hitTestRect_withImageDestinationRect_context_hints_flipped(testRectDestSpace: NSRect; imageRectDestSpace: NSRect; context: NSGraphicsContext; hints: NSDictionary; flipped: Boolean): Boolean; message 'hitTestRect:withImageDestinationRect:context:hints:flipped:';
  208. end;
  209. { NSBundleImageExtensionCategory }
  210. NSBundleImageExtensionCategory = objccategory external (NSBundle)
  211. function pathForImageResource(name: NSString): NSString; message 'pathForImageResource:';
  212. function URLForImageResource(name: NSString): NSURL; message 'URLForImageResource:';
  213. end;
  214. { NSDeprecated_NSImageCategory }
  215. NSDeprecated_NSImageCategory = objccategory external name 'NSDeprecated' (NSImage)
  216. procedure setFlipped(flag: Boolean); message 'setFlipped:';
  217. function isFlipped: Boolean; message 'isFlipped';
  218. procedure dissolveToPoint_fraction(point: NSPoint; aFloat: CGFloat); message 'dissolveToPoint:fraction:';
  219. procedure dissolveToPoint_fromRect_fraction(point: NSPoint; rect: NSRect; aFloat: CGFloat); message 'dissolveToPoint:fromRect:fraction:';
  220. procedure compositeToPoint_operation(point: NSPoint; op: NSCompositingOperation); message 'compositeToPoint:operation:';
  221. procedure compositeToPoint_fromRect_operation(point: NSPoint; rect: NSRect; op: NSCompositingOperation); message 'compositeToPoint:fromRect:operation:';
  222. procedure compositeToPoint_operation_fraction(point: NSPoint; op: NSCompositingOperation; delta: CGFloat); message 'compositeToPoint:operation:fraction:';
  223. procedure compositeToPoint_fromRect_operation_fraction(point: NSPoint; rect: NSRect; op: NSCompositingOperation; delta: CGFloat); message 'compositeToPoint:fromRect:operation:fraction:';
  224. procedure lockFocusOnRepresentation(imageRepresentation: NSImageRep); message 'lockFocusOnRepresentation:';
  225. procedure setScalesWhenResized(flag: Boolean); message 'setScalesWhenResized:';
  226. function scalesWhenResized: Boolean; message 'scalesWhenResized';
  227. procedure setDataRetained(flag: Boolean); message 'setDataRetained:';
  228. function isDataRetained: Boolean; message 'isDataRetained';
  229. procedure setCachedSeparately(flag: Boolean); message 'setCachedSeparately:';
  230. function isCachedSeparately: Boolean; message 'isCachedSeparately';
  231. procedure setCacheDepthMatchesImageDepth(flag: Boolean); message 'setCacheDepthMatchesImageDepth:';
  232. function cacheDepthMatchesImageDepth: Boolean; message 'cacheDepthMatchesImageDepth';
  233. end;
  234. {$endif}
  235. {$endif}
  236. {$ifdef PROTOCOLS}
  237. {$ifndef NSIMAGE_PAS_P}
  238. {$define NSIMAGE_PAS_P}
  239. { NSImageDelegate Protocol }
  240. NSImageDelegateProtocol = objcprotocol external name 'NSImageDelegate'
  241. function imageDidNotDraw_inRect(sender: id; aRect: NSRect): NSImage; message 'imageDidNotDraw:inRect:';
  242. procedure image_willLoadRepresentation(image: NSImage; rep: NSImageRep); message 'image:willLoadRepresentation:';
  243. procedure image_didLoadRepresentationHeader(image: NSImage; rep: NSImageRep); message 'image:didLoadRepresentationHeader:';
  244. procedure image_didLoadPartOfRepresentation_withValidRows(image: NSImage; rep: NSImageRep; rows: NSInteger); message 'image:didLoadPartOfRepresentation:withValidRows:';
  245. procedure image_didLoadRepresentation_withStatus(image: NSImage; rep: NSImageRep; status: NSImageLoadStatus); message 'image:didLoadRepresentation:withStatus:';
  246. end;
  247. {$endif}
  248. {$endif}