Re: [Gimp-user] Re: [Gimp-developer] help needed with GIMP 2.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Simon Budig <simon@xxxxxxxx> writes:

>> (3) It would be nice to see a chapter added to the API reference that
>>     deals with changes between GIMP 2.0 and GIMP 2.2 and how to port a
>>     plug-in. I am willing to collect the list of changes and such but
>>     I'd like to get some help with this.
>
> Compile me a list and I'll do it. I also need some advice on where to
> put this in the devel-docs.

I'd like to see something similar to
http://developer.gnome.org/doc/API/2.0/gtk/migrating.html.  Of course
it doesn't need to be as comprehensive. The GTK+ developers also
started with a smaller chapter...

I am not really sure where to put this since we have a bunch of API
manuals. Probably best to put it to the libgimp manual since that's
what most plug-in authors will look at and libgimp/libgimpui is using
the other libraries. So it could just become a new chapter in
http://developer.gimp.org/api/2.0/libgimp/

Now let's try to collect a list of changes. It is probably a good idea
to talk about GTK+-2.4 and to point to
http://developer.gnome.org/doc/API/2.0/gtk/migrating.html. Then there
are a couple of new widgets that we introduced:

- GimpIntComboBox replaces the gimp_int_option_menu_new() constructor.
- GimpFrame can help to make plug-in dialogs HIG-conform.
- GimpColorHexEntry is the fancy color entry used in the color selector.
- GimpCellRendererToggle is what we use for example in the Layers
  dialogs to draw the eye toggle button.
- GimpPreviewArea is a GtkPreview replacement that also deals with all
  image types GIMP knows about and can render a checkerboard to
  visualize transparency.
- GimpPreview is an abstract base class only and is used by the new
  GimpDrawablePreview and GimpAspectPreview (in libgimpui).

Besides the new previews, libgimpui has a couple of other additions:

- gimppixbuf.h provides an easy way to get image and drawable
  thumbnails as GdkPixbufs.
- gimimagecombobox.h and gimpdrawablecombobox.h have replacements for
  the now deprecated functions in gimpmenu.h.
- gimpprogress.h deals with the new GimpProgress API, the
  GimpProgressBar widget hides this complexity from the plug-in author.

libgimp has seen an API cleanup as well. Quite a lot of the
brush/gradient/pattern/palette functions have been deprecated and new
saner APIs have been added. The GimpContext namespace is completely
new and gimp_context_push/pop should definitely be mentioned. It is
especially useful for script developers.

The best way to list all new functions is to grep for the word "Since"
in the .c files. We've marked all new functions with "Since: GIMP 2.2".

Prototypes of deprecated functions are in GIMP_DISABLE_DEPRECATED
guards. It would certainly be nice to explain how to use this define
to write clean code that uses only the new APIs. Would probably be
good to also mention the --pdb-compat-mode command-line option.

That should be more than enough to get you started...


Sven

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux