summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/appkit/NSImageRep.inc
blob: 1e7d0eff9eea4c5db507fc4296dfdbc2cd046b79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{ Parsed from Appkit.framework NSImageRep.h }
{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }


{$ifdef TYPES}
{$ifndef NSIMAGEREP_PAS_T}
{$define NSIMAGEREP_PAS_T}

{ Constants }

const
  NSImageRepMatchesDevice = 0;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSIMAGEREP_PAS_R}
{$define NSIMAGEREP_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSIMAGEREP_PAS_F}
{$define NSIMAGEREP_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSIMAGEREP_PAS_S}
{$define NSIMAGEREP_PAS_S}

{ External string constants }
var
  NSImageRepRegistryDidChangeNotification: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  NSImageRep = objcclass;
  NSImageRepPointer = ^NSImageRep;
  NSImageRepPtr = NSImageRepPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSIMAGEREP_PAS_C}
{$define NSIMAGEREP_PAS_C}

{ NSImageRep }
  NSImageRep = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
  private
    __repFlags: bitpacked record
      case byte of
       0: (_anonbitfield_NSImageRep0: cuint);
       1: (
        _hasAlpha: 0..1;
        _isOpaque: 0..1;
        cacheParamsComputed: 0..1 deprecated;
        cacheAlphaComputed: 0..1 deprecated;
        loadState: 0..((1 shl 2)-1);
        keepCacheWindow: 0..1 deprecated;
        reserved: 0..1;
        _bitsPerSample: 0..((1 shl 8)-1);
        gsaved: 0..((1 shl 16)-1);
      );
      end;
    _colorSpaceName: NSString;
    _size: NSSize;
    _pixelsWide: cint;
    _pixelsHigh: cint;
    
  public
    function draw: Boolean; message 'draw';
    function drawAtPoint(point: NSPoint): Boolean; message 'drawAtPoint:';
    function drawInRect(rect: NSRect): Boolean; message 'drawInRect:';
    function drawInRect_fromRect_operation_fraction_respectFlipped_hints(dstSpacePortionRect: NSRect; srcSpacePortionRect: NSRect; op: NSCompositingOperation; requestedAlpha: CGFloat; respectContextIsFlipped: Boolean; hints: NSDictionary): Boolean; message 'drawInRect:fromRect:operation:fraction:respectFlipped:hints:';
    procedure setSize(aSize: NSSize); message 'setSize:';
    function size: NSSize; message 'size';
    procedure setAlpha(flag: Boolean); message 'setAlpha:';
    function hasAlpha: Boolean; message 'hasAlpha';
    procedure setOpaque(flag: Boolean); message 'setOpaque:';
    function isOpaque: Boolean; message 'isOpaque';
    procedure setColorSpaceName(string_: NSString); message 'setColorSpaceName:';
    function colorSpaceName: NSString; message 'colorSpaceName';
    procedure setBitsPerSample(anInt: NSInteger); message 'setBitsPerSample:';
    function bitsPerSample: NSInteger; message 'bitsPerSample';
    procedure setPixelsWide(anInt: NSInteger); message 'setPixelsWide:';
    function pixelsWide: NSInteger; message 'pixelsWide';
    procedure setPixelsHigh(anInt: NSInteger); message 'setPixelsHigh:';
    function pixelsHigh: NSInteger; message 'pixelsHigh';
    class procedure registerImageRepClass(imageRepClass: Pobjc_class); message 'registerImageRepClass:';
    class procedure unregisterImageRepClass(imageRepClass: Pobjc_class); message 'unregisterImageRepClass:';
    class function registeredImageRepClasses: NSArray; message 'registeredImageRepClasses';
    class function imageRepClassForFileType(type_: NSString): Pobjc_class; message 'imageRepClassForFileType:';
    class function imageRepClassForPasteboardType(type_: NSString): Pobjc_class; message 'imageRepClassForPasteboardType:';
    class function imageRepClassForType(type_: NSString): Pobjc_class; message 'imageRepClassForType:';
    class function imageRepClassForData(data: NSData): Pobjc_class; message 'imageRepClassForData:';
    class function canInitWithData(data: NSData): Boolean; message 'canInitWithData:';
    class function imageUnfilteredFileTypes: NSArray; message 'imageUnfilteredFileTypes';
    class function imageUnfilteredPasteboardTypes: NSArray; message 'imageUnfilteredPasteboardTypes';
    class function imageFileTypes: NSArray; message 'imageFileTypes';
    class function imagePasteboardTypes: NSArray; message 'imagePasteboardTypes';
    class function imageUnfilteredTypes: NSArray; message 'imageUnfilteredTypes';
    class function imageTypes: NSArray; message 'imageTypes';
    class function canInitWithPasteboard(pasteboard: NSPasteboard): Boolean; message 'canInitWithPasteboard:';
    class function imageRepsWithContentsOfFile(filename: NSString): NSArray; message 'imageRepsWithContentsOfFile:';
    class function imageRepWithContentsOfFile(filename: NSString): id; message 'imageRepWithContentsOfFile:';
    class function imageRepsWithContentsOfURL(url: NSURL): NSArray; message 'imageRepsWithContentsOfURL:';
    class function imageRepWithContentsOfURL(url: NSURL): id; message 'imageRepWithContentsOfURL:';
    class function imageRepsWithPasteboard(pasteboard: NSPasteboard): NSArray; message 'imageRepsWithPasteboard:';
    class function imageRepWithPasteboard(pasteboard: NSPasteboard): id; message 'imageRepWithPasteboard:';
    function CGImageForProposedRect_context_hints(proposedDestRect: NSRectPtr; context: NSGraphicsContext; hints: NSDictionary): CGImageRef; message 'CGImageForProposedRect:context:hints:';

    { Adopted Protocols }
    function copyWithZone(zone_: NSZonePtr): id;
    procedure encodeWithCoder(aCoder: NSCoder);
    function initWithCoder(aDecoder: NSCoder): id;
  end;

{$endif}
{$endif}