gimp/app/core/core-enums.h

701 lines
25 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 <http://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 tools/pdbgen,
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_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_NO_DITHER, /*< desc="None" >*/
GIMP_FS_DITHER, /*< desc="Floyd-Steinberg (normal)" >*/
GIMP_FSLOWBLEED_DITHER, /*< desc="Floyd-Steinberg (reduced color bleeding)" >*/
GIMP_FIXED_DITHER, /*< desc="Positioned" >*/
GIMP_NODESTRUCT_DITHER /*< pdb-skip, skip >*/
} GimpConvertDitherType;
#define GIMP_TYPE_CONVERT_PALETTE_TYPE (gimp_convert_palette_type_get_type ())
GType gimp_convert_palette_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_MAKE_PALETTE, /*< desc="Generate optimum palette" >*/
GIMP_REUSE_PALETTE, /*< skip >*/
GIMP_WEB_PALETTE, /*< desc="Use web-optimized palette" >*/
GIMP_MONO_PALETTE, /*< desc="Use black and white (1-bit) palette" >*/
GIMP_CUSTOM_PALETTE /*< desc="Use custom palette" >*/
} GimpConvertPaletteType;
#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_ALIGNMENT (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
} GimpAlignmentType;
#define GIMP_TYPE_ALIGN_REFERENCE (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_FILL_TYPE (gimp_fill_type_get_type ())
GType gimp_fill_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_FOREGROUND_FILL, /*< desc="Foreground color" >*/
GIMP_BACKGROUND_FILL, /*< desc="Background color" >*/
GIMP_WHITE_FILL, /*< desc="White" >*/
GIMP_TRANSPARENT_FILL, /*< desc="Transparency" >*/
GIMP_PATTERN_FILL, /*< desc="Pattern" >*/
GIMP_NO_FILL /*< desc="None", pdb-skip >*/
} GimpFillType;
#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_STROKE_METHOD (gimp_stroke_method_get_type ())
GType gimp_stroke_method_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_STROKE_METHOD_LIBART, /*< desc="Stroke line" >*/
GIMP_STROKE_METHOD_PAINT_CORE /*< desc="Stroke with a paint tool" >*/
} GimpStrokeMethod;
#define GIMP_TYPE_JOIN_STYLE (gimp_join_style_get_type ())
GType gimp_join_style_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_JOIN_MITER, /*< desc="Miter" >*/
GIMP_JOIN_ROUND, /*< desc="Round" >*/
GIMP_JOIN_BEVEL /*< desc="Bevel" >*/
} GimpJoinStyle;
#define GIMP_TYPE_CAP_STYLE (gimp_cap_style_get_type ())
GType gimp_cap_style_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CAP_BUTT, /*< desc="Butt" >*/
GIMP_CAP_ROUND, /*< desc="Round" >*/
GIMP_CAP_SQUARE /*< desc="Square" >*/
} GimpCapStyle;
#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_BRUSH_GENERATED_SHAPE (gimp_brush_generated_shape_get_type ())
GType gimp_brush_generated_shape_get_type (void) G_GNUC_CONST;
export GimpBrushGeneratedShape to the PDB. 2006-03-22 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB. * tools/pdbgen/pdb/brush.pdb: use it instead of int32. * libgimp/gimp.def: add gimp_brush_generated_shape_get_type(). * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/fonts.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/misc.pdb * tools/pdbgen/pdb/paint_tools.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation, removed some more utility functions, cleanup. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/display_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fonts_cmds.c * app/pdb/gimprc_cmds.c * app/pdb/gradients_cmds.c * app/pdb/layer_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/enums.pl * libgimp/gimpbrush_pdb.[ch] * libgimp/gimpenums.c.tail * libgimp/gimpenums.h: regenerated.
2006-03-22 17:58:08 +08:00
typedef enum
{
GIMP_BRUSH_GENERATED_CIRCLE, /*< desc="Circle" >*/
GIMP_BRUSH_GENERATED_SQUARE, /*< desc="Square" >*/
GIMP_BRUSH_GENERATED_DIAMOND /*< desc="Diamond" >*/
} GimpBrushGeneratedShape;
#define GIMP_TYPE_ORIENTATION_TYPE (gimp_orientation_type_get_type ())
GType gimp_orientation_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_ORIENTATION_HORIZONTAL, /*< desc="Horizontal" >*/
GIMP_ORIENTATION_VERTICAL, /*< desc="Vertical" >*/
GIMP_ORIENTATION_UNKNOWN /*< desc="Unknown" >*/
} GimpOrientationType;
#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_ROTATION_TYPE (gimp_rotation_type_get_type ())
GType gimp_rotation_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_ROTATE_90,
GIMP_ROTATE_180,
GIMP_ROTATE_270
} GimpRotationType;
#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;
#define GIMP_TYPE_SELECTION_CONTROL (gimp_selection_control_get_type ())
GType gimp_selection_control_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_SELECTION_OFF,
GIMP_SELECTION_LAYER_OFF,
GIMP_SELECTION_LAYER_ON,
GIMP_SELECTION_ON,
GIMP_SELECTION_PAUSE,
GIMP_SELECTION_RESUME
} GimpSelectionControl;
#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
#define GIMP_TYPE_UNDO_MODE (gimp_undo_mode_get_type ())
GType gimp_undo_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
2003-02-13 01:11:34 +08:00
{
GIMP_UNDO_MODE_UNDO,
GIMP_UNDO_MODE_REDO
} GimpUndoMode;
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;
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.
*/
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes 2003-03-17 Michael Natterer <mitch@gimp.org> Made drawable/layer properties (visibility, opacity etc.) undoable (fixes bug #73893). * app/core/core-enums.[ch]: added undo types/groups for visibility, mode, opacity, linked and preserve_trans. * app/core/Makefile.am * app/core/core-types.h * app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a ref'ed GimpItem pointer so (1) this doesn't need to be done by all undo steps related to an item and (2) the item the undo step is for can be determined from outside the undo system. * app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item() which returns a new GimpItemUndo. * app/core/gimpimage-undo-push.[ch]: use it for all item related undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable and GimpVectors pointers from the private undo structs. Added undo push functions for the new undo types added above. * app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added "gboolean push_undo" parameter. * app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode, _preserve_trans, _linked): added "gboolean push_undo" parameters. * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimplayer-floating-sel.c * app/tools/gimpmovetool.c * app/xcf/xcf-load.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to the foo_accessors() functions. Removed $func from foo_accesors() because we don't manipulate items without using getters/setters any longer. * app/pdb/channel_cmds.c * app/pdb/layer_cmds.c: regenerated. * app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal which carries an additional "GdkModifierType state" parameter as in GimpCellRendererViewable . * app/widgets/gimpcontainertreeview.c: emit "clicked" from the toggle renderer, not "toggled" so the callbacks get the modifier state. * app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive visible by <shift>+click" feature as in 1.2. * app/widgets/gimplayertreeview.c: compress layer opacity undos by looking at the top of the undo stack and not pushing an undo if there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active layer.
2003-03-18 02:02:41 +08:00
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" >*/
Replaced the concept of having a boolean indicating if an undo step 2004-07-29 Michael Natterer <mitch@gimp.org> Replaced the concept of having a boolean indicating if an undo step dirties the image by a bitfield indicating which parts of the image are dirtied: * app/core/core-enums.[ch]: reordered two values in enum GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask. The values of GimpDirtyMask are still questionable and will probably change... * app/core/gimpimage.[ch]: removed signal "undo_start" and added a GimpDirtyMask parameter to the "dirty" and "clean" signals. * app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced "gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass it to gimp_image_dirty(). (gimp_image_undo_group_start): added *ugly* code which tries to figure GimpDirtyMask from the group's GimpUndoType and store it in the GimpUndoGroup. Call gimp_image_dirty() instead of the removed gimp_image_undo_start(). This means the undo group now dirties the image just like one of its undo steps, but that's no problem since undoing cleans it in the same way. * app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g (gimp_undo_pop): emit clean/dirty signals *before* performing the actual undo step so listeners can detach from the image before it is changed by undo. * app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push(). * app/core/gimpimagemap.[ch]: removed "gboolean interactive" because it makes no sense to use GimpImageMap noninteractively. Don't freeze()/thaw() undo while the image_map is active which fixes many ways of trashing the image's undo state but probably introduces new ways of doing evil things. * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell-handlers.c: changed according to the GimpImage::clean()/dirty() signal changes. Small fixes in the quit dialog's dirty image container. * app/tools/gimptoolcontrol.[ch]: added member and API to set/get the dirty_mask. * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpiscissorstool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c: whenever setting "preserve" to FALSE, also set a "dirty_mask" which specifies on which image changes the tool wants to be canceled. * app/tools/tool_manager.c: removed "undo_start" connection and connect to both "dirty" *and* "clean" to check if the active_tool needs to be canceled. Cancel the tool only if the dirty_mask passed in the signal has common bits with the tool's dirty_mask. Fixes bug #109561 and probably opens some new ones...
2004-07-29 22:16:21 +08:00
GIMP_UNDO_GROUP_IMAGE_CONVERT, /*< desc="Convert image" >*/
GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, /*< desc="Remove 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" >*/
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes 2003-03-17 Michael Natterer <mitch@gimp.org> Made drawable/layer properties (visibility, opacity etc.) undoable (fixes bug #73893). * app/core/core-enums.[ch]: added undo types/groups for visibility, mode, opacity, linked and preserve_trans. * app/core/Makefile.am * app/core/core-types.h * app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a ref'ed GimpItem pointer so (1) this doesn't need to be done by all undo steps related to an item and (2) the item the undo step is for can be determined from outside the undo system. * app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item() which returns a new GimpItemUndo. * app/core/gimpimage-undo-push.[ch]: use it for all item related undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable and GimpVectors pointers from the private undo structs. Added undo push functions for the new undo types added above. * app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added "gboolean push_undo" parameter. * app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode, _preserve_trans, _linked): added "gboolean push_undo" parameters. * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimplayer-floating-sel.c * app/tools/gimpmovetool.c * app/xcf/xcf-load.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to the foo_accessors() functions. Removed $func from foo_accesors() because we don't manipulate items without using getters/setters any longer. * app/pdb/channel_cmds.c * app/pdb/layer_cmds.c: regenerated. * app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal which carries an additional "GdkModifierType state" parameter as in GimpCellRendererViewable . * app/widgets/gimpcontainertreeview.c: emit "clicked" from the toggle renderer, not "toggled" so the callbacks get the modifier state. * app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive visible by <shift>+click" feature as in 1.2. * app/widgets/gimplayertreeview.c: compress layer opacity undos by looking at the top of the undo stack and not pushing an undo if there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active layer.
2003-03-18 02:02:41 +08:00
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" >*/
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes 2003-03-17 Michael Natterer <mitch@gimp.org> Made drawable/layer properties (visibility, opacity etc.) undoable (fixes bug #73893). * app/core/core-enums.[ch]: added undo types/groups for visibility, mode, opacity, linked and preserve_trans. * app/core/Makefile.am * app/core/core-types.h * app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a ref'ed GimpItem pointer so (1) this doesn't need to be done by all undo steps related to an item and (2) the item the undo step is for can be determined from outside the undo system. * app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item() which returns a new GimpItemUndo. * app/core/gimpimage-undo-push.[ch]: use it for all item related undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable and GimpVectors pointers from the private undo structs. Added undo push functions for the new undo types added above. * app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added "gboolean push_undo" parameter. * app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode, _preserve_trans, _linked): added "gboolean push_undo" parameters. * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimplayer-floating-sel.c * app/tools/gimpmovetool.c * app/xcf/xcf-load.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c: changed accordingly. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to the foo_accessors() functions. Removed $func from foo_accesors() because we don't manipulate items without using getters/setters any longer. * app/pdb/channel_cmds.c * app/pdb/layer_cmds.c: regenerated. * app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal which carries an additional "GdkModifierType state" parameter as in GimpCellRendererViewable . * app/widgets/gimpcontainertreeview.c: emit "clicked" from the toggle renderer, not "toggled" so the callbacks get the modifier state. * app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive visible by <shift>+click" feature as in 1.2. * app/widgets/gimplayertreeview.c: compress layer opacity undos by looking at the top of the undo stack and not pushing an undo if there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active layer.
2003-03-18 02:02:41 +08:00
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_SIZE, /*< desc="Image size" >*/
GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Image resolution change" >*/
GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/
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_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_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, /*< desc="Suspend group layer resize" >*/
GIMP_UNDO_GROUP_LAYER_RESUME, /*< desc="Resume group layer resize" >*/
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_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, /*< desc="Transform" >*/
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_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,
Replaced the concept of having a boolean indicating if an undo step 2004-07-29 Michael Natterer <mitch@gimp.org> Replaced the concept of having a boolean indicating if an undo step dirties the image by a bitfield indicating which parts of the image are dirtied: * app/core/core-enums.[ch]: reordered two values in enum GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask. The values of GimpDirtyMask are still questionable and will probably change... * app/core/gimpimage.[ch]: removed signal "undo_start" and added a GimpDirtyMask parameter to the "dirty" and "clean" signals. * app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced "gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass it to gimp_image_dirty(). (gimp_image_undo_group_start): added *ugly* code which tries to figure GimpDirtyMask from the group's GimpUndoType and store it in the GimpUndoGroup. Call gimp_image_dirty() instead of the removed gimp_image_undo_start(). This means the undo group now dirties the image just like one of its undo steps, but that's no problem since undoing cleans it in the same way. * app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g (gimp_undo_pop): emit clean/dirty signals *before* performing the actual undo step so listeners can detach from the image before it is changed by undo. * app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push(). * app/core/gimpimagemap.[ch]: removed "gboolean interactive" because it makes no sense to use GimpImageMap noninteractively. Don't freeze()/thaw() undo while the image_map is active which fixes many ways of trashing the image's undo state but probably introduces new ways of doing evil things. * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell-handlers.c: changed according to the GimpImage::clean()/dirty() signal changes. Small fixes in the quit dialog's dirty image container. * app/tools/gimptoolcontrol.[ch]: added member and API to set/get the dirty_mask. * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpiscissorstool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c: whenever setting "preserve" to FALSE, also set a "dirty_mask" which specifies on which image changes the tool wants to be canceled. * app/tools/tool_manager.c: removed "undo_start" connection and connect to both "dirty" *and* "clean" to check if the active_tool needs to be canceled. Cancel the tool only if the dirty_mask passed in the signal has common bits with the tool's dirty_mask. Fixes bug #109561 and probably opens some new ones...
2004-07-29 22:16:21 +08:00
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_ALL = 0xffff
} GimpDirtyMask;
#define GIMP_TYPE_OFFSET_TYPE (gimp_offset_type_get_type ())
GType gimp_offset_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_OFFSET_BACKGROUND,
GIMP_OFFSET_TRANSPARENT
} GimpOffsetType;
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
#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,
GIMP_GRADIENT_COLOR_FOREGROUND,
GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT,
GIMP_GRADIENT_COLOR_BACKGROUND,
GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT
} GimpGradientColor;
#define GIMP_TYPE_GRADIENT_SEGMENT_TYPE (gimp_gradient_segment_type_get_type ())
GType gimp_gradient_segment_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_GRADIENT_SEGMENT_LINEAR,
GIMP_GRADIENT_SEGMENT_CURVED,
GIMP_GRADIENT_SEGMENT_SINE,
GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING,
GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING
} GimpGradientSegmentType;
#define GIMP_TYPE_GRADIENT_SEGMENT_COLOR (gimp_gradient_segment_color_get_type ())
GType gimp_gradient_segment_color_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_GRADIENT_SEGMENT_RGB, /* normal RGB */
GIMP_GRADIENT_SEGMENT_HSV_CCW, /* counterclockwise hue */
GIMP_GRADIENT_SEGMENT_HSV_CW /* clockwise hue */
} GimpGradientSegmentColor;
#define GIMP_TYPE_MASK_APPLY_MODE (gimp_mask_apply_mode_get_type ())
GType gimp_mask_apply_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_MASK_APPLY,
GIMP_MASK_DISCARD
} GimpMaskApplyMode;
#define GIMP_TYPE_MERGE_TYPE (gimp_merge_type_get_type ())
GType gimp_merge_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_EXPAND_AS_NECESSARY,
GIMP_CLIP_TO_IMAGE,
GIMP_CLIP_TO_BOTTOM_LAYER,
GIMP_FLATTEN_IMAGE
} GimpMergeType;
#define GIMP_TYPE_SELECT_CRITERION (gimp_select_criterion_get_type ())
GType gimp_select_criterion_get_type (void) G_GNUC_CONST;
Added message severities and make sure all messages are routed through a 2006-10-09 Michael Natterer <mitch@gimp.org> Added message severities and make sure all messages are routed through a central function, so redirecting to the error console or stderr work again: * app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO, WARNING, ERROR }. * app/core/gimp.[ch] (gimp_message) (gimp_message_valist): added severity parameter. Changed "GimpProgress *progress" parameter to "GObject *handler", where "handler" can be either a GimpProgress, a GtkWidget or NULL. * app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor --console-messages again. Always dispatch to the GUI message handler first if it exists. * app/gui/gui-message.[ch]: pass severity parameters around. (gui_message_error_dialog): if "handler" is a progress, dispatch the message to it first. If it is a widget (and *not* a progress), use a GtkMessageDialog on top of that widget's toplevel. Fall back to the usual GimpErrorDialog otherwise. * app/core/gimpprogress.[ch] (gimp_progress_message): added severity parameter. Also added boolean return value to the virtual function so it can decide to fail if it can't handle the message. * app/display/gimpdisplay.c: implement GimpProgress::message() and redirect the message to GimpDisplayShell. * app/display/gimpdisplayshell-progress.c: implement GimpProgress::message() and redirect the message to GimpStatusbar if it is not an error and if the status bar is visible. * app/display/gimpstatusbar.[ch]: implement GimpProgress::message(), but fail on messages that contain a newline. Show the right icons for the message severities (work in progress). * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_message() and its _valist() variant. * app/widgets/gimperrorconsole.[ch]: show the right icons for the message severities. * app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message): return TRUE to swallow all messages. * app/widgets/gimpwidgets-utils.[ch]: removed gimp_show_message_dialog(). Added gimp_get_message_stock_id(). * app/errors.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/select-commands.c * app/actions/text-editor-commands.c * app/actions/vectors-commands.c * app/core/gimpimage-convert.c * app/core/gimpimagefile.c * app/dialogs/convert-dialog.c * app/dialogs/file-open-dialog.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/pdb/gimppdb.c * app/plug-in/gimpplugin.c * app/tools/gimpimagemaptool.c * app/tools/gimptool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimppdbdialog.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette.pdb: added severity parameter to gimp_message() calls. Convert all calls to gimp_show_message_dialog() and gimp_display_shell_message() to gimp_message(). Also converted some more g_message() calls. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-09 16:17:22 +08:00
typedef enum
{
GIMP_SELECT_CRITERION_COMPOSITE, /*< desc="Composite" >*/
GIMP_SELECT_CRITERION_R, /*< desc="Red" >*/
GIMP_SELECT_CRITERION_G, /*< desc="Green" >*/
GIMP_SELECT_CRITERION_B, /*< desc="Blue" >*/
GIMP_SELECT_CRITERION_H, /*< desc="Hue" >*/
GIMP_SELECT_CRITERION_S, /*< desc="Saturation" >*/
GIMP_SELECT_CRITERION_V /*< desc="Value" >*/
} GimpSelectCriterion;
Added message severities and make sure all messages are routed through a 2006-10-09 Michael Natterer <mitch@gimp.org> Added message severities and make sure all messages are routed through a central function, so redirecting to the error console or stderr work again: * app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO, WARNING, ERROR }. * app/core/gimp.[ch] (gimp_message) (gimp_message_valist): added severity parameter. Changed "GimpProgress *progress" parameter to "GObject *handler", where "handler" can be either a GimpProgress, a GtkWidget or NULL. * app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor --console-messages again. Always dispatch to the GUI message handler first if it exists. * app/gui/gui-message.[ch]: pass severity parameters around. (gui_message_error_dialog): if "handler" is a progress, dispatch the message to it first. If it is a widget (and *not* a progress), use a GtkMessageDialog on top of that widget's toplevel. Fall back to the usual GimpErrorDialog otherwise. * app/core/gimpprogress.[ch] (gimp_progress_message): added severity parameter. Also added boolean return value to the virtual function so it can decide to fail if it can't handle the message. * app/display/gimpdisplay.c: implement GimpProgress::message() and redirect the message to GimpDisplayShell. * app/display/gimpdisplayshell-progress.c: implement GimpProgress::message() and redirect the message to GimpStatusbar if it is not an error and if the status bar is visible. * app/display/gimpstatusbar.[ch]: implement GimpProgress::message(), but fail on messages that contain a newline. Show the right icons for the message severities (work in progress). * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_message() and its _valist() variant. * app/widgets/gimperrorconsole.[ch]: show the right icons for the message severities. * app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message): return TRUE to swallow all messages. * app/widgets/gimpwidgets-utils.[ch]: removed gimp_show_message_dialog(). Added gimp_get_message_stock_id(). * app/errors.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/select-commands.c * app/actions/text-editor-commands.c * app/actions/vectors-commands.c * app/core/gimpimage-convert.c * app/core/gimpimagefile.c * app/dialogs/convert-dialog.c * app/dialogs/file-open-dialog.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/pdb/gimppdb.c * app/plug-in/gimpplugin.c * app/tools/gimpimagemaptool.c * app/tools/gimptool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimppdbdialog.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette.pdb: added severity parameter to gimp_message() calls. Convert all calls to gimp_show_message_dialog() and gimp_display_shell_message() to gimp_message(). Also converted some more g_message() calls. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-09 16:17:22 +08:00
#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" >*/
} GimpMessageSeverity;
#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 RGB workspace" >*/
} GimpColorProfilePolicy;
2010-02-22 06:41:55 +08:00
#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_ASPECT_RATIO, /*< desc="Aspect ratio" >*/
2010-02-22 06:41:55 +08:00
GIMP_DYNAMICS_OUTPUT_SPACING, /*< desc="Spacing" >*/
GIMP_DYNAMICS_OUTPUT_RATE, /*< desc="Rate" >*/
2010-03-15 01:09:55 +08:00
GIMP_DYNAMICS_OUTPUT_FLOW, /*< desc="Flow" >*/
GIMP_DYNAMICS_OUTPUT_JITTER, /*< desc="Jitter" >*/
2010-02-22 06:41:55 +08:00
} GimpDynamicsOutputType;
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_FIRST_PROP = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_FIRST_PROP,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
Fixed incomplete core/ui separation of paint tools and paint methods: 2005-12-27 Michael Natterer <mitch@gimp.org> Fixed incomplete core/ui separation of paint tools and paint methods: * app/core/core-enums.h * app/core/gimpcontext.[ch]: added a "paint-info" property and API so the current paint method can be selected without the need for an active tool. (gimp_context_real_set_tool): set the paint-info to tool_info->paint_info so the paint method follows the active tool just as the active image follows the active display. * app/core/gimp.h (struct Gimp) * app/core/gimppaintinfo.[ch]: added "standard_paint_info" API and stuff to be consistent with other context object properties. * app/paint/gimp-paint.c: set the paintbrush as standard_paint_info. * app/core/gimpstrokedesc.c (gimp_stroke_desc_new): removed the hack of falling back to the paintbrush when there is no active tool and use the active paint method instead. Fall back to the standard paint method if there is no active one. (nothing in the core uses the active tool any more now). * app/widgets/gimpdeviceinfo.h: add the paint info to the properties which are saved in devicerc. Added identifiers (names) and stock-ids to GimpPaintInfo: * app/core/gimppaintinfo.[ch] (gimp_paint_info_new): added identifier and stock-id parameters. * app/core/gimptoolinfo.c (gimp_tool_info_new): removed the hack of setting the paint-info stock-id from the tool-info stock-id. * app/paint/paint-types.h * app/paint/gimp-paint.c: changed GimpPaintRegisterCallback accordingly. * app/tools/gimp-tools.c (gimp_tools_register): changed paint info names accordingly. * app/paint/*.c (gimp_*_register): pass identifier and stock-id accordingly.
2005-12-28 02:57:01 +08:00
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,
2009-10-03 21:08:15 +08:00
GIMP_CONTEXT_PROP_DYNAMICS = 11,
GIMP_CONTEXT_PROP_PATTERN = 12,
GIMP_CONTEXT_PROP_GRADIENT = 13,
GIMP_CONTEXT_PROP_PALETTE = 14,
2010-04-03 23:25:31 +08:00
GIMP_CONTEXT_PROP_TOOL_PRESET= 15,
GIMP_CONTEXT_PROP_FONT = 16,
GIMP_CONTEXT_PROP_BUFFER = 17,
GIMP_CONTEXT_PROP_IMAGEFILE = 18,
GIMP_CONTEXT_PROP_TEMPLATE = 19,
2009-10-03 21:08:15 +08:00
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_TEMPLATE
} GimpContextPropType;
typedef enum /*< pdb-skip, skip >*/
{
GIMP_CONTEXT_IMAGE_MASK = 1 << 2,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 3,
GIMP_CONTEXT_TOOL_MASK = 1 << 4,
Fixed incomplete core/ui separation of paint tools and paint methods: 2005-12-27 Michael Natterer <mitch@gimp.org> Fixed incomplete core/ui separation of paint tools and paint methods: * app/core/core-enums.h * app/core/gimpcontext.[ch]: added a "paint-info" property and API so the current paint method can be selected without the need for an active tool. (gimp_context_real_set_tool): set the paint-info to tool_info->paint_info so the paint method follows the active tool just as the active image follows the active display. * app/core/gimp.h (struct Gimp) * app/core/gimppaintinfo.[ch]: added "standard_paint_info" API and stuff to be consistent with other context object properties. * app/paint/gimp-paint.c: set the paintbrush as standard_paint_info. * app/core/gimpstrokedesc.c (gimp_stroke_desc_new): removed the hack of falling back to the paintbrush when there is no active tool and use the active paint method instead. Fall back to the standard paint method if there is no active one. (nothing in the core uses the active tool any more now). * app/widgets/gimpdeviceinfo.h: add the paint info to the properties which are saved in devicerc. Added identifiers (names) and stock-ids to GimpPaintInfo: * app/core/gimppaintinfo.[ch] (gimp_paint_info_new): added identifier and stock-id parameters. * app/core/gimptoolinfo.c (gimp_tool_info_new): removed the hack of setting the paint-info stock-id from the tool-info stock-id. * app/paint/paint-types.h * app/paint/gimp-paint.c: changed GimpPaintRegisterCallback accordingly. * app/tools/gimp-tools.c (gimp_tools_register): changed paint info names accordingly. * app/paint/*.c (gimp_*_register): pass identifier and stock-id accordingly.
2005-12-28 02:57:01 +08:00
GIMP_CONTEXT_PAINT_INFO_MASK = 1 << 5,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 6,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 7,
GIMP_CONTEXT_OPACITY_MASK = 1 << 8,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 9,
GIMP_CONTEXT_BRUSH_MASK = 1 << 10,
2009-10-03 21:08:15 +08:00
GIMP_CONTEXT_DYNAMICS_MASK = 1 << 11,
GIMP_CONTEXT_PATTERN_MASK = 1 << 12,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 13,
GIMP_CONTEXT_PALETTE_MASK = 1 << 14,
GIMP_CONTEXT_FONT_MASK = 1 << 15,
GIMP_CONTEXT_BUFFER_MASK = 1 << 16,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 17,
GIMP_CONTEXT_TEMPLATE_MASK = 1 << 18,
/* aliases */
GIMP_CONTEXT_PAINT_PROPS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_BRUSH_MASK |
2009-08-20 07:31:59 +08:00
GIMP_CONTEXT_DYNAMICS_MASK |
GIMP_CONTEXT_PATTERN_MASK |
GIMP_CONTEXT_GRADIENT_MASK),
GIMP_CONTEXT_ALL_PROPS_MASK = (GIMP_CONTEXT_IMAGE_MASK |
GIMP_CONTEXT_DISPLAY_MASK |
GIMP_CONTEXT_TOOL_MASK |
Fixed incomplete core/ui separation of paint tools and paint methods: 2005-12-27 Michael Natterer <mitch@gimp.org> Fixed incomplete core/ui separation of paint tools and paint methods: * app/core/core-enums.h * app/core/gimpcontext.[ch]: added a "paint-info" property and API so the current paint method can be selected without the need for an active tool. (gimp_context_real_set_tool): set the paint-info to tool_info->paint_info so the paint method follows the active tool just as the active image follows the active display. * app/core/gimp.h (struct Gimp) * app/core/gimppaintinfo.[ch]: added "standard_paint_info" API and stuff to be consistent with other context object properties. * app/paint/gimp-paint.c: set the paintbrush as standard_paint_info. * app/core/gimpstrokedesc.c (gimp_stroke_desc_new): removed the hack of falling back to the paintbrush when there is no active tool and use the active paint method instead. Fall back to the standard paint method if there is no active one. (nothing in the core uses the active tool any more now). * app/widgets/gimpdeviceinfo.h: add the paint info to the properties which are saved in devicerc. Added identifiers (names) and stock-ids to GimpPaintInfo: * app/core/gimppaintinfo.[ch] (gimp_paint_info_new): added identifier and stock-id parameters. * app/core/gimptoolinfo.c (gimp_tool_info_new): removed the hack of setting the paint-info stock-id from the tool-info stock-id. * app/paint/paint-types.h * app/paint/gimp-paint.c: changed GimpPaintRegisterCallback accordingly. * app/tools/gimp-tools.c (gimp_tools_register): changed paint info names accordingly. * app/paint/*.c (gimp_*_register): pass identifier and stock-id accordingly.
2005-12-28 02:57:01 +08:00
GIMP_CONTEXT_PAINT_INFO_MASK |
GIMP_CONTEXT_PALETTE_MASK |
GIMP_CONTEXT_FONT_MASK |
GIMP_CONTEXT_BUFFER_MASK |
GIMP_CONTEXT_IMAGEFILE_MASK |
GIMP_CONTEXT_TEMPLATE_MASK |
GIMP_CONTEXT_PAINT_PROPS_MASK)
} 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__ */