[]Struct gio::AppInfoMonitor

pub struct AppInfoMonitor(_, _);

AppInfoMonitor is a very simple object used for monitoring the app info database for changes (ie: newly installed or removed applications).

Call AppInfoMonitor::get to get a AppInfoMonitor and connect to the "changed" signal.

In the usual case, applications should try to make note of the change (doing things like invalidating caches) but not act on it. In particular, applications should avoid making calls to AppInfo APIs in response to the change signal, deferring these until the time that the data is actually required. The exception to this case is when application information is actually being displayed on the screen (eg: during a search or when the list of all applications is shown). The reason for this is that changes to the list of installed applications often come in groups (like during system updates) and rescanning the list on every change is pointless and expensive.

Implements

glib::object::ObjectExt

Methods

impl AppInfoMonitor[src]

pub fn get() -> AppInfoMonitor[src]

Gets the AppInfoMonitor for the current thread-default main context.

The AppInfoMonitor will emit a "changed" signal in the thread-default main context whenever the list of installed applications (as reported by AppInfo::get_all) may have changed.

You must only call gobject::ObjectExt::unref on the return value from under the same main context as you created it.

Returns

a reference to a AppInfoMonitor

pub fn connect_changed<F: Fn(&AppInfoMonitor) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Signal emitted when the app info database for changes (ie: newly installed or removed applications).

Trait Implementations

impl Clone for AppInfoMonitor

impl Debug for AppInfoMonitor

impl Display for AppInfoMonitor[src]

impl Eq for AppInfoMonitor

impl Hash for AppInfoMonitor

impl Ord for AppInfoMonitor

impl<T: ObjectType> PartialEq<T> for AppInfoMonitor

impl<T: ObjectType> PartialOrd<T> for AppInfoMonitor

impl StaticType for AppInfoMonitor

Auto Trait Implementations

impl RefUnwindSafe for AppInfoMonitor

impl !Send for AppInfoMonitor

impl !Sync for AppInfoMonitor

impl Unpin for AppInfoMonitor

impl UnwindSafe for AppInfoMonitor

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.