pub struct FpDevice { /* private fields */ }Expand description
Fingerpint device routines. You can interact with fingerprint devices using this struct.
§Examples:
use libfprint_rs::FpContext;
let context = FpContext::new();
let devices = context.devices();
let device = devices.get(0).unwrap();
device.open_sync(None).unwrap();
let name = device.name().unwrap();
println!("Device name: {}", name);GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl FpDevice
impl FpDevice
Sourcepub fn open_sync(&self, cancellable: Option<&Cancellable>) -> Result<(), GError>
pub fn open_sync(&self, cancellable: Option<&Cancellable>) -> Result<(), GError>
Open the device synchronously.
§Example:
use libfprint_rs::{FpDevice, FpContext};
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();Examples found in repository?
3fn main() {
4 // Get devices
5 let ctx = FpContext::new();
6 let devices = ctx.devices();
7 let dev = devices.first().unwrap();
8 dev.open_sync(None).unwrap();
9
10 // Create a template print
11 let template = FpPrint::new(dev);
12 let enrolled_print = dev
13 .enroll_sync(template, None, Some(progress_cb), None)
14 .unwrap();
15
16 // New print where we will store the next print
17 let mut new_print = FpPrint::new(dev);
18
19 // Verify if the next print matches the previously enrolled print
20 let matched = dev
21 .verify_sync(
22 &enrolled_print,
23 None,
24 Some(match_cb),
25 None,
26 Some(&mut new_print),
27 )
28 .unwrap();
29 if matched {
30 println!("Matched again");
31 }
32}More examples
5fn main() {
6 // Get context
7 let ctx = FpContext::new();
8 // Collect connected devices
9 let devices = ctx.devices();
10
11 // Get the first connected device
12 let dev = devices.first().unwrap();
13
14 // Open the device to start operations
15 dev.open_sync(None).unwrap();
16
17 // Create a template print
18 let template = FpPrint::new(dev);
19 template.set_finger(FpFinger::RightRing);
20 template.set_username("test");
21
22 // User data that we will use on the callback function,
23 // to mutate the value of a counter, it must be wrapped in an Arc<Mutex<T>>
24 let counter = Arc::new(Mutex::new(0));
25
26 // Get the new print from the user
27 let _new_print = dev
28 .enroll_sync(template, None, Some(progress_cb), Some(counter.clone()))
29 .unwrap();
30
31 // Get the total of time the enroll callback was called
32 println!("Total enroll stages: {}", counter.lock().unwrap());
33}Sourcepub fn close_sync(
&self,
cancellable: Option<&Cancellable>,
) -> Result<(), GError>
pub fn close_sync( &self, cancellable: Option<&Cancellable>, ) -> Result<(), GError>
Close the device synchronously.
§Example:
use libfprint_rs::{FpDevice, FpContext};
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
dev.close_sync(None).unwrap();Sourcepub fn enroll_sync<T>(
&self,
template: FpPrint,
cancellable: Option<&Cancellable>,
progress_cb: Option<FpEnrollProgress<T>>,
progress_data: Option<T>,
) -> Result<FpPrint, GError>
pub fn enroll_sync<T>( &self, template: FpPrint, cancellable: Option<&Cancellable>, progress_cb: Option<FpEnrollProgress<T>>, progress_data: Option<T>, ) -> Result<FpPrint, GError>
Enroll a new print.
Enrolls a print, progress_cb will be called for each stage of the enrollment process.
§Example:
use libfprint_rs::{FpDevice, FpContext, FpPrint};
pub fn enroll_cb(device: &FpDevice,enroll_stage: i32, print: Option<FpPrint>, error: Option<libfprint_rs::GError>, data: &Option<i32>,) -> () {
println!("Enroll stage: {}", enroll_stage);
}
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
let template = FpPrint::new(&dev);
let new_print = dev.enroll_sync(template, None, Some(enroll_cb), Some(10)).unwrap();
dev.close_sync(None).unwrap();Examples found in repository?
3fn main() {
4 // Get devices
5 let ctx = FpContext::new();
6 let devices = ctx.devices();
7 let dev = devices.first().unwrap();
8 dev.open_sync(None).unwrap();
9
10 // Create a template print
11 let template = FpPrint::new(dev);
12 let enrolled_print = dev
13 .enroll_sync(template, None, Some(progress_cb), None)
14 .unwrap();
15
16 // New print where we will store the next print
17 let mut new_print = FpPrint::new(dev);
18
19 // Verify if the next print matches the previously enrolled print
20 let matched = dev
21 .verify_sync(
22 &enrolled_print,
23 None,
24 Some(match_cb),
25 None,
26 Some(&mut new_print),
27 )
28 .unwrap();
29 if matched {
30 println!("Matched again");
31 }
32}More examples
5fn main() {
6 // Get context
7 let ctx = FpContext::new();
8 // Collect connected devices
9 let devices = ctx.devices();
10
11 // Get the first connected device
12 let dev = devices.first().unwrap();
13
14 // Open the device to start operations
15 dev.open_sync(None).unwrap();
16
17 // Create a template print
18 let template = FpPrint::new(dev);
19 template.set_finger(FpFinger::RightRing);
20 template.set_username("test");
21
22 // User data that we will use on the callback function,
23 // to mutate the value of a counter, it must be wrapped in an Arc<Mutex<T>>
24 let counter = Arc::new(Mutex::new(0));
25
26 // Get the new print from the user
27 let _new_print = dev
28 .enroll_sync(template, None, Some(progress_cb), Some(counter.clone()))
29 .unwrap();
30
31 // Get the total of time the enroll callback was called
32 println!("Total enroll stages: {}", counter.lock().unwrap());
33}Sourcepub fn verify_sync<T>(
&self,
enrolled_print: &FpPrint,
cancellable: Option<Cancellable>,
match_cb: Option<FpMatchCb<T>>,
match_data: Option<T>,
print: Option<&mut FpPrint>,
) -> Result<bool, GError>
pub fn verify_sync<T>( &self, enrolled_print: &FpPrint, cancellable: Option<Cancellable>, match_cb: Option<FpMatchCb<T>>, match_data: Option<T>, print: Option<&mut FpPrint>, ) -> Result<bool, GError>
Verify a given print synchronously.
match_cb will be called when the verification is done.
§Example:
use libfprint_rs::{FpDevice, FpContext, FpPrint, GError};
pub fn match_cb(device: &FpDevice, matched_print: Option<FpPrint>, enrolled_print: FpPrint,
error: Option<GError>, data: &Option<i32>) {
if matched_print.is_some() {
println!("Matched print: {:?}", matched_print);
}
}
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
let some_print: FpPrint = foreign_function_that_gets_print();
let mut new_print = FpPrint::new(&dev); // The variable that will hold the new print
let verified = dev.verify_sync(&some_print, None, Some(match_cb), Some(10), Some(&mut
new_print)).unwrap();
if verified {
println!("Print verified");println
}Examples found in repository?
3fn main() {
4 // Get devices
5 let ctx = FpContext::new();
6 let devices = ctx.devices();
7 let dev = devices.first().unwrap();
8 dev.open_sync(None).unwrap();
9
10 // Create a template print
11 let template = FpPrint::new(dev);
12 let enrolled_print = dev
13 .enroll_sync(template, None, Some(progress_cb), None)
14 .unwrap();
15
16 // New print where we will store the next print
17 let mut new_print = FpPrint::new(dev);
18
19 // Verify if the next print matches the previously enrolled print
20 let matched = dev
21 .verify_sync(
22 &enrolled_print,
23 None,
24 Some(match_cb),
25 None,
26 Some(&mut new_print),
27 )
28 .unwrap();
29 if matched {
30 println!("Matched again");
31 }
32}Sourcepub fn suspend_sync(
&self,
cancellable: Option<&Cancellable>,
) -> Result<(), GError>
pub fn suspend_sync( &self, cancellable: Option<&Cancellable>, ) -> Result<(), GError>
Prepare device for suspend.
Sourcepub fn resume_sync(
&self,
cancellable: Option<&Cancellable>,
) -> Result<(), GError>
pub fn resume_sync( &self, cancellable: Option<&Cancellable>, ) -> Result<(), GError>
Resume device after suspend.
Sourcepub fn identify_sync<T>(
&self,
prints: &[FpPrint],
cancellable: Option<&Cancellable>,
match_cb: Option<FpMatchCb<T>>,
match_data: Option<T>,
print: Option<&mut FpPrint>,
) -> Result<Option<FpPrint>, GError>
pub fn identify_sync<T>( &self, prints: &[FpPrint], cancellable: Option<&Cancellable>, match_cb: Option<FpMatchCb<T>>, match_data: Option<T>, print: Option<&mut FpPrint>, ) -> Result<Option<FpPrint>, GError>
Identify a print synchronously.
match_cb will be called when a print matches or at the end of the operation.
§Example:
use libfprint_rs::{FpDevice, FpContext, FpPrint, GError};
pub fn match_cb(device: &FpDevice, matched_print: Option<FpPrint>, enrolled_print: FpPrint,
error: Option<GError>, data: &Option<i32>) {
if matched_print.is_some() {
println!("Matched print: {:?}", matched_print);
}
}
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
let vec_prints: Vec<FpPrint> = function_returning_Vec_prints();
let mut new_print = FpPrint::new(&dev); // The variable that will hold the new print
let print_identified = dev.identify_sync(&vec_prints, None, Some(match_cb), Some(10), Some(&mut
new_print)).unwrap();
if print_identified.is_some() {
println!("Found matching print on vector passed");
}Sourcepub fn capture_sync(
&self,
wait_for_finger: bool,
cancellable: Option<&Cancellable>,
) -> Result<FpImage, GError>
pub fn capture_sync( &self, wait_for_finger: bool, cancellable: Option<&Cancellable>, ) -> Result<FpImage, GError>
Start an synchronous operation to capture an image.
§Example:
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
let image = dev.capture_sync(true, None).unwrap();Sourcepub fn delete_print_sync()
pub fn delete_print_sync()
Delete a given print from the device.
Sourcepub fn list_prints_sync()
pub fn list_prints_sync()
List device stored prints synchronously.
Sourcepub fn clear_storage_sync()
pub fn clear_storage_sync()
Clear sensor storage.
Source§impl FpDevice
impl FpDevice
Sourcepub fn nr_enroll_stage(&self) -> i32
pub fn nr_enroll_stage(&self) -> i32
Retrieves the number of enroll stages for this device.
Sourcepub fn finger_status(&self) -> FpFingerStatus
pub fn finger_status(&self) -> FpFingerStatus
Retrieves the finger status flags for the device. This can be used by the UI to present the relevant feedback, although it is not guaranteed to be a relevant value when not performing any action.
Sourcepub fn features(&self) -> Vec<FpDeviceFeature>
pub fn features(&self) -> Vec<FpDeviceFeature>
Gets the FpDeviceFeature’s supported by the device .
Sourcepub fn has_feature(&self, feature: FpDeviceFeature) -> bool
pub fn has_feature(&self, feature: FpDeviceFeature) -> bool
Checks if device supports the requested FpDeviceFeature.
Trait Implementations§
Source§impl HasParamSpec for FpDevice
impl HasParamSpec for FpDevice
Source§impl Ord for FpDevice
impl Ord for FpDevice
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<OT: ObjectType> PartialEq<OT> for FpDevice
impl<OT: ObjectType> PartialEq<OT> for FpDevice
Source§impl<OT: ObjectType> PartialOrd<OT> for FpDevice
impl<OT: ObjectType> PartialOrd<OT> for FpDevice
Source§impl StaticType for FpDevice
impl StaticType for FpDevice
Source§fn static_type() -> Type
fn static_type() -> Type
Self.impl Eq for FpDevice
impl IsA<AsyncInitable> for FpDevice
Auto Trait Implementations§
impl Freeze for FpDevice
impl RefUnwindSafe for FpDevice
impl !Send for FpDevice
impl !Sync for FpDevice
impl Unpin for FpDevice
impl UnwindSafe for FpDevice
Blanket Implementations§
Source§impl<O> AsyncInitableExt for Owhere
O: IsA<AsyncInitable>,
impl<O> AsyncInitableExt for Owhere
O: IsA<AsyncInitable>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast will do many checks at compile-time already. downcast will
perform the same checks at runtime as dynamic_cast, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true if the object is an instance of (can be cast to) T.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name of the object. Read moreSource§fn has_property(&self, property_name: &str) -> bool
fn has_property(&self, property_name: &str) -> bool
property_name.Source§fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
property_name of the given type_.Source§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec of the property property_name of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values, or
invoke when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit but takes Value for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify signal of the object. Read more