GtkGestureZoom
GtkGestureZoom — Zoom gesture
Functions
GtkGesture * | gtk_gesture_zoom_new () |
gdouble | gtk_gesture_zoom_get_scale_delta () |
Signals
void | scale-changed | Run First |
Types and Values
Object Hierarchy
GObject ╰── GtkEventController ╰── GtkGesture ╰── GtkGestureZoom
Includes
#include <gtk/gtk.h>
Description
GtkGestureZoom is a GtkGesture implementation able to recognize pinch/zoom gestures, whenever the distance between both tracked sequences changes, the “scale-changed” signal is emitted to report the scale factor.
Functions
gtk_gesture_zoom_new ()
GtkGesture *
gtk_gesture_zoom_new (GtkWidget *widget
);
Returns a newly created GtkGesture that recognizes zoom in/out gestures (usually known as pinch/zoom).
Parameters
widget |
Returns
a newly created GtkGestureZoom
Since: 3.14
gtk_gesture_zoom_get_scale_delta ()
gdouble
gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture
);
If gesture
is active, this function returns the zooming difference since the gesture was recognized (hence the starting point is considered 1:1). If gesture
is not active, 1 is returned.
Parameters
gesture |
Returns
the scale delta
Since: 3.14
Types and Values
GtkGestureZoom
typedef struct _GtkGestureZoom GtkGestureZoom;
Signal Details
The “scale-changed”
signal
void user_function (GtkGestureZoom *controller, double scale, gpointer user_data)
This signal is emitted whenever the distance between both tracked sequences changes.
Parameters
controller | the object on which the signal is emitted | |
scale | Scale delta, taking the initial state as 1:1 | |
user_data | user data set when the signal handler was connected. |
Flags: Run First
Since: 3.14
See Also
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkGestureZoom.html