gimp/plug-ins/pygimp/gimpenums.py

314 lines
5.8 KiB
Python
Raw Normal View History

# Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997-2003 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.
# TRUE and FALSE constants ...
import __builtin__
if not hasattr(__builtin__, 'True'):
__builtin__.True = (1 == 1)
__builtin__.False = (1 != 1)
del __builtin__
FALSE = False
TRUE = True
# GimpAddMaskType
ADD_WHITE_MASK = 0
ADD_BLACK_MASK = 1
ADD_ALPHA_MASK = 2
ADD_ALPHA_TRANSFER_MASK = 3
ADD_SELECTION_MASK = 4
ADD_COPY_MASK = 5
# GimpBlendMode
FG_BG_RGB_MODE = 0
FG_BG_HSV_MODE = 1
2002-08-29 11:01:30 +08:00
FG_TRANSPARENT_MODE = 2
CUSTOM_MODE = 3
# GimpBrushApplicationMode
2002-08-29 11:01:30 +08:00
BRUSH_HARD = 0
BRUSH_SOFT = 1
# GimpBucketFillMode
FG_BUCKET_FILL = 0
BG_BUCKET_FILL = 1
PATTERN_BUCKET_FILL = 2
# GimpChannelOps
CHANNEL_OP_ADD = 0
CHANNEL_OP_SUBTRACT = 1
CHANNEL_OP_REPLACE = 2
2002-08-29 11:01:30 +08:00
CHANNEL_OP_INTERSECT = 3
# GimpChannelType
RED_CHANNEL = 0
GREEN_CHANNEL = 1
BLUE_CHANNEL = 2
GRAY_CHANNEL = 3
INDEXED_CHANNEL = 4
ALPHA_CHANNEL = 5
# GimpCloneType
IMAGE_CLONE = 0
PATTERN_CLONE = 1
# GimpConvertDitherType
NO_DITHER = 0
FS_DITHER = 1
FSLOWBLEED_DITHER = 2
FIXED_DITHER = 3
# GimpConvertPaletteType
MAKE_PALETTE = 0
REUSE_PALETTE = 1
WEB_PALETTE = 2
MONO_PALETTE = 3
CUSTOM_PALETTE = 4
# GimpConvolutionType
NORMAL_CONVOL = 0
ABSOLUTE_CONVOL = 1
NEGATIVE_CONVOL = 2
# GimpConvolveType
BLUR_CONVOLVE = 0
SHARPEN_CONVOLVE = 1
# GimpDodgeBurnType
DODGE = 0
BURN = 1
# GimpFillType
FOREGROUND_FILL = 0
BACKGROUND_FILL = 1
WHITE_FILL = 2
2002-08-29 11:01:30 +08:00
TRANSPARENT_FILL = 3
Enabled skipping enum values for either the PDB or GType registration 2004-01-06 Michael Natterer <mitch@gimp.org> Enabled skipping enum values for either the PDB or GType registration (don't always skip both targets): * tools/gimp-mkenums: skip enum values only if there is a literal "skip" (don't match "pdb-skip"). * tools/pdbgen/enumgen.pl: skip only "pdb-skip" values, not "skip" ones. * app/base/base-enums.h * app/core/core-enums.h * app/paint/paint-enums.h * libgimpbase/gimpbaseenums.h: use the right "pdb-skip"/"skip" combination to skip enum values. Changed comments accordingly. Cleaned up the fill functions: * app/core/core-enums.[ch]: added GIMP_PATTERN_FILL enum value to the GimpFillType enum. Don't export GIMP_NO_FILL to the PDB because it's completely useless to export a NOP. * app/core/gimp-edit.c (gimp_edit_fill, gimp_edit_fill_internal): handle pattern fill requests. * app/core/gimpdrawable.[ch] (gimp_drawable_fill): added GimpPattern parameter and fill with it if it's non-NULL. (gimp_drawable_fill_by_type): handle pattern fill and pass the current pattern to gimp_drawable_fill(). * app/text/gimptextlayer.c: changed accordingly. * app/gui/edit-commands.c * app/gui/image-menu.c: use gimp_edit_fill() instead of gimp_drawable_bucket_fill() for FG, BG and pattern filling. * libgimp/gimpcompat.h * plug-ins/script-fu/siod-wrapper.c: removed NO_IMAGE_FILL compat enum value. It should have never been exported to the PDB. * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * libgimp/gimpenums.h * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated.
2004-01-06 22:02:08 +08:00
PATTERN_FILL = 4
app/core/core-enums.h app/core/gimpgradient.[ch] app/pdb/Makefile.am 2004-05-31 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h * app/core/gimpgradient.[ch] * app/pdb/Makefile.am * app/widgets/gimpgradienteditor.c * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/gradient_edit.pdb: applied a patch from Shlomi Fish that adds lots of gradient edit functions to gimpgradient.[ch] and makes them available through the PDB. Fixes bug #129675 and bug #129678. Did some cleanups / enhancments to the patch: * app/core/gimpgradient.[ch]: changed the naming scheme of the new functions and changed old functions to match the new scheme. Introduce a "freeze_count" and public freeze()/thaw() API which enables subsequent gradient changes without "dirty" being emitted all the time. Added GimpGradient parameters to all functions which modify the gradient. * app/widgets/gimpgradienteditor.c: use the new freeze/thaw stuff to keep the gradient from updating when not in "Instant Update" mode. * app/actions/gradient-editor-commands.c: removed all gradient editing code and call the new core functions. * libgimp/Makefile.am * tools/pdbgen/pdb/gradient_edit.pdb: changed the namespace of all added functions. Generate libgimp wrappers for them.. * app/pdb/gradient_edit_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpenums.h * libgimp/gimpgradientedit_pdb.[ch] * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: (re)generated.
2004-05-31 06:04:16 +08:00
# GimpGradientSegmentColor
GRADIENT_SEGMENT_RGB = 0
GRADIENT_SEGMENT_HSV_CCW = 1
GRADIENT_SEGMENT_HSV_CW = 2
app/core/core-enums.h app/core/gimpgradient.[ch] app/pdb/Makefile.am 2004-05-31 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h * app/core/gimpgradient.[ch] * app/pdb/Makefile.am * app/widgets/gimpgradienteditor.c * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/gradient_edit.pdb: applied a patch from Shlomi Fish that adds lots of gradient edit functions to gimpgradient.[ch] and makes them available through the PDB. Fixes bug #129675 and bug #129678. Did some cleanups / enhancments to the patch: * app/core/gimpgradient.[ch]: changed the naming scheme of the new functions and changed old functions to match the new scheme. Introduce a "freeze_count" and public freeze()/thaw() API which enables subsequent gradient changes without "dirty" being emitted all the time. Added GimpGradient parameters to all functions which modify the gradient. * app/widgets/gimpgradienteditor.c: use the new freeze/thaw stuff to keep the gradient from updating when not in "Instant Update" mode. * app/actions/gradient-editor-commands.c: removed all gradient editing code and call the new core functions. * libgimp/Makefile.am * tools/pdbgen/pdb/gradient_edit.pdb: changed the namespace of all added functions. Generate libgimp wrappers for them.. * app/pdb/gradient_edit_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpenums.h * libgimp/gimpgradientedit_pdb.[ch] * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: (re)generated.
2004-05-31 06:04:16 +08:00
# GimpGradientSegmentType
GRADIENT_SEGMENT_LINEAR = 0
GRADIENT_SEGMENT_CURVED = 1
GRADIENT_SEGMENT_SINE = 2
GRADIENT_SEGMENT_SPHERE_INCREASING = 3
GRADIENT_SEGMENT_SPHERE_DECREASING = 4
app/core/core-enums.h app/core/gimpgradient.[ch] app/pdb/Makefile.am 2004-05-31 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h * app/core/gimpgradient.[ch] * app/pdb/Makefile.am * app/widgets/gimpgradienteditor.c * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/gradient_edit.pdb: applied a patch from Shlomi Fish that adds lots of gradient edit functions to gimpgradient.[ch] and makes them available through the PDB. Fixes bug #129675 and bug #129678. Did some cleanups / enhancments to the patch: * app/core/gimpgradient.[ch]: changed the naming scheme of the new functions and changed old functions to match the new scheme. Introduce a "freeze_count" and public freeze()/thaw() API which enables subsequent gradient changes without "dirty" being emitted all the time. Added GimpGradient parameters to all functions which modify the gradient. * app/widgets/gimpgradienteditor.c: use the new freeze/thaw stuff to keep the gradient from updating when not in "Instant Update" mode. * app/actions/gradient-editor-commands.c: removed all gradient editing code and call the new core functions. * libgimp/Makefile.am * tools/pdbgen/pdb/gradient_edit.pdb: changed the namespace of all added functions. Generate libgimp wrappers for them.. * app/pdb/gradient_edit_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpenums.h * libgimp/gimpgradientedit_pdb.[ch] * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: (re)generated.
2004-05-31 06:04:16 +08:00
# GimpGradientType
GRADIENT_LINEAR = 0
GRADIENT_BILINEAR = 1
GRADIENT_RADIAL = 2
GRADIENT_SQUARE = 3
GRADIENT_CONICAL_SYMMETRIC = 4
GRADIENT_CONICAL_ASYMMETRIC = 5
GRADIENT_SHAPEBURST_ANGULAR = 6
GRADIENT_SHAPEBURST_SPHERICAL = 7
GRADIENT_SHAPEBURST_DIMPLED = 8
GRADIENT_SPIRAL_CLOCKWISE = 9
GRADIENT_SPIRAL_ANTICLOCKWISE = 10
# GimpHistogramChannel
HISTOGRAM_VALUE = 0
HISTOGRAM_RED = 1
HISTOGRAM_GREEN = 2
HISTOGRAM_BLUE = 3
HISTOGRAM_ALPHA = 4
# GimpHueRange
ALL_HUES = 0
RED_HUES = 1
YELLOW_HUES = 2
GREEN_HUES = 3
CYAN_HUES = 4
BLUE_HUES = 5
MAGENTA_HUES = 6
Allow plug-ins to register menu icons. Fixes bug #120500. 2004-05-18 Michael Natterer <mitch@gimp.org> Allow plug-ins to register menu icons. Fixes bug #120500. * app/core/core-enums.[ch]: added enum GimpIconType which can be one of { STOCK_ID, IMAGE_FILE, INLINE_PIXBUF }. * app/config/gimpconfigwriter.[ch] (gimp_config_writer_data) * app/config/gimpscanner.[ch] (gimp_scanner_parse_data): new functions which write/parse raw binary data. Needed for storing inline pixbufs in pluginrc. * app/config/gimpconfigwriter.[ch] (gimp_config_writer_identifier): new function which writes out an unquoted and unescaped string. * app/plug-in/plug-in-proc.[ch] (struct PlugInProcDef): added new members "icon_type", "icon_data_length" and "icon_data". Reordered members so file_proc specific stuff is at the end. (plug_in_proc_def_get_stock_id) (plug_in_proc_def_get_pixbuf): new functions to access the procedure's icon. * app/plug-in/plug-in-rc.c: save/restore the registered icons. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c: set the action's stock ID from the procedure's stock ID. * app/widgets/gimppluginaction.c (gimp_plug_in_action_connect_proxy): if the procedure provides a pixbuf, set it as icon for the menu item. * app/menus/file-dialog-menu.[ch] * app/menus/file-open-menu.c * app/menus/file-save-menu.c * app/xcf/xcf.c: changed accordingly. * tools/pdbgen/pdb/plug_in.pdb (plugin_icon_register): new PDB function which can be called during query(). * tools/pdbgen/enums.pl * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpenums.h * libgimp/gimpplugin_pdb.c * libgimp/gimpplugin_pdb.h * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c: regenerated. * plug-ins/common/plugindetails.c * plug-ins/common/uniteditor.c * plug-ins/print/print.c: register stock_id icons. * plug-ins/common/screenshot.c: register an inline_pixbuf icon for testing purposes (used emblem-camera.png from gnome-icon-theme). * app/actions/dialogs-actions.c * app/actions/file-actions.c: unrelated: added some more icons to menu items.
2004-05-19 05:19:43 +08:00
# GimpIconType
ICON_TYPE_STOCK_ID = 0
ICON_TYPE_INLINE_PIXBUF = 1
ICON_TYPE_IMAGE_FILE = 2
2002-08-29 11:01:30 +08:00
# GimpImageBaseType
RGB = 0
GRAY = 1
2002-08-29 11:01:30 +08:00
INDEXED = 2
# GimpImageType
RGB_IMAGE = 0
RGBA_IMAGE = 1
GRAY_IMAGE = 2
GRAYA_IMAGE = 3
INDEXED_IMAGE = 4
2002-08-29 11:01:30 +08:00
INDEXEDA_IMAGE = 5
# GimpInterpolationType
INTERPOLATION_NONE = 0
INTERPOLATION_LINEAR = 1
INTERPOLATION_CUBIC = 2
INTERPOLATION_LANCZOS = 3
# GimpLayerModeEffects
NORMAL_MODE = 0
DISSOLVE_MODE = 1
BEHIND_MODE = 2
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
DODGE_MODE = 16
BURN_MODE = 17
HARDLIGHT_MODE = 18
SOFTLIGHT_MODE = 19
GRAIN_EXTRACT_MODE = 20
GRAIN_MERGE_MODE = 21
COLOR_ERASE_MODE = 22
# GimpMaskApplyMode
MASK_APPLY = 0
2002-08-29 11:01:30 +08:00
MASK_DISCARD = 1
# GimpMergeType
EXPAND_AS_NECESSARY = 0
CLIP_TO_IMAGE = 1
CLIP_TO_BOTTOM_LAYER = 2
FLATTEN_IMAGE = 3
# GimpMessageHandlerType
MESSAGE_BOX = 0
CONSOLE = 1
ERROR_CONSOLE = 2
2002-08-29 11:01:30 +08:00
# GimpOffsetType
OFFSET_BACKGROUND = 0
2002-08-29 11:01:30 +08:00
OFFSET_TRANSPARENT = 1
# GimpOrientationType
ORIENTATION_HORIZONTAL = 0
ORIENTATION_VERTICAL = 1
ORIENTATION_UNKNOWN = 2
# GimpPDBArgType
PDB_INT32 = 0
PDB_INT16 = 1
PDB_INT8 = 2
PDB_FLOAT = 3
PDB_STRING = 4
PDB_INT32ARRAY = 5
PDB_INT16ARRAY = 6
PDB_INT8ARRAY = 7
PDB_FLOATARRAY = 8
PDB_STRINGARRAY = 9
PDB_COLOR = 10
PDB_REGION = 11
PDB_DISPLAY = 12
PDB_IMAGE = 13
PDB_LAYER = 14
PDB_CHANNEL = 15
PDB_DRAWABLE = 16
PDB_SELECTION = 17
PDB_BOUNDARY = 18
PDB_PATH = 19
PDB_PARASITE = 20
PDB_STATUS = 21
PDB_END = 22
# GimpPDBProcType
INTERNAL = 0
PLUGIN = 1
EXTENSION = 2
TEMPORARY = 3
# GimpPDBStatusType
PDB_EXECUTION_ERROR = 0
PDB_CALLING_ERROR = 1
PDB_PASS_THROUGH = 2
PDB_SUCCESS = 3
PDB_CANCEL = 4
# GimpPaintApplicationMode
PAINT_CONSTANT = 0
2002-08-29 11:01:30 +08:00
PAINT_INCREMENTAL = 1
# GimpProgressCommand
PROGRESS_COMMAND_START = 0
PROGRESS_COMMAND_END = 1
PROGRESS_COMMAND_SET_TEXT = 2
PROGRESS_COMMAND_SET_VALUE = 3
PROGRESS_COMMAND_PULSE = 4
# GimpRepeatMode
REPEAT_NONE = 0
REPEAT_SAWTOOTH = 1
REPEAT_TRIANGULAR = 2
# GimpRotationType
ROTATE_90 = 0
ROTATE_180 = 1
ROTATE_270 = 2
# GimpRunMode
RUN_INTERACTIVE = 0
RUN_NONINTERACTIVE = 1
RUN_WITH_LAST_VALS = 2
# GimpSizeType
PIXELS = 0
POINTS = 1
# GimpStackTraceMode
STACK_TRACE_NEVER = 0
STACK_TRACE_QUERY = 1
STACK_TRACE_ALWAYS = 2
# GimpTransferMode
SHADOWS = 0
MIDTONES = 1
HIGHLIGHTS = 2
# GimpTransformDirection
TRANSFORM_FORWARD = 0
TRANSFORM_BACKWARD = 1
# GimpUnit
UNIT_PIXEL = 0
UNIT_INCH = 1
UNIT_MM = 2
UNIT_POINT = 3
UNIT_PICA = 4
UNIT_END = 5