app/config/gimpconfig-deserialize.h fixed typos.

2001-12-13  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-deserialize.h
	* app/config/gimpconfig-serialize.c: fixed typos.

	* app/core/core-enums.h
	* app/core/core-types.h: converted ChannelType enum to GimpChannelType
	and moved it to core-enums.h.

	* app/core/gimpimage.[ch]
	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpcomponentlistitem.[ch]
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

	* app/pdb/image_cmds.c
	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.
This commit is contained in:
Sven Neumann 2001-12-13 20:19:41 +00:00 committed by Sven Neumann
parent 1e5888d4b3
commit 94e7e1e55e
18 changed files with 199 additions and 176 deletions

View File

@ -1,3 +1,22 @@
2001-12-13 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-deserialize.h
* app/config/gimpconfig-serialize.c: fixed typos.
* app/core/core-enums.h
* app/core/core-types.h: converted ChannelType enum to GimpChannelType
and moved it to core-enums.h.
* app/core/gimpimage.[ch]
* app/widgets/gimpchannellistview.c
* app/widgets/gimpcomponentlistitem.[ch]
* tools/pdbgen/pdb/image.pdb: changed accordingly.
* app/pdb/image_cmds.c
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2001-12-13 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-deserialize.c

View File

@ -1,7 +1,7 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Object peoperties deserialization routines
* Object properties deserialization routines
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,7 +1,7 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Object propoerties serialization routines
* Object properties serialization routines
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -71,6 +71,16 @@ typedef enum /*< pdb-skip >*/
* non-registered enums; register them if needed
*/
typedef enum /*< skip >*/
{
GIMP_RED_CHANNEL,
GIMP_GREEN_CHANNEL,
GIMP_BLUE_CHANNEL,
GIMP_GRAY_CHANNEL,
GIMP_INDEXED_CHANNEL,
GIMP_ALPHA_CHANNEL
} GimpChannelType;
typedef enum /*< skip >*/
{
GIMP_LINEAR,

View File

@ -34,16 +34,6 @@
/* enums */
typedef enum
{
RED_CHANNEL,
GREEN_CHANNEL,
BLUE_CHANNEL,
GRAY_CHANNEL,
INDEXED_CHANNEL,
ALPHA_CHANNEL
} ChannelType;
typedef enum /*< chop=ADD_ >*/
{
ADD_WHITE_MASK,

View File

@ -906,7 +906,7 @@ gimp_image_get_combination_mode (GimpImageType dest_type,
}
gint
gimp_image_get_ID (GimpImage *gimage)
gimp_image_get_ID (const GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), -1);
@ -1119,9 +1119,9 @@ gimp_image_mask_changed (GimpImage *gimage)
}
void
gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active)
gimp_image_set_component_active (GimpImage *gimage,
GimpChannelType type,
gboolean active)
{
gint pixel = -1;
@ -1129,12 +1129,12 @@ gimp_image_set_component_active (GimpImage *gimage,
switch (type)
{
case RED_CHANNEL: pixel = RED_PIX; break;
case GREEN_CHANNEL: pixel = GREEN_PIX; break;
case BLUE_CHANNEL: pixel = BLUE_PIX; break;
case GRAY_CHANNEL: pixel = GRAY_PIX; break;
case INDEXED_CHANNEL: pixel = INDEXED_PIX; break;
case ALPHA_CHANNEL:
case GIMP_RED_CHANNEL: pixel = RED_PIX; break;
case GIMP_GREEN_CHANNEL: pixel = GREEN_PIX; break;
case GIMP_BLUE_CHANNEL: pixel = BLUE_PIX; break;
case GIMP_GRAY_CHANNEL: pixel = GRAY_PIX; break;
case GIMP_INDEXED_CHANNEL: pixel = INDEXED_PIX; break;
case GIMP_ALPHA_CHANNEL:
switch (gimp_image_base_type (gimage))
{
case GIMP_RGB: pixel = ALPHA_PIX; break;
@ -1164,17 +1164,17 @@ gimp_image_set_component_active (GimpImage *gimage,
gboolean
gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type)
GimpChannelType type)
{
/* No sanity checking here... */
switch (type)
{
case RED_CHANNEL: return gimage->active[RED_PIX]; break;
case GREEN_CHANNEL: return gimage->active[GREEN_PIX]; break;
case BLUE_CHANNEL: return gimage->active[BLUE_PIX]; break;
case GRAY_CHANNEL: return gimage->active[GRAY_PIX]; break;
case INDEXED_CHANNEL: return gimage->active[INDEXED_PIX]; break;
case ALPHA_CHANNEL:
case GIMP_RED_CHANNEL: return gimage->active[RED_PIX]; break;
case GIMP_GREEN_CHANNEL: return gimage->active[GREEN_PIX]; break;
case GIMP_BLUE_CHANNEL: return gimage->active[BLUE_PIX]; break;
case GIMP_GRAY_CHANNEL: return gimage->active[GRAY_PIX]; break;
case GIMP_INDEXED_CHANNEL: return gimage->active[INDEXED_PIX]; break;
case GIMP_ALPHA_CHANNEL:
switch (gimp_image_base_type (gimage))
{
case GIMP_RGB: return gimage->active[ALPHA_PIX]; break;
@ -1191,9 +1191,9 @@ gimp_image_get_component_active (const GimpImage *gimage,
}
void
gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active)
gimp_image_get_active_components (const GimpImage *gimage,
const GimpDrawable *drawable,
gint *active)
{
GimpLayer *layer;
gint i;
@ -1224,9 +1224,9 @@ gimp_image_get_active_components (GimpImage *gimage,
}
void
gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible)
gimp_image_set_component_visible (GimpImage *gimage,
GimpChannelType type,
gboolean visible)
{
gint pixel = -1;
@ -1234,12 +1234,12 @@ gimp_image_set_component_visible (GimpImage *gimage,
switch (type)
{
case RED_CHANNEL: pixel = RED_PIX; break;
case GREEN_CHANNEL: pixel = GREEN_PIX; break;
case BLUE_CHANNEL: pixel = BLUE_PIX; break;
case GRAY_CHANNEL: pixel = GRAY_PIX; break;
case INDEXED_CHANNEL: pixel = INDEXED_PIX; break;
case ALPHA_CHANNEL:
case GIMP_RED_CHANNEL: pixel = RED_PIX; break;
case GIMP_GREEN_CHANNEL: pixel = GREEN_PIX; break;
case GIMP_BLUE_CHANNEL: pixel = BLUE_PIX; break;
case GIMP_GRAY_CHANNEL: pixel = GRAY_PIX; break;
case GIMP_INDEXED_CHANNEL: pixel = INDEXED_PIX; break;
case GIMP_ALPHA_CHANNEL:
switch (gimp_image_base_type (gimage))
{
case GIMP_RGB: pixel = ALPHA_PIX; break;
@ -1266,17 +1266,17 @@ gimp_image_set_component_visible (GimpImage *gimage,
gboolean
gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type)
GimpChannelType type)
{
/* No sanity checking here... */
switch (type)
{
case RED_CHANNEL: return gimage->visible[RED_PIX]; break;
case GREEN_CHANNEL: return gimage->visible[GREEN_PIX]; break;
case BLUE_CHANNEL: return gimage->visible[BLUE_PIX]; break;
case GRAY_CHANNEL: return gimage->visible[GRAY_PIX]; break;
case INDEXED_CHANNEL: return gimage->visible[INDEXED_PIX]; break;
case ALPHA_CHANNEL:
case GIMP_RED_CHANNEL: return gimage->visible[RED_PIX]; break;
case GIMP_GREEN_CHANNEL: return gimage->visible[GREEN_PIX]; break;
case GIMP_BLUE_CHANNEL: return gimage->visible[BLUE_PIX]; break;
case GIMP_GRAY_CHANNEL: return gimage->visible[GRAY_PIX]; break;
case GIMP_INDEXED_CHANNEL: return gimage->visible[INDEXED_PIX]; break;
case GIMP_ALPHA_CHANNEL:
switch (gimp_image_base_type (gimage))
{
case GIMP_RGB: return gimage->visible[ALPHA_PIX]; break;

View File

@ -158,9 +158,9 @@ struct _GimpImageClass
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
void (* component_visibility_changed) (GimpImage *gimage,
ChannelType channel);
GimpChannelType channel);
void (* component_active_changed) (GimpImage *gimage,
ChannelType channel);
GimpChannelType channel);
void (* mask_changed) (GimpImage *gimage);
void (* resolution_changed) (GimpImage *gimage);
void (* unit_changed) (GimpImage *gimage);
@ -199,7 +199,7 @@ GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
CombinationMode gimp_image_get_combination_mode (GimpImageType dest_type,
gint src_bytes);
gint gimp_image_get_ID (GimpImage *gimage);
gint gimp_image_get_ID (const GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
@ -240,19 +240,19 @@ GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
GimpChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
GimpChannelType type);
void gimp_image_get_active_components (const GimpImage *gimage,
const GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
GimpChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
GimpChannelType type);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);

View File

@ -3213,14 +3213,14 @@ image_get_component_active_invoker (Gimp *gimp,
success = FALSE;
component = args[1].value.pdb_int;
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
if (component < GIMP_GREEN_CHANNEL || component > GIMP_ALPHA_CHANNEL)
success = FALSE;
if (success)
{
if (component == GRAY_CHANNEL)
if (component == GIMP_GRAY_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_GRAY;
else if (component == INDEXED_CHANNEL)
else if (component == GIMP_INDEXED_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_INDEXED;
else
success = gimp_image_base_type (gimage) == GIMP_RGB;
@ -3244,7 +3244,7 @@ static ProcArg image_get_component_active_inargs[] =
{
GIMP_PDB_INT32,
"component",
"The image component: { RED_CHANNEL (0), GREEN_CHANNEL (1), BLUE_CHANNEL (2), GRAY_CHANNEL (3), INDEXED_CHANNEL (4), ALPHA_CHANNEL (5) }"
"The image component: { GIMP_RED_CHANNEL (0), GIMP_GREEN_CHANNEL (1), GIMP_BLUE_CHANNEL (2), GIMP_GRAY_CHANNEL (3), GIMP_INDEXED_CHANNEL (4), GIMP_ALPHA_CHANNEL (5) }"
}
};
@ -3287,16 +3287,16 @@ image_set_component_active_invoker (Gimp *gimp,
success = FALSE;
component = args[1].value.pdb_int;
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
if (component < GIMP_GREEN_CHANNEL || component > GIMP_ALPHA_CHANNEL)
success = FALSE;
active = args[2].value.pdb_int ? TRUE : FALSE;
if (success)
{
if (component == GRAY_CHANNEL)
if (component == GIMP_GRAY_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_GRAY;
else if (component == INDEXED_CHANNEL)
else if (component == GIMP_INDEXED_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_INDEXED;
else
success = gimp_image_base_type (gimage) == GIMP_RGB;
@ -3318,7 +3318,7 @@ static ProcArg image_set_component_active_inargs[] =
{
GIMP_PDB_INT32,
"component",
"The image component: { RED_CHANNEL (0), GREEN_CHANNEL (1), BLUE_CHANNEL (2), GRAY_CHANNEL (3), INDEXED_CHANNEL (4), ALPHA_CHANNEL (5) }"
"The image component: { GIMP_RED_CHANNEL (0), GIMP_GREEN_CHANNEL (1), GIMP_BLUE_CHANNEL (2), GIMP_GRAY_CHANNEL (3), GIMP_INDEXED_CHANNEL (4), GIMP_ALPHA_CHANNEL (5) }"
},
{
GIMP_PDB_INT32,
@ -3357,14 +3357,14 @@ image_get_component_visible_invoker (Gimp *gimp,
success = FALSE;
component = args[1].value.pdb_int;
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
if (component < GIMP_GREEN_CHANNEL || component > GIMP_ALPHA_CHANNEL)
success = FALSE;
if (success)
{
if (component == GRAY_CHANNEL)
if (component == GIMP_GRAY_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_GRAY;
else if (component == INDEXED_CHANNEL)
else if (component == GIMP_INDEXED_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_INDEXED;
else
success = gimp_image_base_type (gimage) == GIMP_RGB;
@ -3388,7 +3388,7 @@ static ProcArg image_get_component_visible_inargs[] =
{
GIMP_PDB_INT32,
"component",
"The image component: { RED_CHANNEL (0), GREEN_CHANNEL (1), BLUE_CHANNEL (2), GRAY_CHANNEL (3), INDEXED_CHANNEL (4), ALPHA_CHANNEL (5) }"
"The image component: { GIMP_RED_CHANNEL (0), GIMP_GREEN_CHANNEL (1), GIMP_BLUE_CHANNEL (2), GIMP_GRAY_CHANNEL (3), GIMP_INDEXED_CHANNEL (4), GIMP_ALPHA_CHANNEL (5) }"
}
};
@ -3431,16 +3431,16 @@ image_set_component_visible_invoker (Gimp *gimp,
success = FALSE;
component = args[1].value.pdb_int;
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
if (component < GIMP_GREEN_CHANNEL || component > GIMP_ALPHA_CHANNEL)
success = FALSE;
visible = args[2].value.pdb_int ? TRUE : FALSE;
if (success)
{
if (component == GRAY_CHANNEL)
if (component == GIMP_GRAY_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_GRAY;
else if (component == INDEXED_CHANNEL)
else if (component == GIMP_INDEXED_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_INDEXED;
else
success = gimp_image_base_type (gimage) == GIMP_RGB;
@ -3462,7 +3462,7 @@ static ProcArg image_set_component_visible_inargs[] =
{
GIMP_PDB_INT32,
"component",
"The image component: { RED_CHANNEL (0), GREEN_CHANNEL (1), BLUE_CHANNEL (2), GRAY_CHANNEL (3), INDEXED_CHANNEL (4), ALPHA_CHANNEL (5) }"
"The image component: { GIMP_RED_CHANNEL (0), GIMP_GREEN_CHANNEL (1), GIMP_BLUE_CHANNEL (2), GIMP_GRAY_CHANNEL (3), GIMP_INDEXED_CHANNEL (4), GIMP_ALPHA_CHANNEL (5) }"
},
{
GIMP_PDB_INT32,

View File

@ -372,12 +372,12 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget
static void
gimp_channel_list_view_create_components (GimpChannelListView *view)
{
GimpImage *gimage;
GtkWidget *list_item;
gint n_components = 0;
ChannelType components[MAX_CHANNELS];
GList *list = NULL;
gint i;
GimpImage *gimage;
GtkWidget *list_item;
gint n_components = 0;
GimpChannelType components[MAX_CHANNELS];
GList *list = NULL;
gint i;
gimage = GIMP_DRAWABLE_LIST_VIEW (view)->gimage;
@ -385,23 +385,23 @@ gimp_channel_list_view_create_components (GimpChannelListView *view)
{
case GIMP_RGB:
n_components = 3;
components[0] = RED_CHANNEL;
components[1] = GREEN_CHANNEL;
components[2] = BLUE_CHANNEL;
components[0] = GIMP_RED_CHANNEL;
components[1] = GIMP_GREEN_CHANNEL;
components[2] = GIMP_BLUE_CHANNEL;
break;
case GIMP_GRAY:
n_components = 1;
components[0] = GRAY_CHANNEL;
components[0] = GIMP_GRAY_CHANNEL;
break;
case GIMP_INDEXED:
n_components = 1;
components[0] = INDEXED_CHANNEL;
components[0] = GIMP_INDEXED_CHANNEL;
break;
}
components[n_components++] = ALPHA_CHANNEL;
components[n_components++] = GIMP_ALPHA_CHANNEL;
for (i = 0; i < n_components; i++)
{

View File

@ -372,12 +372,12 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget
static void
gimp_channel_list_view_create_components (GimpChannelListView *view)
{
GimpImage *gimage;
GtkWidget *list_item;
gint n_components = 0;
ChannelType components[MAX_CHANNELS];
GList *list = NULL;
gint i;
GimpImage *gimage;
GtkWidget *list_item;
gint n_components = 0;
GimpChannelType components[MAX_CHANNELS];
GList *list = NULL;
gint i;
gimage = GIMP_DRAWABLE_LIST_VIEW (view)->gimage;
@ -385,23 +385,23 @@ gimp_channel_list_view_create_components (GimpChannelListView *view)
{
case GIMP_RGB:
n_components = 3;
components[0] = RED_CHANNEL;
components[1] = GREEN_CHANNEL;
components[2] = BLUE_CHANNEL;
components[0] = GIMP_RED_CHANNEL;
components[1] = GIMP_GREEN_CHANNEL;
components[2] = GIMP_BLUE_CHANNEL;
break;
case GIMP_GRAY:
n_components = 1;
components[0] = GRAY_CHANNEL;
components[0] = GIMP_GRAY_CHANNEL;
break;
case GIMP_INDEXED:
n_components = 1;
components[0] = INDEXED_CHANNEL;
components[0] = GIMP_INDEXED_CHANNEL;
break;
}
components[n_components++] = ALPHA_CHANNEL;
components[n_components++] = GIMP_ALPHA_CHANNEL;
for (i = 0; i < n_components; i++)
{

View File

@ -43,22 +43,24 @@
static void gimp_component_list_item_class_init (GimpComponentListItemClass *klass);
static void gimp_component_list_item_init (GimpComponentListItem *list_item);
static void gimp_component_list_item_set_viewable (GimpListItem *list_item,
GimpViewable *viewable);
static void gimp_component_list_item_set_viewable (GimpListItem *list_item,
GimpViewable *viewable);
static void gimp_component_list_item_eye_toggled (GtkWidget *widget,
gpointer data);
static void gimp_component_list_item_eye_toggled (GtkWidget *widget,
gpointer data);
static void gimp_component_list_item_visibility_changed (GimpImage *gimage,
ChannelType channel,
gpointer data);
static void gimp_component_list_item_visibility_changed
(GimpImage *gimage,
GimpChannelType channel,
gpointer data);
static void gimp_component_list_item_active_changed (GimpImage *gimage,
ChannelType channel,
gpointer data);
static void gimp_component_list_item_active_changed
(GimpImage *gimage,
GimpChannelType channel,
gpointer data);
static gchar * gimp_component_list_item_get_name (GtkWidget *widget,
gchar **tooltip);
static gchar * gimp_component_list_item_get_name (GtkWidget *widget,
gchar **tooltip);
static GimpListItemClass *parent_class = NULL;
@ -137,17 +139,15 @@ gimp_component_list_item_init (GimpComponentListItem *list_item)
}
GtkWidget *
gimp_component_list_item_new (GimpImage *gimage,
gint preview_size,
ChannelType channel)
gimp_component_list_item_new (GimpImage *gimage,
gint preview_size,
GimpChannelType channel)
{
GimpListItem *list_item;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (preview_size > 0 && preview_size <= 256, NULL);
g_return_val_if_fail (channel >= RED_CHANNEL && channel <= ALPHA_CHANNEL,
NULL);
list_item = g_object_new (GIMP_TYPE_COMPONENT_LIST_ITEM, NULL);
list_item->preview_size = preview_size;
@ -185,15 +185,16 @@ gimp_component_list_item_set_viewable (GimpListItem *list_item,
switch (component_item->channel)
{
case RED_CHANNEL: pixel = RED_PIX; break;
case GREEN_CHANNEL: pixel = GREEN_PIX; break;
case BLUE_CHANNEL: pixel = BLUE_PIX; break;
case GRAY_CHANNEL: pixel = GRAY_PIX; break;
case INDEXED_CHANNEL: pixel = INDEXED_PIX; break;
case ALPHA_CHANNEL: pixel = ALPHA_PIX; break;
case GIMP_RED_CHANNEL: pixel = RED_PIX; break;
case GIMP_GREEN_CHANNEL: pixel = GREEN_PIX; break;
case GIMP_BLUE_CHANNEL: pixel = BLUE_PIX; break;
case GIMP_GRAY_CHANNEL: pixel = GRAY_PIX; break;
case GIMP_INDEXED_CHANNEL: pixel = INDEXED_PIX; break;
case GIMP_ALPHA_CHANNEL: pixel = ALPHA_PIX; break;
default:
pixel = 0;
g_assert_not_reached ();
}
GIMP_IMAGE_PREVIEW (list_item->preview)->channel = pixel;
@ -277,9 +278,9 @@ gimp_component_list_item_eye_toggled (GtkWidget *widget,
}
static void
gimp_component_list_item_visibility_changed (GimpImage *gimage,
ChannelType channel,
gpointer data)
gimp_component_list_item_visibility_changed (GimpImage *gimage,
GimpChannelType channel,
gpointer data)
{
GimpComponentListItem *component_item;
GimpListItem *list_item;
@ -293,7 +294,8 @@ gimp_component_list_item_visibility_changed (GimpImage *gimage,
list_item = GIMP_LIST_ITEM (data);
toggle = GTK_TOGGLE_BUTTON (component_item->eye_button);
visible = gimp_image_get_component_visible (gimage, component_item->channel);
visible = gimp_image_get_component_visible (gimage,
component_item->channel);
if (visible != toggle->active)
{
@ -323,9 +325,9 @@ gimp_component_list_item_visibility_changed (GimpImage *gimage,
}
static void
gimp_component_list_item_active_changed (GimpImage *gimage,
ChannelType channel,
gpointer data)
gimp_component_list_item_active_changed (GimpImage *gimage,
GimpChannelType channel,
gpointer data)
{
GimpComponentListItem *component_item;
gboolean active;
@ -356,12 +358,14 @@ gimp_component_list_item_get_name (GtkWidget *widget,
switch (component_item->channel)
{
case RED_CHANNEL: return g_strdup (_("Red")); break;
case GREEN_CHANNEL: return g_strdup (_("Green")); break;
case BLUE_CHANNEL: return g_strdup (_("Blue")); break;
case GRAY_CHANNEL: return g_strdup (_("Gray")); break;
case INDEXED_CHANNEL: return g_strdup (_("Indexed")); break;
case ALPHA_CHANNEL: return g_strdup (_("Alpha")); break;
default: return g_strdup ("EEK"); break;
case GIMP_RED_CHANNEL: return g_strdup (_("Red")); break;
case GIMP_GREEN_CHANNEL: return g_strdup (_("Green")); break;
case GIMP_BLUE_CHANNEL: return g_strdup (_("Blue")); break;
case GIMP_GRAY_CHANNEL: return g_strdup (_("Gray")); break;
case GIMP_INDEXED_CHANNEL: return g_strdup (_("Indexed")); break;
case GIMP_ALPHA_CHANNEL: return g_strdup (_("Alpha")); break;
default:
return g_strdup (_("EEEEK"));
}
}

View File

@ -37,11 +37,10 @@ typedef struct _GimpComponentListItemClass GimpComponentListItemClass;
struct _GimpComponentListItem
{
GimpListItem parent_instance;
GimpListItem parent_instance;
ChannelType channel;
GtkWidget *eye_button;
GimpChannelType channel;
GtkWidget *eye_button;
};
struct _GimpComponentListItemClass
@ -52,9 +51,9 @@ struct _GimpComponentListItemClass
GType gimp_component_list_item_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_component_list_item_new (GimpImage *gimage,
gint preview_size,
ChannelType channel);
GtkWidget * gimp_component_list_item_new (GimpImage *gimage,
gint preview_size,
GimpChannelType channel);

View File

@ -55,16 +55,6 @@ typedef enum
GIMP_INTERSECT
} GimpChannelOps;
typedef enum
{
GIMP_RED_CHANNEL,
GIMP_GREEN_CHANNEL,
GIMP_BLUE_CHANNEL,
GIMP_GRAY_CHANNEL,
GIMP_INDEXED_CHANNEL,
GIMP_ALPHA_CHANNEL
} GimpChannelType;
typedef enum
{
GIMP_IMAGE_CLONE,
@ -119,6 +109,16 @@ typedef enum
GIMP_ALPHA_LUT
} GimpChannelLutType;
typedef enum
{
GIMP_RED_CHANNEL,
GIMP_GREEN_CHANNEL,
GIMP_BLUE_CHANNEL,
GIMP_GRAY_CHANNEL,
GIMP_INDEXED_CHANNEL,
GIMP_ALPHA_CHANNEL
} GimpChannelType;
typedef enum
{
GIMP_NORMAL_CONVOL,

View File

@ -1,7 +1,7 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Object peoperties deserialization routines
* Object properties deserialization routines
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,7 +1,7 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Object propoerties serialization routines
* Object properties serialization routines
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -42,13 +42,6 @@ init_generated_constants (void)
setvar (cintern ("REPLACE"), flocons (2), NIL);
setvar (cintern ("INTERSECT"), flocons (3), NIL);
setvar (cintern ("RED-CHANNEL"), flocons (0), NIL);
setvar (cintern ("GREEN-CHANNEL"), flocons (1), NIL);
setvar (cintern ("BLUE-CHANNEL"), flocons (2), NIL);
setvar (cintern ("GRAY-CHANNEL"), flocons (3), NIL);
setvar (cintern ("INDEXED-CHANNEL"), flocons (4), NIL);
setvar (cintern ("ALPHA-CHANNEL"), flocons (5), NIL);
setvar (cintern ("IMAGE-CLONE"), flocons (0), NIL);
setvar (cintern ("PATTERN-CLONE"), flocons (1), NIL);
@ -82,6 +75,13 @@ init_generated_constants (void)
setvar (cintern ("BLUE-LUT"), flocons (3), NIL);
setvar (cintern ("ALPHA-LUT"), flocons (4), NIL);
setvar (cintern ("RED-CHANNEL"), flocons (0), NIL);
setvar (cintern ("GREEN-CHANNEL"), flocons (1), NIL);
setvar (cintern ("BLUE-CHANNEL"), flocons (2), NIL);
setvar (cintern ("GRAY-CHANNEL"), flocons (3), NIL);
setvar (cintern ("INDEXED-CHANNEL"), flocons (4), NIL);
setvar (cintern ("ALPHA-CHANNEL"), flocons (5), NIL);
setvar (cintern ("NORMAL-CONVOL"), flocons (0), NIL);
setvar (cintern ("ABSOLUTE-CONVOL"), flocons (1), NIL);
setvar (cintern ("NEGATIVE-CONVOL"), flocons (2), NIL);

View File

@ -170,18 +170,6 @@ package Gimp::CodeGen::enums;
GIMP_BLUE_LUT => '3',
GIMP_ALPHA_LUT => '4' }
},
ChannelType =>
{ contig => 1,
header => 'core/core-types.h',
symbols => [ qw(RED_CHANNEL GREEN_CHANNEL BLUE_CHANNEL
GRAY_CHANNEL INDEXED_CHANNEL ALPHA_CHANNEL) ],
mapping => { RED_CHANNEL => '0',
GREEN_CHANNEL => '1',
BLUE_CHANNEL => '2',
GRAY_CHANNEL => '3',
INDEXED_CHANNEL => '4',
ALPHA_CHANNEL => '5' }
},
AddMaskType =>
{ contig => 1,
header => 'core/core-types.h',
@ -298,6 +286,19 @@ package Gimp::CodeGen::enums;
GIMP_GRAY => '1',
GIMP_INDEXED => '2' }
},
GimpChannelType =>
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_RED_CHANNEL GIMP_GREEN_CHANNEL
GIMP_BLUE_CHANNEL GIMP_GRAY_CHANNEL
GIMP_INDEXED_CHANNEL GIMP_ALPHA_CHANNEL) ],
mapping => { GIMP_RED_CHANNEL => '0',
GIMP_GREEN_CHANNEL => '1',
GIMP_BLUE_CHANNEL => '2',
GIMP_GRAY_CHANNEL => '3',
GIMP_INDEXED_CHANNEL => '4',
GIMP_ALPHA_CHANNEL => '5' }
},
GimpGradientType =>
{ contig => 1,
header => 'core/core-enums.h',

View File

@ -1152,14 +1152,14 @@ $#procs--;
my $comp_arg = <<'CODE';
splice @inargs, 1, 0, ({ name => 'component',
type => 'enum ChannelType (no AUXILLARY_CHANNEL)',
type => 'enum GimpChannelType (no AUXILLARY_CHANNEL)',
desc => 'The image component: { %%desc%% }' });
$invoke{code} = <<'SUCCESS';
{
if (component == GRAY_CHANNEL)
if (component == GIMP_GRAY_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_GRAY;
else if (component == INDEXED_CHANNEL)
else if (component == GIMP_INDEXED_CHANNEL)
success = gimp_image_base_type (gimage) == GIMP_INDEXED;
else
success = gimp_image_base_type (gimage) == GIMP_RGB;