changed GimpOrientationType from GIMP_HORIZONTAL to

2003-02-09  Michael Natterer  <mitch@convergence.de>

	* app/core/core-enums.[ch]: changed GimpOrientationType from
	GIMP_HORIZONTAL to GIMP_ORIENTATION_HORIZONTAL etc.

	* tools/pdbgen/pdb/guides.pdb: changed accordingly. Don't subtract
	1 from guide->orientation because InternalOrientationType no
	longer exists.

	* tools/pdbgen/stddefs.pl: chop the whole GIMP_ORIENTATION_UNKNOWN
	value from the enum, not just UNKNOWN.

	* app/pdb/guides_cmds.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimpenums.h
	* libgimp/gimpguides_pdb.c
	* plug-ins/script-fu/script-fu-constants.c
	* plug-ins/pygimp/gimpenums.py
	* tools/pdbgen/enums.pl: regenerated.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: added compat enums.

	* plug-ins/imagemap/imap_cmd_gimp_guides.c
	* plug-ins/xjt/xjt.c
	* plug-ins/xjt/xpdb_calls.c
	* plug-ins/common/gih.c
	* plug-ins/common/guillotine.c
	* plug-ins/common/rotate.c: changed accordingly.
This commit is contained in:
Michael Natterer 2003-02-09 21:03:36 +00:00 committed by Michael Natterer
parent b8505dccc3
commit 933e52adbd
21 changed files with 90 additions and 48 deletions

View file

@ -1,3 +1,33 @@
2003-02-09 Michael Natterer <mitch@convergence.de>
* app/core/core-enums.[ch]: changed GimpOrientationType from
GIMP_HORIZONTAL to GIMP_ORIENTATION_HORIZONTAL etc.
* tools/pdbgen/pdb/guides.pdb: changed accordingly. Don't subtract
1 from guide->orientation because InternalOrientationType no
longer exists.
* tools/pdbgen/stddefs.pl: chop the whole GIMP_ORIENTATION_UNKNOWN
value from the enum, not just UNKNOWN.
* app/pdb/guides_cmds.c
* app/pdb/transform_tools_cmds.c
* libgimp/gimpenums.h
* libgimp/gimpguides_pdb.c
* plug-ins/script-fu/script-fu-constants.c
* plug-ins/pygimp/gimpenums.py
* tools/pdbgen/enums.pl: regenerated.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: added compat enums.
* plug-ins/imagemap/imap_cmd_gimp_guides.c
* plug-ins/xjt/xjt.c
* plug-ins/xjt/xpdb_calls.c
* plug-ins/common/gih.c
* plug-ins/common/guillotine.c
* plug-ins/common/rotate.c: changed accordingly.
2003-02-09 Manish Singh <yosh@gimp.org>
* libgimp/gimp.c: implemented plug-in debugging hooks. Also, use

View file

@ -10,9 +10,9 @@
static const GEnumValue gimp_orientation_type_enum_values[] =
{
{ GIMP_HORIZONTAL, N_("Horizontal"), "horizontal" },
{ GIMP_VERTICAL, N_("Vertical"), "vertical" },
{ GIMP_UNKNOWN, N_("Unknown"), "unknown" },
{ GIMP_ORIENTATION_HORIZONTAL, N_("Horizontal"), "horizontal" },
{ GIMP_ORIENTATION_VERTICAL, N_("Vertical"), "vertical" },
{ GIMP_ORIENTATION_UNKNOWN, N_("Unknown"), "unknown" },
{ 0, NULL, NULL }
};

View file

@ -46,15 +46,11 @@ GType gimp_orientation_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_HORIZONTAL, /*< desc="Horizontal" >*/
GIMP_VERTICAL, /*< desc="Vertical" >*/
GIMP_UNKNOWN /*< desc="Unknown" >*/
GIMP_ORIENTATION_HORIZONTAL, /*< desc="Horizontal" >*/
GIMP_ORIENTATION_VERTICAL, /*< desc="Vertical" >*/
GIMP_ORIENTATION_UNKNOWN /*< desc="Unknown" >*/
} GimpOrientationType;
#define GIMP_ORIENTATION_HORIZONTAL GIMP_HORIZONTAL
#define GIMP_ORIENTATION_VERTICAL GIMP_VERTICAL
#define GIMP_ORIENTATION_UNKNOWN GIMP_UNKNOWN
#define GIMP_TYPE_BLEND_MODE (gimp_blend_mode_get_type ())

View file

@ -422,7 +422,7 @@ image_get_guide_orientation_invoker (Gimp *gimp,
if ((((GimpGuide *) guides->data)->guide_ID == guide) &&
(((GimpGuide *) guides->data)->position >= 0))
{
orientation = ((GimpGuide *) guides->data)->orientation - 1;
orientation = ((GimpGuide *) guides->data)->orientation;
success = TRUE;
break;
}
@ -458,7 +458,7 @@ static ProcArg image_get_guide_orientation_outargs[] =
{
GIMP_PDB_INT32,
"orientation",
"The guide's orientation: { GIMP_HORIZONTAL (0), GIMP_VERTICAL (1), GIMP_ }"
"The guide's orientation: { GIMP_ORIENTATION_HORIZONTAL (0), GIMP_ORIENTATION_VERTICAL (1) }"
}
};

View file

@ -69,7 +69,7 @@ flip_invoker (Gimp *gimp,
success = FALSE;
flip_type = args[1].value.pdb_int;
if (flip_type < GIMP_HORIZONTAL || flip_type > GIMP_VERTICAL)
if (flip_type < GIMP_ORIENTATION_HORIZONTAL || flip_type > GIMP_ORIENTATION_VERTICAL)
success = FALSE;
if (success)
@ -95,7 +95,7 @@ static ProcArg flip_inargs[] =
{
GIMP_PDB_INT32,
"flip_type",
"Type of flip: GIMP_HORIZONTAL (0), GIMP_VERTICAL (1), GIMP_"
"Type of flip: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)"
}
};
@ -519,7 +519,7 @@ shear_invoker (Gimp *gimp,
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
shear_type = args[2].value.pdb_int;
if (shear_type < GIMP_HORIZONTAL || shear_type > GIMP_VERTICAL)
if (shear_type < GIMP_ORIENTATION_HORIZONTAL || shear_type > GIMP_ORIENTATION_VERTICAL)
success = FALSE;
magnitude = args[3].value.pdb_float;
@ -570,7 +570,7 @@ static ProcArg shear_inargs[] =
{
GIMP_PDB_INT32,
"shear_type",
"Type of shear: GIMP_HORIZONTAL (0), GIMP_VERTICAL (1), GIMP_"
"Type of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)"
},
{
GIMP_PDB_FLOAT,

View file

@ -107,6 +107,13 @@ enum
GIMP_INCREMENTAL = GIMP_PAINT_INCREMENTAL
};
enum
{
GIMP_HORIZONTAL = GIMP_ORIENTATION_HORIZONTAL,
GIMP_VERTICAL = GIMP_ORIENTATION_VERTICAL,
GIMP_UNKNOWN = GIMP_ORIENTATION_UNKNOWN
} GimpOrientationType;
G_END_DECLS
#endif /* __GIMP_COMPAT_H__ */

View file

@ -234,9 +234,9 @@ typedef enum
typedef enum
{
GIMP_HORIZONTAL,
GIMP_VERTICAL,
GIMP_UNKNOWN
GIMP_ORIENTATION_HORIZONTAL,
GIMP_ORIENTATION_VERTICAL,
GIMP_ORIENTATION_UNKNOWN
} GimpOrientationType;
typedef enum

View file

@ -183,7 +183,7 @@ gimp_image_get_guide_orientation (gint32 image_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
GimpOrientationType orientation = GIMP_UNKNOWN;
GimpOrientationType orientation = GIMP_ORIENTATION_UNKNOWN;
return_vals = gimp_run_procedure ("gimp_image_get_guide_orientation",
&nreturn_vals,

View file

@ -753,7 +753,7 @@ size_adjustment_callback (GtkWidget *widget,
*(adj->value) = GTK_ADJUSTMENT (widget)->value;
if (adj->orientation == GIMP_VERTICAL)
if (adj->orientation == GIMP_ORIENTATION_VERTICAL)
{
size = gimp_image_width (adj->image);
newn = size / *(adj->value);
@ -908,7 +908,7 @@ gih_save_dialog (gint32 image_ID)
gtk_widget_show (spinbutton);
layer_ID = gimp_image_get_layers (image_ID, &nlayers);
cellw_adjust.orientation = GIMP_VERTICAL;
cellw_adjust.orientation = GIMP_ORIENTATION_VERTICAL;
cellw_adjust.image = image_ID;
cellw_adjust.toplayer = layer_ID[nlayers-1];
cellw_adjust.nguides = 0;
@ -930,7 +930,7 @@ gih_save_dialog (gint32 image_ID)
gtk_box_pack_start (GTK_BOX (box), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
cellh_adjust.orientation = GIMP_HORIZONTAL;
cellh_adjust.orientation = GIMP_ORIENTATION_HORIZONTAL;
cellh_adjust.image = image_ID;
cellh_adjust.toplayer = layer_ID[nlayers-1];
cellh_adjust.nguides = 0;

View file

@ -148,17 +148,17 @@ guillotine (gint32 image_ID)
switch (gimp_image_get_guide_orientation (image_ID, guide_num))
{
case GIMP_HORIZONTAL:
case GIMP_ORIENTATION_HORIZONTAL:
hguides = g_list_insert_sorted (hguides, GINT_TO_POINTER (position),
guide_sort_func);
break;
case GIMP_VERTICAL:
case GIMP_ORIENTATION_VERTICAL:
vguides = g_list_insert_sorted (vguides, GINT_TO_POINTER (position),
guide_sort_func);
break;
case GIMP_UNKNOWN:
case GIMP_ORIENTATION_UNKNOWN:
g_assert_not_reached ();
break;
}

View file

@ -594,7 +594,7 @@ rotate (void)
for (list = guides; list; list = list->next)
{
guide = (GuideInfo *)list->data;
if (guide->orientation == GIMP_HORIZONTAL)
if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
gimp_image_add_vguide (image_ID, height - guide->position);
else
gimp_image_add_hguide (image_ID, guide->position);
@ -605,7 +605,7 @@ rotate (void)
for (list = guides; list; list = list->next)
{
guide = (GuideInfo *)list->data;
if (guide->orientation == GIMP_HORIZONTAL)
if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
gimp_image_add_hguide (image_ID, height - guide->position);
else
gimp_image_add_vguide (image_ID, width - guide->position);
@ -616,7 +616,7 @@ rotate (void)
for (list = guides; list; list = list->next)
{
guide = (GuideInfo *)list->data;
if (guide->orientation == GIMP_HORIZONTAL)
if (guide->orientation == GIMP_ORIENTATION_HORIZONTAL)
gimp_image_add_vguide (image_ID, guide->position);
else
gimp_image_add_hguide (image_ID, width - guide->position);

View file

@ -101,10 +101,10 @@ gimp_guides_ok_cb(gpointer data)
gint position = gimp_image_get_guide_position(image_ID, guide_num);
if (gimp_image_get_guide_orientation(image_ID, guide_num)
== GIMP_HORIZONTAL) {
== GIMP_ORIENTATION_HORIZONTAL) {
hguides = g_slist_insert_sorted(hguides, GINT_TO_POINTER(position),
guide_sort_func);
} else { /* GIMP_VERTICAL */
} else { /* GIMP_ORIENTATION_VERTICAL */
vguides = g_slist_insert_sorted(vguides, GINT_TO_POINTER(position),
guide_sort_func);
}

View file

@ -201,9 +201,9 @@ OFFSET_BACKGROUND = 0
OFFSET_TRANSPARENT = 1
# GimpOrientationType
HORIZONTAL = 0
VERTICAL = 1
UNKNOWN = 2
ORIENTATION_HORIZONTAL = 0
ORIENTATION_VERTICAL = 1
ORIENTATION_UNKNOWN = 2
# GimpPDBArgType
PDB_INT32 = 0

View file

@ -312,6 +312,10 @@ init_constants (void)
setvar (cintern ("CONTINUOUS"), flocons (GIMP_PAINT_CONSTANT), NIL);
setvar (cintern ("INCREMENTAL"), flocons (GIMP_PAINT_INCREMENTAL), NIL);
setvar (cintern ("HORIZONTAL"), flocons (GIMP_ORIENTATION_HORIZONTAL), NIL);
setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL);
setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL);
/* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL);

View file

@ -166,9 +166,9 @@ init_generated_constants (void)
setvar (cintern ("OFFSET-BACKGROUND"), flocons (0), NIL);
setvar (cintern ("OFFSET-TRANSPARENT"), flocons (1), NIL);
setvar (cintern ("HORIZONTAL"), flocons (0), NIL);
setvar (cintern ("VERTICAL"), flocons (1), NIL);
setvar (cintern ("UNKNOWN"), flocons (2), NIL);
setvar (cintern ("ORIENTATION-HORIZONTAL"), flocons (0), NIL);
setvar (cintern ("ORIENTATION-VERTICAL"), flocons (1), NIL);
setvar (cintern ("ORIENTATION-UNKNOWN"), flocons (2), NIL);
setvar (cintern ("PDB-INT32"), flocons (0), NIL);
setvar (cintern ("PDB-INT16"), flocons (1), NIL);

View file

@ -312,6 +312,10 @@ init_constants (void)
setvar (cintern ("CONTINUOUS"), flocons (GIMP_PAINT_CONSTANT), NIL);
setvar (cintern ("INCREMENTAL"), flocons (GIMP_PAINT_INCREMENTAL), NIL);
setvar (cintern ("HORIZONTAL"), flocons (GIMP_ORIENTATION_HORIZONTAL), NIL);
setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL);
setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL);
/* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL);

View file

@ -633,13 +633,13 @@ run (gchar *name,
gint32
p_to_GimpOrientation(gint32 orientation)
{
if(orientation == XJT_ORIENTATION_VERTICAL) return(GIMP_VERTICAL);
return(GIMP_HORIZONTAL);
if(orientation == XJT_ORIENTATION_VERTICAL) return(GIMP_ORIENTATION_VERTICAL);
return(GIMP_ORIENTATION_HORIZONTAL);
}
gint32
p_to_XJTOrientation(gint32 orientation)
{
if(orientation == GIMP_VERTICAL) return(XJT_ORIENTATION_VERTICAL);
if(orientation == GIMP_ORIENTATION_VERTICAL) return(XJT_ORIENTATION_VERTICAL);
return(XJT_ORIENTATION_HORIZONTAL);
}

View file

@ -327,7 +327,7 @@ gint32 p_gimp_image_add_guide(gint32 image_id, gint32 position, gint32 orienta
GimpParam *return_vals;
int nreturn_vals;
if(orientation == GIMP_VERTICAL)
if(orientation == GIMP_ORIENTATION_VERTICAL)
{
l_add_guide_proc = "gimp_image_add_vguide";
}

View file

@ -190,10 +190,11 @@ package Gimp::CodeGen::enums;
GimpOrientationType =>
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_HORIZONTAL GIMP_VERTICAL GIMP_UNKNOWN) ],
mapping => { GIMP_HORIZONTAL => '0',
GIMP_VERTICAL => '1',
GIMP_UNKNOWN => '2' }
symbols => [ qw(GIMP_ORIENTATION_HORIZONTAL
GIMP_ORIENTATION_VERTICAL GIMP_ORIENTATION_UNKNOWN) ],
mapping => { GIMP_ORIENTATION_HORIZONTAL => '0',
GIMP_ORIENTATION_VERTICAL => '1',
GIMP_ORIENTATION_UNKNOWN => '2' }
},
GimpBlendMode =>
{ contig => 1,

View file

@ -218,7 +218,7 @@ HELP
@outargs = (
{ name => 'orientation', type => &std_orientation_enum, init => 1,
desc => "The guide's orientation: { %%desc%% }",
libdef => 'GIMP_UNKNOWN' }
libdef => 'GIMP_ORIENTATION_UNKNOWN' }
);
%invoke = (
@ -234,7 +234,7 @@ HELP
if ((((GimpGuide *) guides->data)->guide_ID == guide) &&
(((GimpGuide *) guides->data)->position >= 0))
{
orientation = ((GimpGuide *) guides->data)->orientation - 1;
orientation = ((GimpGuide *) guides->data)->orientation;
success = TRUE;
break;
}

View file

@ -36,7 +36,7 @@ sub std_antialias_arg () {{
}}
sub std_orientation_enum () {
'enum GimpOrientationType (no UNKNOWN)'
'enum GimpOrientationType (no GIMP_ORIENTATION_UNKNOWN)'
}
1;