{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2.Structs.GeolocationPosition
(
GeolocationPosition(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveGeolocationPositionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
GeolocationPositionCopyMethodInfo ,
#endif
geolocationPositionCopy ,
#if defined(ENABLE_OVERLOADING)
GeolocationPositionFreeMethodInfo ,
#endif
geolocationPositionFree ,
geolocationPositionNew ,
#if defined(ENABLE_OVERLOADING)
GeolocationPositionSetAltitudeMethodInfo,
#endif
geolocationPositionSetAltitude ,
#if defined(ENABLE_OVERLOADING)
GeolocationPositionSetAltitudeAccuracyMethodInfo,
#endif
geolocationPositionSetAltitudeAccuracy ,
#if defined(ENABLE_OVERLOADING)
GeolocationPositionSetHeadingMethodInfo ,
#endif
geolocationPositionSetHeading ,
#if defined(ENABLE_OVERLOADING)
GeolocationPositionSetSpeedMethodInfo ,
#endif
geolocationPositionSetSpeed ,
#if defined(ENABLE_OVERLOADING)
GeolocationPositionSetTimestampMethodInfo,
#endif
geolocationPositionSetTimestamp ,
) 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.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
newtype GeolocationPosition = GeolocationPosition (SP.ManagedPtr GeolocationPosition)
deriving (GeolocationPosition -> GeolocationPosition -> Bool
(GeolocationPosition -> GeolocationPosition -> Bool)
-> (GeolocationPosition -> GeolocationPosition -> Bool)
-> Eq GeolocationPosition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeolocationPosition -> GeolocationPosition -> Bool
$c/= :: GeolocationPosition -> GeolocationPosition -> Bool
== :: GeolocationPosition -> GeolocationPosition -> Bool
$c== :: GeolocationPosition -> GeolocationPosition -> Bool
Eq)
instance SP.ManagedPtrNewtype GeolocationPosition where
toManagedPtr :: GeolocationPosition -> ManagedPtr GeolocationPosition
toManagedPtr (GeolocationPosition ManagedPtr GeolocationPosition
p) = ManagedPtr GeolocationPosition
p
foreign import ccall "webkit_geolocation_position_get_type" c_webkit_geolocation_position_get_type ::
IO GType
type instance O.ParentTypes GeolocationPosition = '[]
instance O.HasParentTypes GeolocationPosition
instance B.Types.TypedObject GeolocationPosition where
glibType :: IO GType
glibType = IO GType
c_webkit_geolocation_position_get_type
instance B.Types.GBoxed GeolocationPosition
instance B.GValue.IsGValue (Maybe GeolocationPosition) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_geolocation_position_get_type
gvalueSet_ :: Ptr GValue -> Maybe GeolocationPosition -> IO ()
gvalueSet_ Ptr GValue
gv Maybe GeolocationPosition
P.Nothing = Ptr GValue -> Ptr GeolocationPosition -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr GeolocationPosition
forall a. Ptr a
FP.nullPtr :: FP.Ptr GeolocationPosition)
gvalueSet_ Ptr GValue
gv (P.Just GeolocationPosition
obj) = GeolocationPosition -> (Ptr GeolocationPosition -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr GeolocationPosition
obj (Ptr GValue -> Ptr GeolocationPosition -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe GeolocationPosition)
gvalueGet_ Ptr GValue
gv = do
Ptr GeolocationPosition
ptr <- Ptr GValue -> IO (Ptr GeolocationPosition)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr GeolocationPosition)
if Ptr GeolocationPosition
ptr Ptr GeolocationPosition -> Ptr GeolocationPosition -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr GeolocationPosition
forall a. Ptr a
FP.nullPtr
then GeolocationPosition -> Maybe GeolocationPosition
forall a. a -> Maybe a
P.Just (GeolocationPosition -> Maybe GeolocationPosition)
-> IO GeolocationPosition -> IO (Maybe GeolocationPosition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr GeolocationPosition -> GeolocationPosition)
-> Ptr GeolocationPosition -> IO GeolocationPosition
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr GeolocationPosition -> GeolocationPosition
GeolocationPosition Ptr GeolocationPosition
ptr
else Maybe GeolocationPosition -> IO (Maybe GeolocationPosition)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GeolocationPosition
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList GeolocationPosition
type instance O.AttributeList GeolocationPosition = GeolocationPositionAttributeList
type GeolocationPositionAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_geolocation_position_new" webkit_geolocation_position_new ::
CDouble ->
CDouble ->
CDouble ->
IO (Ptr GeolocationPosition)
geolocationPositionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Double
-> Double
-> Double
-> m GeolocationPosition
geolocationPositionNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Double -> Double -> Double -> m GeolocationPosition
geolocationPositionNew Double
latitude Double
longitude Double
accuracy = IO GeolocationPosition -> m GeolocationPosition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GeolocationPosition -> m GeolocationPosition)
-> IO GeolocationPosition -> m GeolocationPosition
forall a b. (a -> b) -> a -> b
$ do
let latitude' :: CDouble
latitude' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
latitude
let longitude' :: CDouble
longitude' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
longitude
let accuracy' :: CDouble
accuracy' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
accuracy
Ptr GeolocationPosition
result <- CDouble -> CDouble -> CDouble -> IO (Ptr GeolocationPosition)
webkit_geolocation_position_new CDouble
latitude' CDouble
longitude' CDouble
accuracy'
Text -> Ptr GeolocationPosition -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"geolocationPositionNew" Ptr GeolocationPosition
result
GeolocationPosition
result' <- ((ManagedPtr GeolocationPosition -> GeolocationPosition)
-> Ptr GeolocationPosition -> IO GeolocationPosition
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr GeolocationPosition -> GeolocationPosition
GeolocationPosition) Ptr GeolocationPosition
result
GeolocationPosition -> IO GeolocationPosition
forall (m :: * -> *) a. Monad m => a -> m a
return GeolocationPosition
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "webkit_geolocation_position_copy" webkit_geolocation_position_copy ::
Ptr GeolocationPosition ->
IO (Ptr GeolocationPosition)
geolocationPositionCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> m GeolocationPosition
geolocationPositionCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> m GeolocationPosition
geolocationPositionCopy GeolocationPosition
position = IO GeolocationPosition -> m GeolocationPosition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GeolocationPosition -> m GeolocationPosition)
-> IO GeolocationPosition -> m GeolocationPosition
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
Ptr GeolocationPosition
result <- Ptr GeolocationPosition -> IO (Ptr GeolocationPosition)
webkit_geolocation_position_copy Ptr GeolocationPosition
position'
Text -> Ptr GeolocationPosition -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"geolocationPositionCopy" Ptr GeolocationPosition
result
GeolocationPosition
result' <- ((ManagedPtr GeolocationPosition -> GeolocationPosition)
-> Ptr GeolocationPosition -> IO GeolocationPosition
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr GeolocationPosition -> GeolocationPosition
GeolocationPosition) Ptr GeolocationPosition
result
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
GeolocationPosition -> IO GeolocationPosition
forall (m :: * -> *) a. Monad m => a -> m a
return GeolocationPosition
result'
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionCopyMethodInfo
instance (signature ~ (m GeolocationPosition), MonadIO m) => O.OverloadedMethod GeolocationPositionCopyMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionCopy
instance O.OverloadedMethodInfo GeolocationPositionCopyMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionCopy"
})
#endif
foreign import ccall "webkit_geolocation_position_free" webkit_geolocation_position_free ::
Ptr GeolocationPosition ->
IO ()
geolocationPositionFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> m ()
geolocationPositionFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> m ()
geolocationPositionFree GeolocationPosition
position = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
Ptr GeolocationPosition -> IO ()
webkit_geolocation_position_free Ptr GeolocationPosition
position'
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod GeolocationPositionFreeMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionFree
instance O.OverloadedMethodInfo GeolocationPositionFreeMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionFree"
})
#endif
foreign import ccall "webkit_geolocation_position_set_altitude" webkit_geolocation_position_set_altitude ::
Ptr GeolocationPosition ->
CDouble ->
IO ()
geolocationPositionSetAltitude ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> Double
-> m ()
geolocationPositionSetAltitude :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> Double -> m ()
geolocationPositionSetAltitude GeolocationPosition
position Double
altitude = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
let altitude' :: CDouble
altitude' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
altitude
Ptr GeolocationPosition -> CDouble -> IO ()
webkit_geolocation_position_set_altitude Ptr GeolocationPosition
position' CDouble
altitude'
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionSetAltitudeMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m) => O.OverloadedMethod GeolocationPositionSetAltitudeMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionSetAltitude
instance O.OverloadedMethodInfo GeolocationPositionSetAltitudeMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionSetAltitude",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionSetAltitude"
})
#endif
foreign import ccall "webkit_geolocation_position_set_altitude_accuracy" webkit_geolocation_position_set_altitude_accuracy ::
Ptr GeolocationPosition ->
CDouble ->
IO ()
geolocationPositionSetAltitudeAccuracy ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> Double
-> m ()
geolocationPositionSetAltitudeAccuracy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> Double -> m ()
geolocationPositionSetAltitudeAccuracy GeolocationPosition
position Double
altitudeAccuracy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
let altitudeAccuracy' :: CDouble
altitudeAccuracy' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
altitudeAccuracy
Ptr GeolocationPosition -> CDouble -> IO ()
webkit_geolocation_position_set_altitude_accuracy Ptr GeolocationPosition
position' CDouble
altitudeAccuracy'
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionSetAltitudeAccuracyMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m) => O.OverloadedMethod GeolocationPositionSetAltitudeAccuracyMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionSetAltitudeAccuracy
instance O.OverloadedMethodInfo GeolocationPositionSetAltitudeAccuracyMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionSetAltitudeAccuracy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionSetAltitudeAccuracy"
})
#endif
foreign import ccall "webkit_geolocation_position_set_heading" webkit_geolocation_position_set_heading ::
Ptr GeolocationPosition ->
CDouble ->
IO ()
geolocationPositionSetHeading ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> Double
-> m ()
geolocationPositionSetHeading :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> Double -> m ()
geolocationPositionSetHeading GeolocationPosition
position Double
heading = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
let heading' :: CDouble
heading' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
heading
Ptr GeolocationPosition -> CDouble -> IO ()
webkit_geolocation_position_set_heading Ptr GeolocationPosition
position' CDouble
heading'
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionSetHeadingMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m) => O.OverloadedMethod GeolocationPositionSetHeadingMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionSetHeading
instance O.OverloadedMethodInfo GeolocationPositionSetHeadingMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionSetHeading",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionSetHeading"
})
#endif
foreign import ccall "webkit_geolocation_position_set_speed" webkit_geolocation_position_set_speed ::
Ptr GeolocationPosition ->
CDouble ->
IO ()
geolocationPositionSetSpeed ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> Double
-> m ()
geolocationPositionSetSpeed :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> Double -> m ()
geolocationPositionSetSpeed GeolocationPosition
position Double
speed = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
let speed' :: CDouble
speed' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
speed
Ptr GeolocationPosition -> CDouble -> IO ()
webkit_geolocation_position_set_speed Ptr GeolocationPosition
position' CDouble
speed'
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionSetSpeedMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m) => O.OverloadedMethod GeolocationPositionSetSpeedMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionSetSpeed
instance O.OverloadedMethodInfo GeolocationPositionSetSpeedMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionSetSpeed",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionSetSpeed"
})
#endif
foreign import ccall "webkit_geolocation_position_set_timestamp" webkit_geolocation_position_set_timestamp ::
Ptr GeolocationPosition ->
Word64 ->
IO ()
geolocationPositionSetTimestamp ::
(B.CallStack.HasCallStack, MonadIO m) =>
GeolocationPosition
-> Word64
-> m ()
geolocationPositionSetTimestamp :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GeolocationPosition -> Word64 -> m ()
geolocationPositionSetTimestamp GeolocationPosition
position Word64
timestamp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GeolocationPosition
position' <- GeolocationPosition -> IO (Ptr GeolocationPosition)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GeolocationPosition
position
Ptr GeolocationPosition -> Word64 -> IO ()
webkit_geolocation_position_set_timestamp Ptr GeolocationPosition
position' Word64
timestamp
GeolocationPosition -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GeolocationPosition
position
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data GeolocationPositionSetTimestampMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m) => O.OverloadedMethod GeolocationPositionSetTimestampMethodInfo GeolocationPosition signature where
overloadedMethod = geolocationPositionSetTimestamp
instance O.OverloadedMethodInfo GeolocationPositionSetTimestampMethodInfo GeolocationPosition where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Structs.GeolocationPosition.geolocationPositionSetTimestamp",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.28/docs/GI-WebKit2-Structs-GeolocationPosition.html#v:geolocationPositionSetTimestamp"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveGeolocationPositionMethod (t :: Symbol) (o :: *) :: * where
ResolveGeolocationPositionMethod "copy" o = GeolocationPositionCopyMethodInfo
ResolveGeolocationPositionMethod "free" o = GeolocationPositionFreeMethodInfo
ResolveGeolocationPositionMethod "setAltitude" o = GeolocationPositionSetAltitudeMethodInfo
ResolveGeolocationPositionMethod "setAltitudeAccuracy" o = GeolocationPositionSetAltitudeAccuracyMethodInfo
ResolveGeolocationPositionMethod "setHeading" o = GeolocationPositionSetHeadingMethodInfo
ResolveGeolocationPositionMethod "setSpeed" o = GeolocationPositionSetSpeedMethodInfo
ResolveGeolocationPositionMethod "setTimestamp" o = GeolocationPositionSetTimestampMethodInfo
ResolveGeolocationPositionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveGeolocationPositionMethod t GeolocationPosition, O.OverloadedMethod info GeolocationPosition p) => OL.IsLabel t (GeolocationPosition -> 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 ~ ResolveGeolocationPositionMethod t GeolocationPosition, O.OverloadedMethod info GeolocationPosition p, R.HasField t GeolocationPosition p) => R.HasField t GeolocationPosition p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveGeolocationPositionMethod t GeolocationPosition, O.OverloadedMethodInfo info GeolocationPosition) => OL.IsLabel t (O.MethodProxy info GeolocationPosition) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif