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


{$ifdef TYPES}
type
  NSInvocationPtr = ^NSInvocation;
{$endif}

{$ifdef CLASSES}

type
  NSInvocation = objcclass external (NSObject)
  private
    _frame: pointer;
    _retdata: pointer;
    _signature: id;
    _container: id;
    _retainedArgs: cuint8;
    _reserved:array[0..14] of cuint8;
  public
    class function invocationWithMethodSignature (sig: NSMethodSignature): NSInvocation; message 'invocationWithMethodSignature:';
    function methodSignature: NSMethodSignature; message 'methodSignature';
    procedure retainArguments; message 'retainArguments';
    function argumentsRetained: ObjCBOOL; message 'argumentsRetained';
    procedure setTarget(newValue: id); message 'setTarget:';
    function target: id; message 'target';
    procedure setSelector(newValue: SEL); message 'setSelector:';
    function selector: SEL; message 'selector';
    procedure getReturnValue (retLoc: pointer); message 'getReturnValue:';
    procedure setReturnValue (retLoc: pointer); message 'setReturnValue:';
    procedure getArgument_atIndex (argumentLocation: pointer; idx: NSInteger); message 'getArgument:atIndex:';
    procedure setArgument_atIndex (argumentLocation: pointer; idx: NSInteger); message 'setArgument:atIndex:';
    procedure invoke; message 'invoke';
    procedure invokeWithTarget (target_: id); message 'invokeWithTarget:';
  end;
{$endif}

{$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}

{$if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)}
{$ifdef TYPES}
const
  NSObjCNoType = 0;
  NSObjCVoidType = 'v';
  NSObjCCharType = 'c';
  NSObjCShortType = 's';
  NSObjCLongType = 'l';
  NSObjCLonglongType = 'q';
  NSObjCFloatType = 'f';
  NSObjCDoubleType = 'd';
  NSObjCBoolType = 'B';
  NSObjCSelectorType = ':';
  NSObjCObjectType = '@';
  NSObjCStructType = '{';
  NSObjCPointerType = '^';
  NSObjCStringType = '*';
  NSObjCArrayType = '[';
  NSObjCUnionType = '';
  NSObjCBitfield = 'b';

type
  NSObjCValue = record
    type_: NSInteger deprecated 'in 10_0, 10_5, 2_0, 2_0';
    value: record
      case longint of
        0: (charValue: char);
        1: (shortValue: cshort);
        2: (longValue: clong);
        3: (longlongValue: clonglong);
        4: (floatValue: single);
        5: (doubleValue: double);
        6: (boolValue: cbool);
        7: (selectorValue: SEL);
        8: (objectValue: id);
        9: (pointerValue: pointer);
        10: (structLocation: pointer);
        11: (cStringLocation: PChar);
    end;
  end;
type
  NSObjCValuePtr = ^NSObjCValue;
{$endif}

{$endif}
{$endif}