summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/foundation/NSScriptObjectSpecifiers.inc
blob: c8a39be749ea031e03e9c3ef7438092ffbcffbb2 (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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
{ Parsed from Foundation.framework NSScriptObjectSpecifiers.h }


{$ifdef TYPES}
type
  NSScriptObjectSpecifierPtr = ^NSScriptObjectSpecifier;
  NSIndexSpecifierPtr = ^NSIndexSpecifier;
  NSMiddleSpecifierPtr = ^NSMiddleSpecifier;
  NSNameSpecifierPtr = ^NSNameSpecifier;
  NSPositionalSpecifierPtr = ^NSPositionalSpecifier;
  NSPropertySpecifierPtr = ^NSPropertySpecifier;
  NSRandomSpecifierPtr = ^NSRandomSpecifier;
  NSRangeSpecifierPtr = ^NSRangeSpecifier;
  NSRelativeSpecifierPtr = ^NSRelativeSpecifier;
  NSUniqueIDSpecifierPtr = ^NSUniqueIDSpecifier;
  NSWhoseSpecifierPtr = ^NSWhoseSpecifier;
{$endif}

{$ifdef TYPES}
const
  NSNoSpecifierError = 0;
  NSNoTopLevelContainersSpecifierError = 1;
  NSContainerSpecifierError = 2;
  NSUnknownKeySpecifierError = 3;
  NSInvalidIndexSpecifierError = 4;
  NSInternalSpecifierError = 5;
  NSOperationNotSupportedForKeySpecifierError = 6;

type
  NSInsertionPosition = NSUInteger;
  NSInsertionPositionPtr = ^NSInsertionPosition;

const
  NSPositionAfter = 0;
  NSPositionBefore = 1;
  NSPositionBeginning = 2;
  NSPositionEnd = 3;
  NSPositionReplace = 4;

type
  NSRelativePosition = NSUInteger;
  NSRelativePositionPtr = ^NSRelativePosition;

const
  NSRelativeAfter = 0;
  NSRelativeBefore = 1;

type
  NSWhoseSubelementIdentifier = NSUInteger;
  NSWhoseSubelementIdentifierPtr = ^NSWhoseSubelementIdentifier;

const
  NSIndexSubelement = 0;
  NSEverySubelement = 1;
  NSMiddleSubelement = 2;
  NSRandomSubelement = 3;
  NSNoSubelement = 4;
{$endif}

{$ifdef CLASSES}

type
  NSScriptObjectSpecifier = objcclass external (NSObject, NSCodingProtocol)
  private
    _container: NSScriptObjectSpecifier;
    _child: NSScriptObjectSpecifier;
    _key: NSString;
    _containerClassDescription: NSScriptClassDescription;
    _containerIsObjectBeingTested: ObjCBOOL;
    _containerIsRangeContainerObject: ObjCBOOL;
    _padding:array[0..1] of char;
    _descriptor: NSAppleEventDescriptor;
    _error: NSInteger;
  public
    class function objectSpecifierWithDescriptor (descriptor: NSAppleEventDescriptor): NSScriptObjectSpecifier; message 'objectSpecifierWithDescriptor:'; { available in 10_5, NA }
    function initWithContainerSpecifier_key (container: NSScriptObjectSpecifier; property_: NSString): instancetype; message 'initWithContainerSpecifier:key:';
    function initWithContainerClassDescription_containerSpecifier_key (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:'; { NS_DESIGNATED_INITIALIZER }
    function initWithCoder (inCoder: NSCoder): instancetype; message 'initWithCoder:'; { NS_DESIGNATED_INITIALIZER }
    procedure setChildSpecifier(newValue: NSScriptObjectSpecifier); message 'setChildSpecifier:';
    function childSpecifier: NSScriptObjectSpecifier; message 'childSpecifier';
    procedure setContainerSpecifier(newValue: NSScriptObjectSpecifier); message 'setContainerSpecifier:';
    function containerSpecifier: NSScriptObjectSpecifier; message 'containerSpecifier';
    procedure setContainerIsObjectBeingTested(newValue: ObjCBOOL); message 'setContainerIsObjectBeingTested:';
    function containerIsObjectBeingTested: ObjCBOOL; message 'containerIsObjectBeingTested';
    procedure setContainerIsRangeContainerObject(newValue: ObjCBOOL); message 'setContainerIsRangeContainerObject:';
    function containerIsRangeContainerObject: ObjCBOOL; message 'containerIsRangeContainerObject';
    procedure setKey(newValue: NSString); message 'setKey:';
    function key: NSString; message 'key';
    procedure setContainerClassDescription(newValue: NSScriptClassDescription); message 'setContainerClassDescription:';
    function containerClassDescription: NSScriptClassDescription; message 'containerClassDescription';
    function keyClassDescription: NSScriptClassDescription; message 'keyClassDescription';
    function indicesOfObjectsByEvaluatingWithContainer_count (container: id; count: NSIntegerPtr): NSIntegerPtr; message 'indicesOfObjectsByEvaluatingWithContainer:count:';
    function objectsByEvaluatingWithContainers (containers: id): id; message 'objectsByEvaluatingWithContainers:';
    function objectsByEvaluatingSpecifier: id; message 'objectsByEvaluatingSpecifier';
    procedure setEvaluationErrorNumber(newValue: NSInteger); message 'setEvaluationErrorNumber:';
    function evaluationErrorNumber: NSInteger; message 'evaluationErrorNumber';
    function evaluationErrorSpecifier: NSScriptObjectSpecifier; message 'evaluationErrorSpecifier';
    function descriptor: NSAppleEventDescriptor; message 'descriptor';

    { Adopted protocols }
    procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  end;


type
  NSScriptObjectSpecifiers = objccategory external (NSObject)
    function objectSpecifier: NSScriptObjectSpecifier; message 'objectSpecifier';
    function indicesOfObjectsByEvaluatingObjectSpecifier (specifier: NSScriptObjectSpecifier): NSArray; message 'indicesOfObjectsByEvaluatingObjectSpecifier:';
  end;


type
  NSIndexSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
    _index: NSInteger;
  public
    function initWithContainerClassDescription_containerSpecifier_key_index (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString; index: NSInteger): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:index:'; { NS_DESIGNATED_INITIALIZER }
    procedure setIndex(newValue: NSInteger); message 'setIndex:';
    function index: NSInteger; message 'index';
  end;

type
  NSMiddleSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
  end;

type
  NSNameSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
    _name: NSString;
  public
    function initWithCoder (inCoder: NSCoder): instancetype; message 'initWithCoder:'; { NS_DESIGNATED_INITIALIZER }
    function initWithContainerClassDescription_containerSpecifier_key_name (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString; name: NSString): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:name:'; { NS_DESIGNATED_INITIALIZER }
    procedure setName(newValue: NSString); message 'setName:';
    function name: NSString; message 'name';
  end;

type
  NSPositionalSpecifier = objcclass external (NSObject)
  private
    _specifier: NSScriptObjectSpecifier;
    _unadjustedPosition: NSInsertionPosition;
    _insertionClassDescription: NSScriptClassDescription;
    _moreVars: id;
    _reserved0: pointer;
  public
    function initWithPosition_objectSpecifier (position: NSInsertionPosition; specifier: NSScriptObjectSpecifier): instancetype; message 'initWithPosition:objectSpecifier:'; { NS_DESIGNATED_INITIALIZER }
    function position: NSInsertionPosition; message 'position';
    function objectSpecifier: NSScriptObjectSpecifier; message 'objectSpecifier';
    procedure setInsertionClassDescription (classDescription: NSScriptClassDescription); message 'setInsertionClassDescription:';
    procedure evaluate; message 'evaluate';
    function insertionContainer: id; message 'insertionContainer';
    function insertionKey: NSString; message 'insertionKey';
    function insertionIndex: NSInteger; message 'insertionIndex';
    function insertionReplaces: ObjCBOOL; message 'insertionReplaces';
  end;

type
  NSPropertySpecifier = objcclass external (NSScriptObjectSpecifier)
  private
  end;

type
  NSRandomSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
  end;

type
  NSRangeSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
    _startSpec: NSScriptObjectSpecifier;
    _endSpec: NSScriptObjectSpecifier;
  public
    function initWithCoder (inCoder: NSCoder): instancetype; message 'initWithCoder:'; { NS_DESIGNATED_INITIALIZER }
    function initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString; startSpec: NSScriptObjectSpecifier; endSpec: NSScriptObjectSpecifier): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:'; { NS_DESIGNATED_INITIALIZER }
    procedure setStartSpecifier(newValue: NSScriptObjectSpecifier); message 'setStartSpecifier:';
    function startSpecifier: NSScriptObjectSpecifier; message 'startSpecifier';
    procedure setEndSpecifier(newValue: NSScriptObjectSpecifier); message 'setEndSpecifier:';
    function endSpecifier: NSScriptObjectSpecifier; message 'endSpecifier';
  end;

type
  NSRelativeSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
    _relativePosition: NSRelativePosition;
    _baseSpecifier: NSScriptObjectSpecifier;
  public
    function initWithCoder (inCoder: NSCoder): instancetype; message 'initWithCoder:'; { NS_DESIGNATED_INITIALIZER }
    function initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString; relPos: NSRelativePosition; baseSpecifier: NSScriptObjectSpecifier): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:'; { NS_DESIGNATED_INITIALIZER }
    procedure setRelativePosition(newValue: NSRelativePosition); message 'setRelativePosition:';
    function relativePosition: NSRelativePosition; message 'relativePosition';
    procedure setBaseSpecifier(newValue: NSScriptObjectSpecifier); message 'setBaseSpecifier:';
    function baseSpecifier: NSScriptObjectSpecifier; message 'baseSpecifier';
  end;

type
  NSUniqueIDSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
    _uniqueID: id;
  public
    function initWithCoder (inCoder: NSCoder): instancetype; message 'initWithCoder:'; { NS_DESIGNATED_INITIALIZER }
    function initWithContainerClassDescription_containerSpecifier_key_uniqueID (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString; uniqueID: id): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:uniqueID:'; { NS_DESIGNATED_INITIALIZER }
    procedure setUniqueID(newValue: id); message 'setUniqueID:';
    function uniqueID: id; message 'uniqueID';
  end;

type
  NSWhoseSpecifier = objcclass external (NSScriptObjectSpecifier)
  private
    _test: NSScriptWhoseTest;
    _startSubelementIdentifier: NSWhoseSubelementIdentifier;
    _startSubelementIndex: NSInteger;
    _endSubelementIdentifier: NSWhoseSubelementIdentifier;
    _endSubelementIndex: NSInteger;
  public
    function initWithCoder (inCoder: NSCoder): instancetype; message 'initWithCoder:'; { NS_DESIGNATED_INITIALIZER }
    function initWithContainerClassDescription_containerSpecifier_key_test (classDesc: NSScriptClassDescription; container: NSScriptObjectSpecifier; property_: NSString; test: NSScriptWhoseTest): instancetype; message 'initWithContainerClassDescription:containerSpecifier:key:test:'; { NS_DESIGNATED_INITIALIZER }
    procedure setTest(newValue: NSScriptWhoseTest); message 'setTest:';
    function test: NSScriptWhoseTest; message 'test';
    procedure setStartSubelementIdentifier(newValue: NSWhoseSubelementIdentifier); message 'setStartSubelementIdentifier:';
    function startSubelementIdentifier: NSWhoseSubelementIdentifier; message 'startSubelementIdentifier';
    procedure setStartSubelementIndex(newValue: NSInteger); message 'setStartSubelementIndex:';
    function startSubelementIndex: NSInteger; message 'startSubelementIndex';
    procedure setEndSubelementIdentifier(newValue: NSWhoseSubelementIdentifier); message 'setEndSubelementIdentifier:';
    function endSubelementIdentifier: NSWhoseSubelementIdentifier; message 'endSubelementIdentifier';
    procedure setEndSubelementIndex(newValue: NSInteger); message 'setEndSubelementIndex:';
    function endSubelementIndex: NSInteger; message 'endSubelementIndex';
  end;
{$endif}