Package org.gnome.webkit
Class GeolocationManager.Builder<B extends GeolocationManager.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.webkit.GeolocationManager.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
GeolocationManager
public static class GeolocationManager.Builder<B extends GeolocationManager.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theGeolocationManager
object.onStart
(GeolocationManager.StartCallback handler) The signal is emitted to notify thatmanager
needs to start receiving position updates.onStop
(GeolocationManager.StopCallback handler) The signal is emitted to notify thatmanager
doesn't need to receive position updates anymore.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theGeolocationManager
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toGeolocationManager
.- Overrides:
build
in classGObject.Builder<B extends GeolocationManager.Builder<B>>
- Returns:
- a new instance of
GeolocationManager
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
onStart
The signal is emitted to notify thatmanager
needs to start receiving position updates. After this signal is emitted the user should provide the updates using webkit_geolocation_manager_update_position() every time the position changes, or use webkit_geolocation_manager_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.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onStop
The signal is emitted to notify thatmanager
doesn't need to receive position updates anymore.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-