[−]Struct gtk::RecentInfo
RecentInfo
-struct contains private data only, and should
be accessed using the provided API.
RecentInfo
constains all the meta-data
associated with an entry in the recently used files list.
Implementations
impl RecentInfo
[src]
pub fn create_app_info(
&self,
app_name: Option<&str>
) -> Result<Option<AppInfo>, Error>
[src]
&self,
app_name: Option<&str>
) -> Result<Option<AppInfo>, Error>
Creates a gio::AppInfo
for the specified RecentInfo
app_name
the name of the application that should
be mapped to a gio::AppInfo
; if None
is used then the default
application for the MIME type is used
Returns
the newly created gio::AppInfo
, or None
.
In case of error, error
will be set either with a
GTK_RECENT_MANAGER_ERROR
or a G_IO_ERROR
pub fn exists(&self) -> bool
[src]
Checks whether the resource pointed by self
still exists.
At the moment this check is done only on resources pointing
to local files.
Returns
true
if the resource exists
pub fn get_added(&self) -> c_long
[src]
Gets the timestamp (seconds from system’s Epoch) when the resource was added to the recently used resources list.
Returns
the number of seconds elapsed from system’s Epoch when the resource was added to the list, or -1 on failure.
pub fn get_age(&self) -> i32
[src]
Gets the number of days elapsed since the last update
of the resource pointed by self
.
Returns
a positive integer containing the number of days elapsed since the time this resource was last modified
pub fn get_application_info(
&self,
app_name: &str
) -> Option<(GString, u32, c_long)>
[src]
&self,
app_name: &str
) -> Option<(GString, u32, c_long)>
Gets the data regarding the application that has registered the resource
pointed by self
.
If the command line contains any escape characters defined inside the storage specification, they will be expanded.
app_name
the name of the application that has registered this item
app_exec
return location for the string containing the command line
count
return location for the number of times this item was registered
time_
return location for the timestamp this item was last registered for this application
Returns
true
if an application with app_name
has registered this
resource inside the recently used list, or false
otherwise. The
app_exec
string is owned by the RecentInfo
and should not be
modified or freed
pub fn get_applications(&self) -> Vec<GString>
[src]
Retrieves the list of applications that have registered this resource.
length
return location for the length of the returned list
Returns
a newly allocated None
-terminated array of strings.
Use g_strfreev
to free it.
pub fn get_description(&self) -> Option<GString>
[src]
Gets the (short) description of the resource.
Returns
the description of the resource. The returned string is owned by the recent manager, and should not be freed.
pub fn get_display_name(&self) -> Option<GString>
[src]
Gets the name of the resource. If none has been defined, the basename of the resource is obtained.
Returns
the display name of the resource. The returned string is owned by the recent manager, and should not be freed.
pub fn get_gicon(&self) -> Option<Icon>
[src]
Retrieves the icon associated to the resource MIME type.
Returns
a gio::Icon
containing the icon, or None
.
Use gobject::ObjectExt::unref
when finished using the icon
pub fn get_groups(&self) -> Vec<GString>
[src]
Returns all groups registered for the recently used item self
.
The array of returned group names will be None
terminated, so
length might optionally be None
.
length
return location for the number of groups returned
Returns
a newly allocated None
terminated array of strings.
Use g_strfreev
to free it.
pub fn get_icon(&self, size: i32) -> Option<Pixbuf>
[src]
Retrieves the icon of size size
associated to the resource MIME type.
size
the size of the icon in pixels
Returns
a gdk_pixbuf::Pixbuf
containing the icon,
or None
. Use gobject::ObjectExt::unref
when finished using the icon.
pub fn get_mime_type(&self) -> Option<GString>
[src]
Gets the MIME type of the resource.
Returns
the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed.
pub fn get_modified(&self) -> c_long
[src]
Gets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last modified.
Returns
the number of seconds elapsed from system’s Epoch when the resource was last modified, or -1 on failure.
pub fn get_private_hint(&self) -> bool
[src]
Gets the value of the “private” flag. Resources in the recently used
list that have this flag set to true
should only be displayed by the
applications that have registered them.
Returns
true
if the private flag was found, false
otherwise
pub fn get_short_name(&self) -> Option<GString>
[src]
Computes a valid UTF-8 string that can be used as the name of the item in a menu or list. For example, calling this function on an item that refers to “file:///foo/bar.txt” will yield “bar.txt”.
Returns
A newly-allocated string in UTF-8 encoding
free it with g_free
pub fn get_uri(&self) -> Option<GString>
[src]
Gets the URI of the resource.
Returns
the URI of the resource. The returned string is owned by the recent manager, and should not be freed.
pub fn get_uri_display(&self) -> Option<GString>
[src]
Gets a displayable version of the resource’s URI. If the resource
is local, it returns a local path; if the resource is not local,
it returns the UTF-8 encoded content of RecentInfo::get_uri
.
Returns
a newly allocated UTF-8 string containing the
resource’s URI or None
. Use g_free
when done using it.
pub fn get_visited(&self) -> c_long
[src]
Gets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last visited.
Returns
the number of seconds elapsed from system’s Epoch when the resource was last visited, or -1 on failure.
pub fn has_application(&self, app_name: &str) -> bool
[src]
Checks whether an application registered this resource using app_name
.
app_name
a string containing an application name
Returns
true
if an application with name app_name
was found,
false
otherwise
pub fn has_group(&self, group_name: &str) -> bool
[src]
Checks whether group_name
appears inside the groups
registered for the recently used item self
.
group_name
name of a group
Returns
true
if the group was found
pub fn is_local(&self) -> bool
[src]
Checks whether the resource is local or not by looking at the scheme of its URI.
Returns
true
if the resource is local
pub fn last_application(&self) -> Option<GString>
[src]
Gets the name of the last application that have registered the
recently used resource represented by self
.
Returns
an application name. Use g_free
to free it.
pub fn match_(&self, info_b: &RecentInfo) -> bool
[src]
Trait Implementations
impl Clone for RecentInfo
fn clone(&self) -> RecentInfo
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RecentInfo
[src]
impl Eq for RecentInfo
[src]
impl Hash for RecentInfo
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for RecentInfo
[src]
fn cmp(&self, other: &RecentInfo) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<RecentInfo> for RecentInfo
[src]
fn eq(&self, other: &RecentInfo) -> bool
[src]
fn ne(&self, other: &RecentInfo) -> bool
[src]
impl PartialOrd<RecentInfo> for RecentInfo
[src]
fn partial_cmp(&self, other: &RecentInfo) -> Option<Ordering>
[src]
fn lt(&self, other: &RecentInfo) -> bool
[src]
fn le(&self, other: &RecentInfo) -> bool
[src]
fn gt(&self, other: &RecentInfo) -> bool
[src]
fn ge(&self, other: &RecentInfo) -> bool
[src]
impl StaticType for RecentInfo
fn static_type() -> Type
impl StructuralEq for RecentInfo
[src]
impl StructuralPartialEq for RecentInfo
[src]
Auto Trait Implementations
impl RefUnwindSafe for RecentInfo
impl !Send for RecentInfo
impl !Sync for RecentInfo
impl Unpin for RecentInfo
impl UnwindSafe for RecentInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_full_from_slice(_t: &[T]) -> *const GList
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
_t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_full_from_slice(_t: &[T]) -> *const GPtrArray
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GArray
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GList
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GPtrArray
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
impl<T> ToValue for T where
T: SetValue + ?Sized,
T: SetValue + ?Sized,
fn to_value(&self) -> Value
fn to_value_type(&self) -> Type
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,