[mutter/wip/carlosg/sanitize-gestures: 22/33] clutter: Drop default "zoom" action in ClutterZoomAction
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/sanitize-gestures: 22/33] clutter: Drop default "zoom" action in ClutterZoomAction
- Date: Sat, 16 Oct 2021 11:00:07 +0000 (UTC)
commit 6938038193827be26e314b6a960d4c861e4c8c52
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 18 16:45:21 2021 +0200
clutter: Drop default "zoom" action in ClutterZoomAction
Separate mechanism and effect, and let any ClutterZoomAction
users apply any necessary transformations.
clutter/clutter/clutter-zoom-action.c | 50 +----------------------------------
clutter/clutter/clutter-zoom-action.h | 7 -----
2 files changed, 1 insertion(+), 56 deletions(-)
---
diff --git a/clutter/clutter/clutter-zoom-action.c b/clutter/clutter/clutter-zoom-action.c
index c25b796889..2fa2fc3245 100644
--- a/clutter/clutter/clutter-zoom-action.c
+++ b/clutter/clutter/clutter-zoom-action.c
@@ -235,51 +235,6 @@ clutter_zoom_action_gesture_cancel (ClutterGestureAction *action,
clutter_actor_set_scale (actor, priv->initial_scale_x, priv->initial_scale_y);
}
-static gboolean
-clutter_zoom_action_real_zoom (ClutterZoomAction *action,
- ClutterActor *actor,
- graphene_point_t *focal_point,
- gdouble factor)
-{
- ClutterZoomActionPrivate *priv = action->priv;
- gfloat x, y, z;
- gdouble scale_x, scale_y;
- graphene_point3d_t out, in;
-
- in.x = priv->transformed_focal_point.x;
- in.y = priv->transformed_focal_point.y;
- in.z = 0;
-
- clutter_actor_apply_transform_to_point (actor, &in, &out);
-
- clutter_actor_get_scale (actor, &scale_x, &scale_y);
-
- switch (priv->zoom_axis)
- {
- case CLUTTER_ZOOM_BOTH:
- clutter_actor_set_scale (actor, factor, factor);
- break;
-
- case CLUTTER_ZOOM_X_AXIS:
- clutter_actor_set_scale (actor, factor, scale_y);
- break;
-
- case CLUTTER_ZOOM_Y_AXIS:
- clutter_actor_set_scale (actor, scale_x, factor);
- break;
-
- default:
- break;
- }
-
- x = priv->initial_x + priv->focal_point.x - priv->initial_focal_point.x;
- y = priv->initial_y + priv->focal_point.y - priv->initial_focal_point.y;
- clutter_actor_get_translation (actor, NULL, NULL, &z);
- clutter_actor_set_translation (actor, x, y, z);
-
- return TRUE;
-}
-
static void
clutter_zoom_action_set_property (GObject *gobject,
guint prop_id,
@@ -349,8 +304,6 @@ clutter_zoom_action_class_init (ClutterZoomActionClass *klass)
gesture_class->gesture_progress = clutter_zoom_action_gesture_progress;
gesture_class->gesture_cancel = clutter_zoom_action_gesture_cancel;
- klass->zoom = clutter_zoom_action_real_zoom;
-
/**
* ClutterZoomAction:zoom-axis:
*
@@ -395,8 +348,7 @@ clutter_zoom_action_class_init (ClutterZoomActionClass *klass)
g_signal_new (I_("zoom"),
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ClutterZoomActionClass, zoom),
- _clutter_boolean_continue_accumulator, NULL,
+ 0, g_signal_accumulator_true_handled, NULL,
_clutter_marshal_BOOLEAN__OBJECT_BOXED_DOUBLE,
G_TYPE_BOOLEAN, 3,
CLUTTER_TYPE_ACTOR,
diff --git a/clutter/clutter/clutter-zoom-action.h b/clutter/clutter/clutter-zoom-action.h
index f1f7e572d9..c838156aa6 100644
--- a/clutter/clutter/clutter-zoom-action.h
+++ b/clutter/clutter/clutter-zoom-action.h
@@ -76,13 +76,6 @@ struct _ClutterZoomActionClass
/*< private >*/
ClutterGestureActionClass parent_class;
- /*< public >*/
- gboolean (* zoom) (ClutterZoomAction *action,
- ClutterActor *actor,
- graphene_point_t *focal_point,
- gdouble factor);
-
- /*< private >*/
void (* _clutter_zoom_action1) (void);
void (* _clutter_zoom_action2) (void);
void (* _clutter_zoom_action3) (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]