mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00
* imlib moved
git-svn-id: trunk@9999 -
This commit is contained in:
parent
0206151763
commit
a6005f3166
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -3792,6 +3792,11 @@ packages/imagemagick/src/quantize.inc svneol=native#text/plain
|
||||
packages/imagemagick/src/semaphore.inc svneol=native#text/plain
|
||||
packages/imagemagick/src/statistic.inc svneol=native#text/plain
|
||||
packages/imagemagick/src/type.inc svneol=native#text/plain
|
||||
packages/imlib/Makefile svneol=native#text/plain
|
||||
packages/imlib/Makefile.fpc svneol=native#text/plain
|
||||
packages/imlib/fpmake.pp svneol=native#text/plain
|
||||
packages/imlib/src/gdk_imlib.pp svneol=native#text/plain
|
||||
packages/imlib/src/imlib.pp svneol=native#text/plain
|
||||
packages/ldap/Makefile svneol=native#text/plain
|
||||
packages/ldap/Makefile.fpc svneol=native#text/plain
|
||||
packages/ldap/fpmake.pp svneol=native#text/plain
|
||||
|
2447
packages/imlib/Makefile
Normal file
2447
packages/imlib/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
31
packages/imlib/Makefile.fpc
Normal file
31
packages/imlib/Makefile.fpc
Normal file
@ -0,0 +1,31 @@
|
||||
#
|
||||
# Makefile.fpc for Free Pascal ImLib 1.x Packages
|
||||
#
|
||||
|
||||
[package]
|
||||
name=imlib
|
||||
version=2.0.0
|
||||
|
||||
[target]
|
||||
units=gdk_imlib imlib
|
||||
|
||||
[require]
|
||||
libc=y
|
||||
packages=gtk1 x11
|
||||
|
||||
[compiler]
|
||||
includedir=src
|
||||
sourcedir=src tests
|
||||
|
||||
[install]
|
||||
fpcpackage=y
|
||||
fpcsubdir=packages
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
|
||||
[shared]
|
||||
build=n
|
||||
|
||||
[rules]
|
||||
.NOTPARALLEL:
|
56
packages/imlib/fpmake.pp
Normal file
56
packages/imlib/fpmake.pp
Normal file
@ -0,0 +1,56 @@
|
||||
{$ifndef ALLPACKAGES}
|
||||
{$mode objfpc}{$H+}
|
||||
program fpmake;
|
||||
|
||||
uses fpmkunit;
|
||||
|
||||
Var
|
||||
P : TPackage;
|
||||
T : TTarget;
|
||||
begin
|
||||
With Installer do
|
||||
begin
|
||||
{$endif ALLPACKAGES}
|
||||
|
||||
P:=AddPackage('imlib');
|
||||
{$ifdef ALLPACKAGES}
|
||||
P.Directory:='imlib';
|
||||
{$endif ALLPACKAGES}
|
||||
P.Version:='2.0.0';
|
||||
P.SourcePath.Add('src');
|
||||
P.Dependencies.Add('gtk1');
|
||||
P.Dependencies.Add('x11');
|
||||
|
||||
T:=P.Targets.AddUnit('gdk_imlib.pp');
|
||||
with T.Dependencies do
|
||||
begin
|
||||
AddUnit('glib');
|
||||
AddUnit('gdk');
|
||||
AddUnit('gtk');
|
||||
end;
|
||||
T:=P.Targets.AddUnit('imlib.pp');
|
||||
with T.Dependencies do
|
||||
begin
|
||||
AddUnit('xlib');
|
||||
end;
|
||||
|
||||
|
||||
T:=P.Targets.AddUnit('gdk_imlib.pp');
|
||||
with T.Dependencies do
|
||||
begin
|
||||
AddUnit('glib');
|
||||
AddUnit('gdk');
|
||||
AddUnit('gtk');
|
||||
end;
|
||||
T:=P.Targets.AddUnit('imlib.pp');
|
||||
with T.Dependencies do
|
||||
begin
|
||||
AddUnit('xlib');
|
||||
end;
|
||||
|
||||
|
||||
{$ifndef ALLPACKAGES}
|
||||
Run;
|
||||
end;
|
||||
end.
|
||||
{$endif ALLPACKAGES}
|
220
packages/imlib/src/gdk_imlib.pp
Normal file
220
packages/imlib/src/gdk_imlib.pp
Normal file
@ -0,0 +1,220 @@
|
||||
{
|
||||
|
||||
gdk_imlib library
|
||||
|
||||
Copyright (C) 1998 By The Rasterman (Carsten Haitzler)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
**********************************************************************}
|
||||
unit gdk_imlib;
|
||||
|
||||
interface
|
||||
|
||||
{$PACKRECORDS C}
|
||||
{$mode objfpc}
|
||||
|
||||
Uses glib, gdk, gtk;
|
||||
|
||||
const
|
||||
{$ifndef os2}
|
||||
gdk_imlibdll='gdk_imlib';
|
||||
{$else}
|
||||
gdk_imlibdll='gdkimlib';
|
||||
{$endif}
|
||||
|
||||
Type
|
||||
PGdkImlibBorder = ^TGdkImlibBorder;
|
||||
TGdkImlibBorder = record
|
||||
left : gint;
|
||||
right : gint;
|
||||
top : gint;
|
||||
bottom : gint;
|
||||
end;
|
||||
|
||||
PGdkImlibColor = ^TGdkImlibColor;
|
||||
TGdkImlibColor = record
|
||||
r : gint;
|
||||
g : gint;
|
||||
b : gint;
|
||||
pixel : gint;
|
||||
end;
|
||||
|
||||
PGdkImlibColorModifier = ^TGdkImlibColorModifier;
|
||||
TGdkImlibColorModifier = record
|
||||
gamma : gint;
|
||||
brightness : gint;
|
||||
contrast : gint;
|
||||
end;
|
||||
|
||||
PGdkImlibModifierMap = ^TGdkImlibModifierMap;
|
||||
TGdkImlibModifierMap = record
|
||||
rmap : array[0..255] of byte;
|
||||
gmap : array[0..255] of byte;
|
||||
bmap : array[0..255] of byte;
|
||||
end;
|
||||
|
||||
PGdkImlibImage = ^TGdkImlibImage;
|
||||
TGdkImlibImage = record
|
||||
rgb_width : gint;
|
||||
rgb_height : gint;
|
||||
rgb_data : Pbyte;
|
||||
alpha_data : Pbyte;
|
||||
filename : Pgchar;
|
||||
width : gint;
|
||||
height : gint;
|
||||
shape_color : TGdkImlibColor;
|
||||
border : TGdkImlibBorder;
|
||||
pixmap : PGdkPixmap;
|
||||
shape_mask : PGdkBitmap;
|
||||
cache : gchar;
|
||||
mods : TGdkImlibColorModifier;
|
||||
rmod : TGdkImlibColorModifier;
|
||||
gmod : TGdkImlibColorModifier;
|
||||
bmod : TGdkImlibColorModifier;
|
||||
map : PGdkImlibModifierMap;
|
||||
ref_count : longint;
|
||||
pixmaps : PGHashTable;
|
||||
end;
|
||||
|
||||
PGdkImlibSaveInfo = ^TGdkImlibSaveInfo;
|
||||
TGdkImlibSaveInfo = record
|
||||
quality : longint;
|
||||
scaling : longint;
|
||||
xjustification : longint;
|
||||
yjustification : longint;
|
||||
page_size : longint;
|
||||
color : char;
|
||||
end;
|
||||
|
||||
PGdkImlibInitParams = ^TGdkImlibInitParams;
|
||||
TGdkImlibInitParams = record
|
||||
flags : longint;
|
||||
visualid : longint;
|
||||
palettefile : Pchar;
|
||||
sharedmem : char;
|
||||
sharedpixmaps : char;
|
||||
paletteoverride : char;
|
||||
remap : char;
|
||||
fastrender : char;
|
||||
hiquality : char;
|
||||
dither : char;
|
||||
imagecachesize : longint;
|
||||
pixmapcachesize : longint;
|
||||
end;
|
||||
|
||||
const
|
||||
PARAMS_VISUALID = 1 shl 0;
|
||||
PARAMS_PALETTEFILE = 1 shl 1;
|
||||
PARAMS_SHAREDMEM = 1 shl 2;
|
||||
PARAMS_SHAREDPIXMAPS = 1 shl 3;
|
||||
PARAMS_PALETTEOVERRIDE = 1 shl 4;
|
||||
PARAMS_REMAP = 1 shl 5;
|
||||
PARAMS_FASTRENDER = 1 shl 6;
|
||||
PARAMS_HIQUALITY = 1 shl 7;
|
||||
PARAMS_DITHER = 1 shl 8;
|
||||
PARAMS_IMAGECACHESIZE = 1 shl 9;
|
||||
PARAMS_PIXMAPCACHESIZE = 1 shl 10;
|
||||
|
||||
PAGE_SIZE_EXECUTIVE = 0;
|
||||
PAGE_SIZE_LETTER = 1;
|
||||
PAGE_SIZE_LEGAL = 2;
|
||||
PAGE_SIZE_A4 = 3;
|
||||
PAGE_SIZE_A3 = 4;
|
||||
PAGE_SIZE_A5 = 5;
|
||||
PAGE_SIZE_FOLIO = 6;
|
||||
|
||||
RT_PLAIN_PALETTE = 0;
|
||||
RT_PLAIN_PALETTE_FAST = 1;
|
||||
RT_DITHER_PALETTE = 2;
|
||||
RT_DITHER_PALETTE_FAST = 3;
|
||||
RT_PLAIN_TRUECOL = 4;
|
||||
RT_DITHER_TRUECOL = 5;
|
||||
|
||||
procedure gdk_imlib_init;cdecl;external gdk_imlibdll name 'gdk_imlib_init';
|
||||
procedure gdk_imlib_init_params(p:PGdkImlibInitParams);cdecl;external gdk_imlibdll name 'gdk_imlib_init_params';
|
||||
function gdk_imlib_get_render_type:gint;cdecl;external gdk_imlibdll name 'gdk_imlib_get_render_type';
|
||||
procedure gdk_imlib_set_render_type(rend_type:gint);cdecl;external gdk_imlibdll name 'gdk_imlib_set_render_type';
|
||||
function gdk_imlib_load_colors(afile:Pchar):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_load_colors';
|
||||
function gdk_imlib_load_image(afile:Pchar):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_load_image';
|
||||
function gdk_imlib_load_alpha(afile:Pchar):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_load_alpha';
|
||||
function gdk_imlib_best_color_match(r:Pgint; g:Pgint; b:Pgint):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_best_color_match';
|
||||
procedure gdk_imlib_best_color_get(c:PGdkColor);cdecl;external gdk_imlibdll name 'gdk_imlib_best_color_get';
|
||||
function gdk_imlib_render(image:PGdkImlibImage; width:gint; height:gint):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_render';
|
||||
function gdk_imlib_copy_image(image:PGdkImlibImage):PGdkPixmap;cdecl;external gdk_imlibdll name 'gdk_imlib_copy_image';
|
||||
function gdk_imlib_copy_mask(image:PGdkImlibImage):PGdkBitmap;cdecl;external gdk_imlibdll name 'gdk_imlib_copy_mask';
|
||||
function gdk_imlib_move_image(image:PGdkImlibImage):PGdkPixmap;cdecl;external gdk_imlibdll name 'gdk_imlib_move_image';
|
||||
function gdk_imlib_move_mask(image:PGdkImlibImage):PGdkBitmap;cdecl;external gdk_imlibdll name 'gdk_imlib_move_mask';
|
||||
procedure gdk_imlib_destroy_image(image:PGdkImlibImage);cdecl;external gdk_imlibdll name 'gdk_imlib_destroy_image';
|
||||
procedure gdk_imlib_kill_image(image:PGdkImlibImage);cdecl;external gdk_imlibdll name 'gdk_imlib_kill_image';
|
||||
procedure gdk_imlib_free_colors;cdecl;external gdk_imlibdll name 'gdk_imlib_free_colors';
|
||||
procedure gdk_imlib_free_pixmap(pixmap:PGdkPixmap);cdecl;external gdk_imlibdll name 'gdk_imlib_free_pixmap';
|
||||
procedure gdk_imlib_free_bitmap(bitmap:PGdkBitmap);cdecl;external gdk_imlibdll name 'gdk_imlib_free_bitmap';
|
||||
procedure gdk_imlib_get_image_border(image:PGdkImlibImage; border:PGdkImlibBorder);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_border';
|
||||
procedure gdk_imlib_set_image_border(image:PGdkImlibImage; border:PGdkImlibBorder);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_border';
|
||||
procedure gdk_imlib_get_image_shape(image:PGdkImlibImage; color:PGdkImlibColor);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_shape';
|
||||
procedure gdk_imlib_set_image_shape(image:PGdkImlibImage; color:PGdkImlibColor);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_shape';
|
||||
function gdk_imlib_save_image_to_eim(image:PGdkImlibImage; afile:Pchar):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_save_image_to_eim';
|
||||
function gdk_imlib_add_image_to_eim(image:PGdkImlibImage; afile:Pchar):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_add_image_to_eim';
|
||||
function gdk_imlib_save_image_to_ppm(image:PGdkImlibImage; afile:Pchar):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_save_image_to_ppm';
|
||||
function gdk_imlib_load_file_to_pixmap(filename:Pchar; pmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_load_file_to_pixmap';
|
||||
procedure gdk_imlib_set_image_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_modifier';
|
||||
procedure gdk_imlib_set_image_red_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_red_modifier';
|
||||
procedure gdk_imlib_set_image_green_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_green_modifier';
|
||||
procedure gdk_imlib_set_image_blue_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_blue_modifier';
|
||||
procedure gdk_imlib_get_image_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_modifier';
|
||||
procedure gdk_imlib_get_image_red_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_red_modifier';
|
||||
procedure gdk_imlib_get_image_green_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_green_modifier';
|
||||
procedure gdk_imlib_get_image_blue_modifier(image:PGdkImlibImage; mods:PGdkImlibColorModifier);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_blue_modifier';
|
||||
procedure gdk_imlib_set_image_red_curve(image:PGdkImlibImage; mods:Pbyte);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_red_curve';
|
||||
procedure gdk_imlib_set_image_green_curve(image:PGdkImlibImage; mods:Pbyte);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_green_curve';
|
||||
procedure gdk_imlib_set_image_blue_curve(image:PGdkImlibImage; mods:Pbyte);cdecl;external gdk_imlibdll name 'gdk_imlib_set_image_blue_curve';
|
||||
procedure gdk_imlib_get_image_red_curve(image:PGdkImlibImage; mods:Pbyte);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_red_curve';
|
||||
procedure gdk_imlib_get_image_green_curve(image:PGdkImlibImage; mods:Pbyte);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_green_curve';
|
||||
procedure gdk_imlib_get_image_blue_curve(image:PGdkImlibImage; mods:Pbyte);cdecl;external gdk_imlibdll name 'gdk_imlib_get_image_blue_curve';
|
||||
procedure gdk_imlib_apply_modifiers_to_rgb(image:PGdkImlibImage);cdecl;external gdk_imlibdll name 'gdk_imlib_apply_modifiers_to_rgb';
|
||||
procedure gdk_imlib_changed_image(image:PGdkImlibImage);cdecl;external gdk_imlibdll name 'gdk_imlib_changed_image';
|
||||
procedure gdk_imlib_apply_image(image:PGdkImlibImage; p:PGdkWindow);cdecl;external gdk_imlibdll name 'gdk_imlib_apply_image';
|
||||
procedure gdk_imlib_paste_image(image:PGdkImlibImage; p:PGdkWindow; x:gint; y:gint; w:gint;
|
||||
h:gint);cdecl;external gdk_imlibdll name 'gdk_imlib_paste_image';
|
||||
procedure gdk_imlib_paste_image_border(image:PGdkImlibImage; p:PGdkWindow; x:gint; y:gint; w:gint;
|
||||
h:gint);cdecl;external gdk_imlibdll name 'gdk_imlib_paste_image_border';
|
||||
procedure gdk_imlib_flip_image_horizontal(image:PGdkImlibImage);cdecl;external gdk_imlibdll name 'gdk_imlib_flip_image_horizontal';
|
||||
procedure gdk_imlib_flip_image_vertical(image:PGdkImlibImage);cdecl;external gdk_imlibdll name 'gdk_imlib_flip_image_vertical';
|
||||
procedure gdk_imlib_rotate_image(image:PGdkImlibImage; d:gint);cdecl;external gdk_imlibdll name 'gdk_imlib_rotate_image';
|
||||
function gdk_imlib_create_image_from_data(data:Pbyte; alpha:Pbyte; w:gint; h:gint):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_create_image_from_data';
|
||||
function gdk_imlib_clone_image(image:PGdkImlibImage):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_clone_image';
|
||||
function gdk_imlib_clone_scaled_image(image:PGdkImlibImage; w:longint; h:longint):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_clone_scaled_image';
|
||||
function gdk_imlib_get_fallback:gint;cdecl;external gdk_imlibdll name 'gdk_imlib_get_fallback';
|
||||
procedure gdk_imlib_set_fallback(fallback:gint);cdecl;external gdk_imlibdll name 'gdk_imlib_set_fallback';
|
||||
function gdk_imlib_get_visual:PGdkVisual;cdecl;external gdk_imlibdll name 'gdk_imlib_get_visual';
|
||||
function gdk_imlib_get_colormap:PGdkColormap;cdecl;external gdk_imlibdll name 'gdk_imlib_get_colormap';
|
||||
function gdk_imlib_get_sysconfig:Pgchar;cdecl;external gdk_imlibdll name 'gdk_imlib_get_sysconfig';
|
||||
function gdk_imlib_create_image_from_xpm_data(data:PPchar):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_create_image_from_xpm_data';
|
||||
function gdk_imlib_data_to_pixmap(data:PPchar; pmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_data_to_pixmap';
|
||||
procedure gdk_imlib_crop_image(image:PGdkImlibImage; x:gint; y:gint; w:gint; h:gint);cdecl;external gdk_imlibdll name 'gdk_imlib_crop_image';
|
||||
function gdk_imlib_save_image(image:PGdkImlibImage; afile:Pchar; info:PGdkImlibSaveInfo):gint;cdecl;external gdk_imlibdll name 'gdk_imlib_save_image';
|
||||
function gdk_imlib_crop_and_clone_image(image:PGdkImlibImage; x:longint; y:longint; w:longint; h:longint):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_crop_and_clone_image';
|
||||
function gdk_imlib_create_image_from_drawable(gwin:PGdkWindow; gmask:PGdkBitmap; x:longint; y:longint; width:longint;
|
||||
height:longint):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_create_image_from_drawable';
|
||||
function gdk_imlib_inlined_png_to_image(data:Pbyte; data_size:longint):PGdkImlibImage;cdecl;external gdk_imlibdll name 'gdk_imlib_inlined_png_to_image';
|
||||
procedure gdk_imlib_get_cache_info(cache_pixmaps:Plongint; cache_images:Plongint);cdecl;external gdk_imlibdll name 'gdk_imlib_get_cache_info';
|
||||
procedure gdk_imlib_set_cache_info(cache_pixmaps:longint; cache_images:longint);cdecl;external gdk_imlibdll name 'gdk_imlib_set_cache_info';
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
end.
|
273
packages/imlib/src/imlib.pp
Normal file
273
packages/imlib/src/imlib.pp
Normal file
@ -0,0 +1,273 @@
|
||||
{
|
||||
|
||||
Imlib library
|
||||
|
||||
Copyright (C) 1998 By The Rasterman (Carsten Haitzler)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
**********************************************************************}
|
||||
unit Imlib;
|
||||
|
||||
interface
|
||||
|
||||
{$PACKRECORDS C}
|
||||
{$mode objfpc}
|
||||
|
||||
Uses X, Xlib, XUtil;
|
||||
|
||||
const
|
||||
{$ifndef os2}
|
||||
Imlibdll='Imlib';
|
||||
{$else}
|
||||
Imlibdll='Imlib195';
|
||||
{$endif}
|
||||
|
||||
Type
|
||||
PImlibBorder = ^TImlibBorder;
|
||||
TImlibBorder = record
|
||||
left : longint;
|
||||
right : longint;
|
||||
top : longint;
|
||||
bottom : longint;
|
||||
end;
|
||||
|
||||
PImlibColor = ^TImlibColor;
|
||||
TImlibColor = record
|
||||
r : longint;
|
||||
g : longint;
|
||||
b : longint;
|
||||
pixel : longint;
|
||||
end;
|
||||
|
||||
PImlibColorModifier = ^TImlibColorModifier;
|
||||
TImlibColorModifier = record
|
||||
gamma : longint;
|
||||
brightness : longint;
|
||||
contrast : longint;
|
||||
end;
|
||||
|
||||
PImlibImage = ^TImlibImage;
|
||||
TImlibImage = record
|
||||
rgb_width : longint;
|
||||
rgb_height : longint;
|
||||
rgb_data : Pbyte;
|
||||
alpha_data : Pbyte;
|
||||
filename : PChar;
|
||||
width : longint;
|
||||
height : longint;
|
||||
shape_color : TImlibColor;
|
||||
border : TImlibBorder;
|
||||
pixmap : TPixmap;
|
||||
shape_mask : TPixmap;
|
||||
cache : char;
|
||||
mods : TImlibColorModifier;
|
||||
rmod : TImlibColorModifier;
|
||||
gmod : TImlibColorModifier;
|
||||
bmod : TImlibColorModifier;
|
||||
rmap : array[0..255] of byte;
|
||||
gmap : array[0..255] of byte;
|
||||
bmap : array[0..255] of byte;
|
||||
end;
|
||||
|
||||
Pxdata = ^Txdata;
|
||||
Txdata = record
|
||||
disp : PDisplay;
|
||||
screen : longint;
|
||||
root : TWindow;
|
||||
visual : PVisual;
|
||||
depth : longint;
|
||||
render_depth : longint;
|
||||
root_cmap : TColormap;
|
||||
shm : char;
|
||||
shmp : char;
|
||||
shm_event : longint;
|
||||
last_xim : PXImage;
|
||||
last_sxim : PXImage;
|
||||
last_shminfo : Pointer;//XShmSegmentInfo;
|
||||
last_sshminfo :Pointer;//XShmSegmentInfo;
|
||||
base_window : TWindow;
|
||||
byte_order : longint;
|
||||
bit_order : longint;
|
||||
end;
|
||||
|
||||
PImlibData = ^TImlibData;
|
||||
TImlibData = record
|
||||
num_colors : longint;
|
||||
palette : PImlibColor;
|
||||
palette_orig : PImlibColor;
|
||||
fast_rgb : Pbyte;
|
||||
fast_err : Plongint;
|
||||
fast_erg : Plongint;
|
||||
fast_erb : Plongint;
|
||||
render_type : longint;
|
||||
max_shm : longint;
|
||||
x : TXdata;
|
||||
byte_order : longint;
|
||||
cache : record
|
||||
on_image : char;
|
||||
size_image : longint;
|
||||
num_image : longint;
|
||||
used_image : longint;
|
||||
image : Pointer;//image_cache;
|
||||
on_pixmap : char;
|
||||
size_pixmap : longint;
|
||||
num_pixmap : longint;
|
||||
used_pixmap : longint;
|
||||
pixmap : Pointer;//pixmap_cache;
|
||||
end;
|
||||
fastrend : char;
|
||||
hiq : char;
|
||||
mods : TImlibColorModifier;
|
||||
rmod : TImlibColorModifier;
|
||||
gmod : TImlibColorModifier;
|
||||
bmod : TImlibColorModifier;
|
||||
rmap : array[0..255] of byte;
|
||||
gmap : array[0..255] of byte;
|
||||
bmap : array[0..255] of byte;
|
||||
fallback : char;
|
||||
ordered_dither : char;
|
||||
end;
|
||||
|
||||
PImlibSaveInfo = ^TImlibSaveInfo;
|
||||
TImlibSaveInfo = record
|
||||
quality : longint;
|
||||
scaling : longint;
|
||||
xjustification : longint;
|
||||
yjustification : longint;
|
||||
page_size : longint;
|
||||
color : char;
|
||||
end;
|
||||
|
||||
PImlibInitParams = ^TImlibInitParams;
|
||||
TImlibInitParams = record
|
||||
flags : longint;
|
||||
visualid : longint;
|
||||
palettefile : Pchar;
|
||||
sharedmem : char;
|
||||
sharedpixmaps : char;
|
||||
paletteoverride : char;
|
||||
remap : char;
|
||||
fastrender : char;
|
||||
hiquality : char;
|
||||
dither : char;
|
||||
imagecachesize : longint;
|
||||
pixmapcachesize : longint;
|
||||
cmap : TColormap;
|
||||
end;
|
||||
|
||||
const
|
||||
PARAMS_VISUALID = 1 shl 0;
|
||||
PARAMS_PALETTEFILE = 1 shl 1;
|
||||
PARAMS_SHAREDMEM = 1 shl 2;
|
||||
PARAMS_SHAREDPIXMAPS = 1 shl 3;
|
||||
PARAMS_PALETTEOVERRIDE = 1 shl 4;
|
||||
PARAMS_REMAP = 1 shl 5;
|
||||
PARAMS_FASTRENDER = 1 shl 6;
|
||||
PARAMS_HIQUALITY = 1 shl 7;
|
||||
PARAMS_DITHER = 1 shl 8;
|
||||
PARAMS_IMAGECACHESIZE = 1 shl 9;
|
||||
PARAMS_PIXMAPCACHESIZE = 1 shl 10;
|
||||
|
||||
PAGE_SIZE_EXECUTIVE = 0;
|
||||
PAGE_SIZE_LETTER = 1;
|
||||
PAGE_SIZE_LEGAL = 2;
|
||||
PAGE_SIZE_A4 = 3;
|
||||
PAGE_SIZE_A3 = 4;
|
||||
PAGE_SIZE_A5 = 5;
|
||||
PAGE_SIZE_FOLIO = 6;
|
||||
|
||||
RT_PLAIN_PALETTE = 0;
|
||||
RT_PLAIN_PALETTE_FAST = 1;
|
||||
RT_DITHER_PALETTE = 2;
|
||||
RT_DITHER_PALETTE_FAST = 3;
|
||||
RT_PLAIN_TRUECOL = 4;
|
||||
RT_DITHER_TRUECOL = 5;
|
||||
|
||||
function Imlib_init(disp:PDisplay):PImlibData;cdecl;external imlibdll name 'Imlib_init';
|
||||
function Imlib_init_with_params(disp:PDisplay; p:PImlibInitParams):PImlibData;cdecl;external imlibdll name 'Imlib_init_with_params';
|
||||
function Imlib_get_render_type(id:PImlibData):longint;cdecl;external imlibdll name 'Imlib_get_render_type';
|
||||
procedure Imlib_set_render_type(id:PImlibData; rend_type:longint);cdecl;external imlibdll name 'Imlib_set_render_type';
|
||||
function Imlib_load_colors(id:PImlibData; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_load_colors';
|
||||
function Imlib_load_image(id:PImlibData; thefile:Pchar):PImlibImage;cdecl;external imlibdll name 'Imlib_load_image';
|
||||
function Imlib_best_color_match(id:PImlibData; r:Plongint; g:Plongint; b:Plongint):longint;cdecl;external imlibdll name 'Imlib_best_color_match';
|
||||
function Imlib_render(id:PImlibData; image:PImlibImage; width:longint; height:longint):longint;cdecl;external imlibdll name 'Imlib_render';
|
||||
function Imlib_copy_image(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_copy_image';
|
||||
function Imlib_copy_mask(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_copy_mask';
|
||||
function Imlib_move_image(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_move_image';
|
||||
function Imlib_move_mask(id:PImlibData; image:PImlibImage):TPixmap;cdecl;external imlibdll name 'Imlib_move_mask';
|
||||
procedure Imlib_destroy_image(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_destroy_image';
|
||||
procedure Imlib_kill_image(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_kill_image';
|
||||
procedure Imlib_free_colors(id:PImlibData);cdecl;external imlibdll name 'Imlib_free_colors';
|
||||
procedure Imlib_free_pixmap(id:PImlibData; pixmap:TPixmap);cdecl;external imlibdll name 'Imlib_free_pixmap';
|
||||
procedure Imlib_get_image_border(id:PImlibData; image:PImlibImage; border:PImlibBorder);cdecl;external imlibdll name 'Imlib_get_image_border';
|
||||
procedure Imlib_set_image_border(id:PImlibData; image:PImlibImage; border:PImlibBorder);cdecl;external imlibdll name 'Imlib_set_image_border';
|
||||
procedure Imlib_get_image_shape(id:PImlibData; image:PImlibImage; color:PImlibColor);cdecl;external imlibdll name 'Imlib_get_image_shape';
|
||||
procedure Imlib_set_image_shape(id:PImlibData; image:PImlibImage; color:PImlibColor);cdecl;external imlibdll name 'Imlib_set_image_shape';
|
||||
function Imlib_save_image_to_eim(id:PImlibData; image:PImlibImage; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_save_image_to_eim';
|
||||
function Imlib_add_image_to_eim(id:PImlibData; image:PImlibImage; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_add_image_to_eim';
|
||||
function Imlib_save_image_to_ppm(id:PImlibData; image:PImlibImage; thefile:Pchar):longint;cdecl;external imlibdll name 'Imlib_save_image_to_ppm';
|
||||
function Imlib_load_file_to_pixmap(id:PImlibData; filename:Pchar; pmap:PPixmap; mask:PPixmap):longint;cdecl;external imlibdll name 'Imlib_load_file_to_pixmap';
|
||||
procedure Imlib_set_image_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_modifier';
|
||||
procedure Imlib_set_image_red_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_red_modifier';
|
||||
procedure Imlib_set_image_green_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_green_modifier';
|
||||
procedure Imlib_set_image_blue_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_set_image_blue_modifier';
|
||||
procedure Imlib_get_image_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_modifier';
|
||||
procedure Imlib_get_image_red_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_red_modifier';
|
||||
procedure Imlib_get_image_green_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_green_modifier';
|
||||
procedure Imlib_get_image_blue_modifier(id:PImlibData; image:PImlibImage; mods:PImlibColorModifier);cdecl;external imlibdll name 'Imlib_get_image_blue_modifier';
|
||||
procedure Imlib_set_image_red_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_set_image_red_curve';
|
||||
procedure Imlib_set_image_green_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_set_image_green_curve';
|
||||
procedure Imlib_set_image_blue_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_set_image_blue_curve';
|
||||
procedure Imlib_get_image_red_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_get_image_red_curve';
|
||||
procedure Imlib_get_image_green_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_get_image_green_curve';
|
||||
procedure Imlib_get_image_blue_curve(id:PImlibData; image:PImlibImage; mods:Pbyte);cdecl;external imlibdll name 'Imlib_get_image_blue_curve';
|
||||
procedure Imlib_apply_modifiers_to_rgb(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_apply_modifiers_to_rgb';
|
||||
procedure Imlib_changed_image(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_changed_image';
|
||||
procedure Imlib_apply_image(id:PImlibData; image:PImlibImage; p:TWindow);cdecl;external imlibdll name 'Imlib_apply_image';
|
||||
procedure Imlib_paste_image(id:PImlibData; image:PImlibImage; p:TWindow; x:longint; y:longint;
|
||||
w:longint; h:longint);cdecl;external imlibdll name 'Imlib_paste_image';
|
||||
procedure Imlib_paste_image_border(id:PImlibData; image:PImlibImage; p:TWindow; x:longint; y:longint;
|
||||
w:longint; h:longint);cdecl;external imlibdll name 'Imlib_paste_image_border';
|
||||
procedure Imlib_bevel_image(id:PImlibData; image:PImlibImage; bord:PImlibBorder; up:byte);cdecl;external imlibdll name 'Imlib_bevel_image';
|
||||
procedure Imlib_bevel_pixmap(id:PImlibData; p:TPixmap; w:longint; h:longint; bord:PImlibBorder;
|
||||
up:byte);cdecl;external imlibdll name 'Imlib_bevel_pixmap';
|
||||
procedure Imlib_flip_image_horizontal(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_flip_image_horizontal';
|
||||
procedure Imlib_flip_image_vertical(id:PImlibData; image:PImlibImage);cdecl;external imlibdll name 'Imlib_flip_image_vertical';
|
||||
procedure Imlib_rotate_image(id:PImlibData; image:PImlibImage; d:longint);cdecl;external imlibdll name 'Imlib_rotate_image';
|
||||
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';
|
||||
function Imlib_clone_image(id:PImlibData; image:PImlibImage):PImlibImage;cdecl;external imlibdll name 'Imlib_clone_image';
|
||||
function Imlib_clone_scaled_image(id:PImlibData; image:PImlibImage; w:longint; h:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_clone_scaled_image';
|
||||
function Imlib_get_fallback(id:PImlibData):longint;cdecl;external imlibdll name 'Imlib_get_fallback';
|
||||
procedure Imlib_set_fallback(id:PImlibData; fallback:longint);cdecl;external imlibdll name 'Imlib_set_fallback';
|
||||
function Imlib_get_visual(id:PImlibData):PVisual;cdecl;external imlibdll name 'Imlib_get_visual';
|
||||
function Imlib_get_colormap(id:PImlibData):TColormap;cdecl;external imlibdll name 'Imlib_get_colormap';
|
||||
function Imlib_get_sysconfig(id:PImlibData):Pchar;cdecl;external imlibdll name 'Imlib_get_sysconfig';
|
||||
function Imlib_create_image_from_xpm_data(id:PImlibData; data:PPchar):PImlibImage;cdecl;external imlibdll name 'Imlib_create_image_from_xpm_data';
|
||||
function Imlib_data_to_pixmap(id:PImlibData; data:PPchar; pmap:PPixmap; mask:PPixmap):longint;cdecl;external imlibdll name 'Imlib_data_to_pixmap';
|
||||
procedure Imlib_crop_image(id:PImlibData; image:PImlibImage; x:longint; y:longint; w:longint;
|
||||
h:longint);cdecl;external imlibdll name 'Imlib_crop_image';
|
||||
function Imlib_save_image(id:PImlibData; image:PImlibImage; thefile:Pchar; info:PImlibSaveInfo):longint;cdecl;external imlibdll name 'Imlib_save_image';
|
||||
function Imlib_crop_and_clone_image(id:PImlibData; image:PImlibImage; x:longint; y:longint; w:longint;
|
||||
h:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_crop_and_clone_image';
|
||||
function Imlib_create_image_from_drawable(id:PImlibData; win:TDrawable; mask:TPixmap; x:longint; y:longint;
|
||||
width:longint; height:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_create_image_from_drawable';
|
||||
function Imlib_inlined_png_to_image(id:PImlibData; data:Pbyte; data_size:longint):PImlibImage;cdecl;external imlibdll name 'Imlib_inlined_png_to_image';
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user