[gimp] app: rename mask enum values GIMP_COMPONENT_RED, GREEN, BLUE etc.
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename mask enum values GIMP_COMPONENT_RED, GREEN, BLUE etc.
- Date: Sun, 6 Sep 2015 22:36:23 +0000 (UTC)
commit 4479cedf13842dc1658e9bfca82c220324d331a8
Author: Michael Natterer <mitch gimp org>
Date: Mon Sep 7 00:35:02 2015 +0200
app: rename mask enum values GIMP_COMPONENT_RED,GREEN,BLUE etc.
to GIMP_COMPONENT_MASK_RED,GREEN,BLUE etc.
app/core/core-enums.c | 20 +++++++-------
app/core/core-enums.h | 10 +++---
app/core/gimpchannel.c | 2 +-
app/core/gimpimage.c | 36 +++++++++++++-------------
app/core/gimpimagemap.c | 2 +-
app/core/gimplayer.c | 2 +-
app/gegl/gimpapplicator.c | 2 +-
app/operations/gimpoperationmaskcomponents.c | 12 ++++----
app/paint/gimpmybrush.c | 2 +-
app/paint/gimppaintcore-loops.c | 10 +++---
app/paint/gimppaintcore.c | 2 +-
11 files changed, 50 insertions(+), 50 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index a439bc7..846dbd1 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -13,21 +13,21 @@ gimp_component_mask_get_type (void)
{
static const GFlagsValue values[] =
{
- { GIMP_COMPONENT_RED, "GIMP_COMPONENT_RED", "red" },
- { GIMP_COMPONENT_GREEN, "GIMP_COMPONENT_GREEN", "green" },
- { GIMP_COMPONENT_BLUE, "GIMP_COMPONENT_BLUE", "blue" },
- { GIMP_COMPONENT_ALPHA, "GIMP_COMPONENT_ALPHA", "alpha" },
- { GIMP_COMPONENT_ALL, "GIMP_COMPONENT_ALL", "all" },
+ { GIMP_COMPONENT_MASK_RED, "GIMP_COMPONENT_MASK_RED", "red" },
+ { GIMP_COMPONENT_MASK_GREEN, "GIMP_COMPONENT_MASK_GREEN", "green" },
+ { GIMP_COMPONENT_MASK_BLUE, "GIMP_COMPONENT_MASK_BLUE", "blue" },
+ { GIMP_COMPONENT_MASK_ALPHA, "GIMP_COMPONENT_MASK_ALPHA", "alpha" },
+ { GIMP_COMPONENT_MASK_ALL, "GIMP_COMPONENT_MASK_ALL", "all" },
{ 0, NULL, NULL }
};
static const GimpFlagsDesc descs[] =
{
- { GIMP_COMPONENT_RED, "GIMP_COMPONENT_RED", NULL },
- { GIMP_COMPONENT_GREEN, "GIMP_COMPONENT_GREEN", NULL },
- { GIMP_COMPONENT_BLUE, "GIMP_COMPONENT_BLUE", NULL },
- { GIMP_COMPONENT_ALPHA, "GIMP_COMPONENT_ALPHA", NULL },
- { GIMP_COMPONENT_ALL, "GIMP_COMPONENT_ALL", NULL },
+ { GIMP_COMPONENT_MASK_RED, "GIMP_COMPONENT_MASK_RED", NULL },
+ { GIMP_COMPONENT_MASK_GREEN, "GIMP_COMPONENT_MASK_GREEN", NULL },
+ { GIMP_COMPONENT_MASK_BLUE, "GIMP_COMPONENT_MASK_BLUE", NULL },
+ { GIMP_COMPONENT_MASK_ALPHA, "GIMP_COMPONENT_MASK_ALPHA", NULL },
+ { GIMP_COMPONENT_MASK_ALL, "GIMP_COMPONENT_MASK_ALL", NULL },
{ 0, NULL, NULL }
};
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 374c810..92e0200 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -42,12 +42,12 @@ GType gimp_component_mask_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
- GIMP_COMPONENT_RED = 1 << 0,
- GIMP_COMPONENT_GREEN = 1 << 1,
- GIMP_COMPONENT_BLUE = 1 << 2,
- GIMP_COMPONENT_ALPHA = 1 << 3,
+ GIMP_COMPONENT_MASK_RED = 1 << 0,
+ GIMP_COMPONENT_MASK_GREEN = 1 << 1,
+ GIMP_COMPONENT_MASK_BLUE = 1 << 2,
+ GIMP_COMPONENT_MASK_ALPHA = 1 << 3,
- GIMP_COMPONENT_ALL = (GIMP_COMPONENT_RED | GIMP_COMPONENT_GREEN | GIMP_COMPONENT_BLUE |
GIMP_COMPONENT_ALPHA)
+ GIMP_COMPONENT_MASK_ALL = (GIMP_COMPONENT_MASK_RED | GIMP_COMPONENT_MASK_GREEN | GIMP_COMPONENT_MASK_BLUE
| GIMP_COMPONENT_MASK_ALPHA)
} GimpComponentMask;
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 5276fcb..f5506a0 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -950,7 +950,7 @@ static GimpComponentMask
gimp_channel_get_active_mask (const GimpDrawable *drawable)
{
/* Return all, because that skips the component mask op when painting */
- return GIMP_COMPONENT_ALL;
+ return GIMP_COMPONENT_MASK_ALL;
}
static void
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index a467e23..e2c3d43 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1537,7 +1537,7 @@ gimp_image_get_graph (GimpProjectable *projectable)
gegl_node_connect_to (layers_node, "output",
channels_node, "input");
- mask = ~gimp_image_get_visible_mask (image) & GIMP_COMPONENT_ALL;
+ mask = ~gimp_image_get_visible_mask (image) & GIMP_COMPONENT_MASK_ALL;
private->visible_mask =
gegl_node_new_child (private->graph,
@@ -2728,18 +2728,18 @@ gimp_image_get_active_mask (const GimpImage *image)
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
- mask |= (private->active[RED]) ? GIMP_COMPONENT_RED : 0;
- mask |= (private->active[GREEN]) ? GIMP_COMPONENT_GREEN : 0;
- mask |= (private->active[BLUE]) ? GIMP_COMPONENT_BLUE : 0;
- mask |= (private->active[ALPHA]) ? GIMP_COMPONENT_ALPHA : 0;
+ mask |= (private->active[RED]) ? GIMP_COMPONENT_MASK_RED : 0;
+ mask |= (private->active[GREEN]) ? GIMP_COMPONENT_MASK_GREEN : 0;
+ mask |= (private->active[BLUE]) ? GIMP_COMPONENT_MASK_BLUE : 0;
+ mask |= (private->active[ALPHA]) ? GIMP_COMPONENT_MASK_ALPHA : 0;
break;
case GIMP_GRAY:
case GIMP_INDEXED:
- mask |= (private->active[GRAY]) ? GIMP_COMPONENT_RED : 0;
- mask |= (private->active[GRAY]) ? GIMP_COMPONENT_GREEN : 0;
- mask |= (private->active[GRAY]) ? GIMP_COMPONENT_BLUE : 0;
- mask |= (private->active[ALPHA_G]) ? GIMP_COMPONENT_ALPHA : 0;
+ mask |= (private->active[GRAY]) ? GIMP_COMPONENT_MASK_RED : 0;
+ mask |= (private->active[GRAY]) ? GIMP_COMPONENT_MASK_GREEN : 0;
+ mask |= (private->active[GRAY]) ? GIMP_COMPONENT_MASK_BLUE : 0;
+ mask |= (private->active[ALPHA_G]) ? GIMP_COMPONENT_MASK_ALPHA : 0;
break;
}
@@ -2768,7 +2768,7 @@ gimp_image_set_component_visible (GimpImage *image,
{
GimpComponentMask mask;
- mask = ~gimp_image_get_visible_mask (image) & GIMP_COMPONENT_ALL;
+ mask = ~gimp_image_get_visible_mask (image) & GIMP_COMPONENT_MASK_ALL;
gegl_node_set (private->visible_mask,
"mask", mask,
@@ -2831,18 +2831,18 @@ gimp_image_get_visible_mask (const GimpImage *image)
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
- mask |= (private->visible[RED]) ? GIMP_COMPONENT_RED : 0;
- mask |= (private->visible[GREEN]) ? GIMP_COMPONENT_GREEN : 0;
- mask |= (private->visible[BLUE]) ? GIMP_COMPONENT_BLUE : 0;
- mask |= (private->visible[ALPHA]) ? GIMP_COMPONENT_ALPHA : 0;
+ mask |= (private->visible[RED]) ? GIMP_COMPONENT_MASK_RED : 0;
+ mask |= (private->visible[GREEN]) ? GIMP_COMPONENT_MASK_GREEN : 0;
+ mask |= (private->visible[BLUE]) ? GIMP_COMPONENT_MASK_BLUE : 0;
+ mask |= (private->visible[ALPHA]) ? GIMP_COMPONENT_MASK_ALPHA : 0;
break;
case GIMP_GRAY:
case GIMP_INDEXED:
- mask |= (private->visible[GRAY]) ? GIMP_COMPONENT_RED : 0;
- mask |= (private->visible[GRAY]) ? GIMP_COMPONENT_GREEN : 0;
- mask |= (private->visible[GRAY]) ? GIMP_COMPONENT_BLUE : 0;
- mask |= (private->visible[ALPHA]) ? GIMP_COMPONENT_ALPHA : 0;
+ mask |= (private->visible[GRAY]) ? GIMP_COMPONENT_MASK_RED : 0;
+ mask |= (private->visible[GRAY]) ? GIMP_COMPONENT_MASK_GREEN : 0;
+ mask |= (private->visible[GRAY]) ? GIMP_COMPONENT_MASK_BLUE : 0;
+ mask |= (private->visible[ALPHA]) ? GIMP_COMPONENT_MASK_ALPHA : 0;
break;
}
diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c
index 2e97c63..6da2a0c 100644
--- a/app/core/gimpimagemap.c
+++ b/app/core/gimpimagemap.c
@@ -499,7 +499,7 @@ gimp_image_map_sync_affect (GimpImageMap *image_map)
* when finally merged (see bug #699279)
*/
if (! gimp_drawable_has_alpha (image_map->drawable))
- active_mask &= ~GIMP_COMPONENT_ALPHA;
+ active_mask &= ~GIMP_COMPONENT_MASK_ALPHA;
gimp_applicator_set_affect (image_map->applicator, active_mask);
}
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index ab728fe..c2679e2 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -1173,7 +1173,7 @@ gimp_layer_get_active_mask (const GimpDrawable *drawable)
GimpComponentMask mask = gimp_image_get_active_mask (image);
if (gimp_drawable_has_alpha (drawable) && layer->lock_alpha)
- mask &= ~GIMP_COMPONENT_ALPHA;
+ mask &= ~GIMP_COMPONENT_MASK_ALPHA;
return mask;
}
diff --git a/app/gegl/gimpapplicator.c b/app/gegl/gimpapplicator.c
index b8dd90b..67ebd79 100644
--- a/app/gegl/gimpapplicator.c
+++ b/app/gegl/gimpapplicator.c
@@ -59,7 +59,7 @@ gimp_applicator_init (GimpApplicator *applicator)
{
applicator->opacity = 1.0;
applicator->paint_mode = GIMP_NORMAL_MODE;
- applicator->affect = GIMP_COMPONENT_ALL;
+ applicator->affect = GIMP_COMPONENT_MASK_ALL;
}
static void
diff --git a/app/operations/gimpoperationmaskcomponents.c b/app/operations/gimpoperationmaskcomponents.c
index 036ad5b..92330ae 100644
--- a/app/operations/gimpoperationmaskcomponents.c
+++ b/app/operations/gimpoperationmaskcomponents.c
@@ -90,7 +90,7 @@ gimp_operation_mask_components_class_init (GimpOperationMaskComponentsClass *kla
"Mask",
"The component mask",
GIMP_TYPE_COMPONENT_MASK,
- GIMP_COMPONENT_ALL,
+ GIMP_COMPONENT_MASK_ALL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
}
@@ -181,7 +181,7 @@ gimp_operation_mask_components_parent_process (GeglOperation *operation,
return TRUE;
}
- else if (self->mask == GIMP_COMPONENT_ALL)
+ else if (self->mask == GIMP_COMPONENT_MASK_ALL)
{
GObject *aux = gegl_operation_context_get_object (context, "aux");
@@ -216,10 +216,10 @@ gimp_operation_mask_components_process (GeglOperation *operation,
while (samples--)
{
- dest[RED] = (mask & GIMP_COMPONENT_RED) ? aux[RED] : src[RED];
- dest[GREEN] = (mask & GIMP_COMPONENT_GREEN) ? aux[GREEN] : src[GREEN];
- dest[BLUE] = (mask & GIMP_COMPONENT_BLUE) ? aux[BLUE] : src[BLUE];
- dest[ALPHA] = (mask & GIMP_COMPONENT_ALPHA) ? aux[ALPHA] : src[ALPHA];
+ dest[RED] = (mask & GIMP_COMPONENT_MASK_RED) ? aux[RED] : src[RED];
+ dest[GREEN] = (mask & GIMP_COMPONENT_MASK_GREEN) ? aux[GREEN] : src[GREEN];
+ dest[BLUE] = (mask & GIMP_COMPONENT_MASK_BLUE) ? aux[BLUE] : src[BLUE];
+ dest[ALPHA] = (mask & GIMP_COMPONENT_MASK_ALPHA) ? aux[ALPHA] : src[ALPHA];
src += 4;
diff --git a/app/paint/gimpmybrush.c b/app/paint/gimpmybrush.c
index 23a057e..229e90b 100644
--- a/app/paint/gimpmybrush.c
+++ b/app/paint/gimpmybrush.c
@@ -190,7 +190,7 @@ gimp_mybrush_motion (GimpPaintCore *paint_core,
mypaint_brush_set_base_value (mybrush->private->brush,
MYPAINT_BRUSH_SETTING_LOCK_ALPHA,
- (active_mask & GIMP_COMPONENT_ALPHA) ?
+ (active_mask & GIMP_COMPONENT_MASK_ALPHA) ?
FALSE : TRUE);
gimp_context_get_foreground (context, &fg);
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index fb9df17..0a35704 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -395,7 +395,7 @@ mask_components_onto (GeglBuffer *src_buffer,
iterator_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
- while (gegl_buffer_iterator_next(iter))
+ while (gegl_buffer_iterator_next (iter))
{
gfloat *dest = (gfloat *)iter->data[0];
gfloat *src = (gfloat *)iter->data[1];
@@ -404,10 +404,10 @@ mask_components_onto (GeglBuffer *src_buffer,
while (samples--)
{
- dest[RED] = (mask & GIMP_COMPONENT_RED) ? aux[RED] : src[RED];
- dest[GREEN] = (mask & GIMP_COMPONENT_GREEN) ? aux[GREEN] : src[GREEN];
- dest[BLUE] = (mask & GIMP_COMPONENT_BLUE) ? aux[BLUE] : src[BLUE];
- dest[ALPHA] = (mask & GIMP_COMPONENT_ALPHA) ? aux[ALPHA] : src[ALPHA];
+ dest[RED] = (mask & GIMP_COMPONENT_MASK_RED) ? aux[RED] : src[RED];
+ dest[GREEN] = (mask & GIMP_COMPONENT_MASK_GREEN) ? aux[GREEN] : src[GREEN];
+ dest[BLUE] = (mask & GIMP_COMPONENT_MASK_BLUE) ? aux[BLUE] : src[BLUE];
+ dest[ALPHA] = (mask & GIMP_COMPONENT_MASK_ALPHA) ? aux[ALPHA] : src[ALPHA];
src += 4;
aux += 4;
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 8103ed5..ccca4b4 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -454,7 +454,7 @@ gimp_paint_core_start (GimpPaintCore *core,
}
/* Allocate the scratch buffer if there's a component mask */
- if (gimp_drawable_get_active_mask (drawable) != GIMP_COMPONENT_ALL)
+ if (gimp_drawable_get_active_mask (drawable) != GIMP_COMPONENT_MASK_ALL)
{
const Babl *format;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]