Hi,
> From: Raphael Quinet
> Subject: [Gimp-developer] Planned breakage in plug-in API and PDB for 1.3.x or 2.x
> Date: Mon, 18 Feb 2002 08:06:59 -0800
..
> As you can see from this list, it is likely that some or all plug-ins
> will have to be modified at some point in time, and maybe more than
> once. We should discuss this and decide when this should happen (or
> if it should happen at all).
For the next version of the plug-in/gap it would be useful
if many of the plug-ins do register the structure of the LAST_VALUES buffer
in a lastvalues description file.
I have written gimp_iter_desc.h / .c for the registration
(that should become part of libgimp if possible)
and a common Iterator Procedure for the gap (Filters->Filter All Layers)
that uses the description file and can replace the plug-ins/gap/iter_ALT stuff.
.. I am currently porting the plug-in/gap code to gimp-1.3.3 and gtk+ 1.3.13
(offline, have no net access on my linuxbox)
Yours Wolfgang Hofer [EMAIL PROTECTED]
Codesample how to register lastvalues description:
--------------------------------------------------
#define PLUG_IN_NAME "plug_in_whirl_pinch"
typedef struct
{
gdouble whirl;
gdouble pinch;
gdouble radius;
} whirl_pinch_vals_t;
static whirl_pinch_vals_t wpvals =
{
90.0, /* whirl */
0.0, /* pinch */
1.0 /* radius */
};
static void
query (void)
{
...
gimp_set_data_iter_description(PLUG_IN_NAME,
&wpvals, sizeof(wpvals),
GIMP_ITER_GDOUBLE, &wpvals.whirl,
GIMP_ITER_GDOUBLE, &wpvals.pinch,
GIMP_ITER_GDOUBLE, &wpvals.radius,
GIMP_ITER_END);
}
Here is an example of a lastvalues description file:
----------------------------------------------------
# Descriptionfile LAST_VALUES buffer structure (type;offset;size)
#
# this file is rewritten each time when a procedure registers
# the LAST_VALUES structure. (typical at 1.st gimp startup
# or after installation of new plug-ins)
#
"plug_in_whirl_pinch" #- added or changed by GIMP on 2002-02-23 16:38:27
STRUCT_BEGIN;0;24
GDOUBLE;0;8
GDOUBLE;8;8
GDOUBLE;16;8
STRUCT_END;0;24
END;
And here is an example of the registration Code:
------------------------------------------------
http://registry.gimp.org/plugin?id=1962
_______________________________________________
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer