moved the gtk_set_locale call to after it's been inited

* app/main.c: moved the gtk_set_locale call to after it's
been inited

* app/paint_core.h: set skip for ToolFlags

* app/procedural_db.h: don't skip PDB_TEMPORARY in PDBProcType

* libgimp/Makefile.am: don't install stdplugins-intl.h, that's
only for disted plugins

* libgimp/gimpenums.h: is now autogenned

* libgimp/gimpfeatures.h.in: #define for new enums

* libgimp/gimpintl.h: #include <locale.h>

* libgimp/stdplugins-intl.h: add include guards

* plug-ins/AlienMap2/Makefile.am: add INTLLIBS

* plug-ins/gflare/Makefile.am: removed unused libgimpui

* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-server.c: use stdplugins-intl.h

* plug-ins/sel2path/Makefile.am: removed unused libgck.la

* tools/pdbgen/Makefile.am: removed script-fu.pl, added enumcode.pl

* tools/pdbgen/lib.pl
* tools/pdbgen/enumcode.pl: enumcode.pl now autogenned gimpenums.h
as well as the script-fu stuff

-Yosh
This commit is contained in:
Manish Singh 1999-09-25 01:59:43 +00:00
parent 24ed8bc505
commit d02f3bce77
24 changed files with 691 additions and 282 deletions

View File

@ -1,3 +1,39 @@
Fri Sep 24 18:36:14 PDT 1999 Manish Singh <yosh@gimp.org>
* app/main.c: moved the gtk_set_locale call to after it's
been inited
* app/paint_core.h: set skip for ToolFlags
* app/procedural_db.h: don't skip PDB_TEMPORARY in PDBProcType
* libgimp/Makefile.am: don't install stdplugins-intl.h, that's
only for disted plugins
* libgimp/gimpenums.h: is now autogenned
* libgimp/gimpfeatures.h.in: #define for new enums
* libgimp/gimpintl.h: #include <locale.h>
* libgimp/stdplugins-intl.h: add include guards
* plug-ins/AlienMap2/Makefile.am: add INTLLIBS
* plug-ins/gflare/Makefile.am: removed unused libgimpui
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-server.c: use stdplugins-intl.h
* plug-ins/sel2path/Makefile.am: removed unused libgck.la
* tools/pdbgen/Makefile.am: removed script-fu.pl, added enumcode.pl
* tools/pdbgen/lib.pl
* tools/pdbgen/enumcode.pl: enumcode.pl now autogenned gimpenums.h
as well as the script-fu stuff
Sat Sep 25 01:21:03 MEST 1999 Sven Neumann <sven@gimp.org>
* app/eraser.c: reenabled the line-preview for the eraser tool

View File

@ -118,13 +118,10 @@ main (int argc, char **argv)
/* Initialize variables */
prog_name = argv[0];
/* Initialize i18n support */
INIT_LOCALE("gimp");
gtk_init (&argc, &argv);
setlocale(LC_NUMERIC, "C"); /* gtk seems to zap this during init.. */
/* Initialize i18n support */
INIT_LOCALE("gimp");
#ifdef HAVE_PUTENV
display_name = gdk_get_display ();

View File

@ -31,7 +31,7 @@
#define RESUME_PAINT 3
#define FINISH_PAINT 4
typedef enum
typedef enum /*< skip >*/
{
TOOL_CAN_HANDLE_CHANGING_BRUSH = 0x0001 /* Set for tools that don't mind
* if the brush changes while

View File

@ -66,7 +66,7 @@ typedef enum /*< chop=PDB_ >*/
PDB_INTERNAL,
PDB_PLUGIN,
PDB_EXTENSION,
PDB_TEMPORARY /*< skip >*/
PDB_TEMPORARY
} PDBProcType;

View File

@ -524,7 +524,7 @@ static ProcArg procedural_db_proc_info_outargs[] =
{
PDB_INT32,
"proc_type",
"The procedure type: { INTERNAL (0), PLUGIN (1), EXTENSION (2) }"
"The procedure type: { INTERNAL (0), PLUGIN (1), EXTENSION (2), TEMPORARY (3) }"
},
{
PDB_INT32,

View File

@ -31,7 +31,7 @@
#define RESUME_PAINT 3
#define FINISH_PAINT 4
typedef enum
typedef enum /*< skip >*/
{
TOOL_CAN_HANDLE_CHANGING_BRUSH = 0x0001 /* Set for tools that don't mind
* if the brush changes while

View File

@ -63,34 +63,35 @@ endif
@:
libgimp_la_SOURCES = \
gimp.c \
gimpchannel.c \
gimpdisplay.c \
gimpdrawable.c \
gimpenv.c \
gimpgradient.c \
gimpimage.c \
gimplayer.c \
gimpmatrix.c \
gimpmatrix.h \
gimppalette.c \
gimpparasite.c \
gimppixelrgn.c \
gimpprotocol.c \
gimpprotocol.h \
gimptile.c \
gimpunit.c \
gimpunit.h \
gimpwire.c \
gimpwire.h \
gserialize.c \
gserialize.h \
parasite.c \
parasite.h \
parasiteF.h \
parasiteP.h \
parasiteio.c \
parasiteio.h
gimp.c \
gimpchannel.c \
gimpdisplay.c \
gimpdrawable.c \
gimpenv.c \
gimpgradient.c \
gimpimage.c \
gimplayer.c \
gimpmatrix.c \
gimpmatrix.h \
gimppalette.c \
gimpparasite.c \
gimppixelrgn.c \
gimpprotocol.c \
gimpprotocol.h \
gimptile.c \
gimpunit.c \
gimpunit.h \
gimpwire.c \
gimpwire.h \
gserialize.c \
gserialize.h \
parasite.c \
parasite.h \
parasiteF.h \
parasiteP.h \
parasiteio.c \
parasiteio.h \
stdplugins-intl.h
libgimpui_la_SOURCES = \
gimpmenu.c \
@ -127,8 +128,7 @@ gimpinclude_HEADERS = \
parasite.h \
parasiteF.h \
parasiteP.h \
parasiteio.h \
stdplugins-intl.h
parasiteio.h
libgimp_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \

View File

@ -1,129 +1,423 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
/* NOTE: This file is autogenerated by enumcode.pl */
#ifndef __GIMP_ENUMS_H__
#define __GIMP_ENUMS_H__
typedef enum
{
RGB = 0,
GRAY = 1,
INDEXED = 2
} GImageType;
GIMP_WHITE_MASK,
GIMP_BLACK_MASK,
GIMP_ALPHA_MASK
} GimpAddMaskType;
typedef enum
{
ORIENTATION_HORIZONTAL = 0,
ORIENTATION_VERTICAL = 1,
ORIENTATION_UNKNOWN = 2
} GOrientation;
GIMP_FG_BG_RGB,
GIMP_FG_BG_HSV,
GIMP_FG_TRANS,
GIMP_CUSTOM
} GimpBlendMode;
typedef enum
{
RGB_IMAGE = 0,
RGBA_IMAGE = 1,
GRAY_IMAGE = 2,
GRAYA_IMAGE = 3,
INDEXED_IMAGE = 4,
INDEXEDA_IMAGE = 5
} GDrawableType;
GIMP_HARD,
GIMP_SOFT,
GIMP_PRESSURE
} GimpBrushApplicationMode;
typedef enum
{
NORMAL_MODE = 0,
DISSOLVE_MODE = 1,
MULTIPLY_MODE = 3,
SCREEN_MODE = 4,
OVERLAY_MODE = 5,
DIFFERENCE_MODE = 6,
ADDITION_MODE = 7,
SUBTRACT_MODE = 8,
DARKEN_ONLY_MODE = 9,
LIGHTEN_ONLY_MODE = 10,
HUE_MODE = 11,
SATURATION_MODE = 12,
COLOR_MODE = 13,
VALUE_MODE = 14,
DIVIDE_MODE = 15
} GLayerMode;
GIMP_FG_BUCKET_FILL,
GIMP_BG_BUCKET_FILL,
GIMP_PATTERN_BUCKET_FILL
} GimpBucketFillMode;
typedef enum
{
FG_IMAGE_FILL,
BG_IMAGE_FILL,
WHITE_IMAGE_FILL,
TRANS_IMAGE_FILL,
NO_IMAGE_FILL
} GFillType;
GIMP_VALUE_LUT,
GIMP_RED_LUT,
GIMP_GREEN_LUT,
GIMP_BLUE_LUT,
GIMP_ALPHA_LUT
} GimpChannelLutType;
typedef enum
{
PARAM_INT32,
PARAM_INT16,
PARAM_INT8,
PARAM_FLOAT,
PARAM_STRING,
PARAM_INT32ARRAY,
PARAM_INT16ARRAY,
PARAM_INT8ARRAY,
PARAM_FLOATARRAY,
PARAM_STRINGARRAY,
PARAM_COLOR,
PARAM_REGION,
PARAM_DISPLAY,
PARAM_IMAGE,
PARAM_LAYER,
PARAM_CHANNEL,
PARAM_DRAWABLE,
PARAM_SELECTION,
PARAM_BOUNDARY,
PARAM_PATH,
PARAM_PARASITE,
PARAM_STATUS,
PARAM_END
} GParamType;
GIMP_OFFSET_BACKGROUND,
GIMP_OFFSET_TRANSPARENT
} GimpChannelOffsetType;
typedef enum
{
PROC_PLUG_IN = 1,
PROC_EXTENSION = 2,
PROC_TEMPORARY = 3
} GProcedureType;
/* This enum is mirrored in "app/plug_in.c", make sure
* they are identical or bad things will happen.
*/
typedef enum
{
RUN_INTERACTIVE = 0x0,
RUN_NONINTERACTIVE = 0x1,
RUN_WITH_LAST_VALS = 0x2
} GRunModeType;
GIMP_ADD,
GIMP_SUB,
GIMP_REPLACE,
GIMP_INTERSECT
} GimpChannelOps;
typedef enum
{
STATUS_EXECUTION_ERROR,
STATUS_CALLING_ERROR,
STATUS_PASS_THROUGH,
STATUS_SUCCESS
} GStatusType;
GIMP_RED_CHANNEL,
GIMP_GREEN_CHANNEL,
GIMP_BLUE_CHANNEL,
GIMP_GRAY_CHANNEL,
GIMP_INDEXED_CHANNEL,
GIMP_AUXILLARY_CHANNEL
} GimpChannelType;
typedef enum
{
GIMP_IMAGE_CLONE,
GIMP_PATTERN_CLONE
} GimpCloneType;
typedef enum
{
GIMP_NO_DITHER,
GIMP_FS_DITHER,
GIMP_FSLOWBLEED_DITHER,
GIMP_FIXED_DITHER,
GIMP_NODESTRUCT_DITHER
} GimpConvertDitherType;
typedef enum
{
GIMP_MAKE_PALETTE,
GIMP_REUSE_PALETTE,
GIMP_WEB_PALETTE,
GIMP_MONO_PALETTE,
GIMP_CUSTOM_PALETTE
} GimpConvertPaletteType;
typedef enum
{
GIMP_NORMAL_CONVOL,
GIMP_ABSOLUTE_CONVOL,
GIMP_NEGATIVE_CONVOL
} GimpConvolutionType;
typedef enum
{
GIMP_BLUR_CONVOLVE,
GIMP_SHARPEN_CONVOLVE,
GIMP_CUSTOM_CONVOLVE
} GimpConvolveType;
typedef enum
{
GIMP_DODGEBURN_HIGHLIGHTS,
GIMP_DODGEBURN_MIDTONES,
GIMP_DODGEBURN_SHADOWS
} GimpDodgeBurnMode;
typedef enum
{
GIMP_DODGE,
GIMP_BURN
} GimpDodgeBurnType;
typedef enum
{
GIMP_FG_IMAGE_FILL,
GIMP_BG_IMAGE_FILL,
GIMP_WHITE_IMAGE_FILL,
GIMP_TRANS_IMAGE_FILL,
GIMP_NO_IMAGE_FILL
} GimpFillType;
typedef enum
{
GIMP_RGB,
GIMP_GRAY,
GIMP_INDEXED
} GimpImageBaseType;
typedef enum
{
GIMP_RGB_IMAGE,
GIMP_RGBA_IMAGE,
GIMP_GRAY_IMAGE,
GIMP_GRAYA_IMAGE,
GIMP_INDEXED_IMAGE,
GIMP_INDEXEDA_IMAGE
} GimpImageType;
typedef enum
{
GIMP_ONCE_FORWARD,
GIMP_ONCE_BACKWARDS,
GIMP_LOOP_SAWTOOTH,
GIMP_LOOP_TRIANGLE,
GIMP_ONCE_END_COLOR
} GimpGradientPaintMode;
typedef enum
{
GIMP_LINEAR,
GIMP_BILINEAR,
GIMP_RADIAL,
GIMP_SQUARE,
GIMP_CONICAL_SYMMETRIC,
GIMP_CONICAL_ASYMMETRIC,
GIMP_SHAPEBURST_ANGULAR,
GIMP_SHAPEBURST_SPHERICAL,
GIMP_SHAPEBURST_DIMPLED,
GIMP_SPIRAL_CLOCKWISE,
GIMP_SPIRAL_ANTICLOCKWISE
} GimpGradientType;
typedef enum
{
GIMP_ALL_HUES,
GIMP_RED_HUES,
GIMP_YELLOW_HUES,
GIMP_GREEN_HUES,
GIMP_CYAN_HUES,
GIMP_BLUE_HUES,
GIMP_MAGENTA_HUES
} GimpHueRange;
typedef enum
{
GIMP_LINEAR_INTERPOLATION,
GIMP_CUBIC_INTERPOLATION,
GIMP_NEAREST_NEIGHBOR_INTERPOLATION
} GimpInterpolationType;
typedef enum
{
GIMP_NORMAL_MODE,
GIMP_DISSOLVE_MODE,
GIMP_BEHIND_MODE,
GIMP_MULTIPLY_MODE,
GIMP_SCREEN_MODE,
GIMP_OVERLAY_MODE,
GIMP_DIFFERENCE_MODE,
GIMP_ADDITION_MODE,
GIMP_SUBTRACT_MODE,
GIMP_DARKEN_ONLY_MODE,
GIMP_LIGHTEN_ONLY_MODE,
GIMP_HUE_MODE,
GIMP_SATURATION_MODE,
GIMP_COLOR_MODE,
GIMP_VALUE_MODE,
GIMP_DIVIDE_MODE
} GimpLayerModeEffects;
typedef enum
{
GIMP_APPLY,
GIMP_DISCARD
} GimpMaskApplyMode;
typedef enum
{
GIMP_EXPAND_AS_NECESSARY,
GIMP_CLIP_TO_IMAGE,
GIMP_CLIP_TO_BOTTOM_LAYER,
GIMP_FLATTEN_IMAGE
} GimpMergeType;
typedef enum
{
GIMP_MESSAGE_BOX,
GIMP_CONSOLE,
GIMP_ERROR_CONSOLE
} GimpMessageHandlerType;
typedef enum
{
GIMP_HORIZONTAL,
GIMP_VERTICAL,
GIMP_UNKNOWN
} GimpOrientationType;
typedef enum
{
GIMP_PDB_INT32,
GIMP_PDB_INT16,
GIMP_PDB_INT8,
GIMP_PDB_FLOAT,
GIMP_PDB_STRING,
GIMP_PDB_INT32ARRAY,
GIMP_PDB_INT16ARRAY,
GIMP_PDB_INT8ARRAY,
GIMP_PDB_FLOATARRAY,
GIMP_PDB_STRINGARRAY,
GIMP_PDB_COLOR,
GIMP_PDB_REGION,
GIMP_PDB_DISPLAY,
GIMP_PDB_IMAGE,
GIMP_PDB_LAYER,
GIMP_PDB_CHANNEL,
GIMP_PDB_DRAWABLE,
GIMP_PDB_SELECTION,
GIMP_PDB_BOUNDARY,
GIMP_PDB_PATH,
GIMP_PDB_PARASITE,
GIMP_PDB_STATUS,
GIMP_PDB_END
} GimpPDBArgType;
typedef enum
{
GIMP_INTERNAL,
GIMP_PLUGIN,
GIMP_EXTENSION,
GIMP_TEMPORARY
} GimpPDBProcType;
typedef enum
{
GIMP_PDB_EXECUTION_ERROR,
GIMP_PDB_CALLING_ERROR,
GIMP_PDB_PASS_THROUGH,
GIMP_PDB_SUCCESS
} GimpPDBStatusType;
typedef enum
{
GIMP_CONTINUOUS,
GIMP_INCREMENTAL
} GimpPaintApplicationMode;
typedef enum
{
GIMP_REPEAT_NONE,
GIMP_REPEAT_SAWTOOTH,
GIMP_REPEAT_TRIANGULAR
} GimpRepeatMode;
typedef enum
{
GIMP_RUN_INTERACTIVE,
GIMP_RUN_NONINTERACTIVE,
GIMP_RUN_WITH_LAST_VALS
} GimpRunModeType;
typedef enum
{
GIMP_PIXELS,
GIMP_POINTS
} GimpSizeType;
typedef enum
{
GIMP_SHADOWS,
GIMP_MIDTONES,
GIMP_HIGHLIGHTS
} GimpTransferMode;
/* This is for backwards compatibility. Don't use these for new plug-ins. */
#ifndef GIMP_DISABLE_COMPAT_CRUFT
typedef GimpFillType GFillType;
typedef GimpImageBaseType GImageType;
typedef GimpImageType GDrawableType;
typedef GimpLayerModeEffects GLayerMode;
typedef GimpRunModeType GRunModeType;
typedef GimpOrientationType GOrientation;
typedef GimpPDBArgType GParamType;
typedef GimpPDBProcType GProcedureType;
typedef GimpPDBStatusType GStatusType;
#define PARAM_INT32 GIMP_PDB_INT32
#define PARAM_INT16 GIMP_PDB_INT16
#define PARAM_INT8 GIMP_PDB_INT8
#define PARAM_FLOAT GIMP_PDB_FLOAT
#define PARAM_STRING GIMP_PDB_STRING
#define PARAM_INT32ARRAY GIMP_PDB_INT32ARRAY
#define PARAM_INT16ARRAY GIMP_PDB_INT16ARRAY
#define PARAM_INT8ARRAY GIMP_PDB_INT8ARRAY
#define PARAM_FLOATARRAY GIMP_PDB_FLOATARRAY
#define PARAM_STRINGARRAY GIMP_PDB_STRINGARRAY
#define PARAM_COLOR GIMP_PDB_COLOR
#define PARAM_REGION GIMP_PDB_REGION
#define PARAM_DISPLAY GIMP_PDB_DISPLAY
#define PARAM_IMAGE GIMP_PDB_IMAGE
#define PARAM_LAYER GIMP_PDB_LAYER
#define PARAM_CHANNEL GIMP_PDB_CHANNEL
#define PARAM_DRAWABLE GIMP_PDB_DRAWABLE
#define PARAM_SELECTION GIMP_PDB_SELECTION
#define PARAM_BOUNDARY GIMP_PDB_BOUNDARY
#define PARAM_PATH GIMP_PDB_PATH
#define PARAM_PARASITE GIMP_PDB_PARASITE
#define PARAM_STATUS GIMP_PDB_STATUS
#define PARAM_END GIMP_PDB_END
#define STATUS_EXECUTION_ERROR GIMP_PDB_EXECUTION_ERROR
#define STATUS_CALLING_ERROR GIMP_PDB_CALLING_ERROR
#define STATUS_PASS_THROUGH GIMP_PDB_PASS_THROUGH
#define STATUS_SUCCESS GIMP_PDB_SUCCESS
#define PROC_INTERNAL GIMP_INTERNAL
#define PROC_PLUG_IN GIMP_PLUGIN
#define PROC_EXTENSION GIMP_EXTENSION
#define PROC_TEMPORARY GIMP_TEMPORARY
#define ORIENTATION_HORIZONTAL GIMP_HORIZONTAL
#define ORIENTATION_VERTICAL GIMP_VERTICAL
#define ORIENTATION_UNKNOWN GIMP_UNKNOWN
#define FG_IMAGE_FILL GIMP_FG_IMAGE_FILL
#define BG_IMAGE_FILL GIMP_BG_IMAGE_FILL
#define WHITE_IMAGE_FILL GIMP_WHITE_IMAGE_FILL
#define TRANS_IMAGE_FILL GIMP_TRANS_IMAGE_FILL
#define NO_IMAGE_FILL GIMP_NO_IMAGE_FILL
#define RGB GIMP_RGB
#define GRAY GIMP_GRAY
#define INDEXED GIMP_INDEXED
#define RGB_IMAGE GIMP_RGB_IMAGE
#define RGBA_IMAGE GIMP_RGBA_IMAGE
#define GRAY_IMAGE GIMP_GRAY_IMAGE
#define GRAYA_IMAGE GIMP_GRAYA_IMAGE
#define INDEXED_IMAGE GIMP_INDEXED_IMAGE
#define INDEXEDA_IMAGE GIMP_INDEXEDA_IMAGE
#define NORMAL_MODE GIMP_NORMAL_MODE
#define DISSOLVE_MODE GIMP_DISSOLVE_MODE
#define BEHIND_MODE GIMP_BEHIND_MODE
#define MULTIPLY_MODE GIMP_MULTIPLY_MODE
#define SCREEN_MODE GIMP_SCREEN_MODE
#define OVERLAY_MODE GIMP_OVERLAY_MODE
#define DIFFERENCE_MODE GIMP_DIFFERENCE_MODE
#define ADDITION_MODE GIMP_ADDITION_MODE
#define SUBTRACT_MODE GIMP_SUBTRACT_MODE
#define DARKEN_ONLY_MODE GIMP_DARKEN_ONLY_MODE
#define LIGHTEN_ONLY_MODE GIMP_LIGHTEN_ONLY_MODE
#define HUE_MODE GIMP_HUE_MODE
#define SATURATION_MODE GIMP_SATURATION_MODE
#define COLOR_MODE GIMP_COLOR_MODE
#define VALUE_MODE GIMP_VALUE_MODE
#define DIVIDE_MODE GIMP_DIVIDE_MODE
#define RUN_INTERACTIVE GIMP_RUN_INTERACTIVE
#define RUN_NONINTERACTIVE GIMP_RUN_NONINTERACTIVE
#define RUN_WITH_LAST_VALS GIMP_RUN_WITH_LAST_VALS
#endif /* GIMP_DISABLE_COMPAT_CRUFT */
#endif /* __GIMP_ENUMS_H__ */

View File

@ -45,6 +45,8 @@ extern "C" {
#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5
#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5
#define GIMP_HAVE_NEW_ENUMS 1-1-10
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -1,6 +1,8 @@
#ifndef __GIMPINTL_H__
#define __GIMPINTL_H__
#include <locale.h>
/* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com> *
* Heavily modified by Daniel Egger <Daniel.Egger@t-online.de> *
* So be sure to hit me instead of him if something is wrong here */
@ -31,9 +33,10 @@
# define N_(String) (String)
#endif
#define INIT_LOCALE( domain ) \
# define INIT_LOCALE( domain ) \
gtk_set_locale (); \
setlocale (LC_NUMERIC, "C"); \
bindtextdomain (domain, LOCALEDIR); \
textdomain (domain);
#endif
textdomain (domain);
#endif /* __GIMPINTL_H__ */

View File

@ -1,6 +1,10 @@
#include "libgimp/gimpintl.h"
#ifndef __STDPLUGINS-INTL_H__
#define __STDPLUGINS-INTL_H__
#include <locale.h>
#include "libgimp/gimpintl.h"
#ifdef HAVE_LC_MESSAGES
#define INIT_I18N() \
setlocale(LC_MESSAGES, ""); \
@ -11,7 +15,10 @@
bindtextdomain("gimp-std-plugins", LOCALEDIR); \
textdomain("gimp-std-plugins")
#endif
#define INIT_I18N_UI() \
gtk_set_locale(); \
setlocale (LC_NUMERIC, "C"); \
INIT_I18N();
#endif /* __STDPLUGINS-INTL_H__ */

View File

@ -45,6 +45,8 @@ extern "C" {
#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5
#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5
#define GIMP_HAVE_NEW_ENUMS 1-1-10
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -15,7 +15,8 @@ INCLUDES = \
LDADD = \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS)
$(GTK_LIBS) \
$(INTLLIBS)
DEPS = \
$(top_builddir)/libgimp/libgimp.la

View File

@ -19,7 +19,6 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS) \
$(INTLLIBS)

View File

@ -35,7 +35,8 @@
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
#include "libgimp/gimpintl.h"
#include "libgimp/stdplugins-intl.h"
#include "siod.h"
#include "script-fu-console.h"
@ -179,8 +180,6 @@ script_fu_console_interface ()
gchar **argv;
gint argc;
INIT_LOCALE("script-fu")
argc = 1;
argv = g_new (gchar *, 1);
argv[0] = g_strdup ("script-fu");
@ -188,6 +187,8 @@ script_fu_console_interface ()
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());
INIT_I18N_UI();
dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), _("Script-Fu Console"));
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by script-fu.pl. */
/* NOTE: This file is autogenerated by enumcode.pl. */
#include "siod.h"
@ -219,8 +219,6 @@ init_generated_constants (void)
setvar (cintern ("PIXELS"), flocons (0), NIL);
setvar (cintern ("POINTS"), flocons (1), NIL);
setvar (cintern ("TOOL-CAN-HANDLE-CHANGING-BRUSH"), flocons (0x0001), NIL);
setvar (cintern ("SHADOWS"), flocons (0), NIL);
setvar (cintern ("MIDTONES"), flocons (1), NIL);
setvar (cintern ("HIGHLIGHTS"), flocons (2), NIL);

View File

@ -35,7 +35,8 @@
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
#include "libgimp/gimpfileselection.h"
#include "libgimp/gimpintl.h"
#include "libgimp/stdplugins-intl.h"
#include "siod.h"
#include "script-fu-scripts.h"
@ -1107,10 +1108,10 @@ script_fu_interface (SFScript *script)
argv = g_new (gchar *, 1);
argv[0] = g_strdup ("script-fu");
INIT_LOCALE("script-fu")
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());
INIT_I18N_UI();
gdk_set_use_xshm (gimp_use_xshm ());

View File

@ -35,7 +35,8 @@
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
#include "libgimp/gimpfileselection.h"
#include "libgimp/gimpintl.h"
#include "libgimp/stdplugins-intl.h"
#include "siod.h"
#include "script-fu-scripts.h"
@ -1107,10 +1108,10 @@ script_fu_interface (SFScript *script)
argv = g_new (gchar *, 1);
argv[0] = g_strdup ("script-fu");
INIT_LOCALE("script-fu")
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());
INIT_I18N_UI();
gdk_set_use_xshm (gimp_use_xshm ());

View File

@ -37,7 +37,9 @@
#endif /* HAVE_SYS_SELECT_H */
#include "libgimp/gimp.h"
#include "libgimp/gimpintl.h"
#include "libgimp/stdplugins-intl.h"
#include "gtk/gtk.h"
#include "siod.h"
#include "script-fu-server.h"
@ -538,13 +540,13 @@ server_interface ()
argc = 1;
argv = g_new (gchar *, 1);
INIT_LOCALE("script-fu")
argv[0] = g_strdup ("script-fu");
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());
INIT_I18N_UI();
dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), _("Script-Fu Server Options"));
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);

View File

@ -39,7 +39,6 @@ AM_CPPFLAGS = \
LDADD = \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/plug-ins/libgck/gck/libgck.la \
$(GTK_LIBS) \
$(INTLLIBS)

192
tools/pdbgen/enumcode.pl Executable file
View File

@ -0,0 +1,192 @@
#!/usr/bin/perl -w
# The GIMP -- an image manipulation program
# Copyright (C) 1999 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.
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/script-fu/script-fu-constants.c$FILE_EXT";
open ENUMFILE, "> $enumfile" or die "Can't open $enumfile: $!\n";
print ENUMFILE <<'GPL';
/* The GIMP -- an image manipulation program
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by enumcode.pl. */
GPL
print ENUMFILE <<CODE;
#include "siod.h"
void
init_generated_constants (void)
{
CODE
foreach (sort keys %enums) {
my $enum = $enums{$_};
foreach $symbol (@{$enum->{symbols}}) {
my $sym = $symbol;
$sym = $enum->{nicks}->{$sym} if exists $enum->{nicks}->{$sym};
$sym =~ s/_/-/g;
print ENUMFILE <<CODE;
setvar (cintern ("$sym"), flocons ($enum->{mapping}->{$symbol}), NIL);
CODE
}
print ENUMFILE "\n";
}
print ENUMFILE " return;\n}\n";
close ENUMFILE;
&write_file($enumfile);
$enumfile = "$destdir/libgimp/gimpenums.h$FILE_EXT";
open ENUMFILE, "> $enumfile" or die "Can't open $enumfile: $!\n";
print ENUMFILE <<'LGPL';
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by enumcode.pl */
LGPL
my $guard = "__GIMP_ENUMS_H__";
print ENUMFILE <<HEADER;
#ifndef $guard
#define $guard
HEADER
foreach (sort keys %enums) {
print ENUMFILE "typedef enum\n{\n";
my $enum = $enums{$_}; my $body = "";
foreach $symbol (@{$enum->{symbols}}) {
my $sym = $symbol;
$sym = $enum->{nicks}->{$sym} if exists $enum->{nicks}->{$sym};
$body .= " GIMP_$sym";
$body .= " = $enum->{mapping}->{$symbol}" if !$enum->{contig};
$body .= ",\n";
}
$body =~ s/,\n$//s;
$body .= "\n} ";
$body .= "Gimp" if !/^Gimp/;
$body .= "$_;\n\n";
print ENUMFILE $body
}
# Sigh - this is full of backwards compat hacks. We'll clean this up for 1.3
print ENUMFILE <<'CRUFT';
/* This is for backwards compatibility. Don't use these for new plug-ins. */
#ifndef GIMP_DISABLE_COMPAT_CRUFT
typedef GimpFillType GFillType;
typedef GimpImageBaseType GImageType;
typedef GimpImageType GDrawableType;
typedef GimpLayerModeEffects GLayerMode;
typedef GimpRunModeType GRunModeType;
typedef GimpOrientationType GOrientation;
typedef GimpPDBArgType GParamType;
typedef GimpPDBProcType GProcedureType;
typedef GimpPDBStatusType GStatusType;
CRUFT
@xforms = (
{ enum => 'PDBArgType', xform => [ qw(s/PDB/PARAM/) ] },
{ enum => 'PDBStatusType', xform => [ qw(s/PDB/STATUS/) ] },
{ enum => 'PDBProcType', xform => [ qw(s/^/PROC_/ s/PLUGIN/PLUG_IN/) ] },
{ enum => 'OrientationType', xform => [ qw(s/^/ORIENTATION_/) ] },
{ enum => 'GimpFillType', xform => [] },
{ enum => 'GimpImageBaseType', xform => [] },
{ enum => 'GimpImageType', xform => [] },
{ enum => 'LayerModeEffects', xform => [] },
{ enum => 'RunModeType', xform => [] },
);
foreach $xform (@xforms) {
my $enum = $enums{$xform->{enum}};
foreach (@{$enum->{symbols}}) {
my $symbol = $_;
$symbol = $enum->{nicks}->{$symbol} if exists $enum->{nicks}->{$symbol};
my $sym = $symbol;
foreach $xform (@{$xform->{xform}}) { eval "\$sym =~ $xform" }
$symbol = "GIMP_$symbol";
print ENUMFILE "#define $sym $symbol\n";
}
print ENUMFILE "\n";
}
print ENUMFILE <<HEADER;
#endif /* GIMP_DISABLE_COMPAT_CRUFT */
#endif /* $guard */
HEADER
close ENUMFILE;
&write_file($enumfile);

View File

@ -336,12 +336,6 @@ package Gimp::CodeGen::enums;
BLUE_LUT => '3',
ALPHA_LUT => '4' }
},
ToolFlags =>
{ contig => 0,
header => 'paint_core.h',
symbols => [ qw(TOOL_CAN_HANDLE_CHANGING_BRUSH) ],
mapping => { TOOL_CAN_HANDLE_CHANGING_BRUSH => '0x0001' }
},
RunModeType =>
{ contig => 1,
header => 'plug_in.h',
@ -398,13 +392,16 @@ package Gimp::CodeGen::enums;
PDBProcType =>
{ contig => 1,
header => 'procedural_db.h',
symbols => [ qw(PDB_INTERNAL PDB_PLUGIN PDB_EXTENSION) ],
symbols => [ qw(PDB_INTERNAL PDB_PLUGIN PDB_EXTENSION
PDB_TEMPORARY) ],
mapping => { PDB_INTERNAL => '0',
PDB_PLUGIN => '1',
PDB_EXTENSION => '2' },
PDB_EXTENSION => '2',
PDB_TEMPORARY => '3' },
nicks => { PDB_INTERNAL => 'INTERNAL',
PDB_PLUGIN => 'PLUGIN',
PDB_EXTENSION => 'EXTENSION' }
PDB_EXTENSION => 'EXTENSION',
PDB_TEMPORARY => 'TEMPORARY' }
},
SizeType =>
{ contig => 1,

View File

@ -435,41 +435,4 @@ HEADER
close CFILE;
&write_file($cfile);
}
my $hfile = "$destdir/gimpenums.h$FILE_EXT";
open HFILE, "> $hfile" or die "Can't open $hfile: $!\n";
print HFILE $lgpl;
my $guard = "__GIMP_ENUMS_H__";
print HFILE <<HEADER;
#ifndef $guard
#define $guard
HEADER
foreach (sort keys %enums) {
print HFILE "typedef enum\n{\n";
my $enum = $enums{$_}; my $body = "";
foreach $symbol (@{$enum->{symbols}}) {
my $sym = $symbol;
$sym = $enum->{nicks}->{$sym} if exists $enum->{nicks}->{$sym};
$body .= " $sym";
$body .= " = $enum->{mapping}->{$symbol}" if !$enum->{contig};
$body .= ",\n";
}
$body =~ s/,\n$//s;
$body .= "\n} ";
$body .= "Gimp" if !/^Gimp/;
$body .= "$_;\n\n";
print HFILE $body
}
print HFILE <<HEADER;
#endif /* $guard */
HEADER
close HFILE;
&write_file($hfile);
}

View File

@ -1,86 +0,0 @@
#!/usr/bin/perl -w
# The GIMP -- an image manipulation program
# Copyright (C) 1999 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.
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 $constfile = "$destdir/script-fu-constants.c$FILE_EXT";
open CONSTFILE, "> $constfile" or die "Can't open $constfile: $!\n";
print CONSTFILE <<'GPL';
/* The GIMP -- an image manipulation program
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by script-fu.pl. */
GPL
print CONSTFILE <<CODE;
#include "siod.h"
void
init_generated_constants (void)
{
CODE
foreach (sort keys %enums) {
my $enum = $enums{$_};
foreach $symbol (@{$enum->{symbols}}) {
my $sym = $symbol;
$sym = $enum->{nicks}->{$sym} if exists $enum->{nicks}->{$sym};
$sym =~ s/_/-/g;
print CONSTFILE <<CODE;
setvar (cintern ("$sym"), flocons ($enum->{mapping}->{$symbol}), NIL);
CODE
}
print CONSTFILE "\n";
}
print CONSTFILE " return;\n}\n";
close CONSTFILE;
&write_file($constfile);