Even when the function names may have stayed the same in most cases, the
API has changed. The "Since:" tag must therefore be bumped.
Also adding docs for gimp_drawable_get_sub_thumbnail_data() which had
none.
Maybe should we have IMAGE_ARRAY types as we still have to pass image
IDs when we pass more than one image between core and plug-in. And even
maybe have alternate LIST types to ARRAY ones, so that we can pass GList
through rather than one array parameter + one length parameter.
Anyway this port still return just old style array of image IDs + array
length as int32.
Basically creating a GParamSpecObject with type GimpImage would be
synonym to creating a GimpParamSpecImage (and similarly for items,
drawables, layers, and so on).
The only missing feature is therefore none_ok when using
GParamSpecObject (or to be more accurate: it implies none_ok=TRUE).
This is particularly needed for the Python API where a bug prevents to
manipulate GParamSpec types and pass them back to libgimp. Hence we want
to manipulate object specs using the binding specific API instead.
It used to work fine but this specific piece of code got removed by
commit 392f00baf5. This now works again fine.
- hand out and leak proxy object objects to legacy API like candy,
bypassing the factory in GimpPlugIn, because there is no plug-in
singleton.
- gimpgpcompat.c: image, item etc. are now objects, simply forgot this
file.
Need to push the current procedure around the entire body of
gimp_plug_in_proc_run_internal() because
_gimp_gp_params_to_value_array() needs access to proxy objects now.
Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.
Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.
This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).
For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.
Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
Note: there were 2 additional arguments which were totally unused in the
existing implementation. So I commented them out. Anyone is welcome to
actually implement their usage.
Remove the separate "advanced" procedure. With GParamSpec default
values the differance between normal and advanced is just
non-interactive vs. interactive.
There are 2 TODOs to take care of here. First, there is no GUI yet for
the interactive mode which will just use the default values.
Second, the color argument is not working yet because I had issues
passing a GimpRGB as argument (ideally I should create a GimpParamRGB
with gimp_param_spec_rgb(), but since we still have the pygobject bugs
about manipulating GParamSpec data directly, I can't).
Anyway it works with default values, which is already a good first step.
:-)