Commit Graph

44453 Commits

Author SHA1 Message Date
Ell a64dc8d618 app: defer GimpViewable::size-changed signal emission while frozen
In GimpViewable, defer emission of the size-changed signal while
the viewable's preview is frozen, and only emit the signal once
thawed.
2019-09-04 20:47:25 +03:00
Ell e2f31852fb app, menus: add "show canvas boundary" display option
Add a "show canvas boundary" display option, and a corresponding
"View" menu item and default-apperance preferences option.  When
enabled (the default), the canvas boundary is shown as an orange/
black dashed line in "show all" mode.
2019-09-04 20:47:25 +03:00
Ell a1717a90a9 app: improve display scroll/zoom-related behavior in "show all" mode
In "show all" mode, the image is thought to be "infinite"; this
commit improves the overall scrolling/zooming behavior in this mode
according to this assumption.  In cases where a specific image size
is needed (e.g., for the scrollbar bounds, fit-image-in-window,
etc.), the image's full bounding box is used; however, in cases
where a center point is needed (e.g., for the zoomed-out scrollbar
bounds, center-image-in-window), the canvas center, rather than the
bounding-box center, is still used.
2019-09-04 20:47:25 +03:00
Ell 788b136bbf app: add "clip" parameter to gimp_display_shell_untransform_viewport()
... which specifies whether to clip the viewport to the canvas
(previously, it would always be clipped).  Use the appropriate
value in all callers, depending on the shell's "show all" mode.  In
particular, this commit avoids clipping the image projection's
priority rect to the canvas in "show all" mode.
2019-09-04 20:47:25 +03:00
Ell 86dc451bce app, menus: add "show all" mode to GimpDisplayShell; "View -> Show All" toggle
Add a "show all" mode to GimpDisplayShell, controlled through a
corresponding "View -> Show All" menu item.  When enabled, the
entire image content is displayed, instead of cropping the image
to the canvas size.  More generally, the display behaves as if the
canvas were infinite.  The following commits improve the overall
behavior in this mode.

Add a prefernces option to control the default "show all" state.
2019-09-04 20:47:21 +03:00
Ell a9d0643992 app: in preferences dialog, add "show sample points" toggle
... to the default-appearance options.  It was previously missing.
2019-09-04 19:19:42 +03:00
Ell 4e8fa88705 app: in preferences dialog, swap position of default-appearance columns
... to match their menu order.
2019-09-04 19:19:41 +03:00
Ell 697ab6a91a app: in GimpImage, ignore "show all" when image used as pickable
In GimpImage, make sure the image's pickable interface keeps
behaving as before (i.e., restricted to the canvas size), even when
the image is in "show all" mode.  In contrast, the image's
projection, when used as a pickable, *is* affected by "show all".
2019-09-04 19:16:42 +03:00
Ell 1f9d0d275c app: add gimp_image_invalidate_all()
... which invalidates the entire image.  This replaces all calls to
gimp_image_invalidate() with the full canvas size, since the image
content can now be larger than the canvas.
2019-09-04 19:16:42 +03:00
Ell 7f629a630c app: add "show all" mode to GimpImage
Add a "show all" mode to GimpImage, which, when active, causes the
image projection's bounding box to be adjusted dynamically to the
combined bounding box of all layers and the canvas.  This mode is
controlled through the new gimp_image_{inc,dec}_show_all()
functions, which should be called by the display; a corresponding
display toggle will be added in the following commits.

Note that from the user's perspective, "show all" is a display
mode, rather than an image mode.  The GimpImage "show all" mode is
therefore merely an implementation detail, and shouldn't have any
effect on displays that don't use "show all" mode, or the PDB.
The ability to use the image with or without taking its "show all"
mode into account will be facilitated by the next commits.
2019-09-04 19:16:41 +03:00
Ell bcf2b937d9 app: notify GimpProjection::buffer when freeing the projection's buffer
... instead of only when subsequently reallocating it, so that
listeners can respond to the buffer being freed.
2019-09-04 19:16:41 +03:00
Ell 49bbf13911 app: in GimpProjection, avoid invalidating preview on flush while rendering
In GimpProjection, avoid erroneously invalidating the projectable's
preview when flushing the projection and there's nothing to be
flushed, if the chunk renderer is still running, and hence the
projection is not fully rendered yet.
2019-09-04 19:16:40 +03:00
Ell 564afeda8b app: in gimp_gegl_buffer_set_extent(), clear full OOB region
In gimp_gegl_buffer_set_extent(), clear the full now-out-of-bounds
region of the buffer, instead of only full out-of-bounds tiles;
however, we still make sure to clear full tiles, instead of partial
tiles, as much as possible.  This prevents (parts of) the old
content of the buffer from showing when it's enlarged again.  This
is especially relevant for the image projection, once we add
support for a dynamically-expanding canvas in the following
commits, since the projection of a reexpanded buffer can be
temporarily rendered to the display before it's fully
reconstructed, exposing parts of the old content.
2019-09-04 19:16:40 +03:00
Michael Natterer 7019eaa56b app, libgimp: share the code of libgimp/gimpparamspecs.c with app/
move the code to gimpparamspecs-body.c and include it from both app/
and libgimp/. They are the same apart from a minor difference which we

Also share the entire libgimp/gimpparamspecs.h header with the core.
2019-09-04 16:48:26 +02:00
Michael Natterer 18bdf52a0b libgimp: remove redundant validation code from gimpparamspecs.c
No GimpParamSpecItem subclass needs its own validate function,
checking against pspec->value_type and gimp_item_is_vaid() in
gimp_param_item_validate() is good enough, no item ID can change its
type during the lifetime of the proxy.
2019-09-04 16:34:24 +02:00
Michael Natterer b92dd2c8e3 app: split GimpDisplay in two classes: GimpDisplay and GimpDisplayImpl
GimpDisplay contains only the ID logic and the "gimp" and "config"
pointers, and lives in the core.

GimpDisplayImpl is a subclass and contains all the actual display
stuff. The subclass is only an implementation detail and doesn't
appear in any API.

Remove all hacks which pass displays as gpointer, GObject or
GimpObject through the core, or even lookup its type by name,
just use GimpDisplay.
2019-09-04 14:30:43 +02:00
Michael Natterer b3b3d8160c app, libgimp: don't duplicate _gimp_gp_param_def_to_param_spec()
they are virtually the same now (except GimpParamEnum, but that one is
still the same because its special feature doesn't go over the wire).
2019-09-04 10:41:19 +02:00
Michael Natterer 3fd3344f80 plug-ins: script-fu lost all support for images, layers etc.
due to the recent change to actual objects instead of IDs,
so add object support to script_fu_marshal_procedure_call().
2019-09-04 10:28:50 +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 c6082b37f8 libgimp: add missing stuff to gimpprocedure-params.h
Add some accessors, and the complete set of macros for GimpParasite
and GParamSpec.
2019-09-04 02:39:02 +02:00
Michael Natterer cb24709916 pdb: remove the "id" field from all pdb types, it's now unused 2019-09-04 02:10:43 +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 feaf96735f pdb: don't return any strings from _gimp_pdb_proc_info()
and instead add _gimp_pdb_proc_documentation() and
_gimp_pdb_proc_attribution().

Remove the gimp_pdb_proc_info() utility function in app/.
2019-09-04 01:38:31 +02:00
Michael Natterer d0f00bb76d devel-docs: update the libgimp and libgimpbase docs 2019-09-04 00:12:03 +02:00
Michael Natterer a351ce9126 Remove the entire old plug-in interface 2019-09-04 00:03:12 +02:00
Michael Natterer 7257cc8abc plug-ins: port curve-bend to GimpPlugIn... IT'S DONE YEAH 2019-09-03 23:29:21 +02:00
Michael Natterer f405b45058 plug-ins: port sample-colorize to GimpPlugIn 2019-09-03 22:51:18 +02:00
Michael Natterer bdbe1ee06d plug-ins: port sparkle to GimpPlugIn 2019-09-03 22:16:39 +02:00
Michael Natterer 5c5b4642b1 plug-ins: port warp to GimpPlugIn 2019-09-03 21:30:27 +02:00
Michael Natterer 4ded322edf plug-ins: port map-object to GimpPlugIn 2019-09-03 21:00:23 +02:00
Michael Natterer 9e3359c659 plug-ins: port lighting to GimpPlugIn 2019-09-03 19:58:18 +02:00
Michael Natterer 5154b27108 plug-ins: port depth-merge to GimpPlugIn 2019-09-03 19:22:42 +02:00
Michael Natterer 0785dd17a5 plug-ins: port sphere-designer to GimpPlugIn 2019-09-03 15:37:52 +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 a4637b0d69 plug-ins: remove deprecated API support from common/mkgen.pl 2019-09-03 13:25:25 +02:00
Michael Natterer 29687012c4 plug-ins: port tile to GimpPlugIn 2019-09-03 13:24:05 +02:00
Michael Natterer 8245102bbd plug-ins: print: fix missing argument to GIMP_PROC_ARG_IMAGE() 2019-09-03 12:42:17 +02:00
Michael Natterer 80340f2d47 libgimp: remove the last manual compat wrappers 2019-09-03 12:04:05 +02:00
Michael Natterer 6ba3fb3bd1 plug-ins: port curve-bend to libgimp oobjects. THE LAST ONE \o/ 2019-09-03 11:59:53 +02:00
Michael Natterer adfe5ee390 plug-ins: port sphere-designer to libgimp objects 2019-09-03 11:36:41 +02:00
Michael Natterer 0b98a3e2e8 plug-ins: blind port of twain to libgimp objects
Please somebody build and fix this on windows.
2019-09-03 11:17:01 +02:00
Michael Natterer 9e771d8cd5 libgimp: remove more deprecated API 2019-09-03 11:10:43 +02:00
Michael Natterer 660ad6c41a libgimp: use the new get_by_id() functions
except in code that is about to go away.
2019-09-03 10:57:41 +02:00
Michael Natterer 45d60acb65 plug-ins: use the new item-type specific get_by_id() functions 2019-09-03 10:48:32 +02:00
Michael Natterer 1f4a5d4004 plug-ins: port map-objects to libgimp objects 2019-09-03 10:28:21 +02:00
Michael Natterer fd5740e70b libgimp: add gimp_layer,chanel,vectors,etc,_get_by_id()
which call gimp_item_get_by_id() and additionally check if the
returned item has the right type, and return NULL if not.

This is both shorter and more readable than

layer = GIMP_LAYER (gimp_item_get_by_id (id));

and additionally makes sure we don't cast e.g. a non-layer with
GIMP_LAYER(), which will give criticals but shouldn't, because the
wrong IDs can come from anywhere and are an input problem and not a
programming error (criticals are for programming errors).
2019-09-03 10:24:24 +02:00
Michael Natterer 71f767efc0 plug-ins: port lightning to libgimp objects 2019-09-02 19:34:07 +02:00
Michael Natterer add31e2976 plug-ins: fix a glitch in the script-fu unique argument name logic 2019-09-02 19:34:07 +02:00
Piotr Drąg ff1663b559 Update POTFILES.in 2019-09-02 18:58:10 +02:00
Michael Natterer 86a99a942f libgimp: GimpProcedure args and return values must have have unique
and canonical names now.
2019-09-02 18:53:30 +02:00