The GimpPlugInClass:: prefix is important, otherwise GObject
Introspection tools don't take these docs/annotations into account (and
most methods ended up not introspected at all with annotations).
Also fix some typos/sillinesses (missing colon; useless (out) on Returns
value and useless (element-type) for easily scannable type).
- We were leaking the result of query_procedures(). At least as far as
the example port (help plug-in) shows, it returns a newly allocated
array of strings, NULL-terminated. This needs to be freed by the
calling code.
- Add documentations on GimpPlugIn virtual methods so that people know
what to do with them, and what kind of data to return (like
NULL-terminated array of procedure names for simple freeing).
- Fix _gimp_plug_in_init() which was registering the query procedures
instead of the init ones. For this, I added a `init` boolean parameter
to gimp_plug_in_register().
- Finally check the return value of gimp_plug_in_create_procedure(). It
is possible that a plug-in not properly implemented returns NULL and
we want to avoid the CRITICAL. Still output a warning as this is
likely a plug-in development bug.
Recent commits broke the Python plug-ins again because the old API is
not introspected anymore. Of course, by release of GIMP 3, we should
probably remove this deprecated API from introspection. But first, we
have to figure out how and if the new API can be used in bindings.
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
This reverts commit 833666d462.
The _pdb files are an implementation detail and we do not want
separate doc sections for them, the conflicts need so be resolved in
another way.
Otherwise we get a few duplicate sections since some of the non-PDB
files are named similarly.
Fix this GObject introspection warning and other similar warnings:
> libgimp/gimp_pdb.c:28: Warning: Gimp: multiple comment blocks
> documenting 'SECTION:gimp:' identifier (already seen at gimp.c:129).
... as a drop-in replacement for gegl_buffer_dup(), which COWs all
tiles of the source buffer, including ones that aren't fully
included within buffer's extent.
In gimp_gegl_buffer_copy(), assume that the area outside the abyss
is empty, and so, when the abyss policy is NONE, allow data otuside
the source/destination abyss to be copied, by temporarily modifying
the abyss. This allows tiles that aren't fully contained within
the abyss to be COWed, unlike gegl_buffer_copy(), which has to be
more general.
This fixes such warning:
> Warning: gvalue.c:188: cannot initialize GValue with type 'GEnum',
> this type is abstract with regards to GValue use, use a more specific
> (derived) type
And obviously all subsequent errors because we failed to initialize and
set enum values. Such as:
> Warning: g_value_set_enum: assertion 'G_VALUE_HOLDS_ENUM (value)' failed
I have only fixed this in gimp_image_pdb. If enum types are used in
other places with GimpValueArray, we must fix them the same way.