Commit Graph

10 Commits

Author SHA1 Message Date
Jehan 24b955bf17 app, libgimp, pdb: various coding-style fixing and struct for final types…
… moved to the implementation file.

When declaring with G_DECLARE_FINAL_TYPE(), the whole concept is that the struct
is made private (which also allows the type to evolve without breaking ABI if we
some day decide to make the class derivable). For this to make sense, the struct
goes in the implementation file, not the header.

For the rest, it's mostly alignment bugs and the like.
2023-01-14 18:44:31 +01:00
Jehan d5f4cabfcc libgimp: do not define a class struct when G_DECLARE_FINAL_TYPE is used.
This fixes the VAPI build. I am actually astonished the lib build seem to have
passed and that we didn't get double definition clashes.

The build error was:

[750/2424] Generating libgimp/gimp-ui-3.0.vapi with a custom command
FAILED: libgimp/gimp-ui-3.0.vapi
/usr/bin/vapigen --quiet --library=gimp-ui-3.0 --directory=/builds/GNOME/gimp/_build/libgimp --pkg=babl-0.1 --pkg=cairo-1.0 --pkg=gdk-pixbuf-2.0 --pkg=gegl-0.4 --pkg=gio-2.0 --pkg=glib-2.0 --pkg=gobject-2.0 --pkg=gtk+-3.0 --vapidir=/builds/GNOME/gimp/_build/libgimp --girdir=/builds/GNOME/gimp/_build/libgimp --pkg=gimp-3.0 --metadatadir=/builds/GNOME/gimp/libgimp /builds/GNOME/gimp/_build/libgimp/GimpUi-3.0.gir
GimpUi-3.0.gir:22111.7-22111.33: warning: Virtual method `GimpUi.ResourceSelectButton.draw_interior' conflicts with method of the same name
GimpUi-3.0.gir:26688.73-26688.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26695.73-26695.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26704.73-26704.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26712.73-26712.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26720.73-26720.73: error: The type name `ResourceSelectButtonClass' could not be found
2023-01-14 16:38:40 +00:00
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
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 f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +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 e85896c0fa use const for G_CONST_RETURN.
2006-07-05  Sven Neumann  <sven@gimp.org>

	* libgimp/gimp*selectbutton.[ch]: use const for G_CONST_RETURN.
2006-07-05 14:13:20 +00:00
Sven Neumann a9bd28e458 libgimp/gimpfontselectbutton.[ch] libgimp/gimpgradientselectbutton.[ch]
2006-06-28  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpfontselectbutton.[ch]
	* libgimp/gimpgradientselectbutton.[ch]
	* libgimp/gimppaletteselectbutton.[ch]
	* libgimp/gimppatternselectbutton.[ch]: for consistency with
	GimpBrushSelectButton dropped the _name suffix from the getter
	and setter API.

	* libgimp/gimpfontmenu.c
	* libgimp/gimpgradientmenu.c
	* libgimp/gimppalettemenu.c
	* libgimp/gimppatternmenu.c
	* plug-ins/gfig/gfig-style.c
	* plug-ins/script-fu/script-fu-interface.c: changed accordingly.

	* libgimp/gimpbrushmenu.c
	* libgimp/gimpbrushselectbutton.[ch]
	* libgimp/gimpselectbutton.c: cleanup for consistency.

2006-06-28  Sven Neumann  <sven@gimp.org>

	* libgimp/tmpl/gimpbrushselectbutton.sgml
	* libgimp/tmpl/gimpgradientselectbutton.sgml
	* libgimp/tmpl/gimppaletteselectbutton.sgml
	* libgimp/tmpl/gimppatternselectbutton.sgml
	* libgimp/tmpl/gimpselectbutton.sgml: new files.

	* libgimp/libgimp-docs.sgml
	* libgimp/libgimp-sections.txt
	* libgimp/libgimp.types: added docs for GimpSelectButton widgets.

	* libgimp/tmpl/gimpfontselectbutton.sgml: regenerated.

	* libgimpcolor/libgimpcolor-sections.txt: added docs for GValue API.

	* libgimpcolor/tmpl/gimprgb.sgml: regenerated.

	* libgimpwidgets/libgimpwidgets-sections.txt: updated.

	* libgimpwidgets/tmpl/gimppropwidgets.sgml
	* libgimpwidgets/tmpl/gimpstock.sgml: regenerated.
2006-06-28 10:35:22 +00:00
Manish Singh 68dfb3f223 libgimp/gimpuitypes.h abstract class for resource selection buttons.
2006-06-25  Manish Singh  <yosh@gimp.org>

        * libgimp/gimpuitypes.h
        * libgimp/gimpselectbutton.[ch]: abstract class for resource selection
        buttons.

        * libgimp/gimpfontselectbutton.[ch]: derive from GimpSelectButton.

        * libgimp/gimpbrushselectbutton.[ch]
        * libgimp/gimpgradientselectbutton.[ch]
        * libgimp/gimppaletteselectbutton.[ch]
        * libgimp/gimppatternselectbutton.[ch]: replacements for
        gimp_foo_select widgets, akin to GimpFontSelectButton.

        * libgimp/gimpbrushmenu.[ch]
        * libgimp/gimpgradientmenu.[ch]
        * libgimp/gimppalettemenu.[ch]
        * libgimp/gimppatternmenu.[ch]: deprecate old API, and reimplement
        in terms of GimpFooSelectButton.

        * libgimp/gimpfontmenu.[ch]: change to use the GimpSelectButton API.

        * libgimp/gimpuimarshal.list: new marshallers for the above new
        widgets.

        * libgimp/gimpui.h: add new headers.

        * libgimp/Makefile.am: add new files.

        * plug-ins/FractalExplorer/Dialogs.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-style.[ch]
        * plug-ins/script-fu/script-fu-interface.c: use new API.
2006-06-26 01:47:22 +00:00