Commit Graph

60 Commits

Author SHA1 Message Date
Jehan f9cf16f46f Issue #4201: meson: pdbgen not working.
Fix the dependency by making the stamp an actual (yet empty/no-op)
header file which is included by all generated source file. This way, we
ensure that meson rebuild .o files when the .pdb sources are changed.

This is the second solution proposed by eli-schwartz here:
https://github.com/mesonbuild/meson/issues/10196#issuecomment-1080053413
2022-03-28 15:25:23 +02:00
Jehan 2956873740 app, libgimp, pdb: fix gimp_selection_float() usage.
This fixes bugs introduced in commit a7c59277fb where I obviously didn't
properly checked all the places where gimp_selection_float() was used
after its parameters changed.
2020-05-18 02:09:45 +02:00
Michael Natterer 5e00decc13 pdb, libgimp: use GIMP_VALUES_GET,DUP_FOO() in the libgimp PDB wrappers 2019-09-04 02:49:33 +02:00
Michael Natterer 90f9d551dc pdb, libgimp: use GIMP_VALLUES_GET_ENUM() in libgimp PDB wrappers
to get the procedure's return status.
2019-09-04 01:49:35 +02:00
Michael Natterer a351ce9126 Remove the entire old plug-in interface 2019-09-04 00:03:12 +02: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
Michael Natterer 392f00baf5 app, libgimp: get rid of all ID GTypes and ID param specs
Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.

Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.

This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).

For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.

Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
2019-08-29 11:39:34 +02:00
Jehan 08849a584c libgimp: GimpItem now also belong to libgimp. 2019-08-22 15:54:36 +02:00
Jehan c409829be5 libgimp, pdb: no need to create deprecated versions for private API. 2019-08-22 15:54:36 +02:00
Jehan 8c95499e14 pdb, libgimp: now make all ID types classes of their own.
No need of is_id_arg() anymore in pdb/lib.pl. Let's reuse the {id}
value. Also I had to add an additional trick for GimpDisplay which we
will now generate as such in libgimp PDB files, but still need to show
as GimpObject on app/pdb/.

As previously, only the new classes and the PDB generation for a first
step.
2019-08-22 15:54:36 +02:00
Jehan 79b319cf9d libgimp, pdb: add GimpItem > GimpDrawable > GimpLayer classes.
Only class and subclasses creation and PDB generation for this first
step.
I'll later do other types of items.
2019-08-22 15:54:36 +02:00
Jehan 17a40b049f libgimp: generate functions both for old and new GimpImage APIs.
This way, it would still be possible to use the old API. WIP.
2019-08-22 15:54:36 +02:00
Jehan 4db8cda24e app, pdb, libgimp: add a new GimpImage class for plug-ins.
This means that all functions which were returning or taking as
parameter an image id (as gint32) are now taking a GimpImage object
instead.
The PDB is still passing around an id only over the wire. But we create
an object for plug-ins to work on.

This is quite a huge API break, but is probably the best bet for the
future quality. It will make nicer API instrospection (and nicer API in
binding), will fix the issues with pspec on GimpImageID in Python
bindings (which makes the current Python API unusable as soon as we need
to work on images, which is most of our plug-ins!), etc.
Also it will allow to use signals on images, which will be a great asset
when we will finally have bi-directionnal communications (i.e. plug-ins
would be able to connect to image changes, destructions, and whatnot).
2019-08-22 15:54:36 +02:00
Michael Natterer 5a09523214 Remove GIMP_TYPE_INT32 and GimpParamSpecInt32
Use gint and GParamSpecInt instead.
2019-08-15 14:04:56 +02:00
Michael Natterer 30d63111c3 libgimp*, pdb: gimp_value_array_new_from_types*() takes (type, value)
So a value array can now we created like this:

array = gimp_value_array_new_from_types (&error_msg,
                                         G_TYPE_STRING, "foo",
                                         G_TYPE_INT,    23,
                                         G_TYPE_NONE);

Change PDB generation to use this, which makes for much nicer code in
the libgimp wrappers, and only set arrays separately instead of all
values.
2019-08-08 13:01:50 +02:00
Michael Natterer caa61eef4f libgimp, pdb: remove gimp_run_procedure_with_array() from gimp.[ch]
and add it to gimplegacy.[ch] as gimp_run_procedure_array().
Regenerate all PDB wrapper accordingly.
2019-08-06 21:44:26 +02:00
Michael Natterer c2e5374845 pdb, libgimp: make all PDB wrappers use GimpPDB to run procedures 2019-08-06 21:34:00 +02:00
Jehan a87104fffb pdb, libgimp: fix missing colons at end of annotations. 2019-07-31 22:51:35 +02:00
Michael Natterer f02a218356 pdb, libgimp: add (out) annotations to everything returned via pointers 2019-07-31 13:12:46 +02:00
Michael Natterer 16043cec5e Revert "pdb, libgimp: append _pdb for gtk-doc SECTION names of pdb files."
This reverts commit 833666d462.

The _pdb files are an implementation detail and we do not want
separate doc sections for them, the conflicts need so be resolved in
another way.
2019-07-31 10:04:43 +02:00
Jehan 833666d462 pdb, libgimp: append _pdb for gtk-doc SECTION names of pdb files.
Otherwise we get a few duplicate sections since some of the non-PDB
files are named similarly.
Fix this GObject introspection warning and other similar warnings:

> libgimp/gimp_pdb.c:28: Warning: Gimp: multiple comment blocks
> documenting 'SECTION:gimp:' identifier (already seen at gimp.c:129).
2019-07-31 01:39:42 +02:00
Michael Natterer af5c587e21 pdb, libgimp: port lib.pl to the new GType based libgimp API
All foo_pdb.c functions in libgimp regenerated. I have reviewed this a
dozen times, but please have a look, there might well be glitches and
our public API is sortof important...
2019-07-30 10:51:16 +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 f180a171cd pdb: remove all deprecated procedures 2018-05-20 21:06:29 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Sven Claussner 0fa6c7f121 flood: improve PDB description completely
Improve PDB description in generator template and all generated files.
2016-04-16 06:19:36 +00:00
Ell b52da8a17e pdb: Add gimp-selection-flood 2016-01-25 23:01:53 +01:00
Michael Natterer 86f53a3ceb libgimp: make pdbgen generate GIMP_DEPRECATED stuff
instead of GIMP_DISABLE_DEPRECATED.
2012-05-03 01:12:25 +02:00
Michael Natterer 29d63afbb7 pdb: remove gimp-item-to-selection again 2010-10-30 22:19:22 +02:00
Michael Natterer c6e93e4f5a pdb: generate nicer gtk-doc comments (no doc contents changed) 2010-09-15 22:07:36 +02:00
Michael Natterer e7475c1d52 pdb: add new procedure gimp-item-to-selection
and deprecate all old to-selection APIs. The new procedure uses the
newly added GimpPDBContext properties, so it only has an "operation"
parameter.
2010-09-05 22:38:07 +02:00
Michael Natterer 3a2cd14382 tools: add pdbgen support for generating gtk-doc SECTION comments
Add the new $doc_title, $doc_short_desc and $doc_long_desc strings to
all .pdb files.
2010-07-07 11:43:10 +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
Martin Nordholts 7bb585132d Update documentation, the layer does not need to have an alpha channel. A
* tools/pdbgen/pdb/selection.pdb (selection_layer_alpha): Update
documentation, the layer does not need to have an alpha channel. A
layer without an alpha channel is considered opaque.

* app/pdb/selection-cmds.c 
* libgimp/gimpselection_pdb.c: Regenerated.

svn path=/trunk/; revision=27040
2008-09-24 09:09:27 +00:00
Raphael Quinet 2e7b1bd12d fixed incorrect description of gimp-selection-is-empty, reported by pk.
2007-08-24  Raphael Quinet  <raphael@gimp.org>

	* tools/pdbgen/pdb/selection.pdb: fixed incorrect description of
	gimp-selection-is-empty, reported by pk.  This function returns
	TRUE when the selection is empty, but the description stated the
	opposite.

	* app/pdb/selection_cmds.c
	* libgimp/gimpselection_pdb.c: regenerated.

svn path=/trunk/; revision=23368
2007-08-24 17:50:04 +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 fa4427f83a fixed documentation of gimp-selection-sharpen (bug #343911).
2006-06-05  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/selection.pdb: fixed documentation of
	gimp-selection-sharpen (bug #343911).

	* libgimp/gimpselection_pdb.c: regenerated.
2006-06-05 20:36:21 +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
Michael Natterer 328345dc92 tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb
2006-03-24  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/undo.pdb
	* tools/pdbgen/pdb/vectors.pdb: replaced 'True', 'true' and
	'non-zero' by 'TRUE' where appropriate. Added %%desc%% to enum arg
	descriptions where missing. Get object names using
	gimp_object_get_name(). Set 'success' more consistently. Removed
	{ } from all enum arg descriptions...

	* tools/pdbgen/app.pl (make_arg_recs): ...and add the { }
	generically here. Removed some code that replaced the ',' by 'or'
	for enums without { } so all enums are now documented the same.

	* app/pdb/<some>_cmds.c
	* libgimp/<some>_pdb.c: regenerated.
2006-03-24 21:57:47 +00:00
Michael Natterer dfc1fbde62 tools/pdbgen/pdb/buffer.pdb tools/pdbgen/pdb/color.pdb
2006-03-22  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/buffer.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: more perl stuff flattened,
	cleanup, nitpickyness.

	* app/pdb/buffer_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/display_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/selection_cmds.c
	* libgimp/gimpselection_pdb.[ch]: regenerated.
2006-03-22 17:19:14 +00:00
Michael Natterer 853f04d5a6 Changed naming scheme for PDB procedure names from
2005-08-03  Michael Natterer  <mitch@gimp.org>

	Changed naming scheme for PDB procedure names from
	random_crap_that_traditionally_has_underscores to
	enforced-canonical-identifiers. I'm pretty sure some things are
	broken after this commit. More changes to come...

	* libgimpbase/gimpbase.def
	* libgimpbase/gimputils.[ch]: added gimp_canonicalize_identifier().

	* app/pdb/procedural_db.[ch] (struct ProcRecord): added
	"gchar *original_name" to keep a procedure's original name as
	reigstered by plug-ins (compat cruft).

	(procedural_db_init_procs): canonicalized list of deprecated
	procedures.

	* app/plug-in/plug-in-proc-def.c (plug_in_proc_def_free): free
	original_name.

	* app/plug-in/plug-in-message.c: canonicalize procedure names
	which are received over the wire.

	* app/plug-in/plug-in-rc.c: serialize the original_name and create
	the canonicalized name on-the-fly when deserializing.

	* app/plug-in/plug-in-run.c: pass the original_name to plug-ins
	when running them because they strcmp() the passed procedure name.

	* app/plug-in/plug-ins.c (plug_ins_add_to_db): pass
	canonical procedure names to procedural_db_execute().

	(plug_ins_file_proc_compare): special-case "gimp-xcf", not "gimp_xcf".

	* app/xcf/xcf.c: changed static XCF procedures accordingly.

	* tools/pdbgen/app.pl
	* tools/pdbgen/lib.pl: do some trivial substitutions to generate
	canonicalized names in app/, and C identifiers with underscores in
	libgimp/.

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: canonicaloized procedure
	names in calls to std_pdb_deprecated() and in procedure names in
	generated C code.

	* app/pdb/*_cmds.c
	* libgimp/*_pdb.c: regenerated.
2005-08-02 22:52:23 +00:00
Michael Natterer 4caf20c229 tools/pdbgen/pdb/image.pdb entirely removed the deprecated functions
2004-11-16  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/selection.pdb: entirely removed the deprecated
	functions "selection_clear", "image_set_cmap" and "image_get_cmap".

	* app/pdb/procedural_db.c: and added them to the compat hash table
	because they have undeprecated replacements with identical
	signature.

	* libgimp/gimpselection.[ch]: added gimp_selection_clear() here
	instead because we need the symbol in libgimp.

	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/selection_cmds.c
	* libgimp/gimpselection_pdb.[ch]: regenerated.
2004-11-16 14:34:34 +00:00
Sven Neumann ff654be7d6 deprecate gimp_selection_clear() in favor of gimp_selection_none(). Fixes
2004-11-13  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/selection.pdb: deprecate gimp_selection_clear()
	in favor of gimp_selection_none(). Fixes bug #156765.

	* app/pdb/selection_cmds.c
	* libgimp/gimpselection_pdb.[ch]: regenerated.
2004-11-13 21:01:12 +00:00
Michael Natterer 1ab98d03ba use gimp_image_mask_select_channel() instead of gimp_image_mask_load().
2003-08-21  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/selection.pdb (selection_load,combine): use
	gimp_image_mask_select_channel() instead of
	gimp_image_mask_load().  Removes the restriction that the channel
	to select has to have the same size as the image. Changed help
	texts accordingly.

	* app/pdb/selection_cmd.c
	* libgimp/gimpselection_pdb.c: regenerated.
2003-08-21 19:23:17 +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
Sven Neumann 44b6d04da0 try to complete the aborted commit 2003-02-06 18:51:44 +00:00
Sven Neumann 9eb337dcfc tools/pdbgen/pdb/drawable.pdb merged fix for bug #96284 from stable
2002-12-13  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/selection.pdb: merged fix for bug #96284 from
	stable branch.

	* app/pdb/drawable_cmds.c
	* app/pdb/selection_cmds.c
	* libgimp/gimpdrawable_pdb.c
	* libgimp/gimpselection_pdb.c: regenerated.
2002-12-13 19:19:09 +00:00
Sven Neumann fe0bf162c1 removed FINITE() macro.
2002-05-13  Sven Neumann  <sven@gimp.org>

	* libgimpmath/gimpmath.h: removed FINITE() macro.

	* tools/pdbgen/pdb/image.pdb
	* app/pdb/image_cmds.c: define FINITE() here, where it is used.

	* tools/pdbgen/pdb/lib.pl: add "config.h" to all generated libgimp
	.c files.

	* libgimp/gimp*_pdb.c: regenerated.

	* libgimp/gimpbrushmenu.c
	* libgimp/gimpchannel.c
	* libgimp/gimpdrawable.c
	* libgimp/gimpgradientmenu.c
	* libgimp/gimphelp.c
	* libgimp/gimpimage.c
	* libgimp/gimplayer.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimppixelrgn.c
	* libgimp/gimpproceduraldb.c
	* libgimp/gimpselection.c
	* libgimp/gimptile.c
	* libgimp/gimpui.c
	* libgimpmath/gimpmatrix.c
	* libgimpmath/gimpvector.c
	* plug-ins/MapObject/arcball.c
	* plug-ins/fp/fp_gdk.c
	* plug-ins/fp/fp_misc.c
	* plug-ins/ifscompose/ifscompose_storage.c
	* plug-ins/ifscompose/ifscompose_utils.c
	* plug-ins/maze/handy.c
	* plug-ins/rcm/rcm_gdk.c
	* plug-ins/sel2path/edge.c
	* plug-ins/xjt/xjpeg.c
	* plug-ins/xjt/xpdb_calls.c: include "config.h".
2002-05-13 23:30:23 +00:00
Sven Neumann fe53c66c7c AUTHORS app/authors.h app/pdb/channel_cmds.c app/pdb/internal_procs.c
2001-01-29  Sven Neumann  <sven@gimp.org>

	* AUTHORS
	* app/authors.h
	* app/pdb/channel_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/selection_cmds.c
	* libgimp/gimpchannel_pdb.c
	* libgimp/gimpchannel_pdb.h
	* libgimp/gimpselection_pdb.c
	* libgimp/gimpselection_pdb.h
	* tools/authorsgen/contributors
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/selection.pdb: applied a patch from Adam Spiers
	<adam@spiers.net> which adds two new PDB functions: selection_combine
	and channel_combine_masks.
2001-01-29 00:02:33 +00:00
Sven Neumann cb7d5a179f tools/pdbgen/pdb/fileops.pdb added a few more PDB wrappers
2000-08-25  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/selection.pdb: added a few more PDB wrappers

	* tools/pdbgen/pdb/image.pdb: tweaked the help and blurb strings

	* app/image_cmds.c
	* libgimp/gimpfileops_pdb.[ch]
	* libgimp/gimpimage_pdb.c
	* libgimp/gimpselection_pdb.[ch]: regenerated

	* plug-ins/common/bz2.c
	* plug-ins/common/gz.c
	* plug-ins/common/mail.c
	* plug-ins/common/screenshot.c
	* plug-ins/common/url.c
	* plug-ins/gdyntext/gdyntext.c
	* plug-ins/gfig/gfig.c: use new PDB wrappers.
	For GDynText this change fixes a bug since it used to use the
	wrong number of arguments for gimp_selection_load().

	* plug-ins/flame/rect.[ch]: removed compiler warning
2000-08-25 15:38:38 +00:00