CtkGestureRotate: CTK+ 3 Reference Manual

## CtkGestureRotate CtkGestureRotate — Rotate gesture |

## Functions

CtkGesture * | ctk_gesture_rotate_new ()
gdouble | ctk_gesture_rotate_get_angle_delta ()

## Signals

void | angle-changed | Run First

## Types and Values

| CtkGestureRotate

## Object Hierarchy

        GObject
        ╰── CtkEventController
            ╰── CtkGesture
                ╰── CtkGestureRotate

## Includes

    #include <ctk/ctk.h>

## Description

CtkGestureRotate is a CtkGesture implementation able to recognize 2-finger rotations, whenever the angle between both handled sequences changes, the “angle-changed” signal is emitted.

## Functions

### ctk_gesture_rotate_new ()

    CtkGesture *
    ctk_gesture_rotate_new (CtkWidget *widget);

Returns a newly created CtkGesture that recognizes 2-touch rotation gestures.

#### Parameters

widget | a CtkWidget |

#### Returns

a newly created CtkGestureRotate

Since: 3.14

### ctk_gesture_rotate_get_angle_delta ()

    gdouble
    ctk_gesture_rotate_get_angle_delta (CtkGestureRotate *gesture);

If `gesture` is active, this function returns the angle difference in radians since the gesture was first recognized. If `gesture` is not active, 0 is returned.

#### Parameters

gesture | a CtkGestureRotate |

#### Returns

the angle delta in radians

Since: 3.14

## Types and Values

### CtkGestureRotate

    typedef struct _CtkGestureRotate CtkGestureRotate;

## Signal Details

### The `“angle-changed”` signal

    void
    user_function (CtkGestureRotate *gesture,
                   double            angle,
                   double            angle_delta,
                   gpointer          user_data)

This signal is emitted when the angle between both tracked points changes.

#### Parameters

gesture | the object on which the signal is emitted |
angle | Current angle in radians |
angle_delta | Difference with the starting angle, in radians |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 3.14

## See Also

CtkGestureZoom