Commit Graph

2379 Commits

Author SHA1 Message Date
6801857b9c libgimp: remove all support for temp procs from gimplegacy.[ch] 2019-08-14 19:16:33 +02:00
5b076e990d libgimp: remove legacy support from gimpbrush,pattern,..select.c
Their users have all been ported to GimpPlugIn.
2019-08-14 19:03:48 +02:00
0246f34183 libgimp: remove some more cruft that is no longer needed 2019-08-14 10:18:34 +02:00
aba2eea17c libgimp: remove gimp_run_procedure() and gimp_destroy_params() 2019-08-14 00:18:39 +02:00
35fb6ca716 libgimp: deal with NULL arrays in _gimp_value_to_gp_param()
How did this not crash even once before in my tests...
2019-08-13 22:52:19 +02:00
91ecb6317a libgimp: remove more cruft that is now unused 2019-08-13 20:38:01 +02:00
a5cb30173c libgimp: don't call g_file_new_for_uri() on a path
in gimp_load_procedure_run() and gimp_save_procedure_run().
2019-08-13 19:10:55 +02:00
7e99aa59f5 Add other misc. typo fixes 2019-08-13 11:50:51 -04:00
b8ee717269 libgimp: gimp_procedure_validate_args() support GIMP_PARAM_NO_VALIDATE
The flag is defined in libgimp now.
2019-08-13 13:37:52 +02:00
d2add325bb libgimp: remove more legacy API that isn't used any longer by any plug-in 2019-08-13 11:20:52 +02:00
12cafbfe6e libgimp: refer to new API in GimpProcedure docs 2019-08-13 00:46:40 +02:00
79d92a5d05 libgimp: remove a lot of cruft because script-fu is ported now
Also remove all legacy code from GimpProcView and
GimpProcBrowserDialog.
2019-08-12 20:49:08 +02:00
3d935b0bb0 libgimp: don't unref() the GParamSpecs of a GimpPDBProcedure
after adding them to the procedure. We only own one reference, and
it's the floating one.
2019-08-12 19:11:05 +02:00
42e8a344ab libgimp: don't use G_IS_FILE() and g_file_get_path() on a NULL GFile
when registering the plug-in's translation domain. A NULL path is
allowed and used by script-fu.
2019-08-12 19:10:30 +02:00
b33c3086a9 libgimp: allow to call gimp_procedure_add_menu_path() on installed procs
Adding menu paths must be possible even after the procedure has been
installed, script-fu registers all menu paths afer installing its
procedures so they are properly sorted.
2019-08-12 19:06:13 +02:00
dbeed89858 libgimp: remove gimp_pdb_dump() and gimp_pdb_proc_exists() 2019-08-11 22:38:43 +02:00
ae824dcab5 pdb, libgimp: remove the now unused gimp_pdb_proc_arg() and _proc_val()
Bye bye legacy.
2019-08-11 22:32:25 +02:00
533e947f50 libgimp: stop using gimp_pdb_proc_arg() and proc_val()
Their return values can be derived from the GParamSpec returned
by gimp_pdb_proc_argument() and proc_return_value().
2019-08-11 22:05:07 +02:00
b35dbf0d77 libgimp: change the remaining "author" strings and variables to "authors" 2019-08-11 17:03:03 +02:00
1c9b3c7055 libgimp: add gimp_pdb_get_last_error() and _get_last_status()
and move the old API to gimplegacy.[ch].
2019-08-11 16:41:58 +02:00
6622cf0dc4 libgimp: add and fix docs, reorder GimpParamData and remove d_boundary 2019-08-11 15:38:07 +02:00
d067441c31 libgimp: rename GimpLoad,SaveFunc to GimpRunLoad,SaveFunc
and document gimp_load,save_procedure_new().
2019-08-11 14:58:55 +02:00
fc065f8add pdb, libgimp: add gimp_load_procedure_set_thumbnail_loader()
and move the old API to gimplegacy.[ch]
2019-08-11 14:27:41 +02:00
84629cc1d0 pdb, libgimp: move the old file proc registering API to gimplegacy.[ch]
Also, #define GIMP_DISABLE_COMPAT_CRUFT in all GimpPlugIn related
files to prevent accidential use of the old API.
2019-08-11 13:21:55 +02:00
0477e60200 libgimp: update gimp.def 2019-08-11 12:56:13 +02:00
cd836e9d96 libgimp: add gimp_file_procedure_set_handles_uri()
Implementing a shiny new GimpFileProcedure doesn't mean the libraries
we use to load/save files are automatically capable of handling remote
files, so we still need this flag.
2019-08-11 12:52:28 +02:00
a79eaaf503 libgimp: add GimpFileProcedure, GimpLoadProcedure and GimpSaveProcedure
which are GimpProcedure subclasses with API to register as load/save
handlers and their own kind of run functions that get their standard
arguments passed directly instead of packed into a GimpValueArray.

They also register their standard arguments themselves, which removes
quite some boilerplate from load/save plug-ins.

Remove gimpprocedure-private.[ch] because install() and uninstall()
are now virtual functions of GimpProcedure.
2019-08-10 22:01:37 +02:00
e6d662e352 libgimp*: various doc fixes 2019-08-10 12:32:25 +02:00
60b6f34737 pdb, libgimp: fix various doc issues found by gtk-doc 2019-08-10 11:08:06 +02:00
6fe24fcb0b libgimp: fix missing installed headers.
While doing so, better break the various source categories in libgimp/.
Otherwise we were duplicating some of the header list, hence we forgot
to install some of the headers.
2019-08-09 22:41:14 +02:00
10c10e16b1 libgimp: add libgimp_built_sources inside libgimp_introspectable. 2019-08-09 18:58:48 +02:00
354ce5f742 pdb, libgimp: one more annotation for gimp_enums_get_type_names() 2019-08-09 18:47:55 +02:00
6d24eb9bb2 pdb, libgimp: annotate gimp_enums_get_type_names()
and manually add gimpenums.c to the list of introspectable files.
2019-08-09 18:41:58 +02:00
8f79ddbfe0 libgimp: add some (nullable) annotation and fix some comments. 2019-08-09 12:48:41 +02:00
41fb552988 libgimp: more docs and annotations 2019-08-09 12:41:45 +02:00
d28af77fc2 libgimp: make GimpProcBrowserDialog work both with the old and new API.
The dialog was still calling the old API gimp_pdb_query() everywhere,
which made it fail to run when called with the new API (e.g. from the
Python console or directly from an action) whereas it worked well when
called from the old API (e.g. from the Script-fu console). By testing
the existence of the GimpPDB singleton, we can have this dialog work in
both cases.
2019-08-09 02:32:52 +02:00
4cef17c7cf Issue #3758: fixes the build on mingw-w64.
Fixes:
> '_argc' undeclared (first use in this function)
2019-08-09 01:18:22 +02:00
155bc75a75 libimp*, app: get rid of inline pixbufs in the API and in pluginrc
because they are deprecated.

Change GIMP_ICON_TYPE_INLINE_PIXBUF to GIMP_ICON_TYPE_PIXBUF and the
libgimp API to (icon-name, GdkPixbuf, GFile). Use the file's uri and a
PNG blob of the pixbuf to pass around on the wire and for storage in
pluginrc.
2019-08-09 00:16:35 +02:00
244b52bf0d pdb, libgimp: make the "pdb" PDB group private
and don't install its header. Temporarily add its only two remaining
needed functions to gimppdb.[ch].

Also some Makefile cleanup.
2019-08-08 21:55:11 +02:00
25ec0a0381 libgimp: GObject Introspection now depends on Babl-0.1 introspected lib.
And that's a lot of less warnings now! Youhou!
2019-08-08 18:02:23 +02:00
f49f1b587a libgimp: improve GimpProcedure icon functions.
gimp_procedure_set_icon() and gimp_procedure_get_icon() are not very
nice functions for bindings. They are still usable, but in most
bindings, the data parameter/returned value would end up like a uint
list which you'd want to convert to a string in the icon name or file
path case. It's still possible but very cumbersome.

Instead, I skip both functions for bindings and create specific
gimp_procedure_set_icon_*() and gimp_procedure_get_icon_*() functions,
which are much more binding-friendly.
2019-08-08 17:35:20 +02:00
9339741135 libgimp: unnecessary (out) annotation on return value.
Fixes:
> Warning: Gimp: unexpected annotation: out
2019-08-08 16:58:56 +02:00
376552fbfc libgimp: fix the build.
Autotools were not able to recognize that libgimp-@GIMP_API_VERSION@.la
and ../libgimp/libgimp-@GIMP_API_VERSION@.la were the same dependency.
Hence with multi-thread builds, GI scanner was not waiting for the lib
to be totally built then failed randomly. Make the path recognizable,
and do the same for libgimpui.
For other libgimp*, I still need to keep a more complicated relative
path, but since libgimp/ is the last processed folder, AFAIK it won't
make problems.
2019-08-08 16:40:02 +02:00
2dde79b3e7 libgimp*: move GObject Introspection into libgimp/.
libgimp is anyway processed at the very end after all other libgimp*
were built. This way, it also fixes #3746, by removing the $(top_srcdir)
everywhere from introspected files, hence making the build work again
with older automake.
2019-08-08 15:59:44 +02:00
35ead93a8f libgimp: simplify gimp_pdb_run_procedure_valist() a lot
by using gimp_value_array_new_from_types_valist().
2019-08-08 13:27:34 +02:00
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
dd8bf71f96 libgimp: make "pdb" a construct-only property of GimpPDBProcedure 2019-08-08 12:12:55 +02:00
d156028c8a libgimp*, app: add the help-id to the wire protocol
Pass the help-id specified by the procedure to the core, and use it in
the core if set instead of always using the procedure's name (which
was probably good enough for all eternity, but it's still more
consistent this way).
2019-08-08 09:57:56 +02:00
0aa2dcfadb libgimp: replace gimp_pdb_dump() and gimp_pdb_query() by new API
and move them to gimplegacy.[ch].
2019-08-08 01:14:35 +02:00
5d80b74204 libgimp: more docs and annotations for GimpPDB 2019-08-08 00:34:16 +02:00