2007-12-29 08:57:51 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2007-12-29 09:35:04 +08:00
|
|
|
* gimp-gegl.c
|
2007-12-29 08:57:51 +08:00
|
|
|
* Copyright (C) 2007 Øyvind Kolås <pippin@gimp.org>
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2007-12-29 08:57:51 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2007-12-29 08:57:51 +08:00
|
|
|
* (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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2007-12-29 08:57:51 +08:00
|
|
|
*/
|
|
|
|
|
2007-12-29 09:35:04 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2008-01-16 23:52:02 +08:00
|
|
|
#include <gegl.h>
|
2007-12-29 09:35:04 +08:00
|
|
|
|
2007-12-29 23:25:40 +08:00
|
|
|
#include "gegl-types.h"
|
|
|
|
|
2008-06-04 20:49:18 +08:00
|
|
|
#include "base/tile.h"
|
|
|
|
|
2008-11-16 18:30:49 +08:00
|
|
|
#include "config/gimpbaseconfig.h"
|
|
|
|
|
|
|
|
#include "core/gimp.h"
|
|
|
|
|
2007-12-29 09:35:04 +08:00
|
|
|
#include "gimp-gegl.h"
|
2008-01-10 20:52:19 +08:00
|
|
|
#include "gimpoperationcolorbalance.h"
|
2008-01-04 23:16:32 +08:00
|
|
|
#include "gimpoperationcolorize.h"
|
2008-01-23 17:28:16 +08:00
|
|
|
#include "gimpoperationcurves.h"
|
2008-01-04 02:54:58 +08:00
|
|
|
#include "gimpoperationdesaturate.h"
|
2008-01-15 04:44:01 +08:00
|
|
|
#include "gimpoperationhuesaturation.h"
|
2008-01-08 04:37:25 +08:00
|
|
|
#include "gimpoperationlevels.h"
|
2008-01-04 23:16:32 +08:00
|
|
|
#include "gimpoperationposterize.h"
|
2008-01-04 03:23:35 +08:00
|
|
|
#include "gimpoperationthreshold.h"
|
2007-12-29 10:19:23 +08:00
|
|
|
#include "gimpoperationtilesink.h"
|
|
|
|
#include "gimpoperationtilesource.h"
|
2007-12-29 08:57:51 +08:00
|
|
|
|
2008-10-25 22:16:22 +08:00
|
|
|
#include "gimpoperationpointlayermode.h"
|
2008-10-12 01:20:20 +08:00
|
|
|
|
2007-12-29 08:57:51 +08:00
|
|
|
|
2008-11-16 18:30:49 +08:00
|
|
|
static void gimp_gegl_notify_tile_cache_size (GimpBaseConfig *config);
|
|
|
|
|
|
|
|
|
2007-12-29 09:35:04 +08:00
|
|
|
void
|
2008-11-16 18:30:49 +08:00
|
|
|
gimp_gegl_init (Gimp *gimp)
|
2007-12-29 08:57:51 +08:00
|
|
|
{
|
2008-11-16 18:30:49 +08:00
|
|
|
GimpBaseConfig *config;
|
|
|
|
|
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
|
|
|
|
|
|
|
config = GIMP_BASE_CONFIG (gimp->config);
|
|
|
|
|
2008-06-04 20:49:18 +08:00
|
|
|
g_object_set (gegl_config (),
|
|
|
|
"tile-width", TILE_WIDTH,
|
|
|
|
"tile-height", TILE_HEIGHT,
|
2008-11-16 18:30:49 +08:00
|
|
|
"cache-size", config->tile_cache_size,
|
2008-06-04 20:49:18 +08:00
|
|
|
NULL);
|
|
|
|
|
2008-11-16 18:30:49 +08:00
|
|
|
g_signal_connect (config, "notify::tile-cache-size",
|
|
|
|
G_CALLBACK (gimp_gegl_notify_tile_cache_size),
|
|
|
|
NULL);
|
|
|
|
|
2008-10-12 01:20:20 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SINK);
|
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SOURCE);
|
|
|
|
|
2008-01-10 20:52:19 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_BALANCE);
|
2008-01-04 23:16:32 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_COLORIZE);
|
2008-01-23 17:28:16 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_CURVES);
|
2008-01-04 02:54:58 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_DESATURATE);
|
2008-01-15 04:44:01 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_HUE_SATURATION);
|
2008-01-08 04:37:25 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_LEVELS);
|
2008-01-04 23:16:32 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_POSTERIZE);
|
2008-01-04 03:23:35 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_THRESHOLD);
|
2008-10-12 01:20:20 +08:00
|
|
|
|
2008-10-25 22:16:22 +08:00
|
|
|
g_type_class_ref (GIMP_TYPE_OPERATION_POINT_LAYER_MODE);
|
2007-12-29 08:57:51 +08:00
|
|
|
}
|
2008-11-16 18:30:49 +08:00
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_gegl_notify_tile_cache_size (GimpBaseConfig *config)
|
|
|
|
{
|
|
|
|
g_object_set (gegl_config (),
|
|
|
|
"cache-size", config->tile_cache_size,
|
|
|
|
NULL);
|
|
|
|
}
|