mirror of https://github.com/GNOME/gimp.git
app/pdb/Makefile.am new file which contains the stuff that makes PDB code
2001-01-29 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb_glue.h: new file which contains the stuff that makes PDB code generation easier but is ugly when used in the app (see my comment in the log below). Contains: gimp_drawable_[layer|layer_mask|channel]() [channel|gimp_layer]_[set|get]_[name|tattoo]() * app/channel.[ch] * app/channels_dialog.c * app/gimpdrawable.h * app/gimpimage.c * app/gimplayermask.h * app/layer.c * app/layer.h * app/toolbox.c * app/undo.c * app/xcf.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/layer_cmds.c * app/pdb/selection_cmds.c * app/tools/bezier_select.c * app/tools/bucket_fill.c * app/tools/by_color_select.c * app/tools/ellipse_select.c * app/tools/free_select.c * app/tools/fuzzy_select.c * app/tools/iscissors.c * app/tools/rect_select.c * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/selection.pdb: changed accordingly.
This commit is contained in:
parent
fe53c66c7c
commit
d3dcfadccf
38
ChangeLog
38
ChangeLog
|
@ -1,3 +1,41 @@
|
|||
2001-01-29 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/pdb/Makefile.am
|
||||
* app/pdb/pdb_glue.h: new file which contains the stuff that makes
|
||||
PDB code generation easier but is ugly when used in the app
|
||||
(see my comment in the log below).
|
||||
|
||||
Contains:
|
||||
gimp_drawable_[layer|layer_mask|channel]()
|
||||
[channel|gimp_layer]_[set|get]_[name|tattoo]()
|
||||
|
||||
* app/channel.[ch]
|
||||
* app/channels_dialog.c
|
||||
* app/gimpdrawable.h
|
||||
* app/gimpimage.c
|
||||
* app/gimplayermask.h
|
||||
* app/layer.c
|
||||
* app/layer.h
|
||||
* app/toolbox.c
|
||||
* app/undo.c
|
||||
* app/xcf.c
|
||||
* app/pdb/channel_cmds.c
|
||||
* app/pdb/drawable_cmds.c
|
||||
* app/pdb/layer_cmds.c
|
||||
* app/pdb/selection_cmds.c
|
||||
* app/tools/bezier_select.c
|
||||
* app/tools/bucket_fill.c
|
||||
* app/tools/by_color_select.c
|
||||
* app/tools/ellipse_select.c
|
||||
* app/tools/free_select.c
|
||||
* app/tools/fuzzy_select.c
|
||||
* app/tools/iscissors.c
|
||||
* app/tools/rect_select.c
|
||||
* tools/pdbgen/pdb/channel.pdb
|
||||
* tools/pdbgen/pdb/drawable.pdb
|
||||
* tools/pdbgen/pdb/layer.pdb
|
||||
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
|
||||
|
||||
2001-01-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* AUTHORS
|
||||
|
|
|
@ -208,19 +208,6 @@ channel_copy (const Channel *channel)
|
|||
return new_channel;
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_name (Channel *channel,
|
||||
const gchar *name)
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (channel), name);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
channel_get_name (const Channel *channel)
|
||||
{
|
||||
return gimp_object_get_name (GIMP_OBJECT (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_color (Channel *channel,
|
||||
const GimpRGB *color)
|
||||
|
@ -262,17 +249,6 @@ channel_set_opacity (Channel *channel,
|
|||
channel->color.a = opacity / 100.0;
|
||||
}
|
||||
|
||||
void
|
||||
channel_delete (Channel *channel)
|
||||
{
|
||||
/* Channels are normally deleted by removing them from the associated
|
||||
image. The only case where channel_delete() is useful is if you want
|
||||
to remove a floating channel object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (channel));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_destroy (GtkObject *object)
|
||||
{
|
||||
|
@ -546,19 +522,6 @@ channel_preview_private (Channel *channel,
|
|||
}
|
||||
}
|
||||
|
||||
Tattoo
|
||||
channel_get_tattoo (const Channel *channel)
|
||||
{
|
||||
return gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_tattoo (Channel *channel,
|
||||
Tattoo value)
|
||||
{
|
||||
gimp_drawable_set_tattoo (GIMP_DRAWABLE (channel), value);
|
||||
}
|
||||
|
||||
/******************************/
|
||||
/* selection mask functions */
|
||||
/******************************/
|
||||
|
@ -1635,7 +1598,7 @@ channel_translate (Channel *mask,
|
|||
copy_region (&srcPR, &destPR);
|
||||
|
||||
/* free the temporary mask */
|
||||
channel_delete (tmp_mask);
|
||||
gtk_object_unref (GTK_OBJECT (tmp_mask));
|
||||
}
|
||||
|
||||
/* calculate new bounds */
|
||||
|
|
|
@ -96,10 +96,6 @@ Channel * channel_new (GimpImage *gimage,
|
|||
const GimpRGB *color);
|
||||
Channel * channel_copy (const Channel *channel);
|
||||
|
||||
const gchar * channel_get_name (const Channel *channel);
|
||||
void channel_set_name (Channel *channel,
|
||||
const gchar *name);
|
||||
|
||||
gint channel_get_opacity (const Channel *channel);
|
||||
void channel_set_opacity (Channel *channel,
|
||||
gint opacity);
|
||||
|
@ -108,7 +104,6 @@ const GimpRGB * channel_get_color (const Channel *channel);
|
|||
void channel_set_color (Channel *channel,
|
||||
const GimpRGB *color);
|
||||
|
||||
void channel_delete (Channel *channel);
|
||||
void channel_scale (Channel *channel,
|
||||
gint new_width,
|
||||
gint new_height);
|
||||
|
@ -126,10 +121,6 @@ TempBuf * channel_preview (Channel *channel,
|
|||
gint width,
|
||||
gint height);
|
||||
|
||||
Tattoo channel_get_tattoo (const Channel *channel);
|
||||
void channel_set_tattoo (Channel *channel,
|
||||
Tattoo value);
|
||||
|
||||
/* selection mask functions */
|
||||
|
||||
Channel * channel_new_mask (GimpImage *gimage,
|
||||
|
|
|
@ -1108,7 +1108,7 @@ channels_dialog_add_channel_to_sel_callback (GtkWidget *widget,
|
|||
CHANNEL_OP_ADD,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
gdisplays_flush ();
|
||||
}
|
||||
}
|
||||
|
@ -1132,7 +1132,7 @@ channels_dialog_sub_channel_from_sel_callback (GtkWidget *widget,
|
|||
CHANNEL_OP_SUB,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
gdisplays_flush ();
|
||||
}
|
||||
}
|
||||
|
@ -1156,7 +1156,7 @@ channels_dialog_intersect_channel_with_sel_callback (GtkWidget *widget,
|
|||
CHANNEL_OP_INTERSECT,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
gdisplays_flush ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,19 +208,6 @@ channel_copy (const Channel *channel)
|
|||
return new_channel;
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_name (Channel *channel,
|
||||
const gchar *name)
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (channel), name);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
channel_get_name (const Channel *channel)
|
||||
{
|
||||
return gimp_object_get_name (GIMP_OBJECT (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_color (Channel *channel,
|
||||
const GimpRGB *color)
|
||||
|
@ -262,17 +249,6 @@ channel_set_opacity (Channel *channel,
|
|||
channel->color.a = opacity / 100.0;
|
||||
}
|
||||
|
||||
void
|
||||
channel_delete (Channel *channel)
|
||||
{
|
||||
/* Channels are normally deleted by removing them from the associated
|
||||
image. The only case where channel_delete() is useful is if you want
|
||||
to remove a floating channel object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (channel));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_destroy (GtkObject *object)
|
||||
{
|
||||
|
@ -546,19 +522,6 @@ channel_preview_private (Channel *channel,
|
|||
}
|
||||
}
|
||||
|
||||
Tattoo
|
||||
channel_get_tattoo (const Channel *channel)
|
||||
{
|
||||
return gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_tattoo (Channel *channel,
|
||||
Tattoo value)
|
||||
{
|
||||
gimp_drawable_set_tattoo (GIMP_DRAWABLE (channel), value);
|
||||
}
|
||||
|
||||
/******************************/
|
||||
/* selection mask functions */
|
||||
/******************************/
|
||||
|
@ -1635,7 +1598,7 @@ channel_translate (Channel *mask,
|
|||
copy_region (&srcPR, &destPR);
|
||||
|
||||
/* free the temporary mask */
|
||||
channel_delete (tmp_mask);
|
||||
gtk_object_unref (GTK_OBJECT (tmp_mask));
|
||||
}
|
||||
|
||||
/* calculate new bounds */
|
||||
|
|
|
@ -96,10 +96,6 @@ Channel * channel_new (GimpImage *gimage,
|
|||
const GimpRGB *color);
|
||||
Channel * channel_copy (const Channel *channel);
|
||||
|
||||
const gchar * channel_get_name (const Channel *channel);
|
||||
void channel_set_name (Channel *channel,
|
||||
const gchar *name);
|
||||
|
||||
gint channel_get_opacity (const Channel *channel);
|
||||
void channel_set_opacity (Channel *channel,
|
||||
gint opacity);
|
||||
|
@ -108,7 +104,6 @@ const GimpRGB * channel_get_color (const Channel *channel);
|
|||
void channel_set_color (Channel *channel,
|
||||
const GimpRGB *color);
|
||||
|
||||
void channel_delete (Channel *channel);
|
||||
void channel_scale (Channel *channel,
|
||||
gint new_width,
|
||||
gint new_height);
|
||||
|
@ -126,10 +121,6 @@ TempBuf * channel_preview (Channel *channel,
|
|||
gint width,
|
||||
gint height);
|
||||
|
||||
Tattoo channel_get_tattoo (const Channel *channel);
|
||||
void channel_set_tattoo (Channel *channel,
|
||||
Tattoo value);
|
||||
|
||||
/* selection mask functions */
|
||||
|
||||
Channel * channel_new_mask (GimpImage *gimage,
|
||||
|
|
|
@ -208,19 +208,6 @@ channel_copy (const Channel *channel)
|
|||
return new_channel;
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_name (Channel *channel,
|
||||
const gchar *name)
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (channel), name);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
channel_get_name (const Channel *channel)
|
||||
{
|
||||
return gimp_object_get_name (GIMP_OBJECT (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_color (Channel *channel,
|
||||
const GimpRGB *color)
|
||||
|
@ -262,17 +249,6 @@ channel_set_opacity (Channel *channel,
|
|||
channel->color.a = opacity / 100.0;
|
||||
}
|
||||
|
||||
void
|
||||
channel_delete (Channel *channel)
|
||||
{
|
||||
/* Channels are normally deleted by removing them from the associated
|
||||
image. The only case where channel_delete() is useful is if you want
|
||||
to remove a floating channel object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (channel));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_destroy (GtkObject *object)
|
||||
{
|
||||
|
@ -546,19 +522,6 @@ channel_preview_private (Channel *channel,
|
|||
}
|
||||
}
|
||||
|
||||
Tattoo
|
||||
channel_get_tattoo (const Channel *channel)
|
||||
{
|
||||
return gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_tattoo (Channel *channel,
|
||||
Tattoo value)
|
||||
{
|
||||
gimp_drawable_set_tattoo (GIMP_DRAWABLE (channel), value);
|
||||
}
|
||||
|
||||
/******************************/
|
||||
/* selection mask functions */
|
||||
/******************************/
|
||||
|
@ -1635,7 +1598,7 @@ channel_translate (Channel *mask,
|
|||
copy_region (&srcPR, &destPR);
|
||||
|
||||
/* free the temporary mask */
|
||||
channel_delete (tmp_mask);
|
||||
gtk_object_unref (GTK_OBJECT (tmp_mask));
|
||||
}
|
||||
|
||||
/* calculate new bounds */
|
||||
|
|
|
@ -96,10 +96,6 @@ Channel * channel_new (GimpImage *gimage,
|
|||
const GimpRGB *color);
|
||||
Channel * channel_copy (const Channel *channel);
|
||||
|
||||
const gchar * channel_get_name (const Channel *channel);
|
||||
void channel_set_name (Channel *channel,
|
||||
const gchar *name);
|
||||
|
||||
gint channel_get_opacity (const Channel *channel);
|
||||
void channel_set_opacity (Channel *channel,
|
||||
gint opacity);
|
||||
|
@ -108,7 +104,6 @@ const GimpRGB * channel_get_color (const Channel *channel);
|
|||
void channel_set_color (Channel *channel,
|
||||
const GimpRGB *color);
|
||||
|
||||
void channel_delete (Channel *channel);
|
||||
void channel_scale (Channel *channel,
|
||||
gint new_width,
|
||||
gint new_height);
|
||||
|
@ -126,10 +121,6 @@ TempBuf * channel_preview (Channel *channel,
|
|||
gint width,
|
||||
gint height);
|
||||
|
||||
Tattoo channel_get_tattoo (const Channel *channel);
|
||||
void channel_set_tattoo (Channel *channel,
|
||||
Tattoo value);
|
||||
|
||||
/* selection mask functions */
|
||||
|
||||
Channel * channel_new_mask (GimpImage *gimage,
|
||||
|
|
|
@ -23,12 +23,6 @@
|
|||
#include "gimpobject.h"
|
||||
|
||||
|
||||
/* PDB stuff */
|
||||
#define gimp_drawable_layer GIMP_IS_LAYER
|
||||
#define gimp_drawable_layer_mask GIMP_IS_LAYER_MASK
|
||||
#define gimp_drawable_channel GIMP_IS_CHANNEL
|
||||
|
||||
|
||||
#define GIMP_TYPE_DRAWABLE (gimp_drawable_get_type ())
|
||||
#define GIMP_DRAWABLE(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_DRAWABLE, GimpDrawable))
|
||||
#define GIMP_IS_DRAWABLE(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_DRAWABLE))
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -1439,7 +1439,9 @@ undo_push_layer (GimpImage *gimage,
|
|||
/* if this is a remove layer, delete the layer */
|
||||
if (type == LAYER_REMOVE_UNDO)
|
||||
gtk_object_unref (GTK_OBJECT (lu->layer));
|
||||
|
||||
g_free (lu);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1797,7 +1799,7 @@ undo_push_channel (GimpImage *gimage,
|
|||
else
|
||||
{
|
||||
if (type == CHANNEL_REMOVE_UNDO)
|
||||
channel_delete (cu->channel);
|
||||
gtk_object_unref (GTK_OBJECT (cu->channel));
|
||||
g_free (cu);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1870,7 +1872,7 @@ undo_free_channel (UndoState state,
|
|||
*/
|
||||
if ((state == REDO && type == CHANNEL_ADD_UNDO) ||
|
||||
(state == UNDO && type == CHANNEL_REMOVE_UNDO))
|
||||
channel_delete (cu->channel);
|
||||
gtk_object_unref (GTK_OBJECT (cu->channel));
|
||||
|
||||
g_free (cu);
|
||||
}
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -505,17 +505,6 @@ gimp_layer_create_mask (GimpLayer *layer,
|
|||
return mask;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_layer_delete (GimpLayer *layer)
|
||||
{
|
||||
/* Layers are normally deleted by removing them from the associated
|
||||
image. The only case where layer_delete() is useful is if you want
|
||||
to remove a floating layer object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (layer));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_layer_destroy (GtkObject *object)
|
||||
{
|
||||
|
|
|
@ -23,13 +23,6 @@
|
|||
#include "gimpdrawable.h"
|
||||
|
||||
|
||||
/* PDB stuff */
|
||||
#define gimp_layer_set_name(l,n) gimp_object_set_name(GIMP_OBJECT(l),(n))
|
||||
#define gimp_layer_get_name(l) gimp_object_get_name(GIMP_OBJECT(l))
|
||||
#define gimp_layer_set_tattoo(l,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(l),(t))
|
||||
#define gimp_layer_get_tattoo(l) gimp_drawable_get_tattoo(GIMP_DRAWABLE(l))
|
||||
|
||||
|
||||
#define GIMP_TYPE_LAYER (gimp_layer_get_type ())
|
||||
#define GIMP_LAYER(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer))
|
||||
#define GIMP_LAYER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass))
|
||||
|
@ -116,7 +109,6 @@ GimpLayerMask * gimp_layer_create_mask (GimpLayer *layer,
|
|||
AddMaskType add_mask_type);
|
||||
GimpLayerMask * gimp_layer_add_mask (GimpLayer *layer,
|
||||
GimpLayerMask *mask);
|
||||
void gimp_layer_delete (GimpLayer *layer);
|
||||
void gimp_layer_apply_mask (GimpLayer *layer,
|
||||
MaskApplyMode mode);
|
||||
void gimp_layer_translate (GimpLayer *layer,
|
||||
|
|
|
@ -75,4 +75,3 @@ GimpLayer * gimp_layer_mask_get_layer (GimpLayerMask *layer_mask);
|
|||
|
||||
|
||||
#endif /* __GIMP_LAYER_MASK_H__ */
|
||||
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -208,19 +208,6 @@ channel_copy (const Channel *channel)
|
|||
return new_channel;
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_name (Channel *channel,
|
||||
const gchar *name)
|
||||
{
|
||||
gimp_object_set_name (GIMP_OBJECT (channel), name);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
channel_get_name (const Channel *channel)
|
||||
{
|
||||
return gimp_object_get_name (GIMP_OBJECT (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_color (Channel *channel,
|
||||
const GimpRGB *color)
|
||||
|
@ -262,17 +249,6 @@ channel_set_opacity (Channel *channel,
|
|||
channel->color.a = opacity / 100.0;
|
||||
}
|
||||
|
||||
void
|
||||
channel_delete (Channel *channel)
|
||||
{
|
||||
/* Channels are normally deleted by removing them from the associated
|
||||
image. The only case where channel_delete() is useful is if you want
|
||||
to remove a floating channel object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (channel));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_destroy (GtkObject *object)
|
||||
{
|
||||
|
@ -546,19 +522,6 @@ channel_preview_private (Channel *channel,
|
|||
}
|
||||
}
|
||||
|
||||
Tattoo
|
||||
channel_get_tattoo (const Channel *channel)
|
||||
{
|
||||
return gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channel_set_tattoo (Channel *channel,
|
||||
Tattoo value)
|
||||
{
|
||||
gimp_drawable_set_tattoo (GIMP_DRAWABLE (channel), value);
|
||||
}
|
||||
|
||||
/******************************/
|
||||
/* selection mask functions */
|
||||
/******************************/
|
||||
|
@ -1635,7 +1598,7 @@ channel_translate (Channel *mask,
|
|||
copy_region (&srcPR, &destPR);
|
||||
|
||||
/* free the temporary mask */
|
||||
channel_delete (tmp_mask);
|
||||
gtk_object_unref (GTK_OBJECT (tmp_mask));
|
||||
}
|
||||
|
||||
/* calculate new bounds */
|
||||
|
|
|
@ -96,10 +96,6 @@ Channel * channel_new (GimpImage *gimage,
|
|||
const GimpRGB *color);
|
||||
Channel * channel_copy (const Channel *channel);
|
||||
|
||||
const gchar * channel_get_name (const Channel *channel);
|
||||
void channel_set_name (Channel *channel,
|
||||
const gchar *name);
|
||||
|
||||
gint channel_get_opacity (const Channel *channel);
|
||||
void channel_set_opacity (Channel *channel,
|
||||
gint opacity);
|
||||
|
@ -108,7 +104,6 @@ const GimpRGB * channel_get_color (const Channel *channel);
|
|||
void channel_set_color (Channel *channel,
|
||||
const GimpRGB *color);
|
||||
|
||||
void channel_delete (Channel *channel);
|
||||
void channel_scale (Channel *channel,
|
||||
gint new_width,
|
||||
gint new_height);
|
||||
|
@ -126,10 +121,6 @@ TempBuf * channel_preview (Channel *channel,
|
|||
gint width,
|
||||
gint height);
|
||||
|
||||
Tattoo channel_get_tattoo (const Channel *channel);
|
||||
void channel_set_tattoo (Channel *channel,
|
||||
Tattoo value);
|
||||
|
||||
/* selection mask functions */
|
||||
|
||||
Channel * channel_new_mask (GimpImage *gimage,
|
||||
|
|
|
@ -23,12 +23,6 @@
|
|||
#include "gimpobject.h"
|
||||
|
||||
|
||||
/* PDB stuff */
|
||||
#define gimp_drawable_layer GIMP_IS_LAYER
|
||||
#define gimp_drawable_layer_mask GIMP_IS_LAYER_MASK
|
||||
#define gimp_drawable_channel GIMP_IS_CHANNEL
|
||||
|
||||
|
||||
#define GIMP_TYPE_DRAWABLE (gimp_drawable_get_type ())
|
||||
#define GIMP_DRAWABLE(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_DRAWABLE, GimpDrawable))
|
||||
#define GIMP_IS_DRAWABLE(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_DRAWABLE))
|
||||
|
|
|
@ -1413,7 +1413,7 @@ gimp_image_set_tattoo_state (GimpImage *gimage,
|
|||
Tattoo ctattoo;
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
ctattoo = channel_get_tattoo (channel);
|
||||
ctattoo = gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel));
|
||||
if (ctattoo > maxval)
|
||||
maxval = ctattoo;
|
||||
/* Now check path an't got this tattoo */
|
||||
|
@ -2250,7 +2250,7 @@ gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
|
|||
{
|
||||
channel = (Channel *) channels->data;
|
||||
|
||||
if (channel_get_tattoo (channel) == tattoo)
|
||||
if (gimp_drawable_get_tattoo (GIMP_DRAWABLE (channel)) == tattoo)
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -505,17 +505,6 @@ gimp_layer_create_mask (GimpLayer *layer,
|
|||
return mask;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_layer_delete (GimpLayer *layer)
|
||||
{
|
||||
/* Layers are normally deleted by removing them from the associated
|
||||
image. The only case where layer_delete() is useful is if you want
|
||||
to remove a floating layer object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (layer));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_layer_destroy (GtkObject *object)
|
||||
{
|
||||
|
|
|
@ -23,13 +23,6 @@
|
|||
#include "gimpdrawable.h"
|
||||
|
||||
|
||||
/* PDB stuff */
|
||||
#define gimp_layer_set_name(l,n) gimp_object_set_name(GIMP_OBJECT(l),(n))
|
||||
#define gimp_layer_get_name(l) gimp_object_get_name(GIMP_OBJECT(l))
|
||||
#define gimp_layer_set_tattoo(l,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(l),(t))
|
||||
#define gimp_layer_get_tattoo(l) gimp_drawable_get_tattoo(GIMP_DRAWABLE(l))
|
||||
|
||||
|
||||
#define GIMP_TYPE_LAYER (gimp_layer_get_type ())
|
||||
#define GIMP_LAYER(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer))
|
||||
#define GIMP_LAYER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass))
|
||||
|
@ -116,7 +109,6 @@ GimpLayerMask * gimp_layer_create_mask (GimpLayer *layer,
|
|||
AddMaskType add_mask_type);
|
||||
GimpLayerMask * gimp_layer_add_mask (GimpLayer *layer,
|
||||
GimpLayerMask *mask);
|
||||
void gimp_layer_delete (GimpLayer *layer);
|
||||
void gimp_layer_apply_mask (GimpLayer *layer,
|
||||
MaskApplyMode mode);
|
||||
void gimp_layer_translate (GimpLayer *layer,
|
||||
|
|
|
@ -75,4 +75,3 @@ GimpLayer * gimp_layer_mask_get_layer (GimpLayerMask *layer_mask);
|
|||
|
||||
|
||||
#endif /* __GIMP_LAYER_MASK_H__ */
|
||||
|
||||
|
|
|
@ -1108,7 +1108,7 @@ channels_dialog_add_channel_to_sel_callback (GtkWidget *widget,
|
|||
CHANNEL_OP_ADD,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
gdisplays_flush ();
|
||||
}
|
||||
}
|
||||
|
@ -1132,7 +1132,7 @@ channels_dialog_sub_channel_from_sel_callback (GtkWidget *widget,
|
|||
CHANNEL_OP_SUB,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
gdisplays_flush ();
|
||||
}
|
||||
}
|
||||
|
@ -1156,7 +1156,7 @@ channels_dialog_intersect_channel_with_sel_callback (GtkWidget *widget,
|
|||
CHANNEL_OP_INTERSECT,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
gdisplays_flush ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -765,7 +765,7 @@ toolbox_drag_drop (GtkWidget *widget,
|
|||
|
||||
gimp_drawable_set_gimage (GIMP_DRAWABLE (new_layer), new_gimage);
|
||||
|
||||
gimp_layer_set_name (GIMP_LAYER (new_layer),
|
||||
gimp_object_set_name (GIMP_OBJECT (new_layer),
|
||||
gimp_object_get_name (GIMP_OBJECT (drawable)));
|
||||
|
||||
if (layer)
|
||||
|
|
11
app/layer.c
11
app/layer.c
|
@ -505,17 +505,6 @@ gimp_layer_create_mask (GimpLayer *layer,
|
|||
return mask;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_layer_delete (GimpLayer *layer)
|
||||
{
|
||||
/* Layers are normally deleted by removing them from the associated
|
||||
image. The only case where layer_delete() is useful is if you want
|
||||
to remove a floating layer object that has not been added to an
|
||||
image yet. We use gtk_object_sink() for this reason here.
|
||||
*/
|
||||
gtk_object_sink (GTK_OBJECT (layer));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_layer_destroy (GtkObject *object)
|
||||
{
|
||||
|
|
|
@ -23,13 +23,6 @@
|
|||
#include "gimpdrawable.h"
|
||||
|
||||
|
||||
/* PDB stuff */
|
||||
#define gimp_layer_set_name(l,n) gimp_object_set_name(GIMP_OBJECT(l),(n))
|
||||
#define gimp_layer_get_name(l) gimp_object_get_name(GIMP_OBJECT(l))
|
||||
#define gimp_layer_set_tattoo(l,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(l),(t))
|
||||
#define gimp_layer_get_tattoo(l) gimp_drawable_get_tattoo(GIMP_DRAWABLE(l))
|
||||
|
||||
|
||||
#define GIMP_TYPE_LAYER (gimp_layer_get_type ())
|
||||
#define GIMP_LAYER(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer))
|
||||
#define GIMP_LAYER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass))
|
||||
|
@ -116,7 +109,6 @@ GimpLayerMask * gimp_layer_create_mask (GimpLayer *layer,
|
|||
AddMaskType add_mask_type);
|
||||
GimpLayerMask * gimp_layer_add_mask (GimpLayer *layer,
|
||||
GimpLayerMask *mask);
|
||||
void gimp_layer_delete (GimpLayer *layer);
|
||||
void gimp_layer_apply_mask (GimpLayer *layer,
|
||||
MaskApplyMode mode);
|
||||
void gimp_layer_translate (GimpLayer *layer,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
noinst_LTLIBRARIES = libapppdb.la
|
||||
|
||||
libapppdb_la_SOURCES = \
|
||||
pdb_glue.h \
|
||||
internal_procs.c \
|
||||
internal_procs.h \
|
||||
procedural_db.c \
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "channel.h"
|
||||
#include "drawable.h"
|
||||
#include "gimpimage.h"
|
||||
#include "pdb_glue.h"
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
|
@ -249,7 +250,7 @@ channel_delete_invoker (Argument *args)
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
channel_delete (channel);
|
||||
gtk_object_sink (GTK_OBJECT (channel));
|
||||
|
||||
return procedural_db_return_args (&channel_delete_proc, success);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "drawable.h"
|
||||
#include "gimplayermask.h"
|
||||
#include "layer.h"
|
||||
#include "pdb_glue.h"
|
||||
#include "temp_buf.h"
|
||||
#include "tile.h"
|
||||
#include "tile_manager.h"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "floating_sel.h"
|
||||
#include "gimpimage.h"
|
||||
#include "layer.h"
|
||||
#include "pdb_glue.h"
|
||||
#include "undo.h"
|
||||
|
||||
static ProcRecord layer_new_proc;
|
||||
|
@ -554,7 +555,7 @@ layer_delete_invoker (Argument *args)
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
gimp_layer_delete (layer);
|
||||
gtk_object_sink (GTK_OBJECT (layer));
|
||||
|
||||
return procedural_db_return_args (&layer_delete_proc, success);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 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.
|
||||
*/
|
||||
|
||||
#ifndef __PDB_GLUE_H__
|
||||
#define __PDB_GLUE_H__
|
||||
|
||||
|
||||
#define gimp_drawable_layer GIMP_IS_LAYER
|
||||
#define gimp_drawable_layer_mask GIMP_IS_LAYER_MASK
|
||||
#define gimp_drawable_channel GIMP_IS_CHANNEL
|
||||
|
||||
#define gimp_layer_set_name(l,n) gimp_object_set_name(GIMP_OBJECT(l),(n))
|
||||
#define gimp_layer_get_name(l) gimp_object_get_name(GIMP_OBJECT(l))
|
||||
#define gimp_layer_set_tattoo(l,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(l),(t))
|
||||
#define gimp_layer_get_tattoo(l) gimp_drawable_get_tattoo(GIMP_DRAWABLE(l))
|
||||
|
||||
#define channel_set_name(c,n) gimp_object_set_name(GIMP_OBJECT(c),(n))
|
||||
#define channel_get_name(c) gimp_object_get_name(GIMP_OBJECT(c))
|
||||
#define channel_set_tattoo(c,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(c),(t))
|
||||
#define channel_get_tattoo(c) gimp_drawable_get_tattoo(GIMP_DRAWABLE(c))
|
||||
|
||||
|
||||
#endif /* __PDB_GLUE_H__ */
|
|
@ -1009,7 +1009,7 @@ selection_combine_invoker (Argument *args)
|
|||
operation,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
|
@ -765,7 +765,7 @@ toolbox_drag_drop (GtkWidget *widget,
|
|||
|
||||
gimp_drawable_set_gimage (GIMP_DRAWABLE (new_layer), new_gimage);
|
||||
|
||||
gimp_layer_set_name (GIMP_LAYER (new_layer),
|
||||
gimp_object_set_name (GIMP_OBJECT (new_layer),
|
||||
gimp_object_get_name (GIMP_OBJECT (drawable)));
|
||||
|
||||
if (layer)
|
||||
|
|
|
@ -2448,7 +2448,7 @@ bezier_convert (BezierSelect *bezier_sel,
|
|||
/* destroy previous mask */
|
||||
if (bezier_sel->mask)
|
||||
{
|
||||
channel_delete (bezier_sel->mask);
|
||||
gtk_object_unref (GTK_OBJECT (bezier_sel->mask));
|
||||
bezier_sel->mask = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -500,7 +500,7 @@ bucket_fill (GimpImage *gimage,
|
|||
|
||||
/* free the mask */
|
||||
if (mask)
|
||||
channel_delete (mask);
|
||||
gtk_object_unref (GTK_OBJECT (mask));
|
||||
|
||||
if (new_buf)
|
||||
temp_buf_free (pat_buf);
|
||||
|
|
|
@ -367,7 +367,7 @@ by_color_select (GImage *gimage,
|
|||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
new_mask, op, off_x, off_y);
|
||||
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
|
||||
/* by_color select action functions */
|
||||
|
|
|
@ -76,14 +76,14 @@ ellipse_select (GimpImage *gimage,
|
|||
feather_radius,
|
||||
feather_radius,
|
||||
op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else if (op == SELECTION_INTERSECT)
|
||||
{
|
||||
new_mask = channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
channel_combine_ellipse (new_mask, CHANNEL_OP_ADD, x, y, w, h, antialias);
|
||||
channel_combine_mask (gimp_image_get_mask (gimage), new_mask, op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else
|
||||
channel_combine_ellipse (gimp_image_get_mask (gimage), op,
|
||||
|
|
|
@ -166,7 +166,8 @@ free_select (GImage *gimage,
|
|||
else
|
||||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
mask, op, 0, 0);
|
||||
channel_delete (mask);
|
||||
|
||||
gtk_object_unref (GTK_OBJECT (mask));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -391,8 +391,7 @@ fuzzy_select (GImage *gimage,
|
|||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
fuzzy_mask, op, off_x, off_y);
|
||||
|
||||
/* free the fuzzy region struct */
|
||||
channel_delete (fuzzy_mask);
|
||||
gtk_object_unref (GTK_OBJECT (fuzzy_mask));
|
||||
fuzzy_mask = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -500,7 +500,7 @@ bucket_fill (GimpImage *gimage,
|
|||
|
||||
/* free the mask */
|
||||
if (mask)
|
||||
channel_delete (mask);
|
||||
gtk_object_unref (GTK_OBJECT (mask));
|
||||
|
||||
if (new_buf)
|
||||
temp_buf_free (pat_buf);
|
||||
|
|
|
@ -367,7 +367,7 @@ by_color_select (GImage *gimage,
|
|||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
new_mask, op, off_x, off_y);
|
||||
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
|
||||
/* by_color select action functions */
|
||||
|
|
|
@ -76,14 +76,14 @@ ellipse_select (GimpImage *gimage,
|
|||
feather_radius,
|
||||
feather_radius,
|
||||
op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else if (op == SELECTION_INTERSECT)
|
||||
{
|
||||
new_mask = channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
channel_combine_ellipse (new_mask, CHANNEL_OP_ADD, x, y, w, h, antialias);
|
||||
channel_combine_mask (gimp_image_get_mask (gimage), new_mask, op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else
|
||||
channel_combine_ellipse (gimp_image_get_mask (gimage), op,
|
||||
|
|
|
@ -166,7 +166,8 @@ free_select (GImage *gimage,
|
|||
else
|
||||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
mask, op, 0, 0);
|
||||
channel_delete (mask);
|
||||
|
||||
gtk_object_unref (GTK_OBJECT (mask));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -391,8 +391,7 @@ fuzzy_select (GImage *gimage,
|
|||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
fuzzy_mask, op, off_x, off_y);
|
||||
|
||||
/* free the fuzzy region struct */
|
||||
channel_delete (fuzzy_mask);
|
||||
gtk_object_unref (GTK_OBJECT (fuzzy_mask));
|
||||
fuzzy_mask = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ iscissors_convert (Iscissors *iscissors,
|
|||
}
|
||||
|
||||
if (iscissors->mask)
|
||||
channel_delete (iscissors->mask);
|
||||
gtk_object_unref (GTK_OBJECT (iscissors->mask));
|
||||
|
||||
iscissors->mask = scan_converter_to_channel (sc, gdisp->gimage);
|
||||
scan_converter_free (sc);
|
||||
|
@ -1139,8 +1139,10 @@ iscissors_reset (Iscissors *iscissors)
|
|||
|
||||
/* free mask */
|
||||
if (iscissors->mask)
|
||||
channel_delete (iscissors->mask);
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (iscissors->mask));
|
||||
iscissors->mask = NULL;
|
||||
}
|
||||
|
||||
/* free the gradient map */
|
||||
if (iscissors->gradient_map)
|
||||
|
|
|
@ -104,14 +104,14 @@ rect_select (GimpImage *gimage,
|
|||
feather_radius,
|
||||
feather_radius,
|
||||
op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else if (op == SELECTION_INTERSECT)
|
||||
{
|
||||
new_mask = channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
channel_combine_rect (new_mask, CHANNEL_OP_ADD, x, y, w, h);
|
||||
channel_combine_mask (gimp_image_get_mask (gimage), new_mask, op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else
|
||||
channel_combine_rect (gimp_image_get_mask (gimage), op, x, y, w, h);
|
||||
|
|
|
@ -391,8 +391,7 @@ fuzzy_select (GImage *gimage,
|
|||
channel_combine_mask (gimp_image_get_mask (gimage),
|
||||
fuzzy_mask, op, off_x, off_y);
|
||||
|
||||
/* free the fuzzy region struct */
|
||||
channel_delete (fuzzy_mask);
|
||||
gtk_object_unref (GTK_OBJECT (fuzzy_mask));
|
||||
fuzzy_mask = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ iscissors_convert (Iscissors *iscissors,
|
|||
}
|
||||
|
||||
if (iscissors->mask)
|
||||
channel_delete (iscissors->mask);
|
||||
gtk_object_unref (GTK_OBJECT (iscissors->mask));
|
||||
|
||||
iscissors->mask = scan_converter_to_channel (sc, gdisp->gimage);
|
||||
scan_converter_free (sc);
|
||||
|
@ -1139,8 +1139,10 @@ iscissors_reset (Iscissors *iscissors)
|
|||
|
||||
/* free mask */
|
||||
if (iscissors->mask)
|
||||
channel_delete (iscissors->mask);
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (iscissors->mask));
|
||||
iscissors->mask = NULL;
|
||||
}
|
||||
|
||||
/* free the gradient map */
|
||||
if (iscissors->gradient_map)
|
||||
|
|
|
@ -104,14 +104,14 @@ rect_select (GimpImage *gimage,
|
|||
feather_radius,
|
||||
feather_radius,
|
||||
op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else if (op == SELECTION_INTERSECT)
|
||||
{
|
||||
new_mask = channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
channel_combine_rect (new_mask, CHANNEL_OP_ADD, x, y, w, h);
|
||||
channel_combine_mask (gimp_image_get_mask (gimage), new_mask, op, 0, 0);
|
||||
channel_delete (new_mask);
|
||||
gtk_object_unref (GTK_OBJECT (new_mask));
|
||||
}
|
||||
else
|
||||
channel_combine_rect (gimp_image_get_mask (gimage), op, x, y, w, h);
|
||||
|
|
|
@ -1439,7 +1439,9 @@ undo_push_layer (GimpImage *gimage,
|
|||
/* if this is a remove layer, delete the layer */
|
||||
if (type == LAYER_REMOVE_UNDO)
|
||||
gtk_object_unref (GTK_OBJECT (lu->layer));
|
||||
|
||||
g_free (lu);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1797,7 +1799,7 @@ undo_push_channel (GimpImage *gimage,
|
|||
else
|
||||
{
|
||||
if (type == CHANNEL_REMOVE_UNDO)
|
||||
channel_delete (cu->channel);
|
||||
gtk_object_unref (GTK_OBJECT (cu->channel));
|
||||
g_free (cu);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1870,7 +1872,7 @@ undo_free_channel (UndoState state,
|
|||
*/
|
||||
if ((state == REDO && type == CHANNEL_ADD_UNDO) ||
|
||||
(state == UNDO && type == CHANNEL_REMOVE_UNDO))
|
||||
channel_delete (cu->channel);
|
||||
gtk_object_unref (GTK_OBJECT (cu->channel));
|
||||
|
||||
g_free (cu);
|
||||
}
|
||||
|
|
|
@ -765,7 +765,7 @@ toolbox_drag_drop (GtkWidget *widget,
|
|||
|
||||
gimp_drawable_set_gimage (GIMP_DRAWABLE (new_layer), new_gimage);
|
||||
|
||||
gimp_layer_set_name (GIMP_LAYER (new_layer),
|
||||
gimp_object_set_name (GIMP_OBJECT (new_layer),
|
||||
gimp_object_get_name (GIMP_OBJECT (drawable)));
|
||||
|
||||
if (layer)
|
||||
|
|
|
@ -2148,7 +2148,7 @@ xcf_load_channel_props (XcfInfo *info,
|
|||
info->active_channel = channel;
|
||||
break;
|
||||
case PROP_SELECTION:
|
||||
channel_delete (gimage->selection_mask);
|
||||
gtk_object_unref (GTK_OBJECT (gimage->selection_mask));
|
||||
gimage->selection_mask = channel;
|
||||
channel->boundary_known = FALSE;
|
||||
channel->bounds_known = FALSE;
|
||||
|
@ -2367,7 +2367,7 @@ xcf_load_channel (XcfInfo *info,
|
|||
return channel;
|
||||
|
||||
error:
|
||||
channel_delete (channel);
|
||||
gtk_object_unref (GTK_OBJECT (channel));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -2148,7 +2148,7 @@ xcf_load_channel_props (XcfInfo *info,
|
|||
info->active_channel = channel;
|
||||
break;
|
||||
case PROP_SELECTION:
|
||||
channel_delete (gimage->selection_mask);
|
||||
gtk_object_unref (GTK_OBJECT (gimage->selection_mask));
|
||||
gimage->selection_mask = channel;
|
||||
channel->boundary_known = FALSE;
|
||||
channel->bounds_known = FALSE;
|
||||
|
@ -2367,7 +2367,7 @@ xcf_load_channel (XcfInfo *info,
|
|||
return channel;
|
||||
|
||||
error:
|
||||
channel_delete (channel);
|
||||
gtk_object_unref (GTK_OBJECT (channel));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ HELP
|
|||
@inargs = ( &channel_arg );
|
||||
$inargs[0]->{desc} .= ' to delete';
|
||||
|
||||
%invoke = ( code => 'channel_delete (channel);' );
|
||||
%invoke = ( code => 'gtk_object_sink (GTK_OBJECT (channel));' );
|
||||
}
|
||||
|
||||
sub channel_combine_masks {
|
||||
|
@ -278,7 +278,7 @@ HELP
|
|||
$date = '1998';
|
||||
CODE
|
||||
|
||||
@headers = qw("channel.h");
|
||||
@headers = qw("channel.h" "pdb_glue.h");
|
||||
|
||||
unshift @procs, qw(channel_new channel_copy channel_delete
|
||||
channel_combine_masks);
|
||||
|
|
|
@ -499,8 +499,8 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
@headers = qw("gimplayermask.h" "drawable.h" "tile.h" "tile_manager.h"
|
||||
"temp_buf.h");
|
||||
@headers = qw("gimplayermask.h" "drawable.h" "pdb_glue.h" "tile.h"
|
||||
"tile_manager.h" "temp_buf.h");
|
||||
|
||||
@procs = qw(drawable_merge_shadow drawable_fill drawable_update
|
||||
drawable_mask_bounds drawable_image drawable_type
|
||||
|
|
|
@ -352,7 +352,7 @@ HELP
|
|||
@inargs = ( &layer_arg );
|
||||
$inargs[0]->{desc} .= ' to delete';
|
||||
|
||||
%invoke = ( code => 'gimp_layer_delete (layer);' );
|
||||
%invoke = ( code => 'gtk_object_sink (GTK_OBJECT (layer));' );
|
||||
}
|
||||
|
||||
sub layer_translate {
|
||||
|
@ -543,7 +543,7 @@ HELP
|
|||
$date = '1998';
|
||||
CODE
|
||||
|
||||
@headers = qw("layer.h" "gimpimage.h");
|
||||
@headers = qw("layer.h" "gimpimage.h" "pdb_glue.h");
|
||||
|
||||
unshift @procs, qw(layer_new layer_copy layer_create_mask layer_scale
|
||||
layer_resize layer_delete layer_translate layer_add_alpha
|
||||
|
|
|
@ -372,7 +372,7 @@ HELP
|
|||
operation,
|
||||
0, 0); /* off x/y */
|
||||
gimage_mask_load (gimage, new_channel);
|
||||
channel_delete (new_channel);
|
||||
gtk_object_unref (GTK_OBJECT (new_channel));
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
Loading…
Reference in New Issue