This zoom mode is handled pretty much the same as GIMP_ZOOM_SMOOTH
except that we do not apply adjustments for the scaling delta. Pinch
zooming is ultimately a different physical activity than smooth
scrolling and users likely expect different sensitivity.
`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, we should try to use
`g_object_notify_by_pspec()` instead.
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
- Fix gimp_scroll_adjustment_values() for smooth scroll events
- Set GDK_SMOOTH_SCROLL_MASK on all widgets where we set GDK_SCROLL_MASK
- Add GIMP_ZOOM_SMOOTH to enum GimpZoomType
- Add "gdouble delta" to gimp_zoom_model_step()
- Change the meaning of the "scale" parameter to "scale or delta" in
all functions that take GimpZoomType and a scale factor.
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
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
2006-01-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpintcombobox.[ch]
* libgimpwidgets/gimppageselector.[ch]
* libgimpwidgets/gimpzoommodel.[ch]: added a priv pointer to the
instance struct and changed the GET_PRIVATE() macro to access the
private data via that pointer.
* libgimpwidgets/gimpscrolledpreview.[ch]
* libgimpwidgets/gimpwidgets.def: added a priv pointer to the
instance struct and moved all private data to the
GimpScrolledPreviewPrivate struct. Added freeze/thaw methods so
that derived widgets can be implemented without accessing private
data.
* libgimp/gimpzoompreview.c: changed accordingly.
* libgimp/gimpfontselectbutton.[ch]: let the priv pointer be an
anonymous void pointer.
2005-11-21 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpzoommodel.c (gimp_zoom_button_new): connect
to the model's "zoomed" signal and set the button sensitivity.
* libgimpwidgets/gimpwidgetsmarshal.list: added VOID__DOUBLE_DOUBLE
marshaller.
* libgimpwidgets/gimpzoommodel.[ch]: new signal: "zoomed", emitted
when the zoom factor changes. This signal have the old factor and the
new factor as argument.
* libgimp/gimpzoompreview.c: use the "zoomed" signal instead of the
"notify::value" one. This allow to use the old and new factors to keep
the preview centered on the same point.
2005-09-28 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreview.[ch]: renamed newly added function to
gimp_preview_get_controls(). Increased row padding for controls.
* libgimpwidgets/gimpwidgets.def
* libgimp/gimpzoompreview.c: changed accordingly.
* libgimpbase/gimputils.c (gimp_enum_get_value): ref the enum
class instead of only peeking at it.
* libgimpwidgets/gimpzoommodel.c (gimp_zoom_button_new): set a
tooltip on zoom buttons that only show an icon.
2005-09-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpwidgetsenums.[ch]: removed GimpZoomWidgetType.
* libgimpwidgets/gimpzoommodel.[ch]: removed gimp_zoom_widget_new()
in favor of gimp_zoom_button_new().
* libgimp/gimpzoompreview.c: changed accordingly.
* libgimpwidgets/gimpwidgets.def: updated.
* plug-ins/MapObject/mapobject_main.[ch]
* plug-ins/MapObject/mapobject_preview.c
* plug-ins/MapObject/mapobject_ui.c: use a GimpZoomModel and let
it create the zoom buttons.
* plug-ins/MapObject/mapobject_apply.c
* plug-ins/MapObject/mapobject_image.c
* plug-ins/MapObject/mapobject_shade.c: include "gimp/gimpui.h".
2005-09-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpwidgets.def
* libgimpwidgets/gimpzoommodel.[ch]: added gimp_zoom_model_zoom()
and changed gimp_zoom_model_get_fraction() to take a model instead
of the zoom factor.
* app/display/gimpdisplayshell.[ch]: use a GimpZoomModel for the
display scale factor.
* app/actions/image-commands.c
* app/actions/view-actions.c
* app/actions/view-commands.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpnavigationeditor.c
* app/display/gimpstatusbar.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmagnifytool.c: changed accordingly.
2005-09-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpwidgetsenums.h: added more values to the
GimpZoomType enum.
* libgimpwidgets/gimpzoommodel.c (gimp_zoom_model_zoom_step):
handle the new enum values.
* app/actions/view-commands.c (view_zoom_cmd_callback) use the new
values.
* app/display/gimpdisplayshell.c (gimp_display_shell_new): cosmetics.
* libgimpwidgets/gimpwidgetsenums.h: remove the GIMP_ZOOM_LABEL value
from GimpZoomWidgetType.
* libgimpwidgets/gimpwidgetsenums.c: regenerated.
* libgimp/gimpzoompreview.c: provides two read only properties,
"fraction" and "percentage" to be used with prop widgets.
* libgimpwidgets/gimpzoommodel.c: use a gimp_prop_label to show the
zoom fraction.
* app/widgets/widgets-enums.h: Moved the GimpZoomType enum from here...
* libgimpwidgets/gimpwidgetsenums.h: ...to here.
* app/widgets/widgets-enums.c
* libgimpwidgets/gimpwidgetsenums.c: regenerated.
* app/display/gimpdisplayshell-scale.[ch]: removed
gimp_display_shell_scale_zoom_step and
gimp_display_shell_scale_get_fraction from here...
* libgimpwidgets/gimpzoommodel.[ch]: ... to here so we can use these
utility functions in plug-ins and in the core.
Also removed the step-size property since the zoom-model now use
gimp_zoom_model_zoom_step.
* app/actions/view-commands.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpdisplayshell.c
* app/tools/gimpmagnifytool.c: modified accordingly.
* libgimp/gimpzoompreview.c: don't pass any argument to the
gimp_zoom_model_new function.
* libgimpwidgets/gimpwidgets.def: added gimp_zoom_model_zoom_step
(gimp_zoom_model_get_fraction was already there)
* devel-docs/app/app-sections.txt: removed
gimp_display_shell_scale_zoom_step and
gimp_display_shell_scale_get_fraction.
* libgimpwidgets/gimpzoommodel.[ch]: use private data instead of
struct members. Added min-factor and max-factor properties so we can
set the zoom range. These can be set by a new utility function:
gimp_zoom_model_set_range.
* libgimpwidgets/gimpwidgets.def: added gimp_zoom_model_set_range.
* libgimp/gimpzoompreview.c: use gimp_zoom_model_set_range so we can
only zoom in.
* libgimpwidgets/gimpzoommodel.[ch]: New object to handle zoom
factor, and create widgets to control or view this value.
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets.h: Added gimpzoommodel.[ch].
* libgimpwidgets/gimpwidgetsenums.h: new enum: GimpZoomWidgetType.
This enumerate which knid of widget you can created from the zoom
model.
* libgimpwidgets/gimpwidgetsenums.c
* libgimpwidgets/gimpwidgetstypes.h: regenerated.
* libgimpwidgets/gimppreview.c: move the update toggle to the bottom
of the vbox.
* libgimp/Makefile.am
* libgimp/gimpui.h
* libgimp/gimpuitypes.h
* libgimp/gimpzoompreview.[ch]: New widget, derivated from
GimpScrolledPreview, which offer the same functionnalities as the
GimpAspectPreview widget plus zoom facilities.
* plug-ins/common/AlienMap2.c
* plug-ins/common/apply_lens.c
* plug-ins/common/blinds.c
* plug-ins/common/channel_mixer.c
* plug-ins/common/colorify.c
* plug-ins/common/flarefx.c
* plug-ins/common/illusion.c
* plug-ins/common/jigsaw.c
* plug-ins/common/mapcolor.c
* plug-ins/common/max_rgb.c
* plug-ins/common/nova.c
* plug-ins/common/polar.c
* plug-ins/common/retinex.c
* plug-ins/common/waves.c
* plug-ins/common/whirlpinch.c: use a GimpZoomPreview instead of a
GimpAspectPreview.