Commit Graph

44069 Commits

Author SHA1 Message Date
Michael Natterer 78c7d46ad9 devel-docs: update the libgimp docs 2019-08-11 15:38:07 +02:00
Michael Natterer 6622cf0dc4 libgimp: add and fix docs, reorder GimpParamData and remove d_boundary 2019-08-11 15:38:07 +02:00
Piotr Drąg 7fbf33869c Update Polish translation 2019-08-11 15:07:42 +02:00
Michael Natterer d067441c31 libgimp: rename GimpLoad,SaveFunc to GimpRunLoad,SaveFunc
and document gimp_load,save_procedure_new().
2019-08-11 14:58:55 +02:00
Michael Natterer 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
Michael Natterer 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
Michael Natterer 0477e60200 libgimp: update gimp.def 2019-08-11 12:56:13 +02:00
Michael Natterer 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
Michael Natterer f042d21989 plug-ins: port file-desktop-link to GimpLoadPocedure 2019-08-11 12:31:41 +02:00
Ell 8bff415f59 app, menus: add "Image -> Transform -> Arbitrary Rotation..." action
Add a gimp-rotate-image-arbitrary action, and a corresponding
"Image -> Transform -> Arbitrary Rotation..." menu entry, which
activates the rotate tool in image mode (similarly to the
corresponding action for layers).
2019-08-11 00:34:18 +03:00
Ell 52ad37a2aa app: use gimp_transform_tool_set_type() in tools-rotate-arbitrary action
... so that the original transform-type of the rotate tool is
restored once the layer is rotated.  Additionally, make sure to
set the tool's transform-type even if it's already active.
2019-08-11 00:28:44 +03:00
Ell f651db52fb app: add gimp_transform_tool_set_type()
... which temporarily changes the transform-type of the tool,
restoring the original type once it's halted.  To be used when
activating a transform tool through an action for a specific
transform type.
2019-08-11 00:28:44 +03:00
Ell e4990bee7b app: add "Image" transform type to transform tools
Add a new "Image" transform type to the transform tools, in
addition to the existing "Layer", "Selection", and "Path" transform
types.  The "Image" mode transforms the entire image, rather than a
single item.  In tools with a preview, the preview shows the
transformed image projection.  The clipping mode controls how the
canvas is clipped during the transform; in particular, the ADJUST
clipping mode resizes the canvas to fit its transformed size.
2019-08-11 00:28:44 +03:00
Ell 9f823c396a app: indentation fixes in the transform tools 2019-08-11 00:28:43 +03:00
Ell 6023f97509 app: use a pickable instead of a drawable in GimpCanvasTransformPreview
In GimpCanvasTransformPreview, use a GimpPickable, instead of a
GimpDrawable, as the preview source, so that we can use it with the
image projection, rather than just with drawables.
2019-08-11 00:28:43 +03:00
Ell 539d666ae2 app: add gimp_display_shell_show_image()
... which controls whether or not the image is rendered by the
shell.  We'll use this to hide the image while showing its
transform preview in the next commits.
2019-08-11 00:28:41 +03:00
Ell c45f1b4148 app: add gimp_image_transform()
Add a new gimp_image_transform() function, which transforms the
entire image, including all layers, channels (including selection
mask), vectors, guides, and sample points, according to a
transformation matrix.  The canvas is resized according to the
clip_result parameter, the same way drawables are resized during
transformation; the layers are resized using ADJUST mode
regardless.
2019-08-11 00:28:09 +03:00
Ell ae080f06f9 app: add gimp_image_flip_full()
... which takes the symmetry axis as a parameter, instead of hard-
coding the axis to the middle of the image, and which additionally
takes the clipping mode as a parameter, controlling whether to clip
or resize the canvas.  Note that the actual canvas size never
changes, but it may be offset when flipped around an off-center
axis, without clipping.

Implement gimp_image_flip() in terms of gimp_image_flip_full().
2019-08-11 00:28:08 +03:00
Ell d13c6ce3e0 app: fix sample-point OOB check in gimp_image_resize[_with_layers]() 2019-08-11 00:28:08 +03:00
Michael Natterer c377644ba5 plug-ins: port file-pat-save to GimpSaveProcedure 2019-08-10 22:01:37 +02:00
Michael Natterer 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
Piotr Drąg 4a56f1d9cc Update POTFILES.in 2019-08-10 16:42:35 +02:00
Michael Natterer 299d657ff1 libgimpbase: change gimpprotocol GPParamDefInt's members to gint64
so the full range of any unsigned int param spec's values fits.
2019-08-10 16:25:22 +02:00
Michael Natterer 4bafbeca1b devel-docs: doc updates, more doc modules without any warnings 2019-08-10 12:32:56 +02:00
Michael Natterer e6d662e352 libgimp*: various doc fixes 2019-08-10 12:32:25 +02:00
Michael Natterer 6cb027f402 devel-docs: update the libgimp docs 2019-08-10 11:08:33 +02:00
Michael Natterer 60b6f34737 pdb, libgimp: fix various doc issues found by gtk-doc 2019-08-10 11:08:06 +02:00
Michael Natterer 7e504a0ddd libgimpconig: fix indentation in gimpscanner.h 2019-08-10 11:07:27 +02:00
Michael Natterer 2182efddfb devel-docs: update the libgimpconfig docs 2019-08-10 09:42:28 +02:00
Michael Natterer b6d39a4f3f devel-docs: update libgimpbase docs 2019-08-10 02:29:32 +02:00
Jehan ae7dfba2c4 libgimpwidgets: fix some typos.
s/logharithmic/logarithmic/
2019-08-09 23:40:07 +02:00
Jehan 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
Niels De Graef 1743f474e5 app/widgets: Use G_DECLARE_INTERFACE()
This cuts aways a little of the GObject boilerplate.
2019-08-09 19:48:21 +00:00
Niels De Graef d3e9e5617d app/core: Use G_DECLARE_INTERFACE()
This cuts aways a little of the GObject boilerplate.
2019-08-09 19:48:21 +00:00
Niels De Graef a0ba37649d libgimpcolor: colormanaged: Use G_DECLARE_INTERFACE()
This cuts aways a little of the GObject boilerplate.
2019-08-09 19:48:20 +00:00
Niels De Graef aefb40c82a libgimpconfig: Ensure G_PARAM_STATIC_STRINGS
The `GIMP_CONFIG_PROP_*` macros do not automatically set
`G_PARAM_STATIC_STRINGS`, which means each property that uses such a
macro does not have this flag set by default (and almost none set it
themselves). By adding `G_PARAM_STATIC_STRINGS` to
`GIMP_CONFIG_PARAM_FLAGS`, we can prevent this from happening, which
should lead to some unnecessary string copies being prevented.
2019-08-09 19:27:02 +00:00
Ell ce6dfd3194 pdb: fix image-mask transforms
In the various PDB transform functions, avoid erroneously creating
a floating selection when transforming the image mask, and rather
transform the mask normally.
2019-08-09 22:23:35 +03:00
Ell 33a389cd0c app, pdb: use gimp_item_get_clip() everywhere
Remove the special clipping-mode handling for channels throughout
the transform (and drawable-filter) code, and rather use
gimp_item_get_clip(), added in the previous commit, instead.  As
mentioned in the previous commit, we only modify the clipping mode
in top-level code, while having lower-level code use the clipping
mode as-is.  This not only hides the actual clipping-mode logic
from the transform code, but, in particular, allows code performing
transformation internally to use arbitrary clipping modes.

Also, this commit fixes a bunch of PDB bugs all over the place :)
2019-08-09 22:23:17 +03:00
Ell d5cdcc6c02 app: add gimp_item_get_clip()
Add a new GimpItem::get_clip() virtual function, and a
corresponding gimp_item_get_clip() function, which return the
actual clipping mode to be used when transforming (or applying a
filter to) a given item, given the original clipping mode.  This
applies only to whole-item transformations (i.e., when not creating
a floating selection), and should be used by the top-level code
applying the transformation, rather than by the actual
transformation code, so that the item can be transformed using a
different clipping mode internally.

Provide a default implementation that simply returns the input
clipping mode, and override for GimpChannel (to always return CLIP)
and for GimpVecotrs (to always return ADJUST).
2019-08-09 22:22:50 +03:00
Ell f9fb3e6fad app: fix layer-mask offset when applying filter to layer without clipping 2019-08-09 22:22:50 +03:00
Jehan ba5a583a5d gitlab-ci: configure with --with-javascript=force.
We don't actually need the GJS dependency at build-time. This is really
more of a packager warning.
2019-08-09 19:01:34 +02:00
Jehan 10c10e16b1 libgimp: add libgimp_built_sources inside libgimp_introspectable. 2019-08-09 18:58:48 +02:00
Michael Natterer c9b22def51 libgimpconfig: update gimpconfig.def 2019-08-09 18:51:12 +02:00
Michael Natterer 354ce5f742 pdb, libgimp: one more annotation for gimp_enums_get_type_names() 2019-08-09 18:47:55 +02:00
Michael Natterer 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
Jehan f9f144b4bc configure: add a check for gjs (JavaScript interpreter with GI binding).
As discussed on IRC, I am not sure if really this is needed, since
theoretically we now have support for a whole bunch of languages without
doing anything (languages supported by GObject Introspection) and we are
not going to check for all of them.
Yet since now we install one JS plug-in, let's still do a quick check.
We'll see later if we want to change how we handle supported script
languages.
2019-08-09 18:40:14 +02:00
Jehan b1662443af m4macros, configure: add and use AM_PYTHON_CHECK_PYGOBJECT() macro.
Rather than looking for pygobject-3.0 with pkg-config, run an actual
test in python, loading the 'gi' module.
I also added a version parameter making it possible to even check for a
required version of PyGObject, though it is currently unused (as I have
no idea if we have a minimum requirement for our plug-ins to work well).

This is an improvement of commit 8e938e0960 as I realized that we don't
need any development files, therefore I don't think that searching with
pkg-config was the right idea in our case.
2019-08-09 18:18:21 +02:00
Jehan 96a33277d4 gitlab-ci: configure GIMP with --with-python=force.
We don't actually need any of the Python dependencies at runtime. We
only check for these to make packagers aware of the runtime need. Force
the build to go forward even with these deps.
2019-08-09 17:08:53 +02:00
Jehan 8e938e0960 configure: also look for pygobject-3.0 runtime dependency.
If we decide to look for Python dependencies, we should also look for
pygobject as it provides the GI binding to Python.
I'm still not sure if we should look for these runtime dependencies at
configure time. But for the time being, if we continue doing so, let's
do it right.
2019-08-09 16:43:34 +02:00
Jehan c1f28f7e8c plug-ins: rename the C goat exercise to goat-exercise-c.
Makes for consistent naming of the different demo code we have there.
2019-08-09 15:48:25 +02:00