app: move some enums from base-enums.h to core-enums.h

This commit is contained in:
Michael Natterer
2012-04-04 01:43:41 +02:00
parent 36fb008197
commit 9b70f4e7fc
5 changed files with 173 additions and 173 deletions

View File

@ -8,72 +8,6 @@
#include "gimp-intl.h"
/* enumerations from "./base-enums.h" */
GType
gimp_curve_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_CURVE_SMOOTH, "GIMP_CURVE_SMOOTH", "smooth" },
{ GIMP_CURVE_FREE, "GIMP_CURVE_FREE", "free" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_CURVE_SMOOTH, NC_("curve-type", "Smooth"), NULL },
{ GIMP_CURVE_FREE, NC_("curve-type", "Freehand"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpCurveType", values);
gimp_type_set_translation_context (type, "curve-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_histogram_channel_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_HISTOGRAM_VALUE, "GIMP_HISTOGRAM_VALUE", "value" },
{ GIMP_HISTOGRAM_RED, "GIMP_HISTOGRAM_RED", "red" },
{ GIMP_HISTOGRAM_GREEN, "GIMP_HISTOGRAM_GREEN", "green" },
{ GIMP_HISTOGRAM_BLUE, "GIMP_HISTOGRAM_BLUE", "blue" },
{ GIMP_HISTOGRAM_ALPHA, "GIMP_HISTOGRAM_ALPHA", "alpha" },
{ GIMP_HISTOGRAM_RGB, "GIMP_HISTOGRAM_RGB", "rgb" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_HISTOGRAM_VALUE, NC_("histogram-channel", "Value"), NULL },
{ GIMP_HISTOGRAM_RED, NC_("histogram-channel", "Red"), NULL },
{ GIMP_HISTOGRAM_GREEN, NC_("histogram-channel", "Green"), NULL },
{ GIMP_HISTOGRAM_BLUE, NC_("histogram-channel", "Blue"), NULL },
{ GIMP_HISTOGRAM_ALPHA, NC_("histogram-channel", "Alpha"), NULL },
{ GIMP_HISTOGRAM_RGB, NC_("histogram-channel", "RGB"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpHistogramChannel", values);
gimp_type_set_translation_context (type, "histogram-channel");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_layer_mode_effects_get_type (void)
{
@ -151,45 +85,6 @@ gimp_layer_mode_effects_get_type (void)
return type;
}
GType
gimp_hue_range_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ALL_HUES, "GIMP_ALL_HUES", "all-hues" },
{ GIMP_RED_HUES, "GIMP_RED_HUES", "red-hues" },
{ GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", "yellow-hues" },
{ GIMP_GREEN_HUES, "GIMP_GREEN_HUES", "green-hues" },
{ GIMP_CYAN_HUES, "GIMP_CYAN_HUES", "cyan-hues" },
{ GIMP_BLUE_HUES, "GIMP_BLUE_HUES", "blue-hues" },
{ GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", "magenta-hues" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ALL_HUES, "GIMP_ALL_HUES", NULL },
{ GIMP_RED_HUES, "GIMP_RED_HUES", NULL },
{ GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", NULL },
{ GIMP_GREEN_HUES, "GIMP_GREEN_HUES", NULL },
{ GIMP_CYAN_HUES, "GIMP_CYAN_HUES", NULL },
{ GIMP_BLUE_HUES, "GIMP_BLUE_HUES", NULL },
{ GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpHueRange", values);
gimp_type_set_translation_context (type, "hue-range");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
/* Generated data ends here */

View File

@ -34,32 +34,6 @@
* 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_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
@ -95,22 +69,6 @@ typedef enum
} GimpLayerModeEffects;
#define GIMP_TYPE_HUE_RANGE (gimp_hue_range_get_type ())
GType gimp_hue_range_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_ALL_HUES,
GIMP_RED_HUES,
GIMP_YELLOW_HUES,
GIMP_GREEN_HUES,
GIMP_CYAN_HUES,
GIMP_BLUE_HUES,
GIMP_MAGENTA_HUES
} GimpHueRange;
/*
* non-registered enums; register them if needed
*/

View File

@ -103,6 +103,35 @@ gimp_convert_palette_type_get_type (void)
return type;
}
GType
gimp_curve_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_CURVE_SMOOTH, "GIMP_CURVE_SMOOTH", "smooth" },
{ GIMP_CURVE_FREE, "GIMP_CURVE_FREE", "free" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_CURVE_SMOOTH, NC_("curve-type", "Smooth"), NULL },
{ GIMP_CURVE_FREE, NC_("curve-type", "Freehand"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpCurveType", values);
gimp_type_set_translation_context (type, "curve-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_gravity_type_get_type (void)
{
@ -148,6 +177,82 @@ gimp_gravity_type_get_type (void)
return type;
}
GType
gimp_histogram_channel_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_HISTOGRAM_VALUE, "GIMP_HISTOGRAM_VALUE", "value" },
{ GIMP_HISTOGRAM_RED, "GIMP_HISTOGRAM_RED", "red" },
{ GIMP_HISTOGRAM_GREEN, "GIMP_HISTOGRAM_GREEN", "green" },
{ GIMP_HISTOGRAM_BLUE, "GIMP_HISTOGRAM_BLUE", "blue" },
{ GIMP_HISTOGRAM_ALPHA, "GIMP_HISTOGRAM_ALPHA", "alpha" },
{ GIMP_HISTOGRAM_RGB, "GIMP_HISTOGRAM_RGB", "rgb" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_HISTOGRAM_VALUE, NC_("histogram-channel", "Value"), NULL },
{ GIMP_HISTOGRAM_RED, NC_("histogram-channel", "Red"), NULL },
{ GIMP_HISTOGRAM_GREEN, NC_("histogram-channel", "Green"), NULL },
{ GIMP_HISTOGRAM_BLUE, NC_("histogram-channel", "Blue"), NULL },
{ GIMP_HISTOGRAM_ALPHA, NC_("histogram-channel", "Alpha"), NULL },
{ GIMP_HISTOGRAM_RGB, NC_("histogram-channel", "RGB"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpHistogramChannel", values);
gimp_type_set_translation_context (type, "histogram-channel");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_hue_range_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_ALL_HUES, "GIMP_ALL_HUES", "all-hues" },
{ GIMP_RED_HUES, "GIMP_RED_HUES", "red-hues" },
{ GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", "yellow-hues" },
{ GIMP_GREEN_HUES, "GIMP_GREEN_HUES", "green-hues" },
{ GIMP_CYAN_HUES, "GIMP_CYAN_HUES", "cyan-hues" },
{ GIMP_BLUE_HUES, "GIMP_BLUE_HUES", "blue-hues" },
{ GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", "magenta-hues" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_ALL_HUES, "GIMP_ALL_HUES", NULL },
{ GIMP_RED_HUES, "GIMP_RED_HUES", NULL },
{ GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", NULL },
{ GIMP_GREEN_HUES, "GIMP_GREEN_HUES", NULL },
{ GIMP_CYAN_HUES, "GIMP_CYAN_HUES", NULL },
{ GIMP_BLUE_HUES, "GIMP_BLUE_HUES", NULL },
{ GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpHueRange", values);
gimp_type_set_translation_context (type, "hue-range");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_alignment_type_get_type (void)
{

View File

@ -75,6 +75,17 @@ typedef enum
} GimpConvertPaletteType;
#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_GRAVITY_TYPE (gimp_gravity_type_get_type ())
GType gimp_gravity_type_get_type (void) G_GNUC_CONST;
@ -94,6 +105,37 @@ typedef enum /*< pdb-skip >*/
} GimpGravityType;
#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_HUE_RANGE (gimp_hue_range_get_type ())
GType gimp_hue_range_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_ALL_HUES,
GIMP_RED_HUES,
GIMP_YELLOW_HUES,
GIMP_GREEN_HUES,
GIMP_CYAN_HUES,
GIMP_BLUE_HUES,
GIMP_MAGENTA_HUES
} GimpHueRange;
#define GIMP_TYPE_ALIGNMENT_TYPE (gimp_alignment_type_get_type ())
GType gimp_alignment_type_get_type (void) G_GNUC_CONST;

View File

@ -411,18 +411,6 @@ package Gimp::CodeGen::enums;
symbols => [ qw(GIMP_VECTORS_STROKE_TYPE_BEZIER) ],
mapping => { GIMP_VECTORS_STROKE_TYPE_BEZIER => '0' }
},
GimpHistogramChannel =>
{ contig => 1,
header => 'base/base-enums.h',
symbols => [ qw(GIMP_HISTOGRAM_VALUE GIMP_HISTOGRAM_RED
GIMP_HISTOGRAM_GREEN GIMP_HISTOGRAM_BLUE
GIMP_HISTOGRAM_ALPHA) ],
mapping => { GIMP_HISTOGRAM_VALUE => '0',
GIMP_HISTOGRAM_RED => '1',
GIMP_HISTOGRAM_GREEN => '2',
GIMP_HISTOGRAM_BLUE => '3',
GIMP_HISTOGRAM_ALPHA => '4' }
},
GimpLayerModeEffects =>
{ contig => 1,
header => 'base/base-enums.h',
@ -461,20 +449,6 @@ package Gimp::CodeGen::enums;
GIMP_GRAIN_MERGE_MODE => '21',
GIMP_COLOR_ERASE_MODE => '22' }
},
GimpHueRange =>
{ contig => 1,
header => 'base/base-enums.h',
symbols => [ qw(GIMP_ALL_HUES GIMP_RED_HUES GIMP_YELLOW_HUES
GIMP_GREEN_HUES GIMP_CYAN_HUES GIMP_BLUE_HUES
GIMP_MAGENTA_HUES) ],
mapping => { GIMP_ALL_HUES => '0',
GIMP_RED_HUES => '1',
GIMP_YELLOW_HUES => '2',
GIMP_GREEN_HUES => '3',
GIMP_CYAN_HUES => '4',
GIMP_BLUE_HUES => '5',
GIMP_MAGENTA_HUES => '6' }
},
GimpConvolutionType =>
{ contig => 1,
header => 'base/base-enums.h',
@ -506,6 +480,32 @@ package Gimp::CodeGen::enums;
GIMP_MONO_PALETTE => '3',
GIMP_CUSTOM_PALETTE => '4' }
},
GimpHistogramChannel =>
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_HISTOGRAM_VALUE GIMP_HISTOGRAM_RED
GIMP_HISTOGRAM_GREEN GIMP_HISTOGRAM_BLUE
GIMP_HISTOGRAM_ALPHA) ],
mapping => { GIMP_HISTOGRAM_VALUE => '0',
GIMP_HISTOGRAM_RED => '1',
GIMP_HISTOGRAM_GREEN => '2',
GIMP_HISTOGRAM_BLUE => '3',
GIMP_HISTOGRAM_ALPHA => '4' }
},
GimpHueRange =>
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_ALL_HUES GIMP_RED_HUES GIMP_YELLOW_HUES
GIMP_GREEN_HUES GIMP_CYAN_HUES GIMP_BLUE_HUES
GIMP_MAGENTA_HUES) ],
mapping => { GIMP_ALL_HUES => '0',
GIMP_RED_HUES => '1',
GIMP_YELLOW_HUES => '2',
GIMP_GREEN_HUES => '3',
GIMP_CYAN_HUES => '4',
GIMP_BLUE_HUES => '5',
GIMP_MAGENTA_HUES => '6' }
},
GimpFillType =>
{ contig => 1,
header => 'core/core-enums.h',