gi-webkit2-4.0.29: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Objects.GeolocationManager

Description

Geolocation manager.

WebKitGeolocationManager provides API to get the geographical position of the user. Once a GeolocationPermissionRequest is allowed, when WebKit needs to know the user location GeolocationManager::start signal is emitted. If the signal is handled and returns True, the application is responsible for providing the position every time it's updated by calling geolocationManagerUpdatePosition. The signal GeolocationManager::stop will be emitted when location updates are no longer needed.

Since: 2.26

Synopsis

Exported types

newtype GeolocationManager Source #

Memory-managed wrapper type.

Constructors

GeolocationManager (ManagedPtr GeolocationManager) 

Instances

Instances details
Eq GeolocationManager Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

GObject GeolocationManager Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

ManagedPtrNewtype GeolocationManager Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

TypedObject GeolocationManager Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

Methods

glibType :: IO GType

HasParentTypes GeolocationManager Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

IsGValue (Maybe GeolocationManager) Source #

Convert GeolocationManager to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

type ParentTypes GeolocationManager Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

type ParentTypes GeolocationManager = '[Object]

class (GObject o, IsDescendantOf GeolocationManager o) => IsGeolocationManager o Source #

Type class for types which can be safely cast to GeolocationManager, for instance with toGeolocationManager.

Instances

Instances details
(GObject o, IsDescendantOf GeolocationManager o) => IsGeolocationManager o Source # 
Instance details

Defined in GI.WebKit2.Objects.GeolocationManager

toGeolocationManager :: (MonadIO m, IsGeolocationManager o) => o -> m GeolocationManager Source #

Cast to GeolocationManager, for types for which this is known to be safe. For general casts, use castTo.

Methods

failed

geolocationManagerFailed Source #

Arguments

:: (HasCallStack, MonadIO m, IsGeolocationManager a) 
=> a

manager: a GeolocationManager

-> Text

errorMessage: the error message

-> m () 

Notify manager that determining the position failed.

Since: 2.26

getEnableHighAccuracy

geolocationManagerGetEnableHighAccuracy Source #

Arguments

:: (HasCallStack, MonadIO m, IsGeolocationManager a) 
=> a

manager: a GeolocationManager

-> m Bool

Returns: Whether the setting is enabled.

Get whether high accuracy is enabled.

Since: 2.26

updatePosition

geolocationManagerUpdatePosition Source #

Notify manager that position has been updated to position.

Since: 2.26

Properties

enableHighAccuracy

Whether high accuracy is enabled. This is a read-only property that will be set to True when a GeolocationManager needs to get accurate position updates. You can connect to notifyenableHighAccuracy signal to monitor it.

Since: 2.26

getGeolocationManagerEnableHighAccuracy :: (MonadIO m, IsGeolocationManager o) => o -> m Bool Source #

Get the value of the “enable-high-accuracy” property. When overloading is enabled, this is equivalent to

get geolocationManager #enableHighAccuracy

Signals

start

type GeolocationManagerStartCallback Source #

Arguments

 = IO Bool

Returns: True to stop other handlers from being invoked for the event. False to propagate the event further.

The signal is emitted to notify that manager needs to start receiving position updates. After this signal is emitted the user should provide the updates using geolocationManagerUpdatePosition every time the position changes, or use geolocationManagerFailed in case it isn't possible to determine the current position.

If the signal is not handled, WebKit will try to determine the position using GeoClue if available.

Since: 2.26

afterGeolocationManagerStart :: (IsGeolocationManager a, MonadIO m) => a -> ((?self :: a) => GeolocationManagerStartCallback) -> m SignalHandlerId Source #

Connect a signal handler for the start signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after geolocationManager #start 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.

onGeolocationManagerStart :: (IsGeolocationManager a, MonadIO m) => a -> ((?self :: a) => GeolocationManagerStartCallback) -> m SignalHandlerId Source #

Connect a signal handler for the start signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on geolocationManager #start callback

stop

type GeolocationManagerStopCallback = IO () Source #

The signal is emitted to notify that manager doesn't need to receive position updates anymore.

Since: 2.26

afterGeolocationManagerStop :: (IsGeolocationManager a, MonadIO m) => a -> ((?self :: a) => GeolocationManagerStopCallback) -> m SignalHandlerId Source #

Connect a signal handler for the stop signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after geolocationManager #stop 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.

onGeolocationManagerStop :: (IsGeolocationManager a, MonadIO m) => a -> ((?self :: a) => GeolocationManagerStopCallback) -> m SignalHandlerId Source #

Connect a signal handler for the stop signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on geolocationManager #stop callback