On Thu, 2003-05-22 at 14:12, kenny.law@net-tribe.com wrote
I am just new to programming plugins for Gimp.
I've been surfing around trying to get information on the web, but most
information is outdated or too messy.
I am trying to understand the sourcecodes for plugins that came with the
gimp package(the C plugins).
Assuming you're running under Linux, open a browser and view the file
file:///usr/share/gimp/1.2/devel-docs/html/libgimp/index.html
This is the API documentation for Plug-Ins. Its very handy information.
Thing is, I have no idea where the gimp library is and descriptions on it=
s
use. I would also like to find a function that deals with mouse events,
and most I've seen is something called Gimp Drawing Kit(GDK), but I have
no idea where to get it or how to use it.
The GIMP library is called libgimp. To find it, try
"gimp-config --libs". If you have "gimp-config" in your path, then this
will print out the line you need to use when linking your GIMP plug-in.
gimp-config has other useful information for compiling your plug-in
too. Try "gimp-config --help" for more information.
GDK is a toolkit that handles platform specific interfaces. For Linux,
this means it handles low level drawing routines. I use it extensively
in some of my plug-ins (a new version of which, with lots of new
plug-ins, will be out sometime in the next month, I hope). Mouse events
within your plug-in can be handled with GDK. Mouse events that occur in
an actual Canvas (re: Image) window cannot be passed to your plug-in, so
you'll want to make a "preview" window in your plug-in and handle mouse
events there.
Hope that someone can point me to some links. gimp.org is not that
helpful at all.
I should probably write an article on this at some point. I don't think
anyone has done so yet. But because the lead time on articles is
usually rather long, and the schedule for GIMP releases is not very
strict, I always worry if the article will be out of date by the time it
gets published. I still haven't looked at the changes from 1.2 to 1.3
for the GIMP plug-in API. Hopefully it isn't drastically changed.
Anyway, hope that helps a little.