Commit 8de3fb64 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

renamed ChannelOffsetType to GimpOffsetType.

2001-04-18  Michael Natterer  <mitch@gimp.org>

	* app/gimpdrawable-offset.[ch]: renamed ChannelOffsetType to
	GimpOffsetType.

	* app/pdb/channel_ops_cmds.c
	* libgimp/gimpchannelops_pdb.[ch]
	* tools/pdbgen/pdb/channel_ops.pdb: removed.

	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/image.pdb: put the "offset" and "duplicate"
	functions where they belong.

	* app/gui/offset-dialog.c
	* app/pdb/Makefile.am
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/Makefile.am
	* libgimp/gimp_pdb.h
	* libgimp/gimpdrawable_pdb.[ch]
	* libgimp/gimpenums.h
	* libgimp/gimpimage.h
	* libgimp/gimpimage_pdb.[ch]
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/enumcode.pl
	* tools/pdbgen/enums.pl
	* tools/pdbgen/groups.pl
	* plug-ins/common/guillotine.c
	* plug-ins/print/print.c
	* plug-ins/script-fu/script-fu-constants.c: changed accordingly.
parent 63d3ff38
2001-04-18 Michael Natterer <mitch@gimp.org>
* app/gimpdrawable-offset.[ch]: renamed ChannelOffsetType to
GimpOffsetType.
* app/pdb/channel_ops_cmds.c
* libgimp/gimpchannelops_pdb.[ch]
* tools/pdbgen/pdb/channel_ops.pdb: removed.
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/image.pdb: put the "offset" and "duplicate"
functions where they belong.
* app/gui/offset-dialog.c
* app/pdb/Makefile.am
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* app/pdb/internal_procs.c
* libgimp/Makefile.am
* libgimp/gimp_pdb.h
* libgimp/gimpdrawable_pdb.[ch]
* libgimp/gimpenums.h
* libgimp/gimpimage.h
* libgimp/gimpimage_pdb.[ch]
* tools/pdbgen/Makefile.am
* tools/pdbgen/enumcode.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/groups.pl
* plug-ins/common/guillotine.c
* plug-ins/print/print.c
* plug-ins/script-fu/script-fu-constants.c: changed accordingly.
2001-04-18 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
......
......@@ -40,11 +40,11 @@
void
gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
ChannelOffsetType fill_type,
gint offset_x,
gint offset_y)
gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y)
{
PixelRegion srcPR, destPR;
TileManager *new_tiles;
......
......@@ -24,14 +24,14 @@ typedef enum
{
OFFSET_BACKGROUND,
OFFSET_TRANSPARENT
} ChannelOffsetType;
} GimpOffsetType;
void gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
ChannelOffsetType fill_type,
gint offset_x,
gint offset_y);
void gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y);
#endif /* __GIMP_DRAWABLE_OFFSET_H__ */
......@@ -42,13 +42,13 @@ typedef struct _OffsetDialog OffsetDialog;
struct _OffsetDialog
{
GtkWidget *dlg;
GtkWidget *off_se;
GtkWidget *dlg;
GtkWidget *off_se;
gboolean wrap_around;
ChannelOffsetType fill_type;
gboolean wrap_around;
GimpOffsetType fill_type;
GimpImage *gimage;
GimpImage *gimage;
};
......
......@@ -40,11 +40,11 @@
void
gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
ChannelOffsetType fill_type,
gint offset_x,
gint offset_y)
gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y)
{
PixelRegion srcPR, destPR;
TileManager *new_tiles;
......
......@@ -24,14 +24,14 @@ typedef enum
{
OFFSET_BACKGROUND,
OFFSET_TRANSPARENT
} ChannelOffsetType;
} GimpOffsetType;
void gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
ChannelOffsetType fill_type,
gint offset_x,
gint offset_y);
void gimp_drawable_offset (GimpDrawable *drawable,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y);
#endif /* __GIMP_DRAWABLE_OFFSET_H__ */
......@@ -42,13 +42,13 @@ typedef struct _OffsetDialog OffsetDialog;
struct _OffsetDialog
{
GtkWidget *dlg;
GtkWidget *off_se;
GtkWidget *dlg;
GtkWidget *off_se;
gboolean wrap_around;
ChannelOffsetType fill_type;
gboolean wrap_around;
GimpOffsetType fill_type;
GimpImage *gimage;
GimpImage *gimage;
};
......
......@@ -11,7 +11,6 @@ libapppdb_la_SOURCES = \
brush_select_cmds.c \
brushes_cmds.c \
channel_cmds.c \
channel_ops_cmds.c \
color_cmds.c \
convert_cmds.c \
display_cmds.c \
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995-2000 Spencer Kimball and Peter Mattis
*
* 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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl. */
#include "config.h"
#include <gtk/gtk.h>
#include "apptypes.h"
#include "procedural_db.h"
#include "drawable.h"
#include "gimpdrawable-offset.h"
#include "gimpimage-duplicate.h"
#include "gimpimage.h"
static ProcRecord channel_ops_offset_proc;
static ProcRecord channel_ops_duplicate_proc;
void
register_channel_ops_procs (void)
{
procedural_db_register (&channel_ops_offset_proc);
procedural_db_register (&channel_ops_duplicate_proc);
}
static Argument *
channel_ops_offset_invoker (Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
gboolean wrap_around;
gint32 fill_type;
gint32 offset_x;
gint32 offset_y;
drawable = gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (drawable == NULL)
success = FALSE;
wrap_around = args[1].value.pdb_int ? TRUE : FALSE;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
if (success)
{
gimp_drawable_offset (drawable, wrap_around, fill_type, offset_x, offset_y);
}
return procedural_db_return_args (&channel_ops_offset_proc, success);
}
static ProcArg channel_ops_offset_inargs[] =
{
{
PDB_DRAWABLE,
"drawable",
"The drawable to offset"
},
{
PDB_INT32,
"wrap_around",
"wrap image around or fill vacated regions"
},
{
PDB_INT32,
"fill_type",
"fill vacated regions of drawable with background or transparent: OFFSET_BACKGROUND (0) or OFFSET_TRANSPARENT (1)"
},
{
PDB_INT32,
"offset_x",
"offset by this amount in X direction"
},
{
PDB_INT32,
"offset_y",
"offset by this amount in Y direction"
}
};
static ProcRecord channel_ops_offset_proc =
{
"gimp_channel_ops_offset",
"Offset the drawable by the specified amounts in the X and Y directions",
"This procedure offsets the specified drawable by the amounts specified by 'offset_x' and 'offset_y'. If 'wrap_around' is set to TRUE, then portions of the drawable which are offset out of bounds are wrapped around. Alternatively, the undefined regions of the drawable can be filled with transparency or the background color, as specified by the 'fill_type' parameter.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1997",
PDB_INTERNAL,
5,
channel_ops_offset_inargs,
0,
NULL,
{ { channel_ops_offset_invoker } }
};
static Argument *
channel_ops_duplicate_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpImage *gimage;
GimpImage *new_gimage = NULL;
gimage = gimp_image_get_by_ID (args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
success = (new_gimage = gimp_image_duplicate (gimage)) != NULL;
return_args = procedural_db_return_args (&channel_ops_duplicate_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_image_get_ID (new_gimage);
return return_args;
}
static ProcArg channel_ops_duplicate_inargs[] =
{
{
PDB_IMAGE,
"image",
"The image"
}
};
static ProcArg channel_ops_duplicate_outargs[] =
{
{
PDB_IMAGE,
"new_image",
"The new, duplicated image"
}
};
static ProcRecord channel_ops_duplicate_proc =
{
"gimp_channel_ops_duplicate",
"Duplicate the specified image",
"This procedure duplicates the specified image, copying all layers, channels, and image information.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1997",
PDB_INTERNAL,
1,
channel_ops_duplicate_inargs,
1,
channel_ops_duplicate_outargs,
{ { channel_ops_duplicate_invoker } }
};
......@@ -28,6 +28,7 @@
#include "procedural_db.h"
#include "drawable.h"
#include "gimpdrawable-offset.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimplayermask.h"
......@@ -58,6 +59,7 @@ static ProcRecord drawable_get_pixel_proc;
static ProcRecord drawable_set_pixel_proc;
static ProcRecord drawable_set_image_proc;
static ProcRecord drawable_thumbnail_proc;
static ProcRecord drawable_offset_proc;
void
register_drawable_procs (void)
......@@ -84,6 +86,7 @@ register_drawable_procs (void)
procedural_db_register (&drawable_set_pixel_proc);
procedural_db_register (&drawable_set_image_proc);
procedural_db_register (&drawable_thumbnail_proc);
procedural_db_register (&drawable_offset_proc);
}
static Argument *
......@@ -1495,3 +1498,80 @@ static ProcRecord drawable_thumbnail_proc =
drawable_thumbnail_outargs,
{ { drawable_thumbnail_invoker } }
};
static Argument *
drawable_offset_invoker (Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
gboolean wrap_around;
gint32 fill_type;
gint32 offset_x;
gint32 offset_y;
drawable = gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (drawable == NULL)
success = FALSE;
wrap_around = args[1].value.pdb_int ? TRUE : FALSE;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
if (success)
{
gimp_drawable_offset (drawable, wrap_around, fill_type, offset_x, offset_y);
}
return procedural_db_return_args (&drawable_offset_proc, success);
}
static ProcArg drawable_offset_inargs[] =
{
{
PDB_DRAWABLE,
"drawable",
"The drawable to offset"
},
{
PDB_INT32,
"wrap_around",
"wrap image around or fill vacated regions"
},
{
PDB_INT32,
"fill_type",
"fill vacated regions of drawable with background or transparent: OFFSET_BACKGROUND (0) or OFFSET_TRANSPARENT (1)"
},
{
PDB_INT32,
"offset_x",
"offset by this amount in X direction"
},
{
PDB_INT32,
"offset_y",
"offset by this amount in Y direction"
}
};
static ProcRecord drawable_offset_proc =
{
"gimp_drawable_offset",
"Offset the drawable by the specified amounts in the X and Y directions",
"This procedure offsets the specified drawable by the amounts specified by 'offset_x' and 'offset_y'. If 'wrap_around' is set to TRUE, then portions of the drawable which are offset out of bounds are wrapped around. Alternatively, the undefined regions of the drawable can be filled with transparency or the background color, as specified by the 'fill_type' parameter.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1997",
PDB_INTERNAL,
5,
drawable_offset_inargs,
0,
NULL,
{ { drawable_offset_invoker } }
};
......@@ -34,6 +34,7 @@
#include "gimage.h"
#include "gimpchannel.h"
#include "gimpcontainer.h"
#include "gimpimage-duplicate.h"
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimplayermask.h"
......@@ -84,6 +85,7 @@ static ProcRecord image_floating_sel_attached_to_proc;
static ProcRecord image_thumbnail_proc;
static ProcRecord image_set_tattoo_state_proc;
static ProcRecord image_get_tattoo_state_proc;
static ProcRecord image_duplicate_proc;
static ProcRecord image_width_proc;
static ProcRecord image_height_proc;
static ProcRecord image_get_active_layer_proc;
......@@ -147,6 +149,7 @@ register_image_procs (void)
procedural_db_register (&image_thumbnail_proc);
procedural_db_register (&image_set_tattoo_state_proc);
procedural_db_register (&image_get_tattoo_state_proc);
procedural_db_register (&image_duplicate_proc);
procedural_db_register (&image_width_proc);
procedural_db_register (&image_height_proc);
procedural_db_register (&image_get_active_layer_proc);
......@@ -2615,6 +2618,63 @@ static ProcRecord image_get_tattoo_state_proc =
{ { image_get_tattoo_state_invoker } }
};
static Argument *
image_duplicate_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpImage *gimage;
GimpImage *new_gimage = NULL;
gimage = gimp_image_get_by_ID (args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
success = (new_gimage = gimp_image_duplicate (gimage)) != NULL;
return_args = procedural_db_return_args (&image_duplicate_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_image_get_ID (new_gimage);
return return_args;
}
static ProcArg image_duplicate_inargs[] =
{
{
PDB_IMAGE,
"image",
"The image"
}
};
static ProcArg image_duplicate_outargs[] =
{
{
PDB_IMAGE,
"new_image",
"The new, duplicated image"
}
};
static ProcRecord image_duplicate_proc =
{
"gimp_image_duplicate",
"Duplicate the specified image",
"This procedure duplicates the specified image, copying all layers, channels, and image information.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1997",
PDB_INTERNAL,
1,
image_duplicate_inargs,
1,
image_duplicate_outargs,
{ { image_duplicate_invoker } }
};
static Argument *
image_width_invoker (Argument *args)
{
......
......@@ -30,7 +30,6 @@
void register_brush_select_procs (void);
void register_brushes_procs (void);
void register_channel_procs (void);
void register_channel_ops_procs (void);
void register_color_procs (void);
void register_convert_procs (void);
void register_display_procs (void);
......@@ -74,46 +73,43 @@ internal_procs_init (void)
app_init_update_status (NULL, _("Channel"), 0.044);
register_channel_procs ();
app_init_update_status (NULL, _("Channel Ops"), 0.094);
register_channel_ops_procs ();
app_init_update_status (NULL, _("Color"), 0.1);
app_init_update_status (NULL, _("Color"), 0.094);
register_color_procs ();
app_init_update_status (NULL, _("Convert"), 0.138);
app_init_update_status (NULL, _("Convert"), 0.132);
register_convert_procs ();
app_init_update_status (NULL, _("GDisplay procedures"), 0.147);
app_init_update_status (NULL, _("GDisplay procedures"), 0.141);
register_display_procs ();
app_init_update_status (NULL, _("Drawable procedures"), 0.157);
app_init_update_status (NULL, _("Drawable procedures"), 0.15);
register_drawable_procs ();
app_init_update_status (NULL, _("Edit procedures"), 0.226);
app_init_update_status (NULL, _("Edit procedures"), 0.223);
register_edit_procs ();
app_init_update_status (NULL, _("File Operations"), 0.245);
app_init_update_status (NULL, _("File Operations"), 0.241);
register_fileops_procs ();
app_init_update_status (NULL, _("Floating selections"), 0.27);
app_init_update_status (NULL, _("Floating selections"), 0.266);
register_floating_sel_procs ();
app_init_update_status (NULL, _("Gimprc procedures"), 0.288);
app_init_update_status (NULL, _("Gimprc procedures"), 0.285);
register_gimprc_procs ();
app_init_update_status (NULL, _("Gradients"), 0.298);
app_init_update_status (NULL, _("Gradients"), 0.295);
register_gradients_procs ();
app_init_update_status (NULL, _("Gradient UI"), 0.313);
app_init_update_status (NULL, _("Gradient UI"), 0.31);
register_gradient_select_procs ();
app_init_update_status (NULL, _("Guide procedures"), 0.326);
app_init_update_status (NULL, _("Guide procedures"), 0.323);
register_guides_procs ();
app_init_update_status (NULL, _("Help procedures"), 0.345);
app_init_update_status (NULL, _("Help procedures"), 0.342);
register_help_procs ();
app_init_update_status (NULL, _("Image"), 0.348);
app_init_update_status (NULL, _("Image"), 0.345);
register_image_procs ();
app_init_update_status (NULL, _("Layer"), 0.533);
......
......@@ -31,7 +31,6 @@ PDB_WRAPPERS_C = \
gimpbrushes_pdb.c \
gimpbrushselect_pdb.c \
gimpchannel_pdb.c \
gimpchannelops_pdb.c \
gimpcolor_pdb.c \
gimpconvert_pdb.c \
gimpdisplay_pdb.c \
......@@ -66,7 +65,6 @@ PDB_WRAPPERS_H = \
gimpbrushes_pdb.h \
gimpbrushselect_pdb.h \
gimpchannel_pdb.h \
gimpchannelops_pdb.h \
gimpcolor_pdb.h \
gimpconvert_pdb.h \
gimpdisplay_pdb.h \
......
......@@ -25,7 +25,6 @@
#include <libgimp/gimpbrushes_pdb.h>
#include <libgimp/gimpbrushselect_pdb.h>
#include <libgimp/gimpchannel_pdb.h>
#include <libgimp/gimpchannelops_pdb.h>
#include <libgimp/gimpcolor_pdb.h>