export GimpBrushGeneratedShape to the PDB.

2006-03-22  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB.

	* tools/pdbgen/pdb/brush.pdb: use it instead of int32.

	* libgimp/gimp.def: add gimp_brush_generated_shape_get_type().

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/fonts.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/misc.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation,
	removed some more utility functions, cleanup.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/display_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/patterns_cmds.c
	* tools/pdbgen/enums.pl
	* libgimp/gimpbrush_pdb.[ch]
	* libgimp/gimpenums.c.tail
	* libgimp/gimpenums.h: regenerated.
This commit is contained in:
Michael Natterer 2006-03-22 09:58:08 +00:00 committed by Michael Natterer
parent 277383d6d2
commit 2368a6a380
45 changed files with 561 additions and 347 deletions

View File

@ -1,3 +1,54 @@
2006-03-22 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB.
* tools/pdbgen/pdb/brush.pdb: use it instead of int32.
* libgimp/gimp.def: add gimp_brush_generated_shape_get_type().
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/font_select.pdb
* tools/pdbgen/pdb/fonts.pdb
* tools/pdbgen/pdb/gimprc.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/misc.pdb
* tools/pdbgen/pdb/paint_tools.pdb
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/plug_in.pdb
* tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation,
removed some more utility functions, cleanup.
* app/pdb/brush_cmds.c
* app/pdb/brushes_cmds.c
* app/pdb/display_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/fonts_cmds.c
* app/pdb/gimprc_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/palettes_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/patterns_cmds.c
* tools/pdbgen/enums.pl
* libgimp/gimpbrush_pdb.[ch]
* libgimp/gimpenums.c.tail
* libgimp/gimpenums.h: regenerated.
2006-03-21 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/gradient.pdb: removed all perl utility

View File

@ -195,7 +195,7 @@ typedef enum /*< pdb-skip >*/
GType gimp_brush_generated_shape_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
typedef enum
{
GIMP_BRUSH_GENERATED_CIRCLE, /*< desc="Circle" >*/
GIMP_BRUSH_GENERATED_SQUARE, /*< desc="Square" >*/

View File

@ -942,7 +942,7 @@ static ProcArg brush_get_shape_outargs[] =
{
GIMP_PDB_INT32,
"shape",
"An enumerated value representing the brush shape"
"The brush shape"
}
};
@ -1331,13 +1331,15 @@ brush_set_shape_invoker (Gimp *gimp,
success = FALSE;
shape_in = args[1].value.pdb_int;
if (shape_in < GIMP_BRUSH_GENERATED_CIRCLE || shape_in > GIMP_BRUSH_GENERATED_DIAMOND)
success = FALSE;
if (success)
{
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_shape (GIMP_BRUSH_GENERATED (brush),
shape_in);
@ -1365,7 +1367,7 @@ static ProcArg brush_set_shape_inargs[] =
{
GIMP_PDB_INT32,
"shape-in",
"An enumerated value representing the desired brush shape"
"The brush shape: { GIMP_BRUSH_GENERATED_CIRCLE (0), GIMP_BRUSH_GENERATED_SQUARE (1), GIMP_BRUSH_GENERATED_DIAMOND (2) }"
}
};
@ -1419,7 +1421,7 @@ brush_set_radius_invoker (Gimp *gimp,
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_radius (GIMP_BRUSH_GENERATED (brush),
radius_in);
@ -1501,7 +1503,7 @@ brush_set_spikes_invoker (Gimp *gimp,
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_spikes (GIMP_BRUSH_GENERATED (brush),
spikes_in);
@ -1583,7 +1585,7 @@ brush_set_hardness_invoker (Gimp *gimp,
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_hardness (GIMP_BRUSH_GENERATED (brush),
hardness_in);
@ -1665,7 +1667,7 @@ brush_set_aspect_ratio_invoker (Gimp *gimp,
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_aspect_ratio (GIMP_BRUSH_GENERATED (brush),
aspect_ratio_in);
@ -1747,7 +1749,7 @@ brush_set_angle_invoker (Gimp *gimp,
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_angle (GIMP_BRUSH_GENERATED (brush),
angle_in);

View File

@ -98,7 +98,10 @@ brushes_get_list_invoker (Gimp *gimp,
success = FALSE;
if (success)
brush_list = gimp_container_get_filtered_name_array (gimp->brush_factory->container, filter, &num_brushes);
{
brush_list = gimp_container_get_filtered_name_array (gimp->brush_factory->container,
filter, &num_brushes);
}
return_args = procedural_db_return_args (&brushes_get_list_proc, success);
@ -298,7 +301,9 @@ brushes_set_spacing_invoker (Gimp *gimp,
success = FALSE;
if (success)
{
gimp_brush_set_spacing (gimp_context_get_brush (context), spacing);
}
return procedural_db_return_args (&brushes_set_spacing_proc, success);
}

View File

@ -130,7 +130,9 @@ display_delete_invoker (Gimp *gimp,
success = FALSE;
if (success)
{
gimp_delete_display (gimp, display);
}
return procedural_db_return_args (&display_delete_proc, success);
}
@ -178,7 +180,9 @@ display_get_window_handle_invoker (Gimp *gimp,
success = FALSE;
if (success)
{
window = (gint32) gimp_get_display_window (gimp, display);
}
return_args = procedural_db_return_args (&display_get_window_handle_proc, success);

View File

@ -1025,7 +1025,9 @@ drawable_get_image_invoker (Gimp *gimp,
success = FALSE;
if (success)
{
success = (gimage = gimp_item_get_image (GIMP_ITEM (drawable))) != NULL;
}
return_args = procedural_db_return_args (&drawable_get_image_proc, success);

View File

@ -86,7 +86,10 @@ fonts_get_list_invoker (Gimp *gimp,
success = FALSE;
if (success)
font_list = gimp_container_get_filtered_name_array (gimp->fonts, filter, &num_fonts);
{
font_list = gimp_container_get_filtered_name_array (gimp->fonts,
filter, &num_fonts);
}
return_args = procedural_db_return_args (&fonts_get_list_proc, success);

View File

@ -75,9 +75,12 @@ gimprc_query_invoker (Gimp *gimp,
{
/* use edit_config because unknown tokens are set there */
value = gimp_rc_query (GIMP_RC (gimp->edit_config), token);
}
success = (value != NULL);
if (! value)
success = FALSE;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&gimprc_query_proc, success);

View File

@ -95,7 +95,10 @@ gradients_get_list_invoker (Gimp *gimp,
success = FALSE;
if (success)
gradient_list = gimp_container_get_filtered_name_array (gimp->gradient_factory->container, filter, &num_gradients);
{
gradient_list = gimp_container_get_filtered_name_array (gimp->gradient_factory->container,
filter, &num_gradients);
}
return_args = procedural_db_return_args (&gradients_get_list_proc, success);

View File

@ -331,7 +331,13 @@ layer_copy_invoker (Gimp *gimp,
add_alpha = args[1].value.pdb_int ? TRUE : FALSE;
if (success)
success = (layer_copy = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (layer), G_TYPE_FROM_INSTANCE (layer), add_alpha))) != NULL;
{
layer_copy = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (layer),
G_TYPE_FROM_INSTANCE (layer),
add_alpha));
if (! layer_copy)
success = FALSE;
}
return_args = procedural_db_return_args (&layer_copy_proc, success);
@ -819,7 +825,12 @@ layer_create_mask_invoker (Gimp *gimp,
success = FALSE;
if (success)
success = (mask = gimp_layer_create_mask (layer, (GimpAddMaskType) mask_type)) != NULL;
{
mask = gimp_layer_create_mask (layer, (GimpAddMaskType) mask_type);
if (! mask)
success = FALSE;
}
return_args = procedural_db_return_args (&layer_create_mask_proc, success);

View File

@ -95,7 +95,10 @@ palettes_get_list_invoker (Gimp *gimp,
success = FALSE;
if (success)
palette_list = gimp_container_get_filtered_name_array (gimp->palette_factory->container, filter, &num_palettes);
{
palette_list = gimp_container_get_filtered_name_array (gimp->palette_factory->container,
filter, &num_palettes);
}
return_args = procedural_db_return_args (&palettes_get_list_proc, success);

View File

@ -98,7 +98,9 @@ path_list_invoker (Gimp *gimp,
success = FALSE;
if (success)
{
path_list = gimp_container_get_name_array (gimage->vectors, &num_paths);
}
return_args = procedural_db_return_args (&path_list_proc, success);
@ -1464,7 +1466,9 @@ path_import_invoker (Gimp *gimp,
scale = args[3].value.pdb_int ? TRUE : FALSE;
if (success)
{
success = gimp_vectors_import_file (gimage, filename, merge, scale, -1, NULL);
}
return procedural_db_return_args (&path_import_proc, success);
}
@ -1539,7 +1543,10 @@ path_import_string_invoker (Gimp *gimp,
scale = args[4].value.pdb_int ? TRUE : FALSE;
if (success)
success = gimp_vectors_import_buffer (gimage, string, length, merge, scale, -1, NULL);
{
success = gimp_vectors_import_buffer (gimage, string, length,
merge, scale, -1, NULL);
}
return procedural_db_return_args (&path_import_string_proc, success);
}

View File

@ -94,7 +94,10 @@ patterns_get_list_invoker (Gimp *gimp,
success = FALSE;
if (success)
pattern_list = gimp_container_get_filtered_name_array (gimp->pattern_factory->container, filter, &num_patterns);
{
pattern_list = gimp_container_get_filtered_name_array (gimp->pattern_factory->container,
filter, &num_patterns);
}
return_args = procedural_db_return_args (&patterns_get_list_proc, success);

View File

@ -6,6 +6,7 @@ EXPORTS
gimp_brush_application_mode_get_type
gimp_brush_delete
gimp_brush_duplicate
gimp_brush_generated_shape_get_type
gimp_brush_get_angle
gimp_brush_get_aspect_ratio
gimp_brush_get_hardness

View File

@ -435,16 +435,16 @@ gimp_brush_set_spacing (const gchar *name,
* (GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added
* in the future.
*
* Returns: An enumerated value representing the brush shape.
* Returns: The brush shape.
*
* Since: GIMP 2.4
*/
gint
GimpBrushGeneratedShape
gimp_brush_get_shape (const gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
gint shape = 0;
GimpBrushGeneratedShape shape = 0;
return_vals = gimp_run_procedure ("gimp-brush-get-shape",
&nreturn_vals,
@ -628,7 +628,7 @@ gimp_brush_get_angle (const gchar *name)
/**
* gimp_brush_set_shape:
* @name: The brush name.
* @shape_in: An enumerated value representing the desired brush shape.
* @shape_in: The brush shape.
*
* Set the shape of a generated brush.
*
@ -643,13 +643,13 @@ gimp_brush_get_angle (const gchar *name)
*
* Since: GIMP 2.4
*/
gint
GimpBrushGeneratedShape
gimp_brush_set_shape (const gchar *name,
gint shape_in)
GimpBrushGeneratedShape shape_in)
{
GimpParam *return_vals;
gint nreturn_vals;
gint shape_out = 0;
GimpBrushGeneratedShape shape_out = 0;
return_vals = gimp_run_procedure ("gimp-brush-set-shape",
&nreturn_vals,

View File

@ -54,14 +54,14 @@ gboolean gimp_brush_get_spacing (const gchar *name,
gint *spacing);
gboolean gimp_brush_set_spacing (const gchar *name,
gint spacing);
gint gimp_brush_get_shape (const gchar *name);
GimpBrushGeneratedShape gimp_brush_get_shape (const gchar *name);
gdouble gimp_brush_get_radius (const gchar *name);
gint gimp_brush_get_spikes (const gchar *name);
gdouble gimp_brush_get_hardness (const gchar *name);
gdouble gimp_brush_get_aspect_ratio (const gchar *name);
gdouble gimp_brush_get_angle (const gchar *name);
gint gimp_brush_set_shape (const gchar *name,
gint shape_in);
GimpBrushGeneratedShape gimp_brush_set_shape (const gchar *name,
GimpBrushGeneratedShape shape_in);
gdouble gimp_brush_set_radius (const gchar *name,
gdouble radius_in);
gint gimp_brush_set_spikes (const gchar *name,

View File

@ -6,6 +6,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
gimp_add_mask_type_get_type,
gimp_blend_mode_get_type,
gimp_brush_application_mode_get_type,
gimp_brush_generated_shape_get_type,
gimp_bucket_fill_mode_get_type,
gimp_channel_ops_get_type,
gimp_channel_type_get_type,
@ -53,6 +54,7 @@ static const gchar *type_names[] =
"GimpAddMaskType",
"GimpBlendMode",
"GimpBrushApplicationMode",
"GimpBrushGeneratedShape",
"GimpBucketFillMode",
"GimpChannelOps",
"GimpChannelType",

View File

@ -36,6 +36,18 @@ typedef enum
} GimpBrushApplicationMode;
#define GIMP_TYPE_BRUSH_GENERATED_SHAPE (gimp_brush_generated_shape_get_type ())
GType gimp_brush_generated_shape_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_BRUSH_GENERATED_CIRCLE,
GIMP_BRUSH_GENERATED_SQUARE,
GIMP_BRUSH_GENERATED_DIAMOND
} GimpBrushGeneratedShape;
#define GIMP_TYPE_CONVERT_DITHER_TYPE (gimp_convert_dither_type_get_type ())
GType gimp_convert_dither_type_get_type (void) G_GNUC_CONST;

View File

@ -432,6 +432,16 @@ package Gimp::CodeGen::enums;
GIMP_TRANSPARENT_FILL => '3',
GIMP_PATTERN_FILL => '4' }
},
GimpBrushGeneratedShape =>
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_BRUSH_GENERATED_CIRCLE
GIMP_BRUSH_GENERATED_SQUARE
GIMP_BRUSH_GENERATED_DIAMOND) ],
mapping => { GIMP_BRUSH_GENERATED_CIRCLE => '0',
GIMP_BRUSH_GENERATED_SQUARE => '1',
GIMP_BRUSH_GENERATED_DIAMOND => '2' }
},
GimpOrientationType =>
{ contig => 1,
header => 'core/core-enums.h',

View File

@ -17,15 +17,6 @@
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
sub brush_arg () {{
name => 'name',
type => 'string',
desc => 'The brush name'
}}
# The defs
sub brush_new {
$blurb = "Creates a new brush";
$help = "This procedure creates a new, uninitialized brush";
@ -68,7 +59,8 @@ sub brush_duplicate {
&mitch_pdb_misc('2004', '2.2');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
@ -107,12 +99,13 @@ sub brush_is_generated {
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'generated', type => 'boolean',
desc => "True if the brush is generated" }
desc => 'True if the brush is generated' }
);
%invoke = (
@ -137,12 +130,13 @@ sub brush_is_editable {
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'editable', type => 'boolean',
desc => "True if the brush can be edited" }
desc => 'True if the brush can be edited' }
);
%invoke = (
@ -167,14 +161,15 @@ sub brush_rename {
&mitch_pdb_misc('2004', '2.2');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'new_name', type => 'string',
desc => "The new name of the brush" }
desc => 'The new name of the brush' }
);
@outargs = (
{ name => 'actual_name', type => 'string',
desc => "The actual new name of the brush" }
desc => 'The actual new name of the brush' }
);
%invoke = (
@ -202,7 +197,8 @@ sub brush_delete {
&mitch_pdb_misc('2004', '2.2');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
%invoke = (
@ -234,6 +230,7 @@ CODE
sub brush_get_info {
$blurb = "Retrieve information about the specified brush.";
$help = <<'HELP';
This procedure retrieves information about the specified brush. This
includes the brush name, and the brush extents (width and height).
@ -242,18 +239,19 @@ HELP
&mitch_pdb_misc('2004', '2.2');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'width', type => 'int32', void_ret => 1,
desc => "The brush width" },
desc => 'The brush width' },
{ name => 'height', type => 'int32',
desc => "The brush height" },
desc => 'The brush height' },
{ name => 'mask_bpp', type => 'int32',
desc => "The brush mask bpp" },
desc => 'The brush mask bpp' },
{ name => 'color_bpp', type => 'int32',
desc => "The brush color bpp" }
desc => 'The brush color bpp' }
);
%invoke = (
@ -277,9 +275,7 @@ CODE
}
sub brush_get_pixels {
$blurb = <<'BLURB';
Retrieve information about the specified brush.
BLURB
$blurb = 'Retrieve information about the specified brush.';
$help = <<'HELP';
This procedure retrieves information about the specified brush. This
@ -289,21 +285,22 @@ HELP
&mitch_pdb_misc('2004', '2.2');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'width', type => 'int32', void_ret => '1',
desc => "The brush width" },
desc => 'The brush width' },
{ name => 'height', type => 'int32',
desc => "The brush height" },
desc => 'The brush height' },
{ name => 'mask_bpp', type => 'int32',
desc => "The brush mask bpp" },
desc => 'The brush mask bpp' },
{ name => 'mask_bytes', type => 'int8array',
desc => 'The brush mask data',
array => { desc => 'Length of brush mask data' } },
{ name => 'color_bpp', type => 'int32',
desc => "The brush color bpp" },
desc => 'The brush color bpp' },
{ name => 'color_bytes', type => 'int8array',
desc => 'The brush color data',
array => { desc => 'Length of brush color data' } }
@ -350,7 +347,8 @@ HELP
&mitch_pdb_misc('2004', '2.2');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
@ -389,15 +387,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'shape', type => 'int32',
desc => "An enumerated value representing the brush shape" }
{ name => 'shape', type => 'enum GimpBrushGeneratedShape',
desc => 'The brush shape' }
);
%invoke = (
code => <<'CODE'
{
@ -424,12 +422,13 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'radius', type => 'float',
desc => "The radius of the brush in pixels" }
desc => 'The radius of the brush in pixels' }
);
%invoke = (
@ -458,12 +457,13 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'spikes', type => 'int32',
desc => "The number of spikes on the brush." }
desc => 'The number of spikes on the brush.' }
);
%invoke = (
@ -488,18 +488,19 @@ sub brush_get_hardness {
This procedure gets the hardness of a generated brush. The
hardness of a brush is the amount its intensity fades at the
outside edge. If called for any other type of brush, the function
does not succeed.
does not succeed.
HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'hardness', type => 'float',
desc => "The hardness of the brush." }
desc => 'The hardness of the brush.' }
);
%invoke = (
@ -528,12 +529,13 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'aspect_ratio', type => 'float',
desc => "The aspect ratio of the brush." }
desc => 'The aspect ratio of the brush.' }
);
%invoke = (
@ -562,12 +564,13 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg
{ name => 'name', type => 'string',
desc => 'The brush name' }
);
@outargs = (
{ name => 'angle', type => 'float',
desc => "The rotation angle of the brush." }
desc => 'The rotation angle of the brush.' }
);
%invoke = (
@ -596,7 +599,8 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'spacing', type => '0 <= int32 <= 1000',
desc => 'The brush spacing: %%desc%%' }
);
@ -616,7 +620,6 @@ CODE
);
}
sub brush_set_shape {
$blurb = 'Set the shape of a generated brush.';
@ -632,14 +635,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'shape_in', type => 'int32',
desc => "An enumerated value representing the desired brush shape" }
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'shape_in', type => 'enum GimpBrushGeneratedShape',
desc => 'The brush shape: { %%desc%% }' }
);
@outargs = (
{ name => 'shape_out', type => 'int32',
desc => "The brush shape actually assigned" }
{ name => 'shape_out', type => 'enum GimpBrushGeneratedShape',
desc => 'The brush shape actually assigned' }
);
%invoke = (
@ -648,7 +652,7 @@ HELP
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_shape (GIMP_BRUSH_GENERATED (brush),
shape_in);
@ -661,7 +665,6 @@ CODE
);
}
sub brush_set_radius {
$blurb = 'Set the radius of a generated brush.';
@ -673,14 +676,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'radius_in', type => 'float',
desc => "The desired brush radius" }
desc => 'The desired brush radius' }
);
@outargs = (
{ name => 'radius_out', type => 'float',
desc => "The brush radius actually assigned" }
desc => 'The brush radius actually assigned' }
);
%invoke = (
@ -689,7 +693,7 @@ HELP
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_radius (GIMP_BRUSH_GENERATED (brush),
radius_in);
@ -702,7 +706,6 @@ CODE
);
}
sub brush_set_spikes {
$blurb = 'Set the number of spikes for a generated brush.';
@ -714,14 +717,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'spikes_in', type => 'int32',
desc => "The desired number of spikes" }
desc => 'The desired number of spikes' }
);
@outargs = (
{ name => 'spikes_out', type => 'int32',
desc => "The number of spikes actually assigned" }
desc => 'The number of spikes actually assigned' }
);
%invoke = (
@ -730,7 +734,7 @@ HELP
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_spikes (GIMP_BRUSH_GENERATED (brush),
spikes_in);
@ -743,7 +747,6 @@ CODE
);
}
sub brush_set_hardness {
$blurb = 'Set the hardness of a generated brush.';
@ -755,14 +758,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'hardness_in', type => 'float',
desc => "The desired brush hardness" }
desc => 'The desired brush hardness' }
);
@outargs = (
{ name => 'hardness_out', type => 'float',
desc => "The brush hardness actually assigned" }
desc => 'The brush hardness actually assigned' }
);
%invoke = (
@ -771,7 +775,7 @@ HELP
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_hardness (GIMP_BRUSH_GENERATED (brush),
hardness_in);
@ -784,7 +788,6 @@ CODE
);
}
sub brush_set_aspect_ratio {
$blurb = 'Set the aspect ratio of a generated brush.';
@ -796,14 +799,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'aspect_ratio_in', type => 'float',
desc => "The desired brush aspect ratio" }
desc => 'The desired brush aspect ratio' }
);
@outargs = (
{ name => 'aspect_ratio_out', type => 'float',
desc => "The brush aspect ratio actually assigned" }
desc => 'The brush aspect ratio actually assigned' }
);
%invoke = (
@ -812,7 +816,7 @@ HELP
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_aspect_ratio (GIMP_BRUSH_GENERATED (brush),
aspect_ratio_in);
@ -825,7 +829,6 @@ CODE
);
}
sub brush_set_angle {
$blurb = 'Set the rotation angle of a generated brush.';
@ -837,14 +840,15 @@ HELP
&bill_pdb_misc('2004', '2.4');
@inargs = (
&brush_arg,
{ name => 'name', type => 'string',
desc => 'The brush name' },
{ name => 'angle_in', type => 'float',
desc => "The desired brush rotation angle" }
desc => 'The desired brush rotation angle' }
);
@outargs = (
{ name => 'angle_out', type => 'float',
desc => "The brush rotation angle actually assigned" }
desc => 'The brush rotation angle actually assigned' }
);
%invoke = (
@ -853,7 +857,7 @@ HELP
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && GIMP_IS_BRUSH_GENERATED (brush))
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
{
gimp_brush_generated_set_angle (GIMP_BRUSH_GENERATED (brush),
angle_in);

View File

@ -17,18 +17,6 @@
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
sub brush_args {(
{ name => 'opacity',
type => '0 <= float <= 100',
desc => 'The initial opacity of the brush' },
{ name => 'spacing',
type => 'int32 <= 1000',
desc => 'The initial spacing of the brush (if < 0 then use brush default
spacing)' },
{ name => 'paint_mode', type => 'enum GimpLayerModeEffects',
desc => 'The initial paint mode: { %%desc%% }' }
)}
sub brushes_popup {
$blurb = 'Invokes the Gimp brush selection.';
$help = 'This procedure popups the brush selection dialog.';
@ -44,7 +32,13 @@ sub brushes_popup {
{ name => 'initial_brush', type => 'string',
desc => 'The name of the brush to set as the first selected',
null_ok => 1 },
&brush_args
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The initial opacity of the brush' },
{ name => 'spacing', type => 'int32 <= 1000',
desc => 'The initial spacing of the brush (if < 0 then use brush
default spacing)' },
{ name => 'paint_mode', type => 'enum GimpLayerModeEffects',
desc => 'The initial paint mode: { %%desc%% }' }
);
%invoke = (
@ -99,7 +93,13 @@ sub brushes_set_popup {
desc => 'The name of the callback registered for this popup' },
{ name => 'brush_name', type => 'string',
desc => 'The name of the brush to set as selected' },
&brush_args
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The initial opacity of the brush' },
{ name => 'spacing', type => 'int32 <= 1000',
desc => 'The initial spacing of the brush (if < 0 then use brush
default spacing)' },
{ name => 'paint_mode', type => 'enum GimpLayerModeEffects',
desc => 'The initial paint mode: { %%desc%% }' }
);
%invoke = (

View File

@ -28,8 +28,12 @@ HELP
&seth_pdb_misc('1997');
%invoke = (
code => 'gimp_data_factory_data_refresh (gimp->brush_factory);'
)
code => <<'CODE'
{
gimp_data_factory_data_refresh (gimp->brush_factory);
}
CODE
);
}
sub brushes_get_list {
@ -57,7 +61,12 @@ HELP
%invoke = (
headers => [ qw("core/gimpcontainer-filter.h") ],
code => 'brush_list = gimp_container_get_filtered_name_array (gimp->brush_factory->container, filter, &num_brushes);'
code => <<'CODE'
{
brush_list = gimp_container_get_filtered_name_array (gimp->brush_factory->container,
filter, &num_brushes);
}
CODE
);
}
@ -76,7 +85,7 @@ sub brushes_get_brush {
);
%invoke = (
code =><<'CODE'
code => <<'CODE'
{
GimpBrush *brush = gimp_context_get_brush (context);
@ -125,7 +134,11 @@ sub brushes_set_spacing {
);
%invoke = (
code => 'gimp_brush_set_spacing (gimp_context_get_brush (context), spacing);'
code => <<'CODE'
{
gimp_brush_set_spacing (gimp_context_get_brush (context), spacing);
}
CODE
);
}

View File

@ -17,8 +17,6 @@
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
# The defs
sub display_new {
$blurb = 'Create a new display for the specified image.';
@ -32,7 +30,9 @@ HELP
&std_pdb_misc;
@inargs = ( &std_image_arg );
@inargs = (
&std_image_arg
);
@outargs = (
{ name => 'display', type => 'display',
@ -69,7 +69,12 @@ HELP
desc => 'The display to delete' }
);
%invoke = ( code => 'gimp_delete_display (gimp, display);' );
%invoke = ( code => <<'CODE'
{
gimp_delete_display (gimp, display);
}
CODE
);
}
sub display_get_window_handle {
@ -94,7 +99,12 @@ HELP
desc => 'The native window handle or 0' }
);
%invoke = ( code => 'window = (gint32) gimp_get_display_window (gimp, display);' );
%invoke = ( code => <<'CODE'
{
window = (gint32) gimp_get_display_window (gimp, display);
}
CODE
);
}
sub displays_flush {
@ -110,7 +120,12 @@ HELP
%invoke = (
headers => [ qw("core/gimpcontainer.h") ],
code => 'gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL);'
code => <<'CODE'
{
gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL);
}
CODE
);
}

View File

@ -36,8 +36,9 @@ HELP
desc => 'Push merge to undo stack?' }
);
%invoke = ( headers => [ qw("plug-in/plug-in.h") ],
code => <<CODE
%invoke = (
headers => [ qw("plug-in/plug-in.h") ],
code => <<'CODE'
{
success = gimp_item_is_attached (GIMP_ITEM (drawable));
@ -237,7 +238,11 @@ sub drawable_get_image {
$outargs[0]->{desc} = "The drawable's image";
%invoke = (
code => 'success = (gimage = gimp_item_get_image (GIMP_ITEM (drawable))) != NULL;'
code => <<'CODE'
{
success = (gimage = gimp_item_get_image (GIMP_ITEM (drawable))) != NULL;
}
CODE
);
}
@ -946,7 +951,8 @@ sub drawable_set_image {
&std_image_arg
);
%invoke = ( code =><<'CODE'
%invoke = (
code =><<'CODE'
{
success = (gimage == gimp_item_get_image (GIMP_ITEM (drawable)));
}
@ -1178,7 +1184,8 @@ HELP
desc => 'The drawable to delete' }
);
%invoke = ( code => <<'CODE' );
%invoke = (
code => <<'CODE'
{
success = gimp_item_is_floating (GIMP_ITEM (drawable));
@ -1186,6 +1193,7 @@ HELP
gimp_item_sink (GIMP_ITEM (drawable));
}
CODE
);
}
sub drawable_foreground_extract {

View File

@ -539,9 +539,6 @@ HELP
&std_pdb_misc;
my $validity = 'This parameter is only valid when there is no selection in
the specified image.';
@inargs = (
{ name => 'drawable', type => 'drawable',
desc => 'The affected drawable' },
@ -554,17 +551,20 @@ HELP
{ name => 'threshold', type => '0 <= float <= 255',
desc => "The threshold determines how extensive the seed fill will
be. It's value is specified in terms of intensity levels
(%%desc%%). $validity" },
(%%desc%%). This parameter is only valid when there is
no selection in the specified image." },
{ name => 'sample_merged', type => 'boolean',
desc => 'Use the composite image, not the drawable' }
desc => 'Use the composite image, not the drawable' },
{ name => 'x', type => 'float',
desc => "The x coordinate of this bucket fill's application.
This parameter is only valid when there is no selection
in the specified image." },
{ name => 'y', type => 'float',
desc => "The y coordinate of this bucket fill's application.
This parameter is only valid when there is no selection
in the specified image." }
);
foreach (qw(x y)) {
push @inargs, { name => $_, type => 'float',
desc => "The $_ coordinate of this bucket fill's
application. $validity" }
}
%invoke = (
headers => [ qw ("core/gimpdrawable-bucket-fill.h"
"core/gimpchannel.h") ],

View File

@ -603,7 +603,12 @@ sub register_thumbnail_loader {
$blurb = 'Associates a thumbnail loader with a file load procedure.';
$help = <<'HELP';
Some file formats allow for embedded thumbnails, other file formats contain a scalable image or provide the image data in different resolutions. A file plug-in for such a format may register a special procedure that allows GIMP to load a thumbnail preview of the image. This procedure is then associated with the standard load procedure using this function.
Some file formats allow for embedded thumbnails, other file formats
contain a scalable image or provide the image data in different
resolutions. A file plug-in for such a format may register a special
procedure that allows GIMP to load a thumbnail preview of the
image. This procedure is then associated with the standard load
procedure using this function.
HELP
&neo_pdb_misc('2004', '2.2');

View File

@ -35,7 +35,7 @@ HELP
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (gimp_layer_is_floating_sel (floating_sel))
floating_sel_remove (floating_sel);
@ -65,7 +65,7 @@ HELP
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (gimp_layer_is_floating_sel (floating_sel))
floating_sel_anchor (floating_sel);
@ -97,7 +97,7 @@ HELP
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (gimp_layer_is_floating_sel (floating_sel))
floating_sel_to_layer (floating_sel);
@ -127,7 +127,7 @@ HELP
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
floating_sel_attach (layer, drawable);
@ -152,7 +152,7 @@ sub floating_sel_rigor {
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (gimp_layer_is_floating_sel (floating_sel))
floating_sel_rigor (floating_sel, undo);
@ -177,7 +177,7 @@ sub floating_sel_relax {
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (gimp_layer_is_floating_sel (floating_sel))
floating_sel_relax (floating_sel, undo);

View File

@ -25,8 +25,7 @@ sub fonts_popup {
@inargs = (
{ name => 'font_callback', type => 'string',
desc => 'The callback PDB proc to call when font selection is
made' },
desc => 'The callback PDB proc to call when font selection is made' },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the font popup window' },
{ name => 'initial_font', type => 'string',

View File

@ -28,7 +28,11 @@ HELP
&neo_pdb_misc('2003');
%invoke = (
code => 'gimp_fonts_load (gimp);'
code => <<'CODE'
{
gimp_fonts_load (gimp);
}
CODE
);
}
@ -55,7 +59,12 @@ HELP
%invoke = (
headers => [ qw("core/gimpcontainer-filter.h") ],
code => 'font_list = gimp_container_get_filtered_name_array (gimp->fonts, filter, &num_fonts);'
code => <<'CODE'
{
font_list = gimp_container_get_filtered_name_array (gimp->fonts,
filter, &num_fonts);
}
CODE
);
}

View File

@ -53,9 +53,12 @@ HELP
{
/* use edit_config because unknown tokens are set there */
value = gimp_rc_query (GIMP_RC (gimp->edit_config), token);
}
success = (value != NULL);
if (! value)
success = FALSE;
}
else
success = FALSE;
}
CODE
);

View File

@ -28,8 +28,12 @@ HELP
&mitch_pdb_misc('2002');
%invoke = (
code => 'gimp_data_factory_data_refresh (gimp->gradient_factory);'
)
code => <<'CODE'
{
gimp_data_factory_data_refresh (gimp->gradient_factory);
}
CODE
);
}
sub gradients_get_list {
@ -57,7 +61,12 @@ HELP
%invoke = (
headers => [ qw("core/gimpcontainer-filter.h") ],
code => 'gradient_list = gimp_container_get_filtered_name_array (gimp->gradient_factory->container, filter, &num_gradients);'
code => <<'CODE'
{
gradient_list = gimp_container_get_filtered_name_array (gimp->gradient_factory->container,
filter, &num_gradients);
}
CODE
);
}

View File

@ -39,7 +39,7 @@ HELP
);
%invoke = (
code => <<CODE
code => <<'CODE'
{
if (! help_domain && gimp->current_plug_in)
help_domain = (gchar *)

View File

@ -143,7 +143,8 @@ HELP
&std_image_arg
);
%invoke = ( code => <<'CODE' );
%invoke = (
code => <<'CODE'
{
if (gimage->disp_count == 0)
g_object_unref (gimage);
@ -151,6 +152,7 @@ HELP
success = FALSE;
}
CODE
);
}
sub image_resize {
@ -171,15 +173,15 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'new_width', type => '0 < int32',
desc => "New image width: %%desc%%" },
desc => 'New image width: %%desc%%' },
{ name => 'new_height', type => '0 < int32',
desc => "New image height: %%desc%%" },
desc => 'New image height: %%desc%%' },
{ name => 'offx', type => 'int32',
desc => "x offset between upper left corner of old and
new images: (new - old)" },
desc => 'x offset between upper left corner of old and
new images: (new - old)' },
{ name => 'offy', type => 'int32',
desc => "y offset between upper left corner of old and
new images: (new - old)" }
desc => 'y offset between upper left corner of old and
new images: (new - old)' }
);
%invoke = (
@ -237,9 +239,9 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'new_width', type => '0 < int32',
desc => "New image width: %%desc%%" },
desc => 'New image width: %%desc%%' },
{ name => 'new_height', type => '0 < int32',
desc => "New image height: %%desc%%" }
desc => 'New image height: %%desc%%' }
);
%invoke = (
@ -383,10 +385,10 @@ HELP
);
@outargs = (
{ name => "layer_ids", type => 'int32array',
desc => "The list of layers contained in the image",
array => { name => "num_layers",
desc => "The number of layers contained in the image" } }
{ name => 'layer_ids', type => 'int32array',
desc => 'The list of layers contained in the image',
array => { name => 'num_layers',
desc => 'The number of layers contained in the image' } }
);
%invoke = (
@ -426,10 +428,10 @@ HELP
);
@outargs = (
{ name => "channel_ids", type => 'int32array',
desc => "The list of channels contained in the image",
array => { name => "num_channels",
desc => "The number of channels contained in the image" } }
{ name => 'channel_ids', type => 'int32array',
desc => 'The list of channels contained in the image',
array => { name => 'num_channels',
desc => 'The number of channels contained in the image' } }
);
%invoke = (
@ -467,10 +469,10 @@ HELP
);
@outargs = (
{ name => "vector_ids", type => 'int32array',
desc => "The list of vectors contained in the image",
array => { name => "num_vectors",
desc => "The number of vectors contained in the image" } }
{ name => 'vector_ids', type => 'int32array',
desc => 'The list of vectors contained in the image',
array => { name => 'num_vectors',
desc => 'The number of vectors contained in the image' } }
);
%invoke = (
@ -1328,7 +1330,7 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'colormap', type => 'int8array', wrap => 1,
desc => "The new colormap values",
desc => 'The new colormap values',
array => { name => 'num_bytes', type => '0 <= int32 <= 768',
desc => 'Number of bytes in the colormap array:
%%desc%%' } }

View File

@ -89,7 +89,15 @@ HELP
);
%invoke = (
code => 'success = (layer_copy = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (layer), G_TYPE_FROM_INSTANCE (layer), add_alpha))) != NULL;'
code => <<'CODE'
{
layer_copy = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (layer),
G_TYPE_FROM_INSTANCE (layer),
add_alpha));
if (! layer_copy)
success = FALSE;
}
CODE
);
}
@ -124,7 +132,12 @@ HELP
%invoke = (
code => <<'CODE'
success = (mask = gimp_layer_create_mask (layer, (GimpAddMaskType) mask_type)) != NULL;
{
mask = gimp_layer_create_mask (layer, (GimpAddMaskType) mask_type);
if (! mask)
success = FALSE;
}
CODE
);
}
@ -283,7 +296,8 @@ HELP
desc => 'The layer to resize' }
);
%invoke = ( code => <<'CODE' );
%invoke = (
code => <<'CODE'
{
success = gimp_item_is_attached (GIMP_ITEM (layer));
@ -291,6 +305,7 @@ HELP
gimp_layer_resize_to_image (layer, context);
}
CODE
);
}
sub layer_translate {
@ -315,7 +330,8 @@ HELP
desc => "Offset in y direction" }
);
%invoke = ( code => <<'CODE');
%invoke = (
code => <<'CODE'
{
GimpImage *gimage = gimp_item_get_image (GIMP_ITEM (layer));
@ -330,6 +346,7 @@ HELP
gimp_image_undo_group_end (gimage);
}
CODE
);
}
sub layer_add_alpha {
@ -352,7 +369,8 @@ HELP
desc => 'The layer' }
);
%invoke = ( code => <<'CODE'
%invoke = (
code => <<'CODE'
{
gimp_layer_add_alpha (layer);
}

View File

@ -28,7 +28,7 @@ HELP
&yosh_pdb_misc('1998');
@inargs = (
{ name => 'message', type => 'string', const => 1,
{ name => 'message', type => 'string',
desc => 'Message to display in the dialog' }
);

View File

@ -17,10 +17,6 @@
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
# Tools
# shortcuts
sub stroke_arg () {
{ name => 'strokes', type => 'floatarray',
desc => 'Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ...,

View File

@ -214,7 +214,7 @@ HELP
@outargs = (
{ name => 'num_colors', type => 'int32', void_ret => '1',
desc => "The number of colors in the palette" }
desc => 'The number of colors in the palette' }
);
%invoke = (

View File

@ -29,9 +29,8 @@ sub palettes_popup {
made' },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the palette popup window' },
{ name => 'initial_palette', type => 'string',
desc => 'The name of the palette to set as the first selected',
null_ok => 1 },
{ name => 'initial_palette', type => 'string', null_ok => 1,
desc => 'The name of the palette to set as the first selected' }
);
%invoke = (

View File

@ -28,8 +28,12 @@ HELP
&adrian_pdb_misc('1998');
%invoke = (
code => 'gimp_data_factory_data_refresh (gimp->palette_factory);'
)
code => <<'CODE'
{
gimp_data_factory_data_refresh (gimp->palette_factory);
}
CODE
);
}
sub palettes_get_list {
@ -56,7 +60,12 @@ HELP
%invoke = (
headers => [ qw("core/gimpcontainer-filter.h") ],
code => 'palette_list = gimp_container_get_filtered_name_array (gimp->palette_factory->container, filter, &num_palettes);'
code => <<'CODE'
{
palette_list = gimp_container_get_filtered_name_array (gimp->palette_factory->container,
filter, &num_palettes);
}
CODE
);
}
@ -91,9 +100,8 @@ sub palettes_get_palette_entry {
&std_pdb_deprecated ('gimp-palette-entry-get-color');
@inargs = (
{ name => 'name', type => 'string',
desc => 'The palette name ("" means currently active palette)',
null_ok => '1' },
{ name => 'name', type => 'string', null_ok => 1,
desc => 'The palette name ("" means currently active palette)' },
{ name => 'entry_num', type => 'int32',
desc => 'The entry to retrieve' }
);
@ -108,7 +116,7 @@ sub palettes_get_palette_entry {
);
%invoke = (
code => <<"CODE"
code => <<'CODE'
{
GimpPalette *palette;

View File

@ -19,10 +19,7 @@
sub path_list {
$blurb = 'List the paths associated with the passed image.';
$help = <<'HELP';
List the paths associated with the passed image.
HELP
$help = 'List the paths associated with the passed image.';
&andy_pdb_misc('1999');
@ -37,16 +34,17 @@ HELP
);
%invoke = (
code => 'path_list = gimp_container_get_name_array (gimage->vectors, &num_paths);'
code => <<'CODE'
{
path_list = gimp_container_get_name_array (gimage->vectors, &num_paths);
}
CODE
);
}
sub path_get_points {
$blurb = 'List the points associated with the named path.';
$help = <<'HELP';
List the points associated with the named path.
HELP
$help = 'List the points associated with the named path.';
&andy_pdb_misc('1999');
@ -123,14 +121,13 @@ CODE
sub path_get_current {
$blurb = 'The name of the current path. Error if no paths.';
$help = <<'HELP';
The name of the current path. Error if no paths.
HELP
$help = 'The name of the current path. Error if no paths.';
&andy_pdb_misc('1999');
@inargs = ( &std_image_arg );
@inargs = (
&std_image_arg
);
$inargs[0]->{desc} = 'The ID of the image to get the current path from.';
@outargs = (
@ -154,10 +151,7 @@ CODE
sub path_set_current {
$blurb = 'Sets the current path associated with the passed image.';
$help = <<'HELP';
Sets a named path as the current path.
HELP
$help = 'Sets a named path as the current path.';
&andy_pdb_misc('1999');
@ -184,10 +178,7 @@ CODE
sub path_set_points {
$blurb = 'Set the points associated with the named path.';
$help = <<'HELP';
Set the points associated with the named path.
HELP
$help = 'Set the points associated with the named path.';
&andy_pdb_misc('1999');
@ -275,14 +266,13 @@ CODE
sub path_stroke_current {
$blurb = 'Stroke the current path in the passed image.';
$help = <<'HELP';
Stroke the current path in the passed image.
HELP
$help = 'Stroke the current path in the passed image.';
&andy_pdb_misc('1999');
@inargs = ( &std_image_arg );
@inargs = (
&std_image_arg
);
$inargs[0]->{desc} = 'The ID of the image which contains the path to
stroke.';
@ -469,7 +459,6 @@ CODE
);
}
sub get_path_by_tattoo {
$blurb = 'Return the name of the path with the given tattoo.';
@ -509,10 +498,7 @@ CODE
sub path_delete {
$blurb = 'Delete the named path associated with the passed image.';
$help = <<'HELP';
Delete the named path.
HELP
$help = 'Delete the named path.';
&andy_pdb_misc('1999');
@ -609,10 +595,7 @@ CODE
sub path_get_visible {
$blurb = 'Get the visibility of the named path.';
$help = <<'HELP';
This procedure returns the visibility of the specified path.
HELP
$help = 'This procedure returns the visibility of the specified path.';
&andy_pdb_misc('1999');
@ -643,10 +626,7 @@ CODE
sub path_set_visible {
$blurb = 'Sets the visibility of the named path.';
$help = <<'HELP';
This procedure sets the specified path's visibility.
HELP
$help = "This procedure sets the specified path's visibility.";
&neo_pdb_misc('2005', '2.4');
@ -740,7 +720,11 @@ HELP
%invoke = (
headers => [ qw("vectors/gimpvectors-import.h") ],
code => 'success = gimp_vectors_import_file (gimage, filename, merge, scale, -1, NULL);'
code => <<'CODE'
{
success = gimp_vectors_import_file (gimage, filename, merge, scale, -1, NULL);
}
CODE
);
}
@ -760,7 +744,8 @@ HELP
{ name => 'string', type => 'string', no_validate => 1,
desc => 'A string that must be a complete and valid SVG document.' },
{ name => 'length', type => 'int32',
desc => 'Number of bytes in string or -1 if the string is NULL terminated.' },
desc => 'Number of bytes in string or -1 if the string is NULL
terminated.' },
{ name => 'merge', type => 'boolean',
desc => 'Merge paths into a single vectors object.' },
{ name => 'scale', type => 'boolean',
@ -769,7 +754,12 @@ HELP
%invoke = (
headers => [ qw("vectors/gimpvectors-import.h") ],
code => 'success = gimp_vectors_import_buffer (gimage, string, length, merge, scale, -1, NULL);'
code => <<'CODE'
{
success = gimp_vectors_import_buffer (gimage, string, length,
merge, scale, -1, NULL);
}
CODE
);
}

View File

@ -29,9 +29,8 @@ sub patterns_popup {
made' },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the pattern popup window' },
{ name => 'initial_pattern', type => 'string',
desc => 'The name of the pattern to set as the first selected',
null_ok => 1 }
{ name => 'initial_pattern', type => 'string', null_ok => 1,
desc => 'The name of the pattern to set as the first selected' }
);
%invoke = (

View File

@ -28,8 +28,12 @@ HELP
&mitch_pdb_misc('2002');
%invoke = (
code => 'gimp_data_factory_data_refresh (gimp->pattern_factory);'
)
code => <<'CODE'
{
gimp_data_factory_data_refresh (gimp->pattern_factory);
}
CODE
);
}
sub patterns_get_list {
@ -56,7 +60,12 @@ HELP
%invoke = (
headers => [ qw("core/gimpcontainer-filter.h") ],
code => 'pattern_list = gimp_container_get_filtered_name_array (gimp->pattern_factory->container, filter, &num_patterns);'
code => <<'CODE'
{
pattern_list = gimp_container_get_filtered_name_array (gimp->pattern_factory->container,
filter, &num_patterns);
}
CODE
);
}
@ -73,7 +82,7 @@ sub patterns_get_pattern {
);
%invoke = (
code =><<'CODE'
code => <<'CODE'
{
GimpPattern *pattern = gimp_context_get_pattern (context);
@ -94,9 +103,8 @@ sub patterns_get_pattern_data {
&std_pdb_deprecated ('gimp-pattern-get-pixels');
@inargs = (
{ name => 'name', type => 'string',
desc => 'The pattern name ("" means currently active pattern)',
null_ok => '1' }
{ name => 'name', type => 'string', null_ok => 1,
desc => 'The pattern name ("" means currently active pattern)' }
);
@outargs = (

View File

@ -19,15 +19,13 @@
sub plugins_query {
$blurb = 'Queries the plugin database for its contents.';
$help = 'This procedure queries the contents of the plugin database.';
&andy_pdb_misc('1998');
@inargs = (
{ name => 'search_string', type => 'string',
desc => 'If not an empty string then use this as a search pattern',
no_success => 1 }
{ name => 'search_string', type => 'string', no_success => 1,
desc => 'If not an empty string then use this as a search pattern' }
);
@outargs = (
@ -92,14 +90,13 @@ HELP
@inargs = (
{ name => 'domain_name', type => 'string',
desc => 'The name of the textdomain (must be unique)' },
{ name => 'domain_path', type => 'string',
{ name => 'domain_path', type => 'string', no_success => 1,
desc => 'The absolute path to the compiled message catalog (may be
NULL)',
no_success => 1 },
NULL)' }
);
%invoke = (
code => <<'CODE',
code => <<'CODE'
{
if (gimp->current_plug_in && gimp->current_plug_in->query)
{
@ -134,7 +131,7 @@ HELP
);
%invoke = (
code => <<'CODE',
code => <<'CODE'
{
if (gimp->current_plug_in && gimp->current_plug_in->query)
{
@ -167,7 +164,7 @@ HELP
);
%invoke = (
code => <<'CODE',
code => <<'CODE'
{
if (gimp->current_plug_in)
{
@ -203,7 +200,7 @@ HELP
);
%invoke = (
code => <<'CODE',
code => <<'CODE'
{
if (gimp->current_plug_in)
{
@ -240,13 +237,14 @@ HELP
{ name => 'icon_type', type => 'enum GimpIconType',
desc => 'The type of the icon' },
{ name => 'icon_data', type => 'int8array',
desc => "The procedure's icon. The format depends on the 'icon_type' parameter",
desc => "The procedure's icon. The format depends on the
'icon_type' parameter",
array => { name => 'icon_data_length', type => '0 < int32',
desc => "The length of 'icon_data': %%desc%%" } }
);
%invoke = (
code => <<'CODE',
code => <<'CODE'
{
if (gimp->current_plug_in && gimp->current_plug_in->query)
{

View File

@ -49,13 +49,6 @@ sub font_prop_args {
@result;
}
sub extents_outargs {
foreach (qw(width height ascent descent)) {
push @outargs, { name => $_, type => 'int32',
desc => "The $_ of the specified font" }
}
}
sub text_fontname {
$blurb = <<'BLURB';
Add text at the specified location as a floating selection or a new layer.
@ -134,8 +127,16 @@ HELP
desc => 'The name of the font' }
);
&extents_outargs;
$outargs[0]->{void_ret} = 1;
@outargs = (
{ name => 'width', type => 'int32', void_ret => 1,
desc => 'The width of the specified font' },
{ name => 'height', type => 'int32',
desc => 'The height of the specified font' },
{ name => 'ascent', type => 'int32',
desc => 'The ascent of the specified font' },
{ name => 'descent', type => 'int32',
desc => 'The descent of the specified font' }
);
%invoke = (
code => <<'CODE'
@ -199,8 +200,16 @@ sub text_get_extents {
&font_prop_args
);
&extents_outargs;
$outargs[0]->{void_ret} = 1;
@outargs = (
{ name => 'width', type => 'int32', void_ret => 1,
desc => 'The width of the specified font' },
{ name => 'height', type => 'int32',
desc => 'The height of the specified font' },
{ name => 'ascent', type => 'int32',
desc => 'The ascent of the specified font' },
{ name => 'descent', type => 'int32',
desc => 'The descent of the specified font' }
);
%invoke = (
code => <<'CODE'