summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/foundation/NSIndexPath.inc
blob: 1d5c3cc839730eb656cea251ea3a066e3462b165 (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
{ Parsed from Foundation.framework NSIndexPath.h }

{$ifdef TYPES}
{$ifndef NSINDEXPATH_PAS_T}
{$define NSINDEXPATH_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSINDEXPATH_PAS_R}
{$define NSINDEXPATH_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSINDEXPATH_PAS_F}
{$define NSINDEXPATH_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSINDEXPATH_PAS_S}
{$define NSINDEXPATH_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSIndexPath = objcclass;
  NSIndexPathPointer = ^NSIndexPath;
  NSIndexPathPtr = NSIndexPathPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSINDEXPATH_PAS_C}
{$define NSINDEXPATH_PAS_C}

{ NSIndexPath }
  NSIndexPath = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
  private
    _indexes: NSUIntegerPtr;
    _hash: NSUInteger;
    _length: NSUInteger;
    _reserved: Pointer;
    
  public
    class function indexPathWithIndex(index: NSUInteger): id; message 'indexPathWithIndex:';
    class function indexPathWithIndexes_length(indexes: NSUIntegerPtr; length_: NSUInteger): id; message 'indexPathWithIndexes:length:';
    function initWithIndex(index: NSUInteger): id; message 'initWithIndex:';
    function initWithIndexes_length(indexes: NSUIntegerPtr; length_: NSUInteger): id; message 'initWithIndexes:length:';
    function indexPathByAddingIndex(index: NSUInteger): NSIndexPath; message 'indexPathByAddingIndex:';
    function indexPathByRemovingLastIndex: NSIndexPath; message 'indexPathByRemovingLastIndex';
    function indexAtPosition(position: NSUInteger): NSUInteger; message 'indexAtPosition:';
    function length: NSUInteger; message 'length';
    procedure getIndexes(indexes: NSUIntegerPtr); message 'getIndexes:';
    function compare(otherObject: NSIndexPath): NSComparisonResult; message 'compare:';

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

{$endif}
{$endif}