gimp-operations.c 9.13 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* GIMP - The GNU Image Manipulation Program
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * gimp-operations.c
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "config.h"

22
#include <gdk-pixbuf/gdk-pixbuf.h>
23 24 25 26 27 28
#include <gegl.h>

#include "operations-types.h"

#include "core/gimp.h"

29 30
#include "gegl/gimp-gegl-config.h"

31 32
#include "gimp-operations.h"

33
#include "gimpoperationblend.h"
34 35 36
#include "gimpoperationborder.h"
#include "gimpoperationcagecoefcalc.h"
#include "gimpoperationcagetransform.h"
37
#include "gimpoperationcomposecrop.h"
38
#include "gimpoperationequalize.h"
Ell's avatar
Ell committed
39
#include "gimpoperationflood.h"
40 41 42
#include "gimpoperationgrow.h"
#include "gimpoperationhistogramsink.h"
#include "gimpoperationmaskcomponents.h"
43
#include "gimpoperationprofiletransform.h"
44
#include "gimpoperationscalarmultiply.h"
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
#include "gimpoperationsemiflatten.h"
#include "gimpoperationsetalpha.h"
#include "gimpoperationshapeburst.h"
#include "gimpoperationshrink.h"
#include "gimpoperationthresholdalpha.h"

#include "gimpoperationbrightnesscontrast.h"
#include "gimpoperationcolorbalance.h"
#include "gimpoperationcolorize.h"
#include "gimpoperationcurves.h"
#include "gimpoperationdesaturate.h"
#include "gimpoperationhuesaturation.h"
#include "gimpoperationlevels.h"
#include "gimpoperationposterize.h"
#include "gimpoperationthreshold.h"

61 62 63 64 65 66 67
#include "gimpbrightnesscontrastconfig.h"
#include "gimpcolorbalanceconfig.h"
#include "gimpcolorizeconfig.h"
#include "gimpcurvesconfig.h"
#include "gimphuesaturationconfig.h"
#include "gimplevelsconfig.h"

68
#include "layer-modes-legacy/gimpoperationadditionlegacy.h"
69
#include "layer-modes-legacy/gimpoperationburnlegacy.h"
70
#include "layer-modes-legacy/gimpoperationdarkenonlylegacy.h"
71 72 73 74 75 76 77
#include "layer-modes-legacy/gimpoperationdifferencelegacy.h"
#include "layer-modes-legacy/gimpoperationdividelegacy.h"
#include "layer-modes-legacy/gimpoperationdodgelegacy.h"
#include "layer-modes-legacy/gimpoperationgrainextractlegacy.h"
#include "layer-modes-legacy/gimpoperationgrainmergelegacy.h"
#include "layer-modes-legacy/gimpoperationhardlightlegacy.h"
#include "layer-modes-legacy/gimpoperationhsvcolorlegacy.h"
78 79 80
#include "layer-modes-legacy/gimpoperationhsvhuelegacy.h"
#include "layer-modes-legacy/gimpoperationhsvsaturationlegacy.h"
#include "layer-modes-legacy/gimpoperationhsvvaluelegacy.h"
81 82 83 84 85 86 87 88 89 90 91 92 93 94
#include "layer-modes-legacy/gimpoperationlightenonlylegacy.h"
#include "layer-modes-legacy/gimpoperationmultiplylegacy.h"
#include "layer-modes-legacy/gimpoperationscreenlegacy.h"
#include "layer-modes-legacy/gimpoperationsoftlightlegacy.h"
#include "layer-modes-legacy/gimpoperationsubtractlegacy.h"

#include "layer-modes/gimpoperationaddition.h"
#include "layer-modes/gimpoperationantierase.h"
#include "layer-modes/gimpoperationbehind.h"
#include "layer-modes/gimpoperationburn.h"
#include "layer-modes/gimpoperationcolorerase.h"
#include "layer-modes/gimpoperationdarkenonly.h"
#include "layer-modes/gimpoperationdifference.h"
#include "layer-modes/gimpoperationdissolve.h"
95
#include "layer-modes/gimpoperationdivide.h"
96
#include "layer-modes/gimpoperationdodge.h"
97
#include "layer-modes/gimpoperationerase.h"
98 99
#include "layer-modes/gimpoperationgrainextract.h"
#include "layer-modes/gimpoperationgrainmerge.h"
100 101 102 103 104
#include "layer-modes/gimpoperationhardlight.h"
#include "layer-modes/gimpoperationhsvcolor.h"
#include "layer-modes/gimpoperationhsvhue.h"
#include "layer-modes/gimpoperationhsvsaturation.h"
#include "layer-modes/gimpoperationhsvvalue.h"
105 106
#include "layer-modes/gimpoperationlchchroma.h"
#include "layer-modes/gimpoperationlchcolor.h"
107
#include "layer-modes/gimpoperationlchhue.h"
108
#include "layer-modes/gimpoperationlchlightness.h"
109 110 111 112
#include "layer-modes/gimpoperationlightenonly.h"
#include "layer-modes/gimpoperationmultiply.h"
#include "layer-modes/gimpoperationnormal.h"
#include "layer-modes/gimpoperationoverlay.h"
113
#include "layer-modes/gimpoperationreplace.h"
114 115 116
#include "layer-modes/gimpoperationscreen.h"
#include "layer-modes/gimpoperationsoftlight.h"
#include "layer-modes/gimpoperationsubtract.h"
117 118 119


void
120
gimp_operations_init (void)
121
{
122
  g_type_class_ref (GIMP_TYPE_OPERATION_BLEND);
123 124 125
  g_type_class_ref (GIMP_TYPE_OPERATION_BORDER);
  g_type_class_ref (GIMP_TYPE_OPERATION_CAGE_COEF_CALC);
  g_type_class_ref (GIMP_TYPE_OPERATION_CAGE_TRANSFORM);
126
  g_type_class_ref (GIMP_TYPE_OPERATION_COMPOSE_CROP);
127
  g_type_class_ref (GIMP_TYPE_OPERATION_EQUALIZE);
Ell's avatar
Ell committed
128
  g_type_class_ref (GIMP_TYPE_OPERATION_FLOOD);
129 130 131
  g_type_class_ref (GIMP_TYPE_OPERATION_GROW);
  g_type_class_ref (GIMP_TYPE_OPERATION_HISTOGRAM_SINK);
  g_type_class_ref (GIMP_TYPE_OPERATION_MASK_COMPONENTS);
132
  g_type_class_ref (GIMP_TYPE_OPERATION_PROFILE_TRANSFORM);
133
  g_type_class_ref (GIMP_TYPE_OPERATION_SCALAR_MULTIPLY);
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
  g_type_class_ref (GIMP_TYPE_OPERATION_SEMI_FLATTEN);
  g_type_class_ref (GIMP_TYPE_OPERATION_SET_ALPHA);
  g_type_class_ref (GIMP_TYPE_OPERATION_SHAPEBURST);
  g_type_class_ref (GIMP_TYPE_OPERATION_SHRINK);
  g_type_class_ref (GIMP_TYPE_OPERATION_THRESHOLD_ALPHA);

  g_type_class_ref (GIMP_TYPE_OPERATION_BRIGHTNESS_CONTRAST);
  g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_BALANCE);
  g_type_class_ref (GIMP_TYPE_OPERATION_COLORIZE);
  g_type_class_ref (GIMP_TYPE_OPERATION_CURVES);
  g_type_class_ref (GIMP_TYPE_OPERATION_DESATURATE);
  g_type_class_ref (GIMP_TYPE_OPERATION_HUE_SATURATION);
  g_type_class_ref (GIMP_TYPE_OPERATION_LEVELS);
  g_type_class_ref (GIMP_TYPE_OPERATION_POSTERIZE);
  g_type_class_ref (GIMP_TYPE_OPERATION_THRESHOLD);

150
  g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL);
151
  g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE);
152
  g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND);
153 154
  g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
  g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_LEGACY);
155 156
  g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN);
  g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_LEGACY);
157
  g_type_class_ref (GIMP_TYPE_OPERATION_OVERLAY);
158 159
  g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE);
  g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_LEGACY);
160 161 162 163
  g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION);
  g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT);
  g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT_LEGACY);
164 165 166 167
  g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY);
  g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY);
  g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY_LEGACY);
168 169 170 171 172 173 174 175
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE_LEGACY);
176 177
  g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE);
  g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE_LEGACY);
178 179
  g_type_class_ref (GIMP_TYPE_OPERATION_DODGE);
  g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_LEGACY);
180 181
  g_type_class_ref (GIMP_TYPE_OPERATION_BURN);
  g_type_class_ref (GIMP_TYPE_OPERATION_BURN_LEGACY);
182 183 184 185
  g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT);
  g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT);
  g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_LEGACY);
186 187 188 189
  g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT);
  g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_LEGACY);
  g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE);
  g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_LEGACY);
190
  g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE);
191 192 193 194
  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_HUE);
  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_CHROMA);
  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_COLOR);
  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_LIGHTNESS);
195
  g_type_class_ref (GIMP_TYPE_OPERATION_ERASE);
196
  g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE);
197
  g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE);
198 199 200 201 202 203 204 205 206 207 208 209 210

  gimp_gegl_config_register ("gimp:brightness-contrast",
                             GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG);
  gimp_gegl_config_register ("gimp:color-balance",
                             GIMP_TYPE_COLOR_BALANCE_CONFIG);
  gimp_gegl_config_register ("gimp:colorize",
                             GIMP_TYPE_COLORIZE_CONFIG);
  gimp_gegl_config_register ("gimp:curves",
                             GIMP_TYPE_CURVES_CONFIG);
  gimp_gegl_config_register ("gimp:hue-saturation",
                             GIMP_TYPE_HUE_SATURATION_CONFIG);
  gimp_gegl_config_register ("gimp:levels",
                             GIMP_TYPE_LEVELS_CONFIG);
211
}