Improves the PasCocoa frameworks.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@452 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2008-05-15 12:46:29 +00:00
parent c5ecd1b28f
commit c7b306fc4e
8 changed files with 2205 additions and 194 deletions

View File

@ -8,9 +8,9 @@
}
{#import <AppKit/AppKitDefines.h>
#import <AppKit/AppKitErrors.h>
#import <AppKit/NSGraphicsContext.h>
#import <AppKit/NSAccessibility.h>}
#import <AppKit/AppKitErrors.h>}
{$include NSGraphicsContext.inc}
{#import <AppKit/NSAccessibility.h>}
{$include NSActionCell.inc}
{$include NSAlert.inc}
//#import <AppKit/NSAppleScriptExtensions.h>
@ -31,9 +31,9 @@
#import <AppKit/NSMenu.h>
#import <AppKit/NSMenuItem.h>
#import <AppKit/NSColor.h>
#import <AppKit/NSColorSpace.h>
#import <AppKit/NSBitmapImageRep.h>
#import <AppKit/NSBrowser.h>
#import <AppKit/NSColorSpace.h>}
{$include NSBitmapImageRep.inc}
{#import <AppKit/NSBrowser.h>
#import <AppKit/NSBrowserCell.h>
#import <AppKit/NSCachedImageRep.h>
#import <AppKit/NSCIImageRep.h>
@ -54,9 +54,9 @@
#import <AppKit/NSHelpManager.h>}
{$include NSGraphics.inc}
{$include NSImage.inc}
{#import <AppKit/NSImageCell.h>
#import <AppKit/NSImageRep.h>
#import <AppKit/NSImageView.h>
{#import <AppKit/NSImageCell.h>}
{$include NSImageRep.inc}
{#import <AppKit/NSImageView.h>
#import <AppKit/NSNib.h>
#import <AppKit/NSNibLoading.h>
#import <AppKit/NSPrinter.h>

View File

@ -0,0 +1,553 @@
{%mainunit appkit.pas}
(*
NSBitmapImageRep.h
Application Kit
Copyright (c) 1994-2005, Apple Computer, Inc.
All rights reserved.
*)
{$ifdef HEADER}
{$ifndef NSBITMAPIMAGEREP_PAS_H}
{$define NSBITMAPIMAGEREP_PAS_H}
{$include NSImageRep.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
{.$endif}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
{.$endif}
{.$endif}
type
NSTIFFCompression = (
NSTIFFCompressionNone = 1,
NSTIFFCompressionCCITTFAX3 = 3,
NSTIFFCompressionCCITTFAX4 = 4,
NSTIFFCompressionLZW = 5,
NSTIFFCompressionJPEG = 6,
NSTIFFCompressionNEXT = 32766,
NSTIFFCompressionPackBits = 32773,
NSTIFFCompressionOldJPEG = 32865
);
type
NSBitmapImageFileType = (
NSTIFFFileType,
NSBMPFileType,
NSGIFFileType,
NSJPEGFileType,
NSPNGFileType,
NSJPEG2000FileType
);
type
NSImageRepLoadStatus = (
NSImageRepLoadStatusUnknownType = 1,
NSImageRepLoadStatusReadingHeader = 2,
NSImageRepLoadStatusWillNeedAllData = 3,
NSImageRepLoadStatusInvalidData = 4,
NSImageRepLoadStatusUnexpectedEOF = 5,
NSImageRepLoadStatusCompleted = 6
);
type
NSBitmapFormat = (
NSAlphaFirstBitmapFormat = 1 shl 0,
NSAlphaNonpremultipliedBitmapFormat = 1 shl 1,
NSFloatingPointSamplesBitmapFormat = 1 shl 2
);
//APPKIT_EXTERN NSString* NSImageCompressionMethod; // TIFF input/output (NSTIFFCompression in NSNumber)
//APPKIT_EXTERN NSString* NSImageCompressionFactor; // TIFF/JPEG input/output (float in NSNumber)
//APPKIT_EXTERN NSString* NSImageDitherTransparency; // GIF output (BOOL in NSNumber)
//APPKIT_EXTERN NSString* NSImageRGBColorTable; // GIF input/output (packed RGB in NSData)
//APPKIT_EXTERN NSString* NSImageInterlaced; // PNG output (BOOL in NSNumber)
//APPKIT_EXTERN NSString* NSImageColorSyncProfileData; // TIFF,GIF input/output (NSData)
//APPKIT_EXTERN NSString* NSImageFrameCount AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER; // GIF input (int in NSNumber) (read-only)
//APPKIT_EXTERN NSString* NSImageCurrentFrame AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER; // GIF input (int in NSNumber)
//APPKIT_EXTERN NSString* NSImageCurrentFrameDuration AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER; // GIF input (float in NSNumber) (read-only)
//APPKIT_EXTERN NSString* NSImageLoopCount AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER; // GIF input (int in NSNumber) (read-only)
//APPKIT_EXTERN NSString* NSImageGamma AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; // PNG input/output (float in NSNumber)
//APPKIT_EXTERN NSString* NSImageProgressive AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; // JPEG input/output (BOOL in NSNumber)
//APPKIT_EXTERN NSString* NSImageEXIFData AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; // JPEG input/output (NSDictionary)
{$endif}
{$endif}
{$ifdef FORWARD}
{$ifndef NSBITMAPIMAGEREP_PAS__FORWARD}
{$define NSBITMAPIMAGEREP_PAS__FORWARD}
NSBitmapImageRep = class;
{$endif}
{$endif}
{$ifdef CLASSES}
{$ifndef NSBITMAPIMAGEREP_PAS_C}
{$define NSBITMAPIMAGEREP_PAS_C}
{$include NSImageRep.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
{.$endif}
{ NSBitmapImageRep }
NSBitmapImageRep = class(NSImageRep)
public
class function getClass: objc.id; override;
// All instance variables are private
// Cache
constructor initWithFocusedViewRect(_rect: NSRect);
constructor initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel(_planes: PChar; _width: Integer; _height: Integer; _bps: Integer; _spp: Integer; _alpha: LongBool; _isPlanar: LongBool; _colorSpaceName: CFStringRef; _rBytes: Integer; _pBits: Integer);
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
constructor initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel(_planes: PChar; _width: Integer; _height: Integer; _bps: Integer; _spp: Integer; _alpha: LongBool; _isPlanar: LongBool; _colorSpaceName: CFStringRef; _bitmapFormat: NSBitmapFormat; _rBytes: Integer; _pBits: Integer);
{.$endif}
class function imageRepsWithData(_tiffData: CFDataRef): CFArrayRef;
// TIFFs can contain multiple images
constructor imageRepWithData(_tiffData: CFDataRef);
// Convenience of initWithData:
constructor initWithData(_tiffData: CFDataRef);
function bitmapData: PChar;
procedure getBitmapDataPlanes(_data: PChar);
function isPlanar: LongBool;
function samplesPerPixel: Integer;
function bitsPerPixel: Integer;
function bytesPerRow: Integer;
function bytesPerPlane: Integer;
function numberOfPlanes: Integer;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
function bitmapFormat: NSBitmapFormat;
{.$endif}
procedure getCompression_factor(_compression: NSTIFFCompression; _factor: Single);
procedure setCompression_factor(_compression: NSTIFFCompression; _factor: Single);
function TIFFRepresentation: CFDataRef;
function TIFFRepresentationUsingCompression_factor(_comp: NSTIFFCompression; _factor: Single): CFDataRef;
class function TIFFRepresentationOfImageRepsInArray(__array: CFArrayRef): CFDataRef;
class function TIFFRepresentationOfImageRepsInArray_usingCompression_factor(__array: CFArrayRef; _comp: NSTIFFCompression; _factor: Single): CFDataRef;
class procedure getTIFFCompressionTypes_count(_list: NSTIFFCompression; _numTypes: Integer);
class function localizedNameForTIFFCompressionType(_compression: NSTIFFCompression): CFStringRef;
function canBeCompressedUsing(_compression: NSTIFFCompression): LongBool;
// Support for colorization of grayscale images. Maps the image such that:
// Gray value of midPoint -> midPointColor, black -> shadowColor, white -> lightColor.
// Works on images with 8-bit SPP; thus either 8-bit gray or 24-bit color (with optional
// alpha).
procedure colorizeByMappingGray_toColor_blackMapping_whiteMapping(_midPoint: Single; _midPointColor: objc.id {NSColor}; _shadowColor: objc.id {NSColor}; _lightColor: objc.id {NSColor});
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
constructor initForIncrementalLoad;
function incrementalLoadFromData_complete(_data: CFDataRef; _complete: LongBool): Integer;
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
procedure setColor_atX_y(_color: objc.id {NSColor}; _x: Integer; _y: Integer);
function colorAtX_y(_x: Integer; _y: Integer): objc.id;{NSColor}
procedure getPixel;
procedure setPixel;
{.$endif}
constructor initWithIconHandle(_icon: Pointer);
constructor initWithBitmapHandle(_bitmap: Pointer);
class function representationOfImageRepsInArray_usingType_properties(_imageReps: CFArrayRef; _storageType: NSBitmapImageFileType; _properties: CFDictionaryRef): CFDataRef;
function representationUsingType_properties(_storageType: NSBitmapImageFileType; _properties: CFDictionaryRef): CFDataRef;
procedure setProperty_withValue(__property: CFStringRef; _value: objc.id);
function valueForProperty(__property: CFStringRef): objc.id;
end;
{.$endif}
{$endif}
{$endif}
{$ifdef IMPLEMENTATION}
const
StrNSBitmapImageRep_NSBitmapImageRep = 'NSBitmapImageRep';
StrNSBitmapImageRep_initWithFocusedViewRect = 'initWithFocusedViewRect:';
// StrNSBitmapImageRep_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel = 'initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:';
// StrNSBitmapImageRep_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel = 'initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:';
StrNSBitmapImageRep_imageRepsWithData = 'imageRepsWithData:';
StrNSBitmapImageRep_imageRepWithData = 'imageRepWithData:';
StrNSBitmapImageRep_initWithData = 'initWithData:';
StrNSBitmapImageRep_bitmapData = 'bitmapData';
StrNSBitmapImageRep_getBitmapDataPlanes = 'getBitmapDataPlanes:';
StrNSBitmapImageRep_isPlanar = 'isPlanar';
StrNSBitmapImageRep_samplesPerPixel = 'samplesPerPixel';
StrNSBitmapImageRep_bitsPerPixel = 'bitsPerPixel';
StrNSBitmapImageRep_bytesPerRow = 'bytesPerRow';
StrNSBitmapImageRep_bytesPerPlane = 'bytesPerPlane';
StrNSBitmapImageRep_numberOfPlanes = 'numberOfPlanes';
StrNSBitmapImageRep_bitmapFormat = 'bitmapFormat';
StrNSBitmapImageRep_getCompression_factor = 'getCompression:factor:';
StrNSBitmapImageRep_setCompression_factor = 'setCompression:factor:';
StrNSBitmapImageRep_TIFFRepresentation = 'TIFFRepresentation';
StrNSBitmapImageRep_TIFFRepresentationUsingCompression_factor = 'TIFFRepresentationUsingCompression:factor:';
StrNSBitmapImageRep_TIFFRepresentationOfImageRepsInArray = 'TIFFRepresentationOfImageRepsInArray:';
StrNSBitmapImageRep_TIFFRepresentationOfImageRepsInArray_usingCompression_factor = 'TIFFRepresentationOfImageRepsInArray:usingCompression:factor:';
StrNSBitmapImageRep_getTIFFCompressionTypes_count = 'getTIFFCompressionTypes:count:';
StrNSBitmapImageRep_localizedNameForTIFFCompressionType = 'localizedNameForTIFFCompressionType:';
StrNSBitmapImageRep_canBeCompressedUsing = 'canBeCompressedUsing:';
StrNSBitmapImageRep_colorizeByMappingGray_toColor_blackMapping_whiteMapping = 'colorizeByMappingGray:toColor:blackMapping:whiteMapping:';
StrNSBitmapImageRep_initForIncrementalLoad = 'initForIncrementalLoad';
StrNSBitmapImageRep_incrementalLoadFromData_complete = 'incrementalLoadFromData:complete:';
StrNSBitmapImageRep_setColor_atX_y = 'setColor:atX:y:';
StrNSBitmapImageRep_colorAtX_y = 'colorAtX:y:';
StrNSBitmapImageRep_getPixel = 'getPixel';
StrNSBitmapImageRep_setPixel = 'setPixel';
StrNSBitmapImageRep_initWithIconHandle = 'initWithIconHandle:';
StrNSBitmapImageRep_initWithBitmapHandle = 'initWithBitmapHandle:';
StrNSBitmapImageRep_representationOfImageRepsInArray_usingType_properties = 'representationOfImageRepsInArray:usingType:properties:';
StrNSBitmapImageRep_representationUsingType_properties = 'representationUsingType:properties:';
StrNSBitmapImageRep_setProperty_withValue = 'setProperty:withValue:';
StrNSBitmapImageRep_valueForProperty = 'valueForProperty:';
{ NSBitmapImageRep }
class function NSBitmapImageRep.getClass: objc.id;
begin
Result := objc_getClass(StrNSBitmapImageRep_NSBitmapImageRep);
end;
constructor NSBitmapImageRep.initWithFocusedViewRect(_rect: NSRect);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_rect: NSRect): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initWithFocusedViewRect)), _rect);
end;
constructor NSBitmapImageRep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel(_planes: PChar; _width: Integer; _height: Integer; _bps: Integer; _spp: Integer; _alpha: LongBool; _isPlanar: LongBool; _colorSpaceName: CFStringRef; _rBytes: Integer; _pBits: Integer);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_planes: PChar; _width: Integer; _height: Integer; _bps: Integer; _spp: Integer; _alpha: LongBool; _isPlanar: LongBool; _colorSpaceName: CFStringRef; _rBytes: Integer; _pBits: Integer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
// Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel)), _planes, _width, _height, _bps, _spp, _alpha, _isPlanar, _colorSpaceName, _rBytes, _pBits);
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
constructor NSBitmapImageRep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel(_planes: PChar; _width: Integer; _height: Integer; _bps: Integer; _spp: Integer; _alpha: LongBool; _isPlanar: LongBool; _colorSpaceName: CFStringRef; _bitmapFormat: NSBitmapFormat; _rBytes: Integer; _pBits: Integer);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_planes: PChar; _width: Integer; _height: Integer; _bps: Integer; _spp: Integer; _alpha: LongBool; _isPlanar: LongBool; _colorSpaceName: CFStringRef; _bitmapFormat: NSBitmapFormat; _rBytes: Integer; _pBits: Integer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
// Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel)), _planes, _width, _height, _bps, _spp, _alpha, _isPlanar, _colorSpaceName, _bitmapFormat, _rBytes, _pBits);
end;
{.$endif}
class function NSBitmapImageRep.imageRepsWithData(_tiffData: CFDataRef): CFArrayRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_tiffData: CFDataRef): CFArrayRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFArrayRef(vmethod(getClass, sel_registerName(PChar(StrNSBitmapImageRep_imageRepsWithData)), _tiffData));
end;
constructor NSBitmapImageRep.imageRepWithData(_tiffData: CFDataRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_tiffData: CFDataRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSBitmapImageRep_imageRepWithData)), _tiffData);
end;
constructor NSBitmapImageRep.initWithData(_tiffData: CFDataRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_tiffData: CFDataRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initWithData)), _tiffData);
end;
function NSBitmapImageRep.bitmapData: PChar;
begin
Result := PChar(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_bitmapData)), []));
end;
procedure NSBitmapImageRep.getBitmapDataPlanes(_data: PChar);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_data: PChar); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_getBitmapDataPlanes)), _data);
end;
function NSBitmapImageRep.isPlanar: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_isPlanar)), []));
end;
function NSBitmapImageRep.samplesPerPixel: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_samplesPerPixel)), []));
end;
function NSBitmapImageRep.bitsPerPixel: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_bitsPerPixel)), []));
end;
function NSBitmapImageRep.bytesPerRow: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_bytesPerRow)), []));
end;
function NSBitmapImageRep.bytesPerPlane: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_bytesPerPlane)), []));
end;
function NSBitmapImageRep.numberOfPlanes: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_numberOfPlanes)), []));
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
function NSBitmapImageRep.bitmapFormat: NSBitmapFormat;
begin
Result := NSBitmapFormat(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_bitmapFormat)), []));
end;
{.$endif}
procedure NSBitmapImageRep.getCompression_factor(_compression: NSTIFFCompression; _factor: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_compression: NSTIFFCompression; _factor: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_getCompression_factor)), _compression, _factor);
end;
procedure NSBitmapImageRep.setCompression_factor(_compression: NSTIFFCompression; _factor: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_compression: NSTIFFCompression; _factor: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_setCompression_factor)), _compression, _factor);
end;
function NSBitmapImageRep.TIFFRepresentation: CFDataRef;
begin
Result := CFDataRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_TIFFRepresentation)), []));
end;
function NSBitmapImageRep.TIFFRepresentationUsingCompression_factor(_comp: NSTIFFCompression; _factor: Single): CFDataRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_comp: NSTIFFCompression; _factor: Single): CFDataRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFDataRef(vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_TIFFRepresentationUsingCompression_factor)), _comp, _factor));
end;
class function NSBitmapImageRep.TIFFRepresentationOfImageRepsInArray(__array: CFArrayRef): CFDataRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;__array: CFArrayRef): CFDataRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFDataRef(vmethod(getClass, sel_registerName(PChar(StrNSBitmapImageRep_TIFFRepresentationOfImageRepsInArray)), __array));
end;
class function NSBitmapImageRep.TIFFRepresentationOfImageRepsInArray_usingCompression_factor(__array: CFArrayRef; _comp: NSTIFFCompression; _factor: Single): CFDataRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;__array: CFArrayRef; _comp: NSTIFFCompression; _factor: Single): CFDataRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFDataRef(vmethod(getClass, sel_registerName(PChar(StrNSBitmapImageRep_TIFFRepresentationOfImageRepsInArray_usingCompression_factor)), __array, _comp, _factor));
end;
class procedure NSBitmapImageRep.getTIFFCompressionTypes_count(_list: NSTIFFCompression; _numTypes: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_list: NSTIFFCompression; _numTypes: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(getClass, sel_registerName(PChar(StrNSBitmapImageRep_getTIFFCompressionTypes_count)), _list, _numTypes);
end;
class function NSBitmapImageRep.localizedNameForTIFFCompressionType(_compression: NSTIFFCompression): CFStringRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_compression: NSTIFFCompression): CFStringRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFStringRef(vmethod(getClass, sel_registerName(PChar(StrNSBitmapImageRep_localizedNameForTIFFCompressionType)), _compression));
end;
function NSBitmapImageRep.canBeCompressedUsing(_compression: NSTIFFCompression): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_compression: NSTIFFCompression): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_canBeCompressedUsing)), _compression));
end;
procedure NSBitmapImageRep.colorizeByMappingGray_toColor_blackMapping_whiteMapping(_midPoint: Single; _midPointColor: objc.id {NSColor}; _shadowColor: objc.id {NSColor}; _lightColor: objc.id {NSColor});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_midPoint: Single; _midPointColor: objc.id {NSColor}; _shadowColor: objc.id {NSColor}; _lightColor: objc.id {NSColor}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_colorizeByMappingGray_toColor_blackMapping_whiteMapping)), _midPoint, _midPointColor, _shadowColor, _lightColor);
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
constructor NSBitmapImageRep.initForIncrementalLoad;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initForIncrementalLoad)));
end;
function NSBitmapImageRep.incrementalLoadFromData_complete(_data: CFDataRef; _complete: LongBool): Integer;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_data: CFDataRef; _complete: LongBool): Integer; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := Integer(vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_incrementalLoadFromData_complete)), _data, _complete));
end;
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
procedure NSBitmapImageRep.setColor_atX_y(_color: objc.id {NSColor}; _x: Integer; _y: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_color: objc.id {NSColor}; _x: Integer; _y: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_setColor_atX_y)), _color, _x, _y);
end;
function NSBitmapImageRep.colorAtX_y(_x: Integer; _y: Integer): objc.id;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_x: Integer; _y: Integer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_colorAtX_y)), _x, _y));
end;
procedure NSBitmapImageRep.getPixel;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_getPixel)), []);
end;
procedure NSBitmapImageRep.setPixel;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSBitmapImageRep_setPixel)), []);
end;
{.$endif}
constructor NSBitmapImageRep.initWithIconHandle(_icon: Pointer);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_icon: Pointer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initWithIconHandle)), _icon);
end;
constructor NSBitmapImageRep.initWithBitmapHandle(_bitmap: Pointer);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_bitmap: Pointer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSBitmapImageRep_initWithBitmapHandle)), _bitmap);
end;
class function NSBitmapImageRep.representationOfImageRepsInArray_usingType_properties(_imageReps: CFArrayRef; _storageType: NSBitmapImageFileType; _properties: CFDictionaryRef): CFDataRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_imageReps: CFArrayRef; _storageType: NSBitmapImageFileType; _properties: CFDictionaryRef): CFDataRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFDataRef(vmethod(getClass, sel_registerName(PChar(StrNSBitmapImageRep_representationOfImageRepsInArray_usingType_properties)), _imageReps, _storageType, _properties));
end;
function NSBitmapImageRep.representationUsingType_properties(_storageType: NSBitmapImageFileType; _properties: CFDictionaryRef): CFDataRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_storageType: NSBitmapImageFileType; _properties: CFDictionaryRef): CFDataRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFDataRef(vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_representationUsingType_properties)), _storageType, _properties));
end;
procedure NSBitmapImageRep.setProperty_withValue(__property: CFStringRef; _value: objc.id);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;__property: CFStringRef; _value: objc.id); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_setProperty_withValue)), __property, _value);
end;
function NSBitmapImageRep.valueForProperty(__property: CFStringRef): objc.id;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;__property: CFStringRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSBitmapImageRep_valueForProperty)), __property));
end;
{$endif}

View File

@ -0,0 +1,378 @@
{%mainunit appkit.pas}
(*
NSGraphicsContext.h
Application Kit
Copyright (c) 1997-2004, Apple Computer, Inc.
All rights reserved.
*)
{$ifdef HEADER}
{$ifndef NSGRAPHICSCONTEXT_PAS_H}
{$define NSGRAPHICSCONTEXT_PAS_H}
{$include AppKitDefines.inc}
{$include NSGraphics.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
{.$endif}
//APPKIT_EXTERN NSString *NSGraphicsContextDestinationAttributeName; // Can be an instance of NSWindow, NSMutableData, NSBitmapImageRep, or NSURL.
//APPKIT_EXTERN NSString *NSGraphicsContextRepresentationFormatAttributeName; // Specifies destination file format
//APPKIT_EXTERN NSString *NSGraphicsContextPSFormat;
//APPKIT_EXTERN NSString *NSGraphicsContextPDFFormat;
type
NSImageInterpolation = (
NSImageInterpolationDefault,
NSImageInterpolationNone,
NSImageInterpolationLow,
NSImageInterpolationHigh
);
{$endif}
{$endif}
{$ifdef FORWARD}
{$ifndef NSGRAPHICSCONTEXT_PAS__FORWARD}
{$define NSGRAPHICSCONTEXT_PAS__FORWARD}
NSGraphicsContext = class;
{$endif}
{$endif}
{$ifdef CLASSES}
{$ifndef NSGRAPHICSCONTEXT_PAS_C}
{$define NSGRAPHICSCONTEXT_PAS_C}
{$include AppKitDefines.inc}
{$include NSGraphics.inc}
{ NSGraphicsContext }
NSGraphicsContext = class(NSObject)
public
class function getClass: objc.id; override;
// Instantiates from an appropriate concrete subclass depending on NSGraphicsContextDestinationAttributeName
// attribute
constructor graphicsContextWithAttributes(_attributes: CFDictionaryRef);
// Convenience cover method for [NSGraphicsContext graphicsContextWithAttributes:[NSDictionary
// dictionaryWithObject:<NSWindow instance> forKey:NSGraphicsContextDestinationAttributeName]]
constructor graphicsContextWithWindow(_window: objc.id {NSWindow});
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
// Convenience cover method for [NSGraphicsContext graphicsContextWithAttributes:[NSDictionary
// dictionaryWithObject:<NSBitmapImageRep instance> forKey:NSGraphicsContextDestinationAttributeName]].
// Only NSBitmapImageRep instances with isPlanar == NO are supported.
constructor graphicsContextWithBitmapImageRep(_bitmapRep: objc.id {NSBitmapImageRep});
// Instantiates from an arbitrary graphicsPort (usually CGContextRef). initialFlippedState
// is used to determine the return value from -isFlipped when no view is focused in
// the context.
constructor graphicsContextWithGraphicsPort_flipped(_graphicsPort: Pointer; _initialFlippedState: LongBool);
{.$endif}
// Setting and identifying the current context in the thread
constructor currentContext;
class procedure setCurrentContext(_context: objc.id {NSGraphicsContext});
// Convenience cover method for [[NSGraphicsContext currentContext] isDrawingToScreen]
class function currentContextDrawingToScreen: LongBool;
// Graphics state controls
// Calls -saveGraphicsContext, and pushes the current context on per-thread stack.
// It's functional equivalent of PSgsave
class procedure saveGraphicsState_;
// Pops a context from per-thread stack, makes it current, and calls -resotreGraphicsContext.
// It's functional equivalent of PSgrestore
class procedure restoreGraphicsState_;
// Makes gState's context current, and resets graphics state. The gState must be created
// in the calling thread
class procedure setGraphicsState(_gState: Integer);
// Returns attributes used to create this instance
function attributes: CFDictionaryRef;
// Testing the drawing destination
function isDrawingToScreen: LongBool;
// Controlling the context
procedure saveGraphicsState;
procedure restoreGraphicsState;
procedure flushGraphics;
// Focus Stack support (abstract)
function focusStack: Pointer;
procedure setFocusStack(_stack: Pointer);
// Platform specific drawing context (usually CGContextRef)
function graphicsPort: Pointer;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
// Returns the flip state of the receiver. The state is determined by messaging -isFlipped
// to the focus view in the context. If no view has focus, returns NO unless the receiver
// is instantiated via graphicsContextWithGraphicsPort:drawingToScreen:flipped: with
// initialFlippedState == YES.
function isFlipped: LongBool;
{.$endif}
procedure setShouldAntialias(_antialias: LongBool);
function shouldAntialias: LongBool;
procedure setImageInterpolation(_interpolation: NSImageInterpolation);
function imageInterpolation: NSImageInterpolation;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
procedure setPatternPhase(_phase: NSPoint);
function patternPhase: NSPoint;
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
procedure setCompositingOperation(_operation: NSCompositingOperation);
function compositingOperation: NSCompositingOperation;
{.$endif}
function CIContext: objc.id;{CIContext}
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
{.$endif}
{$endif}
{$endif}
{$ifdef IMPLEMENTATION}
const
StrNSGraphicsContext_NSGraphicsContext = 'NSGraphicsContext';
StrNSGraphicsContext_graphicsContextWithAttributes = 'graphicsContextWithAttributes:';
StrNSGraphicsContext_graphicsContextWithWindow = 'graphicsContextWithWindow:';
StrNSGraphicsContext_graphicsContextWithBitmapImageRep = 'graphicsContextWithBitmapImageRep:';
StrNSGraphicsContext_graphicsContextWithGraphicsPort_flipped = 'graphicsContextWithGraphicsPort:flipped:';
StrNSGraphicsContext_currentContext = 'currentContext';
StrNSGraphicsContext_setCurrentContext = 'setCurrentContext:';
StrNSGraphicsContext_currentContextDrawingToScreen = 'currentContextDrawingToScreen';
StrNSGraphicsContext_saveGraphicsState = 'saveGraphicsState';
StrNSGraphicsContext_restoreGraphicsState = 'restoreGraphicsState';
StrNSGraphicsContext_setGraphicsState = 'setGraphicsState:';
StrNSGraphicsContext_attributes = 'attributes';
StrNSGraphicsContext_isDrawingToScreen = 'isDrawingToScreen';
StrNSGraphicsContext_flushGraphics = 'flushGraphics';
StrNSGraphicsContext_focusStack = 'focusStack';
StrNSGraphicsContext_setFocusStack = 'setFocusStack:';
StrNSGraphicsContext_graphicsPort = 'graphicsPort';
StrNSGraphicsContext_isFlipped = 'isFlipped';
StrNSGraphicsContext_setShouldAntialias = 'setShouldAntialias:';
StrNSGraphicsContext_shouldAntialias = 'shouldAntialias';
StrNSGraphicsContext_setImageInterpolation = 'setImageInterpolation:';
StrNSGraphicsContext_imageInterpolation = 'imageInterpolation';
StrNSGraphicsContext_setPatternPhase = 'setPatternPhase:';
StrNSGraphicsContext_patternPhase = 'patternPhase';
StrNSGraphicsContext_setCompositingOperation = 'setCompositingOperation:';
StrNSGraphicsContext_compositingOperation = 'compositingOperation';
StrNSGraphicsContext_CIContext = 'CIContext';
{ NSGraphicsContext }
class function NSGraphicsContext.getClass: objc.id;
begin
Result := objc_getClass(StrNSGraphicsContext_NSGraphicsContext);
end;
constructor NSGraphicsContext.graphicsContextWithAttributes(_attributes: CFDictionaryRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_attributes: CFDictionaryRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSGraphicsContext_graphicsContextWithAttributes)), _attributes);
end;
constructor NSGraphicsContext.graphicsContextWithWindow(_window: objc.id {NSWindow});
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_window: objc.id {NSWindow}): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSGraphicsContext_graphicsContextWithWindow)), _window);
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
constructor NSGraphicsContext.graphicsContextWithBitmapImageRep(_bitmapRep: objc.id {NSBitmapImageRep});
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_bitmapRep: objc.id {NSBitmapImageRep}): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSGraphicsContext_graphicsContextWithBitmapImageRep)), _bitmapRep);
end;
constructor NSGraphicsContext.graphicsContextWithGraphicsPort_flipped(_graphicsPort: Pointer; _initialFlippedState: LongBool);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_graphicsPort: Pointer; _initialFlippedState: LongBool): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSGraphicsContext_graphicsContextWithGraphicsPort_flipped)), _graphicsPort, _initialFlippedState);
end;
{.$endif}
constructor NSGraphicsContext.currentContext;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSGraphicsContext_currentContext)));
end;
class procedure NSGraphicsContext.setCurrentContext(_context: objc.id {NSGraphicsContext});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_context: objc.id {NSGraphicsContext}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(getClass, sel_registerName(PChar(StrNSGraphicsContext_setCurrentContext)), _context);
end;
class function NSGraphicsContext.currentContextDrawingToScreen: LongBool;
begin
Result := LongBool(objc_msgSend(getClass, sel_registerName(PChar(StrNSGraphicsContext_currentContextDrawingToScreen)), []));
end;
class procedure NSGraphicsContext.saveGraphicsState_;
begin
objc_msgSend(getClass, sel_registerName(PChar(StrNSGraphicsContext_saveGraphicsState)), []);
end;
class procedure NSGraphicsContext.restoreGraphicsState_;
begin
objc_msgSend(getClass, sel_registerName(PChar(StrNSGraphicsContext_restoreGraphicsState)), []);
end;
class procedure NSGraphicsContext.setGraphicsState(_gState: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_gState: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(getClass, sel_registerName(PChar(StrNSGraphicsContext_setGraphicsState)), _gState);
end;
function NSGraphicsContext.attributes: CFDictionaryRef;
begin
Result := CFDictionaryRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_attributes)), []));
end;
function NSGraphicsContext.isDrawingToScreen: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_isDrawingToScreen)), []));
end;
procedure NSGraphicsContext.saveGraphicsState;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_saveGraphicsState)), []);
end;
procedure NSGraphicsContext.restoreGraphicsState;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_restoreGraphicsState)), []);
end;
procedure NSGraphicsContext.flushGraphics;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_flushGraphics)), []);
end;
function NSGraphicsContext.focusStack: Pointer;
begin
Result := Pointer(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_focusStack)), []));
end;
procedure NSGraphicsContext.setFocusStack(_stack: Pointer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_stack: Pointer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSGraphicsContext_setFocusStack)), _stack);
end;
function NSGraphicsContext.graphicsPort: Pointer;
begin
Result := Pointer(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_graphicsPort)), []));
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
function NSGraphicsContext.isFlipped: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_isFlipped)), []));
end;
{.$endif}
procedure NSGraphicsContext.setShouldAntialias(_antialias: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_antialias: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSGraphicsContext_setShouldAntialias)), _antialias);
end;
function NSGraphicsContext.shouldAntialias: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_shouldAntialias)), []));
end;
procedure NSGraphicsContext.setImageInterpolation(_interpolation: NSImageInterpolation);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_interpolation: NSImageInterpolation); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSGraphicsContext_setImageInterpolation)), _interpolation);
end;
function NSGraphicsContext.imageInterpolation: NSImageInterpolation;
begin
Result := NSImageInterpolation(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_imageInterpolation)), []));
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
procedure NSGraphicsContext.setPatternPhase(_phase: NSPoint);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_phase: NSPoint); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSGraphicsContext_setPatternPhase)), _phase);
end;
function NSGraphicsContext.patternPhase: NSPoint;
begin
objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSGraphicsContext_patternPhase)), []);
end;
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
procedure NSGraphicsContext.setCompositingOperation(_operation: NSCompositingOperation);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_operation: NSCompositingOperation); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSGraphicsContext_setCompositingOperation)), _operation);
end;
function NSGraphicsContext.compositingOperation: NSCompositingOperation;
begin
Result := NSCompositingOperation(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_compositingOperation)), []));
end;
{.$endif}
function NSGraphicsContext.CIContext: objc.id;
begin
Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSGraphicsContext_CIContext)), []));
end;
{$endif}

View File

@ -1,189 +1,752 @@
{%mainunit appkit.pas}
{
(*
NSImage.h
Application Kit
Copyright (c) 1994-2005, Apple Computer, Inc.
All rights reserved.
}
*)
{$ifdef HEADER}
{$ifndef NSIMAGE_PAS_H}
{$define NSIMAGE_PAS_H}
{#import <AppKit/NSGraphics.h>
#import <AppKit/NSBitmapImageRep.h>}
//#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
{$include NSGraphics.inc}
{$include NSBitmapImageRep.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
{.$endif}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
{.$endif}
{.$endif}
type
NSImageLoadStatus = (
NSImageLoadStatusCompleted,
NSImageLoadStatusCancelled,
NSImageLoadStatusInvalidData,
NSImageLoadStatusUnexpectedEOF,
NSImageLoadStatusCompleted,
NSImageLoadStatusCancelled,
NSImageLoadStatusInvalidData,
NSImageLoadStatusUnexpectedEOF,
NSImageLoadStatusReadError
);
type
NSImageCacheMode = (
NSImageCacheDefault, // unspecified. use image rep's default
NSImageCacheAlways, // always generate a cache when drawing
NSImageCacheBySize, // cache if cache size is smaller than original data
NSImageCacheNever // never cache, always draw direct
NSImageCacheDefault,
NSImageCacheAlways,
NSImageCacheBySize,
NSImageCacheNever
);
//#endif
{ Class and method name strings }
const
Str_NSImage = 'NSImage';
Str_initWithContentsOfFile = 'initWithContentsOfFile:';
{$endif}
{$endif}
{$ifdef FORWARD}
{$ifndef NSIMAGE_PAS__FORWARD}
{$define NSIMAGE_PAS__FORWARD}
NSImage = class;
{$endif}
{$endif}
{$ifdef CLASSES}
{$ifndef NSIMAGE_PAS_C}
{$define NSIMAGE_PAS_C}
{#import <AppKit/NSGraphics.h>
#import <AppKit/NSBitmapImageRep.h>}
{$include NSGraphics.inc}
{$include NSBitmapImageRep.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
{.$endif}
//@class NSArray, NSColor, NSImageRep, NSPasteboard, NSURL;
{ NSImage }
NSImage = class(NSObject) // <NSCopying, NSCoding>
NSImage = class(NSObject)
public
{ Extra binding functions }
class function getClass: objc.id; override;
public
{
+ (id)imageNamed:(NSString *)name; /* If this finds & creates the image, only name is saved when archived */
- (id)initWithSize:(NSSize)aSize;
- (id)initWithData:(NSData *)data; /* When archived, saves contents */}
constructor initWithContentsOfFile(fileName: CFStringRef); { When archived, saves contents }
{- (id)initWithContentsOfURL:(NSURL *)url; /* When archived, saves contents */
- (id)initByReferencingFile:(NSString *)fileName; /* When archived, saves fileName */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
- (id)initByReferencingURL:(NSURL *)url; /* When archived, saves url, supports progressive loading */
#endif
- (id)initWithPasteboard:(NSPasteboard *)pasteboard;
- (void)setSize:(NSSize)aSize;
- (NSSize)size;
- (BOOL)setName:(NSString *)string;
- (NSString *)name;
- (void)setScalesWhenResized:(BOOL)flag;
- (BOOL)scalesWhenResized;
- (void)setDataRetained:(BOOL)flag;
- (BOOL)isDataRetained;
- (void)setCachedSeparately:(BOOL)flag;
- (BOOL)isCachedSeparately;
- (void)setCacheDepthMatchesImageDepth:(BOOL)flag;
- (BOOL)cacheDepthMatchesImageDepth;
- (void)setBackgroundColor:(NSColor *)aColor;
- (NSColor *)backgroundColor;
- (void)setUsesEPSOnResolutionMismatch:(BOOL)flag;
- (BOOL)usesEPSOnResolutionMismatch;
- (void)setPrefersColorMatch:(BOOL)flag;
- (BOOL)prefersColorMatch;
- (void)setMatchesOnMultipleResolution:(BOOL)flag;
- (BOOL)matchesOnMultipleResolution;
- (void)dissolveToPoint:(NSPoint)point fraction:(float)aFloat;
- (void)dissolveToPoint:(NSPoint)point fromRect:(NSRect)rect fraction:(float)aFloat;
- (void)compositeToPoint:(NSPoint)point operation:(NSCompositingOperation)op;
- (void)compositeToPoint:(NSPoint)point fromRect:(NSRect)rect operation:(NSCompositingOperation)op;
- (void)compositeToPoint:(NSPoint)point operation:(NSCompositingOperation)op fraction:(float)delta;
- (void)compositeToPoint:(NSPoint)point fromRect:(NSRect)rect operation:(NSCompositingOperation)op fraction:(float)delta;
- (void)drawAtPoint:(NSPoint)point fromRect:(NSRect)fromRect operation:(NSCompositingOperation)op fraction:(float)delta;
- (void)drawInRect:(NSRect)rect fromRect:(NSRect)fromRect operation:(NSCompositingOperation)op fraction:(float)delta;
- (BOOL)drawRepresentation:(NSImageRep *)imageRep inRect:(NSRect)rect;
- (void)recache;
- (NSData *)TIFFRepresentation;
- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp factor:(float)aFloat;
- (NSArray *)representations;
- (void)addRepresentations:(NSArray *)imageReps;
- (void)addRepresentation:(NSImageRep *)imageRep;
- (void)removeRepresentation:(NSImageRep *)imageRep;
- (BOOL)isValid;
- (void)lockFocus;
- (void)lockFocusOnRepresentation:(NSImageRep *)imageRepresentation;
- (void)unlockFocus;
- (NSImageRep *)bestRepresentationForDevice:(NSDictionary *)deviceDescription;
- (void)setDelegate:(id)anObject;
- (id)delegate;
/* These return union of all the types registered with NSImageRep.
*/
+ (NSArray *)imageUnfilteredFileTypes;
+ (NSArray *)imageUnfilteredPasteboardTypes;
+ (NSArray *)imageFileTypes;
+ (NSArray *)imagePasteboardTypes;
+ (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard;
- (void)setFlipped:(BOOL)flag;
- (BOOL)isFlipped;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
- (void)cancelIncrementalLoad;
-(void)setCacheMode:(NSImageCacheMode)mode;
-(NSImageCacheMode)cacheMode;
#endif
@end
#ifdef WIN32
@interface NSImage (NSWindowsExtensions)
- (id)initWithIconHandle:(void * /* HICON */)icon;
- (id)initWithBitmapHandle:(void * /* HBITMAP */)bitmap;
@end
#endif
@interface NSObject(NSImageDelegate)
- (NSImage *)imageDidNotDraw:(id)sender inRect:(NSRect)aRect;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
- (void)image:(NSImage*)image willLoadRepresentation:(NSImageRep*)rep;
- (void)image:(NSImage*)image didLoadRepresentationHeader:(NSImageRep*)rep;
- (void)image:(NSImage*)image didLoadPartOfRepresentation:(NSImageRep*)rep withValidRows:(int)rows;
- (void)image:(NSImage*)image didLoadRepresentation:(NSImageRep*)rep withStatus:(NSImageLoadStatus)status;
#endif
@end
@interface NSBundle(NSBundleImageExtension)
- (NSString *)pathForImageResource:(NSString *)name; /* May return nil if no file found */
@end}
// All instance variables are private
constructor imageNamed(_name: CFStringRef);
// If this finds & creates the image, only name is saved when archived
constructor initWithSize(_aSize: NSSize);
constructor initWithData(_data: CFDataRef);
// When archived, saves contents
constructor initWithContentsOfFile(_fileName: CFStringRef);
// When archived, saves contents
constructor initWithContentsOfURL(_url: CFURLRef);
// When archived, saves contents
constructor initByReferencingFile(_fileName: CFStringRef);
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
constructor initByReferencingURL(_url: CFURLRef);
{.$endif}
constructor initWithPasteboard(_pasteboard: objc.id {NSPasteboard});
procedure setSize(_aSize: NSSize);
function size: NSSize;
function setName(__string: CFStringRef): LongBool;
function name: CFStringRef;
procedure setScalesWhenResized(_flag: LongBool);
function scalesWhenResized: LongBool;
procedure setDataRetained(_flag: LongBool);
function isDataRetained: LongBool;
procedure setCachedSeparately(_flag: LongBool);
function isCachedSeparately: LongBool;
procedure setCacheDepthMatchesImageDepth(_flag: LongBool);
function cacheDepthMatchesImageDepth: LongBool;
procedure setBackgroundColor(_aColor: objc.id {NSColor});
function backgroundColor: objc.id;{NSColor}
procedure setUsesEPSOnResolutionMismatch(_flag: LongBool);
function usesEPSOnResolutionMismatch: LongBool;
procedure setPrefersColorMatch(_flag: LongBool);
function prefersColorMatch: LongBool;
procedure setMatchesOnMultipleResolution(_flag: LongBool);
function matchesOnMultipleResolution: LongBool;
procedure dissolveToPoint_fraction(_point: NSPoint; _aFloat: Single);
procedure dissolveToPoint_fromRect_fraction(_point: NSPoint; _rect: NSRect; _aFloat: Single);
procedure compositeToPoint_operation(_point: NSPoint; _op: NSCompositingOperation);
procedure compositeToPoint_fromRect_operation(_point: NSPoint; _rect: NSRect; _op: NSCompositingOperation);
procedure compositeToPoint_operation_fraction(_point: NSPoint; _op: NSCompositingOperation; _delta: Single);
procedure compositeToPoint_fromRect_operation_fraction(_point: NSPoint; _rect: NSRect; _op: NSCompositingOperation; _delta: Single);
procedure drawAtPoint_fromRect_operation_fraction(_point: NSPoint; _fromRect: NSRect; _op: NSCompositingOperation; _delta: Single);
procedure drawInRect_fromRect_operation_fraction(_rect: NSRect; _fromRect: NSRect; _op: NSCompositingOperation; _delta: Single);
function drawRepresentation_inRect(_imageRep: objc.id {NSImageRep}; _rect: NSRect): LongBool;
procedure recache;
function TIFFRepresentation: CFDataRef;
function TIFFRepresentationUsingCompression_factor(_comp: NSTIFFCompression; _aFloat: Single): CFDataRef;
function representations: CFArrayRef;
procedure addRepresentations(_imageReps: CFArrayRef);
procedure addRepresentation(_imageRep: objc.id {NSImageRep});
procedure removeRepresentation(_imageRep: objc.id {NSImageRep});
function isValid: LongBool;
procedure lockFocus;
procedure lockFocusOnRepresentation(_imageRepresentation: objc.id {NSImageRep});
procedure unlockFocus;
function bestRepresentationForDevice(_deviceDescription: CFDictionaryRef): objc.id;{NSImageRep}
procedure setDelegate(_anObject: objc.id);
function delegate: objc.id;
// These return union of all the types registered with NSImageRep.
class function imageUnfilteredFileTypes: CFArrayRef;
class function imageUnfilteredPasteboardTypes: CFArrayRef;
class function imageFileTypes: CFArrayRef;
class function imagePasteboardTypes: CFArrayRef;
class function canInitWithPasteboard(_pasteboard: objc.id {NSPasteboard}): LongBool;
procedure setFlipped(_flag: LongBool);
function isFlipped: LongBool;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
procedure cancelIncrementalLoad;
procedure setCacheMode(_mode: NSImageCacheMode);
function cacheMode: NSImageCacheMode;
{.$endif}
constructor initWithIconHandle(_icon: Pointer);
constructor initWithBitmapHandle(_bitmap: Pointer);
end;
{.$endif}
{$endif}
{$endif}
{$ifdef IMPLEMENTATION}
const
StrNSImage_NSImage = 'NSImage';
StrNSImage_imageNamed = 'imageNamed:';
StrNSImage_initWithSize = 'initWithSize:';
StrNSImage_initWithData = 'initWithData:';
StrNSImage_initWithContentsOfFile = 'initWithContentsOfFile:';
StrNSImage_initWithContentsOfURL = 'initWithContentsOfURL:';
StrNSImage_initByReferencingFile = 'initByReferencingFile:';
StrNSImage_initByReferencingURL = 'initByReferencingURL:';
StrNSImage_initWithPasteboard = 'initWithPasteboard:';
StrNSImage_setSize = 'setSize:';
StrNSImage_size = 'size';
StrNSImage_setName = 'setName:';
StrNSImage_name = 'name';
StrNSImage_setScalesWhenResized = 'setScalesWhenResized:';
StrNSImage_scalesWhenResized = 'scalesWhenResized';
StrNSImage_setDataRetained = 'setDataRetained:';
StrNSImage_isDataRetained = 'isDataRetained';
StrNSImage_setCachedSeparately = 'setCachedSeparately:';
StrNSImage_isCachedSeparately = 'isCachedSeparately';
StrNSImage_setCacheDepthMatchesImageDepth = 'setCacheDepthMatchesImageDepth:';
StrNSImage_cacheDepthMatchesImageDepth = 'cacheDepthMatchesImageDepth';
StrNSImage_setBackgroundColor = 'setBackgroundColor:';
StrNSImage_backgroundColor = 'backgroundColor';
StrNSImage_setUsesEPSOnResolutionMismatch = 'setUsesEPSOnResolutionMismatch:';
StrNSImage_usesEPSOnResolutionMismatch = 'usesEPSOnResolutionMismatch';
StrNSImage_setPrefersColorMatch = 'setPrefersColorMatch:';
StrNSImage_prefersColorMatch = 'prefersColorMatch';
StrNSImage_setMatchesOnMultipleResolution = 'setMatchesOnMultipleResolution:';
StrNSImage_matchesOnMultipleResolution = 'matchesOnMultipleResolution';
StrNSImage_dissolveToPoint_fraction = 'dissolveToPoint:fraction:';
StrNSImage_dissolveToPoint_fromRect_fraction = 'dissolveToPoint:fromRect:fraction:';
StrNSImage_compositeToPoint_operation = 'compositeToPoint:operation:';
StrNSImage_compositeToPoint_fromRect_operation = 'compositeToPoint:fromRect:operation:';
StrNSImage_compositeToPoint_operation_fraction = 'compositeToPoint:operation:fraction:';
StrNSImage_compositeToPoint_fromRect_operation_fraction = 'compositeToPoint:fromRect:operation:fraction:';
StrNSImage_drawAtPoint_fromRect_operation_fraction = 'drawAtPoint:fromRect:operation:fraction:';
StrNSImage_drawInRect_fromRect_operation_fraction = 'drawInRect:fromRect:operation:fraction:';
StrNSImage_drawRepresentation_inRect = 'drawRepresentation:inRect:';
StrNSImage_recache = 'recache';
StrNSImage_TIFFRepresentation = 'TIFFRepresentation';
StrNSImage_TIFFRepresentationUsingCompression_factor = 'TIFFRepresentationUsingCompression:factor:';
StrNSImage_representations = 'representations';
StrNSImage_addRepresentations = 'addRepresentations:';
StrNSImage_addRepresentation = 'addRepresentation:';
StrNSImage_removeRepresentation = 'removeRepresentation:';
StrNSImage_isValid = 'isValid';
StrNSImage_lockFocus = 'lockFocus';
StrNSImage_lockFocusOnRepresentation = 'lockFocusOnRepresentation:';
StrNSImage_unlockFocus = 'unlockFocus';
StrNSImage_bestRepresentationForDevice = 'bestRepresentationForDevice:';
StrNSImage_setDelegate = 'setDelegate:';
StrNSImage_delegate = 'delegate';
StrNSImage_imageUnfilteredFileTypes = 'imageUnfilteredFileTypes';
StrNSImage_imageUnfilteredPasteboardTypes = 'imageUnfilteredPasteboardTypes';
StrNSImage_imageFileTypes = 'imageFileTypes';
StrNSImage_imagePasteboardTypes = 'imagePasteboardTypes';
StrNSImage_canInitWithPasteboard = 'canInitWithPasteboard:';
StrNSImage_setFlipped = 'setFlipped:';
StrNSImage_isFlipped = 'isFlipped';
StrNSImage_cancelIncrementalLoad = 'cancelIncrementalLoad';
StrNSImage_setCacheMode = 'setCacheMode:';
StrNSImage_cacheMode = 'cacheMode';
StrNSImage_initWithIconHandle = 'initWithIconHandle:';
StrNSImage_initWithBitmapHandle = 'initWithBitmapHandle:';
{ NSImage }
class function NSImage.getClass: objc.id;
begin
Result := objc_getClass(Str_NSImage);
Result := objc_getClass(StrNSImage_NSImage);
end;
constructor NSImage.initWithContentsOfFile(fileName: CFStringRef);
constructor NSImage.imageNamed(_name: CFStringRef);
type
initWithContentsOfFile_t = function (param1: objc.id; param2: SEL;
param3: CFStringRef): objc.id; cdecl;
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_name: CFStringRef): objc.id; cdecl;
var
vinit: initWithContentsOfFile_t;
vmethod: TmsgSendWrapper;
begin
ClassId := getClass();
allocbuf := objc_msgSend(ClassId, sel_registerName(PChar(Str_alloc)), []);
vinit := initWithContentsOfFile_t(@objc_msgSend);
Handle := vinit(allocbuf, sel_registerName(PChar(Str_initWithContentsOfFile)), fileName);
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSImage_imageNamed)), _name);
end;
constructor NSImage.initWithSize(_aSize: NSSize);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aSize: NSSize): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithSize)), _aSize);
end;
constructor NSImage.initWithData(_data: CFDataRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_data: CFDataRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithData)), _data);
end;
constructor NSImage.initWithContentsOfFile(_fileName: CFStringRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_fileName: CFStringRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithContentsOfFile)), _fileName);
end;
constructor NSImage.initWithContentsOfURL(_url: CFURLRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_url: CFURLRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithContentsOfURL)), _url);
end;
constructor NSImage.initByReferencingFile(_fileName: CFStringRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_fileName: CFStringRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initByReferencingFile)), _fileName);
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
constructor NSImage.initByReferencingURL(_url: CFURLRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_url: CFURLRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initByReferencingURL)), _url);
end;
{.$endif}
constructor NSImage.initWithPasteboard(_pasteboard: objc.id {NSPasteboard});
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_pasteboard: objc.id {NSPasteboard}): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithPasteboard)), _pasteboard);
end;
procedure NSImage.setSize(_aSize: NSSize);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aSize: NSSize); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setSize)), _aSize);
end;
function NSImage.size: NSSize;
begin
objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSImage_size)), []);
end;
function NSImage.setName(__string: CFStringRef): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;__string: CFStringRef): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSImage_setName)), __string));
end;
function NSImage.name: CFStringRef;
begin
Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_name)), []));
end;
procedure NSImage.setScalesWhenResized(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setScalesWhenResized)), _flag);
end;
function NSImage.scalesWhenResized: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_scalesWhenResized)), []));
end;
procedure NSImage.setDataRetained(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setDataRetained)), _flag);
end;
function NSImage.isDataRetained: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_isDataRetained)), []));
end;
procedure NSImage.setCachedSeparately(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setCachedSeparately)), _flag);
end;
function NSImage.isCachedSeparately: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_isCachedSeparately)), []));
end;
procedure NSImage.setCacheDepthMatchesImageDepth(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setCacheDepthMatchesImageDepth)), _flag);
end;
function NSImage.cacheDepthMatchesImageDepth: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_cacheDepthMatchesImageDepth)), []));
end;
procedure NSImage.setBackgroundColor(_aColor: objc.id {NSColor});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aColor: objc.id {NSColor}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setBackgroundColor)), _aColor);
end;
function NSImage.backgroundColor: objc.id;
begin
Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_backgroundColor)), []));
end;
procedure NSImage.setUsesEPSOnResolutionMismatch(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setUsesEPSOnResolutionMismatch)), _flag);
end;
function NSImage.usesEPSOnResolutionMismatch: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_usesEPSOnResolutionMismatch)), []));
end;
procedure NSImage.setPrefersColorMatch(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setPrefersColorMatch)), _flag);
end;
function NSImage.prefersColorMatch: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_prefersColorMatch)), []));
end;
procedure NSImage.setMatchesOnMultipleResolution(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setMatchesOnMultipleResolution)), _flag);
end;
function NSImage.matchesOnMultipleResolution: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_matchesOnMultipleResolution)), []));
end;
procedure NSImage.dissolveToPoint_fraction(_point: NSPoint; _aFloat: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _aFloat: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_dissolveToPoint_fraction)), _point, _aFloat);
end;
procedure NSImage.dissolveToPoint_fromRect_fraction(_point: NSPoint; _rect: NSRect; _aFloat: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _rect: NSRect; _aFloat: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_dissolveToPoint_fromRect_fraction)), _point, _rect, _aFloat);
end;
procedure NSImage.compositeToPoint_operation(_point: NSPoint; _op: NSCompositingOperation);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _op: NSCompositingOperation); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_compositeToPoint_operation)), _point, _op);
end;
procedure NSImage.compositeToPoint_fromRect_operation(_point: NSPoint; _rect: NSRect; _op: NSCompositingOperation);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _rect: NSRect; _op: NSCompositingOperation); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_compositeToPoint_fromRect_operation)), _point, _rect, _op);
end;
procedure NSImage.compositeToPoint_operation_fraction(_point: NSPoint; _op: NSCompositingOperation; _delta: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _op: NSCompositingOperation; _delta: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_compositeToPoint_operation_fraction)), _point, _op, _delta);
end;
procedure NSImage.compositeToPoint_fromRect_operation_fraction(_point: NSPoint; _rect: NSRect; _op: NSCompositingOperation; _delta: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _rect: NSRect; _op: NSCompositingOperation; _delta: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_compositeToPoint_fromRect_operation_fraction)), _point, _rect, _op, _delta);
end;
procedure NSImage.drawAtPoint_fromRect_operation_fraction(_point: NSPoint; _fromRect: NSRect; _op: NSCompositingOperation; _delta: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_point: NSPoint; _fromRect: NSRect; _op: NSCompositingOperation; _delta: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_drawAtPoint_fromRect_operation_fraction)), _point, _fromRect, _op, _delta);
end;
procedure NSImage.drawInRect_fromRect_operation_fraction(_rect: NSRect; _fromRect: NSRect; _op: NSCompositingOperation; _delta: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect; _fromRect: NSRect; _op: NSCompositingOperation; _delta: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_drawInRect_fromRect_operation_fraction)), _rect, _fromRect, _op, _delta);
end;
function NSImage.drawRepresentation_inRect(_imageRep: objc.id {NSImageRep}; _rect: NSRect): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_imageRep: objc.id {NSImageRep}; _rect: NSRect): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSImage_drawRepresentation_inRect)), _imageRep, _rect));
end;
procedure NSImage.recache;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_recache)), []);
end;
function NSImage.TIFFRepresentation: CFDataRef;
begin
Result := CFDataRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_TIFFRepresentation)), []));
end;
function NSImage.TIFFRepresentationUsingCompression_factor(_comp: NSTIFFCompression; _aFloat: Single): CFDataRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_comp: NSTIFFCompression; _aFloat: Single): CFDataRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFDataRef(vmethod(Handle, sel_registerName(PChar(StrNSImage_TIFFRepresentationUsingCompression_factor)), _comp, _aFloat));
end;
function NSImage.representations: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_representations)), []));
end;
procedure NSImage.addRepresentations(_imageReps: CFArrayRef);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_imageReps: CFArrayRef); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_addRepresentations)), _imageReps);
end;
procedure NSImage.addRepresentation(_imageRep: objc.id {NSImageRep});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_imageRep: objc.id {NSImageRep}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_addRepresentation)), _imageRep);
end;
procedure NSImage.removeRepresentation(_imageRep: objc.id {NSImageRep});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_imageRep: objc.id {NSImageRep}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_removeRepresentation)), _imageRep);
end;
function NSImage.isValid: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_isValid)), []));
end;
procedure NSImage.lockFocus;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_lockFocus)), []);
end;
procedure NSImage.lockFocusOnRepresentation(_imageRepresentation: objc.id {NSImageRep});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_imageRepresentation: objc.id {NSImageRep}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_lockFocusOnRepresentation)), _imageRepresentation);
end;
procedure NSImage.unlockFocus;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_unlockFocus)), []);
end;
function NSImage.bestRepresentationForDevice(_deviceDescription: CFDictionaryRef): objc.id;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_deviceDescription: CFDictionaryRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSImage_bestRepresentationForDevice)), _deviceDescription));
end;
procedure NSImage.setDelegate(_anObject: objc.id);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_anObject: objc.id); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setDelegate)), _anObject);
end;
function NSImage.delegate: objc.id;
begin
Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_delegate)), []));
end;
class function NSImage.imageUnfilteredFileTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImage_imageUnfilteredFileTypes)), []));
end;
class function NSImage.imageUnfilteredPasteboardTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImage_imageUnfilteredPasteboardTypes)), []));
end;
class function NSImage.imageFileTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImage_imageFileTypes)), []));
end;
class function NSImage.imagePasteboardTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImage_imagePasteboardTypes)), []));
end;
class function NSImage.canInitWithPasteboard(_pasteboard: objc.id {NSPasteboard}): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_pasteboard: objc.id {NSPasteboard}): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(getClass, sel_registerName(PChar(StrNSImage_canInitWithPasteboard)), _pasteboard));
end;
procedure NSImage.setFlipped(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setFlipped)), _flag);
end;
function NSImage.isFlipped: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_isFlipped)), []));
end;
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2}
procedure NSImage.cancelIncrementalLoad;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_cancelIncrementalLoad)), []);
end;
procedure NSImage.setCacheMode(_mode: NSImageCacheMode);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_mode: NSImageCacheMode); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImage_setCacheMode)), _mode);
end;
function NSImage.cacheMode: NSImageCacheMode;
begin
Result := NSImageCacheMode(objc_msgSend(Handle, sel_registerName(PChar(StrNSImage_cacheMode)), []));
end;
{.$endif}
constructor NSImage.initWithIconHandle(_icon: Pointer);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_icon: Pointer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithIconHandle)), _icon);
end;
constructor NSImage.initWithBitmapHandle(_bitmap: Pointer);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_bitmap: Pointer): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSImage_initWithBitmapHandle)), _bitmap);
end;
{$endif}

View File

@ -0,0 +1,442 @@
{%mainunit appkit.pas}
(*
NSImageRep.h
Application Kit
Copyright (c) 1994-2005, Apple Computer, Inc.
All rights reserved.
*)
{$ifdef HEADER}
{$ifndef NSIMAGEREP_PAS_H}
{$define NSIMAGEREP_PAS_H}
{$include AppKitDefines.inc}
//const
// NSImageRepRegistryChangedNotification = NSImageRepRegistryDidChangeNotification /* obsolete name */;
// NSImageRepMatchesDevice indicates the value is variable, depending on the output
// device. It can be passed in (or received back) as the value of bitsPerSample, pixelsWide,
// and pixelsHigh.
const
NSImageRepMatchesDevice = 0;
//APPKIT_EXTERN NSString *NSImageRepRegistryDidChangeNotification;
{$endif}
{$endif}
{$ifdef FORWARD}
{$ifndef NSIMAGEREP_PAS__FORWARD}
{$define NSIMAGEREP_PAS__FORWARD}
NSImageRep = class;
{$endif}
{$endif}
{$ifdef CLASSES}
{$ifndef NSIMAGEREP_PAS_C}
{$define NSIMAGEREP_PAS_C}
{$include AppKitDefines.inc}
{ NSImageRep }
NSImageRep = class(NSObject)
public
class function getClass: objc.id; override;
// All instance variables are private
// Drawing methods. drawAtPoint: and drawInRect: go through draw after modifying the
// CTM.
function draw: LongBool;
function drawAtPoint(_point: NSPoint): LongBool;
function drawInRect(_rect: NSRect): LongBool;
// Methods to return info about the image. NSImageRep provides storage for all of these;
// however, it's illegal to set them in some subclasses.
procedure setSize(_aSize: NSSize);
function size: NSSize;
procedure setAlpha(_flag: LongBool);
function hasAlpha: LongBool;
procedure setOpaque(_flag: LongBool);
function isOpaque: LongBool;
procedure setColorSpaceName(__string: CFStringRef);
function colorSpaceName: CFStringRef;
procedure setBitsPerSample(_anInt: Integer);
function bitsPerSample: Integer;
procedure setPixelsWide(_anInt: Integer);
function pixelsWide: Integer;
procedure setPixelsHigh(_anInt: Integer);
function pixelsHigh: Integer;
// The rest of the methods all deal with subclassers which can read/write data in files
// or pasteboards.
// Registry management: Subclasses which deal with file & pasteboard types should register
// themselves. These classes should also implement imageUnfilteredFileTypes, imageUnfilteredPasteboardTypes,
// initWithData:, canInitWithData:, imageRepWithData:, and, if they have the ability
// to read multiple images from a file, imageRepsWithData:. These last three should
// not do any filtering; all filtering is automatic.
class procedure registerImageRepClass(_imageRepClass: _Class);
class procedure unregisterImageRepClass(_imageRepClass: _Class);
class function registeredImageRepClasses: CFArrayRef;
class function imageRepClassForFileType(__type: CFStringRef): _Class;
class function imageRepClassForPasteboardType(__type: CFStringRef): _Class;
class function imageRepClassForData(_data: CFDataRef): _Class;
// Should be overridden by subclassers to load an unfiltered image.
class function canInitWithData(_data: CFDataRef): LongBool;
// Implemented by subclassers to indicate what data types they can deal with.
class function imageUnfilteredFileTypes: CFArrayRef;
class function imageUnfilteredPasteboardTypes: CFArrayRef;
// These expand the unfiltered lists returned by imageUnfilteredFileTypes and imageUnfilteredPasteboardTypes.
class function imageFileTypes: CFArrayRef;
class function imagePasteboardTypes: CFArrayRef;
// Convenience method: Checks to see if any of the types on the pasteboard can be understood
// by a registered imagerep class after filtering or if the pasteboard contains a filename
// that can be understood by a registered imagerep class after filtering. If sent to
// a subclass, does this for just the types understood by the subclass.
class function canInitWithPasteboard(_pasteboard: objc.id {NSPasteboard}): LongBool;
// Convenience methods: Checks to see if the provided file or pasteboard types can
// be understood by a registered imagerep class after filtering; if so, calls imageRepsWithData:
// or imageRepWithData:. If sent to a subclass, does this just for the types understood
// by that subclass.
class function imageRepsWithContentsOfFile(_filename: CFStringRef): CFArrayRef;
constructor imageRepWithContentsOfFile(_filename: CFStringRef);
class function imageRepsWithContentsOfURL(_url: CFURLRef): CFArrayRef;
constructor imageRepWithContentsOfURL(_url: CFURLRef);
class function imageRepsWithPasteboard(_pasteboard: objc.id {NSPasteboard}): CFArrayRef;
constructor imageRepWithPasteboard(_pasteboard: objc.id {NSPasteboard});
end;
{$endif}
{$endif}
{$ifdef IMPLEMENTATION}
const
StrNSImageRep_NSImageRep = 'NSImageRep';
StrNSImageRep_draw = 'draw';
StrNSImageRep_drawAtPoint = 'drawAtPoint:';
StrNSImageRep_drawInRect = 'drawInRect:';
StrNSImageRep_setSize = 'setSize:';
StrNSImageRep_size = 'size';
StrNSImageRep_setAlpha = 'setAlpha:';
StrNSImageRep_hasAlpha = 'hasAlpha';
StrNSImageRep_setOpaque = 'setOpaque:';
StrNSImageRep_isOpaque = 'isOpaque';
StrNSImageRep_setColorSpaceName = 'setColorSpaceName:';
StrNSImageRep_colorSpaceName = 'colorSpaceName';
StrNSImageRep_setBitsPerSample = 'setBitsPerSample:';
StrNSImageRep_bitsPerSample = 'bitsPerSample';
StrNSImageRep_setPixelsWide = 'setPixelsWide:';
StrNSImageRep_pixelsWide = 'pixelsWide';
StrNSImageRep_setPixelsHigh = 'setPixelsHigh:';
StrNSImageRep_pixelsHigh = 'pixelsHigh';
StrNSImageRep_registerImageRepClass = 'registerImageRepClass:';
StrNSImageRep_unregisterImageRepClass = 'unregisterImageRepClass:';
StrNSImageRep_registeredImageRepClasses = 'registeredImageRepClasses';
StrNSImageRep_imageRepClassForFileType = 'imageRepClassForFileType:';
StrNSImageRep_imageRepClassForPasteboardType = 'imageRepClassForPasteboardType:';
StrNSImageRep_imageRepClassForData = 'imageRepClassForData:';
StrNSImageRep_canInitWithData = 'canInitWithData:';
StrNSImageRep_imageUnfilteredFileTypes = 'imageUnfilteredFileTypes';
StrNSImageRep_imageUnfilteredPasteboardTypes = 'imageUnfilteredPasteboardTypes';
StrNSImageRep_imageFileTypes = 'imageFileTypes';
StrNSImageRep_imagePasteboardTypes = 'imagePasteboardTypes';
StrNSImageRep_canInitWithPasteboard = 'canInitWithPasteboard:';
StrNSImageRep_imageRepsWithContentsOfFile = 'imageRepsWithContentsOfFile:';
StrNSImageRep_imageRepWithContentsOfFile = 'imageRepWithContentsOfFile:';
StrNSImageRep_imageRepsWithContentsOfURL = 'imageRepsWithContentsOfURL:';
StrNSImageRep_imageRepWithContentsOfURL = 'imageRepWithContentsOfURL:';
StrNSImageRep_imageRepsWithPasteboard = 'imageRepsWithPasteboard:';
StrNSImageRep_imageRepWithPasteboard = 'imageRepWithPasteboard:';
{ NSImageRep }
class function NSImageRep.getClass: objc.id;
begin
Result := objc_getClass(StrNSImageRep_NSImageRep);
end;
function NSImageRep.draw: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_draw)), []));
end;
function NSImageRep.drawAtPoint(_point: NSPoint): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_point: NSPoint): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSImageRep_drawAtPoint)), _point));
end;
function NSImageRep.drawInRect(_rect: NSRect): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_rect: NSRect): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSImageRep_drawInRect)), _rect));
end;
procedure NSImageRep.setSize(_aSize: NSSize);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aSize: NSSize); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setSize)), _aSize);
end;
function NSImageRep.size: NSSize;
begin
objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSImageRep_size)), []);
end;
procedure NSImageRep.setAlpha(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setAlpha)), _flag);
end;
function NSImageRep.hasAlpha: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_hasAlpha)), []));
end;
procedure NSImageRep.setOpaque(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setOpaque)), _flag);
end;
function NSImageRep.isOpaque: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_isOpaque)), []));
end;
procedure NSImageRep.setColorSpaceName(__string: CFStringRef);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;__string: CFStringRef); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setColorSpaceName)), __string);
end;
function NSImageRep.colorSpaceName: CFStringRef;
begin
Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_colorSpaceName)), []));
end;
procedure NSImageRep.setBitsPerSample(_anInt: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_anInt: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setBitsPerSample)), _anInt);
end;
function NSImageRep.bitsPerSample: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_bitsPerSample)), []));
end;
procedure NSImageRep.setPixelsWide(_anInt: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_anInt: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setPixelsWide)), _anInt);
end;
function NSImageRep.pixelsWide: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_pixelsWide)), []));
end;
procedure NSImageRep.setPixelsHigh(_anInt: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_anInt: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSImageRep_setPixelsHigh)), _anInt);
end;
function NSImageRep.pixelsHigh: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSImageRep_pixelsHigh)), []));
end;
class procedure NSImageRep.registerImageRepClass(_imageRepClass: _Class);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_imageRepClass: _Class); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(getClass, sel_registerName(PChar(StrNSImageRep_registerImageRepClass)), _imageRepClass);
end;
class procedure NSImageRep.unregisterImageRepClass(_imageRepClass: _Class);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_imageRepClass: _Class); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(getClass, sel_registerName(PChar(StrNSImageRep_unregisterImageRepClass)), _imageRepClass);
end;
class function NSImageRep.registeredImageRepClasses: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImageRep_registeredImageRepClasses)), []));
end;
class function NSImageRep.imageRepClassForFileType(__type: CFStringRef): _Class;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;__type: CFStringRef): _Class; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := _Class(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_imageRepClassForFileType)), __type));
end;
class function NSImageRep.imageRepClassForPasteboardType(__type: CFStringRef): _Class;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;__type: CFStringRef): _Class; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := _Class(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_imageRepClassForPasteboardType)), __type));
end;
class function NSImageRep.imageRepClassForData(_data: CFDataRef): _Class;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_data: CFDataRef): _Class; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := _Class(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_imageRepClassForData)), _data));
end;
class function NSImageRep.canInitWithData(_data: CFDataRef): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_data: CFDataRef): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_canInitWithData)), _data));
end;
class function NSImageRep.imageUnfilteredFileTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImageRep_imageUnfilteredFileTypes)), []));
end;
class function NSImageRep.imageUnfilteredPasteboardTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImageRep_imageUnfilteredPasteboardTypes)), []));
end;
class function NSImageRep.imageFileTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImageRep_imageFileTypes)), []));
end;
class function NSImageRep.imagePasteboardTypes: CFArrayRef;
begin
Result := CFArrayRef(objc_msgSend(getClass, sel_registerName(PChar(StrNSImageRep_imagePasteboardTypes)), []));
end;
class function NSImageRep.canInitWithPasteboard(_pasteboard: objc.id {NSPasteboard}): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_pasteboard: objc.id {NSPasteboard}): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_canInitWithPasteboard)), _pasteboard));
end;
class function NSImageRep.imageRepsWithContentsOfFile(_filename: CFStringRef): CFArrayRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_filename: CFStringRef): CFArrayRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFArrayRef(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_imageRepsWithContentsOfFile)), _filename));
end;
constructor NSImageRep.imageRepWithContentsOfFile(_filename: CFStringRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_filename: CFStringRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSImageRep_imageRepWithContentsOfFile)), _filename);
end;
class function NSImageRep.imageRepsWithContentsOfURL(_url: CFURLRef): CFArrayRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_url: CFURLRef): CFArrayRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFArrayRef(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_imageRepsWithContentsOfURL)), _url));
end;
constructor NSImageRep.imageRepWithContentsOfURL(_url: CFURLRef);
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_url: CFURLRef): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSImageRep_imageRepWithContentsOfURL)), _url);
end;
class function NSImageRep.imageRepsWithPasteboard(_pasteboard: objc.id {NSPasteboard}): CFArrayRef;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_pasteboard: objc.id {NSPasteboard}): CFArrayRef; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := CFArrayRef(vmethod(getClass, sel_registerName(PChar(StrNSImageRep_imageRepsWithPasteboard)), _pasteboard));
end;
constructor NSImageRep.imageRepWithPasteboard(_pasteboard: objc.id {NSPasteboard});
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_pasteboard: objc.id {NSPasteboard}): objc.id; cdecl;
var
vmethod: TmsgSendWrapper;
begin
ClassID := getClass();
vmethod := TmsgSendWrapper(@objc_msgSend);
Handle := vmethod(ClassID, sel_registerName(PChar(StrNSImageRep_imageRepWithPasteboard)), _pasteboard);
end;
{$endif}

View File

@ -6,3 +6,7 @@ FRAMEWORK="/System/Library/Frameworks/AppKit.framework/Headers"
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSButton.h > ../appkit/NSButton.inc
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSWindow.h > ../appkit/NSWindow.inc
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSGraphics.h > ../appkit/NSGraphics.inc
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSImage.h > ../appkit/NSImage.inc
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSBitmapImageRep.h > ../appkit/NSBitmapImageRep.inc
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSImageRep.h > ../appkit/NSImageRep.inc
./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSGraphicsContext.h > ../appkit/NSGraphicsContext.inc

View File

@ -33,8 +33,8 @@
<Filename Value="simplewindow.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="simplewindow"/>
<CursorPos X="38" Y="51"/>
<TopLine Value="36"/>
<CursorPos X="63" Y="6"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="106"/>
<Loaded Value="True"/>
@ -338,19 +338,17 @@
</Unit45>
<Unit46>
<Filename Value="../../appkit/NSView.inc"/>
<CursorPos X="1" Y="136"/>
<TopLine Value="131"/>
<EditorIndex Value="7"/>
<CursorPos X="12" Y="4"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="37"/>
<Loaded Value="True"/>
</Unit46>
<Unit47>
<Filename Value="../../appkit/NSResponder.inc"/>
<CursorPos X="18" Y="12"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<CursorPos X="22" Y="228"/>
<TopLine Value="219"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit47>
<Unit48>
<Filename Value="../../appkit/NSActionCell.inc"/>

View File

@ -7,7 +7,7 @@
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<ActiveEditorIndexAtStart Value="2"/>
<ActiveEditorIndexAtStart Value="5"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -26,15 +26,15 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="56">
<Units Count="65">
<Unit0>
<Filename Value="statusitem.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="statusitem"/>
<CursorPos X="84" Y="40"/>
<TopLine Value="27"/>
<CursorPos X="1" Y="29"/>
<TopLine Value="11"/>
<EditorIndex Value="0"/>
<UsageCount Value="56"/>
<UsageCount Value="58"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@ -72,9 +72,11 @@
</Unit5>
<Unit6>
<Filename Value="../../appkit/AppKit.inc"/>
<CursorPos X="17" Y="5"/>
<CursorPos X="20" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSActionCell.h"/>
@ -124,8 +126,8 @@
</Unit13>
<Unit14>
<Filename Value="../../appkit/NSControl.inc"/>
<CursorPos X="43" Y="144"/>
<TopLine Value="138"/>
<CursorPos X="37" Y="6"/>
<TopLine Value="1"/>
<UsageCount Value="24"/>
</Unit14>
<Unit15>
@ -157,11 +159,9 @@
<Unit19>
<Filename Value="../../appkit/appkit.pas"/>
<UnitName Value="appkit"/>
<CursorPos X="32" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<CursorPos X="11" Y="11"/>
<TopLine Value="5"/>
<UsageCount Value="29"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="../../appkit/NSWindow.inc"/>
@ -247,10 +247,10 @@
<Filename Value="controller.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="controller"/>
<CursorPos X="19" Y="128"/>
<TopLine Value="119"/>
<CursorPos X="1" Y="176"/>
<TopLine Value="153"/>
<EditorIndex Value="1"/>
<UsageCount Value="40"/>
<UsageCount Value="42"/>
<Loaded Value="True"/>
</Unit33>
<Unit34>
@ -262,8 +262,8 @@
</Unit34>
<Unit35>
<Filename Value="../../appkit/NSImage.inc"/>
<CursorPos X="60" Y="170"/>
<TopLine Value="160"/>
<CursorPos X="49" Y="6"/>
<TopLine Value="1"/>
<UsageCount Value="28"/>
</Unit35>
<Unit36>
@ -299,9 +299,8 @@
<Unit40>
<Filename Value="../../foundation/foundation.pas"/>
<UnitName Value="foundation"/>
<CursorPos X="16" Y="10"/>
<TopLine Value="3"/>
<EditorIndex Value="4"/>
<CursorPos X="16" Y="28"/>
<TopLine Value="1"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit40>
@ -381,9 +380,8 @@
</Unit51>
<Unit52>
<Filename Value="../../appkit/NSGraphics.inc"/>
<CursorPos X="14" Y="11"/>
<TopLine Value="3"/>
<EditorIndex Value="3"/>
<CursorPos X="16" Y="28"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit52>
@ -395,26 +393,101 @@
</Unit53>
<Unit54>
<Filename Value="../../foundation/NSDate.inc"/>
<CursorPos X="30" Y="39"/>
<TopLine Value="32"/>
<CursorPos X="24" Y="117"/>
<TopLine Value="111"/>
<UsageCount Value="10"/>
</Unit54>
<Unit55>
<Filename Value="../../foundation/NSObjCRuntime.inc"/>
<CursorPos X="25" Y="188"/>
<TopLine Value="179"/>
<CursorPos X="39" Y="149"/>
<TopLine Value="143"/>
<UsageCount Value="10"/>
</Unit55>
<Unit56>
<Filename Value="../../../../../lazarus/lcl/interfaces/carbon/carbonwsextctrls.pp"/>
<UnitName Value="CarbonWSExtCtrls"/>
<CursorPos X="32" Y="31"/>
<TopLine Value="21"/>
<UsageCount Value="10"/>
</Unit56>
<Unit57>
<Filename Value="../../../../../lazarus/lcl/interfaces/qt/qtwsextctrls.pp"/>
<UnitName Value="QtWSExtCtrls"/>
<CursorPos X="39" Y="518"/>
<TopLine Value="512"/>
<UsageCount Value="10"/>
</Unit57>
<Unit58>
<Filename Value="../../../../../lazarus/lcl/widgetset/wsextctrls.pp"/>
<UnitName Value="WSExtCtrls"/>
<CursorPos X="46" Y="159"/>
<TopLine Value="153"/>
<UsageCount Value="10"/>
</Unit58>
<Unit59>
<Filename Value="../../../../../lazarus/lcl/interfaces/carbon/carbontrayicon.inc"/>
<CursorPos X="18" Y="43"/>
<TopLine Value="27"/>
<EditorIndex Value="2"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit59>
<Unit60>
<Filename Value="../../../../../lazarus/lcl/interfaces/carbon/carbonint.pas"/>
<UnitName Value="CarbonInt"/>
<CursorPos X="53" Y="39"/>
<TopLine Value="32"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit60>
<Unit61>
<Filename Value="../../../../../lazarus/lcl/interfaces/carbon/carbonobject.inc"/>
<CursorPos X="67" Y="9"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit61>
<Unit62>
<Filename Value="../../../../../lazarus/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<CursorPos X="18" Y="1110"/>
<TopLine Value="1097"/>
<UsageCount Value="10"/>
</Unit62>
<Unit63>
<Filename Value="../../appkit/NSBitmapImageRep.inc"/>
<CursorPos X="1" Y="66"/>
<TopLine Value="66"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit63>
<Unit64>
<Filename Value="../../appkit/NSImageRep.inc"/>
<CursorPos X="3" Y="14"/>
<TopLine Value="2"/>
<EditorIndex Value="4"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit64>
</Units>
<JumpHistory Count="2" HistoryIndex="1">
<JumpHistory Count="4" HistoryIndex="3">
<Position1>
<Filename Value="../../appkit/NSGraphics.inc"/>
<Caret Line="60" Column="117" TopLine="52"/>
<Filename Value="../../appkit/AppKit.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="../../appkit/NSGraphics.inc"/>
<Filename Value="../../appkit/NSImageRep.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="../../appkit/NSBitmapImageRep.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="../../appkit/NSBitmapImageRep.inc"/>
<Caret Line="170" Column="3" TopLine="157"/>
</Position4>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>