- replace gimp_display_shell_selection_control() by undraw() and restart()
which actually say what they are doing
- remove enum GimpSelectionControl
- replace GimpImage::selection_control() by ::selection_invalidate()
because none of the other enum values was used any longer
and use them instead of gimp_display_shell_selection_control() with
the resp. enum values. Remove the GIMP_SELECTION_PAUSE and _RESUME
enums values and thus the presence of this concept in the core.
which is the last bit of non-item drawing of stuff that is not
somehow the image itself... wheee!
This involves reverting commit
6bce0641d4 and adding back all the
vectors handlers that were in gimpdisplayshell-callbacks.c before.
Change the callbacks to manage proxy items for all the image's
vectors.
of the guide and sample point canvas items. They are too obscure to
additionally hide them, and these items are used rarely enough to
justify the additional parameter to the new() functions.
and use it to draw the layer boundary. Remove a lot of stuff
that was there only to draw the boundary before:
- remvoe all layer boundary stuff from the selection code
- remove gimp_display_shell_draw_layer()
- remove enum values GIMP_SELECTION_LAYER_ON,OFF from core-enums.h
- remove all lines calling gimp_image_selection_control() with
the removed enum values
- remove gimp_layer_boundary()
and use it to set visibility of guides and sample points, so this
reression is fixed.
- return NULL extents for invisible items and never draw them
- do nothing for invisible items in more places, like the group
While hacking this, it turned out that it was a braino to collect an
item's region before and after a change in
dispatch_properties_changed(), so a new update had to be devised:
- add a "change count" and new API begin_change()/end_change()
- in begin_change(), remember the item's extents before the change
- in end_change(), combine old and current extents and emit "update"
- add some protected function to emit "update", and to figure if
it makes sense at all to emit "update" on an item.
which gets emitted when the item wants to be redrawn:
- Emit "update" it when any item property changes
- Groups connect to their children and forward "update" for them
- The shell connects to its group of canvas items and exposed
the affected area
- Remove gimp_display_shell_expose_item()
- Move all the shell's item group code into gimpdisplayshell-items.c
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
items as needed
- Remove gimp_display_shell_draw_guides()
- Add GimpImage signal "sample-point-moved" and emit it when needed
- Let the shell connect to the sample point add, remove and move signals
and update the canvas items accordingly
- Remove gimp_display_shell_draw_sample_points()
Instead of blending the scaled image data onto the checkerboard and
then painting this image to the screen, render the image data into
an ARGB cairo image surface. Then paint a checkerboard on the canvas
and the image on top of it.
...just as we do for drawables. Connect to adding, removing, modifying
and toggling visibility of all vectors and emit "update-vectors"
accordingly. Add an update-vectors signal handler to GimpDisplayShell
and remove all other vectors handlers.
In order to make a clear separation between the core modules and the
UI modules, move the necessary enums from display-enums.h and
widgets-enums.h to config-enums.h and the files
gimpdisplayoptions.[ch] from the display to the config module. This
removes the config -> display dependency.
This change has three main benefits
* It lets us remove includes of display files from the config module
* We don't have to link gimp-console and test-config with a subset of
object files from the display module
* It is reflected in devel-docs/gimp-module-dependencies.svg that the
application is made up of core modules and UI modules and that no
core module depends on any UI module
It makes no sense to distinguish between idle and immediate update in
the public API, the code can simply decide by itself to immediately
update a NULL image's icon.
GimpDisplay is *only* for proxying the image's projection, every other
image/display connection belongs into GimpDisplayShell, so move these
handlers from gimpdisplay-handlers.c to gimpdisplayshell-handlers.c.
The new function does the right thing, unlike get_toplevel() which
returns the shell itself if it is not in a window. Check the return
value of get_window() for being non-NULL.
Also remove GimpDisplayShell's "window_state" member. Use
gtk_widget_get_toplvel() to get to the GimpImageWindow when we need a
display shell's fullscreen state.
2009-03-28 Michael Natterer <mitch@gimp.org>
Bug 555738 – Image display is wrong after undoing canvas size
enlargement
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): call
gimp_display_shell_expose_full() because resizing the canvas can
leave all sorts of display areas unupdated otherwise.
svn path=/trunk/; revision=28230
2009-03-28 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): swallow the
code of gimp_display_shell_image_size_starts_to_fit() because it
didn't make things clearer. Add local variables instead to make
things more readable.
svn path=/trunk/; revision=28229
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
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): Add explicit
call to gimp_display_shell_scroll_clamp_and_update() at the end to
make sure it is called.
svn path=/trunk/; revision=27762
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-08-28 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpimage.[ch]: Make the size-changed-detailed signal
also contain previous image size.
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): Take the
previous image size into account and center the image if it starts
to fit (axis indepentently) in the viewport due to the resize.
* app/core/gimpundo.h
* app/core/gimpimage-undo.c
* app/core/gimpimageundo.[ch]
* app/core/gimpimage-undo-push.[ch]: Manage the
previous-size-information.
* app/core/gimpimage-crop.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-resize.c: Propagate previous size to the
size-changed-detailed signal emission and the undo-system.
svn path=/trunk/; revision=26804
2008-08-14 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_monitor_res_notify_handler): When the screen
resolution changes and we are not in Dot by dot, we also need to
clamp the display shell offsets.
svn path=/trunk/; revision=26557
2008-08-14 Martin Nordholts <martinn@svn.gnome.org>
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_resolution_changed_handler): If we are in
dot-by-dot, we only need to update the rulers, and only if the
unit is not pixels.
svn path=/trunk/; revision=26556