summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/appkit/NSNib.inc
blob: 3d55a71cb3956c4052fdb9f3a4bc1d3335d99a08 (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
{ Parsed from Appkit.framework NSNib.h }

{$ifdef TYPES}
{$ifndef NSNIB_PAS_T}
{$define NSNIB_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSNIB_PAS_R}
{$define NSNIB_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSNIB_PAS_F}
{$define NSNIB_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSNIB_PAS_S}
{$define NSNIB_PAS_S}

{ External string constants }
var
  NSNibOwner: NSString; cvar; external;
  NSNibTopLevelObjects: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  NSNib = objcclass;
  NSNibPointer = ^NSNib;
  NSNibPtr = NSNibPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSNIB_PAS_C}
{$define NSNIB_PAS_C}

{ NSNib }
  NSNib = objcclass external (NSObject, NSCodingProtocol)
  private
    _data: NSData;
    _images: NSArray;
    _sounds: NSArray;
    _bundle: NSBundle;
    __flags: record
      case byte of
       0: (_anonbitfield_NSNib0: cuint);
       1: (data: bitpacked record
        _isKeyed: 0..1;
        _reserved: 0..((1 shl 31)-1);
       end;
      );
      end;
    _path: NSString;
    reserved2: id;
    
  public
    function initWithContentsOfURL(nibFileURL: NSURL): id; message 'initWithContentsOfURL:';
    function initWithNibNamed_bundle(nibName: NSString; bundle: NSBundle): id; message 'initWithNibNamed:bundle:';
    function instantiateNibWithExternalNameTable(externalNameTable: NSDictionary): Boolean; message 'instantiateNibWithExternalNameTable:';
    function instantiateNibWithOwner_topLevelObjects(owner: id; topLevelObjects: NSArrayPointer): Boolean; message 'instantiateNibWithOwner:topLevelObjects:';

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

{$endif}
{$endif}