Whatever a plug-in does, it should not be able to trigger WARNINGs or CRITICALs on the core process. Here this was possible when requesting an array of param specs with gimp_drawable_filter_operation_get_pspecs() on a GEGL operation, while GIMP doesn't support all types for this filter's arguments. Trying to send unsupported type specs through the wire would fail. Unfortunately just saying that we must add support for these types is not enough because we simply cannot support every possible types. First because even in current GEGL core filters, there are types we might never support (e.g. audio fragments?). But even more because third-party filters could have custom types too (just like our own filters have custom GIMP types). So instead, acknowledge that some types cannot be sent through the wire, verify when it's one such argument and simply output an informational message on stderr (because the info of a non-supported type is still interesting in case this is something we should in fact add support for; it's much better than silently ignoring the argument).
43 lines
2.1 KiB
C
43 lines
2.1 KiB
C
/* LIBGIMP - The GIMP Library
|
|
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
|
*
|
|
* gimpgpparams.h
|
|
* Copyright (C) 2019 Michael Natterer <mitch@gimp.org>
|
|
*
|
|
* 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/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
GParamSpec * _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def);
|
|
gboolean _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
|
|
GPParamDef *param_def,
|
|
gboolean check_only);
|
|
|
|
GimpValueArray * _gimp_gp_params_to_value_array (gpointer gimp,
|
|
GParamSpec **pspecs,
|
|
gint n_pspecs,
|
|
const GPParam *params,
|
|
gint n_params,
|
|
gboolean return_values);
|
|
GPParam * _gimp_value_array_to_gp_params (const GimpValueArray *args,
|
|
gboolean full_copy);
|
|
void _gimp_gp_params_free (GPParam *params,
|
|
gint n_params,
|
|
gboolean full_copy);
|
|
|
|
G_END_DECLS
|