mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 01:13:24 +00:00

This is mostly an empty shell whose goal is to serve as base class for specific dynamically generated per-operation subclasses, which will have properties mimicking the arguments of the GEGL operation. Most of the fundamental type args will just use the base GLib param spec types instead of GEGL ones. As a special case, the GeglParamEnum arguments are transformed into GimpChoice param specs on libgimp side. The reason is that most of the time, enum types are created within the scope of an operation code only and cannot be properly reconstructed over the wire. I could just transform these into an int type (which is mostly what is done in GEGL right now when running an op with such arg), but GimpChoice allow much nicer string-type args, which make much more semantic code. This class was initially created for plug-ins, but it would work very well to run GEGL ops on drawables. So let's do it. Finally add a gimp_drawable_filter_get_config() to request the current config of a filter. Note that right now, we can't do much with this config object other than observing an operation args and default values. Being able to update a filter's settings will come up in further commits.
53 lines
1.5 KiB
C
53 lines
1.5 KiB
C
/* LIBGIMP - The GIMP Library
|
|
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
|
*
|
|
* gimpdrawablefilterconfig.c
|
|
* Copyright (C) 2024 Jehan
|
|
*
|
|
* This library is free software: you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* This library 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
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see
|
|
* <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#include "gimp.h"
|
|
|
|
|
|
/**
|
|
* GimpDrawableFilterConfig:
|
|
*
|
|
* The base class for [class@DrawableFilter] specific config objects.
|
|
*
|
|
* A drawable filter config is created by a [class@DrawableFilter] using
|
|
* [method@DrawableFilter.get_config] and its properties match the
|
|
* filter's arguments in number, order and type.
|
|
*
|
|
* Since: 3.0
|
|
**/
|
|
|
|
|
|
G_DEFINE_ABSTRACT_TYPE (GimpDrawableFilterConfig, gimp_drawable_filter_config, G_TYPE_OBJECT)
|
|
|
|
#define parent_class gimp_drawable_filter_config_parent_class
|
|
|
|
|
|
static void
|
|
gimp_drawable_filter_config_class_init (GimpDrawableFilterConfigClass *klass)
|
|
{
|
|
}
|
|
|
|
static void
|
|
gimp_drawable_filter_config_init (GimpDrawableFilterConfig *config)
|
|
{
|
|
}
|