2000-04-26 Federico Mena Quintero <federico@helixcode.com>
* full-screen.[ch]: New files for the full screen view mode.
* window.c (view_menu): Added a Full Screen item.
* commands.c (cmd_cb_full_screen): New command callback.
* window.c (window_full_screen): New function to launch a full
screen view.
* ui-image.c (ui_image_get_image): New function to query the image
that an image view scroller is displaying.
* image-view.c (paint_rectangle): Take in the interpolation type.
(pack_pixbuf): New function to pack an RGBA pixbuf into RGB
scanlines, while preserving the rowstride. This is to compensate
for the lack of gdk_draw_rgb_image_32_dithalign().
(paint_rectangle): Generate a 32-bit pixbuf to use the fast
scaling code and then use pack_pixbuf() before rendering use
GdkRGB. Sigh. For now this functionality is #ifdefed out so that
I can do proper benchmarks.
* Makefile.am (eog_SOURCES): Added full-screen.[ch] to the list of
sources.
* configure.in, acconfig.h: Add --enable-oaf configure option to
allow building the bonobo control OAF-enabled instead of
GOAD-enabled.
* bonobo/Makefile.am: Link against OAf and install .oafinfo file when
configured with --enable-oaf
* bonobo/bonobo-image-generic.c: Use OAF calls and IIDs when
configured with --enable-oaf.
* bonobo/image-generic.oafinfo: New OAF activation record.
2000-04-23 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (compute_scaled_size): Pass in a zoom value instead
of using the view's.
(compute_center_zoom_offsets): New function to compute the offsets
for the new zoom value so that they keep the image centered on the
view.
(scroll_to): Only update the offsets and do not paint if the
widget is not drawable.
(image_view_size_allocate): Re-center the offsets if the zoom
changed.
2000-04-21 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (scroll_to): New function to do proper scrolling of
the image view.
(drag_to): Use scroll_to().
(adjustment_changed_cb): Use scroll_to().
* uta.c (uta_copy_area): New function to do the equivalent of a
BitBlt on a microtile array. It is not perfect; see the FIXME for
details.
(copy_tile): Helper function for uta_copy_area().
(uta_ensure_size): Create a new uta with the proper size if the
specified uta is NULL.
(uta_add_rect): Special-case source tiles that are empty so as not
to add a bigger region than needed.
2000-04-20 Federico Mena Quintero <federico@helixcode.com>
* window.c (window_open_image): Add the image size to the window
title.
* image-view.c (drag_to): New function to drag the image to a
specified mouse position.
(image_view_button_press): Handle button presses by initiating the
drag.
(image_view_button_release): Handler button releases by
terminating the drag.
(image_view_motion): Handle motion events by dragging the image.
2000-04-14 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (image_view_unrealize): Doh, call the parent class
unrealize handler, not the unmap handler! Another cut&paste bug.
Some real work and some quick hacks to test the new scrolling/zooming
code.
2000-04-13 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (image_view_size_allocate): Set the correct size
for the window and recompute the adjustments.
(paint_rectangle): The offset of the image with respect to the
window is the negative of the adjustment offset.
(image_view_destroy): Disconnect from the adjustments.
(image_view_finalize): Unref the adjustments. Free the private
part of the ImageView structure here.
(image_view_set_image): Queue a resize. We still need to adjust
or reset the scroll offsets.
(image_view_set_zoom): Queue a resize. We still need to re-center
the zoom offsets.
(adjustment_changed_cb): As a temporary solution, repaint the
whole thing. I need to finish uta_copy_area() for uta.c to be
able to use gdk_window_copy_area() on the image window.
* uta.c (uta_add_rect): Fixed computation of microtile
coordinates. Fixed a bunch of stupid off-by-one errors.
(uta_remove_rect): Fixed computation of microtile coordinates and
clipping coordinates.
(uta_find_first_glom_rect): As a quick hack, use a bastardized
version of art_rect_list_from_uta() to find the first glommed
rectangle. This will be replaced with a more efficient function
in the future.
This may not build. It will not work yet. I just want some safety
for if my laptop's HD dies.
2000-04-01 Federico Mena Quintero <federico@helixcode.com>
* uta.[ch]: New files with utilities for manipulating microtile
arrays.
* image-view.[ch]: New files with the new image view widget. We
don't use the canvas anymore due to GtkLayout's lack of diagonal
scrolling. This widget uses a fancy method to pull out dirty
rectangles from a microtile array, one by one, in the idle loop.
This lets the user preempt the drawing process, say, when
scrolling or zooming quickly.
* ui-image.c (UIImagePrivate): Removed the canvas-related fields.
Now we use an ImageView widget instead. Modified all the
functions to use this, and removed some old canvas-specific
functions.
* Makefile.am (eog_SOURCES): Added image-view.[ch] to the list of
sources. Removed image-item.[ch] and render.[ch]; we now use the
GdkPixbuf scaling functions instead of our own.
* Makefile.am (eog_SOURCES): Added uta.[ch] to the list of
sources.
* gnome-icon-item-factory.c (ii_factory_configure_item): Removed
obsolete x_set and y_set arguments from the pixbuf canvas item.
* *.[ch]: Use the gdk_pixbuf_get_*() accessor functions instead of
accessing the GdkPixbuf's fields directly.
* bonobo/bonobo-image-generic.c: Split embeddable:image-generic
into two different views, one which always scales the image to
available space, and one which always shows it at natural size and
provides scrollbars if necessary.
* bonobo/image-generic.gnorba (eog-image-viewer): new embeddable
type, also generated from embeddable-factory:image-generic.