[mutter/wip/carlosg/sanitize-gestures: 83/92] clutter: Drop ClutterZoomGesture's zoom-axis property/methods
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/sanitize-gestures: 83/92] clutter: Drop ClutterZoomGesture's zoom-axis property/methods
- Date: Thu, 28 Oct 2021 22:10:19 +0000 (UTC)
commit a1bf019c0277eac495ff442fc1852aa51b0b7acd
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 18 17:36:12 2021 +0200
clutter: Drop ClutterZoomGesture's zoom-axis property/methods
This can be done on the caller, seems rarely useful if at all.
clutter/clutter/clutter-enums.h | 18 ------
clutter/clutter/clutter-zoom-action.c | 117 ----------------------------------
clutter/clutter/clutter-zoom-action.h | 6 --
3 files changed, 141 deletions(-)
---
diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h
index 89a886e9aa..a184d2d6fb 100644
--- a/clutter/clutter/clutter-enums.h
+++ b/clutter/clutter/clutter-enums.h
@@ -1429,24 +1429,6 @@ typedef enum
CLUTTER_STEP_MODE_END
} ClutterStepMode;
-/**
- * ClutterZoomAxis:
- * @CLUTTER_ZOOM_X_AXIS: Scale only on the X axis
- * @CLUTTER_ZOOM_Y_AXIS: Scale only on the Y axis
- * @CLUTTER_ZOOM_BOTH: Scale on both axis
- *
- * The axis of the constraint that should be applied by the
- * zooming action.
- *
- * Since: 1.12
- */
-typedef enum /*< prefix=CLUTTER_ZOOM >*/
-{
- CLUTTER_ZOOM_X_AXIS,
- CLUTTER_ZOOM_Y_AXIS,
- CLUTTER_ZOOM_BOTH
-} ClutterZoomAxis;
-
/**
* ClutterGestureTriggerEdge:
* @CLUTTER_GESTURE_TRIGGER_EDGE_NONE: Tell #ClutterGestureAction that
diff --git a/clutter/clutter/clutter-zoom-action.c b/clutter/clutter/clutter-zoom-action.c
index 2fa2fc3245..4e87e23302 100644
--- a/clutter/clutter/clutter-zoom-action.c
+++ b/clutter/clutter/clutter-zoom-action.c
@@ -76,8 +76,6 @@ struct _ClutterZoomActionPrivate
{
ClutterStage *stage;
- ClutterZoomAxis zoom_axis;
-
ZoomPoint points[2];
graphene_point_t initial_focal_point;
@@ -94,17 +92,6 @@ struct _ClutterZoomActionPrivate
gdouble zoom_initial_distance;
};
-enum
-{
- PROP_0,
-
- PROP_ZOOM_AXIS,
-
- PROP_LAST
-};
-
-static GParamSpec *zoom_props[PROP_LAST] = { NULL, };
-
enum
{
ZOOM,
@@ -235,44 +222,6 @@ clutter_zoom_action_gesture_cancel (ClutterGestureAction *action,
clutter_actor_set_scale (actor, priv->initial_scale_x, priv->initial_scale_y);
}
-static void
-clutter_zoom_action_set_property (GObject *gobject,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- ClutterZoomAction *action = CLUTTER_ZOOM_ACTION (gobject);
-
- switch (prop_id)
- {
- case PROP_ZOOM_AXIS:
- clutter_zoom_action_set_zoom_axis (action, g_value_get_enum (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
- }
-}
-
-static void
-clutter_zoom_action_get_property (GObject *gobject,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- ClutterZoomActionPrivate *priv = CLUTTER_ZOOM_ACTION (gobject)->priv;
-
- switch (prop_id)
- {
- case PROP_ZOOM_AXIS:
- g_value_set_enum (value, priv->zoom_axis);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
- }
-}
-
static void
clutter_zoom_action_dispose (GObject *gobject)
{
@@ -296,33 +245,12 @@ clutter_zoom_action_class_init (ClutterZoomActionClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->constructed = clutter_zoom_action_constructed;
- gobject_class->set_property = clutter_zoom_action_set_property;
- gobject_class->get_property = clutter_zoom_action_get_property;
gobject_class->dispose = clutter_zoom_action_dispose;
gesture_class->gesture_begin = clutter_zoom_action_gesture_begin;
gesture_class->gesture_progress = clutter_zoom_action_gesture_progress;
gesture_class->gesture_cancel = clutter_zoom_action_gesture_cancel;
- /**
- * ClutterZoomAction:zoom-axis:
- *
- * Constraints the zooming action to the specified axis
- *
- * Since: 1.12
- */
- zoom_props[PROP_ZOOM_AXIS] =
- g_param_spec_enum ("zoom-axis",
- P_("Zoom Axis"),
- P_("Constraints the zoom to an axis"),
- CLUTTER_TYPE_ZOOM_AXIS,
- CLUTTER_ZOOM_BOTH,
- CLUTTER_PARAM_READWRITE);
-
- g_object_class_install_properties (gobject_class,
- PROP_LAST,
- zoom_props);
-
/**
* ClutterZoomAction::zoom:
* @action: the #ClutterZoomAction that emitted the signal
@@ -362,7 +290,6 @@ clutter_zoom_action_init (ClutterZoomAction *self)
ClutterGestureAction *gesture;
self->priv = clutter_zoom_action_get_instance_private (self);
- self->priv->zoom_axis = CLUTTER_ZOOM_BOTH;
gesture = CLUTTER_GESTURE_ACTION (self);
clutter_gesture_action_set_n_touch_points (gesture, 2);
@@ -383,50 +310,6 @@ clutter_zoom_action_new (void)
return g_object_new (CLUTTER_TYPE_ZOOM_ACTION, NULL);
}
-/**
- * clutter_zoom_action_set_zoom_axis:
- * @action: a #ClutterZoomAction
- * @axis: the axis to constraint the zooming to
- *
- * Restricts the zooming action to a specific axis
- *
- * Since: 1.12
- */
-void
-clutter_zoom_action_set_zoom_axis (ClutterZoomAction *action,
- ClutterZoomAxis axis)
-{
- g_return_if_fail (CLUTTER_IS_ZOOM_ACTION (action));
- g_return_if_fail (axis >= CLUTTER_ZOOM_X_AXIS &&
- axis <= CLUTTER_ZOOM_BOTH);
-
- if (action->priv->zoom_axis == axis)
- return;
-
- action->priv->zoom_axis = axis;
-
- g_object_notify_by_pspec (G_OBJECT (action), zoom_props[PROP_ZOOM_AXIS]);
-}
-
-/**
- * clutter_zoom_action_get_zoom_axis:
- * @action: a #ClutterZoomAction
- *
- * Retrieves the axis constraint set by clutter_zoom_action_set_zoom_axis()
- *
- * Return value: the axis constraint
- *
- * Since: 1.12
- */
-ClutterZoomAxis
-clutter_zoom_action_get_zoom_axis (ClutterZoomAction *action)
-{
- g_return_val_if_fail (CLUTTER_IS_ZOOM_ACTION (action),
- CLUTTER_ZOOM_BOTH);
-
- return action->priv->zoom_axis;
-}
-
/**
* clutter_zoom_action_get_focal_point:
* @action: a #ClutterZoomAction
diff --git a/clutter/clutter/clutter-zoom-action.h b/clutter/clutter/clutter-zoom-action.h
index c838156aa6..7cd944d954 100644
--- a/clutter/clutter/clutter-zoom-action.h
+++ b/clutter/clutter/clutter-zoom-action.h
@@ -89,12 +89,6 @@ GType clutter_zoom_action_get_type (void) G_GNUC_CONST;
CLUTTER_EXPORT
ClutterAction * clutter_zoom_action_new (void);
-CLUTTER_EXPORT
-void clutter_zoom_action_set_zoom_axis (ClutterZoomAction *action,
- ClutterZoomAxis axis);
-CLUTTER_EXPORT
-ClutterZoomAxis clutter_zoom_action_get_zoom_axis (ClutterZoomAction *action);
-
CLUTTER_EXPORT
void clutter_zoom_action_get_focal_point (ClutterZoomAction *action,
graphene_point_t *point);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]