Package org.gnome.webkit
Class GeolocationPosition
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.webkit.GeolocationPosition
- All Implemented Interfaces:
Proxy
An opaque struct to provide position updates to a
WebKitGeolocationManager
.
WebKitGeolocationPosition is an opaque struct used to provide position updates to a
WebKitGeolocationManager
using webkit_geolocation_manager_update_position().
-
Constructor Summary
ConstructorDescriptionGeolocationPosition
(double latitude, double longitude, double accuracy) Create a newWebKitGeolocationPosition
.GeolocationPosition
(MemorySegment address) Create a GeolocationPosition proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Make a copy of theWebKitGeolocationPosition
.void
free()
Free theWebKitGeolocationPosition
static Type
getType()
Get the GType of the GeolocationPosition classvoid
setAltitude
(double altitude) Set the this GeolocationPosition altitude.void
setAltitudeAccuracy
(double altitudeAccuracy) Set the accuracy of this GeolocationPosition altitude.void
setHeading
(double heading) Set the this GeolocationPosition heading.void
setSpeed
(double speed) Set the this GeolocationPosition speed.void
setTimestamp
(long timestamp) Set the this GeolocationPosition timestamp.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
GeolocationPosition
Create a GeolocationPosition proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
GeolocationPosition
public GeolocationPosition(double latitude, double longitude, double accuracy) throws UnsupportedPlatformException Create a newWebKitGeolocationPosition
.- Parameters:
latitude
- a valid latitude in degreeslongitude
- a valid longitude in degreesaccuracy
- accuracy of location in meters- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
-
Method Details
-
getType
-
copy
Make a copy of theWebKitGeolocationPosition
.- Returns:
- a copy of this GeolocationPosition
-
free
public void free()Free theWebKitGeolocationPosition
-
setAltitude
public void setAltitude(double altitude) Set the this GeolocationPosition altitude.- Parameters:
altitude
- altitude in meters
-
setAltitudeAccuracy
public void setAltitudeAccuracy(double altitudeAccuracy) Set the accuracy of this GeolocationPosition altitude.- Parameters:
altitudeAccuracy
- accuracy of position altitude in meters
-
setHeading
public void setHeading(double heading) Set the this GeolocationPosition heading.Set the this GeolocationPosition heading, as a positive angle between the direction of movement and the North direction, in clockwise direction.
- Parameters:
heading
- heading in degrees
-
setSpeed
public void setSpeed(double speed) Set the this GeolocationPosition speed.- Parameters:
speed
- speed in meters per second
-
setTimestamp
public void setTimestamp(long timestamp) Set the this GeolocationPosition timestamp.By default it's the time when the this GeolocationPosition was created.
- Parameters:
timestamp
- timestamp in seconds since the epoch, or 0 to use current time
-