[libhandy] swipeable: Remove the now unused old API



commit 3f1abe46107b73e5e82cd45cb451b7d59309f828
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Jun 20 17:16:05 2020 +0500

    swipeable: Remove the now unused old API
    
    Now begin_swipe(), update_swipe() and end_swipe() can be removed.
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 debian/libhandy-1-0.symbols |   3 -
 src/hdy-swipe-tracker.c     |   3 -
 src/hdy-swipeable-private.h |   8 ---
 src/hdy-swipeable.c         | 162 --------------------------------------------
 src/hdy-swipeable.h         |  11 ---
 5 files changed, 187 deletions(-)
---
diff --git a/debian/libhandy-1-0.symbols b/debian/libhandy-1-0.symbols
index 0caba5fe..b2525229 100644
--- a/debian/libhandy-1-0.symbols
+++ b/debian/libhandy-1-0.symbols
@@ -330,9 +330,7 @@ libhandy-1.so.0 libhandy-1-0 #MINVER#
  hdy_swipe_tracker_set_enabled@LIBHANDY_1_0 0.0.11
  hdy_swipe_tracker_set_reversed@LIBHANDY_1_0 0.0.11
  hdy_swipe_tracker_shift_position@LIBHANDY_1_0 0.81.0
- hdy_swipeable_begin_swipe@LIBHANDY_1_0 0.0.12
  hdy_swipeable_emit_child_switched@LIBHANDY_1_0 0.82.0
- hdy_swipeable_end_swipe@LIBHANDY_1_0 0.0.12
  hdy_swipeable_get_cancel_progress@LIBHANDY_1_0 0.81.0
  hdy_swipeable_get_distance@LIBHANDY_1_0 0.81.0
  hdy_swipeable_get_progress@LIBHANDY_1_0 0.81.0
@@ -340,7 +338,6 @@ libhandy-1.so.0 libhandy-1-0 #MINVER#
  hdy_swipeable_get_snap_points@LIBHANDY_1_0 0.81.0
  hdy_swipeable_get_type@LIBHANDY_1_0 0.0.12
  hdy_swipeable_switch_child@LIBHANDY_1_0 0.0.12
- hdy_swipeable_update_swipe@LIBHANDY_1_0 0.0.12
  hdy_title_bar_get_selection_mode@LIBHANDY_1_0 0.0.3
  hdy_title_bar_get_type@LIBHANDY_1_0 0.0.3
  hdy_title_bar_new@LIBHANDY_1_0 0.0.3
diff --git a/src/hdy-swipe-tracker.c b/src/hdy-swipe-tracker.c
index 3d370d3e..e3110276 100644
--- a/src/hdy-swipe-tracker.c
+++ b/src/hdy-swipe-tracker.c
@@ -125,7 +125,6 @@ gesture_prepare (HdySwipeTracker        *self,
   if (self->state != HDY_SWIPE_TRACKER_STATE_NONE)
     return;
 
-  hdy_swipeable_begin_swipe (self->swipeable, direction, TRUE);
   hdy_swipe_tracker_emit_begin_swipe (self, direction, TRUE);
 
   self->initial_progress = hdy_swipeable_get_progress (self->swipeable);
@@ -176,7 +175,6 @@ gesture_update (HdySwipeTracker *self,
 
   self->progress = progress;
 
-  hdy_swipeable_update_swipe (self->swipeable, progress);
   hdy_swipe_tracker_emit_update_swipe (self, progress);
 
   self->prev_time = time;
@@ -252,7 +250,6 @@ gesture_end (HdySwipeTracker *self,
   if (self->progress != end_progress)
     duration = CLAMP (duration, MIN_ANIMATION_DURATION, MAX_ANIMATION_DURATION);
 
-  hdy_swipeable_end_swipe (self->swipeable, duration, end_progress);
   hdy_swipe_tracker_emit_end_swipe (self, duration, end_progress);
 
   if (self->cancelled)
diff --git a/src/hdy-swipeable-private.h b/src/hdy-swipeable-private.h
index 3df3e21e..e3c2c657 100644
--- a/src/hdy-swipeable-private.h
+++ b/src/hdy-swipeable-private.h
@@ -14,14 +14,6 @@ G_BEGIN_DECLS
 void hdy_swipeable_switch_child (HdySwipeable *self,
                                  guint         index,
                                  gint64        duration);
-void hdy_swipeable_begin_swipe  (HdySwipeable           *self,
-                                 HdyNavigationDirection  direction,
-                                 gboolean                direct);
-void hdy_swipeable_update_swipe (HdySwipeable *self,
-                                 gdouble       value);
-void hdy_swipeable_end_swipe    (HdySwipeable *self,
-                                 gint64        duration,
-                                 gdouble       to);
 
 void hdy_swipeable_emit_child_switched (HdySwipeable *self,
                                         guint         index,
diff --git a/src/hdy-swipeable.c b/src/hdy-swipeable.c
index a0fc284d..9909230d 100644
--- a/src/hdy-swipeable.c
+++ b/src/hdy-swipeable.c
@@ -26,9 +26,6 @@ G_DEFINE_INTERFACE (HdySwipeable, hdy_swipeable, GTK_TYPE_WIDGET)
 
 enum {
   SIGNAL_CHILD_SWITCHED,
-  SIGNAL_SWIPE_BEGAN,
-  SIGNAL_SWIPE_UPDATED,
-  SIGNAL_SWIPE_ENDED,
   SIGNAL_LAST_SIGNAL,
 };
 
@@ -60,71 +57,6 @@ hdy_swipeable_default_init (HdySwipeableInterface *iface)
                   G_TYPE_NONE,
                   2,
                   G_TYPE_UINT, G_TYPE_INT64);
-
-  /**
-   * HdySwipeable::swipe-began:
-   * @self: The #HdySwipeable instance
-   * @direction: The direction of the swipe, can be 1 or -1
-   *
-   * This signal is emitted when a possible swipe is detected. This is used by
-   * #HdySwipeGroup, applications should not connect to it.
-   * The @direction value can be used to restrict the swipe to a certain
-   * direction.
-   *
-   * This is used by #HdySwipeGroup, applications should not connect to it.
-   *
-   * Since: 1.0
-   */
-  signals[SIGNAL_SWIPE_BEGAN] =
-    g_signal_new ("swipe-began",
-                  G_TYPE_FROM_INTERFACE (iface),
-                  G_SIGNAL_RUN_FIRST,
-                  0,
-                  NULL, NULL, NULL,
-                  G_TYPE_NONE,
-                  1,
-                  HDY_TYPE_NAVIGATION_DIRECTION);
-
-  /**
-   * HdySwipeable::swipe-updated:
-   * @self: The #HdySwipeable instance
-   * @value: The current animation progress value
-   *
-   * This signal is emitted every time the progress value changes. This is used
-   * by #HdySwipeGroup, applications should not connect to it.
-   *
-   * Since: 1.0
-   */
-  signals[SIGNAL_SWIPE_UPDATED] =
-    g_signal_new ("swipe-updated",
-                  G_TYPE_FROM_INTERFACE (iface),
-                  G_SIGNAL_RUN_FIRST,
-                  0,
-                  NULL, NULL, NULL,
-                  G_TYPE_NONE,
-                  1,
-                  G_TYPE_DOUBLE);
-
-  /**
-   * HdySwipeable::swipe-ended:
-   * @self: The #HdySwipeable instance
-   * @duration: Snap-back animation duration in milliseconds
-   * @to: The progress value to animate to
-   *
-   * This signal is emitted as soon as the gesture has stopped. This is used by
-   * #HdySwipeGroup, applications should not connect to it.
-   *
-   * Since: 1.0
-   */
-  signals[SIGNAL_SWIPE_ENDED] =
-    g_signal_new ("swipe-ended",
-                  G_TYPE_FROM_INTERFACE (iface),
-                  G_SIGNAL_RUN_FIRST,
-                  0,
-                  NULL, NULL, NULL,
-                  G_TYPE_NONE,
-                  2,
-                  G_TYPE_INT64, G_TYPE_DOUBLE);
 }
 
 /**
@@ -152,100 +84,6 @@ hdy_swipeable_switch_child (HdySwipeable *self,
   (* iface->switch_child) (self, index, duration);
 }
 
-/**
- * hdy_swipeable_begin_swipe:
- * @self: a #HdySwipeable
- * @direction: The direction of the swipe
- * @direct: %TRUE if the swipe is directly triggered by a gesture,
- *   %FALSE if it's triggered via a #HdySwipeGroup
- *
- * The @direction value can be used to restrict the swipe to a certain direction.
- *
- * The @direct parameter can be used to have widgets that aren't swipeable, but
- * can still animate in sync with other widgets in a #HdySwipeGroup by only
- * applying restrictions if @direct is %TRUE.
- *
- * Since: 0.0.12
- */
-void
-hdy_swipeable_begin_swipe (HdySwipeable           *self,
-                           HdyNavigationDirection  direction,
-                           gboolean                direct)
-{
-  HdySwipeableInterface *iface;
-
-  g_return_if_fail (HDY_IS_SWIPEABLE (self));
-
-  iface = HDY_SWIPEABLE_GET_IFACE (self);
-  g_return_if_fail (iface->begin_swipe != NULL);
-
-  (* iface->begin_swipe) (self, direction, direct);
-
-  g_signal_emit (self, signals[SIGNAL_SWIPE_BEGAN], 0, direction);
-}
-
-/**
- * hdy_swipeable_update_swipe:
- * @self: a #HdySwipeable
- * @value: The current animation progress value
- *
- * This function is called by #HdySwipeTracker every time the progress value
- * changes. The widget must redraw the widget to reflect the change.
- *
- * Since: 0.0.12
- */
-void
-hdy_swipeable_update_swipe (HdySwipeable *self,
-                            gdouble       value)
-{
-  HdySwipeableInterface *iface;
-
-  g_return_if_fail (HDY_IS_SWIPEABLE (self));
-
-  iface = HDY_SWIPEABLE_GET_IFACE (self);
-  g_return_if_fail (iface->update_swipe != NULL);
-
-  (* iface->update_swipe) (self, value);
-
-  g_signal_emit (self, signals[SIGNAL_SWIPE_UPDATED], 0, value);
-}
-
-/**
- * hdy_swipeable_end_swipe:
- * @self: a #HdySwipeable
- * @duration: Snap-back animation duration in milliseconds
- * @to: The progress value to animate to
- *
- * This function is called by #HdySwipeTracker as soon as the gesture has
- * stopped. The widget must animate the progress from the current value to the
- * @to value with easeOutCubic interpolation over the next @duration
- * milliseconds.
- *
- * @to will always match either one of the provided snap points if the swipe was
- * completed successfully, or the cancel progress otherwise.
- *
- * @duration can be 0, in that case the widget must immediately set the
- * progress value to @to.
- *
- * Since: 0.0.12
- */
-void
-hdy_swipeable_end_swipe (HdySwipeable *self,
-                         gint64        duration,
-                         gdouble       to)
-{
-  HdySwipeableInterface *iface;
-
-  g_return_if_fail (HDY_IS_SWIPEABLE (self));
-
-  iface = HDY_SWIPEABLE_GET_IFACE (self);
-  g_return_if_fail (iface->end_swipe != NULL);
-
-  (* iface->end_swipe) (self, duration, to);
-
-  g_signal_emit (self, signals[SIGNAL_SWIPE_ENDED], 0, duration, to);
-}
-
 /**
  * hdy_swipeable_emit_child_switched:
  * @self: a #HdySwipeable
diff --git a/src/hdy-swipeable.h b/src/hdy-swipeable.h
index 16441354..cb7ee5b2 100644
--- a/src/hdy-swipeable.h
+++ b/src/hdy-swipeable.h
@@ -23,9 +23,6 @@ G_DECLARE_INTERFACE (HdySwipeable, hdy_swipeable, HDY, SWIPEABLE, GtkWidget)
  * HdySwipeableInterface:
  * @parent: The parent interface.
  * @switch_child: Switches visible child.
- * @begin_swipe: Starts a swipe gesture.
- * @update_swipe: Updates swipe progress value.
- * @end_swipe: Ends a swipe gesture.
  * @get_distance: Gets the swipe distance.
  * @get_range: Gets the range of progress values.
  * @get_snap_points: Gets the snap points
@@ -43,14 +40,6 @@ struct _HdySwipeableInterface
   void (*switch_child) (HdySwipeable *self,
                         guint         index,
                         gint64        duration);
-  void (*begin_swipe)  (HdySwipeable           *self,
-                        HdyNavigationDirection  direction,
-                        gboolean                direct);
-  void (*update_swipe) (HdySwipeable *self,
-                        gdouble       value);
-  void (*end_swipe)    (HdySwipeable *self,
-                        gint64        duration,
-                        gdouble       to);
 
   gdouble   (*get_distance)        (HdySwipeable *self);
   void      (*get_range)           (HdySwipeable *self,


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