-
Notifications
You must be signed in to change notification settings - Fork 4
/
GIFImage.inc
300 lines (264 loc) · 9.59 KB
/
GIFImage.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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function GIFImage_Create: TGIFImage; cdecl;
begin
Result := TGIFImage.Create;
end;
procedure GIFImage_Free(AObj: TGIFImage); cdecl;
begin
AObj.Free;
end;
procedure GIFImage_SaveToStream(AObj: TGIFImage; Stream: TStream); cdecl;
begin
AObj.SaveToStream(Stream);
end;
procedure GIFImage_LoadFromStream(AObj: TGIFImage; Stream: TStream); cdecl;
begin
AObj.LoadFromStream(Stream);
end;
//function GIFImage_Add(AObj: TGIFImage; Source: TPersistent): TGIFFrame; cdecl;
//begin
// Result := AObj.Add(Source);
//end;
procedure GIFImage_Clear(AObj: TGIFImage); cdecl;
begin
AObj.Clear;
end;
procedure GIFImage_Assign(AObj: TGIFImage; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
//procedure GIFImage_StopDraw(AObj: TGIFImage); cdecl;
//begin
// AObj.StopDraw;
//end;
//
//procedure GIFImage_SuspendDraw(AObj: TGIFImage); cdecl;
//begin
// AObj.SuspendDraw;
//end;
//
//procedure GIFImage_ResumeDraw(AObj: TGIFImage); cdecl;
//begin
// AObj.ResumeDraw;
//end;
function GIFImage_Equals(AObj: TGIFImage; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
procedure GIFImage_LoadFromFile(AObj: TGIFImage; Filename: PWideChar); cdecl;
begin
AObj.LoadFromFile(Filename);
end;
procedure GIFImage_SaveToFile(AObj: TGIFImage; Filename: PWideChar); cdecl;
begin
AObj.SaveToFile(Filename);
end;
procedure GIFImage_SetSize(AObj: TGIFImage; AWidth: Integer; AHeight: Integer); cdecl;
begin
AObj.SetSize(AWidth, AHeight);
end;
function GIFImage_GetNamePath(AObj: TGIFImage): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function GIFImage_ClassName(AObj: TGIFImage): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function GIFImage_GetHashCode(AObj: TGIFImage): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function GIFImage_ToString(AObj: TGIFImage): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
//function GIFImage_GetVersion(AObj: TGIFImage): TGIFVersion; cdecl;
//begin
// Result := AObj.Version;
//end;
function GIFImage_GetBitsPerPixel(AObj: TGIFImage): Integer; cdecl;
begin
Result := AObj.BitsPerPixel;
end;
//function GIFImage_GetBackgroundColor(AObj: TGIFImage): TColor; cdecl;
//begin
// Result := AObj.BackgroundColor;
//end;
//
//procedure GIFImage_SetBackgroundColor(AObj: TGIFImage; AValue: TColor); cdecl;
//begin
// AObj.BackgroundColor := AValue;
//end;
//
//function GIFImage_GetAspectRatio(AObj: TGIFImage): Byte; cdecl;
//begin
// Result := AObj.AspectRatio;
//end;
//
//procedure GIFImage_SetAspectRatio(AObj: TGIFImage; AValue: Byte); cdecl;
//begin
// AObj.AspectRatio := AValue;
//end;
//
//function GIFImage_GetIsTransparent(AObj: TGIFImage): LongBool; cdecl;
//begin
// Result := AObj.IsTransparent;
//end;
//
//function GIFImage_GetAnimationSpeed(AObj: TGIFImage): Integer; cdecl;
//begin
// Result := AObj.AnimationSpeed;
//end;
//
//procedure GIFImage_SetAnimationSpeed(AObj: TGIFImage; AValue: Integer); cdecl;
//begin
// AObj.AnimationSpeed := AValue;
//end;
//
//function GIFImage_GetBitmap(AObj: TGIFImage): TBitmap; cdecl;
//begin
// Result := AObj.Bitmap;
//end;
//procedure GIFImage_SetOnPaint(AObj: TGIFImage; AEventId: NativeUInt); stdcall;
//begin
// if AEventId = 0 then
// begin
// AObj.OnPaint := nil;
// TEventClass.Remove(AObj, gePaint);
// Exit;
// end;
// AObj.OnPaint := TEventClass.OnPaint;
// TEventClass.Add(AObj, gePaint, AEventId);
//end;
//
//function GIFImage_GetAnimate(AObj: TGIFImage): LongBool; cdecl;
//begin
// Result := AObj.Animate;
//end;
//
//procedure GIFImage_SetAnimate(AObj: TGIFImage; AValue: LongBool); cdecl;
//begin
// AObj.Animate := AValue;
//end;
//
//function GIFImage_GetAnimateLoop(AObj: TGIFImage): TGIFAnimationLoop; cdecl;
//begin
// Result := AObj.AnimateLoop;
//end;
//
//procedure GIFImage_SetAnimateLoop(AObj: TGIFImage; AValue: TGIFAnimationLoop); cdecl;
//begin
// AObj.AnimateLoop := AValue;
//end;
//
//function GIFImage_GetShouldDither(AObj: TGIFImage): LongBool; cdecl;
//begin
// Result := AObj.ShouldDither;
//end;
function GIFImage_GetEmpty(AObj: TGIFImage): LongBool; cdecl;
begin
Result := AObj.Empty;
end;
function GIFImage_GetHeight(AObj: TGIFImage): Integer; cdecl;
begin
Result := AObj.Height;
end;
procedure GIFImage_SetHeight(AObj: TGIFImage; AValue: Integer); cdecl;
begin
AObj.Height := AValue;
end;
function GIFImage_GetModified(AObj: TGIFImage): LongBool; cdecl;
begin
Result := AObj.Modified;
end;
procedure GIFImage_SetModified(AObj: TGIFImage; AValue: LongBool); cdecl;
begin
AObj.Modified := AValue;
end;
function GIFImage_GetPaletteModified(AObj: TGIFImage): LongBool; cdecl;
begin
Result := AObj.PaletteModified;
end;
procedure GIFImage_SetPaletteModified(AObj: TGIFImage; AValue: LongBool); cdecl;
begin
AObj.PaletteModified := AValue;
end;
function GIFImage_GetTransparent(AObj: TGIFImage): LongBool; cdecl;
begin
Result := AObj.Transparent;
end;
//procedure GIFImage_SetTransparent(AObj: TGIFImage; AValue: LongBool); cdecl;
//begin
// AObj.Transparent := AValue;
//end;
function GIFImage_GetWidth(AObj: TGIFImage): Integer; cdecl;
begin
Result := AObj.Width;
end;
procedure GIFImage_SetWidth(AObj: TGIFImage; AValue: Integer); cdecl;
begin
AObj.Width := AValue;
end;
procedure GIFImage_SetOnChange(AObj: TGIFImage; 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
GIFImage_Create {$IFNDEF MSWINDOWS}name '_GIFImage_Create'{$ENDIF},
GIFImage_Free {$IFNDEF MSWINDOWS}name '_GIFImage_Free'{$ENDIF},
GIFImage_SaveToStream {$IFNDEF MSWINDOWS}name '_GIFImage_SaveToStream'{$ENDIF},
GIFImage_LoadFromStream {$IFNDEF MSWINDOWS}name '_GIFImage_LoadFromStream'{$ENDIF},
//GIFImage_Add {$IFNDEF MSWINDOWS}name '_GIFImage_Add'{$ENDIF},
GIFImage_Clear {$IFNDEF MSWINDOWS}name '_GIFImage_Clear'{$ENDIF},
GIFImage_Assign {$IFNDEF MSWINDOWS}name '_GIFImage_Assign'{$ENDIF},
//GIFImage_StopDraw {$IFNDEF MSWINDOWS}name '_GIFImage_StopDraw'{$ENDIF},
//GIFImage_SuspendDraw {$IFNDEF MSWINDOWS}name '_GIFImage_SuspendDraw'{$ENDIF},
//GIFImage_ResumeDraw {$IFNDEF MSWINDOWS}name '_GIFImage_ResumeDraw'{$ENDIF},
GIFImage_Equals {$IFNDEF MSWINDOWS}name '_GIFImage_Equals'{$ENDIF},
GIFImage_LoadFromFile {$IFNDEF MSWINDOWS}name '_GIFImage_LoadFromFile'{$ENDIF},
GIFImage_SaveToFile {$IFNDEF MSWINDOWS}name '_GIFImage_SaveToFile'{$ENDIF},
GIFImage_SetSize {$IFNDEF MSWINDOWS}name '_GIFImage_SetSize'{$ENDIF},
GIFImage_GetNamePath {$IFNDEF MSWINDOWS}name '_GIFImage_GetNamePath'{$ENDIF},
GIFImage_ClassName {$IFNDEF MSWINDOWS}name '_GIFImage_ClassName'{$ENDIF},
GIFImage_GetHashCode {$IFNDEF MSWINDOWS}name '_GIFImage_GetHashCode'{$ENDIF},
GIFImage_ToString {$IFNDEF MSWINDOWS}name '_GIFImage_ToString'{$ENDIF},
//GIFImage_GetVersion {$IFNDEF MSWINDOWS}name '_GIFImage_GetVersion'{$ENDIF},
GIFImage_GetBitsPerPixel {$IFNDEF MSWINDOWS}name '_GIFImage_GetBitsPerPixel'{$ENDIF},
//GIFImage_GetBackgroundColor {$IFNDEF MSWINDOWS}name '_GIFImage_GetBackgroundColor'{$ENDIF},
//GIFImage_SetBackgroundColor {$IFNDEF MSWINDOWS}name '_GIFImage_SetBackgroundColor'{$ENDIF},
//GIFImage_GetAspectRatio {$IFNDEF MSWINDOWS}name '_GIFImage_GetAspectRatio'{$ENDIF},
//GIFImage_SetAspectRatio {$IFNDEF MSWINDOWS}name '_GIFImage_SetAspectRatio'{$ENDIF},
//GIFImage_GetIsTransparent {$IFNDEF MSWINDOWS}name '_GIFImage_GetIsTransparent'{$ENDIF},
//GIFImage_GetAnimationSpeed {$IFNDEF MSWINDOWS}name '_GIFImage_GetAnimationSpeed'{$ENDIF},
//GIFImage_SetAnimationSpeed {$IFNDEF MSWINDOWS}name '_GIFImage_SetAnimationSpeed'{$ENDIF},
//GIFImage_GetBitmap {$IFNDEF MSWINDOWS}name '_GIFImage_GetBitmap'{$ENDIF},
//GIFImage_SetOnPaint {$IFNDEF MSWINDOWS}name '_GIFImage_SetOnPaint'{$ENDIF},
//GIFImage_GetAnimate {$IFNDEF MSWINDOWS}name '_GIFImage_GetAnimate'{$ENDIF},
//GIFImage_SetAnimate {$IFNDEF MSWINDOWS}name '_GIFImage_SetAnimate'{$ENDIF},
//GIFImage_GetAnimateLoop {$IFNDEF MSWINDOWS}name '_GIFImage_GetAnimateLoop'{$ENDIF},
//GIFImage_SetAnimateLoop {$IFNDEF MSWINDOWS}name '_GIFImage_SetAnimateLoop'{$ENDIF},
//GIFImage_GetShouldDither {$IFNDEF MSWINDOWS}name '_GIFImage_GetShouldDither'{$ENDIF},
GIFImage_GetEmpty {$IFNDEF MSWINDOWS}name '_GIFImage_GetEmpty'{$ENDIF},
GIFImage_GetHeight {$IFNDEF MSWINDOWS}name '_GIFImage_GetHeight'{$ENDIF},
GIFImage_SetHeight {$IFNDEF MSWINDOWS}name '_GIFImage_SetHeight'{$ENDIF},
GIFImage_GetModified {$IFNDEF MSWINDOWS}name '_GIFImage_GetModified'{$ENDIF},
GIFImage_SetModified {$IFNDEF MSWINDOWS}name '_GIFImage_SetModified'{$ENDIF},
GIFImage_GetPaletteModified {$IFNDEF MSWINDOWS}name '_GIFImage_GetPaletteModified'{$ENDIF},
GIFImage_SetPaletteModified {$IFNDEF MSWINDOWS}name '_GIFImage_SetPaletteModified'{$ENDIF},
GIFImage_GetTransparent {$IFNDEF MSWINDOWS}name '_GIFImage_GetTransparent'{$ENDIF},
//GIFImage_SetTransparent {$IFNDEF MSWINDOWS}name '_GIFImage_SetTransparent'{$ENDIF},
GIFImage_GetWidth {$IFNDEF MSWINDOWS}name '_GIFImage_GetWidth'{$ENDIF},
GIFImage_SetWidth {$IFNDEF MSWINDOWS}name '_GIFImage_SetWidth'{$ENDIF},
GIFImage_SetOnChange {$IFNDEF MSWINDOWS}name '_GIFImage_SetOnChange'{$ENDIF};