-
Notifications
You must be signed in to change notification settings - Fork 4
/
Action.inc
276 lines (231 loc) · 8.2 KB
/
Action.inc
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function Action_Create(AOwner: TComponent): TAction; cdecl;
begin
Result := TAction.Create(AOwner);
end;
procedure Action_Free(AObj: TAction); cdecl;
begin
AObj.Free;
end;
function Action_Execute(AObj: TAction): LongBool; cdecl;
begin
Result := AObj.Execute;
end;
function Action_Update(AObj: TAction): LongBool; cdecl;
begin
Result := AObj.Update;
end;
function Action_HasParent(AObj: TAction): LongBool; cdecl;
begin
Result := AObj.HasParent;
end;
function Action_FindComponent(AObj: TAction; AName: PWideChar): TComponent; cdecl;
begin
Result := AObj.FindComponent(AName);
end;
function Action_GetNamePath(AObj: TAction): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
procedure Action_Assign(AObj: TAction; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
function Action_ClassName(AObj: TAction): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function Action_Equals(AObj: TAction; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
function Action_GetHashCode(AObj: TAction): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function Action_ToString(AObj: TAction): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
function Action_GetCaption(AObj: TAction): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Caption);
end;
procedure Action_SetCaption(AObj: TAction; AValue: PWideChar); cdecl;
begin
AObj.Caption := AValue;
end;
function Action_GetChecked(AObj: TAction): LongBool; cdecl;
begin
Result := AObj.Checked;
end;
procedure Action_SetChecked(AObj: TAction; AValue: LongBool); cdecl;
begin
AObj.Checked := AValue;
end;
function Action_GetEnabled(AObj: TAction): LongBool; cdecl;
begin
Result := AObj.Enabled;
end;
procedure Action_SetEnabled(AObj: TAction; AValue: LongBool); cdecl;
begin
AObj.Enabled := AValue;
end;
function Action_GetGroupIndex(AObj: TAction): Integer; cdecl;
begin
Result := AObj.GroupIndex;
end;
procedure Action_SetGroupIndex(AObj: TAction; AValue: Integer); cdecl;
begin
AObj.GroupIndex := AValue;
end;
function Action_GetHint(AObj: TAction): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Hint);
end;
procedure Action_SetHint(AObj: TAction; AValue: PWideChar); cdecl;
begin
AObj.Hint := AValue;
end;
//function Action_GetImageIndex(AObj: TAction): TImageIndex; cdecl;
//begin
// Result := AObj.ImageIndex;
//end;
//
//procedure Action_SetImageIndex(AObj: TAction; AValue: TImageIndex); cdecl;
//begin
// AObj.ImageIndex := AValue;
//end;
function Action_GetShortCut(AObj: TAction): TShortCut; cdecl;
begin
Result := AObj.ShortCut;
end;
procedure Action_SetShortCut(AObj: TAction; AValue: TShortCut); cdecl;
begin
AObj.ShortCut := AValue;
end;
function Action_GetVisible(AObj: TAction): LongBool; cdecl;
begin
Result := AObj.Visible;
end;
procedure Action_SetVisible(AObj: TAction; AValue: LongBool); cdecl;
begin
AObj.Visible := AValue;
end;
procedure Action_SetOnExecute(AObj: TAction; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnExecute := nil;
TEventClass.Remove(AObj, geExecute);
Exit;
end;
AObj.OnExecute := TEventClass.OnExecute;
TEventClass.Add(AObj, geExecute, AEventId);
end;
procedure Action_SetOnUpdate(AObj: TAction; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnUpdate := nil;
TEventClass.Remove(AObj, geUpdate);
Exit;
end;
AObj.OnUpdate := TEventClass.OnUpdate;
TEventClass.Add(AObj, geUpdate, AEventId);
end;
//function Action_GetImages(AObj: TAction): TCustomImageList; cdecl;
//begin
// Result := AObj.Images;
//end;
function Action_GetIndex(AObj: TAction): Integer; cdecl;
begin
Result := AObj.Index;
end;
procedure Action_SetIndex(AObj: TAction; AValue: Integer); cdecl;
begin
AObj.Index := AValue;
end;
function Action_GetComponentCount(AObj: TAction): Integer; cdecl;
begin
Result := AObj.ComponentCount;
end;
function Action_GetComponentIndex(AObj: TAction): Integer; cdecl;
begin
Result := AObj.ComponentIndex;
end;
procedure Action_SetComponentIndex(AObj: TAction; AValue: Integer); cdecl;
begin
AObj.ComponentIndex := AValue;
end;
function Action_GetOwner(AObj: TAction): TComponent; cdecl;
begin
Result := AObj.Owner;
end;
function Action_GetName(AObj: TAction): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Name);
end;
procedure Action_SetName(AObj: TAction; AValue: PWideChar); cdecl;
begin
AObj.Name := AValue;
end;
function Action_GetTag(AObj: TAction): NativeInt; cdecl;
begin
Result := AObj.Tag;
end;
procedure Action_SetTag(AObj: TAction; AValue: NativeInt); cdecl;
begin
AObj.Tag := AValue;
end;
function Action_GetComponents(AObj: TAction; AIndex: Integer): TComponent; cdecl;
begin
Result := AObj.Components[AIndex];
end;
exports
Action_Create {$IFNDEF MSWINDOWS}name '_Action_Create'{$ENDIF},
Action_Free {$IFNDEF MSWINDOWS}name '_Action_Free'{$ENDIF},
Action_Execute {$IFNDEF MSWINDOWS}name '_Action_Execute'{$ENDIF},
Action_Update {$IFNDEF MSWINDOWS}name '_Action_Update'{$ENDIF},
Action_HasParent {$IFNDEF MSWINDOWS}name '_Action_HasParent'{$ENDIF},
Action_FindComponent {$IFNDEF MSWINDOWS}name '_Action_FindComponent'{$ENDIF},
Action_GetNamePath {$IFNDEF MSWINDOWS}name '_Action_GetNamePath'{$ENDIF},
Action_Assign {$IFNDEF MSWINDOWS}name '_Action_Assign'{$ENDIF},
Action_ClassName {$IFNDEF MSWINDOWS}name '_Action_ClassName'{$ENDIF},
Action_Equals {$IFNDEF MSWINDOWS}name '_Action_Equals'{$ENDIF},
Action_GetHashCode {$IFNDEF MSWINDOWS}name '_Action_GetHashCode'{$ENDIF},
Action_ToString {$IFNDEF MSWINDOWS}name '_Action_ToString'{$ENDIF},
Action_GetCaption {$IFNDEF MSWINDOWS}name '_Action_GetCaption'{$ENDIF},
Action_SetCaption {$IFNDEF MSWINDOWS}name '_Action_SetCaption'{$ENDIF},
Action_GetChecked {$IFNDEF MSWINDOWS}name '_Action_GetChecked'{$ENDIF},
Action_SetChecked {$IFNDEF MSWINDOWS}name '_Action_SetChecked'{$ENDIF},
Action_GetEnabled {$IFNDEF MSWINDOWS}name '_Action_GetEnabled'{$ENDIF},
Action_SetEnabled {$IFNDEF MSWINDOWS}name '_Action_SetEnabled'{$ENDIF},
Action_GetGroupIndex {$IFNDEF MSWINDOWS}name '_Action_GetGroupIndex'{$ENDIF},
Action_SetGroupIndex {$IFNDEF MSWINDOWS}name '_Action_SetGroupIndex'{$ENDIF},
Action_GetHint {$IFNDEF MSWINDOWS}name '_Action_GetHint'{$ENDIF},
Action_SetHint {$IFNDEF MSWINDOWS}name '_Action_SetHint'{$ENDIF},
//Action_GetImageIndex {$IFNDEF MSWINDOWS}name '_Action_GetImageIndex'{$ENDIF},
//Action_SetImageIndex {$IFNDEF MSWINDOWS}name '_Action_SetImageIndex'{$ENDIF},
Action_GetShortCut {$IFNDEF MSWINDOWS}name '_Action_GetShortCut'{$ENDIF},
Action_SetShortCut {$IFNDEF MSWINDOWS}name '_Action_SetShortCut'{$ENDIF},
Action_GetVisible {$IFNDEF MSWINDOWS}name '_Action_GetVisible'{$ENDIF},
Action_SetVisible {$IFNDEF MSWINDOWS}name '_Action_SetVisible'{$ENDIF},
Action_SetOnExecute {$IFNDEF MSWINDOWS}name '_Action_SetOnExecute'{$ENDIF},
Action_SetOnUpdate {$IFNDEF MSWINDOWS}name '_Action_SetOnUpdate'{$ENDIF},
//Action_GetImages {$IFNDEF MSWINDOWS}name '_Action_GetImages'{$ENDIF},
Action_GetIndex {$IFNDEF MSWINDOWS}name '_Action_GetIndex'{$ENDIF},
Action_SetIndex {$IFNDEF MSWINDOWS}name '_Action_SetIndex'{$ENDIF},
Action_GetComponentCount {$IFNDEF MSWINDOWS}name '_Action_GetComponentCount'{$ENDIF},
Action_GetComponentIndex {$IFNDEF MSWINDOWS}name '_Action_GetComponentIndex'{$ENDIF},
Action_SetComponentIndex {$IFNDEF MSWINDOWS}name '_Action_SetComponentIndex'{$ENDIF},
Action_GetOwner {$IFNDEF MSWINDOWS}name '_Action_GetOwner'{$ENDIF},
Action_GetName {$IFNDEF MSWINDOWS}name '_Action_GetName'{$ENDIF},
Action_SetName {$IFNDEF MSWINDOWS}name '_Action_SetName'{$ENDIF},
Action_GetTag {$IFNDEF MSWINDOWS}name '_Action_GetTag'{$ENDIF},
Action_SetTag {$IFNDEF MSWINDOWS}name '_Action_SetTag'{$ENDIF},
Action_GetComponents {$IFNDEF MSWINDOWS}name '_Action_GetComponents'{$ENDIF};