Class GeolocationPosition

java.lang.Object
org.javagi.base.ProxyInstance
org.webkitgtk.GeolocationPosition
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class GeolocationPosition extends ProxyInstance

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().

Since:
2.26
  • Constructor Details

    • GeolocationPosition

      public GeolocationPosition(MemorySegment address)
      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)
      Create a new WebKitGeolocationPosition.
      Parameters:
      latitude - a valid latitude in degrees
      longitude - a valid longitude in degrees
      accuracy - accuracy of location in meters
      Since:
      2.26
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the GeolocationPosition class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • copy

      public GeolocationPosition copy()
      Make a copy of the WebKitGeolocationPosition.
      Returns:
      a copy of this GeolocationPosition
      Since:
      2.26
    • free

      public void free()
      Free the WebKitGeolocationPosition
      Since:
      2.26
    • setAltitude

      public void setAltitude(double altitude)
      Set the this GeolocationPosition altitude.
      Parameters:
      altitude - altitude in meters
      Since:
      2.26
    • setAltitudeAccuracy

      public void setAltitudeAccuracy(double altitudeAccuracy)
      Set the accuracy of this GeolocationPosition altitude.
      Parameters:
      altitudeAccuracy - accuracy of position altitude in meters
      Since:
      2.26
    • 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
      Since:
      2.26
    • setSpeed

      public void setSpeed(double speed)
      Set the this GeolocationPosition speed.
      Parameters:
      speed - speed in meters per second
      Since:
      2.26
    • 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
      Since:
      2.26