Commit Graph

37 Commits

Author SHA1 Message Date
Idriss Fekir e8ad8af0f7 Fix fonts when exporting to pdf 2023-12-08 11:09:22 +00:00
Jehan 475dafcee4 libgimp, pdb: make gimp_pdb_run_procedure_array() internal.
Apart from all regenerated PDB files, this commit fixes the few manual usages in
libgimp too.
2023-10-16 22:12:08 +02:00
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
Niels De Graef 1e34a95db7 app, libgimp: pdbgen for previous commit. 2022-02-12 00:07:53 +00: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
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
Michael Natterer 360314eda7 pdb: fix generation of "Returns:" to not line-wrap annotations
Also generate comments like "Must be freed with g_free()" for all
return values instead of manually and inconsistently having them on
some return values only.
2019-08-04 22:09:04 +02:00
Jehan a87104fffb pdb, libgimp: fix missing colons at end of annotations. 2019-07-31 22:51:35 +02:00
Michael Natterer 05e68da4d4 pdb, libgimp: add (array length=foo) annotations for out args 2019-07-31 19:19:06 +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 e8c6ab7ce9 pdb: add (element-type foo) annotations to all returned arrays 2019-07-31 13:08:19 +02:00
Michael Natterer 5b6cfd9863 pdb, libgimp: generate (transfer full) annotations for libgimp
for all returned allocated memory.
2019-07-31 12:56:04 +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 29f55a95ef app, pdb: minor cleanup in the new font loading code 2016-04-17 21:06:00 +01:00
Michael Natterer 02d1192753 pdb: return NULL for string arrays with zero elements
In e61b1f76 things were changed to return string arrays that can be
freed with g_strfreev(), but that returned a one-element array
containing a NULL pointer for zero-length arrays. Fix the code
to return NULL again for zero-length arrays. See bug #751584.
2015-09-14 01:12:57 +02:00
Mukund Sivaraman b1dbfd2567 pdbgen: Regenerate C code 2012-12-05 08:48:54 +05:30
Sven Neumann 9b2e301c87 pdbgen: programmatically add hint about using g_strfreev()
Add the note about the need to free the returned string array
to the generated libgimp code. This way it will show up in the
libgimp documentation but not in the general PDB API.
2012-12-04 21:07:34 +01:00
Sven Neumann c8209ddb4c Revert "pdb: update documentation for all pdb functions whose return can be freed with g_strfreev()."
Such comment should not be included in the general PDB
documentation as it is specific to the C bindings and can
be easily added by the pdbgen infrastructure.

This reverts commit c9888f2222.
2012-12-04 21:07:34 +01:00
Jehan c9888f2222 pdb: update documentation for all pdb functions whose return can be freed with g_strfreev(). 2012-12-04 00:16:08 +09:00
Michael Natterer e61b1f7603 pdb: return NULL terminated stringarrays from libgimp PDB wrappers
so they can be freed with g_strfreev().
2012-11-27 20:50:21 +01:00
Michael Natterer c6e93e4f5a pdb: generate nicer gtk-doc comments (no doc contents changed) 2010-09-15 22:07:36 +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
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 8ed41a7c60 even more tabs that I missed earlier 2006-04-12 10:38:15 +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 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 95c13dad93 tools/pdbgen/pdb/brushes.pdb tools/pdbgen/pdb/fonts.pdb
2003-12-08  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/fonts.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb: removed comments that
	gimp_data_factory_data_init() should return a boolean indicating
	success, since it is highly unclear when to return FALSE. This
	function just always succeeds. Changed docs accordingly. Cleanup.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/pattern_select.pdb: minor cleanups.

	* app/pdb/brush_select_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/font_select_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gradient_select_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/palette_select_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/pattern_select_cmds.c
	* app/pdb/patterns_cmds.c
	* libgimp/gimpbrushes_pdb.c
	* libgimp/gimpfonts_pdb.c
	* libgimp/gimpgradients_pdb.c
	* libgimp/gimppalettes_pdb.c
	* libgimp/gimppatterns_pdb.c: regenerated.
2003-12-08 11:58:45 +00:00
Sven Neumann 85adefe7ba app/core/Makefile.am app/core/core-types.h added filter functionality for
2003-09-04  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpcontainer-filter.[ch]: added filter functionality
	for GimpContainers.

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/fonts.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb: made the gimp_foo_get_list()
	PDB function somewhat useful by adding a filter parameter that
	allows to specify a regular expression to be used on the list.

	* app/pdb/Makefile.am: had to uglify the ugly hack even more :(

	* app/pdb/brushes_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/patterns_cmds.c
	* libgimp/gimpbrushes_pdb.[ch]
	* libgimp/gimpfonts_pdb.[ch]
	* libgimp/gimpgradients_pdb.[ch]
	* libgimp/gimppalettes_pdb.[ch]
	* libgimp/gimppatterns_pdb.[ch]: regenerated.

	* plug-ins/gflare/gflare.c
	* plug-ins/pygimp/gimpmodule.c: changed accordingly.

	* plug-ins/script-fu/scripts/font-map.scm: replaced the font list
	parameter with a more useful regexp filter on the available fonts.
2003-09-04 17:04:36 +00:00
Sven Neumann 0acc96d9f1 added new function gimp_container_get_name_array().
2003-09-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontainer.[ch]: added new function
	gimp_container_get_name_array().

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/patterns.pdb: use the new GimpContainer function
	instead of duplicating this code over and over again.

	* app/pdb/brushes_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/patterns_cmds.c
	* libgimp/gimpgradients_pdb.c: regenerated.

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/fonts.pdb: added new file that defines a simple
	PDB API for fonts.

	* tools/pdbgen/groups.pl
	* app/pdb/Makefile.am
	* app/pdb/fonts_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpfonts_pdb.[ch]: (re)generated.
2003-09-04 12:02:31 +00:00