Commit Graph

43730 Commits

Author SHA1 Message Date
Michael Natterer 5c7134f3a5 app, pdb: rename GIMP_TYPE_COLOR_ARRAY to GIMP_TYPE_RGB_ARRAY
and rename its GParamSpec too. Also, always say "foo_array" not
"fooarray".
2019-07-26 12:58:19 +02:00
Michael Natterer 6cb8a59501 app: fix gimp_value_set_drawable(), set_channel()
to work like gimp_value_set_item() and properly deal with all sorts of
drawables and channels.
2019-07-26 12:14:25 +02:00
Michael Natterer 4a5f0508e9 libgimp: remove GimpParamRegion, it was never used 2019-07-26 02:37:52 +02:00
Michael Natterer 8a462e867d libgimp: add a GimpProcedure class
Mostly the same code as GimpProcedure in app/pdb/.

Move the "run" function to GimpProcedure. Add API to GimpPlugIn to
list and create procedures, and always keep a list of the plug-ins
procedures around. Still only using the old params and return_vals.
2019-07-26 02:11:35 +02:00
Michael Natterer f2d399b17b libgimp: add initial version of a GimpPlugIn class
The new way of doing plug-ins:

- subclass GimpPlugIn in your plug-in
- implement its query() and run() methods, run() will move to a
  new GimpProcedure class soon
- instead of MAIN(), say GIMP_MAIN(YOUR_PLUG_IN_TYPE)

Instead of keeping around a GimpPlugInInfo struct, libgimp will
create an instance of your plug-in class, keep it around during
the plug-in's lifetime, and call its virtual functions.
2019-07-25 23:07:24 +02:00
Jehan 771d415b5f app: rename "On color" matting preview mode to "Color".
As discussed earlier with mitch and tmanni.
2019-07-25 22:44:41 +02:00
Michael Natterer e7af081b05 libgimpbase: fix docs of struct GimpParamSpecValueArray 2019-07-25 21:32:36 +02:00
Jehan c20645054c libgimp: update annotations for gimp_install_procedure() and...
... GimpRunProc function type.
In gimp_install_procedure(), make sure that @params and @return_vals are
processed as arrays, otherwise they are unusable.

As for the run procedure, make so that @return_vals and @n_return_vals
are considered as returned values. In Python binding for instance, that
makes these not parameters anymore, but actually returnable by the run
function.

With these changes, I made the first fully functional GI Python plug-in,
which just creates a new image and a display for this image. Still a lot
to improve clearly, but we are on the right track. :-)
2019-07-25 19:27:16 +02:00
Jehan 74c69ae3c2 libgimp: update the def.
Also add a "Since: 3.0" and fix the query_proc docs.
2019-07-25 16:58:18 +02:00
Jehan febc1a843d libgimp: add gimp_plug_in_info_set_callbacks().
This is an alternative way to set up a plug-in callbacks, apart from
setting directly the PlugInInfo struct properties.
The reason is that setting directly the Gimp*Proc properties crashes the
plug-in, when done through the Python GI binding.

It is most likely a bug in Pygobject, unless we need the proper
annotation (which I haven't found yet). See:
https://gitlab.gnome.org/GNOME/pygobject/issues/24#note_564968

Setting these callbacks from the C code works fine though, hence this
new API. It is to be noted that the '(scope async)' is the most
important part in this function annotations. Without these annotations,
the function pointers become invalid at the end of the set_callbacks()
call, hence the plug-in crashes when they are actually called.

Unfortunally I am also notified by ebassi that using (scope) at all (any
of the 3 possible values) is just wrong. An API change will be
necessary. For the time being, I leave this like this, for the sake of
testing further, but we'll need to improve things.
2019-07-25 16:23:07 +02:00
Michael Natterer 8aaf517db4 devel-docs: add screenshots of more widgets 2019-07-25 15:24:59 +02:00
Øyvind Kolås 23ade7b80b build, app: require babl-0.1.68 or newer 2019-07-25 15:10:22 +02:00
Michael Natterer 7ddf40b78b app: make sure the display is not rotated by a very small angle
gimp_display_shell_rotate_update_transform(): reliably set rotation to
0.0 using an epsilon of 1e-3.
2019-07-25 12:48:37 +02:00
Michael Natterer c144cf69de libgimp*: use more g_clear_pointer() 2019-07-25 12:37:52 +02:00
Jehan 692272e580 libgimp: add some comment documentation to Gimp*Proc callback types.
It doesn't really help yet with the problem I encountered allowing to
set and run these Python callbacks from the C code (cf. pygobject#347),
but at least let's improve a bit the documentation.
2019-07-25 11:59:07 +02:00
Jehan c260b4d50d libgimp: add correct annotation for gimp_main().
With GObject introspection, this allows to properly use this function,
otherwise it sees the argv argument as a string (and not an array of
string), which cannot be used properly.
For instance, with Python binding, you can just call it like this:

> Gimp.main (info, sys.argv)
2019-07-25 11:02:53 +02:00
Jehan 6389bb4b58 libgimp, libgimpbase: both introspectable under same namespace Gimp.
At first I thought these could be different namespaces, but actually
GObject Introspection parses files and can only use (AFAICS) the
namespace actually used in our C function, which is always `gimp_` (and
not `gimpbase_` or whatever.

So make the introspection at the root level, and it will include all
libgimp* libraries in one namespace, same as the C lib anyway. For now
only libgimp and libgimpbase as I am still testing.
Also I move the introspectable sources in their own file in order to
share the list between the library building Makefile and the GI
makefile because I can't find how to pass over variables otherwise.
2019-07-25 10:51:03 +02:00
Jehan 0c75cd7fc4 configure, libgimpbase, m4macros: first steps into API introspection.
So far only libgimpbase is introspected. It just works though (I could
test that I could just run a plug-in which could access libgimpbase API
without any problem).
The g-ir-scanner call outputs a lot of warning but I won't care for
these right now.

The `introspection.m4` is taken straight from GEGL tree.
2019-07-25 10:51:03 +02:00
Michael Natterer fe75ef28ad libgimpwidgets: fix docs for GimpBusyBox:message 2019-07-25 10:24:30 +02:00
Michael Natterer ec18b969a3 app: remove gimp_display_shell_filter_new(), it's empty and useless 2019-07-25 09:55:55 +02:00
Michael Natterer 42a7d17d1a app: add missing include to gimpdisplayshell-filter.c 2019-07-25 09:15:07 +02:00
Michael Natterer 572775a60b devel-docs: update the libgimpwidgets docs with new widget shots
Added some more and some minor fixes.
2019-07-24 19:19:04 +02:00
Michael Natterer dcbd83cafc devel-docs: undeprecate doc-shooter and add a few more widgets
Doesn't use X11 any longer, just plain GTK and cairo.
2019-07-24 19:17:14 +02:00
Michael Natterer 9e88105ee6 libgimpwidgets: add more docs 2019-07-24 19:11:58 +02:00
Michael Natterer f67e607395 libgimpwidgets: declare GimpHintBox with public instance and class
like all other objects, so gtk-doc doesn't cripple its docs.
2019-07-24 15:11:51 +02:00
Michael Natterer 7f39be196a devel-docs: rename to doc titles to "GIMP 3"
so they are different from the GIMP 2 docs.
2019-07-24 10:23:52 +02:00
Michael Natterer 997730a69d libgimpbase: remove obsolete members from struct GimpPixPipeParams 2019-07-24 02:22:47 +02:00
Michael Natterer fbee862c50 devel-docs: remove gegl-porting-plan.txt, what was in there is done 2019-07-24 02:17:39 +02:00
Michael Natterer f28ec4bf86 libgimpbase: always allocate GimpPixPipeParams.placement, add docs 2019-07-24 02:09:49 +02:00
Michael Natterer 8bd4a4fac9 pdb: fix typo in the gimp-context-set-line-dash-pattern docs 2019-07-24 01:57:43 +02:00
Michael Natterer 1a7ea992f3 pdb, libgimp: generate some useless API docs for enums extracted from app/
To be improved...
2019-07-24 01:55:06 +02:00
Michael Natterer c2a38f0631 devel-docs: various documentation and build fixes 2019-07-24 01:21:16 +02:00
Michael Natterer aca5f806c4 libgimp*: lots of doc fixes and new docs for structs and enums 2019-07-24 01:18:30 +02:00
Michael Natterer b9a4fdd1e0 configure.ac: build the devel-docs again 2019-07-23 19:33:48 +02:00
Michael Natterer 8b22b3ab35 libgimpwidgets: fix some glitches noticed when updating docs 2019-07-23 19:33:48 +02:00
Michael Natterer 0131c96e1d devel-docs: undeprecate doc-shooterm but just so it builds
it's still horrible.
2019-07-23 19:33:48 +02:00
Michael Natterer 55fc774ca9 devel-docs: fix and update the libgimp docs 2019-07-23 19:33:48 +02:00
Michael Natterer 0155eccbf2 devel-docs: fix and update the libgimpthumb docs 2019-07-23 19:33:48 +02:00
Michael Natterer d2d9e47390 devel-docs: fix and update the libgimpwidgets docs 2019-07-23 19:33:48 +02:00
Michael Natterer ff7467f6dd devel-docs: fix and update the libgimpmodule docs 2019-07-23 19:33:48 +02:00
Michael Natterer 29e1d9e7cf devel-docs: fix and update the libgimpmath docs 2019-07-23 19:33:48 +02:00
Michael Natterer 41d1ad26a4 devel-docs: fix and update the libgimpcolor docs 2019-07-23 19:33:48 +02:00
Ell e92732f7cf app: add assigned-threads variable to the dashboard
Add an assigned-threads variable to the dashboard's misc group,
showing the number of worker threads which currently have work
assigned.  See commit
gegl@fc532f06773bd292c86abee31ac18f62e26d39df.
2019-07-23 17:15:15 +03:00
Michael Natterer 79e40b1945 devel-docs: update docs with missing symbols and types
(cherry picked from commit f974cdb5d7)
2019-07-23 15:55:14 +02:00
Michael Natterer a05205b576 devel-docs: fix the libgimpconfig docs 2019-07-23 15:19:08 +02:00
Michael Natterer c249ffe3ea devel-docs: change the libgimpbase docs to "libgimpbase3"
and make them build again without any wrong symbols.

This does not enable the devel-docs build yet, I'll fix
module by module before enabling the build again.
2019-07-23 13:47:51 +02:00
Michael Natterer 4e58a15816 libgimpbase: forgot to remove the GimpDatafileData typedef 2019-07-23 13:34:18 +02:00
Michael Natterer 696691efbd app: fix tests by using the right value in sessionrc-expected-multi-window
Apparently GTK3 is more reliable when it comes to remembering window sizes.
2019-07-23 13:16:23 +02:00
Dimitris Spingos e7e0064bd7 Updated Greek translation 2019-07-23 13:31:32 +03:00
Ell ebb3ec4925 app: reduce time complexity of layer-group translation
When translating a layer group, avoid separately updating the
original area of the child layers before translating them (as per
the fix to issue #3484), as this results in quadratic time
complexity w.r.t. to the maximal subgroup nesting level.  Instead,
simply defer the updating of the group's offset until *after*
translating the child layers, so that their original area isn't
clipped by the parent, while their new area is still properly
updated even if the parent's size changes (see comment in code).
2019-07-23 10:55:54 +03:00