-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathIcon.inc
199 lines (165 loc) · 5.78 KB
/
Icon.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
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function Icon_Create: TIcon; cdecl;
begin
Result := TIcon.Create;
end;
procedure Icon_Free(AObj: TIcon); cdecl;
begin
AObj.Free;
end;
procedure Icon_Assign(AObj: TIcon; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
function Icon_HandleAllocated(AObj: TIcon): LongBool; cdecl;
begin
Result := AObj.HandleAllocated;
end;
procedure Icon_LoadFromStream(AObj: TIcon; Stream: TStream); cdecl;
begin
AObj.LoadFromStream(Stream);
end;
procedure Icon_SaveToStream(AObj: TIcon; Stream: TStream); cdecl;
begin
AObj.SaveToStream(Stream);
end;
procedure Icon_SetSize(AObj: TIcon; AWidth: Integer; AHeight: Integer); cdecl;
begin
AObj.SetSize(AWidth, AHeight);
end;
procedure Icon_LoadFromResourceName(AObj: TIcon; Instance: NativeUInt; ResName: PWideChar); cdecl;
begin
AObj.LoadFromResourceName(Instance, ResName);
end;
procedure Icon_LoadFromResourceID(AObj: TIcon; Instance: NativeUInt; ResID: Integer); cdecl;
begin
{$IFDEF MSWINDOWS}
AObj.LoadFromResourceID(Instance, ResID);
{$ENDIF MSWINDOWS}
end;
function Icon_Equals(AObj: TIcon; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
procedure Icon_LoadFromFile(AObj: TIcon; Filename: PWideChar); cdecl;
begin
AObj.LoadFromFile(Filename);
end;
procedure Icon_SaveToFile(AObj: TIcon; Filename: PWideChar); cdecl;
begin
AObj.SaveToFile(Filename);
end;
function Icon_GetNamePath(AObj: TIcon): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function Icon_ClassName(AObj: TIcon): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function Icon_GetHashCode(AObj: TIcon): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function Icon_ToString(AObj: TIcon): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
function Icon_GetHandle(AObj: TIcon): HICON; cdecl;
begin
Result := AObj.Handle;
end;
procedure Icon_SetHandle(AObj: TIcon; AValue: HICON); cdecl;
begin
AObj.Handle := AValue;
end;
function Icon_GetEmpty(AObj: TIcon): LongBool; cdecl;
begin
Result := AObj.Empty;
end;
function Icon_GetHeight(AObj: TIcon): Integer; cdecl;
begin
Result := AObj.Height;
end;
procedure Icon_SetHeight(AObj: TIcon; AValue: Integer); cdecl;
begin
AObj.Height := AValue;
end;
function Icon_GetModified(AObj: TIcon): LongBool; cdecl;
begin
Result := AObj.Modified;
end;
procedure Icon_SetModified(AObj: TIcon; AValue: LongBool); cdecl;
begin
AObj.Modified := AValue;
end;
function Icon_GetPaletteModified(AObj: TIcon): LongBool; cdecl;
begin
Result := AObj.PaletteModified;
end;
procedure Icon_SetPaletteModified(AObj: TIcon; AValue: LongBool); cdecl;
begin
AObj.PaletteModified := AValue;
end;
function Icon_GetTransparent(AObj: TIcon): LongBool; cdecl;
begin
Result := AObj.Transparent;
end;
procedure Icon_SetTransparent(AObj: TIcon; AValue: LongBool); cdecl;
begin
AObj.Transparent := AValue;
end;
function Icon_GetWidth(AObj: TIcon): Integer; cdecl;
begin
Result := AObj.Width;
end;
procedure Icon_SetWidth(AObj: TIcon; AValue: Integer); cdecl;
begin
AObj.Width := AValue;
end;
procedure Icon_SetOnChange(AObj: TIcon; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnChange := nil;
TEventClass.Remove(AObj, geChange);
Exit;
end;
AObj.OnChange := TEventClass.OnChange;
TEventClass.Add(AObj, geChange, AEventId);
end;
exports
Icon_Create {$IFNDEF MSWINDOWS}name '_Icon_Create'{$ENDIF},
Icon_Free {$IFNDEF MSWINDOWS}name '_Icon_Free'{$ENDIF},
Icon_Assign {$IFNDEF MSWINDOWS}name '_Icon_Assign'{$ENDIF},
Icon_HandleAllocated {$IFNDEF MSWINDOWS}name '_Icon_HandleAllocated'{$ENDIF},
Icon_LoadFromStream {$IFNDEF MSWINDOWS}name '_Icon_LoadFromStream'{$ENDIF},
Icon_SaveToStream {$IFNDEF MSWINDOWS}name '_Icon_SaveToStream'{$ENDIF},
Icon_SetSize {$IFNDEF MSWINDOWS}name '_Icon_SetSize'{$ENDIF},
Icon_LoadFromResourceName {$IFNDEF MSWINDOWS}name '_Icon_LoadFromResourceName'{$ENDIF},
Icon_LoadFromResourceID {$IFNDEF MSWINDOWS}name '_Icon_LoadFromResourceID'{$ENDIF},
Icon_Equals {$IFNDEF MSWINDOWS}name '_Icon_Equals'{$ENDIF},
Icon_LoadFromFile {$IFNDEF MSWINDOWS}name '_Icon_LoadFromFile'{$ENDIF},
Icon_SaveToFile {$IFNDEF MSWINDOWS}name '_Icon_SaveToFile'{$ENDIF},
Icon_GetNamePath {$IFNDEF MSWINDOWS}name '_Icon_GetNamePath'{$ENDIF},
Icon_ClassName {$IFNDEF MSWINDOWS}name '_Icon_ClassName'{$ENDIF},
Icon_GetHashCode {$IFNDEF MSWINDOWS}name '_Icon_GetHashCode'{$ENDIF},
Icon_ToString {$IFNDEF MSWINDOWS}name '_Icon_ToString'{$ENDIF},
Icon_GetHandle {$IFNDEF MSWINDOWS}name '_Icon_GetHandle'{$ENDIF},
Icon_SetHandle {$IFNDEF MSWINDOWS}name '_Icon_SetHandle'{$ENDIF},
Icon_GetEmpty {$IFNDEF MSWINDOWS}name '_Icon_GetEmpty'{$ENDIF},
Icon_GetHeight {$IFNDEF MSWINDOWS}name '_Icon_GetHeight'{$ENDIF},
Icon_SetHeight {$IFNDEF MSWINDOWS}name '_Icon_SetHeight'{$ENDIF},
Icon_GetModified {$IFNDEF MSWINDOWS}name '_Icon_GetModified'{$ENDIF},
Icon_SetModified {$IFNDEF MSWINDOWS}name '_Icon_SetModified'{$ENDIF},
Icon_GetPaletteModified {$IFNDEF MSWINDOWS}name '_Icon_GetPaletteModified'{$ENDIF},
Icon_SetPaletteModified {$IFNDEF MSWINDOWS}name '_Icon_SetPaletteModified'{$ENDIF},
Icon_GetTransparent {$IFNDEF MSWINDOWS}name '_Icon_GetTransparent'{$ENDIF},
Icon_SetTransparent {$IFNDEF MSWINDOWS}name '_Icon_SetTransparent'{$ENDIF},
Icon_GetWidth {$IFNDEF MSWINDOWS}name '_Icon_GetWidth'{$ENDIF},
Icon_SetWidth {$IFNDEF MSWINDOWS}name '_Icon_SetWidth'{$ENDIF},
Icon_SetOnChange {$IFNDEF MSWINDOWS}name '_Icon_SetOnChange'{$ENDIF};