Commit Graph

11 Commits

Author SHA1 Message Date
lloyd konneker d59a7af38c libgimp: API refactor GUI for GimpResource
Simplifies chooser widgets (e.g. GimpBrushSelect) by eliminating attributes (e.g. opacity) of chosen resource.
See #8745, but this commit fixes that by first refactoring the code.

Refactors GUI widgets (e.g. GimpBrushSelectButton and GimpBrushSelect etc.)

Refactor by "Extract class" GimpResourceSelectButton from GimpBrushSelectButton etc.
This moves common code into an inherited class (formerly called GimpSelectButton)
but the subclasses still exist.
The subclasses mainly just do drawing now.

Refactor by "Extract module" GimpResourceSelect from GimpBrushSelect etc.
Moves common code into one file, generic at runtime on type of GimpResource,
that is, the new code dispatches on type i.e. switch statements.
In the future, when core is changed some of that can be deleted.
The files gimpbrushselect.[c,h] etc. are deleted.
The module adapts the API from core to the API of callbacks to libgimp.

Note that core is running the resource chooser (select) widgets remotely.
Core is still calling back over the wire via PDB with more attributes
than necessary.
The new design gets the attributes from the resource themselves,
instead of receiving them from core callback.
The libgimp side adapts by discarding unneeded attributes.
In the future, core (running choosers for plugins) can be simplified also.

Fix gimp_prop_chooser_brush_new same as other resources.

Finish changes, and clean style.

Annotations
2023-01-14 16:38:40 +00:00
Jehan 71ccaa21ee pdb, libgimp: remove double API generation from PDB.
All plug-ins got ported. Let's remove support for the old API with IDs
instead of objects.
2019-09-03 13:31:27 +02:00
Jehan fec6034c7a pdb: keep both the old and new API alive.
By default the new API will be used. But if we build with
GIMP_DEPRECATED_REPLACE_NEW_API macro, then the same function names will
call the old API with ids.

This way, we don't have to update all our plug-ins at once (which I
tried and is very tedious work).

Note that bindings won't have access to the deprecated API at all.
2019-08-22 15:54:36 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 856c89a845 libgimp: add guards that #error out if individual files are included 2011-04-28 19:59:52 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann dcc6ebd1b0 HACKING tools/pdbgen/lib.pl fixed spelling of "auto-generated".
2007-01-09  Sven Neumann  <sven@gimp.org>

	* HACKING
	* tools/pdbgen/lib.pl
	* tools/pdbgen/app.pl: fixed spelling of "auto-generated".

	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient_select.pdb: improved wording and fixed
	spelling errors.
	
	* libgimp/gimp.c: fixed spelling errors.

	* app/pdb/*.h: 
	* libgimp/gimp*_pdb.[ch]: regenerated.


svn path=/trunk/; revision=21676
2007-01-09 10:52:47 +00:00
Sven Neumann 8824a9bc86 create code with spaces instead of tabs.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/lib.pl: create code with spaces instead of tabs.

	* libgimp/gimp*_pdb.[ch]: regenerated.
2006-04-12 10:27:31 +00:00
Manish Singh 122c006564 fix spelling of "quality" in comment
2003-07-03  Manish Singh  <yosh@gimp.org>

        * plug-ins/common/jpeg.c: fix spelling of "quality" in comment

        * tools/pdbgen/*.pl: update copyright strings to 2003

        * libgimp/gimpenums.h
        * libgimp/*_pdb.[ch]
        * app/pdb/*_cmds.[ch]
        * app/pdb/internal_procs.[ch]
        * plug-ins/pygimp/gimpenums.py
        * plug-ins/script-fu/script-fu-constants.c: regenerated
2003-07-03 00:47:26 +00:00
Manish Singh d46b87b1e4 constify input strings, colors, and arrays
2003-07-02  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/lib.pl: constify input strings, colors, and arrays

        * libgimp/*_pdb.[ch]: regenerated
2003-07-02 01:20:08 +00:00
Michael Natterer 17d655c1c3 app/gimprc.[ch] app/gui/preferences-dialog.c
2002-03-12  Michael Natterer  <mitch@gimp.org>

	* app/gimprc.[ch]
	* app/gui/preferences-dialog.c
	* app/paint/gimppaintoptions.[ch]
	* app/tools/paint_options.[ch]
	* app/tools/tool_manager.[ch]: removed the "global_paint_options"
	gimprc option because it doesn't quite fit the new dockable dialog
	architecture.

	* app/gui/brush-select.[ch]
	* app/gui/gradient-select.[ch]
	* app/gui/palette-select.[ch]
	* app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/...
	Selection" part of them. They are now only used for temp popup
	selections and the PDB. *Lots* of cleanup.

	* app/gui/convert-dialog.c
	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c
	* app/gui/gui.c
	* app/gui/menus.c
	* app/gui/palette-import-dialog.c
	* app/plug-in/plug-in.c: changed accordingly.

	Cleaned up the palette and other data PDB stuff:

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl: added "palette_select" and "palettes".

	* tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette
	selection PDB controllable.

	* tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb
	because of API symmetry with brushes, patterns, ...

	* tools/pdbgen/pdb/palette.pdb: removed from here.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb: lots of cleanup.

	Autogenerated stuff:

	* app/pdb/Makefile.am
	* app/pdb/palette_select_cmds.c
	* app/pdb/palettes_cmds.c: new files.

	* app/pdb/brush_select_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/gradient_select_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/palette_cmds.c
	* app/pdb/pattern_select_cmds.c
	* app/pdb/patterns_cmds.c: regenerated.

	* libgimp/Makefile.am
	* libgimp/gimp_pdb.h
	* libgimp/gimppalettes_pdb.[ch]
	* libgimp/gimppaletteselect_pdb.[ch]: new files.

	* libgimp/gimpgradientselect_pdb.[ch]
	* libgimp/gimppalette_pdb.[ch]
	* libgimp/gimppatterns_pdb.c: regenerated.

	* devel-docs/libgimp/tmpl/gimpgradients.sgml
	* devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-12 21:02:10 +00:00