RSS/Atom feed Twitter
Site is read-only, email is disabled

How Does One Call An Existing PDB Procedure From A C Plug-in?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

How Does One Call An Existing PDB Procedure From A C Plug-in? stormy@franchise5000.com 04 Feb 00:44
  How Does One Call An Existing PDB Procedure From A C Plug-in? Simon Budig 04 Feb 02:07
   How Does One Call An Existing PDB Procedure From A C Plug-in? stormy@franchise5000.com 04 Feb 08:28
stormy@franchise5000.com
2014-02-04 00:44:14 UTC (about 10 years ago)

How Does One Call An Existing PDB Procedure From A C Plug-in?

How do I access existing PDB procedures from a C plug-in? I'm very familiar with how this is done in Scheme & Python. I'm confused on how this is accomplished in C.

Can someone explain how this is done and/or provide a link to an example of a C plug-in that calls an existing procedure in the PDB?

Many Thanks!

Simon Budig
2014-02-04 02:07:58 UTC (about 10 years ago)

How Does One Call An Existing PDB Procedure From A C Plug-in?

stormy@franchise5000.com (stormy@franchise5000.com) wrote:

How do I access existing PDB procedures from a C plug-in? I'm very familiar with how this is done in Scheme & Python. I'm confused on how this is accomplished in C.

Look for "gimp_run_procedure".

One example is in file-ico.c:

return_vals = gimp_run_procedure ("plug-in-threshold-alpha", &n_return_vals, GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE, GIMP_PDB_IMAGE, tmp_image, GIMP_PDB_DRAWABLE, tmp_layer, GIMP_PDB_INT32, ICO_ALPHA_THRESHOLD, GIMP_PDB_END); gimp_destroy_params (return_vals, n_return_vals);

I hope this helps.

Bye, Simon

simon@budig.de              http://simon.budig.de/
stormy@franchise5000.com
2014-02-04 08:28:48 UTC (about 10 years ago)

How Does One Call An Existing PDB Procedure From A C Plug-in?

stormy@franchise5000.com (stormy@franchise5000.com) wrote:

How do I access existing PDB procedures from a C plug-in? I'm very familiar with how this is done in Scheme & Python. I'm confused on how this is accomplished in C.

Look for "gimp_run_procedure".

One example is in file-ico.c:

return_vals = gimp_run_procedure ("plug-in-threshold-alpha", &n_return_vals, GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE, GIMP_PDB_IMAGE, tmp_image, GIMP_PDB_DRAWABLE, tmp_layer, GIMP_PDB_INT32, ICO_ALPHA_THRESHOLD, GIMP_PDB_END); gimp_destroy_params (return_vals, n_return_vals);

I hope this helps.

Bye, Simon

--
simon@budig.de http://simon.budig.de/ _______________________________________________

Thank you. That is very helpful.

~Stormy