[mutter/wip/carlosg/sanitize-gestures: 80/92] clutter: Drop default "rotate" action in ClutterRotateAction




commit 318b4d3f5e603763f235f55a415a07e1becea244
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 18 16:42:34 2021 +0200

    clutter: Drop default "rotate" action in ClutterRotateAction
    
    Separate mechanism and effect, and let any ClutterRotateAction
    users apply any necessary transformations.

 clutter/clutter/clutter-rotate-action.c | 17 +----------------
 clutter/clutter/clutter-rotate-action.h |  6 ------
 2 files changed, 1 insertion(+), 22 deletions(-)
---
diff --git a/clutter/clutter/clutter-rotate-action.c b/clutter/clutter/clutter-rotate-action.c
index 7a21607d50..21b1981e28 100644
--- a/clutter/clutter/clutter-rotate-action.c
+++ b/clutter/clutter/clutter-rotate-action.c
@@ -63,18 +63,6 @@ static guint rotate_signals[LAST_SIGNAL] = { 0, };
 
 G_DEFINE_TYPE_WITH_PRIVATE (ClutterRotateAction, clutter_rotate_action, CLUTTER_TYPE_GESTURE_ACTION)
 
-static gboolean
-clutter_rotate_action_real_rotate (ClutterRotateAction *action,
-                                   ClutterActor        *actor,
-                                   gdouble              angle)
-{
-  clutter_actor_set_rotation_angle (actor,
-                                    CLUTTER_Z_AXIS,
-                                    action->priv->initial_rotation + angle);
-
-  return TRUE;
-}
-
 static gboolean
 clutter_rotate_action_gesture_begin (ClutterGestureAction  *action,
                                      ClutterActor          *actor)
@@ -187,8 +175,6 @@ clutter_rotate_action_class_init (ClutterRotateActionClass *klass)
   GObjectClass *object_class =
     G_OBJECT_CLASS (klass);
 
-  klass->rotate = clutter_rotate_action_real_rotate;
-
   object_class->constructed = clutter_rotate_action_constructed;
 
   gesture_class->gesture_begin = clutter_rotate_action_gesture_begin;
@@ -215,8 +201,7 @@ clutter_rotate_action_class_init (ClutterRotateActionClass *klass)
     g_signal_new (I_("rotate"),
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (ClutterRotateActionClass, rotate),
-                  _clutter_boolean_continue_accumulator, NULL,
+                  0, g_signal_accumulator_true_handled, NULL,
                   _clutter_marshal_BOOLEAN__OBJECT_DOUBLE,
                   G_TYPE_BOOLEAN, 2,
                   CLUTTER_TYPE_ACTOR,
diff --git a/clutter/clutter/clutter-rotate-action.h b/clutter/clutter/clutter-rotate-action.h
index faa240e6c8..f393a21c0a 100644
--- a/clutter/clutter/clutter-rotate-action.h
+++ b/clutter/clutter/clutter-rotate-action.h
@@ -74,12 +74,6 @@ struct _ClutterRotateActionClass
   /*< private >*/
   ClutterGestureActionClass parent_class;
 
-  /*< public >*/
-  gboolean (* rotate)  (ClutterRotateAction *action,
-                        ClutterActor        *actor,
-                        gdouble              angle);
-
-  /*< private >*/
   void (* _clutter_rotate_action1) (void);
   void (* _clutter_rotate_action2) (void);
   void (* _clutter_rotate_action3) (void);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]