[libhandy/swipe-tracker-public: 15/16] swipe-tracker: Make public



commit c7cbcc948ff92cd144548d3ab28219f7940bc5e9
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Jun 15 01:41:24 2020 +0500

    swipe-tracker: Make public
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 doc/handy-docs.xml      |  1 +
 doc/meson.build         |  1 -
 src/handy.h             |  1 +
 src/hdy-carousel.c      |  2 +-
 src/hdy-stackable-box.c |  2 +-
 src/hdy-swipe-tracker.c |  2 +-
 src/hdy-swipe-tracker.h | 39 +++++++++++++++++++++++++++++++++++++++
 src/meson.build         |  1 +
 8 files changed, 45 insertions(+), 4 deletions(-)
---
diff --git a/doc/handy-docs.xml b/doc/handy-docs.xml
index 6cfe9e31..c719c4ad 100644
--- a/doc/handy-docs.xml
+++ b/doc/handy-docs.xml
@@ -58,6 +58,7 @@
     <xi:include href="xml/hdy-squeezer.xml"/>
     <xi:include href="xml/hdy-swipeable.xml"/>
     <xi:include href="xml/hdy-swipe-group.xml"/>
+    <xi:include href="xml/hdy-swipe-tracker.xml"/>
     <xi:include href="xml/hdy-title-bar.xml"/>
     <xi:include href="xml/hdy-value-object.xml"/>
     <xi:include href="xml/hdy-view-switcher.xml"/>
diff --git a/doc/meson.build b/doc/meson.build
index 5d58727c..defe2420 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -16,7 +16,6 @@ private_headers = [
     'hdy-preferences-page-private.h',
     'hdy-shadow-helper-private.h',
     'hdy-stackable-box-private.h',
-    'hdy-swipe-tracker-private.h',
     'hdy-view-switcher-button-private.h',
     'hdy-window-handle-controller-private.h',
     'hdy-window-mixin-private.h',
diff --git a/src/handy.h b/src/handy.h
index 4bbf102e..fa9045b9 100644
--- a/src/handy.h
+++ b/src/handy.h
@@ -48,6 +48,7 @@ G_BEGIN_DECLS
 #include "hdy-search-bar.h"
 #include "hdy-squeezer.h"
 #include "hdy-swipe-group.h"
+#include "hdy-swipe-tracker.h"
 #include "hdy-swipeable.h"
 #include "hdy-title-bar.h"
 #include "hdy-value-object.h"
diff --git a/src/hdy-carousel.c b/src/hdy-carousel.c
index cb8758d6..d1a58b24 100644
--- a/src/hdy-carousel.c
+++ b/src/hdy-carousel.c
@@ -12,7 +12,7 @@
 #include "hdy-animation-private.h"
 #include "hdy-carousel-box-private.h"
 #include "hdy-navigation-direction.h"
-#include "hdy-swipe-tracker-private.h"
+#include "hdy-swipe-tracker.h"
 #include "hdy-swipeable.h"
 
 #include <math.h>
diff --git a/src/hdy-stackable-box.c b/src/hdy-stackable-box.c
index b5552f9a..64609073 100644
--- a/src/hdy-stackable-box.c
+++ b/src/hdy-stackable-box.c
@@ -15,7 +15,7 @@
 #include "hdy-stackable-box-private.h"
 #include "hdy-shadow-helper-private.h"
 #include "hdy-swipeable.h"
-#include "hdy-swipe-tracker-private.h"
+#include "hdy-swipe-tracker.h"
 
 /**
  * PRIVATE:hdy-stackable-box
diff --git a/src/hdy-swipe-tracker.c b/src/hdy-swipe-tracker.c
index 2efc2199..f7a5ec61 100644
--- a/src/hdy-swipe-tracker.c
+++ b/src/hdy-swipe-tracker.c
@@ -8,7 +8,7 @@
 #include <glib/gi18n-lib.h>
 
 #include "hdy-leaflet.h"
-#include "hdy-swipe-tracker-private.h"
+#include "hdy-swipe-tracker.h"
 #include "hdy-navigation-direction.h"
 
 #include <math.h>
diff --git a/src/hdy-swipe-tracker.h b/src/hdy-swipe-tracker.h
new file mode 100644
index 00000000..32c5bc7f
--- /dev/null
+++ b/src/hdy-swipe-tracker.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2019 Alexander Mikhaylenko <exalm7659 gmail com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1+
+ */
+
+#pragma once
+
+#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
+#error "Only <handy.h> can be included directly."
+#endif
+
+#include <gtk/gtk.h>
+#include "hdy-swipeable.h"
+
+G_BEGIN_DECLS
+
+#define HDY_TYPE_SWIPE_TRACKER (hdy_swipe_tracker_get_type())
+
+G_DECLARE_FINAL_TYPE (HdySwipeTracker, hdy_swipe_tracker, HDY, SWIPE_TRACKER, GObject)
+
+HdySwipeTracker *hdy_swipe_tracker_new (HdySwipeable *swipeable);
+
+gboolean         hdy_swipe_tracker_get_enabled (HdySwipeTracker *self);
+void             hdy_swipe_tracker_set_enabled (HdySwipeTracker *self,
+                                                gboolean         enabled);
+
+gboolean         hdy_swipe_tracker_get_reversed (HdySwipeTracker *self);
+void             hdy_swipe_tracker_set_reversed (HdySwipeTracker *self,
+                                                 gboolean         reversed);
+
+gboolean         hdy_swipe_tracker_get_allow_mouse_drag (HdySwipeTracker *self);
+void             hdy_swipe_tracker_set_allow_mouse_drag (HdySwipeTracker *self,
+                                                         gboolean         allow_mouse_drag);
+
+void             hdy_swipe_tracker_shift_position (HdySwipeTracker *self,
+                                                   gdouble          delta);
+
+G_END_DECLS
diff --git a/src/meson.build b/src/meson.build
index b73091c8..267ac1cd 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -88,6 +88,7 @@ src_headers = [
   'hdy-search-bar.h',
   'hdy-squeezer.h',
   'hdy-swipe-group.h',
+  'hdy-swipe-tracker.h',
   'hdy-swipeable.h',
   'hdy-title-bar.h',
   'hdy-value-object.h',


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