mirror of https://github.com/GNOME/gimp.git
registered more enums.
2002-03-17 Sven Neumann <sven@gimp.org> * app/core/core-enums.[ch]: registered more enums. * app/tools/gimpblendtool.c: use GimpEnumMenus.
This commit is contained in:
parent
30e4242936
commit
9d8b1ec926
|
@ -1,3 +1,9 @@
|
|||
2002-03-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/core-enums.[ch]: registered more enums.
|
||||
|
||||
* app/tools/gimpblendtool.c: use GimpEnumMenus.
|
||||
|
||||
2002-03-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/config/gimpconfig.c: open the file with O_TRUNC.
|
||||
|
|
|
@ -100,6 +100,94 @@ gimp_channel_type_get_type (void)
|
|||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_blend_mode_enum_values[] =
|
||||
{
|
||||
{ GIMP_FG_BG_RGB_MODE, N_("FG to BG (RGB)"), "fg-bg-rgb-mode" },
|
||||
{ GIMP_FG_BG_HSV_MODE, N_("FG to BG (HSV)"), "fg-bg-hsv-mode" },
|
||||
{ GIMP_FG_TRANS_MODE, N_("FG to Transparent"), "fg-trans-mode" },
|
||||
{ GIMP_CUSTOM_MODE, N_("Custom Gradient"), "custom-mode" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_blend_mode_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpBlendMode", gimp_blend_mode_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_gradient_type_enum_values[] =
|
||||
{
|
||||
{ GIMP_LINEAR, N_("Linear"), "linear" },
|
||||
{ GIMP_BILINEAR, N_("Bi-Linear"), "bilinear" },
|
||||
{ GIMP_RADIAL, N_("Radial"), "radial" },
|
||||
{ GIMP_SQUARE, N_("Square"), "square" },
|
||||
{ GIMP_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" },
|
||||
{ GIMP_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" },
|
||||
{ GIMP_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" },
|
||||
{ GIMP_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" },
|
||||
{ GIMP_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" },
|
||||
{ GIMP_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" },
|
||||
{ GIMP_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_gradient_type_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpGradientType", gimp_gradient_type_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_repeat_mode_enum_values[] =
|
||||
{
|
||||
{ GIMP_REPEAT_NONE, N_("None"), "none" },
|
||||
{ GIMP_REPEAT_SAWTOOTH, N_("Sawtooth Wave"), "sawtooth" },
|
||||
{ GIMP_REPEAT_TRIANGULAR, N_("Triangular Wave"), "triangular" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_repeat_mode_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpRepeatMode", gimp_repeat_mode_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_transform_direction_enum_values[] =
|
||||
{
|
||||
{ GIMP_TRANSFORM_FORWARD, N_("Forward (Traditional)"), "forward" },
|
||||
{ GIMP_TRANSFORM_BACKWARD, N_("Backward (Corrective)"), "backward" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_transform_direction_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpTransformDirection", gimp_transform_direction_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_gradient_segment_type_enum_values[] =
|
||||
{
|
||||
{ GIMP_GRAD_LINEAR, "GIMP_GRAD_LINEAR", "linear" },
|
||||
|
@ -142,45 +230,5 @@ gimp_gradient_segment_color_get_type (void)
|
|||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_blend_mode_enum_values[] =
|
||||
{
|
||||
{ GIMP_FG_BG_RGB_MODE, "GIMP_FG_BG_RGB_MODE", "fg-bg-rgb-mode" },
|
||||
{ GIMP_FG_BG_HSV_MODE, "GIMP_FG_BG_HSV_MODE", "fg-bg-hsv-mode" },
|
||||
{ GIMP_FG_TRANS_MODE, "GIMP_FG_TRANS_MODE", "fg-trans-mode" },
|
||||
{ GIMP_CUSTOM_MODE, "GIMP_CUSTOM_MODE", "custom-mode" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_blend_mode_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpBlendMode", gimp_blend_mode_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_transform_direction_enum_values[] =
|
||||
{
|
||||
{ GIMP_TRANSFORM_FORWARD, "GIMP_TRANSFORM_FORWARD", "forward" },
|
||||
{ GIMP_TRANSFORM_BACKWARD, "GIMP_TRANSFORM_BACKWARD", "backward" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_transform_direction_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpTransformDirection", gimp_transform_direction_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
||||
|
||||
/* Generated data ends here */
|
||||
|
||||
|
|
|
@ -96,25 +96,66 @@ typedef enum
|
|||
} GimpChannelType;
|
||||
|
||||
|
||||
#define GIMP_TYPE_BLEND_MODE (gimp_blend_mode_get_type ())
|
||||
|
||||
GType gimp_blend_mode_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum /*< chop=_MODE >*/
|
||||
{
|
||||
GIMP_FG_BG_RGB_MODE, /*< desc="FG to BG (RGB)" >*/
|
||||
GIMP_FG_BG_HSV_MODE, /*< desc="FG to BG (HSV)" >*/
|
||||
GIMP_FG_TRANS_MODE, /*< desc="FG to Transparent" >*/
|
||||
GIMP_CUSTOM_MODE /*< desc="Custom Gradient" >*/
|
||||
} GimpBlendMode;
|
||||
|
||||
|
||||
#define GIMP_TYPE_GRADIENT_TYPE (gimp_gradient_type_get_type ())
|
||||
|
||||
GType gimp_gradient_type_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_LINEAR, /*< desc="Linear" >*/
|
||||
GIMP_BILINEAR, /*< desc="Bi-Linear" >*/
|
||||
GIMP_RADIAL, /*< desc="Radial" >*/
|
||||
GIMP_SQUARE, /*< desc="Square" >*/
|
||||
GIMP_CONICAL_SYMMETRIC, /*< desc="Conical (symmetric)" >*/
|
||||
GIMP_CONICAL_ASYMMETRIC, /*< desc="Conical (asymmetric)" >*/
|
||||
GIMP_SHAPEBURST_ANGULAR, /*< desc="Shapeburst (angular)" >*/
|
||||
GIMP_SHAPEBURST_SPHERICAL, /*< desc="Shapeburst (spherical)" >*/
|
||||
GIMP_SHAPEBURST_DIMPLED, /*< desc="Shapeburst (dimpled)" >*/
|
||||
GIMP_SPIRAL_CLOCKWISE, /*< desc="Spiral (clockwise)" >*/
|
||||
GIMP_SPIRAL_ANTICLOCKWISE /*< desc="Spiral (anticlockwise)" >*/
|
||||
} GimpGradientType;
|
||||
|
||||
|
||||
#define GIMP_TYPE_REPEAT_MODE (gimp_repeat_mode_get_type ())
|
||||
|
||||
GType gimp_repeat_mode_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_REPEAT_NONE, /*< desc="None" >*/
|
||||
GIMP_REPEAT_SAWTOOTH, /*< desc="Sawtooth Wave" >*/
|
||||
GIMP_REPEAT_TRIANGULAR /*< desc="Triangular Wave" >*/
|
||||
} GimpRepeatMode;
|
||||
|
||||
|
||||
#define GIMP_TYPE_TRANSFORM_DIRECTION (gimp_transform_direction_get_type ())
|
||||
|
||||
GType gimp_transform_direction_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum /*< pdb-skip >*/
|
||||
{
|
||||
GIMP_TRANSFORM_FORWARD, /*< desc="Forward (Traditional)" >*/
|
||||
GIMP_TRANSFORM_BACKWARD /*< desc="Backward (Corrective)" >*/
|
||||
} GimpTransformDirection;
|
||||
|
||||
|
||||
/*
|
||||
* non-registered enums; register them if needed
|
||||
*/
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_LINEAR,
|
||||
GIMP_BILINEAR,
|
||||
GIMP_RADIAL,
|
||||
GIMP_SQUARE,
|
||||
GIMP_CONICAL_SYMMETRIC,
|
||||
GIMP_CONICAL_ASYMMETRIC,
|
||||
GIMP_SHAPEBURST_ANGULAR,
|
||||
GIMP_SHAPEBURST_SPHERICAL,
|
||||
GIMP_SHAPEBURST_DIMPLED,
|
||||
GIMP_SPIRAL_CLOCKWISE,
|
||||
GIMP_SPIRAL_ANTICLOCKWISE
|
||||
} GimpGradientType;
|
||||
|
||||
typedef enum /*< pdb-skip >*/ /*< skip >*/
|
||||
{
|
||||
GIMP_GRAD_LINEAR = 0,
|
||||
|
@ -131,21 +172,6 @@ typedef enum /*< pdb-skip >*/ /*< skip >*/
|
|||
GIMP_GRAD_HSV_CW /* clockwise hue */
|
||||
} GimpGradientSegmentColor;
|
||||
|
||||
typedef enum /*< chop=_MODE >*/ /*< skip >*/
|
||||
{
|
||||
GIMP_FG_BG_RGB_MODE,
|
||||
GIMP_FG_BG_HSV_MODE,
|
||||
GIMP_FG_TRANS_MODE,
|
||||
GIMP_CUSTOM_MODE
|
||||
} GimpBlendMode;
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_REPEAT_NONE,
|
||||
GIMP_REPEAT_SAWTOOTH,
|
||||
GIMP_REPEAT_TRIANGULAR
|
||||
} GimpRepeatMode;
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_RGB_IMAGE,
|
||||
|
@ -163,11 +189,5 @@ typedef enum /*< skip >*/
|
|||
GIMP_HIGHLIGHTS
|
||||
} GimpTransferMode;
|
||||
|
||||
typedef enum /*< pdb-skip >*/ /*< skip >*/
|
||||
{
|
||||
GIMP_TRANSFORM_FORWARD,
|
||||
GIMP_TRANSFORM_BACKWARD
|
||||
} GimpTransformDirection;
|
||||
|
||||
|
||||
#endif /* __CORE_TYPES_H__ */
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpdnd.h"
|
||||
#include "widgets/gimpenummenu.h"
|
||||
|
||||
#include "gimpblendtool.h"
|
||||
#include "paint_options.h"
|
||||
|
@ -496,93 +497,33 @@ blend_options_new (GimpToolInfo *tool_info)
|
|||
|
||||
/* the blend mode menu */
|
||||
options->blend_mode_w =
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (gimp_menu_item_update),
|
||||
&options->blend_mode,
|
||||
GINT_TO_POINTER (options->blend_mode_d),
|
||||
|
||||
_("FG to BG (RGB)"),
|
||||
GINT_TO_POINTER (GIMP_FG_BG_RGB_MODE), NULL,
|
||||
|
||||
_("FG to BG (HSV)"),
|
||||
GINT_TO_POINTER (GIMP_FG_BG_HSV_MODE), NULL,
|
||||
|
||||
_("FG to Transparent"),
|
||||
GINT_TO_POINTER (GIMP_FG_TRANS_MODE), NULL,
|
||||
|
||||
_("Custom Gradient"),
|
||||
GINT_TO_POINTER (GIMP_CUSTOM_MODE), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
gimp_enum_option_menu_new (GIMP_TYPE_BLEND_MODE,
|
||||
G_CALLBACK (gimp_menu_item_update),
|
||||
&options->blend_mode);
|
||||
gimp_option_menu_set_history (GTK_OPTION_MENU (options->blend_mode_w),
|
||||
GINT_TO_POINTER (options->blend_mode_d));
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Blend:"), 1.0, 0.5,
|
||||
options->blend_mode_w, 2, TRUE);
|
||||
|
||||
/* the gradient type menu */
|
||||
options->gradient_type_w =
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (gradient_type_callback),
|
||||
options,
|
||||
GINT_TO_POINTER (options->gradient_type_d),
|
||||
|
||||
_("Linear"),
|
||||
GINT_TO_POINTER (GIMP_LINEAR), NULL,
|
||||
|
||||
_("Bi-Linear"),
|
||||
GINT_TO_POINTER (GIMP_BILINEAR), NULL,
|
||||
|
||||
_("Radial"),
|
||||
GINT_TO_POINTER (GIMP_RADIAL), NULL,
|
||||
|
||||
_("Square"),
|
||||
GINT_TO_POINTER (GIMP_SQUARE), NULL,
|
||||
|
||||
_("Conical (symmetric)"),
|
||||
GINT_TO_POINTER (GIMP_CONICAL_SYMMETRIC), NULL,
|
||||
|
||||
_("Conical (asymmetric)"),
|
||||
GINT_TO_POINTER (GIMP_CONICAL_ASYMMETRIC), NULL,
|
||||
|
||||
_("Shapeburst (angular)"),
|
||||
GINT_TO_POINTER (GIMP_SHAPEBURST_ANGULAR), NULL,
|
||||
|
||||
_("Shapeburst (spherical)"),
|
||||
GINT_TO_POINTER (GIMP_SHAPEBURST_SPHERICAL), NULL,
|
||||
|
||||
_("Shapeburst (dimpled)"),
|
||||
GINT_TO_POINTER (GIMP_SHAPEBURST_DIMPLED), NULL,
|
||||
|
||||
_("Spiral (clockwise)"),
|
||||
GINT_TO_POINTER (GIMP_SPIRAL_CLOCKWISE), NULL,
|
||||
|
||||
_("Spiral (anticlockwise)"),
|
||||
GINT_TO_POINTER (GIMP_SPIRAL_ANTICLOCKWISE), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
gimp_enum_option_menu_new (GIMP_TYPE_GRADIENT_TYPE,
|
||||
G_CALLBACK (gradient_type_callback),
|
||||
options);
|
||||
gimp_option_menu_set_history (GTK_OPTION_MENU (options->gradient_type_w),
|
||||
GINT_TO_POINTER (options->gradient_type_d));
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
|
||||
_("Gradient:"), 1.0, 0.5,
|
||||
options->gradient_type_w, 2, TRUE);
|
||||
|
||||
/* the repeat option */
|
||||
options->repeat_w =
|
||||
gimp_option_menu_new2 (FALSE,
|
||||
G_CALLBACK (gimp_menu_item_update),
|
||||
&options->repeat,
|
||||
GINT_TO_POINTER (options->repeat_d),
|
||||
|
||||
_("None"),
|
||||
GINT_TO_POINTER (GIMP_REPEAT_NONE), NULL,
|
||||
|
||||
_("Sawtooth Wave"),
|
||||
GINT_TO_POINTER (GIMP_REPEAT_SAWTOOTH), NULL,
|
||||
|
||||
_("Triangular Wave"),
|
||||
GINT_TO_POINTER (GIMP_REPEAT_TRIANGULAR), NULL,
|
||||
|
||||
NULL);
|
||||
|
||||
options->repeat_w =
|
||||
gimp_enum_option_menu_new (GIMP_TYPE_REPEAT_MODE,
|
||||
G_CALLBACK (gimp_menu_item_update),
|
||||
&options->repeat);
|
||||
gimp_option_menu_set_history (GTK_OPTION_MENU (options->repeat_w),
|
||||
GINT_TO_POINTER (options->repeat_d));
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
|
||||
_("Repeat:"), 1.0, 0.5,
|
||||
options->repeat_w, 2, TRUE);
|
||||
|
|
|
@ -342,7 +342,6 @@ histogram_tool_dialog_new (void)
|
|||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *option_menu;
|
||||
gint i;
|
||||
gint x, y;
|
||||
|
||||
|
|
Loading…
Reference in New Issue