Struct libfprint_rs::FpDevice
source · #[repr(transparent)]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);
Implementations§
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.
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?
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
fn main() {
// Get devices
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
// Create a template print
let template = FpPrint::new(&dev);
let enrolled_print = dev
.enroll_sync(template, None, Some(progress_cb), None)
.unwrap();
// New print where we will store the next print
let mut new_print = FpPrint::new(&dev);
// Verify if the next print matches the previously enrolled print
let matched = dev
.verify_sync(
&enrolled_print,
None,
Some(match_cb),
None,
Some(&mut new_print),
)
.unwrap();
if matched {
println!("Matched again");
}
}
More examples
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
fn main() {
// Get context
let ctx = FpContext::new();
// Collect connected devices
let devices = ctx.devices();
// Get the first connected device
let dev = devices.get(0).unwrap();
// Open the device to start operations
dev.open_sync(None).unwrap();
// Create a template print
let template = FpPrint::new(&dev);
template.set_finger(FpFinger::RightRing);
template.set_username("test");
// User data that we will use on the callback function,
// to mutate the value of a counter, it must be wrapped in an Arc<Mutex<T>>
let counter = Arc::new(Mutex::new(0));
// Get the new print from the user
let _new_print = dev
.enroll_sync(template, None, Some(progress_cb), Some(counter.clone()))
.unwrap();
// Get the total of time the enroll callback was called
println!("Total enroll stages: {}", counter.lock().unwrap());
}
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?
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
fn main() {
// Get devices
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
// Create a template print
let template = FpPrint::new(&dev);
let enrolled_print = dev
.enroll_sync(template, None, Some(progress_cb), None)
.unwrap();
// New print where we will store the next print
let mut new_print = FpPrint::new(&dev);
// Verify if the next print matches the previously enrolled print
let matched = dev
.verify_sync(
&enrolled_print,
None,
Some(match_cb),
None,
Some(&mut new_print),
)
.unwrap();
if matched {
println!("Matched again");
}
}
More examples
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
fn main() {
// Get context
let ctx = FpContext::new();
// Collect connected devices
let devices = ctx.devices();
// Get the first connected device
let dev = devices.get(0).unwrap();
// Open the device to start operations
dev.open_sync(None).unwrap();
// Create a template print
let template = FpPrint::new(&dev);
template.set_finger(FpFinger::RightRing);
template.set_username("test");
// User data that we will use on the callback function,
// to mutate the value of a counter, it must be wrapped in an Arc<Mutex<T>>
let counter = Arc::new(Mutex::new(0));
// Get the new print from the user
let _new_print = dev
.enroll_sync(template, None, Some(progress_cb), Some(counter.clone()))
.unwrap();
// Get the total of time the enroll callback was called
println!("Total enroll stages: {}", counter.lock().unwrap());
}
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?
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
fn main() {
// Get devices
let ctx = FpContext::new();
let devices = ctx.devices();
let dev = devices.get(0).unwrap();
dev.open_sync(None).unwrap();
// Create a template print
let template = FpPrint::new(&dev);
let enrolled_print = dev
.enroll_sync(template, None, Some(progress_cb), None)
.unwrap();
// New print where we will store the next print
let mut new_print = FpPrint::new(&dev);
// Verify if the next print matches the previously enrolled print
let matched = dev
.verify_sync(
&enrolled_print,
None,
Some(match_cb),
None,
Some(&mut new_print),
)
.unwrap();
if matched {
println!("Matched again");
}
}
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: &Vec<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: &Vec<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.
Trait Implementations§
source§impl HasParamSpec for FpDevice
impl HasParamSpec for FpDevice
source§impl Ord for FpDevice
impl Ord for FpDevice
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
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§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
impl Send for FpDevice
impl Sync for FpDevice
Auto Trait Implementations§
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> 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 Twhere
T: Into<Value>,
impl<T> IntoClosureReturnValue for Twhere T: Into<Value>,
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>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<T>,
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<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 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
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
signal_name
on this object. Read moresource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
signal_id
on this object. Read moresource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + 'static,
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,
signal_name
on this object. Read moresource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + 'static,
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,
signal_id
on this object. Read moresource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,
signal_name
on this object. Read moresource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,
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) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec) + Send + Sync + 'static,
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + Send + Sync + 'static,
notify
signal of the object. Read moresource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec) + 'static,
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + 'static,
notify
signal of the object. Read moresource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec),
notify
signal of the object. Read moresource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + Send + 'static,
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + Send + 'static,
source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + 'static,
source§fn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'f, 't, O, 'a>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str ) -> BindingBuilder<'a, 'f, 't>where O: ObjectType,
source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.