{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Swipe tracker used in [class/@carousel@/] and [class/@leaflet@/].
-- 
-- The @HdySwipeTracker@ object can be used for implementing widgets with swipe
-- gestures. It supports touch-based swipes, pointer dragging, and touchpad
-- scrolling.
-- 
-- The widgets will probably want to expose [property/@swipeTracker@/:enabled]
-- property. If they expect to use horizontal orientation,
-- [property/@swipeTracker@/:reversed] property can be used for supporting RTL text
-- direction.
-- 
-- /Since: 1.0/

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Handy.Objects.SwipeTracker
    ( 

-- * Exported types
    SwipeTracker(..)                        ,
    IsSwipeTracker                          ,
    toSwipeTracker                          ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [shiftPosition]("GI.Handy.Objects.SwipeTracker#g:method:shiftPosition"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAllowLongSwipes]("GI.Handy.Objects.SwipeTracker#g:method:getAllowLongSwipes"), [getAllowMouseDrag]("GI.Handy.Objects.SwipeTracker#g:method:getAllowMouseDrag"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getEnabled]("GI.Handy.Objects.SwipeTracker#g:method:getEnabled"), [getOrientation]("GI.Gtk.Interfaces.Orientable#g:method:getOrientation"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getReversed]("GI.Handy.Objects.SwipeTracker#g:method:getReversed"), [getSwipeable]("GI.Handy.Objects.SwipeTracker#g:method:getSwipeable").
-- 
-- ==== Setters
-- [setAllowLongSwipes]("GI.Handy.Objects.SwipeTracker#g:method:setAllowLongSwipes"), [setAllowMouseDrag]("GI.Handy.Objects.SwipeTracker#g:method:setAllowMouseDrag"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setEnabled]("GI.Handy.Objects.SwipeTracker#g:method:setEnabled"), [setOrientation]("GI.Gtk.Interfaces.Orientable#g:method:setOrientation"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setReversed]("GI.Handy.Objects.SwipeTracker#g:method:setReversed").

#if defined(ENABLE_OVERLOADING)
    ResolveSwipeTrackerMethod               ,
#endif

-- ** getAllowLongSwipes #method:getAllowLongSwipes#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerGetAllowLongSwipesMethodInfo,
#endif
    swipeTrackerGetAllowLongSwipes          ,


-- ** getAllowMouseDrag #method:getAllowMouseDrag#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerGetAllowMouseDragMethodInfo ,
#endif
    swipeTrackerGetAllowMouseDrag           ,


-- ** getEnabled #method:getEnabled#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerGetEnabledMethodInfo        ,
#endif
    swipeTrackerGetEnabled                  ,


-- ** getReversed #method:getReversed#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerGetReversedMethodInfo       ,
#endif
    swipeTrackerGetReversed                 ,


-- ** getSwipeable #method:getSwipeable#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerGetSwipeableMethodInfo      ,
#endif
    swipeTrackerGetSwipeable                ,


-- ** new #method:new#

    swipeTrackerNew                         ,


-- ** setAllowLongSwipes #method:setAllowLongSwipes#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerSetAllowLongSwipesMethodInfo,
#endif
    swipeTrackerSetAllowLongSwipes          ,


-- ** setAllowMouseDrag #method:setAllowMouseDrag#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerSetAllowMouseDragMethodInfo ,
#endif
    swipeTrackerSetAllowMouseDrag           ,


-- ** setEnabled #method:setEnabled#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerSetEnabledMethodInfo        ,
#endif
    swipeTrackerSetEnabled                  ,


-- ** setReversed #method:setReversed#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerSetReversedMethodInfo       ,
#endif
    swipeTrackerSetReversed                 ,


-- ** shiftPosition #method:shiftPosition#

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerShiftPositionMethodInfo     ,
#endif
    swipeTrackerShiftPosition               ,




 -- * Properties


-- ** allowLongSwipes #attr:allowLongSwipes#
-- | Whether to allow swiping for more than one snap point at a time.
-- 
-- If the value is @FALSE@, each swipe can only move to the adjacent snap
-- points.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerAllowLongSwipesPropertyInfo ,
#endif
    constructSwipeTrackerAllowLongSwipes    ,
    getSwipeTrackerAllowLongSwipes          ,
    setSwipeTrackerAllowLongSwipes          ,
#if defined(ENABLE_OVERLOADING)
    swipeTrackerAllowLongSwipes             ,
#endif


-- ** allowMouseDrag #attr:allowMouseDrag#
-- | Whether to allow dragging with mouse pointer.
-- 
-- This should usually be @FALSE@.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerAllowMouseDragPropertyInfo  ,
#endif
    constructSwipeTrackerAllowMouseDrag     ,
    getSwipeTrackerAllowMouseDrag           ,
    setSwipeTrackerAllowMouseDrag           ,
#if defined(ENABLE_OVERLOADING)
    swipeTrackerAllowMouseDrag              ,
#endif


-- ** enabled #attr:enabled#
-- | Whether the swipe tracker is enabled.
-- 
-- When it\'s not enabled, no events will be processed. Usually widgets will
-- want to expose this via a property.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerEnabledPropertyInfo         ,
#endif
    constructSwipeTrackerEnabled            ,
    getSwipeTrackerEnabled                  ,
    setSwipeTrackerEnabled                  ,
#if defined(ENABLE_OVERLOADING)
    swipeTrackerEnabled                     ,
#endif


-- ** reversed #attr:reversed#
-- | Whether to reverse the swipe direction.
-- 
-- If the swipe tracker is horizontal, it can be used for supporting RTL text
-- direction.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerReversedPropertyInfo        ,
#endif
    constructSwipeTrackerReversed           ,
    getSwipeTrackerReversed                 ,
    setSwipeTrackerReversed                 ,
#if defined(ENABLE_OVERLOADING)
    swipeTrackerReversed                    ,
#endif


-- ** swipeable #attr:swipeable#
-- | The widget the swipe tracker is attached to. Must not be @NULL@.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    SwipeTrackerSwipeablePropertyInfo       ,
#endif
    constructSwipeTrackerSwipeable          ,
    getSwipeTrackerSwipeable                ,
#if defined(ENABLE_OVERLOADING)
    swipeTrackerSwipeable                   ,
#endif




 -- * Signals


-- ** beginSwipe #signal:beginSwipe#

    SwipeTrackerBeginSwipeCallback          ,
#if defined(ENABLE_OVERLOADING)
    SwipeTrackerBeginSwipeSignalInfo        ,
#endif
    afterSwipeTrackerBeginSwipe             ,
    onSwipeTrackerBeginSwipe                ,


-- ** endSwipe #signal:endSwipe#

    SwipeTrackerEndSwipeCallback            ,
#if defined(ENABLE_OVERLOADING)
    SwipeTrackerEndSwipeSignalInfo          ,
#endif
    afterSwipeTrackerEndSwipe               ,
    onSwipeTrackerEndSwipe                  ,


-- ** updateSwipe #signal:updateSwipe#

    SwipeTrackerUpdateSwipeCallback         ,
#if defined(ENABLE_OVERLOADING)
    SwipeTrackerUpdateSwipeSignalInfo       ,
#endif
    afterSwipeTrackerUpdateSwipe            ,
    onSwipeTrackerUpdateSwipe               ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Interfaces.Orientable as Gtk.Orientable
import {-# SOURCE #-} qualified GI.Handy.Enums as Handy.Enums
import {-# SOURCE #-} qualified GI.Handy.Interfaces.Swipeable as Handy.Swipeable

-- | Memory-managed wrapper type.
newtype SwipeTracker = SwipeTracker (SP.ManagedPtr SwipeTracker)
    deriving (SwipeTracker -> SwipeTracker -> Bool
(SwipeTracker -> SwipeTracker -> Bool)
-> (SwipeTracker -> SwipeTracker -> Bool) -> Eq SwipeTracker
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SwipeTracker -> SwipeTracker -> Bool
== :: SwipeTracker -> SwipeTracker -> Bool
$c/= :: SwipeTracker -> SwipeTracker -> Bool
/= :: SwipeTracker -> SwipeTracker -> Bool
Eq)

instance SP.ManagedPtrNewtype SwipeTracker where
    toManagedPtr :: SwipeTracker -> ManagedPtr SwipeTracker
toManagedPtr (SwipeTracker ManagedPtr SwipeTracker
p) = ManagedPtr SwipeTracker
p

foreign import ccall "hdy_swipe_tracker_get_type"
    c_hdy_swipe_tracker_get_type :: IO B.Types.GType

instance B.Types.TypedObject SwipeTracker where
    glibType :: IO GType
glibType = IO GType
c_hdy_swipe_tracker_get_type

instance B.Types.GObject SwipeTracker

-- | Type class for types which can be safely cast to `SwipeTracker`, for instance with `toSwipeTracker`.
class (SP.GObject o, O.IsDescendantOf SwipeTracker o) => IsSwipeTracker o
instance (SP.GObject o, O.IsDescendantOf SwipeTracker o) => IsSwipeTracker o

instance O.HasParentTypes SwipeTracker
type instance O.ParentTypes SwipeTracker = '[GObject.Object.Object, Gtk.Orientable.Orientable]

-- | Cast to `SwipeTracker`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toSwipeTracker :: (MIO.MonadIO m, IsSwipeTracker o) => o -> m SwipeTracker
toSwipeTracker :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> m SwipeTracker
toSwipeTracker = IO SwipeTracker -> m SwipeTracker
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SwipeTracker -> m SwipeTracker)
-> (o -> IO SwipeTracker) -> o -> m SwipeTracker
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SwipeTracker -> SwipeTracker) -> o -> IO SwipeTracker
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr SwipeTracker -> SwipeTracker
SwipeTracker

-- | Convert 'SwipeTracker' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe SwipeTracker) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_hdy_swipe_tracker_get_type
    gvalueSet_ :: Ptr GValue -> Maybe SwipeTracker -> IO ()
gvalueSet_ Ptr GValue
gv Maybe SwipeTracker
P.Nothing = Ptr GValue -> Ptr SwipeTracker -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr SwipeTracker
forall a. Ptr a
FP.nullPtr :: FP.Ptr SwipeTracker)
    gvalueSet_ Ptr GValue
gv (P.Just SwipeTracker
obj) = SwipeTracker -> (Ptr SwipeTracker -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SwipeTracker
obj (Ptr GValue -> Ptr SwipeTracker -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe SwipeTracker)
gvalueGet_ Ptr GValue
gv = do
        Ptr SwipeTracker
ptr <- Ptr GValue -> IO (Ptr SwipeTracker)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr SwipeTracker)
        if Ptr SwipeTracker
ptr Ptr SwipeTracker -> Ptr SwipeTracker -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr SwipeTracker
forall a. Ptr a
FP.nullPtr
        then SwipeTracker -> Maybe SwipeTracker
forall a. a -> Maybe a
P.Just (SwipeTracker -> Maybe SwipeTracker)
-> IO SwipeTracker -> IO (Maybe SwipeTracker)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr SwipeTracker -> SwipeTracker)
-> Ptr SwipeTracker -> IO SwipeTracker
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr SwipeTracker -> SwipeTracker
SwipeTracker Ptr SwipeTracker
ptr
        else Maybe SwipeTracker -> IO (Maybe SwipeTracker)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SwipeTracker
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveSwipeTrackerMethod (t :: Symbol) (o :: *) :: * where
    ResolveSwipeTrackerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveSwipeTrackerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveSwipeTrackerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveSwipeTrackerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveSwipeTrackerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveSwipeTrackerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveSwipeTrackerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveSwipeTrackerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveSwipeTrackerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveSwipeTrackerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveSwipeTrackerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveSwipeTrackerMethod "shiftPosition" o = SwipeTrackerShiftPositionMethodInfo
    ResolveSwipeTrackerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveSwipeTrackerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveSwipeTrackerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveSwipeTrackerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveSwipeTrackerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveSwipeTrackerMethod "getAllowLongSwipes" o = SwipeTrackerGetAllowLongSwipesMethodInfo
    ResolveSwipeTrackerMethod "getAllowMouseDrag" o = SwipeTrackerGetAllowMouseDragMethodInfo
    ResolveSwipeTrackerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveSwipeTrackerMethod "getEnabled" o = SwipeTrackerGetEnabledMethodInfo
    ResolveSwipeTrackerMethod "getOrientation" o = Gtk.Orientable.OrientableGetOrientationMethodInfo
    ResolveSwipeTrackerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveSwipeTrackerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveSwipeTrackerMethod "getReversed" o = SwipeTrackerGetReversedMethodInfo
    ResolveSwipeTrackerMethod "getSwipeable" o = SwipeTrackerGetSwipeableMethodInfo
    ResolveSwipeTrackerMethod "setAllowLongSwipes" o = SwipeTrackerSetAllowLongSwipesMethodInfo
    ResolveSwipeTrackerMethod "setAllowMouseDrag" o = SwipeTrackerSetAllowMouseDragMethodInfo
    ResolveSwipeTrackerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveSwipeTrackerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveSwipeTrackerMethod "setEnabled" o = SwipeTrackerSetEnabledMethodInfo
    ResolveSwipeTrackerMethod "setOrientation" o = Gtk.Orientable.OrientableSetOrientationMethodInfo
    ResolveSwipeTrackerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveSwipeTrackerMethod "setReversed" o = SwipeTrackerSetReversedMethodInfo
    ResolveSwipeTrackerMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveSwipeTrackerMethod t SwipeTracker, O.OverloadedMethod info SwipeTracker p) => OL.IsLabel t (SwipeTracker -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveSwipeTrackerMethod t SwipeTracker, O.OverloadedMethod info SwipeTracker p, R.HasField t SwipeTracker p) => R.HasField t SwipeTracker p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveSwipeTrackerMethod t SwipeTracker, O.OverloadedMethodInfo info SwipeTracker) => OL.IsLabel t (O.MethodProxy info SwipeTracker) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal SwipeTracker::begin-swipe
-- | This signal is emitted when a possible swipe is detected.
-- 
-- The /@direction@/ value can be used to restrict the swipe to a certain
-- direction.
-- 
-- /Since: 1.0/
type SwipeTrackerBeginSwipeCallback =
    Handy.Enums.NavigationDirection
    -- ^ /@direction@/: the direction of the swipe
    -> Bool
    -- ^ /@direct@/: @TRUE@ if the swipe is directly triggered by a gesture,
    --   @FALSE@ if it\'s triggered via a [class/@swipeGroup@/]
    -> IO ()

type C_SwipeTrackerBeginSwipeCallback =
    Ptr SwipeTracker ->                     -- object
    CUInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_SwipeTrackerBeginSwipeCallback`.
foreign import ccall "wrapper"
    mk_SwipeTrackerBeginSwipeCallback :: C_SwipeTrackerBeginSwipeCallback -> IO (FunPtr C_SwipeTrackerBeginSwipeCallback)

wrap_SwipeTrackerBeginSwipeCallback :: 
    GObject a => (a -> SwipeTrackerBeginSwipeCallback) ->
    C_SwipeTrackerBeginSwipeCallback
wrap_SwipeTrackerBeginSwipeCallback :: forall a.
GObject a =>
(a -> SwipeTrackerBeginSwipeCallback)
-> C_SwipeTrackerBeginSwipeCallback
wrap_SwipeTrackerBeginSwipeCallback a -> SwipeTrackerBeginSwipeCallback
gi'cb Ptr SwipeTracker
gi'selfPtr CUInt
direction CInt
direct Ptr ()
_ = do
    let direction' :: NavigationDirection
direction' = (Int -> NavigationDirection
forall a. Enum a => Int -> a
toEnum (Int -> NavigationDirection)
-> (CUInt -> Int) -> CUInt -> NavigationDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction
    let direct' :: Bool
direct' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
direct
    Ptr SwipeTracker -> (SwipeTracker -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr SwipeTracker
gi'selfPtr ((SwipeTracker -> IO ()) -> IO ())
-> (SwipeTracker -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SwipeTracker
gi'self -> a -> SwipeTrackerBeginSwipeCallback
gi'cb (SwipeTracker -> a
forall a b. Coercible a b => a -> b
Coerce.coerce SwipeTracker
gi'self)  NavigationDirection
direction' Bool
direct'


-- | Connect a signal handler for the [beginSwipe](#signal:beginSwipe) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' swipeTracker #beginSwipe callback
-- @
-- 
-- 
onSwipeTrackerBeginSwipe :: (IsSwipeTracker a, MonadIO m) => a -> ((?self :: a) => SwipeTrackerBeginSwipeCallback) -> m SignalHandlerId
onSwipeTrackerBeginSwipe :: forall a (m :: * -> *).
(IsSwipeTracker a, MonadIO m) =>
a
-> ((?self::a) => SwipeTrackerBeginSwipeCallback)
-> m SignalHandlerId
onSwipeTrackerBeginSwipe a
obj (?self::a) => SwipeTrackerBeginSwipeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> SwipeTrackerBeginSwipeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SwipeTrackerBeginSwipeCallback
SwipeTrackerBeginSwipeCallback
cb
    let wrapped' :: C_SwipeTrackerBeginSwipeCallback
wrapped' = (a -> SwipeTrackerBeginSwipeCallback)
-> C_SwipeTrackerBeginSwipeCallback
forall a.
GObject a =>
(a -> SwipeTrackerBeginSwipeCallback)
-> C_SwipeTrackerBeginSwipeCallback
wrap_SwipeTrackerBeginSwipeCallback a -> SwipeTrackerBeginSwipeCallback
wrapped
    FunPtr C_SwipeTrackerBeginSwipeCallback
wrapped'' <- C_SwipeTrackerBeginSwipeCallback
-> IO (FunPtr C_SwipeTrackerBeginSwipeCallback)
mk_SwipeTrackerBeginSwipeCallback C_SwipeTrackerBeginSwipeCallback
wrapped'
    a
-> Text
-> FunPtr C_SwipeTrackerBeginSwipeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"begin-swipe" FunPtr C_SwipeTrackerBeginSwipeCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [beginSwipe](#signal:beginSwipe) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' swipeTracker #beginSwipe callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterSwipeTrackerBeginSwipe :: (IsSwipeTracker a, MonadIO m) => a -> ((?self :: a) => SwipeTrackerBeginSwipeCallback) -> m SignalHandlerId
afterSwipeTrackerBeginSwipe :: forall a (m :: * -> *).
(IsSwipeTracker a, MonadIO m) =>
a
-> ((?self::a) => SwipeTrackerBeginSwipeCallback)
-> m SignalHandlerId
afterSwipeTrackerBeginSwipe a
obj (?self::a) => SwipeTrackerBeginSwipeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> SwipeTrackerBeginSwipeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SwipeTrackerBeginSwipeCallback
SwipeTrackerBeginSwipeCallback
cb
    let wrapped' :: C_SwipeTrackerBeginSwipeCallback
wrapped' = (a -> SwipeTrackerBeginSwipeCallback)
-> C_SwipeTrackerBeginSwipeCallback
forall a.
GObject a =>
(a -> SwipeTrackerBeginSwipeCallback)
-> C_SwipeTrackerBeginSwipeCallback
wrap_SwipeTrackerBeginSwipeCallback a -> SwipeTrackerBeginSwipeCallback
wrapped
    FunPtr C_SwipeTrackerBeginSwipeCallback
wrapped'' <- C_SwipeTrackerBeginSwipeCallback
-> IO (FunPtr C_SwipeTrackerBeginSwipeCallback)
mk_SwipeTrackerBeginSwipeCallback C_SwipeTrackerBeginSwipeCallback
wrapped'
    a
-> Text
-> FunPtr C_SwipeTrackerBeginSwipeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"begin-swipe" FunPtr C_SwipeTrackerBeginSwipeCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data SwipeTrackerBeginSwipeSignalInfo
instance SignalInfo SwipeTrackerBeginSwipeSignalInfo where
    type HaskellCallbackType SwipeTrackerBeginSwipeSignalInfo = SwipeTrackerBeginSwipeCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_SwipeTrackerBeginSwipeCallback cb
        cb'' <- mk_SwipeTrackerBeginSwipeCallback cb'
        connectSignalFunPtr obj "begin-swipe" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker::begin-swipe"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:signal:beginSwipe"})

#endif

-- signal SwipeTracker::end-swipe
-- | This signal is emitted as soon as the gesture has stopped.
-- 
-- /Since: 1.0/
type SwipeTrackerEndSwipeCallback =
    Int64
    -- ^ /@duration@/: snap-back animation duration, in milliseconds
    -> Double
    -- ^ /@to@/: the progress value to animate to
    -> IO ()

type C_SwipeTrackerEndSwipeCallback =
    Ptr SwipeTracker ->                     -- object
    Int64 ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_SwipeTrackerEndSwipeCallback`.
foreign import ccall "wrapper"
    mk_SwipeTrackerEndSwipeCallback :: C_SwipeTrackerEndSwipeCallback -> IO (FunPtr C_SwipeTrackerEndSwipeCallback)

wrap_SwipeTrackerEndSwipeCallback :: 
    GObject a => (a -> SwipeTrackerEndSwipeCallback) ->
    C_SwipeTrackerEndSwipeCallback
wrap_SwipeTrackerEndSwipeCallback :: forall a.
GObject a =>
(a -> SwipeTrackerEndSwipeCallback)
-> C_SwipeTrackerEndSwipeCallback
wrap_SwipeTrackerEndSwipeCallback a -> SwipeTrackerEndSwipeCallback
gi'cb Ptr SwipeTracker
gi'selfPtr Int64
duration CDouble
to Ptr ()
_ = do
    let to' :: Double
to' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
to
    Ptr SwipeTracker -> (SwipeTracker -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr SwipeTracker
gi'selfPtr ((SwipeTracker -> IO ()) -> IO ())
-> (SwipeTracker -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SwipeTracker
gi'self -> a -> SwipeTrackerEndSwipeCallback
gi'cb (SwipeTracker -> a
forall a b. Coercible a b => a -> b
Coerce.coerce SwipeTracker
gi'self)  Int64
duration Double
to'


-- | Connect a signal handler for the [endSwipe](#signal:endSwipe) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' swipeTracker #endSwipe callback
-- @
-- 
-- 
onSwipeTrackerEndSwipe :: (IsSwipeTracker a, MonadIO m) => a -> ((?self :: a) => SwipeTrackerEndSwipeCallback) -> m SignalHandlerId
onSwipeTrackerEndSwipe :: forall a (m :: * -> *).
(IsSwipeTracker a, MonadIO m) =>
a
-> ((?self::a) => SwipeTrackerEndSwipeCallback)
-> m SignalHandlerId
onSwipeTrackerEndSwipe a
obj (?self::a) => SwipeTrackerEndSwipeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> SwipeTrackerEndSwipeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SwipeTrackerEndSwipeCallback
SwipeTrackerEndSwipeCallback
cb
    let wrapped' :: C_SwipeTrackerEndSwipeCallback
wrapped' = (a -> SwipeTrackerEndSwipeCallback)
-> C_SwipeTrackerEndSwipeCallback
forall a.
GObject a =>
(a -> SwipeTrackerEndSwipeCallback)
-> C_SwipeTrackerEndSwipeCallback
wrap_SwipeTrackerEndSwipeCallback a -> SwipeTrackerEndSwipeCallback
wrapped
    FunPtr C_SwipeTrackerEndSwipeCallback
wrapped'' <- C_SwipeTrackerEndSwipeCallback
-> IO (FunPtr C_SwipeTrackerEndSwipeCallback)
mk_SwipeTrackerEndSwipeCallback C_SwipeTrackerEndSwipeCallback
wrapped'
    a
-> Text
-> FunPtr C_SwipeTrackerEndSwipeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"end-swipe" FunPtr C_SwipeTrackerEndSwipeCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [endSwipe](#signal:endSwipe) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' swipeTracker #endSwipe callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterSwipeTrackerEndSwipe :: (IsSwipeTracker a, MonadIO m) => a -> ((?self :: a) => SwipeTrackerEndSwipeCallback) -> m SignalHandlerId
afterSwipeTrackerEndSwipe :: forall a (m :: * -> *).
(IsSwipeTracker a, MonadIO m) =>
a
-> ((?self::a) => SwipeTrackerEndSwipeCallback)
-> m SignalHandlerId
afterSwipeTrackerEndSwipe a
obj (?self::a) => SwipeTrackerEndSwipeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> SwipeTrackerEndSwipeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SwipeTrackerEndSwipeCallback
SwipeTrackerEndSwipeCallback
cb
    let wrapped' :: C_SwipeTrackerEndSwipeCallback
wrapped' = (a -> SwipeTrackerEndSwipeCallback)
-> C_SwipeTrackerEndSwipeCallback
forall a.
GObject a =>
(a -> SwipeTrackerEndSwipeCallback)
-> C_SwipeTrackerEndSwipeCallback
wrap_SwipeTrackerEndSwipeCallback a -> SwipeTrackerEndSwipeCallback
wrapped
    FunPtr C_SwipeTrackerEndSwipeCallback
wrapped'' <- C_SwipeTrackerEndSwipeCallback
-> IO (FunPtr C_SwipeTrackerEndSwipeCallback)
mk_SwipeTrackerEndSwipeCallback C_SwipeTrackerEndSwipeCallback
wrapped'
    a
-> Text
-> FunPtr C_SwipeTrackerEndSwipeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"end-swipe" FunPtr C_SwipeTrackerEndSwipeCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data SwipeTrackerEndSwipeSignalInfo
instance SignalInfo SwipeTrackerEndSwipeSignalInfo where
    type HaskellCallbackType SwipeTrackerEndSwipeSignalInfo = SwipeTrackerEndSwipeCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_SwipeTrackerEndSwipeCallback cb
        cb'' <- mk_SwipeTrackerEndSwipeCallback cb'
        connectSignalFunPtr obj "end-swipe" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker::end-swipe"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:signal:endSwipe"})

#endif

-- signal SwipeTracker::update-swipe
-- | This signal is emitted every time the progress value changes.
-- 
-- /Since: 1.0/
type SwipeTrackerUpdateSwipeCallback =
    Double
    -- ^ /@progress@/: the current animation progress value
    -> IO ()

type C_SwipeTrackerUpdateSwipeCallback =
    Ptr SwipeTracker ->                     -- object
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_SwipeTrackerUpdateSwipeCallback`.
foreign import ccall "wrapper"
    mk_SwipeTrackerUpdateSwipeCallback :: C_SwipeTrackerUpdateSwipeCallback -> IO (FunPtr C_SwipeTrackerUpdateSwipeCallback)

wrap_SwipeTrackerUpdateSwipeCallback :: 
    GObject a => (a -> SwipeTrackerUpdateSwipeCallback) ->
    C_SwipeTrackerUpdateSwipeCallback
wrap_SwipeTrackerUpdateSwipeCallback :: forall a.
GObject a =>
(a -> SwipeTrackerUpdateSwipeCallback)
-> C_SwipeTrackerUpdateSwipeCallback
wrap_SwipeTrackerUpdateSwipeCallback a -> SwipeTrackerUpdateSwipeCallback
gi'cb Ptr SwipeTracker
gi'selfPtr CDouble
progress Ptr ()
_ = do
    let progress' :: Double
progress' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
progress
    Ptr SwipeTracker -> (SwipeTracker -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr SwipeTracker
gi'selfPtr ((SwipeTracker -> IO ()) -> IO ())
-> (SwipeTracker -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SwipeTracker
gi'self -> a -> SwipeTrackerUpdateSwipeCallback
gi'cb (SwipeTracker -> a
forall a b. Coercible a b => a -> b
Coerce.coerce SwipeTracker
gi'self)  Double
progress'


-- | Connect a signal handler for the [updateSwipe](#signal:updateSwipe) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' swipeTracker #updateSwipe callback
-- @
-- 
-- 
onSwipeTrackerUpdateSwipe :: (IsSwipeTracker a, MonadIO m) => a -> ((?self :: a) => SwipeTrackerUpdateSwipeCallback) -> m SignalHandlerId
onSwipeTrackerUpdateSwipe :: forall a (m :: * -> *).
(IsSwipeTracker a, MonadIO m) =>
a
-> ((?self::a) => SwipeTrackerUpdateSwipeCallback)
-> m SignalHandlerId
onSwipeTrackerUpdateSwipe a
obj (?self::a) => SwipeTrackerUpdateSwipeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> SwipeTrackerUpdateSwipeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SwipeTrackerUpdateSwipeCallback
SwipeTrackerUpdateSwipeCallback
cb
    let wrapped' :: C_SwipeTrackerUpdateSwipeCallback
wrapped' = (a -> SwipeTrackerUpdateSwipeCallback)
-> C_SwipeTrackerUpdateSwipeCallback
forall a.
GObject a =>
(a -> SwipeTrackerUpdateSwipeCallback)
-> C_SwipeTrackerUpdateSwipeCallback
wrap_SwipeTrackerUpdateSwipeCallback a -> SwipeTrackerUpdateSwipeCallback
wrapped
    FunPtr C_SwipeTrackerUpdateSwipeCallback
wrapped'' <- C_SwipeTrackerUpdateSwipeCallback
-> IO (FunPtr C_SwipeTrackerUpdateSwipeCallback)
mk_SwipeTrackerUpdateSwipeCallback C_SwipeTrackerUpdateSwipeCallback
wrapped'
    a
-> Text
-> FunPtr C_SwipeTrackerUpdateSwipeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"update-swipe" FunPtr C_SwipeTrackerUpdateSwipeCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [updateSwipe](#signal:updateSwipe) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' swipeTracker #updateSwipe callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterSwipeTrackerUpdateSwipe :: (IsSwipeTracker a, MonadIO m) => a -> ((?self :: a) => SwipeTrackerUpdateSwipeCallback) -> m SignalHandlerId
afterSwipeTrackerUpdateSwipe :: forall a (m :: * -> *).
(IsSwipeTracker a, MonadIO m) =>
a
-> ((?self::a) => SwipeTrackerUpdateSwipeCallback)
-> m SignalHandlerId
afterSwipeTrackerUpdateSwipe a
obj (?self::a) => SwipeTrackerUpdateSwipeCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> SwipeTrackerUpdateSwipeCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => SwipeTrackerUpdateSwipeCallback
SwipeTrackerUpdateSwipeCallback
cb
    let wrapped' :: C_SwipeTrackerUpdateSwipeCallback
wrapped' = (a -> SwipeTrackerUpdateSwipeCallback)
-> C_SwipeTrackerUpdateSwipeCallback
forall a.
GObject a =>
(a -> SwipeTrackerUpdateSwipeCallback)
-> C_SwipeTrackerUpdateSwipeCallback
wrap_SwipeTrackerUpdateSwipeCallback a -> SwipeTrackerUpdateSwipeCallback
wrapped
    FunPtr C_SwipeTrackerUpdateSwipeCallback
wrapped'' <- C_SwipeTrackerUpdateSwipeCallback
-> IO (FunPtr C_SwipeTrackerUpdateSwipeCallback)
mk_SwipeTrackerUpdateSwipeCallback C_SwipeTrackerUpdateSwipeCallback
wrapped'
    a
-> Text
-> FunPtr C_SwipeTrackerUpdateSwipeCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"update-swipe" FunPtr C_SwipeTrackerUpdateSwipeCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data SwipeTrackerUpdateSwipeSignalInfo
instance SignalInfo SwipeTrackerUpdateSwipeSignalInfo where
    type HaskellCallbackType SwipeTrackerUpdateSwipeSignalInfo = SwipeTrackerUpdateSwipeCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_SwipeTrackerUpdateSwipeCallback cb
        cb'' <- mk_SwipeTrackerUpdateSwipeCallback cb'
        connectSignalFunPtr obj "update-swipe" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker::update-swipe"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:signal:updateSwipe"})

#endif

-- VVV Prop "allow-long-swipes"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@allow-long-swipes@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' swipeTracker #allowLongSwipes
-- @
getSwipeTrackerAllowLongSwipes :: (MonadIO m, IsSwipeTracker o) => o -> m Bool
getSwipeTrackerAllowLongSwipes :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> m Bool
getSwipeTrackerAllowLongSwipes o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"allow-long-swipes"

-- | Set the value of the “@allow-long-swipes@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' swipeTracker [ #allowLongSwipes 'Data.GI.Base.Attributes.:=' value ]
-- @
setSwipeTrackerAllowLongSwipes :: (MonadIO m, IsSwipeTracker o) => o -> Bool -> m ()
setSwipeTrackerAllowLongSwipes :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> Bool -> m ()
setSwipeTrackerAllowLongSwipes o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"allow-long-swipes" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@allow-long-swipes@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSwipeTrackerAllowLongSwipes :: (IsSwipeTracker o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructSwipeTrackerAllowLongSwipes :: forall o (m :: * -> *).
(IsSwipeTracker o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructSwipeTrackerAllowLongSwipes Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"allow-long-swipes" Bool
val

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerAllowLongSwipesPropertyInfo
instance AttrInfo SwipeTrackerAllowLongSwipesPropertyInfo where
    type AttrAllowedOps SwipeTrackerAllowLongSwipesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SwipeTrackerAllowLongSwipesPropertyInfo = IsSwipeTracker
    type AttrSetTypeConstraint SwipeTrackerAllowLongSwipesPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint SwipeTrackerAllowLongSwipesPropertyInfo = (~) Bool
    type AttrTransferType SwipeTrackerAllowLongSwipesPropertyInfo = Bool
    type AttrGetType SwipeTrackerAllowLongSwipesPropertyInfo = Bool
    type AttrLabel SwipeTrackerAllowLongSwipesPropertyInfo = "allow-long-swipes"
    type AttrOrigin SwipeTrackerAllowLongSwipesPropertyInfo = SwipeTracker
    attrGet = getSwipeTrackerAllowLongSwipes
    attrSet = setSwipeTrackerAllowLongSwipes
    attrTransfer _ v = do
        return v
    attrConstruct = constructSwipeTrackerAllowLongSwipes
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.allowLongSwipes"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:attr:allowLongSwipes"
        })
#endif

-- VVV Prop "allow-mouse-drag"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@allow-mouse-drag@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' swipeTracker #allowMouseDrag
-- @
getSwipeTrackerAllowMouseDrag :: (MonadIO m, IsSwipeTracker o) => o -> m Bool
getSwipeTrackerAllowMouseDrag :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> m Bool
getSwipeTrackerAllowMouseDrag o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"allow-mouse-drag"

-- | Set the value of the “@allow-mouse-drag@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' swipeTracker [ #allowMouseDrag 'Data.GI.Base.Attributes.:=' value ]
-- @
setSwipeTrackerAllowMouseDrag :: (MonadIO m, IsSwipeTracker o) => o -> Bool -> m ()
setSwipeTrackerAllowMouseDrag :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> Bool -> m ()
setSwipeTrackerAllowMouseDrag o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"allow-mouse-drag" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@allow-mouse-drag@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSwipeTrackerAllowMouseDrag :: (IsSwipeTracker o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructSwipeTrackerAllowMouseDrag :: forall o (m :: * -> *).
(IsSwipeTracker o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructSwipeTrackerAllowMouseDrag Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"allow-mouse-drag" Bool
val

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerAllowMouseDragPropertyInfo
instance AttrInfo SwipeTrackerAllowMouseDragPropertyInfo where
    type AttrAllowedOps SwipeTrackerAllowMouseDragPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SwipeTrackerAllowMouseDragPropertyInfo = IsSwipeTracker
    type AttrSetTypeConstraint SwipeTrackerAllowMouseDragPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint SwipeTrackerAllowMouseDragPropertyInfo = (~) Bool
    type AttrTransferType SwipeTrackerAllowMouseDragPropertyInfo = Bool
    type AttrGetType SwipeTrackerAllowMouseDragPropertyInfo = Bool
    type AttrLabel SwipeTrackerAllowMouseDragPropertyInfo = "allow-mouse-drag"
    type AttrOrigin SwipeTrackerAllowMouseDragPropertyInfo = SwipeTracker
    attrGet = getSwipeTrackerAllowMouseDrag
    attrSet = setSwipeTrackerAllowMouseDrag
    attrTransfer _ v = do
        return v
    attrConstruct = constructSwipeTrackerAllowMouseDrag
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.allowMouseDrag"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:attr:allowMouseDrag"
        })
#endif

-- VVV Prop "enabled"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@enabled@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' swipeTracker #enabled
-- @
getSwipeTrackerEnabled :: (MonadIO m, IsSwipeTracker o) => o -> m Bool
getSwipeTrackerEnabled :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> m Bool
getSwipeTrackerEnabled o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"enabled"

-- | Set the value of the “@enabled@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' swipeTracker [ #enabled 'Data.GI.Base.Attributes.:=' value ]
-- @
setSwipeTrackerEnabled :: (MonadIO m, IsSwipeTracker o) => o -> Bool -> m ()
setSwipeTrackerEnabled :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> Bool -> m ()
setSwipeTrackerEnabled o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"enabled" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@enabled@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSwipeTrackerEnabled :: (IsSwipeTracker o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructSwipeTrackerEnabled :: forall o (m :: * -> *).
(IsSwipeTracker o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructSwipeTrackerEnabled Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"enabled" Bool
val

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerEnabledPropertyInfo
instance AttrInfo SwipeTrackerEnabledPropertyInfo where
    type AttrAllowedOps SwipeTrackerEnabledPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SwipeTrackerEnabledPropertyInfo = IsSwipeTracker
    type AttrSetTypeConstraint SwipeTrackerEnabledPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint SwipeTrackerEnabledPropertyInfo = (~) Bool
    type AttrTransferType SwipeTrackerEnabledPropertyInfo = Bool
    type AttrGetType SwipeTrackerEnabledPropertyInfo = Bool
    type AttrLabel SwipeTrackerEnabledPropertyInfo = "enabled"
    type AttrOrigin SwipeTrackerEnabledPropertyInfo = SwipeTracker
    attrGet = getSwipeTrackerEnabled
    attrSet = setSwipeTrackerEnabled
    attrTransfer _ v = do
        return v
    attrConstruct = constructSwipeTrackerEnabled
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.enabled"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:attr:enabled"
        })
#endif

-- VVV Prop "reversed"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@reversed@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' swipeTracker #reversed
-- @
getSwipeTrackerReversed :: (MonadIO m, IsSwipeTracker o) => o -> m Bool
getSwipeTrackerReversed :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> m Bool
getSwipeTrackerReversed o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"reversed"

-- | Set the value of the “@reversed@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' swipeTracker [ #reversed 'Data.GI.Base.Attributes.:=' value ]
-- @
setSwipeTrackerReversed :: (MonadIO m, IsSwipeTracker o) => o -> Bool -> m ()
setSwipeTrackerReversed :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> Bool -> m ()
setSwipeTrackerReversed o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"reversed" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@reversed@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSwipeTrackerReversed :: (IsSwipeTracker o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructSwipeTrackerReversed :: forall o (m :: * -> *).
(IsSwipeTracker o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructSwipeTrackerReversed Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"reversed" Bool
val

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerReversedPropertyInfo
instance AttrInfo SwipeTrackerReversedPropertyInfo where
    type AttrAllowedOps SwipeTrackerReversedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint SwipeTrackerReversedPropertyInfo = IsSwipeTracker
    type AttrSetTypeConstraint SwipeTrackerReversedPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint SwipeTrackerReversedPropertyInfo = (~) Bool
    type AttrTransferType SwipeTrackerReversedPropertyInfo = Bool
    type AttrGetType SwipeTrackerReversedPropertyInfo = Bool
    type AttrLabel SwipeTrackerReversedPropertyInfo = "reversed"
    type AttrOrigin SwipeTrackerReversedPropertyInfo = SwipeTracker
    attrGet = getSwipeTrackerReversed
    attrSet = setSwipeTrackerReversed
    attrTransfer _ v = do
        return v
    attrConstruct = constructSwipeTrackerReversed
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.reversed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:attr:reversed"
        })
#endif

-- VVV Prop "swipeable"
   -- Type: TInterface (Name {namespace = "Handy", name = "Swipeable"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@swipeable@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' swipeTracker #swipeable
-- @
getSwipeTrackerSwipeable :: (MonadIO m, IsSwipeTracker o) => o -> m Handy.Swipeable.Swipeable
getSwipeTrackerSwipeable :: forall (m :: * -> *) o.
(MonadIO m, IsSwipeTracker o) =>
o -> m Swipeable
getSwipeTrackerSwipeable o
obj = IO Swipeable -> m Swipeable
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Swipeable -> m Swipeable) -> IO Swipeable -> m Swipeable
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Swipeable) -> IO Swipeable
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getSwipeTrackerSwipeable" (IO (Maybe Swipeable) -> IO Swipeable)
-> IO (Maybe Swipeable) -> IO Swipeable
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Swipeable -> Swipeable)
-> IO (Maybe Swipeable)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"swipeable" ManagedPtr Swipeable -> Swipeable
Handy.Swipeable.Swipeable

-- | Construct a `GValueConstruct` with valid value for the “@swipeable@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructSwipeTrackerSwipeable :: (IsSwipeTracker o, MIO.MonadIO m, Handy.Swipeable.IsSwipeable a) => a -> m (GValueConstruct o)
constructSwipeTrackerSwipeable :: forall o (m :: * -> *) a.
(IsSwipeTracker o, MonadIO m, IsSwipeable a) =>
a -> m (GValueConstruct o)
constructSwipeTrackerSwipeable a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"swipeable" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerSwipeablePropertyInfo
instance AttrInfo SwipeTrackerSwipeablePropertyInfo where
    type AttrAllowedOps SwipeTrackerSwipeablePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint SwipeTrackerSwipeablePropertyInfo = IsSwipeTracker
    type AttrSetTypeConstraint SwipeTrackerSwipeablePropertyInfo = Handy.Swipeable.IsSwipeable
    type AttrTransferTypeConstraint SwipeTrackerSwipeablePropertyInfo = Handy.Swipeable.IsSwipeable
    type AttrTransferType SwipeTrackerSwipeablePropertyInfo = Handy.Swipeable.Swipeable
    type AttrGetType SwipeTrackerSwipeablePropertyInfo = Handy.Swipeable.Swipeable
    type AttrLabel SwipeTrackerSwipeablePropertyInfo = "swipeable"
    type AttrOrigin SwipeTrackerSwipeablePropertyInfo = SwipeTracker
    attrGet = getSwipeTrackerSwipeable
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo Handy.Swipeable.Swipeable v
    attrConstruct = constructSwipeTrackerSwipeable
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeable"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#g:attr:swipeable"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SwipeTracker
type instance O.AttributeList SwipeTracker = SwipeTrackerAttributeList
type SwipeTrackerAttributeList = ('[ '("allowLongSwipes", SwipeTrackerAllowLongSwipesPropertyInfo), '("allowMouseDrag", SwipeTrackerAllowMouseDragPropertyInfo), '("enabled", SwipeTrackerEnabledPropertyInfo), '("orientation", Gtk.Orientable.OrientableOrientationPropertyInfo), '("reversed", SwipeTrackerReversedPropertyInfo), '("swipeable", SwipeTrackerSwipeablePropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
swipeTrackerAllowLongSwipes :: AttrLabelProxy "allowLongSwipes"
swipeTrackerAllowLongSwipes = AttrLabelProxy

swipeTrackerAllowMouseDrag :: AttrLabelProxy "allowMouseDrag"
swipeTrackerAllowMouseDrag = AttrLabelProxy

swipeTrackerEnabled :: AttrLabelProxy "enabled"
swipeTrackerEnabled = AttrLabelProxy

swipeTrackerReversed :: AttrLabelProxy "reversed"
swipeTrackerReversed = AttrLabelProxy

swipeTrackerSwipeable :: AttrLabelProxy "swipeable"
swipeTrackerSwipeable = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SwipeTracker = SwipeTrackerSignalList
type SwipeTrackerSignalList = ('[ '("beginSwipe", SwipeTrackerBeginSwipeSignalInfo), '("endSwipe", SwipeTrackerEndSwipeSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("updateSwipe", SwipeTrackerUpdateSwipeSignalInfo)] :: [(Symbol, *)])

#endif

-- method SwipeTracker::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "swipeable"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "Swipeable" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipeable to add the tracker on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Handy" , name = "SwipeTracker" })
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_new" hdy_swipe_tracker_new :: 
    Ptr Handy.Swipeable.Swipeable ->        -- swipeable : TInterface (Name {namespace = "Handy", name = "Swipeable"})
    IO (Ptr SwipeTracker)

-- | Creates a new @HdySwipeTracker@ object on /@widget@/.
-- 
-- /Since: 1.0/
swipeTrackerNew ::
    (B.CallStack.HasCallStack, MonadIO m, Handy.Swipeable.IsSwipeable a) =>
    a
    -- ^ /@swipeable@/: a swipeable to add the tracker on
    -> m SwipeTracker
    -- ^ __Returns:__ the newly created @HdySwipeTracker@
swipeTrackerNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeable a) =>
a -> m SwipeTracker
swipeTrackerNew a
swipeable = IO SwipeTracker -> m SwipeTracker
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SwipeTracker -> m SwipeTracker)
-> IO SwipeTracker -> m SwipeTracker
forall a b. (a -> b) -> a -> b
$ do
    Ptr Swipeable
swipeable' <- a -> IO (Ptr Swipeable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
swipeable
    Ptr SwipeTracker
result <- Ptr Swipeable -> IO (Ptr SwipeTracker)
hdy_swipe_tracker_new Ptr Swipeable
swipeable'
    Text -> Ptr SwipeTracker -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"swipeTrackerNew" Ptr SwipeTracker
result
    SwipeTracker
result' <- ((ManagedPtr SwipeTracker -> SwipeTracker)
-> Ptr SwipeTracker -> IO SwipeTracker
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SwipeTracker -> SwipeTracker
SwipeTracker) Ptr SwipeTracker
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
swipeable
    SwipeTracker -> IO SwipeTracker
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SwipeTracker
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method SwipeTracker::get_allow_long_swipes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_get_allow_long_swipes" hdy_swipe_tracker_get_allow_long_swipes :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    IO CInt

-- | Whether to allow swiping for more than one snap point at a time.
-- 
-- If the value is @FALSE@, each swipe can only move to the adjacent snap
-- points.
-- 
-- /Since: 1.2/
swipeTrackerGetAllowLongSwipes ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> m Bool
    -- ^ __Returns:__ whether long swipes are allowed
swipeTrackerGetAllowLongSwipes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> m Bool
swipeTrackerGetAllowLongSwipes a
self = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr SwipeTracker -> IO CInt
hdy_swipe_tracker_get_allow_long_swipes Ptr SwipeTracker
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerGetAllowLongSwipesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerGetAllowLongSwipesMethodInfo a signature where
    overloadedMethod = swipeTrackerGetAllowLongSwipes

instance O.OverloadedMethodInfo SwipeTrackerGetAllowLongSwipesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerGetAllowLongSwipes",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerGetAllowLongSwipes"
        })


#endif

-- method SwipeTracker::get_allow_mouse_drag
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_get_allow_mouse_drag" hdy_swipe_tracker_get_allow_mouse_drag :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    IO CInt

-- | Get whether /@self@/ can be dragged with mouse pointer.
-- 
-- /Since: 1.0/
swipeTrackerGetAllowMouseDrag ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> m Bool
    -- ^ __Returns:__ @TRUE@ is mouse dragging is allowed
swipeTrackerGetAllowMouseDrag :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> m Bool
swipeTrackerGetAllowMouseDrag a
self = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr SwipeTracker -> IO CInt
hdy_swipe_tracker_get_allow_mouse_drag Ptr SwipeTracker
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerGetAllowMouseDragMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerGetAllowMouseDragMethodInfo a signature where
    overloadedMethod = swipeTrackerGetAllowMouseDrag

instance O.OverloadedMethodInfo SwipeTrackerGetAllowMouseDragMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerGetAllowMouseDrag",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerGetAllowMouseDrag"
        })


#endif

-- method SwipeTracker::get_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_get_enabled" hdy_swipe_tracker_get_enabled :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    IO CInt

-- | Get whether /@self@/ is enabled.
-- 
-- /Since: 1.0/
swipeTrackerGetEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> m Bool
    -- ^ __Returns:__ @TRUE@ if /@self@/ is enabled
swipeTrackerGetEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> m Bool
swipeTrackerGetEnabled a
self = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr SwipeTracker -> IO CInt
hdy_swipe_tracker_get_enabled Ptr SwipeTracker
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerGetEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerGetEnabledMethodInfo a signature where
    overloadedMethod = swipeTrackerGetEnabled

instance O.OverloadedMethodInfo SwipeTrackerGetEnabledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerGetEnabled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerGetEnabled"
        })


#endif

-- method SwipeTracker::get_reversed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_get_reversed" hdy_swipe_tracker_get_reversed :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    IO CInt

-- | Get whether /@self@/ is reversing the swipe direction.
-- 
-- /Since: 1.0/
swipeTrackerGetReversed ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> m Bool
    -- ^ __Returns:__ @TRUE@ is the direction is reversed
swipeTrackerGetReversed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> m Bool
swipeTrackerGetReversed a
self = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr SwipeTracker -> IO CInt
hdy_swipe_tracker_get_reversed Ptr SwipeTracker
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerGetReversedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerGetReversedMethodInfo a signature where
    overloadedMethod = swipeTrackerGetReversed

instance O.OverloadedMethodInfo SwipeTrackerGetReversedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerGetReversed",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerGetReversed"
        })


#endif

-- method SwipeTracker::get_swipeable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Handy" , name = "Swipeable" })
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_get_swipeable" hdy_swipe_tracker_get_swipeable :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    IO (Ptr Handy.Swipeable.Swipeable)

-- | Get /@self@/\'s swipeable widget.
-- 
-- /Since: 1.0/
swipeTrackerGetSwipeable ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> m Handy.Swipeable.Swipeable
    -- ^ __Returns:__ the swipeable widget
swipeTrackerGetSwipeable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> m Swipeable
swipeTrackerGetSwipeable a
self = IO Swipeable -> m Swipeable
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Swipeable -> m Swipeable) -> IO Swipeable -> m Swipeable
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Swipeable
result <- Ptr SwipeTracker -> IO (Ptr Swipeable)
hdy_swipe_tracker_get_swipeable Ptr SwipeTracker
self'
    Text -> Ptr Swipeable -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"swipeTrackerGetSwipeable" Ptr Swipeable
result
    Swipeable
result' <- ((ManagedPtr Swipeable -> Swipeable)
-> Ptr Swipeable -> IO Swipeable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Swipeable -> Swipeable
Handy.Swipeable.Swipeable) Ptr Swipeable
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Swipeable -> IO Swipeable
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Swipeable
result'

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerGetSwipeableMethodInfo
instance (signature ~ (m Handy.Swipeable.Swipeable), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerGetSwipeableMethodInfo a signature where
    overloadedMethod = swipeTrackerGetSwipeable

instance O.OverloadedMethodInfo SwipeTrackerGetSwipeableMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerGetSwipeable",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerGetSwipeable"
        })


#endif

-- method SwipeTracker::set_allow_long_swipes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allow_long_swipes"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to allow long swipes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_set_allow_long_swipes" hdy_swipe_tracker_set_allow_long_swipes :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    CInt ->                                 -- allow_long_swipes : TBasicType TBoolean
    IO ()

-- | Sets whether to allow swiping for more than one snap point at a time.
-- 
-- If the value is @FALSE@, each swipe can only move to the adjacent snap
-- points.
-- 
-- /Since: 1.2/
swipeTrackerSetAllowLongSwipes ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> Bool
    -- ^ /@allowLongSwipes@/: whether to allow long swipes
    -> m ()
swipeTrackerSetAllowLongSwipes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> Bool -> m ()
swipeTrackerSetAllowLongSwipes a
self Bool
allowLongSwipes = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let allowLongSwipes' :: CInt
allowLongSwipes' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
allowLongSwipes
    Ptr SwipeTracker -> CInt -> IO ()
hdy_swipe_tracker_set_allow_long_swipes Ptr SwipeTracker
self' CInt
allowLongSwipes'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerSetAllowLongSwipesMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerSetAllowLongSwipesMethodInfo a signature where
    overloadedMethod = swipeTrackerSetAllowLongSwipes

instance O.OverloadedMethodInfo SwipeTrackerSetAllowLongSwipesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerSetAllowLongSwipes",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerSetAllowLongSwipes"
        })


#endif

-- method SwipeTracker::set_allow_mouse_drag
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allow_mouse_drag"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to allow mouse dragging"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_set_allow_mouse_drag" hdy_swipe_tracker_set_allow_mouse_drag :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    CInt ->                                 -- allow_mouse_drag : TBasicType TBoolean
    IO ()

-- | Set whether /@self@/ can be dragged with mouse pointer.
-- 
-- This should usually be @FALSE@.
-- 
-- /Since: 1.0/
swipeTrackerSetAllowMouseDrag ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> Bool
    -- ^ /@allowMouseDrag@/: whether to allow mouse dragging
    -> m ()
swipeTrackerSetAllowMouseDrag :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> Bool -> m ()
swipeTrackerSetAllowMouseDrag a
self Bool
allowMouseDrag = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let allowMouseDrag' :: CInt
allowMouseDrag' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
allowMouseDrag
    Ptr SwipeTracker -> CInt -> IO ()
hdy_swipe_tracker_set_allow_mouse_drag Ptr SwipeTracker
self' CInt
allowMouseDrag'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerSetAllowMouseDragMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerSetAllowMouseDragMethodInfo a signature where
    overloadedMethod = swipeTrackerSetAllowMouseDrag

instance O.OverloadedMethodInfo SwipeTrackerSetAllowMouseDragMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerSetAllowMouseDrag",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerSetAllowMouseDrag"
        })


#endif

-- method SwipeTracker::set_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "enabled"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to enable to swipe tracker"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_set_enabled" hdy_swipe_tracker_set_enabled :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Set whether /@self@/ is enabled.
-- 
-- /Since: 1.0/
swipeTrackerSetEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> Bool
    -- ^ /@enabled@/: whether to enable to swipe tracker
    -> m ()
swipeTrackerSetEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> Bool -> m ()
swipeTrackerSetEnabled a
self Bool
enabled = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let enabled' :: CInt
enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
enabled
    Ptr SwipeTracker -> CInt -> IO ()
hdy_swipe_tracker_set_enabled Ptr SwipeTracker
self' CInt
enabled'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerSetEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerSetEnabledMethodInfo a signature where
    overloadedMethod = swipeTrackerSetEnabled

instance O.OverloadedMethodInfo SwipeTrackerSetEnabledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerSetEnabled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerSetEnabled"
        })


#endif

-- method SwipeTracker::set_reversed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "reversed"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to reverse the swipe direction"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_set_reversed" hdy_swipe_tracker_set_reversed :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    CInt ->                                 -- reversed : TBasicType TBoolean
    IO ()

-- | Set whether to reverse the swipe direction.
-- 
-- If /@self@/ is horizontal, can be used for supporting RTL text direction.
-- 
-- /Since: 1.0/
swipeTrackerSetReversed ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> Bool
    -- ^ /@reversed@/: whether to reverse the swipe direction
    -> m ()
swipeTrackerSetReversed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> Bool -> m ()
swipeTrackerSetReversed a
self Bool
reversed = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let reversed' :: CInt
reversed' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
reversed
    Ptr SwipeTracker -> CInt -> IO ()
hdy_swipe_tracker_set_reversed Ptr SwipeTracker
self' CInt
reversed'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerSetReversedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerSetReversedMethodInfo a signature where
    overloadedMethod = swipeTrackerSetReversed

instance O.OverloadedMethodInfo SwipeTrackerSetReversedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerSetReversed",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerSetReversed"
        })


#endif

-- method SwipeTracker::shift_position
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Handy" , name = "SwipeTracker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a swipe tracker" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "delta"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the position delta" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "hdy_swipe_tracker_shift_position" hdy_swipe_tracker_shift_position :: 
    Ptr SwipeTracker ->                     -- self : TInterface (Name {namespace = "Handy", name = "SwipeTracker"})
    CDouble ->                              -- delta : TBasicType TDouble
    IO ()

-- | Move the current progress value by /@delta@/.
-- 
-- This can be used to adjust the current position if snap points move during
-- the gesture.
-- 
-- /Since: 1.0/
swipeTrackerShiftPosition ::
    (B.CallStack.HasCallStack, MonadIO m, IsSwipeTracker a) =>
    a
    -- ^ /@self@/: a swipe tracker
    -> Double
    -- ^ /@delta@/: the position delta
    -> m ()
swipeTrackerShiftPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSwipeTracker a) =>
a -> Double -> m ()
swipeTrackerShiftPosition a
self Double
delta = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr SwipeTracker
self' <- a -> IO (Ptr SwipeTracker)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let delta' :: CDouble
delta' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
delta
    Ptr SwipeTracker -> CDouble -> IO ()
hdy_swipe_tracker_shift_position Ptr SwipeTracker
self' CDouble
delta'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data SwipeTrackerShiftPositionMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsSwipeTracker a) => O.OverloadedMethod SwipeTrackerShiftPositionMethodInfo a signature where
    overloadedMethod = swipeTrackerShiftPosition

instance O.OverloadedMethodInfo SwipeTrackerShiftPositionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Handy.Objects.SwipeTracker.swipeTrackerShiftPosition",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-handy-1.0.2/docs/GI-Handy-Objects-SwipeTracker.html#v:swipeTrackerShiftPosition"
        })


#endif