Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-18 23:41:39 +00:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
#ifndef __APPTYPES_H__
|
|
|
|
#define __APPTYPES_H__
|
|
|
|
|
|
|
|
/* To avoid problems with headers including each others like spaghetti
|
|
|
|
* (even recursively), and various types not being defined when they
|
|
|
|
* are needed depending on the order you happen to include headers,
|
|
|
|
* this file defines those enumeration and opaque struct types that
|
|
|
|
* don't depend on any other header. These problems began creeping up
|
|
|
|
* when we started to actually use these enums in function prototypes.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Should we instead use the enums in libgimp/gimpenums.h? */
|
|
|
|
|
|
|
|
/* Base image types */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
RGB,
|
|
|
|
GRAY,
|
|
|
|
INDEXED
|
|
|
|
} GimpImageBaseType;
|
|
|
|
|
|
|
|
/* Image types */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
RGB_GIMAGE, /*< nick=RGB_IMAGE >*/
|
|
|
|
RGBA_GIMAGE, /*< nick=RGBA_IMAGE >*/
|
|
|
|
GRAY_GIMAGE, /*< nick=GRAY_IMAGE >*/
|
|
|
|
GRAYA_GIMAGE, /*< nick=GRAYA_IMAGE >*/
|
|
|
|
INDEXED_GIMAGE, /*< nick=INDEXED_IMAGE >*/
|
|
|
|
INDEXEDA_GIMAGE /*< nick=INDEXEDA_IMAGE >*/
|
|
|
|
} GimpImageType;
|
|
|
|
|
|
|
|
/* Fill types */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
FOREGROUND_FILL, /*< nick=FG_IMAGE_FILL >*/
|
|
|
|
BACKGROUND_FILL, /*< nick=BG_IMAGE_FILL >*/
|
|
|
|
WHITE_FILL, /*< nick=WHITE_IMAGE_FILL >*/
|
|
|
|
TRANSPARENT_FILL, /*< nick=TRANS_IMAGE_FILL >*/
|
|
|
|
NO_FILL /*< nick=NO_IMAGE_FILL >*/
|
|
|
|
} GimpFillType;
|
|
|
|
|
|
|
|
/* Layer modes */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
NORMAL_MODE,
|
|
|
|
DISSOLVE_MODE,
|
|
|
|
BEHIND_MODE,
|
|
|
|
MULTIPLY_MODE,
|
|
|
|
SCREEN_MODE,
|
|
|
|
OVERLAY_MODE,
|
|
|
|
DIFFERENCE_MODE,
|
|
|
|
ADDITION_MODE,
|
|
|
|
SUBTRACT_MODE,
|
|
|
|
DARKEN_ONLY_MODE,
|
|
|
|
LIGHTEN_ONLY_MODE,
|
|
|
|
HUE_MODE,
|
|
|
|
SATURATION_MODE,
|
|
|
|
COLOR_MODE,
|
|
|
|
VALUE_MODE,
|
|
|
|
DIVIDE_MODE,
|
|
|
|
ERASE_MODE, /*< skip >*/
|
|
|
|
REPLACE_MODE, /*< skip >*/
|
1999-08-31 02:00:34 +00:00
|
|
|
ANTI_ERASE_MODE /*< skip >*/
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-18 23:41:39 +00:00
|
|
|
} LayerModeEffects;
|
|
|
|
|
|
|
|
/* Types of convolutions */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
NORMAL_CONVOL, /* Negative numbers truncated */
|
|
|
|
ABSOLUTE_CONVOL, /* Absolute value */
|
|
|
|
NEGATIVE_CONVOL /* add 127 to values */
|
|
|
|
} ConvolutionType;
|
|
|
|
|
|
|
|
/* Brush application types */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
HARD, /* pencil */
|
|
|
|
SOFT, /* paintbrush */
|
|
|
|
PRESSURE /* paintbrush with variable pressure */
|
|
|
|
} BrushApplicationMode;
|
|
|
|
|
|
|
|
/* Paint application modes */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
CONSTANT, /*< nick=CONTINUOUS >*/ /* pencil, paintbrush, airbrush, clone */
|
|
|
|
INCREMENTAL /* convolve, smudge */
|
|
|
|
} PaintApplicationMode;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
APPLY,
|
|
|
|
DISCARD
|
|
|
|
} MaskApplyMode;
|
|
|
|
|
|
|
|
typedef enum /*< chop=ADD_ >*/
|
|
|
|
{
|
|
|
|
ADD_WHITE_MASK,
|
|
|
|
ADD_BLACK_MASK,
|
|
|
|
ADD_ALPHA_MASK
|
|
|
|
} AddMaskType;
|
|
|
|
|
1999-08-19 03:51:33 +00:00
|
|
|
/* gradient paint modes */
|
|
|
|
typedef enum {
|
|
|
|
ONCE_FORWARD, /* paint through once, then stop */
|
|
|
|
ONCE_BACKWARDS, /* paint once, then stop, but run the gradient the other way */
|
|
|
|
LOOP_SAWTOOTH, /* keep painting, looping through the grad start->end,start->end /|/|/| */
|
|
|
|
LOOP_TRIANGLE, /* keep paiting, looping though the grad start->end,end->start /\/\/\/ */
|
1999-08-31 02:00:34 +00:00
|
|
|
ONCE_END_COLOR /* paint once, but keep painting with the end color */
|
1999-08-19 03:51:33 +00:00
|
|
|
} GradientPaintMode;
|
|
|
|
|
|
|
|
|
1999-08-20 10:06:54 +00:00
|
|
|
/* gradient paint modes */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
LINEAR_INTERPOLATION,
|
|
|
|
CUBIC_INTERPOLATION,
|
|
|
|
NEAREST_NEIGHBOR_INTERPOLATION
|
|
|
|
} InterpolationType;
|
|
|
|
|
Overhaul of pixmap brushes and pipes: No separate pixmap pipe
brush tool any longer. The paintbrush, airbrush and pencil
tools, which already knew how to handle the single-pixmap
brushes now also handle the pipes as well.
* app/pixmapbrush.{h,c}
* app/gimpbrushpixmap.{h,c}: Removed these files.
* app/Makefile.am
* app/makefile.{cygwin,msc}: Remove from here, too.
* app/gimpbrushpipe.{h,c}: Total overhaul.
* app/paint_core.h
* app/apptypes.h: Some more types moved to apptypes.h
* app/context_manager.c
* app/tool_options.c
* app/tools.c
* app/toolsF.h: Remove PIXMAPBRUSH tool.
* app/gimpbrush.h: New method: select_brush. Used to change the
brush in paint_core, for pipe brushes.
* app/gimpbrush.c: Add gimp_brush_select_brush, which is dummy for
the normal brushes (returns the same brush).
* app/paint_core.c: Call the brush's select_brush method to get a
potential new brush before calling the paint_func.
* app/gimpbrushlist.c: Various changes related to the pixmap and
pipe overhaul.
* app/airbrush.c
* app/pencil.c: Reorder code a bit in the tool motion function to
avoid executing unnecessary code in the case of a pixmap brush.
Other changes in the same commit:
* app/install.c: Make quote_spaces extern.
* app/appenv.h: Declare it.
* libgimp/gimpui.def: Add missing entry points.
* libgimp/makefile.{cygwin,msc}: Add missing objects to gimpui.
1999-08-26 00:54:30 +00:00
|
|
|
typedef struct _GimpChannel GimpChannel;
|
|
|
|
typedef struct _GimpChannelClass GimpChannelClass;
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-18 23:41:39 +00:00
|
|
|
|
|
|
|
typedef GimpChannel Channel; /* convenience */
|
|
|
|
|
Overhaul of pixmap brushes and pipes: No separate pixmap pipe
brush tool any longer. The paintbrush, airbrush and pencil
tools, which already knew how to handle the single-pixmap
brushes now also handle the pipes as well.
* app/pixmapbrush.{h,c}
* app/gimpbrushpixmap.{h,c}: Removed these files.
* app/Makefile.am
* app/makefile.{cygwin,msc}: Remove from here, too.
* app/gimpbrushpipe.{h,c}: Total overhaul.
* app/paint_core.h
* app/apptypes.h: Some more types moved to apptypes.h
* app/context_manager.c
* app/tool_options.c
* app/tools.c
* app/toolsF.h: Remove PIXMAPBRUSH tool.
* app/gimpbrush.h: New method: select_brush. Used to change the
brush in paint_core, for pipe brushes.
* app/gimpbrush.c: Add gimp_brush_select_brush, which is dummy for
the normal brushes (returns the same brush).
* app/paint_core.c: Call the brush's select_brush method to get a
potential new brush before calling the paint_func.
* app/gimpbrushlist.c: Various changes related to the pixmap and
pipe overhaul.
* app/airbrush.c
* app/pencil.c: Reorder code a bit in the tool motion function to
avoid executing unnecessary code in the case of a pixmap brush.
Other changes in the same commit:
* app/install.c: Make quote_spaces extern.
* app/appenv.h: Declare it.
* libgimp/gimpui.def: Add missing entry points.
* libgimp/makefile.{cygwin,msc}: Add missing objects to gimpui.
1999-08-26 00:54:30 +00:00
|
|
|
typedef struct _GimpLayer GimpLayer;
|
|
|
|
typedef struct _GimpLayerClass GimpLayerClass;
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-18 23:41:39 +00:00
|
|
|
typedef struct _GimpLayerMask GimpLayerMask;
|
|
|
|
typedef struct _GimpLayerMaskClass GimpLayerMaskClass;
|
|
|
|
|
|
|
|
typedef GimpLayer Layer; /* convenience */
|
|
|
|
typedef GimpLayerMask LayerMask; /* convenience */
|
|
|
|
|
Overhaul of pixmap brushes and pipes: No separate pixmap pipe
brush tool any longer. The paintbrush, airbrush and pencil
tools, which already knew how to handle the single-pixmap
brushes now also handle the pipes as well.
* app/pixmapbrush.{h,c}
* app/gimpbrushpixmap.{h,c}: Removed these files.
* app/Makefile.am
* app/makefile.{cygwin,msc}: Remove from here, too.
* app/gimpbrushpipe.{h,c}: Total overhaul.
* app/paint_core.h
* app/apptypes.h: Some more types moved to apptypes.h
* app/context_manager.c
* app/tool_options.c
* app/tools.c
* app/toolsF.h: Remove PIXMAPBRUSH tool.
* app/gimpbrush.h: New method: select_brush. Used to change the
brush in paint_core, for pipe brushes.
* app/gimpbrush.c: Add gimp_brush_select_brush, which is dummy for
the normal brushes (returns the same brush).
* app/paint_core.c: Call the brush's select_brush method to get a
potential new brush before calling the paint_func.
* app/gimpbrushlist.c: Various changes related to the pixmap and
pipe overhaul.
* app/airbrush.c
* app/pencil.c: Reorder code a bit in the tool motion function to
avoid executing unnecessary code in the case of a pixmap brush.
Other changes in the same commit:
* app/install.c: Make quote_spaces extern.
* app/appenv.h: Declare it.
* libgimp/gimpui.def: Add missing entry points.
* libgimp/makefile.{cygwin,msc}: Add missing objects to gimpui.
1999-08-26 00:54:30 +00:00
|
|
|
typedef struct _paint_core PaintCore;
|
|
|
|
|
|
|
|
typedef struct _GimpBrush GimpBrush;
|
|
|
|
typedef struct _GimpBrush *GimpBrushP;
|
|
|
|
typedef struct _GimpBrushClass GimpBrushClass;
|
|
|
|
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-18 23:41:39 +00:00
|
|
|
typedef struct _layer_undo LayerUndo;
|
|
|
|
|
|
|
|
typedef struct _layer_mask_undo LayerMaskUndo;
|
|
|
|
|
|
|
|
typedef struct _fs_to_layer_undo FStoLayerUndo;
|
|
|
|
|
|
|
|
typedef struct _PlugIn PlugIn;
|
|
|
|
typedef struct _PlugInDef PlugInDef;
|
|
|
|
typedef struct _PlugInProcDef PlugInProcDef;
|
|
|
|
|
|
|
|
#endif /* __APPTYPES_H__ */
|