-
Notifications
You must be signed in to change notification settings - Fork 4
/
MainMenu.inc
197 lines (165 loc) · 6.17 KB
/
MainMenu.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
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function MainMenu_Create(AOwner: TComponent): TMainMenu; cdecl;
begin
Result := TMainMenu.Create(AOwner);
end;
procedure MainMenu_Free(AObj: TMainMenu); cdecl;
begin
AObj.Free;
end;
function MainMenu_FindComponent(AObj: TMainMenu; AName: PWideChar): TComponent; cdecl;
begin
Result := AObj.FindComponent(AName);
end;
function MainMenu_GetNamePath(AObj: TMainMenu): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function MainMenu_HasParent(AObj: TMainMenu): LongBool; cdecl;
begin
Result := AObj.HasParent;
end;
procedure MainMenu_Assign(AObj: TMainMenu; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
function MainMenu_ClassName(AObj: TMainMenu): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function MainMenu_Equals(AObj: TMainMenu; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
function MainMenu_GetHashCode(AObj: TMainMenu): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function MainMenu_ToString(AObj: TMainMenu): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
//function MainMenu_GetAutoHotkeys(AObj: TMainMenu): TMenuAutoFlag; cdecl;
//begin
// Result := AObj.AutoHotkeys;
//end;
//
//procedure MainMenu_SetAutoHotkeys(AObj: TMainMenu; AValue: TMenuAutoFlag); cdecl;
//begin
// AObj.AutoHotkeys := AValue;
//end;
function MainMenu_GetBiDiMode(AObj: TMainMenu): TBiDiMode; cdecl;
begin
Result := AObj.BiDiMode;
end;
procedure MainMenu_SetBiDiMode(AObj: TMainMenu; AValue: TBiDiMode); cdecl;
begin
AObj.BiDiMode := AValue;
end;
//function MainMenu_GetImages(AObj: TMainMenu): TCustomImageList; cdecl;
//begin
// Result := AObj.Images;
//end;
//
//procedure MainMenu_SetImages(AObj: TMainMenu; AValue: TCustomImageList); cdecl;
//begin
// AObj.Images := AValue;
//end;
procedure MainMenu_SetOnChange(AObj: TMainMenu; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnChange := nil;
TEventClass.Remove(AObj, geMenuChange);
Exit;
end;
AObj.OnChange := TEventClass.MenuOnChange;
TEventClass.Add(AObj, geMenuChange, AEventId);
end;
function MainMenu_GetHandle(AObj: TMainMenu): HMENU; cdecl;
begin
Result := AObj.Handle;
end;
function MainMenu_GetWindowHandle(AObj: TMainMenu): HWND; cdecl;
begin
Result := AObj.WindowHandle;
end;
procedure MainMenu_SetWindowHandle(AObj: TMainMenu; AValue: HWND); cdecl;
begin
AObj.WindowHandle := AValue;
end;
function MainMenu_GetItems(AObj: TMainMenu): TMenuItem; cdecl;
begin
Result := AObj.Items;
end;
function MainMenu_GetComponentCount(AObj: TMainMenu): Integer; cdecl;
begin
Result := AObj.ComponentCount;
end;
function MainMenu_GetComponentIndex(AObj: TMainMenu): Integer; cdecl;
begin
Result := AObj.ComponentIndex;
end;
procedure MainMenu_SetComponentIndex(AObj: TMainMenu; AValue: Integer); cdecl;
begin
AObj.ComponentIndex := AValue;
end;
function MainMenu_GetOwner(AObj: TMainMenu): TComponent; cdecl;
begin
Result := AObj.Owner;
end;
function MainMenu_GetName(AObj: TMainMenu): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Name);
end;
procedure MainMenu_SetName(AObj: TMainMenu; AValue: PWideChar); cdecl;
begin
AObj.Name := AValue;
end;
function MainMenu_GetTag(AObj: TMainMenu): NativeInt; cdecl;
begin
Result := AObj.Tag;
end;
procedure MainMenu_SetTag(AObj: TMainMenu; AValue: NativeInt); cdecl;
begin
AObj.Tag := AValue;
end;
function MainMenu_GetComponents(AObj: TMainMenu; AIndex: Integer): TComponent; cdecl;
begin
Result := AObj.Components[AIndex];
end;
exports
MainMenu_Create {$IFNDEF MSWINDOWS}name '_MainMenu_Create'{$ENDIF},
MainMenu_Free {$IFNDEF MSWINDOWS}name '_MainMenu_Free'{$ENDIF},
MainMenu_FindComponent {$IFNDEF MSWINDOWS}name '_MainMenu_FindComponent'{$ENDIF},
MainMenu_GetNamePath {$IFNDEF MSWINDOWS}name '_MainMenu_GetNamePath'{$ENDIF},
MainMenu_HasParent {$IFNDEF MSWINDOWS}name '_MainMenu_HasParent'{$ENDIF},
MainMenu_Assign {$IFNDEF MSWINDOWS}name '_MainMenu_Assign'{$ENDIF},
MainMenu_ClassName {$IFNDEF MSWINDOWS}name '_MainMenu_ClassName'{$ENDIF},
MainMenu_Equals {$IFNDEF MSWINDOWS}name '_MainMenu_Equals'{$ENDIF},
MainMenu_GetHashCode {$IFNDEF MSWINDOWS}name '_MainMenu_GetHashCode'{$ENDIF},
MainMenu_ToString {$IFNDEF MSWINDOWS}name '_MainMenu_ToString'{$ENDIF},
//MainMenu_GetAutoHotkeys {$IFNDEF MSWINDOWS}name '_MainMenu_GetAutoHotkeys'{$ENDIF},
//MainMenu_SetAutoHotkeys {$IFNDEF MSWINDOWS}name '_MainMenu_SetAutoHotkeys'{$ENDIF},
MainMenu_GetBiDiMode {$IFNDEF MSWINDOWS}name '_MainMenu_GetBiDiMode'{$ENDIF},
MainMenu_SetBiDiMode {$IFNDEF MSWINDOWS}name '_MainMenu_SetBiDiMode'{$ENDIF},
//MainMenu_GetImages {$IFNDEF MSWINDOWS}name '_MainMenu_GetImages'{$ENDIF},
//MainMenu_SetImages {$IFNDEF MSWINDOWS}name '_MainMenu_SetImages'{$ENDIF},
MainMenu_SetOnChange {$IFNDEF MSWINDOWS}name '_MainMenu_SetOnChange'{$ENDIF},
MainMenu_GetHandle {$IFNDEF MSWINDOWS}name '_MainMenu_GetHandle'{$ENDIF},
MainMenu_GetWindowHandle {$IFNDEF MSWINDOWS}name '_MainMenu_GetWindowHandle'{$ENDIF},
MainMenu_SetWindowHandle {$IFNDEF MSWINDOWS}name '_MainMenu_SetWindowHandle'{$ENDIF},
MainMenu_GetItems {$IFNDEF MSWINDOWS}name '_MainMenu_GetItems'{$ENDIF},
MainMenu_GetComponentCount {$IFNDEF MSWINDOWS}name '_MainMenu_GetComponentCount'{$ENDIF},
MainMenu_GetComponentIndex {$IFNDEF MSWINDOWS}name '_MainMenu_GetComponentIndex'{$ENDIF},
MainMenu_SetComponentIndex {$IFNDEF MSWINDOWS}name '_MainMenu_SetComponentIndex'{$ENDIF},
MainMenu_GetOwner {$IFNDEF MSWINDOWS}name '_MainMenu_GetOwner'{$ENDIF},
MainMenu_GetName {$IFNDEF MSWINDOWS}name '_MainMenu_GetName'{$ENDIF},
MainMenu_SetName {$IFNDEF MSWINDOWS}name '_MainMenu_SetName'{$ENDIF},
MainMenu_GetTag {$IFNDEF MSWINDOWS}name '_MainMenu_GetTag'{$ENDIF},
MainMenu_SetTag {$IFNDEF MSWINDOWS}name '_MainMenu_SetTag'{$ENDIF},
MainMenu_GetComponents {$IFNDEF MSWINDOWS}name '_MainMenu_GetComponents'{$ENDIF};