2002-03-17 Manish Singh <yosh@gimp.org>
* tools/pdbgen/app.pl
* tools/pdbgen/enumcode-py.pl
* tools/pdbgen/enumcode.pl
* tools/pdbgen/enumgen.pl: removed enum nick support, best to keep
internal and external names consistent
* app/core/core-enums.h: remove chops from enums. Change TRANS to
TRANSPARENT in GimpBlendMode
* app/core/core-types.h: remove chops and nicks from enums. Change INV
to INVERSE and SUB to SUBTRACT to make things more clear
* app/core/gimpchannel.c
* app/gui/channels-commands.c
* app/gui/vectors-commands.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimprectselecttool.c
* app/tools/gimpselectiontool.c
* app/tools/selection_options.c
* app/tools/tools-types.h
* app/widgets/gimpchannellistview.c
* app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change
* app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change
* app/core/gimplayer.c
* app/gui/layers-commands.c: reflect INV -> INVERSE change
* app/paint/paint-types.h: remove nick from PaintApplicationMode
* app/tools/gimperasertool.c: fix tooltip
* app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for
gettext
* libgimp/gimpcompat.h: compatibility enums here, since we removed
the nicks
* tools/pdbgen/enums.pl
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c
* app/core/core-enums.c
* app/pdb/channel_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated, enum changes
* plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL
* plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL
* plug-ins/script-fu/siod-wrapper.c: compat constant definitions
98 lines
3 KiB
Perl
Executable file
98 lines
3 KiB
Perl
Executable file
#!/usr/bin/perl -w
|
|
|
|
# The GIMP -- an image manipulation program
|
|
# Copyright (C) 1999-2000 Manish Singh <yosh@gimp.org>
|
|
|
|
# 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 WITHOUTFILE 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.
|
|
|
|
# This file would be included in enumcode.pl, but plug-ins/pygimp isn't
|
|
# currently in the distribution, so keep it seperate for now.
|
|
|
|
BEGIN {
|
|
$srcdir = $ENV{srcdir} || '.';
|
|
$destdir = $ENV{destdir} || '.';
|
|
}
|
|
|
|
use lib $srcdir;
|
|
|
|
require 'enums.pl';
|
|
require 'util.pl';
|
|
|
|
*enums = \%Gimp::CodeGen::enums::enums;
|
|
|
|
*write_file = \&Gimp::CodeGen::util::write_file;
|
|
*FILE_EXT = \$Gimp::CodeGen::util::FILE_EXT;
|
|
|
|
my $enumfile = "$destdir/plug-ins/pygimp/gimpenums.py$FILE_EXT";
|
|
open ENUMFILE, "> $enumfile" or die "Can't open $enumfile: $!\n";
|
|
|
|
print ENUMFILE <<'GPL';
|
|
# Gimp-Python - allows the writing of Gimp plugins in Python.
|
|
# Copyright (C) 1997 James Henstridge <james@daa.com.au>
|
|
#
|
|
# 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.
|
|
|
|
# gimpenums.py -- constants for use with the gimp module
|
|
#
|
|
# this file contains constants that are useful for use in
|
|
# gimp plugins. Just add 'from gimpenums import *' to the top
|
|
# of the script
|
|
|
|
# NOTE: This file is autogenerated by enumcode-py.pl.
|
|
|
|
GPL
|
|
|
|
print ENUMFILE <<'CODE';
|
|
TRUE = 1
|
|
FALSE = 0
|
|
CODE
|
|
|
|
foreach (sort keys %enums) {
|
|
my $enum = $enums{$_}; my $body = ""; my $i=0;
|
|
$body .= "\n# ";
|
|
$body .= "Gimp" if !/^Gimp/;
|
|
$body .= "$_\n";
|
|
foreach $symbol (@{$enum->{symbols}}) {
|
|
my $sym = $symbol;
|
|
# Maybe Python has nice enough namespace handling that we don't
|
|
# need to prefix all constants with GIMP_
|
|
$body .= "$sym";
|
|
if (!$enum->{contig}) {
|
|
$i = $enum->{mapping}->{$symbol};
|
|
}
|
|
|
|
$body .= " = $i\n";
|
|
|
|
$i++ if($enum->{contig});
|
|
}
|
|
print ENUMFILE $body;
|
|
}
|
|
|
|
print ENUMFILE "\n";
|
|
|
|
close ENUMFILE;
|
|
&write_file($enumfile);
|