## GtkBookmarkList GtkBookmarkList — A list model for recently used files |

## Functions

GtkBookmarkList * | gtk_bookmark_list_new ()
const char * | gtk_bookmark_list_get_filename ()
void | gtk_bookmark_list_set_attributes ()
const char * | gtk_bookmark_list_get_attributes ()
void | gtk_bookmark_list_set_io_priority ()
int | gtk_bookmark_list_get_io_priority ()
gboolean | gtk_bookmark_list_is_loading ()

## Properties

char * | attributes | Read / Write
char * | filename | Read / Write / Construct Only
int | io-priority | Read / Write
gboolean | loading | Read

## Types and Values

| GtkBookmarkList

## Object Hierarchy

        GObject
        ╰── GtkBookmarkList

## Implemented Interfaces

GtkBookmarkList implements GListModel.

## Includes

    #include <gtk/gtk.h>

## Description

GtkBookmarkList is a list model that wraps GBookmarkFile. It presents a GListModel and fills it asynchronously with the GFileInfos returned from that function.

The GFileInfos in the list have some attributes in the recent namespace added: recent::private (boolean) and recent:applications (stringv).

## Functions

### gtk_bookmark_list_new ()

    GtkBookmarkList *
    gtk_bookmark_list_new (const char *filename,
                           const char *attributes);

Creates a new GtkBookmarkList with the given `attributes` .

#### Parameters

filename | The bookmark file to load. | [allow-none]
attributes | The attributes to query. | [allow-none]

#### Returns

a new GtkBookmarkList

### gtk_bookmark_list_get_filename ()

    const char *
    gtk_bookmark_list_get_filename (GtkBookmarkList *self);

Returns the filename of the bookmark file that this list is loading.

#### Parameters

self | a GtkBookmarkList |

#### Returns

the filename of the .xbel file

### gtk_bookmark_list_set_attributes ()

    void
    gtk_bookmark_list_set_attributes (GtkBookmarkList *self,
                                      const char *attributes);

Sets the `attributes` to be enumerated and starts the enumeration.

If `attributes` is `NULL`, no attributes will be queried, but a list of GFileInfos will still be created.

#### Parameters

self | a GtkBookmarkList |
attributes | the attributes to enumerate. | [allow-none]

### gtk_bookmark_list_get_attributes ()

    const char *
    gtk_bookmark_list_get_attributes (GtkBookmarkList *self);

Gets the attributes queried on the children.

#### Parameters

self | a GtkBookmarkList |

#### Returns

The queried attributes.

[nullable][transfer none]

### gtk_bookmark_list_set_io_priority ()

    void
    gtk_bookmark_list_set_io_priority (GtkBookmarkList *self,
                                       int io_priority);

Sets the IO priority to use while loading files.

The default IO priority is `G_PRIORITY_DEFAULT`.

#### Parameters

self | a GtkBookmarkList |
io_priority | IO priority to use |

### gtk_bookmark_list_get_io_priority ()

    int
    gtk_bookmark_list_get_io_priority (GtkBookmarkList *self);

Gets the IO priority set via `gtk_bookmark_list_set_io_priority()`.

#### Parameters

self | a GtkBookmarkList |

#### Returns

The IO priority.

### gtk_bookmark_list_is_loading ()

    gboolean
    gtk_bookmark_list_is_loading (GtkBookmarkList *self);

Returns `TRUE` if the files are currently being loaded.

Files will be added to `self` from time to time while loading is going on. The order in which are added is undefined and may change in between runs.

#### Parameters

self | a GtkBookmarkList |

#### Returns

`TRUE` if `self` is loading

## Types and Values

### GtkBookmarkList

    typedef struct _GtkBookmarkList GtkBookmarkList;

## Property Details

### The `“attributes”` property

      “attributes”               char *

The attributes to query

Owner: GtkBookmarkList

Flags: Read / Write

Default value: NULL

### The `“filename”` property

      “filename”                 char *

Bookmark file to load.

Owner: GtkBookmarkList

Flags: Read / Write / Construct Only

Default value: NULL

### The `“io-priority”` property

      “io-priority”              int

Priority used when loading

Owner: GtkBookmarkList

Flags: Read / Write

Allowed values: >= -2147483647

Default value: 0

### The `“loading”` property

      “loading”                  gboolean

`TRUE` if files are being loaded

Owner: GtkBookmarkList

Flags: Read

Default value: FALSE

## See Also

GListModel, GBookmarkFile