[libadwaita/wip/exalm/animation-cleanups: 5/8] animation-util: Make adw_lerp() public




commit 8c19c4d83ab2ef54aa93fb7aaf8a7da72f6ef8ff
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Nov 22 19:17:08 2021 +0500

    animation-util: Make adw_lerp() public
    
    Now that animations are public, there isn't much reason to keep this
    private either.

 src/adw-animation-util-private.h  | 23 -----------------------
 src/adw-animation-util.c          |  4 ++--
 src/adw-animation-util.h          |  5 +++++
 src/adw-animation.c               |  3 ++-
 src/adw-carousel-indicator-dots.c |  2 +-
 src/adw-carousel.c                |  2 +-
 src/adw-flap.c                    |  2 +-
 src/adw-leaflet.c                 |  2 +-
 src/adw-preferences-window.c      |  2 +-
 src/adw-squeezer.c                |  2 +-
 src/adw-tab-box.c                 |  2 +-
 src/adw-tab.c                     |  1 -
 src/adw-timed-animation.c         |  2 +-
 src/adw-toast-overlay.c           |  2 +-
 src/adw-view-stack.c              |  3 +--
 15 files changed, 19 insertions(+), 38 deletions(-)
---
diff --git a/src/adw-animation-util.c b/src/adw-animation-util.c
index 65bb1097..e3fcea41 100644
--- a/src/adw-animation-util.c
+++ b/src/adw-animation-util.c
@@ -7,7 +7,7 @@
 
 #include "config.h"
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 
 /**
  * adw_lerp:
@@ -17,7 +17,7 @@
  *
  * Computes the linear interpolation between @a and @b for @t.
  *
- * Returns: the linear interpolation between @a and @b for @t
+ * Returns: the computed value
  *
  * Since: 1.0
  */
diff --git a/src/adw-animation-util.h b/src/adw-animation-util.h
index 02f5cf91..aaef9212 100644
--- a/src/adw-animation-util.h
+++ b/src/adw-animation-util.h
@@ -17,6 +17,11 @@
 
 G_BEGIN_DECLS
 
+ADW_AVAILABLE_IN_ALL
+double adw_lerp (double a,
+                 double b,
+                 double t);
+
 ADW_AVAILABLE_IN_ALL
 gboolean adw_get_enable_animations (GtkWidget *widget);
 
diff --git a/src/adw-animation.c b/src/adw-animation.c
index cd3dbb8e..fc5d91c2 100644
--- a/src/adw-animation.c
+++ b/src/adw-animation.c
@@ -8,8 +8,9 @@
 #include "config.h"
 
 #include "adw-animation-private.h"
+
 #include "adw-animation-target-private.h"
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 
 /**
  * AdwAnimation:
diff --git a/src/adw-carousel-indicator-dots.c b/src/adw-carousel-indicator-dots.c
index c4a4982a..d3bf2a5f 100644
--- a/src/adw-carousel-indicator-dots.c
+++ b/src/adw-carousel-indicator-dots.c
@@ -8,7 +8,7 @@
 
 #include "adw-carousel-indicator-dots.h"
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-macros-private.h"
 #include "adw-swipeable.h"
 #include "adw-timed-animation.h"
diff --git a/src/adw-carousel.c b/src/adw-carousel.c
index 6acea27f..fc09ba23 100644
--- a/src/adw-carousel.c
+++ b/src/adw-carousel.c
@@ -8,7 +8,7 @@
 
 #include "adw-carousel.h"
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-macros-private.h"
 #include "adw-navigation-direction.h"
 #include "adw-swipe-tracker.h"
diff --git a/src/adw-flap.c b/src/adw-flap.c
index 9e9b4993..4335dce1 100644
--- a/src/adw-flap.c
+++ b/src/adw-flap.c
@@ -10,7 +10,7 @@
 
 #include <math.h>
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-gizmo-private.h"
 #include "adw-macros-private.h"
 #include "adw-shadow-helper-private.h"
diff --git a/src/adw-leaflet.c b/src/adw-leaflet.c
index 36324258..fa999e44 100644
--- a/src/adw-leaflet.c
+++ b/src/adw-leaflet.c
@@ -8,7 +8,7 @@
 #include "config.h"
 
 #include "gtkprogresstrackerprivate.h"
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-enums-private.h"
 #include "adw-fold-threshold-policy.h"
 #include "adw-macros-private.h"
diff --git a/src/adw-preferences-window.c b/src/adw-preferences-window.c
index f99547d3..973e2072 100644
--- a/src/adw-preferences-window.c
+++ b/src/adw-preferences-window.c
@@ -9,7 +9,7 @@
 
 #include "adw-preferences-window.h"
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-action-row.h"
 #include "adw-leaflet.h"
 #include "adw-macros-private.h"
diff --git a/src/adw-squeezer.c b/src/adw-squeezer.c
index a7219e4a..bb343255 100644
--- a/src/adw-squeezer.c
+++ b/src/adw-squeezer.c
@@ -19,7 +19,7 @@
 #include "adw-squeezer.h"
 
 #include "gtkprogresstrackerprivate.h"
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-animation-private.h"
 #include "adw-macros-private.h"
 #include "adw-widget-utils-private.h"
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index 73b245c1..cce79abd 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -10,7 +10,7 @@
 
 #include "adw-tab-box-private.h"
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-easing.h"
 #include "adw-gizmo-private.h"
 #include "adw-macros-private.h"
diff --git a/src/adw-tab.c b/src/adw-tab.c
index a1c7076e..154a1930 100644
--- a/src/adw-tab.c
+++ b/src/adw-tab.c
@@ -9,7 +9,6 @@
 #include "config.h"
 #include "adw-tab-private.h"
 
-#include "adw-animation-util-private.h"
 #include "adw-bidi-private.h"
 #include "adw-fading-label-private.h"
 #include "adw-macros-private.h"
diff --git a/src/adw-timed-animation.c b/src/adw-timed-animation.c
index d4382bbb..96b7bd94 100644
--- a/src/adw-timed-animation.c
+++ b/src/adw-timed-animation.c
@@ -9,7 +9,7 @@
 #include "adw-timed-animation.h"
 
 #include "adw-animation-private.h"
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 
 /**
  * AdwTimedAnimation:
diff --git a/src/adw-toast-overlay.c b/src/adw-toast-overlay.c
index 162717e6..9ba7f0f1 100644
--- a/src/adw-toast-overlay.c
+++ b/src/adw-toast-overlay.c
@@ -8,7 +8,7 @@
 
 #include "adw-toast-overlay.h"
 
-#include "adw-animation-util-private.h"
+#include "adw-animation-util.h"
 #include "adw-easing.h"
 #include "adw-macros-private.h"
 #include "adw-timed-animation.h"
diff --git a/src/adw-view-stack.c b/src/adw-view-stack.c
index 368c58e8..b852ea5a 100644
--- a/src/adw-view-stack.c
+++ b/src/adw-view-stack.c
@@ -15,8 +15,7 @@
 #include "adw-view-stack.h"
 
 #include "gtkprogresstrackerprivate.h"
-#include "adw-animation-util-private.h"
-#include "adw-enums.h"
+#include "adw-animation-util.h"
 #include "adw-gizmo-private.h"
 #include "adw-macros-private.h"
 #include "adw-widget-utils-private.h"


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