Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GtkRecentInfo

[13:7] extends: object

Contains the metadata associated with an item in the recently used files list.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GtkRecentInfo (Handle = null)

    Creates a new RecentInfo by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • create_app_info (string app_name)

    Creates a GAppInfo for the specified GtkRecentInfo In case of error,

    • @error will be set either with a %GTK_RECENT_MANAGER_ERROR or a %G_IO_ERROR
    • @p app_name is the name of the application that should be mapped to a GAppInfo; if %NULL is used then the default application for the MIME type is used.
    • @r the newly created GAppInfo.
  • exists ()

    Checks whether the resource pointed by @info still exists. At the moment this check is done only on resources pointing to local files.

    • @r %TRUE if the resource exists.
  • get_added ()

    Gets the time when the resource was added to the recently used resources list.

    • @r a GDateTime for the time when the resource was added.
  • get_age ()

    Gets the number of days elapsed since the last update of the resource pointed by @info.

    • @r a positive integer containing the number of days elapsed since the time this resource was last modified.
  • get_application_info (string app_name)

    Gets the data regarding the application that has registered the resource pointed by @info. If the command line contains any escape characters defined inside the storage specification, they will be expanded.

    • @p app_name is the name of the application that has registered this item.
    • @p app_exec is return location for the string containing the command line.
    • @p count is return location for the number of times this item was registered.
    • @p stamp is return location for the time this item was last registered for this application.
    • @r %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 GtkRecentInfo and should not be modified or freed.
  • get_applications ()

    Retrieves the list of applications that have registered this resource.

    • @p length is return location for the length of the returned list.
    • @r a newly allocated %NULL-terminated array of strings. Use g_strfreev() to free it..
  • get_description ()

    Gets the (short) description of the resource.

    • @r the description of the resource. The returned string is owned by the recent manager, and should not be freed..
  • get_display_name ()

    Gets the name of the resource. If none has been defined, the basename of the resource is obtained.

    • @r the display name of the resource. The returned string is owned by the recent manager, and should not be freed..
  • get_gicon ()

    Retrieves the icon associated to the resource MIME type.

    • @r a GIcon containing the icon.
  • get_groups ()

    Returns all groups registered for the recently used item @info. The array of returned group names will be %NULL terminated, so length might optionally be %NULL.

    • @p length is return location for the number of groups returned.
    • @r a newly allocated %NULL terminated array of strings. Use g_strfreev() to free it..
  • get_mime_type ()

    Gets the MIME type of the resource.

    • @r the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed..
  • get_modified ()

    Gets the time when the meta-data for the resource was last modified.

    • @r a GDateTime for the time when the resource was last modified.
  • get_private_hint ()

    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.

    • @r %TRUE if the private flag was found, %FALSE otherwise.
  • get_short_name ()

    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”.

    • @r A newly-allocated string in UTF-8 encoding free it with g_free().
  • get_uri ()

    Gets the URI of the resource.

    • @r the URI of the resource. The returned string is owned by the recent manager, and should not be freed..
  • get_uri_display ()

    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 [method@Gtk.RecentInfo.get_uri].

    • @r a newly allocated UTF-8 string containing the resource’s URI or %NULL. Use g_free() when done using it..
  • get_visited ()

    Gets the time when the meta-data for the resource was last visited.

    • @r a GDateTime for the time when the resource was last visited.
  • has_application (string app_name)

    Checks whether an application registered this resource using @app_name.

    • @p app_name is a string containing an application name.
    • @r %TRUE if an application with name @app_name was found, %FALSE otherwise.
  • has_group (string group_name)

    Checks whether @group_name appears inside the groups registered for the recently used item @info.

    • @p group_name is name of a group.
    • @r %TRUE if the group was found.
  • is_local ()

    Checks whether the resource is local or not by looking at the scheme of its URI.

    • @r %TRUE if the resource is local.
  • last_application ()

    Gets the name of the last application that have registered the recently used resource represented by @info.

    • @r an application name. Use g_free() to free it..
  • match (object info_b)

    Checks whether two GtkRecentInfo point to the same resource.

    • @p info_b is a GtkRecentInfo.
    • @r %TRUE if both GtkRecentInfo point to the same resource, %FALSE otherwise.
  • ref ()

    Increases the reference count of @recent_info by one.

    • @r the recent info object with its reference count increased by one.
  • unref ()

    Decreases the reference count of @info by one. If the reference count reaches zero, @info is deallocated, and the memory freed.

    • @r None.