5
Copyright (C) 1998 By The Rasterman (Carsten Haitzler)
7
This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Library General Public
9
License as published by the Free Software Foundation; either
10
version 2 of the License, or (at your option) any later version.
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Library General Public License for more details.
17
You should have received a copy of the GNU Library General Public
18
License along with this library; if not, write to the
19
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
Boston, MA 02111-1307, USA.
22
**********************************************************************}
40
PImlibBorder = ^TImlibBorder;
48
PImlibColor = ^TImlibColor;
56
PImlibColorModifier = ^TImlibColorModifier;
57
TImlibColorModifier = record
63
PImlibImage = ^TImlibImage;
72
shape_color : TImlibColor;
73
border : TImlibBorder;
77
mods : TImlibColorModifier;
78
rmod : TImlibColorModifier;
79
gmod : TImlibColorModifier;
80
bmod : TImlibColorModifier;
81
rmap : array[0..255] of byte;
82
gmap : array[0..255] of byte;
83
bmap : array[0..255] of byte;
93
render_depth : longint;
94
root_cmap : TColormap;
100
last_shminfo : Pointer;//XShmSegmentInfo;
101
last_sshminfo :Pointer;//XShmSegmentInfo;
102
base_window : TWindow;
103
byte_order : longint;
107
PImlibData = ^TImlibData;
109
num_colors : longint;
110
palette : PImlibColor;
111
palette_orig : PImlibColor;
116
render_type : longint;
119
byte_order : longint;
122
size_image : longint;
124
used_image : longint;
125
image : Pointer;//image_cache;
127
size_pixmap : longint;
128
num_pixmap : longint;
129
used_pixmap : longint;
130
pixmap : Pointer;//pixmap_cache;
134
mods : TImlibColorModifier;
135
rmod : TImlibColorModifier;
136
gmod : TImlibColorModifier;
137
bmod : TImlibColorModifier;
138
rmap : array[0..255] of byte;
139
gmap : array[0..255] of byte;
140
bmap : array[0..255] of byte;
142
ordered_dither : char;
145
PImlibSaveInfo = ^TImlibSaveInfo;
146
TImlibSaveInfo = record
149
xjustification : longint;
150
yjustification : longint;
155
PImlibInitParams = ^TImlibInitParams;
156
TImlibInitParams = record
161
sharedpixmaps : char;
162
paletteoverride : char;
167
imagecachesize : longint;
168
pixmapcachesize : longint;
173
PARAMS_VISUALID = 1 shl 0;
174
PARAMS_PALETTEFILE = 1 shl 1;
175
PARAMS_SHAREDMEM = 1 shl 2;
176
PARAMS_SHAREDPIXMAPS = 1 shl 3;
177
PARAMS_PALETTEOVERRIDE = 1 shl 4;
178
PARAMS_REMAP = 1 shl 5;
179
PARAMS_FASTRENDER = 1 shl 6;
180
PARAMS_HIQUALITY = 1 shl 7;
181
PARAMS_DITHER = 1 shl 8;
182
PARAMS_IMAGECACHESIZE = 1 shl 9;
183
PARAMS_PIXMAPCACHESIZE = 1 shl 10;
185
PAGE_SIZE_EXECUTIVE = 0;
186
PAGE_SIZE_LETTER = 1;
193
RT_PLAIN_PALETTE = 0;
194
RT_PLAIN_PALETTE_FAST = 1;
195
RT_DITHER_PALETTE = 2;
196
RT_DITHER_PALETTE_FAST = 3;
197
RT_PLAIN_TRUECOL = 4;
198
RT_DITHER_TRUECOL = 5;
200
function Imlib_init(disp:PDisplay):PImlibData;cdecl;external imlibdll name 'Imlib_init';
201
function Imlib_init_with_params(disp:PDisplay; p:PImlibInitParams):PImlibData;cdecl;external imlibdll name 'Imlib_init_with_params';
202
function Imlib_get_render_type(id:PImlibData):longint;cdecl;external imlibdll name 'Imlib_get_render_type';
203
procedure Imlib_set_render_type(id:PImlibData; rend_type:longint);cdecl;external imlibdll name 'Imlib_set_render_type';
204
function Imlib_load_colors(id:PImlibData; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_load_colors';
205
function Imlib_load_image(id:PImlibData; thefile:Pchar):PImlibImage;cdecl;external imlibdll name 'Imlib_load_image';
206
function Imlib_best_color_match(id:PImlibData; r:Plongint; g:Plongint; b:Plongint):longint;cdecl;external imlibdll name 'Imlib_best_color_match';
207
function Imlib_render(id:PImlibData; image:PImlibImage; width:longint; height:longint):longint;cdecl;external imlibdll name 'Imlib_render';
208
function Imlib_copy_image(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_copy_image';
209
function Imlib_copy_mask(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_copy_mask';
210
function Imlib_move_image(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_move_image';
211
function Imlib_move_mask(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_move_mask';
212
procedure Imlib_destroy_image(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_destroy_image';
213
procedure Imlib_kill_image(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_kill_image';
214
procedure Imlib_free_colors(id:PImlibData);cdecl;external imlibdll name 'Imlib_free_colors';
215
procedure Imlib_free_pixmap(id:PImlibData; pixmap:TPixmap);cdecl;external imlibdll name 'Imlib_free_pixmap';
216
procedure Imlib_get_image_border(id:PImlibData; image:PImlibImage; border:PImlibBorder);cdecl;external imlibdll name 'Imlib_get_image_border';
217
procedure Imlib_set_image_border(id:PImlibData; image:PImlibImage; border:PImlibBorder);cdecl;external imlibdll name 'Imlib_set_image_border';
218
procedure Imlib_get_image_shape(id:PImlibData; image:PImlibImage; color:PImlibColor);cdecl;external imlibdll name 'Imlib_get_image_shape';
219
procedure Imlib_set_image_shape(id:PImlibData; image:PImlibImage; color:PImlibColor);cdecl;external imlibdll name 'Imlib_set_image_shape';
220
function Imlib_save_image_to_eim(id:PImlibData; image:PImlibImage; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_save_image_to_eim';
221
function Imlib_add_image_to_eim(id:PImlibData; image:PImlibImage; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_add_image_to_eim';
222
function Imlib_save_image_to_ppm(id:PImlibData; image:PImlibImage; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_save_image_to_ppm';
223
function Imlib_load_file_to_pixmap(id:PImlibData; filename:Pchar; pmap:PPixmap; mask:PPixmap):longint;cdecl;external imlibdll name 'Imlib_load_file_to_pixmap';
224
procedure Imlib_set_image_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_modifier';
225
procedure Imlib_set_image_red_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_red_modifier';
226
procedure Imlib_set_image_green_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_green_modifier';
227
procedure Imlib_set_image_blue_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_blue_modifier';
228
procedure Imlib_get_image_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_modifier';
229
procedure Imlib_get_image_red_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_red_modifier';
230
procedure Imlib_get_image_green_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_green_modifier';
231
procedure Imlib_get_image_blue_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_blue_modifier';
232
procedure Imlib_set_image_red_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_set_image_red_curve';
233
procedure Imlib_set_image_green_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_set_image_green_curve';
234
procedure Imlib_set_image_blue_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_set_image_blue_curve';
235
procedure Imlib_get_image_red_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_get_image_red_curve';
236
procedure Imlib_get_image_green_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_get_image_green_curve';
237
procedure Imlib_get_image_blue_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_get_image_blue_curve';
238
procedure Imlib_apply_modifiers_to_rgb(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_apply_modifiers_to_rgb';
239
procedure Imlib_changed_image(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_changed_image';
240
procedure Imlib_apply_image(id:PImlibData; image:PImlibImage; p:TWindow);cdecl;external imlibdll name 'Imlib_apply_image';
241
procedure Imlib_paste_image(id:PImlibData; image:PImlibImage; p:TWindow; x:longint; y:longint;
242
w:longint; h:longint);cdecl;external imlibdll name 'Imlib_paste_image';
243
procedure Imlib_paste_image_border(id:PImlibData; image:PImlibImage; p:TWindow; x:longint; y:longint;
244
w:longint; h:longint);cdecl;external imlibdll name 'Imlib_paste_image_border';
245
procedure Imlib_bevel_image(id:PImlibData; image:PImlibImage; bord:PImlibBorder; up:byte);cdecl;external imlibdll name 'Imlib_bevel_image';
246
procedure Imlib_bevel_pixmap(id:PImlibData; p:TPixmap; w:longint; h:longint; bord:PImlibBorder;
247
up:byte);cdecl;external imlibdll name 'Imlib_bevel_pixmap';
248
procedure Imlib_flip_image_horizontal(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_flip_image_horizontal';
249
procedure Imlib_flip_image_vertical(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_flip_image_vertical';
250
procedure Imlib_rotate_image(id:PImlibData; image:PImlibImage; d:longint);cdecl;external imlibdll name 'Imlib_rotate_image';
251
function Imlib_create_image_from_data(id:PImlibData; data:Pbyte; alpha:Pbyte; w:longint; h:longint):PImlibimage;cdecl;external imlibdll name 'Imlib_create_image_from_data';
252
function Imlib_clone_image(id:PImlibData; image:PImlibImage):PImlibImage;cdecl;external imlibdll name 'Imlib_clone_image';
253
function Imlib_clone_scaled_image(id:PImlibData; image:PImlibImage; w:longint; h:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_clone_scaled_image';
254
function Imlib_get_fallback(id:PImlibData):longint;cdecl;external imlibdll name 'Imlib_get_fallback';
255
procedure Imlib_set_fallback(id:PImlibData; fallback:longint);cdecl;external imlibdll name 'Imlib_set_fallback';
256
function Imlib_get_visual(id:PImlibData):PVisual;cdecl;external imlibdll name 'Imlib_get_visual';
257
function Imlib_get_colormap(id:PImlibData):TColormap;cdecl;external imlibdll name 'Imlib_get_colormap';
258
function Imlib_get_sysconfig(id:PImlibData):Pchar;cdecl;external imlibdll name 'Imlib_get_sysconfig';
259
function Imlib_create_image_from_xpm_data(id:PImlibData; data:PPchar):PImlibImage;cdecl;external imlibdll name 'Imlib_create_image_from_xpm_data';
260
function Imlib_data_to_pixmap(id:PImlibData; data:PPchar; pmap:PPixmap; mask:PPixmap):longint;cdecl;external imlibdll name 'Imlib_data_to_pixmap';
261
procedure Imlib_crop_image(id:PImlibData; image:PImlibImage; x:longint; y:longint; w:longint;
262
h:longint);cdecl;external imlibdll name 'Imlib_crop_image';
263
function Imlib_save_image(id:PImlibData; image:PImlibImage; thefile:Pchar; info:PImlibSaveInfo):longint;cdecl;external imlibdll name 'Imlib_save_image';
264
function Imlib_crop_and_clone_image(id:PImlibData; image:PImlibImage; x:longint; y:longint; w:longint;
265
h:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_crop_and_clone_image';
266
function Imlib_create_image_from_drawable(id:PImlibData; win:TDrawable; mask:TPixmap; x:longint; y:longint;
267
width:longint; height:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_create_image_from_drawable';
268
function Imlib_inlined_png_to_image(id:PImlibData; data:Pbyte; data_size:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_inlined_png_to_image';