From 7b7cd6da61b1fcc0f2a3ecce2cb9e6c42782c717 Mon Sep 17 00:00:00 2001 From: Henning Makholm Date: Fri, 27 Jan 2006 18:00:00 -0500 Subject: Import of release 0.7 --- (limited to 'gimp') diff --git a/gimp/base-enums.h b/gimp/base-enums.h new file mode 100644 index 0000000..a5b2094 --- /dev/null +++ b/gimp/base-enums.h @@ -0,0 +1,146 @@ +/* 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 __BASE_ENUMS_H__ +#define __BASE_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 + /*< 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 >*/. + + The same syntax applies to enum values. +#endif + + +/* + * these enums that are registered with the type system + */ + +#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ()) + +GType gimp_curve_type_get_type (void) G_GNUC_CONST; + +typedef enum /*< pdb-skip >*/ +{ + GIMP_CURVE_SMOOTH, /*< desc="Smooth" >*/ + GIMP_CURVE_FREE /*< desc="Freehand" >*/ +} GimpCurveType; + + +#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ()) + +GType gimp_histogram_channel_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_HISTOGRAM_VALUE = 0, /*< desc="Value" >*/ + GIMP_HISTOGRAM_RED = 1, /*< desc="Red" >*/ + GIMP_HISTOGRAM_GREEN = 2, /*< desc="Green" >*/ + GIMP_HISTOGRAM_BLUE = 3, /*< desc="Blue" >*/ + GIMP_HISTOGRAM_ALPHA = 4, /*< desc="Alpha" >*/ + GIMP_HISTOGRAM_RGB = 5 /*< desc="RGB", pdb-skip >*/ +} GimpHistogramChannel; + + +#define GIMP_TYPE_INTERPOLATION_TYPE (gimp_interpolation_type_get_type ()) + +GType gimp_interpolation_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_INTERPOLATION_NONE, /*< desc="None (Fastest)" >*/ + GIMP_INTERPOLATION_LINEAR, /*< desc="Linear" >*/ + GIMP_INTERPOLATION_CUBIC /*< desc="Cubic (Best)" >*/ +} GimpInterpolationType; + + +#define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ()) + +GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_NORMAL_MODE, + GIMP_DISSOLVE_MODE, + GIMP_BEHIND_MODE, + GIMP_MULTIPLY_MODE, + GIMP_SCREEN_MODE, + GIMP_OVERLAY_MODE, + GIMP_DIFFERENCE_MODE, + GIMP_ADDITION_MODE, + GIMP_SUBTRACT_MODE, + GIMP_DARKEN_ONLY_MODE, + GIMP_LIGHTEN_ONLY_MODE, + GIMP_HUE_MODE, + GIMP_SATURATION_MODE, + GIMP_COLOR_MODE, + GIMP_VALUE_MODE, + GIMP_DIVIDE_MODE, + GIMP_DODGE_MODE, + GIMP_BURN_MODE, + GIMP_HARDLIGHT_MODE, + GIMP_SOFTLIGHT_MODE, + GIMP_GRAIN_EXTRACT_MODE, + GIMP_GRAIN_MERGE_MODE, + GIMP_COLOR_ERASE_MODE, + GIMP_ERASE_MODE, /*< pdb-skip, skip >*/ + GIMP_REPLACE_MODE, /*< pdb-skip, skip >*/ + GIMP_ANTI_ERASE_MODE /*< pdb-skip, skip >*/ +} GimpLayerModeEffects; + + +#define GIMP_TYPE_TRANSFER_MODE (gimp_transfer_mode_get_type ()) + +GType gimp_transfer_mode_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_SHADOWS, /*< desc="Shadows" >*/ + GIMP_MIDTONES, /*< desc="Midtones" >*/ + GIMP_HIGHLIGHTS /*< desc="Highlights" >*/ +} GimpTransferMode; + + +/* + * non-registered enums; register them if needed + */ + +typedef enum /*< skip >*/ +{ + GIMP_NORMAL_CONVOL, /* Negative numbers truncated */ + GIMP_ABSOLUTE_CONVOL, /* Absolute value */ + GIMP_NEGATIVE_CONVOL /* add 127 to values */ +} GimpConvolutionType; + +typedef enum /*< skip >*/ +{ + GIMP_ALL_HUES, + GIMP_RED_HUES, + GIMP_YELLOW_HUES, + GIMP_GREEN_HUES, + GIMP_CYAN_HUES, + GIMP_BLUE_HUES, + GIMP_MAGENTA_HUES +} GimpHueRange; + + +#endif /* __BASE_ENUMS_H__ */ diff --git a/gimp/gimpbaseenums.h b/gimp/gimpbaseenums.h new file mode 100644 index 0000000..d41d75d --- /dev/null +++ b/gimp/gimpbaseenums.h @@ -0,0 +1,196 @@ +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GIMP_BASE_ENUMS_H__ +#define __GIMP_BASE_ENUMS_H__ + + +G_BEGIN_DECLS + +/* For information look into the C source or the html documentation */ + + +#define GIMP_TYPE_CHECK_SIZE (gimp_check_size_get_type ()) + +GType gimp_check_size_get_type (void) G_GNUC_CONST; + +typedef enum /*< pdb-skip >*/ +{ + GIMP_CHECK_SIZE_SMALL_CHECKS = 0, /*< desc="Small" >*/ + GIMP_CHECK_SIZE_MEDIUM_CHECKS = 1, /*< desc="Medium" >*/ + GIMP_CHECK_SIZE_LARGE_CHECKS = 2 /*< desc="Large" >*/ +} GimpCheckSize; + + +#define GIMP_TYPE_CHECK_TYPE (gimp_check_type_get_type ()) + +GType gimp_check_type_get_type (void) G_GNUC_CONST; + +typedef enum /*< pdb-skip >*/ +{ + GIMP_CHECK_TYPE_LIGHT_CHECKS = 0, /*< desc="Light Checks" >*/ + GIMP_CHECK_TYPE_GRAY_CHECKS = 1, /*< desc="Mid-Tone Checks" >*/ + GIMP_CHECK_TYPE_DARK_CHECKS = 2, /*< desc="Dark Checks" >*/ + GIMP_CHECK_TYPE_WHITE_ONLY = 3, /*< desc="White Only" >*/ + GIMP_CHECK_TYPE_GRAY_ONLY = 4, /*< desc="Gray Only" >*/ + GIMP_CHECK_TYPE_BLACK_ONLY = 5 /*< desc="Black Only" >*/ +} GimpCheckType; + + +#define GIMP_TYPE_IMAGE_BASE_TYPE (gimp_image_base_type_get_type ()) + +GType gimp_image_base_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_RGB, /*< desc="RGB color" >*/ + GIMP_GRAY, /*< desc="Grayscale" >*/ + GIMP_INDEXED /*< desc="Indexed color" >*/ +} GimpImageBaseType; + + +#define GIMP_TYPE_IMAGE_TYPE (gimp_image_type_get_type ()) + +GType gimp_image_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_RGB_IMAGE, /*< desc="RGB" >*/ + GIMP_RGBA_IMAGE, /*< desc="RGB-alpha" >*/ + GIMP_GRAY_IMAGE, /*< desc="Grayscale" >*/ + GIMP_GRAYA_IMAGE, /*< desc="Grayscale-alpha" >*/ + GIMP_INDEXED_IMAGE, /*< desc="Indexed" >*/ + GIMP_INDEXEDA_IMAGE /*< desc="Indexed-alpha" >*/ +} GimpImageType; + + +typedef enum /*< skip >*/ +{ + GIMP_UNIT_PIXEL = 0, + + GIMP_UNIT_INCH = 1, + GIMP_UNIT_MM = 2, + GIMP_UNIT_POINT = 3, + GIMP_UNIT_PICA = 4, + + GIMP_UNIT_END = 5, + + GIMP_UNIT_PERCENT = 65536 /*< pdb-skip >*/ +} GimpUnit; + + +#define GIMP_TYPE_PDB_ARG_TYPE (gimp_pdb_arg_type_get_type ()) + +GType gimp_pdb_arg_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_PDB_INT32, + GIMP_PDB_INT16, + GIMP_PDB_INT8, + GIMP_PDB_FLOAT, + GIMP_PDB_STRING, + GIMP_PDB_INT32ARRAY, + GIMP_PDB_INT16ARRAY, + GIMP_PDB_INT8ARRAY, + GIMP_PDB_FLOATARRAY, + GIMP_PDB_STRINGARRAY, + GIMP_PDB_COLOR, + GIMP_PDB_REGION, + GIMP_PDB_DISPLAY, + GIMP_PDB_IMAGE, + GIMP_PDB_LAYER, + GIMP_PDB_CHANNEL, + GIMP_PDB_DRAWABLE, + GIMP_PDB_SELECTION, + GIMP_PDB_BOUNDARY, + GIMP_PDB_PATH, + GIMP_PDB_PARASITE, + GIMP_PDB_STATUS, + GIMP_PDB_END +} GimpPDBArgType; + + +#define GIMP_TYPE_PDB_PROC_TYPE (gimp_pdb_proc_type_get_type ()) + +GType gimp_pdb_proc_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_INTERNAL, + GIMP_PLUGIN, + GIMP_EXTENSION, + GIMP_TEMPORARY +} GimpPDBProcType; + + +#define GIMP_TYPE_PDB_STATUS_TYPE (gimp_pdb_status_type_get_type ()) + +GType gimp_pdb_status_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_PDB_EXECUTION_ERROR, + GIMP_PDB_CALLING_ERROR, + GIMP_PDB_PASS_THROUGH, + GIMP_PDB_SUCCESS, + GIMP_PDB_CANCEL +} GimpPDBStatusType; + + +#define GIMP_TYPE_MESSAGE_HANDLER_TYPE (gimp_message_handler_type_get_type ()) + +GType gimp_message_handler_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_MESSAGE_BOX, + GIMP_CONSOLE, + GIMP_ERROR_CONSOLE +} GimpMessageHandlerType; + + +#define GIMP_TYPE_STACK_TRACE_MODE (gimp_stack_trace_mode_get_type ()) + +GType gimp_stack_trace_mode_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_STACK_TRACE_NEVER, + GIMP_STACK_TRACE_QUERY, + GIMP_STACK_TRACE_ALWAYS +} GimpStackTraceMode; + + +#define GIMP_TYPE_PROGRESS_COMMAND (gimp_progress_command_get_type ()) + +GType gimp_progress_command_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_PROGRESS_COMMAND_START, + GIMP_PROGRESS_COMMAND_END, + GIMP_PROGRESS_COMMAND_SET_TEXT, + GIMP_PROGRESS_COMMAND_SET_VALUE +} GimpProgressCommand; + + +G_END_DECLS + +#endif /* __GIMP_BASE_ENUMS_H__ */ diff --git a/gimp/xcf-private.h b/gimp/xcf-private.h new file mode 100644 index 0000000..0a5749f --- /dev/null +++ b/gimp/xcf-private.h @@ -0,0 +1,94 @@ +/* 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 __XCF_PRIVATE_H__ +#define __XCF_PRIVATE_H__ + + +typedef enum +{ + PROP_END = 0, + PROP_COLORMAP = 1, + PROP_ACTIVE_LAYER = 2, + PROP_ACTIVE_CHANNEL = 3, + PROP_SELECTION = 4, + PROP_FLOATING_SELECTION = 5, + PROP_OPACITY = 6, + PROP_MODE = 7, + PROP_VISIBLE = 8, + PROP_LINKED = 9, + PROP_PRESERVE_TRANSPARENCY = 10, + PROP_APPLY_MASK = 11, + PROP_EDIT_MASK = 12, + PROP_SHOW_MASK = 13, + PROP_SHOW_MASKED = 14, + PROP_OFFSETS = 15, + PROP_COLOR = 16, + PROP_COMPRESSION = 17, + PROP_GUIDES = 18, + PROP_RESOLUTION = 19, + PROP_TATTOO = 20, + PROP_PARASITES = 21, + PROP_UNIT = 22, + PROP_PATHS = 23, + PROP_USER_UNIT = 24, + PROP_VECTORS = 25, + PROP_TEXT_LAYER_FLAGS = 26 +} PropType; + +typedef enum +{ + COMPRESS_NONE = 0, + COMPRESS_RLE = 1, + COMPRESS_ZLIB = 2, /* unused */ + COMPRESS_FRACTAL = 3 /* unused */ +} XcfCompressionType; + +typedef enum +{ + XCF_ORIENTATION_HORIZONTAL = 1, + XCF_ORIENTATION_VERTICAL = 2 +} XcfOrientationType; + +typedef enum +{ + XCF_STROKETYPE_STROKE = 0, + XCF_STROKETYPE_BEZIER_STROKE = 1 +} XcfStrokeType; + +typedef struct _XcfInfo XcfInfo; + +struct _XcfInfo +{ + FILE *fp; + guint cp; + const gchar *filename; + GimpTattoo tattoo_state; + GimpLayer *active_layer; + GimpChannel *active_channel; + GimpDrawable *floating_sel_drawable; + GimpLayer *floating_sel; + guint floating_sel_offset; + gint swap_num; + gint *ref_count; + XcfCompressionType compression; + gint file_version; +}; + + +#endif /* __XCF_PRIVATE_H__ */ -- cgit v0.9.1