gimp/app/layer_cmds.c

1930 lines
43 KiB
C
Raw Normal View History

1997-11-25 06:05:25 +08:00
/* The GIMP -- an image manipulation program
* Copyright (C) 1995-2000 Spencer Kimball and Peter Mattis
1997-11-25 06:05:25 +08:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1997-11-25 06:05:25 +08:00
*/
/* NOTE: This file is autogenerated by pdbgen.pl. */
#include "procedural_db.h"
1997-11-25 06:05:25 +08:00
#include "apptypes.h"
#include "channel.h"
#include "drawable.h"
#include "floating_sel.h"
#include "layer.h"
#include "layer_pvt.h"
#include "undo.h"
1997-11-25 06:05:25 +08:00
static ProcRecord layer_new_proc;
static ProcRecord layer_copy_proc;
static ProcRecord layer_create_mask_proc;
static ProcRecord layer_scale_proc;
static ProcRecord layer_resize_proc;
static ProcRecord layer_delete_proc;
static ProcRecord layer_translate_proc;
static ProcRecord layer_add_alpha_proc;
static ProcRecord layer_set_offsets_proc;
static ProcRecord layer_mask_proc;
static ProcRecord layer_is_floating_sel_proc;
static ProcRecord layer_get_name_proc;
static ProcRecord layer_set_name_proc;
static ProcRecord layer_get_visible_proc;
static ProcRecord layer_set_visible_proc;
static ProcRecord layer_get_preserve_trans_proc;
static ProcRecord layer_set_preserve_trans_proc;
static ProcRecord layer_get_apply_mask_proc;
static ProcRecord layer_set_apply_mask_proc;
static ProcRecord layer_get_show_mask_proc;
static ProcRecord layer_set_show_mask_proc;
static ProcRecord layer_get_edit_mask_proc;
static ProcRecord layer_set_edit_mask_proc;
static ProcRecord layer_get_opacity_proc;
static ProcRecord layer_set_opacity_proc;
static ProcRecord layer_get_mode_proc;
static ProcRecord layer_set_mode_proc;
static ProcRecord layer_get_linked_proc;
static ProcRecord layer_set_linked_proc;
static ProcRecord layer_get_tattoo_proc;
static ProcRecord layer_set_tattoo_proc;
void
register_layer_procs (void)
{
procedural_db_register (&layer_new_proc);
procedural_db_register (&layer_copy_proc);
procedural_db_register (&layer_create_mask_proc);
procedural_db_register (&layer_scale_proc);
procedural_db_register (&layer_resize_proc);
procedural_db_register (&layer_delete_proc);
procedural_db_register (&layer_translate_proc);
procedural_db_register (&layer_add_alpha_proc);
procedural_db_register (&layer_set_offsets_proc);
procedural_db_register (&layer_mask_proc);
procedural_db_register (&layer_is_floating_sel_proc);
procedural_db_register (&layer_get_name_proc);
procedural_db_register (&layer_set_name_proc);
procedural_db_register (&layer_get_visible_proc);
procedural_db_register (&layer_set_visible_proc);
procedural_db_register (&layer_get_preserve_trans_proc);
procedural_db_register (&layer_set_preserve_trans_proc);
procedural_db_register (&layer_get_apply_mask_proc);
procedural_db_register (&layer_set_apply_mask_proc);
procedural_db_register (&layer_get_show_mask_proc);
procedural_db_register (&layer_set_show_mask_proc);
procedural_db_register (&layer_get_edit_mask_proc);
procedural_db_register (&layer_set_edit_mask_proc);
procedural_db_register (&layer_get_opacity_proc);
procedural_db_register (&layer_set_opacity_proc);
procedural_db_register (&layer_get_mode_proc);
procedural_db_register (&layer_set_mode_proc);
procedural_db_register (&layer_get_linked_proc);
procedural_db_register (&layer_set_linked_proc);
procedural_db_register (&layer_get_tattoo_proc);
procedural_db_register (&layer_set_tattoo_proc);
}
1997-11-25 06:05:25 +08:00
static Argument *
layer_new_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpImage *gimage;
gint32 width;
gint32 height;
gint32 type;
gchar *name;
gdouble opacity_arg;
gint32 mode;
GimpLayer *layer = NULL;
int opacity;
1997-11-25 06:05:25 +08:00
gimage = pdb_id_to_image (args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
width = args[1].value.pdb_int;
if (width <= 0)
success = FALSE;
height = args[2].value.pdb_int;
if (height <= 0)
success = FALSE;
type = args[3].value.pdb_int;
if (type < RGB_GIMAGE || type > INDEXEDA_GIMAGE)
success = FALSE;
name = (gchar *) args[4].value.pdb_pointer;
opacity_arg = args[5].value.pdb_float;
if (opacity_arg < 0.0 || opacity_arg > 100.0)
success = FALSE;
mode = args[6].value.pdb_int;
if (mode < NORMAL_MODE || mode > DIVIDE_MODE)
success = FALSE;
1997-11-25 06:05:25 +08:00
if (success)
{
opacity = (int) ((opacity_arg * 255) / 100);
layer = layer_new (gimage, width, height, (GimpImageType) type, name, opacity, (LayerModeEffects) mode);
success = layer != NULL;
1997-11-25 06:05:25 +08:00
}
return_args = procedural_db_return_args (&layer_new_proc, success);
if (success)
return_args[1].value.pdb_int = drawable_ID (GIMP_DRAWABLE (layer));
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_new_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_IMAGE,
1997-11-25 06:05:25 +08:00
"image",
"The image to which to add the layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"width",
"The layer width: (0 < width)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"height",
"The layer height: (0 < height)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"type",
add sample_colorize and curve_bend defs * plug-ins/common/plugin-defs.pl: add sample_colorize and curve_bend defs * libgimp/color_selector.h: minor consistency cleanup * libgimp/gimpchainbutton.[ch]: use new style gtk object helper macros * libgimp/gimpfileselection.c * libgimp/gimpmatrix.h: minor cleanup * libgimp/gimpintl.h: resync with gnome-i18n.h * libgimp/color_display.h * app/gimp.sym * app/gdisplay_color.[ch] * app/app_procs.c * app/gdisplay.h * app/image_render.c: color display transformation code. Still unfinished, so it's not activated yet. * app/buildmenu.h: remove unused defines (PULLDOWN, POPUP, OPTION) * app/colormaps.[ch] * app/image_render.c: remove vestigal dithering stuff * app/convolve.h * app/gimpdrawable.h * app/gimpimage.h * app/lut_funcs.h * app/paint_funcs.h * app/plug_in.h: enum nick changes from Marc * app/channel_ops.c * app/crop.c * app/gdisplay.c * app/gimpimage.[ch] * app/move.c: s/([A-Z]+)_GUIDE/ORIENTATION_$1/ * app/flip_tool.[ch] * app/shear_tool.[ch]: use ORIENTATION_* constants instead of our own * app/disp_callbacks.c: remove HORIZONTAL and VERTICAL #defines * app/general.h: enumified TOKEN_* symbols * app/lc_dialog.c * app/paint_funcs.c: remove unused variables * tools/pdbgen/lib.pl: autogen gimpenums.h (unfinished) * tools/pdbgen/stddefs.pdb: new std_orientation_enum, remove layer_mode shortcut since we've skipped it in app/ * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gimage.pdb * tools/pdbgen/pdb/guides.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: reflect above enum changes, whitespace cleanups * tools/pdbgen/enums.pl * app/brush_select_cmds.c * app/brushes_cmds.c * app/color_cmds.c * app/drawable_cmds.c * app/gimage_cmds.c * app/layer_cmds.c * app/procedural_db_cmds.c * app/tools_cmds.c: reflect pdb and enum nick changes above -Yosh
1999-07-29 07:00:08 +08:00
"The layer type: { RGB_IMAGE (0), RGBA_IMAGE (1), GRAY_IMAGE (2), GRAYA_IMAGE (3), INDEXED_IMAGE (4), INDEXEDA_IMAGE (5) }"
1997-11-25 06:05:25 +08:00
},
{
PDB_STRING,
1997-11-25 06:05:25 +08:00
"name",
"The layer name"
1997-11-25 06:05:25 +08:00
},
{
PDB_FLOAT,
1997-11-25 06:05:25 +08:00
"opacity",
"The layer opacity: (0 <= opacity <= 100)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"mode",
add sample_colorize and curve_bend defs * plug-ins/common/plugin-defs.pl: add sample_colorize and curve_bend defs * libgimp/color_selector.h: minor consistency cleanup * libgimp/gimpchainbutton.[ch]: use new style gtk object helper macros * libgimp/gimpfileselection.c * libgimp/gimpmatrix.h: minor cleanup * libgimp/gimpintl.h: resync with gnome-i18n.h * libgimp/color_display.h * app/gimp.sym * app/gdisplay_color.[ch] * app/app_procs.c * app/gdisplay.h * app/image_render.c: color display transformation code. Still unfinished, so it's not activated yet. * app/buildmenu.h: remove unused defines (PULLDOWN, POPUP, OPTION) * app/colormaps.[ch] * app/image_render.c: remove vestigal dithering stuff * app/convolve.h * app/gimpdrawable.h * app/gimpimage.h * app/lut_funcs.h * app/paint_funcs.h * app/plug_in.h: enum nick changes from Marc * app/channel_ops.c * app/crop.c * app/gdisplay.c * app/gimpimage.[ch] * app/move.c: s/([A-Z]+)_GUIDE/ORIENTATION_$1/ * app/flip_tool.[ch] * app/shear_tool.[ch]: use ORIENTATION_* constants instead of our own * app/disp_callbacks.c: remove HORIZONTAL and VERTICAL #defines * app/general.h: enumified TOKEN_* symbols * app/lc_dialog.c * app/paint_funcs.c: remove unused variables * tools/pdbgen/lib.pl: autogen gimpenums.h (unfinished) * tools/pdbgen/stddefs.pdb: new std_orientation_enum, remove layer_mode shortcut since we've skipped it in app/ * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gimage.pdb * tools/pdbgen/pdb/guides.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: reflect above enum changes, whitespace cleanups * tools/pdbgen/enums.pl * app/brush_select_cmds.c * app/brushes_cmds.c * app/color_cmds.c * app/drawable_cmds.c * app/gimage_cmds.c * app/layer_cmds.c * app/procedural_db_cmds.c * app/tools_cmds.c: reflect pdb and enum nick changes above -Yosh
1999-07-29 07:00:08 +08:00
"The layer combination mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_new_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The newly created layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_new_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_new",
"Create a new layer.",
"This procedure creates a new layer with the specified width, height, and type. Name, opacity, and mode are also supplied parameters. The new layer still needs to be added to the image, as this is not automatic. Add the new layer with the 'gimp_image_add_layer' command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
7,
layer_new_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_new_outargs,
{ { layer_new_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_copy_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
gboolean add_alpha;
GimpLayer *copy = NULL;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
add_alpha = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
success = (copy = layer_copy (layer, add_alpha)) != NULL;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_copy_proc, success);
if (success)
return_args[1].value.pdb_int = drawable_ID (GIMP_DRAWABLE (copy));
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_copy_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer to copy"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
"add_alpha",
"Add an alpha channel to the copied layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_copy_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer_copy",
"The newly copied layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_copy_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_copy",
"Copy a layer.",
"This procedure copies the specified layer and returns the copy. The newly copied layer is for use within the original layer's image. It should not be subsequently added to any other image. The copied layer can optionally have an added alpha channel. This is useful if the background layer in an image is being copied and added to the same image.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_copy_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_copy_outargs,
{ { layer_copy_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_create_mask_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
gint32 mask_type;
LayerMask *mask = NULL;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
mask_type = args[1].value.pdb_int;
if (mask_type < ADD_WHITE_MASK || mask_type > ADD_ALPHA_MASK)
success = FALSE;
1997-11-25 06:05:25 +08:00
if (success)
success = (mask = layer_create_mask (layer, (AddMaskType) mask_type)) != NULL;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_create_mask_proc, success);
if (success)
return_args[1].value.pdb_int = drawable_ID (GIMP_DRAWABLE (mask));
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_create_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer to which to add the mask"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"mask_type",
"The type of mask: { WHITE_MASK (0), BLACK_MASK (1), ALPHA_MASK (2) }"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_create_mask_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_CHANNEL,
1997-11-25 06:05:25 +08:00
"mask",
"The newly created mask"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_create_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_create_mask",
"Create a layer mask for the specified specified layer.",
"This procedure creates a layer mask for the specified layer. Layer masks serve as an additional alpha channel for a layer. Three different types of masks are allowed initially: completely white masks (which will leave the layer fully visible), completely black masks (which will give the layer complete transparency, and the layer's already existing alpha channel (which will leave the layer fully visible, but which may be more useful than a white mask). The layer mask still needs to be added to the layer. This can be done with a call to 'gimage_add_layer_mask'.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_create_mask_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_create_mask_outargs,
{ { layer_create_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_scale_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 new_width;
gint32 new_height;
gboolean local_origin;
GimpImage *gimage;
1997-11-25 06:05:25 +08:00
Layer *floating_layer;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
new_width = args[1].value.pdb_int;
if (new_width <= 0)
success = FALSE;
1997-11-25 06:05:25 +08:00
new_height = args[2].value.pdb_int;
if (new_height <= 0)
success = FALSE;
1997-11-25 06:05:25 +08:00
local_origin = args[3].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
{
if ((gimage = GIMP_DRAWABLE(layer)->gimage))
{
floating_layer = gimage_floating_sel (gimage);
undo_push_group_start (gimage, LAYER_SCALE_UNDO);
if (floating_layer)
floating_sel_relax (floating_layer, TRUE);
layer_scale (layer, new_width, new_height, local_origin);
if (floating_layer)
floating_sel_rigor (floating_layer, TRUE);
undo_push_group_end (gimage);
}
else
success = FALSE;
1997-11-25 06:05:25 +08:00
}
return procedural_db_return_args (&layer_scale_proc, success);
}
static ProcArg layer_scale_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"new_width",
"New layer width: (0 < new_width)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"new_height",
"New layer height: (0 < new_height)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"local_origin",
"Use a local origin (as opposed to the image origin)"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_scale_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_scale",
"Scale the layer to the specified extents.",
"This procedure scales the layer so that it's new width and height are equal to the supplied parameters. The \"local_origin\" parameter specifies whether to scale from the center of the layer, or from the image origin. This operation only works if the layer has been added to an image.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
4,
layer_scale_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_scale_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_resize_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 new_width;
gint32 new_height;
gint32 offx;
gint32 offy;
GimpImage *gimage;
1997-11-25 06:05:25 +08:00
Layer *floating_layer;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
new_width = args[1].value.pdb_int;
if (new_width <= 0)
success = FALSE;
1997-11-25 06:05:25 +08:00
new_height = args[2].value.pdb_int;
if (new_height <= 0)
success = FALSE;
1997-11-25 06:05:25 +08:00
offx = args[3].value.pdb_int;
1997-11-25 06:05:25 +08:00
offy = args[4].value.pdb_int;
1997-11-25 06:05:25 +08:00
if (success)
{
if ((gimage = GIMP_DRAWABLE(layer)->gimage))
{
floating_layer = gimage_floating_sel (gimage);
undo_push_group_start (gimage, LAYER_RESIZE_UNDO);
if (floating_layer)
floating_sel_relax (floating_layer, TRUE);
layer_resize (layer, new_width, new_height, offx, offy);
if (floating_layer)
floating_sel_rigor (floating_layer, TRUE);
undo_push_group_end (gimage);
}
else
success = FALSE;
1997-11-25 06:05:25 +08:00
}
return procedural_db_return_args (&layer_resize_proc, success);
}
static ProcArg layer_resize_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"new_width",
"New layer width: (0 < new_width)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"new_height",
"New layer height: (0 < new_height)"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"offx",
"x offset between upper left corner of old and new layers: (new - old)"
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"offy",
"y offset between upper left corner of old and new layers: (new - old)"
}
};
static ProcRecord layer_resize_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_resize",
"Resize the layer to the specified extents.",
"This procedure resizes the layer so that it's new width and height are equal to the supplied parameters. Offsets are also provided which describe the position of the previous layer's content. This operation only works if the layer has been added to an image.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
5,
layer_resize_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_resize_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_delete_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer_delete (layer);
return procedural_db_return_args (&layer_delete_proc, success);
}
static ProcArg layer_delete_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer to delete"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_delete_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_delete",
"Delete a layer.",
"This procedure deletes the specified layer. This does not need to be done if a gimage containing this layer was already deleted.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_delete_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_delete_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_translate_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 offx;
gint32 offy;
GimpImage *gimage;
1997-11-25 06:05:25 +08:00
Layer *floating_layer;
Layer *tmp_layer;
GSList *layer_list;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
offx = args[1].value.pdb_int;
1997-11-25 06:05:25 +08:00
offy = args[2].value.pdb_int;
1997-11-25 06:05:25 +08:00
if (success)
{
if ((gimage = GIMP_DRAWABLE(layer)->gimage))
1997-11-25 06:05:25 +08:00
{
floating_layer = gimage_floating_sel (gimage);
undo_push_group_start (gimage, LINKED_LAYER_UNDO);
if (floating_layer)
floating_sel_relax (floating_layer, TRUE);
layer_list = gimage->layers;
while (layer_list)
{
tmp_layer = (Layer *) layer_list->data;
if ((tmp_layer == layer) || tmp_layer->linked)
layer_translate (tmp_layer, offx, offy);
layer_list = layer_list->next;
}
if (floating_layer)
floating_sel_rigor (floating_layer, TRUE);
undo_push_group_end (gimage);
1997-11-25 06:05:25 +08:00
}
else
success = FALSE;
1997-11-25 06:05:25 +08:00
}
return procedural_db_return_args (&layer_translate_proc, success);
}
static ProcArg layer_translate_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"offx",
"Offset in x direction"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"offy",
"Offset in y direction"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_translate_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_translate",
"Translate the layer by the specified offsets.",
"This procedure translates the layer by the amounts specified in the x and y arguments. These can be negative, and are considered offsets from the current position. This command only works if the layer has been added to an image. All additional layers contained in the image which have the linked flag set to TRUE w ill also be translated by the specified offsets.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
3,
layer_translate_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_translate_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_add_alpha_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer_add_alpha (layer);
return procedural_db_return_args (&layer_add_alpha_proc, success);
}
static ProcArg layer_add_alpha_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_add_alpha_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_add_alpha",
"Add an alpha channel to the layer if it doesn't already have one.",
"This procedure adds an additional component to the specified layer if it does not already possess an alpha channel. An alpha channel makes it possible to move a layer from the bottom of the layer stack and to clear and erase to transparency, instead of the background color. This transforms images of type RGB to RGBA, GRAY to GRAYA, and INDEXED to INDEXEDA.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_add_alpha_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_add_alpha_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_offsets_invoker (Argument *args)
1997-11-25 06:05:25 +08:00
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 offx;
gint32 offy;
GimpImage *gimage;
Layer *floating_layer;
Layer *tmp_layer;
GSList *layer_list;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
offx = args[1].value.pdb_int;
offy = args[2].value.pdb_int;
1997-11-25 06:05:25 +08:00
if (success)
{
if ((gimage = GIMP_DRAWABLE(layer)->gimage))
{
floating_layer = gimage_floating_sel (gimage);
undo_push_group_start (gimage, LINKED_LAYER_UNDO);
if (floating_layer)
floating_sel_relax (floating_layer, TRUE);
layer_list = gimage->layers;
while (layer_list)
{
tmp_layer = (Layer *) layer_list->data;
if ((tmp_layer == layer) || tmp_layer->linked)
layer_translate (tmp_layer,
(offx - GIMP_DRAWABLE (layer)->offset_x),
(offy - GIMP_DRAWABLE (layer)->offset_y));
layer_list = layer_list->next;
}
if (floating_layer)
floating_sel_rigor (floating_layer, TRUE);
undo_push_group_end (gimage);
}
1997-11-25 06:05:25 +08:00
else
success = FALSE;
}
return procedural_db_return_args (&layer_set_offsets_proc, success);
1997-11-25 06:05:25 +08:00
}
static ProcArg layer_set_offsets_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
},
{
PDB_INT32,
"offx",
"Offset in x direction"
},
{
PDB_INT32,
"offy",
"Offset in y direction"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_offsets_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_offsets",
"Set the layer offsets.",
"This procedure sets the offsets for the specified layer. The offsets are relative to the image origin and can be any values. This operation is valid only on layers which have been added to an image.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
3,
layer_set_offsets_inargs,
0,
NULL,
{ { layer_set_offsets_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_mask_invoker (Argument *args)
1997-11-25 06:05:25 +08:00
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_mask_proc, success);
1997-11-25 06:05:25 +08:00
if (success)
return_args[1].value.pdb_int = layer->mask ? drawable_ID (GIMP_DRAWABLE (layer->mask)) : -1;
1997-11-25 06:05:25 +08:00
return return_args;
1997-11-25 06:05:25 +08:00
}
static ProcArg layer_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_mask_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_CHANNEL,
"mask",
"The layer mask"
}
};
static ProcRecord layer_mask_proc =
{
"gimp_layer_mask",
"Get the specified layer's mask if it exists.",
"This procedure returns the specified layer's mask, or -1 if none exists.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_mask_inargs,
1,
layer_mask_outargs,
{ { layer_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_is_floating_sel_invoker (Argument *args)
1997-11-25 06:05:25 +08:00
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_is_floating_sel_proc, success);
1997-11-25 06:05:25 +08:00
if (success)
return_args[1].value.pdb_int = layer_is_floating_sel (layer);
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_is_floating_sel_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_is_floating_sel_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
"is_floating_sel",
"Non-zero if the layer is a floating selection"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_is_floating_sel_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_is_floating_sel",
"Is the specified layer a floating selection?",
"This procedure returns whether the layer is a floating selection. Floating selections are special cases of layers which are attached to a specific drawable.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_is_floating_sel_inargs,
1,
layer_is_floating_sel_outargs,
{ { layer_is_floating_sel_invoker } }
};
static Argument *
layer_get_name_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
return_args = procedural_db_return_args (&layer_get_name_proc, success);
if (success)
return_args[1].value.pdb_pointer = g_strdup (layer_get_name (layer));
return return_args;
}
1997-11-25 06:05:25 +08:00
static ProcArg layer_get_name_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_name_outargs[] =
{
{
PDB_STRING,
"name",
"The layer name"
}
};
static ProcRecord layer_get_name_proc =
{
"gimp_layer_get_name",
"Get the name of the specified layer.",
"This procedure returns the specified layer's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_name_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_name_outargs,
{ { layer_get_name_invoker } }
};
static Argument *
layer_set_name_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gchar *name;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
success = FALSE;
if (success)
layer_set_name (layer, name);
return procedural_db_return_args (&layer_set_name_proc, success);
}
static ProcArg layer_set_name_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
},
{
PDB_STRING,
"name",
"The new layer name"
}
};
static ProcRecord layer_set_name_proc =
{
"gimp_layer_set_name",
"Set the name of the specified layer.",
"This procedure sets the specified layer's name.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_name_inargs,
0,
NULL,
{ { layer_set_name_invoker } }
};
static Argument *
layer_get_visible_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
return_args = procedural_db_return_args (&layer_get_visible_proc, success);
if (success)
return_args[1].value.pdb_int = GIMP_DRAWABLE (layer)->visible;
return return_args;
}
1997-11-25 06:05:25 +08:00
static ProcArg layer_get_visible_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
}
1997-11-25 06:05:25 +08:00
};
static ProcArg layer_get_visible_outargs[] =
{
{
PDB_INT32,
"visible",
"The layer visibility"
}
};
1997-11-25 06:05:25 +08:00
static ProcRecord layer_get_visible_proc =
{
"gimp_layer_get_visible",
"Get the visibility of the specified layer.",
"This procedure returns the specified layer's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_visible_inargs,
1,
layer_get_visible_outargs,
{ { layer_get_visible_invoker } }
};
1997-11-25 06:05:25 +08:00
static Argument *
layer_set_visible_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean visible;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
visible = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
GIMP_DRAWABLE (layer)->visible = visible;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_visible_proc, success);
}
static ProcArg layer_set_visible_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"visible",
"The new layer visibility"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_visible_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_visible",
"Set the visibility of the specified layer.",
"This procedure sets the specified layer's visibility.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_visible_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_visible_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_preserve_trans_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_preserve_trans_proc, success);
if (success)
return_args[1].value.pdb_int = layer->preserve_trans;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_preserve_trans_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_preserve_trans_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"preserve_trans",
"The layer's preserve transperancy setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_preserve_trans_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_preserve_trans",
"Get the preserve transperancy setting of the specified layer.",
"This procedure returns the specified layer's preserve transperancy setting.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_preserve_trans_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_preserve_trans_outargs,
{ { layer_get_preserve_trans_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_preserve_trans_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean preserve_trans;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
preserve_trans = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->preserve_trans = preserve_trans;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_preserve_trans_proc, success);
}
static ProcArg layer_set_preserve_trans_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"preserve_trans",
"The new layer's preserve transperancy setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_preserve_trans_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_preserve_trans",
"Set the preserve transperancy setting of the specified layer.",
"This procedure sets the specified layer's preserve transperancy setting.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_preserve_trans_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_preserve_trans_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_apply_mask_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_apply_mask_proc, success);
if (success)
return_args[1].value.pdb_int = layer->apply_mask;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_apply_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_apply_mask_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"apply_mask",
"The layer's apply mask setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_apply_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_apply_mask",
"Get the apply mask setting of the specified layer.",
"This procedure returns the specified layer's apply mask setting. If the value is non-zero, then the layer mask for this layer is currently being composited with the layer's alpha channel.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_apply_mask_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_apply_mask_outargs,
{ { layer_get_apply_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_apply_mask_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean apply_mask;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
apply_mask = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->apply_mask = apply_mask;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_apply_mask_proc, success);
}
static ProcArg layer_set_apply_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"apply_mask",
"The new layer's apply mask setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_apply_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_apply_mask",
"Set the apply mask setting of the specified layer.",
"This procedure sets the specified layer's apply mask setting. This controls whether the layer's mask is currently affecting the alpha channel. If there is no layer mask, this function will return an error.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_apply_mask_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_apply_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_show_mask_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_show_mask_proc, success);
if (success)
return_args[1].value.pdb_int = layer->show_mask;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_show_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_show_mask_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"show_mask",
"The layer's show mask setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_show_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_show_mask",
"Get the show mask setting of the specified layer.",
"This procedure returns the specified layer's show mask setting. If the value is non-zero, then the layer mask for this layer is currently being shown instead of the layer.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_show_mask_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_show_mask_outargs,
{ { layer_get_show_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_show_mask_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean show_mask;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
show_mask = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->show_mask = show_mask;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_show_mask_proc, success);
}
static ProcArg layer_set_show_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"show_mask",
"The new layer's show mask setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_show_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_show_mask",
"Set the show mask setting of the specified layer.",
"This procedure sets the specified layer's show mask setting. This controls whether the layer or it's mask is visible. Non-zero values indicate that the mask should be visible. If the layer has no mask, then this function returns an error.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_show_mask_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_show_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_edit_mask_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_edit_mask_proc, success);
if (success)
return_args[1].value.pdb_int = layer->edit_mask;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_edit_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_edit_mask_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"edit_mask",
"The layer's show mask setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_edit_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_edit_mask",
"Get the show mask setting of the specified layer.",
"This procedure returns the specified layer's show mask setting. If the value is non-zero, then the layer mask for this layer is currently active, and not the layer.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_edit_mask_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_edit_mask_outargs,
{ { layer_get_edit_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_edit_mask_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean edit_mask;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
edit_mask = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->edit_mask = edit_mask;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_edit_mask_proc, success);
}
static ProcArg layer_set_edit_mask_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"edit_mask",
"The new layer's show mask setting"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_edit_mask_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_edit_mask",
"Set the show mask setting of the specified layer.",
"This procedure sets the specified layer's show mask setting. This controls whether the layer or it's mask is currently active for editing. If the specified layer has no layer mask, then this procedure will return an error.",
1997-11-25 06:05:25 +08:00
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_edit_mask_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_edit_mask_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_opacity_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_opacity_proc, success);
if (success)
return_args[1].value.pdb_float = (layer->opacity * 100.0) / 255.0;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_opacity_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_opacity_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_FLOAT,
1997-11-25 06:05:25 +08:00
"opacity",
"The layer opacity"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_opacity_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_opacity",
"Get the opacity of the specified layer.",
"This procedure returns the specified layer's opacity.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_opacity_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_opacity_outargs,
{ { layer_get_opacity_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_opacity_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gdouble opacity;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
opacity = args[1].value.pdb_float;
if (opacity < 0.0 || opacity > 100.0)
success = FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->opacity = (int) ((opacity * 255) / 100);
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_opacity_proc, success);
}
static ProcArg layer_set_opacity_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_FLOAT,
1997-11-25 06:05:25 +08:00
"opacity",
"The new layer opacity (0 <= opacity <= 100)"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_opacity_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_opacity",
"Set the opacity of the specified layer.",
"This procedure sets the specified layer's opacity.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_opacity_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_opacity_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_mode_invoker (Argument *args)
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_mode_proc, success);
if (success)
return_args[1].value.pdb_int = layer->mode;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_mode_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_mode_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"mode",
"The layer combination mode"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_mode_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_mode",
"Get the combination mode of the specified layer.",
"This procedure returns the specified layer's combination mode.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_mode_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_mode_outargs,
{ { layer_get_mode_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_mode_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 mode;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
mode = args[1].value.pdb_int;
if (mode < NORMAL_MODE || mode > DIVIDE_MODE)
success = FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->mode = mode;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_mode_proc, success);
}
static ProcArg layer_set_mode_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
},
{
PDB_INT32,
1997-11-25 06:05:25 +08:00
"mode",
"The new layer combination mode"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_mode_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_mode",
"Set the combination mode of the specified layer.",
"This procedure sets the specified layer's combination mode.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_mode_inargs,
1997-11-25 06:05:25 +08:00
0,
NULL,
{ { layer_set_mode_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_get_linked_invoker (Argument *args)
1997-11-25 06:05:25 +08:00
{
gboolean success = TRUE;
1997-11-25 06:05:25 +08:00
Argument *return_args;
GimpLayer *layer;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
return_args = procedural_db_return_args (&layer_get_linked_proc, success);
1997-11-25 06:05:25 +08:00
if (success)
return_args[1].value.pdb_int = layer->linked;
1997-11-25 06:05:25 +08:00
return return_args;
}
static ProcArg layer_get_linked_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
1997-11-25 06:05:25 +08:00
}
};
static ProcArg layer_get_linked_outargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_INT32,
"linked",
"The layer linked state (for moves)"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_get_linked_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_get_linked",
"Get the linked state of the specified layer.",
"This procedure returns the specified layer's linked state.",
"Wolfgang Hofer",
"Wolfgang Hofer",
"1998",
1997-11-25 06:05:25 +08:00
PDB_INTERNAL,
1,
layer_get_linked_inargs,
1997-11-25 06:05:25 +08:00
1,
layer_get_linked_outargs,
{ { layer_get_linked_invoker } }
1997-11-25 06:05:25 +08:00
};
static Argument *
layer_set_linked_invoker (Argument *args)
1997-11-25 06:05:25 +08:00
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean linked;
1997-11-25 06:05:25 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
1997-11-25 06:05:25 +08:00
linked = args[1].value.pdb_int ? TRUE : FALSE;
1997-11-25 06:05:25 +08:00
if (success)
layer->linked = linked;
1997-11-25 06:05:25 +08:00
return procedural_db_return_args (&layer_set_linked_proc, success);
1997-11-25 06:05:25 +08:00
}
static ProcArg layer_set_linked_inargs[] =
1997-11-25 06:05:25 +08:00
{
{
PDB_LAYER,
1997-11-25 06:05:25 +08:00
"layer",
"The layer"
},
{
PDB_INT32,
"linked",
"The new layer linked state"
1997-11-25 06:05:25 +08:00
}
};
static ProcRecord layer_set_linked_proc =
1997-11-25 06:05:25 +08:00
{
"gimp_layer_set_linked",
"Set the linked state of the specified layer.",
"This procedure sets the specified layer's linked state.",
"Wolfgang Hofer",
"Wolfgang Hofer",
"1998",
1997-11-25 06:05:25 +08:00
PDB_INTERNAL,
2,
layer_set_linked_inargs,
0,
NULL,
{ { layer_set_linked_invoker } }
1997-11-25 06:05:25 +08:00
};
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
static Argument *
layer_get_tattoo_invoker (Argument *args)
{
gboolean success = TRUE;
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
Argument *return_args;
GimpLayer *layer;
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
return_args = procedural_db_return_args (&layer_get_tattoo_proc, success);
if (success)
return_args[1].value.pdb_int = layer_get_tattoo (layer);
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
return return_args;
}
static ProcArg layer_get_tattoo_inargs[] =
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
{
{
PDB_LAYER,
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
"layer",
"The layer"
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
}
};
static ProcArg layer_get_tattoo_outargs[] =
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
{
{
PDB_INT32,
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
"tattoo",
"The layer tattoo"
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
}
};
static ProcRecord layer_get_tattoo_proc =
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
{
"gimp_layer_get_tattoo",
"Get the tattoo of the specified layer.",
"This procedure returns the specified layer's tattoo. A tattoo is a unique and permanent identifier attached to a layer that can be used to uniquely identify a layer within an image even between sessions",
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
"Jay Cox",
"Jay Cox",
"1998",
PDB_INTERNAL,
1,
layer_get_tattoo_inargs,
1,
layer_get_tattoo_outargs,
{ { layer_get_tattoo_invoker } }
};
static Argument *
layer_set_tattoo_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 tattoo;
layer = layer_get_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
tattoo = args[1].value.pdb_int;
if (tattoo == 0)
success = FALSE;
if (success)
layer_set_tattoo (layer, tattoo);
return procedural_db_return_args (&layer_set_tattoo_proc, success);
}
static ProcArg layer_set_tattoo_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
},
{
PDB_INT32,
"tattoo",
"The new layer tattoo"
}
};
static ProcRecord layer_set_tattoo_proc =
{
"gimp_layer_set_tattoo",
"Set the tattoo of the specified layer.",
"This procedure sets the specified layer's tattoo. A tattoo is a unique and permanent identifier attached to a layer that can be used to uniquely identify a layer within an image even between sessions",
"Jay Cox",
"Jay Cox",
"1998",
PDB_INTERNAL,
2,
layer_set_tattoo_inargs,
0,
NULL,
{ { layer_set_tattoo_invoker } }
};