Trait webkit2gtk::prelude::GeolocationManagerExt
source · [−]pub trait GeolocationManagerExt: 'static {
fn failed(&self, error_message: &str);
fn enables_high_accuracy(&self) -> bool;
fn update_position(&self, position: &mut GeolocationPosition);
fn connect_start<F: Fn(&Self) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_stop<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_enable_high_accuracy_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Available on crate feature
v2_26
only.Expand description
Required Methods
sourcefn enables_high_accuracy(&self) -> bool
fn enables_high_accuracy(&self) -> bool
sourcefn update_position(&self, position: &mut GeolocationPosition)
fn update_position(&self, position: &mut GeolocationPosition)
sourcefn connect_start<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId
fn connect_start<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId
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 update_position()
every time
the position changes, or use 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.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
sourcefn connect_stop<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_stop<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The signal is emitted to notify that manager
doesn’t need to receive
position updates anymore.