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

app/Makefile.am put the regex and MMX sources to EXTRA_DIST so they get

2001-05-20  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* plug-ins/script-fu/Makefile.am: put the regex and MMX sources to
	EXTRA_DIST so they get distributed unconditionally.

	* tools/pdbgen/pdb/layer.pdb: re-enabled the layer_mask procs but
	let them use accessors (which don't exist)...

	* app/pdb/pdb_glue.h: ... #define the accessors as macros here.

	Yes, this is ugly, but I simply don't fully understand pdbgen
	yoshcode.

	* app/pdb/internal_procs.c
	* app/pdb/layer_cmds.c
	* libgimp/gimplayer_pdb.[ch]: regenerated with the layer_mask
	accessors.

	* app/tools/Makefile.am: add the files which are not built to
	EXTRA_DIST.

	* pixmaps/Makefile.am
	* pixmaps/channel.xbm
	* pixmaps/eye.xbm
	* pixmaps/layer.xbm
	* pixmaps/linked.xbm
	* pixmaps/mask.xbm: removed.

	* plug-ins/Makefile.am: build XJT again because the layer_mask
	stuff is back. Perl also seems to build again.

	* plug-ins/common/aa.c: explicit casting fixes some warnings.

	* plug-ins/script-fu/interp_regex.c: #include "config.h".
parent aaa517dc
2001-05-20 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* plug-ins/script-fu/Makefile.am: put the regex and MMX sources to
EXTRA_DIST so they get distributed unconditionally.
* tools/pdbgen/pdb/layer.pdb: re-enabled the layer_mask procs but
let them use accessors (which don't exist)...
* app/pdb/pdb_glue.h: ... #define the accessors as macros here.
Yes, this is ugly, but I simply don't fully understand pdbgen
yoshcode.
* app/pdb/internal_procs.c
* app/pdb/layer_cmds.c
* libgimp/gimplayer_pdb.[ch]: regenerated with the layer_mask
accessors.
* app/tools/Makefile.am: add the files which are not built to
EXTRA_DIST.
* pixmaps/Makefile.am
* pixmaps/channel.xbm
* pixmaps/eye.xbm
* pixmaps/layer.xbm
* pixmaps/linked.xbm
* pixmaps/mask.xbm: removed.
* plug-ins/Makefile.am: build XJT again because the layer_mask
stuff is back. Perl also seems to build again.
* plug-ins/common/aa.c: explicit casting fixes some warnings.
* plug-ins/script-fu/interp_regex.c: #include "config.h".
2001-05-19 Sven Neumann <sven@gimp.org>
* app/main.c: s/USE_GCC_INTEL_MMX/HAVE_ASM_MMX/
......@@ -8,7 +44,7 @@
* app/base/temp-buf.[ch]: added a warning not to use the data field
from the TempBuf struct directly.
2001-05-18 Michael Natterer <mitch@gimp.org>rm
2001-05-18 Michael Natterer <mitch@gimp.org>
* app/gui/menus.c: use the correct callback for opening L&C.
......
......@@ -170,8 +170,10 @@ EXTRA_DIST = \
gimp.sym \
wilber.ico \
arch/i386/mmx/detect_mmx.S \
arch/i386/mmx/paint_funcs_mmx.S
arch/i386/mmx/paint_funcs_mmx.S \
detect_mmx.S \
regexrepl.c \
regexrepl.h
gimp_LDFLAGS = -export-dynamic -export-symbols $(srcdir)/gimp.sym
......
......@@ -59,7 +59,7 @@ void register_tools_procs (void);
void register_undo_procs (void);
void register_unit_procs (void);
/* 319 procedures registered total */
/* 325 procedures registered total */
void
internal_procs_init (void)
......@@ -70,90 +70,90 @@ internal_procs_init (void)
app_init_update_status (NULL, _("Brushes"), 0.009);
register_brushes_procs ();
app_init_update_status (NULL, _("Channel"), 0.044);
app_init_update_status (NULL, _("Channel"), 0.043);
register_channel_procs ();
app_init_update_status (NULL, _("Color"), 0.094);
app_init_update_status (NULL, _("Color"), 0.092);
register_color_procs ();
app_init_update_status (NULL, _("Convert"), 0.132);
app_init_update_status (NULL, _("Convert"), 0.129);
register_convert_procs ();
app_init_update_status (NULL, _("GDisplay procedures"), 0.141);
app_init_update_status (NULL, _("GDisplay procedures"), 0.138);
register_display_procs ();
app_init_update_status (NULL, _("Drawable procedures"), 0.15);
app_init_update_status (NULL, _("Drawable procedures"), 0.148);
register_drawable_procs ();
app_init_update_status (NULL, _("Edit procedures"), 0.223);
app_init_update_status (NULL, _("Edit procedures"), 0.218);
register_edit_procs ();
app_init_update_status (NULL, _("File Operations"), 0.241);
app_init_update_status (NULL, _("File Operations"), 0.237);
register_fileops_procs ();
app_init_update_status (NULL, _("Floating selections"), 0.266);
app_init_update_status (NULL, _("Floating selections"), 0.262);
register_floating_sel_procs ();
app_init_update_status (NULL, _("Gimprc procedures"), 0.285);
app_init_update_status (NULL, _("Gimprc procedures"), 0.28);
register_gimprc_procs ();
app_init_update_status (NULL, _("Gradients"), 0.295);
app_init_update_status (NULL, _("Gradients"), 0.289);
register_gradients_procs ();
app_init_update_status (NULL, _("Gradient UI"), 0.31);
app_init_update_status (NULL, _("Gradient UI"), 0.305);
register_gradient_select_procs ();
app_init_update_status (NULL, _("Guide procedures"), 0.323);
app_init_update_status (NULL, _("Guide procedures"), 0.317);
register_guides_procs ();
app_init_update_status (NULL, _("Help procedures"), 0.342);
app_init_update_status (NULL, _("Help procedures"), 0.335);
register_help_procs ();
app_init_update_status (NULL, _("Image"), 0.345);
app_init_update_status (NULL, _("Image"), 0.338);
register_image_procs ();
app_init_update_status (NULL, _("Layer"), 0.533);
app_init_update_status (NULL, _("Layer"), 0.523);
register_layer_procs ();
app_init_update_status (NULL, _("Interface"), 0.611);
app_init_update_status (NULL, _("Interface"), 0.618);
register_message_procs ();
app_init_update_status (NULL, _("Miscellaneous"), 0.621);
app_init_update_status (NULL, _("Miscellaneous"), 0.628);
register_misc_procs ();
app_init_update_status (NULL, _("Palette"), 0.627);
app_init_update_status (NULL, _("Palette"), 0.634);
register_palette_procs ();
app_init_update_status (NULL, _("Parasite procedures"), 0.649);
app_init_update_status (NULL, _("Parasite procedures"), 0.655);
register_parasite_procs ();
app_init_update_status (NULL, _("Paths"), 0.687);
app_init_update_status (NULL, _("Paths"), 0.692);
register_paths_procs ();
app_init_update_status (NULL, _("Pattern UI"), 0.727);
app_init_update_status (NULL, _("Pattern UI"), 0.732);
register_pattern_select_procs ();
app_init_update_status (NULL, _("Patterns"), 0.737);
app_init_update_status (NULL, _("Patterns"), 0.742);
register_patterns_procs ();
app_init_update_status (NULL, _("Plug-in"), 0.749);
app_init_update_status (NULL, _("Plug-in"), 0.754);
register_plug_in_procs ();
app_init_update_status (NULL, _("Procedural database"), 0.768);
app_init_update_status (NULL, _("Procedural database"), 0.772);
register_procedural_db_procs ();
app_init_update_status (NULL, _("Image mask"), 0.793);
app_init_update_status (NULL, _("Image mask"), 0.797);
register_selection_procs ();
app_init_update_status (NULL, _("Text procedures"), 0.85);
app_init_update_status (NULL, _("Text procedures"), 0.852);
register_text_tool_procs ();
app_init_update_status (NULL, _("Tool procedures"), 0.862);
app_init_update_status (NULL, _("Tool procedures"), 0.865);
register_tools_procs ();
app_init_update_status (NULL, _("Undo"), 0.956);
app_init_update_status (NULL, _("Undo"), 0.957);
register_undo_procs ();
app_init_update_status (NULL, _("Units"), 0.962);
app_init_update_status (NULL, _("Units"), 0.963);
register_unit_procs ();
}
......@@ -55,6 +55,12 @@ 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;
......@@ -84,6 +90,12 @@ register_layer_procs (void)
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);
......@@ -1210,6 +1222,312 @@ static ProcRecord layer_set_preserve_trans_proc =
{ { layer_set_preserve_trans_invoker } }
};
static Argument *
layer_get_apply_mask_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = (GimpLayer *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
return_args = procedural_db_return_args (&layer_get_apply_mask_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_layer_get_apply_mask (layer);
return return_args;
}
static ProcArg layer_get_apply_mask_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_apply_mask_outargs[] =
{
{
PDB_INT32,
"apply_mask",
"The layer apply mask"
}
};
static ProcRecord layer_get_apply_mask_proc =
{
"gimp_layer_get_apply_mask",
"Get the apply mask of the specified layer.",
"This procedure returns the specified layer's apply mask. If the value is non-zero, then the layer mask for this layer is currently being composited with the layer's alpha channel.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_apply_mask_inargs,
1,
layer_get_apply_mask_outargs,
{ { layer_get_apply_mask_invoker } }
};
static Argument *
layer_set_apply_mask_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean apply_mask;
layer = (GimpLayer *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
apply_mask = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
gimp_layer_set_apply_mask (layer, apply_mask);
return procedural_db_return_args (&layer_set_apply_mask_proc, success);
}
static ProcArg layer_set_apply_mask_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
},
{
PDB_INT32,
"apply_mask",
"The new layer apply mask"
}
};
static ProcRecord layer_set_apply_mask_proc =
{
"gimp_layer_set_apply_mask",
"Set the apply mask of the specified layer.",
"This procedure sets the specified layer's apply mask. 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.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_apply_mask_inargs,
0,
NULL,
{ { layer_set_apply_mask_invoker } }
};
static Argument *
layer_get_show_mask_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = (GimpLayer *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
return_args = procedural_db_return_args (&layer_get_show_mask_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_layer_get_show_mask (layer);
return return_args;
}
static ProcArg layer_get_show_mask_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_show_mask_outargs[] =
{
{
PDB_INT32,
"show_mask",
"The layer show mask"
}
};
static ProcRecord layer_get_show_mask_proc =
{
"gimp_layer_get_show_mask",
"Get the show mask of the specified layer.",
"This procedure returns the specified layer's show mask. If the value is non-zero, then the layer mask for this layer is currently being shown instead of the layer.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_show_mask_inargs,
1,
layer_get_show_mask_outargs,
{ { layer_get_show_mask_invoker } }
};
static Argument *
layer_set_show_mask_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean show_mask;
layer = (GimpLayer *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
show_mask = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
gimp_layer_set_show_mask (layer, show_mask);
return procedural_db_return_args (&layer_set_show_mask_proc, success);
}
static ProcArg layer_set_show_mask_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
},
{
PDB_INT32,
"show_mask",
"The new layer show mask"
}
};
static ProcRecord layer_set_show_mask_proc =
{
"gimp_layer_set_show_mask",
"Set the show mask of the specified layer.",
"This procedure sets the specified layer's show mask. 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.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_show_mask_inargs,
0,
NULL,
{ { layer_set_show_mask_invoker } }
};
static Argument *
layer_get_edit_mask_invoker (Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpLayer *layer;
layer = (GimpLayer *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
return_args = procedural_db_return_args (&layer_get_edit_mask_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_layer_get_edit_mask (layer);
return return_args;
}
static ProcArg layer_get_edit_mask_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
}
};
static ProcArg layer_get_edit_mask_outargs[] =
{
{
PDB_INT32,
"edit_mask",
"The layer show mask"
}
};
static ProcRecord layer_get_edit_mask_proc =
{
"gimp_layer_get_edit_mask",
"Get the show mask of the specified layer.",
"This procedure returns the specified layer's show mask. If the value is non-zero, then the layer mask for this layer is currently active, and not the layer.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
1,
layer_get_edit_mask_inargs,
1,
layer_get_edit_mask_outargs,
{ { layer_get_edit_mask_invoker } }
};
static Argument *
layer_set_edit_mask_invoker (Argument *args)
{
gboolean success = TRUE;
GimpLayer *layer;
gboolean edit_mask;
layer = (GimpLayer *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (layer == NULL)
success = FALSE;
edit_mask = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
gimp_layer_set_edit_mask (layer, edit_mask);
return procedural_db_return_args (&layer_set_edit_mask_proc, success);
}
static ProcArg layer_set_edit_mask_inargs[] =
{
{
PDB_LAYER,
"layer",
"The layer"
},
{
PDB_INT32,
"edit_mask",
"The new layer show mask"
}
};
static ProcRecord layer_set_edit_mask_proc =
{
"gimp_layer_set_edit_mask",
"Set the show mask of the specified layer.",
"This procedure sets the specified layer's show mask. 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.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
layer_set_edit_mask_inargs,
0,
NULL,
{ { layer_set_edit_mask_invoker } }
};
static Argument *
layer_get_opacity_invoker (Argument *args)
{
......
......@@ -24,19 +24,27 @@
#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_get_visible(l) gimp_drawable_get_visible(GIMP_DRAWABLE(l))
#define gimp_layer_set_visible(l,v) gimp_drawable_set_visible(GIMP_DRAWABLE(l),(v))
#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_channel_set_name(c,n) gimp_object_set_name(GIMP_OBJECT(c),(n))
#define gimp_channel_get_name(c) gimp_object_get_name(GIMP_OBJECT(c))
#define gimp_channel_get_visible(c) gimp_drawable_get_visible(GIMP_DRAWABLE(c))
#define gimp_channel_set_visible(c,v) gimp_drawable_set_visible(GIMP_DRAWABLE(c),(v))
#define gimp_channel_set_tattoo(c,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(c),(t))
#define gimp_channel_get_tattoo(c) gimp_drawable_get_tattoo(GIMP_DRAWABLE(c))
#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_get_visible(l) gimp_drawable_get_visible(GIMP_DRAWABLE(l))
#define gimp_layer_set_visible(l,v) gimp_drawable_set_visible(GIMP_DRAWABLE(l),(v))
#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_channel_set_name(c,n) gimp_object_set_name(GIMP_OBJECT(c),(n))
#define gimp_channel_get_name(c) gimp_object_get_name(GIMP_OBJECT(c))
#define gimp_channel_get_visible(c) gimp_drawable_get_visible(GIMP_DRAWABLE(c))
#define gimp_channel_set_visible(c,v) gimp_drawable_set_visible(GIMP_DRAWABLE(c),(v))
#define gimp_channel_set_tattoo(c,t) gimp_drawable_set_tattoo(GIMP_DRAWABLE(c),(t))
#define gimp_channel_get_tattoo(c) gimp_drawable_get_tattoo(GIMP_DRAWABLE(c))
#define gimp_layer_get_apply_mask(l) (l)->mask ? gimp_layer_mask_get_apply((l)->mask) : FALSE;
#define gimp_layer_get_show_mask(l) (l)->mask ? gimp_layer_mask_get_show((l)->mask) : FALSE;
#define gimp_layer_get_edit_mask(l) (l)->mask ? gimp_layer_mask_get_edit((l)->mask) : FALSE;
#define gimp_layer_set_apply_mask(l,a) { if((l)->mask) gimp_layer_mask_set_apply((l)->mask,(a)); else success = FALSE; }
#define gimp_layer_set_show_mask(l,s) { if((l)->mask) gimp_layer_mask_set_show((l)->mask,(s)); else success = FALSE; }
#define gimp_layer_set_edit_mask(l,e) { if((l)->mask) gimp_layer_mask_set_edit((l)->mask,(e)); else success = FALSE; }
#endif /* __PDB_GLUE_H__ */
......@@ -99,22 +99,23 @@ libapptools_la_SOURCES = \
path_tool.c \
path_toolP.h
## brightness_contrast.c \
## brightness_contrast.h \
## color_balance.c \
## color_balance.h \
## curves.c \
## curves.h \
## histogram_tool.c \
## histogram_tool.h \
## hue_saturation.c \
## hue_saturation.h \
## levels.c \
## levels.h \
## posterize.c \
## posterize.h \
## threshold.c \
## threshold.h
EXTRA_DIST = \
brightness_contrast.c \
brightness_contrast.h \
color_balance.c \
color_balance.h \
curves.c \
curves.h \
histogram_tool.c \
histogram_tool.h \
hue_saturation.c \
hue_saturation.h \
levels.c \
levels.h \
posterize.c \
posterize.h \
threshold.c \
threshold.h
AM_CPPFLAGS = \
......
......@@ -636,6 +636,206 @@ gimp_layer_set_preserve_trans (gint32 layer_ID,
return success;
}
/**
* gimp_layer_get_apply_mask:
* @layer_ID: The layer.
*
* Get the apply mask of the specified layer.