gimp/app/core/core-enums.h

733 lines
29 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
app/core/Makefile.am new file that holds enums that are registered with 2001-12-08 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/core-enums.h: new file that holds enums that are registered with the type system and is used to generate core-enums.c. * app/core/core-types.h: include core-enums.h * app/base/base-types.h: namespace cleanup. Prefix all enumeration types with Gimp and their values with GIMP. Moved GimpLayerModeEffects enum ... * app/base/base-enums.h: ... here. * app/image_map.c * app/base/temp-buf.c * app/core/gimpcontext.[ch] * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage.[ch] * app/core/gimplayer.[ch] * app/display/gimpdisplayshell-dnd.c * app/display/gimpdisplayshell-render.c * app/gui/brush-select.c * app/gui/layers-commands.c * app/gui/preferences-dialog.c * app/gui/toolbox.c * app/paint-funcs/paint-funcs.[ch] * app/tools/gimpconvolvetool.c * app/tools/gimperasertool.c * app/tools/gimpiscissorstool.c * app/tools/gimppainttool.[ch] * app/tools/gimptexttool.c * app/tools/paint_options.c * app/widgets/gimplayerlistview.c * app/widgets/gimpwidgets-constructors.[ch] * app/xcf/xcf-load.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: changed accordingly. * libgimpbase/gimpbasetypes.h: no need to chop GIMP prefix off the enums any longer. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/color_cmds.c * app/pdb/layer_cmds.c * app/pdb/message_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/gimprc.c: removed code to parse for "plug_in" keyword which was left over from some very early gimp days. * app/plug-in/plug-in.[ch]: removed now unused function plug_in_add().
2001-12-09 07:12:59 +08:00
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
app/core/Makefile.am new file that holds enums that are registered with 2001-12-08 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/core-enums.h: new file that holds enums that are registered with the type system and is used to generate core-enums.c. * app/core/core-types.h: include core-enums.h * app/base/base-types.h: namespace cleanup. Prefix all enumeration types with Gimp and their values with GIMP. Moved GimpLayerModeEffects enum ... * app/base/base-enums.h: ... here. * app/image_map.c * app/base/temp-buf.c * app/core/gimpcontext.[ch] * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage.[ch] * app/core/gimplayer.[ch] * app/display/gimpdisplayshell-dnd.c * app/display/gimpdisplayshell-render.c * app/gui/brush-select.c * app/gui/layers-commands.c * app/gui/preferences-dialog.c * app/gui/toolbox.c * app/paint-funcs/paint-funcs.[ch] * app/tools/gimpconvolvetool.c * app/tools/gimperasertool.c * app/tools/gimpiscissorstool.c * app/tools/gimppainttool.[ch] * app/tools/gimptexttool.c * app/tools/paint_options.c * app/widgets/gimplayerlistview.c * app/widgets/gimpwidgets-constructors.[ch] * app/xcf/xcf-load.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: changed accordingly. * libgimpbase/gimpbasetypes.h: no need to chop GIMP prefix off the enums any longer. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/color_cmds.c * app/pdb/layer_cmds.c * app/pdb/message_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/gimprc.c: removed code to parse for "plug_in" keyword which was left over from some very early gimp days. * app/plug-in/plug-in.[ch]: removed now unused function plug_in_add().
2001-12-09 07:12:59 +08:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
app/core/Makefile.am new file that holds enums that are registered with 2001-12-08 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/core-enums.h: new file that holds enums that are registered with the type system and is used to generate core-enums.c. * app/core/core-types.h: include core-enums.h * app/base/base-types.h: namespace cleanup. Prefix all enumeration types with Gimp and their values with GIMP. Moved GimpLayerModeEffects enum ... * app/base/base-enums.h: ... here. * app/image_map.c * app/base/temp-buf.c * app/core/gimpcontext.[ch] * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage.[ch] * app/core/gimplayer.[ch] * app/display/gimpdisplayshell-dnd.c * app/display/gimpdisplayshell-render.c * app/gui/brush-select.c * app/gui/layers-commands.c * app/gui/preferences-dialog.c * app/gui/toolbox.c * app/paint-funcs/paint-funcs.[ch] * app/tools/gimpconvolvetool.c * app/tools/gimperasertool.c * app/tools/gimpiscissorstool.c * app/tools/gimppainttool.[ch] * app/tools/gimptexttool.c * app/tools/paint_options.c * app/widgets/gimplayerlistview.c * app/widgets/gimpwidgets-constructors.[ch] * app/xcf/xcf-load.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: changed accordingly. * libgimpbase/gimpbasetypes.h: no need to chop GIMP prefix off the enums any longer. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/color_cmds.c * app/pdb/layer_cmds.c * app/pdb/message_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/gimprc.c: removed code to parse for "plug_in" keyword which was left over from some very early gimp days. * app/plug-in/plug-in.[ch]: removed now unused function plug_in_add().
2001-12-09 07:12:59 +08:00
* (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, see <https://www.gnu.org/licenses/>.
app/core/Makefile.am new file that holds enums that are registered with 2001-12-08 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/core-enums.h: new file that holds enums that are registered with the type system and is used to generate core-enums.c. * app/core/core-types.h: include core-enums.h * app/base/base-types.h: namespace cleanup. Prefix all enumeration types with Gimp and their values with GIMP. Moved GimpLayerModeEffects enum ... * app/base/base-enums.h: ... here. * app/image_map.c * app/base/temp-buf.c * app/core/gimpcontext.[ch] * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage.[ch] * app/core/gimplayer.[ch] * app/display/gimpdisplayshell-dnd.c * app/display/gimpdisplayshell-render.c * app/gui/brush-select.c * app/gui/layers-commands.c * app/gui/preferences-dialog.c * app/gui/toolbox.c * app/paint-funcs/paint-funcs.[ch] * app/tools/gimpconvolvetool.c * app/tools/gimperasertool.c * app/tools/gimpiscissorstool.c * app/tools/gimppainttool.[ch] * app/tools/gimptexttool.c * app/tools/paint_options.c * app/widgets/gimplayerlistview.c * app/widgets/gimpwidgets-constructors.[ch] * app/xcf/xcf-load.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: changed accordingly. * libgimpbase/gimpbasetypes.h: no need to chop GIMP prefix off the enums any longer. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/color_cmds.c * app/pdb/layer_cmds.c * app/pdb/message_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/gimprc.c: removed code to parse for "plug_in" keyword which was left over from some very early gimp days. * app/plug-in/plug-in.[ch]: removed now unused function plug_in_add().
2001-12-09 07:12:59 +08:00
*/
#ifndef __CORE_ENUMS_H__
#define __CORE_ENUMS_H__
#if 0
This file is parsed by two scripts, enumgen.pl in pdb,
and gimp-mkenums. All enums that are not marked with
2002-03-29 11:50:29 +08:00
/*< pdb-skip >*/ are exported to libgimp and the PDB. Enums that are
not marked with /*< skip >*/ are registered with the GType system.
If you want the enum to be skipped by both scripts, you have to use
/*< pdb-skip, skip >*/.
app/core/Makefile.am new file that holds enums that are registered with 2001-12-08 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/core-enums.h: new file that holds enums that are registered with the type system and is used to generate core-enums.c. * app/core/core-types.h: include core-enums.h * app/base/base-types.h: namespace cleanup. Prefix all enumeration types with Gimp and their values with GIMP. Moved GimpLayerModeEffects enum ... * app/base/base-enums.h: ... here. * app/image_map.c * app/base/temp-buf.c * app/core/gimpcontext.[ch] * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage.[ch] * app/core/gimplayer.[ch] * app/display/gimpdisplayshell-dnd.c * app/display/gimpdisplayshell-render.c * app/gui/brush-select.c * app/gui/layers-commands.c * app/gui/preferences-dialog.c * app/gui/toolbox.c * app/paint-funcs/paint-funcs.[ch] * app/tools/gimpconvolvetool.c * app/tools/gimperasertool.c * app/tools/gimpiscissorstool.c * app/tools/gimppainttool.[ch] * app/tools/gimptexttool.c * app/tools/paint_options.c * app/widgets/gimplayerlistview.c * app/widgets/gimpwidgets-constructors.[ch] * app/xcf/xcf-load.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: changed accordingly. * libgimpbase/gimpbasetypes.h: no need to chop GIMP prefix off the enums any longer. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/color_cmds.c * app/pdb/layer_cmds.c * app/pdb/message_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/gimprc.c: removed code to parse for "plug_in" keyword which was left over from some very early gimp days. * app/plug-in/plug-in.[ch]: removed now unused function plug_in_add().
2001-12-09 07:12:59 +08:00
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
The same syntax applies to enum values.
2002-03-29 11:50:29 +08:00
#endif
/*
Changed GimpViewable preview rendering to have a context to get 2006-08-29 Michael Natterer <mitch@gimp.org> Changed GimpViewable preview rendering to have a context to get FG/BG/whatever from. Use the context to enable dynamic FG/BG colors in gradients. Fixes bug #127676 and bug #352214. Addresses bug #128367 (doesn't fix it because there's no loading/saving and no GUI yet). * app/core/core-enums.[ch]: added enum GimpGradientColor to enable specifying gradient colors in terms of foreground and background. * app/core/gimpgradient.[ch]: added color_type members to the GimpGradientSegment struct and honor them in gimp_gradient_get_color_at(). Added GimpContext parameters to all functions which finally call get_color_at(). * app/core/gimp-gradients.c: use the new method to implement the builtin gradients. * app/core/gimpviewable.[ch]: added GimpContext parameters to all get_preview() and get_pixbuf() functions. * app/core/gimpbrush.c * app/core/gimpbuffer.c * app/core/gimpdrawable-preview.[ch] * app/core/gimpgradient.c * app/core/gimpimage-preview.[ch] * app/core/gimpimagefile.c * app/core/gimppalette.c * app/core/gimppattern.c * app/core/gimpundo.[ch] * app/text/gimpfont.c * app/vectors/gimpvectors-preview.[ch]: changed ::get_preview() and ::get_pixbuf() implementations accordingly. * app/core/gimpdrawable-blend.c * app/core/gimppalette-import.[ch] * app/dialogs/dialogs-constructors.c * app/dialogs/palette-import-dialog.c * app/dialogs/resize-dialog.c * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/display/gimpnavigationeditor.c * app/paint/gimppaintoptions.c * app/tools/gimpeditselectiontool.c * app/tools/gimptexttool.c * app/actions/gradient-editor-commands.c * app/widgets/gimpaction.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbufferview.c * app/widgets/gimpcellrendererviewable.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpclipboard.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerentry.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawabletreeview.c * app/widgets/gimpfiledialog.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpgradientselect.c * app/widgets/gimpitemtreeview.c * app/widgets/gimplayertreeview.c * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.c * app/widgets/gimpthumbbox.[ch] * app/widgets/gimptoolbox-image-area.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptooloptionseditor.c * app/widgets/gimpundoeditor.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpview-popup.[ch] * app/widgets/gimpview.[ch] * app/widgets/gimpviewablebutton.c * app/widgets/gimpviewabledialog.c * app/widgets/gimpviewrenderer.[ch] * app/widgets/gimpviewrenderer-frame.c * app/widgets/gimpviewrendererbrush.c * app/widgets/gimpviewrendererbuffer.c * app/widgets/gimpviewrendererdrawable.c * app/widgets/gimpviewrenderergradient.c * app/widgets/gimpviewrendererimage.c * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb: added tons of GimpContext members and parameters, implement GimpDocked::set_context() in many widgets. Pass these locally remembered contexts to GimpViewable functions. Did some minor cleanups on the way. There are still some minor FIXMEs around where the code uses a NULL context (which is allowed by the APIs) * app/pdb/drawable_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c: regenerated.
2006-08-30 05:44:51 +08:00
* these enums are registered with the type system
*/
app/core/Makefile.am new file that holds enums that are registered with 2001-12-08 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/core-enums.h: new file that holds enums that are registered with the type system and is used to generate core-enums.c. * app/core/core-types.h: include core-enums.h * app/base/base-types.h: namespace cleanup. Prefix all enumeration types with Gimp and their values with GIMP. Moved GimpLayerModeEffects enum ... * app/base/base-enums.h: ... here. * app/image_map.c * app/base/temp-buf.c * app/core/gimpcontext.[ch] * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage.[ch] * app/core/gimplayer.[ch] * app/display/gimpdisplayshell-dnd.c * app/display/gimpdisplayshell-render.c * app/gui/brush-select.c * app/gui/layers-commands.c * app/gui/preferences-dialog.c * app/gui/toolbox.c * app/paint-funcs/paint-funcs.[ch] * app/tools/gimpconvolvetool.c * app/tools/gimperasertool.c * app/tools/gimpiscissorstool.c * app/tools/gimppainttool.[ch] * app/tools/gimptexttool.c * app/tools/paint_options.c * app/widgets/gimplayerlistview.c * app/widgets/gimpwidgets-constructors.[ch] * app/xcf/xcf-load.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: changed accordingly. * libgimpbase/gimpbasetypes.h: no need to chop GIMP prefix off the enums any longer. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/color_cmds.c * app/pdb/layer_cmds.c * app/pdb/message_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/gimprc.c: removed code to parse for "plug_in" keyword which was left over from some very early gimp days. * app/plug-in/plug-in.[ch]: removed now unused function plug_in_add().
2001-12-09 07:12:59 +08:00
#define GIMP_TYPE_ALIGN_REFERENCE_TYPE (gimp_align_reference_type_get_type ())
GType gimp_align_reference_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_ALIGN_REFERENCE_FIRST, /*< desc="First item" >*/
GIMP_ALIGN_REFERENCE_IMAGE, /*< desc="Image" >*/
GIMP_ALIGN_REFERENCE_SELECTION, /*< desc="Selection" >*/
GIMP_ALIGN_REFERENCE_ACTIVE_LAYER, /*< desc="Active layer" >*/
GIMP_ALIGN_REFERENCE_ACTIVE_CHANNEL, /*< desc="Active channel" >*/
GIMP_ALIGN_REFERENCE_ACTIVE_PATH /*< desc="Active path" >*/
} GimpAlignReferenceType;
#define GIMP_TYPE_ALIGNMENT_TYPE (gimp_alignment_type_get_type ())
GType gimp_alignment_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_ALIGN_LEFT,
GIMP_ALIGN_HCENTER,
GIMP_ALIGN_RIGHT,
GIMP_ALIGN_TOP,
GIMP_ALIGN_VCENTER,
GIMP_ALIGN_BOTTOM,
GIMP_ARRANGE_LEFT,
GIMP_ARRANGE_HCENTER,
GIMP_ARRANGE_RIGHT,
GIMP_ARRANGE_TOP,
GIMP_ARRANGE_VCENTER,
GIMP_ARRANGE_BOTTOM,
GIMP_ARRANGE_HFILL,
GIMP_ARRANGE_VFILL
} GimpAlignmentType;
/**
* GimpBucketFillMode:
* @GIMP_BUCKET_FILL_FG: FG color fill
* @GIMP_BUCKET_FILL_BG: BG color fill
* @GIMP_BUCKET_FILL_PATTERN: Pattern fill
*
* Bucket fill modes.
*/
#define GIMP_TYPE_BUCKET_FILL_MODE (gimp_bucket_fill_mode_get_type ())
GType gimp_bucket_fill_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_BUCKET_FILL_FG, /*< desc="FG color fill" >*/
GIMP_BUCKET_FILL_BG, /*< desc="BG color fill" >*/
GIMP_BUCKET_FILL_PATTERN /*< desc="Pattern fill" >*/
} GimpBucketFillMode;
#define GIMP_TYPE_CHANNEL_BORDER_STYLE (gimp_channel_border_style_get_type ())
GType gimp_channel_border_style_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CHANNEL_BORDER_STYLE_HARD, /*< desc="Hard" >*/
GIMP_CHANNEL_BORDER_STYLE_SMOOTH, /*< desc="Smooth" >*/
GIMP_CHANNEL_BORDER_STYLE_FEATHERED /*< desc="Feathered" >*/
} GimpChannelBorderStyle;
/* Note: when appending values here, don't forget to update
* GimpColorFrame and other places use this enum to create combo
* boxes.
*/
#define GIMP_TYPE_COLOR_PICK_MODE (gimp_color_pick_mode_get_type ())
GType gimp_color_pick_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_COLOR_PICK_MODE_PIXEL, /*< desc="Pixel" >*/
GIMP_COLOR_PICK_MODE_RGB_PERCENT, /*< desc="RGB (%)" >*/
GIMP_COLOR_PICK_MODE_RGB_U8, /*< desc="RGB (0..255)" >*/
GIMP_COLOR_PICK_MODE_HSV, /*< desc="HSV" >*/
GIMP_COLOR_PICK_MODE_LCH, /*< desc="CIE LCh" >*/
GIMP_COLOR_PICK_MODE_LAB, /*< desc="CIE LAB" >*/
GIMP_COLOR_PICK_MODE_CMYK, /*< desc="CMYK" >*/
GIMP_COLOR_PICK_MODE_XYY, /*< desc="CIE xyY" >*/
GIMP_COLOR_PICK_MODE_LAST = GIMP_COLOR_PICK_MODE_XYY /*< skip >*/
} GimpColorPickMode;
#define GIMP_TYPE_COLOR_PROFILE_POLICY (gimp_color_profile_policy_get_type ())
GType gimp_color_profile_policy_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_COLOR_PROFILE_POLICY_ASK, /*< desc="Ask what to do" >*/
GIMP_COLOR_PROFILE_POLICY_KEEP, /*< desc="Keep embedded profile" >*/
GIMP_COLOR_PROFILE_POLICY_CONVERT /*< desc="Convert to built-in sRGB or grayscale profile" >*/
} GimpColorProfilePolicy;
#define GIMP_TYPE_COMPONENT_MASK (gimp_component_mask_get_type ())
GType gimp_component_mask_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_COMPONENT_MASK_RED = 1 << 0,
GIMP_COMPONENT_MASK_GREEN = 1 << 1,
GIMP_COMPONENT_MASK_BLUE = 1 << 2,
GIMP_COMPONENT_MASK_ALPHA = 1 << 3,
GIMP_COMPONENT_MASK_ALL = (GIMP_COMPONENT_MASK_RED |
GIMP_COMPONENT_MASK_GREEN |
GIMP_COMPONENT_MASK_BLUE |
GIMP_COMPONENT_MASK_ALPHA)
} GimpComponentMask;
#define GIMP_TYPE_CONTAINER_POLICY (gimp_container_policy_get_type ())
GType gimp_container_policy_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CONTAINER_POLICY_STRONG,
GIMP_CONTAINER_POLICY_WEAK
} GimpContainerPolicy;
#define GIMP_TYPE_CONVERT_DITHER_TYPE (gimp_convert_dither_type_get_type ())
GType gimp_convert_dither_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_CONVERT_DITHER_NONE, /*< desc="None" >*/
GIMP_CONVERT_DITHER_FS, /*< desc="Floyd-Steinberg (normal)" >*/
GIMP_CONVERT_DITHER_FS_LOWBLEED, /*< desc="Floyd-Steinberg (reduced color bleeding)" >*/
GIMP_CONVERT_DITHER_FIXED, /*< desc="Positioned" >*/
GIMP_CONVERT_DITHER_NODESTRUCT /*< pdb-skip, skip >*/
} GimpConvertDitherType;
#define GIMP_TYPE_CONVOLUTION_TYPE (gimp_convolution_type_get_type ())
GType gimp_convolution_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_NORMAL_CONVOL, /* Negative numbers truncated */
GIMP_ABSOLUTE_CONVOL, /* Absolute value */
GIMP_NEGATIVE_CONVOL /* add 127 to values */
} GimpConvolutionType;
#define GIMP_TYPE_CURVE_POINT_TYPE (gimp_curve_point_type_get_type ())
GType gimp_curve_point_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CURVE_POINT_SMOOTH, /*< desc="Smooth" >*/
GIMP_CURVE_POINT_CORNER /*< desc="Corner" >*/
} GimpCurvePointType;
#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ())
GType gimp_curve_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CURVE_SMOOTH, /*< desc="Smooth" >*/
GIMP_CURVE_FREE /*< desc="Freehand" >*/
} GimpCurveType;
#define GIMP_TYPE_DASH_PRESET (gimp_dash_preset_get_type ())
GType gimp_dash_preset_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_DASH_CUSTOM, /*< desc="Custom" >*/
GIMP_DASH_LINE, /*< desc="Line" >*/
GIMP_DASH_LONG_DASH, /*< desc="Long dashes" >*/
GIMP_DASH_MEDIUM_DASH, /*< desc="Medium dashes" >*/
GIMP_DASH_SHORT_DASH, /*< desc="Short dashes" >*/
GIMP_DASH_SPARSE_DOTS, /*< desc="Sparse dots" >*/
GIMP_DASH_NORMAL_DOTS, /*< desc="Normal dots" >*/
GIMP_DASH_DENSE_DOTS, /*< desc="Dense dots" >*/
GIMP_DASH_STIPPLES, /*< desc="Stipples" >*/
GIMP_DASH_DASH_DOT, /*< desc="Dash, dot" >*/
GIMP_DASH_DASH_DOT_DOT /*< desc="Dash, dot, dot" >*/
} GimpDashPreset;
#define GIMP_TYPE_DEBUG_POLICY (gimp_debug_policy_get_type ())
GType gimp_debug_policy_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_DEBUG_POLICY_WARNING, /*< desc="Debug warnings, critical errors and crashes" >*/
GIMP_DEBUG_POLICY_CRITICAL, /*< desc="Debug critical errors and crashes" >*/
GIMP_DEBUG_POLICY_FATAL, /*< desc="Debug crashes only" >*/
GIMP_DEBUG_POLICY_NEVER /*< desc="Never debug GIMP" >*/
} GimpDebugPolicy;
#define GIMP_TYPE_DIRTY_MASK (gimp_dirty_mask_get_type ())
GType gimp_dirty_mask_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_DIRTY_NONE = 0,
GIMP_DIRTY_IMAGE = 1 << 0,
GIMP_DIRTY_IMAGE_SIZE = 1 << 1,
GIMP_DIRTY_IMAGE_META = 1 << 2,
GIMP_DIRTY_IMAGE_STRUCTURE = 1 << 3,
GIMP_DIRTY_ITEM = 1 << 4,
GIMP_DIRTY_ITEM_META = 1 << 5,
GIMP_DIRTY_DRAWABLE = 1 << 6,
GIMP_DIRTY_VECTORS = 1 << 7,
GIMP_DIRTY_SELECTION = 1 << 8,
GIMP_DIRTY_ACTIVE_DRAWABLE = 1 << 9,
GIMP_DIRTY_ALL = 0xffff
} GimpDirtyMask;
#define GIMP_TYPE_DYNAMICS_OUTPUT_TYPE (gimp_dynamics_output_type_get_type ())
GType gimp_dynamics_output_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_DYNAMICS_OUTPUT_OPACITY, /*< desc="Opacity" >*/
GIMP_DYNAMICS_OUTPUT_SIZE, /*< desc="Size" >*/
GIMP_DYNAMICS_OUTPUT_ANGLE, /*< desc="Angle" >*/
GIMP_DYNAMICS_OUTPUT_COLOR, /*< desc="Color" >*/
GIMP_DYNAMICS_OUTPUT_HARDNESS, /*< desc="Hardness" >*/
GIMP_DYNAMICS_OUTPUT_FORCE, /*< desc="Force" >*/
GIMP_DYNAMICS_OUTPUT_ASPECT_RATIO, /*< desc="Aspect ratio" >*/
GIMP_DYNAMICS_OUTPUT_SPACING, /*< desc="Spacing" >*/
GIMP_DYNAMICS_OUTPUT_RATE, /*< desc="Rate" >*/
GIMP_DYNAMICS_OUTPUT_FLOW, /*< desc="Flow" >*/
GIMP_DYNAMICS_OUTPUT_JITTER, /*< desc="Jitter" >*/
} GimpDynamicsOutputType;
#define GIMP_TYPE_FILL_STYLE (gimp_fill_style_get_type ())
GType gimp_fill_style_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_FILL_STYLE_SOLID, /*< desc="Solid color" >*/
GIMP_FILL_STYLE_PATTERN /*< desc="Pattern" >*/
} GimpFillStyle;
#define GIMP_TYPE_FILTER_REGION (gimp_filter_region_get_type ())
GType gimp_filter_region_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_FILTER_REGION_SELECTION, /*< desc="Use the selection as input" >*/
GIMP_FILTER_REGION_DRAWABLE /*< desc="Use the entire layer as input" >*/
} GimpFilterRegion;
#define GIMP_TYPE_GRADIENT_COLOR (gimp_gradient_color_get_type ())
GType gimp_gradient_color_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_GRADIENT_COLOR_FIXED, /*< desc="Fixed" >*/
GIMP_GRADIENT_COLOR_FOREGROUND, /*< desc="Foreground color", abbrev="FG" >*/
GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT, /*< desc="Foreground color (transparent)", abbrev="FG (t)" >*/
GIMP_GRADIENT_COLOR_BACKGROUND, /*< desc="Background color", abbrev="BG" >*/
GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT /*< desc="Background color (transparent)", abbrev="BG (t)" >*/
} GimpGradientColor;
#define GIMP_TYPE_GRAVITY_TYPE (gimp_gravity_type_get_type ())
GType gimp_gravity_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_GRAVITY_NONE,
GIMP_GRAVITY_NORTH_WEST,
GIMP_GRAVITY_NORTH,
GIMP_GRAVITY_NORTH_EAST,
GIMP_GRAVITY_WEST,
GIMP_GRAVITY_CENTER,
GIMP_GRAVITY_EAST,
GIMP_GRAVITY_SOUTH_WEST,
GIMP_GRAVITY_SOUTH,
GIMP_GRAVITY_SOUTH_EAST
} GimpGravityType;
#define GIMP_TYPE_GUIDE_STYLE (gimp_guide_style_get_type ())
GType gimp_guide_style_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_GUIDE_STYLE_NONE,
GIMP_GUIDE_STYLE_NORMAL,
GIMP_GUIDE_STYLE_MIRROR,
GIMP_GUIDE_STYLE_MANDALA,
GIMP_GUIDE_STYLE_SPLIT_VIEW
} GimpGuideStyle;
#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ())
GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_HISTOGRAM_VALUE = 0, /*< desc="Value" >*/
GIMP_HISTOGRAM_RED = 1, /*< desc="Red" >*/
GIMP_HISTOGRAM_GREEN = 2, /*< desc="Green" >*/
GIMP_HISTOGRAM_BLUE = 3, /*< desc="Blue" >*/
GIMP_HISTOGRAM_ALPHA = 4, /*< desc="Alpha" >*/
GIMP_HISTOGRAM_LUMINANCE = 5, /*< desc="Luminance" >*/
GIMP_HISTOGRAM_RGB = 6 /*< desc="RGB", pdb-skip >*/
} GimpHistogramChannel;
#define GIMP_TYPE_ITEM_SET (gimp_item_set_get_type ())
GType gimp_item_set_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_ITEM_SET_NONE, /*< desc="None" >*/
GIMP_ITEM_SET_ALL, /*< desc="All layers" >*/
GIMP_ITEM_SET_IMAGE_SIZED, /*< desc="Image-sized layers" >*/
GIMP_ITEM_SET_VISIBLE, /*< desc="All visible layers" >*/
GIMP_ITEM_SET_LINKED /*< desc="All linked layers" >*/
} GimpItemSet;
#define GIMP_TYPE_MATTING_ENGINE (gimp_matting_engine_get_type ())
GType gimp_matting_engine_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_MATTING_ENGINE_GLOBAL, /*< desc="Matting Global" >*/
GIMP_MATTING_ENGINE_LEVIN, /*< desc="Matting Levin" >*/
} GimpMattingEngine;
#define GIMP_TYPE_MESSAGE_SEVERITY (gimp_message_severity_get_type ())
GType gimp_message_severity_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_MESSAGE_INFO, /*< desc="Message" >*/
GIMP_MESSAGE_WARNING, /*< desc="Warning" >*/
GIMP_MESSAGE_ERROR, /*< desc="Error" >*/
GIMP_MESSAGE_BUG_WARNING, /*< desc="WARNING" >*/
GIMP_MESSAGE_BUG_CRITICAL /*< desc="CRITICAL" >*/
} GimpMessageSeverity;
#define GIMP_TYPE_PASTE_TYPE (gimp_paste_type_get_type ())
GType gimp_paste_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_PASTE_TYPE_FLOATING,
GIMP_PASTE_TYPE_FLOATING_IN_PLACE,
GIMP_PASTE_TYPE_FLOATING_INTO,
GIMP_PASTE_TYPE_FLOATING_INTO_IN_PLACE,
GIMP_PASTE_TYPE_NEW_LAYER,
GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE
} GimpPasteType;
#define GIMP_TYPE_THUMBNAIL_SIZE (gimp_thumbnail_size_get_type ())
GType gimp_thumbnail_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_THUMBNAIL_SIZE_NONE = 0, /*< desc="No thumbnails" >*/
GIMP_THUMBNAIL_SIZE_NORMAL = 128, /*< desc="Normal (128x128)" >*/
GIMP_THUMBNAIL_SIZE_LARGE = 256 /*< desc="Large (256x256)" >*/
} GimpThumbnailSize;
2003-02-13 01:11:34 +08:00
Initial space invasion commit in GIMP All babl formats now have a space equivalent to a color profile, determining the format's primaries and TRCs. This commit makes GIMP aware of this. libgimp: - enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA as deprecated aliases, add PERCEPTUAL values so we now have LINEAR, NON_LINEAR and PERCPTUAL for each encoding, matching the babl encoding variants RGB, R'G'B' and R~G~B~. - gimp_color_transform_can_gegl_copy() now returns TRUE if both profiles can return a babl space, increasing the amount of fast babl color conversions significantly. - TODO: no solution yet for getting libgimp drawable proxy buffers in the right format with space. plug-ins: - follow the GimpPrecision change. - TODO: everything else unchanged and partly broken or sub-optimal, like setting a new image's color profile too late. app: - add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as replacement for all "linear" booleans. - change gimp-babl functions to take babl spaces and GimpTRCType parameters and support all sorts of new perceptual ~ formats. - a lot of places changed in the early days of goat invasion didn't take advantage of gimp-babl utility functions and constructed formats manually. They all needed revisiting and many now use much simpler code calling gimp-babl API. - change gimp_babl_format_get_color_profile() to really extract a newly allocated color profile from the format, and add gimp_babl_get_builtin_color_profile() which does the same as gimp_babl_format_get_color_profile() did before. Visited all callers to decide whether they are looking for the format's actual profile, or for one of the builtin profiles, simplifying code that only needs builtin profiles. - drawables have a new get_space_api(), get_linear() is now get_trc(). - images now have a "layer space" and an API to get it, gimp_image_get_layer_format() returns formats in that space. - an image's layer space is created from the image's color profile, change gimpimage-color-profile to deal with that correctly - change many babl_format() calls to babl_format_with_space() and take the space from passed formats or drawables - add function gimp_layer_fix_format_space() which replaces the layer's buffer with one that has the image's layer format, but doesn't change pixel values - use gimp_layer_fix_format_space() to make sure layers loaded from XCF and created by plug-ins have the right space when added to the image, because it's impossible to always assign the right space upon layer creation - "assign color profile" and "discard color profile" now require use of gimp_layer_fix_format_space() too because the profile is now embedded in all formats via the space. Add gimp_image_assign_color_profile() which does all that and call it instead of a simple gimp_image_set_color_profile(), also from the PDB set-color-profile functions, which are essentially "assign" and "discard" calls. - generally, make sure a new image's color profile is set before adding layers to it, gimp_image_set_color_profile() is more than before considered know-what-you-are-doing API. - take special precaution in all places that call gimp_drawable_convert_type(), we now must pass a new_profile from all callers that convert layers within the same image (such as image_convert_type, image_convert_precision), because the layer's new space can't be determined from the image's layer format during the call. - change all "linear" properties to "trc", in all config objects like for levels and curves, in the histogram, in the widgets. This results in some GUI that now has three choices instead of two. TODO: we might want to reduce that back to two later. - keep "linear" boolean properties around as compat if needed for file pasring, but always convert the parsed parsed boolean to GimpTRCType. - TODO: the image's "enable color management" switch is currently broken, will fix that in another commit.
2018-07-21 20:23:01 +08:00
#define GIMP_TYPE_TRC_TYPE (gimp_trc_type_get_type ())
GType gimp_trc_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_TRC_LINEAR, /*< desc="Linear" >*/
GIMP_TRC_NON_LINEAR, /*< desc="Non-Linear" >*/
GIMP_TRC_PERCEPTUAL /*< desc="Perceptual" >*/
} GimpTRCType;
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
#define GIMP_TYPE_UNDO_EVENT (gimp_undo_event_get_type ())
GType gimp_undo_event_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_UNDO_EVENT_UNDO_PUSHED, /* a new undo has been added to the undo stack */
GIMP_UNDO_EVENT_UNDO_EXPIRED, /* an undo has been freed from the undo stack */
GIMP_UNDO_EVENT_REDO_EXPIRED, /* a redo has been freed from the redo stack */
GIMP_UNDO_EVENT_UNDO, /* an undo has been executed */
GIMP_UNDO_EVENT_REDO, /* a redo has been executed */
GIMP_UNDO_EVENT_UNDO_FREE, /* all undo and redo info has been cleared */
GIMP_UNDO_EVENT_UNDO_FREEZE, /* undo has been frozen */
GIMP_UNDO_EVENT_UNDO_THAW /* undo has been thawn */
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
} GimpUndoEvent;
#define GIMP_TYPE_UNDO_MODE (gimp_undo_mode_get_type ())
GType gimp_undo_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_UNDO_MODE_UNDO,
GIMP_UNDO_MODE_REDO
} GimpUndoMode;
2003-02-13 01:11:34 +08:00
#define GIMP_TYPE_UNDO_TYPE (gimp_undo_type_get_type ())
GType gimp_undo_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
/* Type NO_UNDO_GROUP (0) is special - in the gimpimage structure it
* means there is no undo group currently being added to.
*/
GIMP_UNDO_GROUP_NONE = 0, /*< desc="<<invalid>>" >*/
GIMP_UNDO_GROUP_FIRST = GIMP_UNDO_GROUP_NONE, /*< skip >*/
GIMP_UNDO_GROUP_IMAGE_SCALE, /*< desc="Scale image" >*/
GIMP_UNDO_GROUP_IMAGE_RESIZE, /*< desc="Resize image" >*/
GIMP_UNDO_GROUP_IMAGE_FLIP, /*< desc="Flip image" >*/
GIMP_UNDO_GROUP_IMAGE_ROTATE, /*< desc="Rotate image" >*/
GIMP_UNDO_GROUP_IMAGE_CROP, /*< desc="Crop image" >*/
GIMP_UNDO_GROUP_IMAGE_CONVERT, /*< desc="Convert image" >*/
GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, /*< desc="Remove item" >*/
GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, /*< desc="Reorder item" >*/
GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge layers" >*/
GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, /*< desc="Merge paths" >*/
GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, /*< desc="Quick Mask" >*/
GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_GROUP_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_GROUP_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_GROUP_DRAWABLE, /*< desc="Layer/Channel" >*/
GIMP_UNDO_GROUP_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/
GIMP_UNDO_GROUP_MASK, /*< desc="Selection mask" >*/
GIMP_UNDO_GROUP_ITEM_VISIBILITY, /*< desc="Item visibility" >*/
GIMP_UNDO_GROUP_ITEM_LINKED, /*< desc="Link/Unlink item" >*/
GIMP_UNDO_GROUP_ITEM_PROPERTIES, /*< desc="Item properties" >*/
GIMP_UNDO_GROUP_ITEM_DISPLACE, /*< desc="Move item" >*/
GIMP_UNDO_GROUP_ITEM_SCALE, /*< desc="Scale item" >*/
GIMP_UNDO_GROUP_ITEM_RESIZE, /*< desc="Resize item" >*/
GIMP_UNDO_GROUP_LAYER_ADD, /*< desc="Add layer" >*/
GIMP_UNDO_GROUP_LAYER_ADD_MASK, /*< desc="Add layer mask" >*/
GIMP_UNDO_GROUP_LAYER_APPLY_MASK, /*< desc="Apply layer mask" >*/
GIMP_UNDO_GROUP_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/
GIMP_UNDO_GROUP_FS_FLOAT, /*< desc="Float selection" >*/
GIMP_UNDO_GROUP_FS_ANCHOR, /*< desc="Anchor floating selection" >*/
GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/
GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/
GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/
GIMP_UNDO_GROUP_TRANSFORM, /*< desc="Transform" >*/
GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/
GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach parasite" >*/
GIMP_UNDO_GROUP_PARASITE_REMOVE, /*< desc="Remove parasite" >*/
GIMP_UNDO_GROUP_VECTORS_IMPORT, /*< desc="Import paths" >*/
GIMP_UNDO_GROUP_MISC, /*< desc="Plug-In" >*/
GIMP_UNDO_GROUP_LAST = GIMP_UNDO_GROUP_MISC, /*< skip >*/
2003-02-13 01:11:34 +08:00
/* Undo types which actually do something */
GIMP_UNDO_IMAGE_TYPE, /*< desc="Image type" >*/
GIMP_UNDO_IMAGE_PRECISION, /*< desc="Image precision" >*/
GIMP_UNDO_IMAGE_SIZE, /*< desc="Image size" >*/
GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Image resolution change" >*/
GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_IMAGE_METADATA, /*< desc="Change metadata" >*/
GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/
GIMP_UNDO_IMAGE_HIDDEN_PROFILE, /*< desc="Hide/Unhide color profile" >*/
GIMP_UNDO_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_DRAWABLE, /*< desc="Layer/Channel" >*/
GIMP_UNDO_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/
GIMP_UNDO_DRAWABLE_FORMAT, /*< desc="Layer/Channel format" >*/
GIMP_UNDO_MASK, /*< desc="Selection mask" >*/
GIMP_UNDO_ITEM_REORDER, /*< desc="Reorder item" >*/
GIMP_UNDO_ITEM_RENAME, /*< desc="Rename item" >*/
GIMP_UNDO_ITEM_DISPLACE, /*< desc="Move item" >*/
GIMP_UNDO_ITEM_VISIBILITY, /*< desc="Item visibility" >*/
GIMP_UNDO_ITEM_LINKED, /*< desc="Link/Unlink item" >*/
GIMP_UNDO_ITEM_COLOR_TAG, /*< desc="Item color tag" >*/
GIMP_UNDO_ITEM_LOCK_CONTENT, /*< desc="Lock/Unlock content" >*/
GIMP_UNDO_ITEM_LOCK_POSITION, /*< desc="Lock/Unlock position" >*/
GIMP_UNDO_LAYER_ADD, /*< desc="New layer" >*/
GIMP_UNDO_LAYER_REMOVE, /*< desc="Delete layer" >*/
GIMP_UNDO_LAYER_MODE, /*< desc="Set layer mode" >*/
GIMP_UNDO_LAYER_OPACITY, /*< desc="Set layer opacity" >*/
GIMP_UNDO_LAYER_LOCK_ALPHA, /*< desc="Lock/Unlock alpha channel" >*/
GIMP_UNDO_GROUP_LAYER_SUSPEND_RESIZE, /*< desc="Suspend group layer resize" >*/
GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE, /*< desc="Resume group layer resize" >*/
GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK, /*< desc="Suspend group layer mask" >*/
GIMP_UNDO_GROUP_LAYER_RESUME_MASK, /*< desc="Resume group layer mask" >*/
GIMP_UNDO_GROUP_LAYER_START_TRANSFORM, /*< desc="Start transforming group layer" >*/
GIMP_UNDO_GROUP_LAYER_END_TRANSFORM, /*< desc="End transforming group layer" >*/
GIMP_UNDO_GROUP_LAYER_CONVERT, /*< desc="Convert group layer" >*/
GIMP_UNDO_TEXT_LAYER, /*< desc="Text layer" >*/
GIMP_UNDO_TEXT_LAYER_MODIFIED, /*< desc="Text layer modification" >*/
GIMP_UNDO_TEXT_LAYER_CONVERT, /*< desc="Convert text layer" >*/
GIMP_UNDO_LAYER_MASK_ADD, /*< desc="Add layer mask" >*/
GIMP_UNDO_LAYER_MASK_REMOVE, /*< desc="Delete layer mask" >*/
GIMP_UNDO_LAYER_MASK_APPLY, /*< desc="Apply layer mask" >*/
GIMP_UNDO_LAYER_MASK_SHOW, /*< desc="Show layer mask" >*/
GIMP_UNDO_CHANNEL_ADD, /*< desc="New channel" >*/
GIMP_UNDO_CHANNEL_REMOVE, /*< desc="Delete channel" >*/
GIMP_UNDO_CHANNEL_COLOR, /*< desc="Channel color" >*/
GIMP_UNDO_VECTORS_ADD, /*< desc="New path" >*/
GIMP_UNDO_VECTORS_REMOVE, /*< desc="Delete path" >*/
GIMP_UNDO_VECTORS_MOD, /*< desc="Path modification" >*/
GIMP_UNDO_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/
GIMP_UNDO_TRANSFORM_GRID, /*< desc="Transform grid" >*/
GIMP_UNDO_PAINT, /*< desc="Paint" >*/
GIMP_UNDO_INK, /*< desc="Ink" >*/
GIMP_UNDO_FOREGROUND_SELECT, /*< desc="Select foreground" >*/
GIMP_UNDO_PARASITE_ATTACH, /*< desc="Attach parasite" >*/
GIMP_UNDO_PARASITE_REMOVE, /*< desc="Remove parasite" >*/
GIMP_UNDO_CANT /*< desc="Not undoable" >*/
2003-02-13 01:11:34 +08:00
} GimpUndoType;
#define GIMP_TYPE_VIEW_SIZE (gimp_view_size_get_type ())
GType gimp_view_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_VIEW_SIZE_TINY = 12, /*< desc="Tiny" >*/
GIMP_VIEW_SIZE_EXTRA_SMALL = 16, /*< desc="Very small" >*/
GIMP_VIEW_SIZE_SMALL = 24, /*< desc="Small" >*/
GIMP_VIEW_SIZE_MEDIUM = 32, /*< desc="Medium" >*/
GIMP_VIEW_SIZE_LARGE = 48, /*< desc="Large" >*/
GIMP_VIEW_SIZE_EXTRA_LARGE = 64, /*< desc="Very large" >*/
GIMP_VIEW_SIZE_HUGE = 96, /*< desc="Huge" >*/
GIMP_VIEW_SIZE_ENORMOUS = 128, /*< desc="Enormous" >*/
GIMP_VIEW_SIZE_GIGANTIC = 192 /*< desc="Gigantic" >*/
} GimpViewSize;
#define GIMP_TYPE_VIEW_TYPE (gimp_view_type_get_type ())
GType gimp_view_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_VIEW_TYPE_LIST, /*< desc="View as list" >*/
GIMP_VIEW_TYPE_GRID /*< desc="View as grid" >*/
} GimpViewType;
Added object properties for almost all tool_options values and registered 2003-02-07 Michael Natterer <mitch@gimp.org> Added object properties for almost all tool_options values and registered lots of enums with the type system: Part I (enum and type cleanup): * app/core/core-enums.[ch] * app/core/core-types.h: removed InternalOrientaionType and register GimpOrientationType. Register GimpChannelOps. Removed GimpToolOptionsGUIFunc. * app/xcf/xcf-private.h: added XcfOrientationType with the same values as the old InternalOrientationType * app/xcf/xcf-load.c * app/xcf/xcf-save.c: translate between GimpOrientationType and XcfOrientationType. * app/core/gimpdrawable-transform-utils.[ch] * app/core/gimpdrawable-transform.[ch] * app/core/gimpimage-crop.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-guides.c * app/core/gimpimage-resize.c * app/core/gimpimage-scale.c * app/core/gimpimage.h * app/display/gimpdisplayshell.c * tools/pdbgen/stddefs.pdb * tools/pdbgen/pdb/transform_tools.pdb: changed accordingly. * app/pdb/guides_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpenums.h * libgimpproxy/gimpproxytypes.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * libgimptool/gimptoolenums.[ch]: added GimpTransformGridType. * libgimptool/gimptooltypes.h: removed GimpToolOptionsResetFunc, added GimpToolOptionsGUIFunc. Part II (tool options changes): * app/config/gimpconfig-utils.c (gimp_config_reset_properties): don't reset object properties because they have NULL as default value. * app/widgets/gimppropwidgets.[ch]: added gimp_prop_[enum|boolean]_radio_frame_new(), gimp_prop_paint_mode_menu_new() and gimp_prop_scale_entry_new(), which are all needed by the new tool options GUI code. * app/tools/tool_options.[ch]: removed the "reset_func" since the virtual reset() method is used now. * app/paint/gimpairbrushoptions.[ch] * app/paint/gimpcloneoptions.[ch] * app/paint/gimpconvolveoptions.[ch] * app/paint/gimpdodgeburnoptions.[ch] * app/paint/gimperaseroptions.[ch] * app/paint/gimppaintoptions.[ch] * app/paint/gimpsmudgeoptions.[ch]: added properties all over the place and removed the widget and default_value members from the structs. Renamed some values (e.g. s/type/clone_type/). Don't #include <gtk/gtk.h>. * app/paint/gimpairbrush.c * app/paint/gimpclone.c * app/paint/gimpconvolve.c * app/paint/gimpdodgeburn.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimppaintcore-stroke.c * app/paint/gimppaintcore.c * app/paint/gimppencil.c * app/paint/gimpsmudge.c * app/paint/paint-types.h * app/paint/paint.c: changed accordingly. Don't #include <gtk/gtk.h>. * tools/pdbgen/pdb/paint_tools.pdb: changed accordingly. * app/pdb/paint_tools_cmds.c: regenerated. * app/tools/gimpblendoptions.[ch] * app/tools/gimpbucketfilloptions.[ch] * app/tools/gimpcolorpickeroptions.[ch] * app/tools/gimpcropoptions.[ch] * app/tools/gimpflipoptions.[ch] * app/tools/gimpinkoptions.c * app/tools/gimpmagnifyoptions.[ch] * app/tools/gimpmeasureoptions.[ch] * app/tools/gimpmoveoptions.[ch] * app/tools/gimptextoptions.c * app/tools/paint_options.[ch] * app/tools/selection_options.[ch] * app/tools/transform_options.[ch]: ditto: added properties and removed widget and default_value stuff. Removed most reset functions. Use gimp_prop widgets all over the place, renamed some values as above. * app/tools/Makefile.am * app/tools/gimpairbrushtool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpdodgeburntool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmovetool.c * app/tools/gimpselectiontool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptransformtool.c * app/tools/gimpvectoroptions.c: changed accordingly. Ported the paint_options GUI constructors to gimp_prop widgets. * app/widgets/gimpselectioneditor.c * app/gui/tool-options-dialog.c: changed accordingly.
2003-02-08 01:12:21 +08:00
/*
* non-registered enums; register them if needed
*/
typedef enum /*< pdb-skip, skip >*/
{
GIMP_CONTEXT_PROP_FIRST = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_PROP_FIRST,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
GIMP_CONTEXT_PROP_PAINT_INFO = 5,
GIMP_CONTEXT_PROP_FOREGROUND = 6,
GIMP_CONTEXT_PROP_BACKGROUND = 7,
GIMP_CONTEXT_PROP_OPACITY = 8,
GIMP_CONTEXT_PROP_PAINT_MODE = 9,
GIMP_CONTEXT_PROP_BRUSH = 10,
GIMP_CONTEXT_PROP_DYNAMICS = 11,
GIMP_CONTEXT_PROP_MYBRUSH = 12,
GIMP_CONTEXT_PROP_PATTERN = 13,
GIMP_CONTEXT_PROP_GRADIENT = 14,
GIMP_CONTEXT_PROP_PALETTE = 15,
GIMP_CONTEXT_PROP_FONT = 16,
GIMP_CONTEXT_PROP_TOOL_PRESET = 17,
GIMP_CONTEXT_PROP_BUFFER = 18,
GIMP_CONTEXT_PROP_IMAGEFILE = 19,
GIMP_CONTEXT_PROP_TEMPLATE = 20,
GIMP_CONTEXT_PROP_LAST = GIMP_CONTEXT_PROP_TEMPLATE
} GimpContextPropType;
typedef enum /*< pdb-skip, skip >*/
{
GIMP_CONTEXT_PROP_MASK_IMAGE = 1 << 2,
GIMP_CONTEXT_PROP_MASK_DISPLAY = 1 << 3,
GIMP_CONTEXT_PROP_MASK_TOOL = 1 << 4,
GIMP_CONTEXT_PROP_MASK_PAINT_INFO = 1 << 5,
GIMP_CONTEXT_PROP_MASK_FOREGROUND = 1 << 6,
GIMP_CONTEXT_PROP_MASK_BACKGROUND = 1 << 7,
GIMP_CONTEXT_PROP_MASK_OPACITY = 1 << 8,
GIMP_CONTEXT_PROP_MASK_PAINT_MODE = 1 << 9,
GIMP_CONTEXT_PROP_MASK_BRUSH = 1 << 10,
GIMP_CONTEXT_PROP_MASK_DYNAMICS = 1 << 11,
GIMP_CONTEXT_PROP_MASK_MYBRUSH = 1 << 12,
GIMP_CONTEXT_PROP_MASK_PATTERN = 1 << 13,
GIMP_CONTEXT_PROP_MASK_GRADIENT = 1 << 14,
GIMP_CONTEXT_PROP_MASK_PALETTE = 1 << 15,
GIMP_CONTEXT_PROP_MASK_FONT = 1 << 16,
GIMP_CONTEXT_PROP_MASK_TOOL_PRESET = 1 << 17,
GIMP_CONTEXT_PROP_MASK_BUFFER = 1 << 18,
GIMP_CONTEXT_PROP_MASK_IMAGEFILE = 1 << 19,
GIMP_CONTEXT_PROP_MASK_TEMPLATE = 1 << 20,
/* aliases */
GIMP_CONTEXT_PROP_MASK_PAINT = (GIMP_CONTEXT_PROP_MASK_FOREGROUND |
GIMP_CONTEXT_PROP_MASK_BACKGROUND |
GIMP_CONTEXT_PROP_MASK_OPACITY |
GIMP_CONTEXT_PROP_MASK_PAINT_MODE |
GIMP_CONTEXT_PROP_MASK_BRUSH |
GIMP_CONTEXT_PROP_MASK_DYNAMICS |
GIMP_CONTEXT_PROP_MASK_PATTERN |
GIMP_CONTEXT_PROP_MASK_GRADIENT),
GIMP_CONTEXT_PROP_MASK_ALL = (GIMP_CONTEXT_PROP_MASK_IMAGE |
GIMP_CONTEXT_PROP_MASK_DISPLAY |
GIMP_CONTEXT_PROP_MASK_TOOL |
GIMP_CONTEXT_PROP_MASK_PAINT_INFO |
GIMP_CONTEXT_PROP_MASK_MYBRUSH |
GIMP_CONTEXT_PROP_MASK_PALETTE |
GIMP_CONTEXT_PROP_MASK_FONT |
GIMP_CONTEXT_PROP_MASK_TOOL_PRESET |
GIMP_CONTEXT_PROP_MASK_BUFFER |
GIMP_CONTEXT_PROP_MASK_IMAGEFILE |
GIMP_CONTEXT_PROP_MASK_TEMPLATE |
GIMP_CONTEXT_PROP_MASK_PAINT)
} GimpContextPropMask;
typedef enum /*< pdb-skip, skip >*/
{
GIMP_IMAGE_SCALE_OK,
GIMP_IMAGE_SCALE_TOO_SMALL,
GIMP_IMAGE_SCALE_TOO_BIG
} GimpImageScaleCheckType;
typedef enum /*< pdb-skip, skip >*/
{
GIMP_ITEM_TYPE_LAYERS = 1 << 0,
GIMP_ITEM_TYPE_CHANNELS = 1 << 1,
GIMP_ITEM_TYPE_VECTORS = 1 << 2,
GIMP_ITEM_TYPE_ALL = (GIMP_ITEM_TYPE_LAYERS |
GIMP_ITEM_TYPE_CHANNELS |
GIMP_ITEM_TYPE_VECTORS)
} GimpItemTypeMask;
2002-03-29 11:50:29 +08:00
#endif /* __CORE_ENUMS_H__ */