WebKit2.GeolocationManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The signal is emitted to notify that manager needs to start receiving position updates. |
|
The signal is emitted to notify that manager doesn’t need to receive position updates anymore. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class WebKit2.GeolocationManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Geolocation manager.
WebKit2.GeolocationManager
provides API to get the geographical position of the user. Once aWebKit2.GeolocationPermissionRequest
is allowed, when WebKit needs to know the user locationWebKit2.GeolocationManager
::start
signal is emitted. If the signal is handled and returnsTrue
, the application is responsible for providing the position every time it’s updated by callingWebKit2.GeolocationManager.update_position
(). The signalWebKit2.GeolocationManager
::stop
will be emitted when location updates are no longer needed.New in version 2.26.
- failed(error_message)¶
- Parameters:
error_message (
str
) – the error message
Notify self that determining the position failed.
New in version 2.26.
- get_enable_high_accuracy()¶
- Returns:
Whether the setting is enabled.
- Return type:
Get whether high accuracy is enabled.
New in version 2.26.
- update_position(position)¶
- Parameters:
position (
WebKit2.GeolocationPosition
) – aWebKit2.GeolocationPosition
Notify self that position has been updated to position.
New in version 2.26.
Signal Details¶
- WebKit2.GeolocationManager.signals.start(geolocation_manager)¶
- Signal Name:
start
- Flags:
- Parameters:
geolocation_manager (
WebKit2.GeolocationManager
) – The object which received the signal- Returns:
True
to stop other handlers from being invoked for the event.False
to propagate the event further.- Return type:
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
WebKit2.GeolocationManager.update_position
() every time the position changes, or useWebKit2.GeolocationManager.failed
() 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.
New in version 2.26.
- WebKit2.GeolocationManager.signals.stop(geolocation_manager)¶
- Signal Name:
stop
- Flags:
- Parameters:
geolocation_manager (
WebKit2.GeolocationManager
) – The object which received the signal
The signal is emitted to notify that manager doesn’t need to receive position updates anymore.
New in version 2.26.
Property Details¶
- WebKit2.GeolocationManager.props.enable_high_accuracy¶
-
Whether high accuracy is enabled. This is a read-only property that will be set to
True
when aWebKit2.GeolocationManager
needs to get accurate position updates. You can connect to notify::enable-high-accuracy signal to monitor it.New in version 2.26.