nautilus-view-model.h 1.7 KB
Newer Older
1
#pragma once
2 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

#include <glib.h>
#include "nautilus-file.h"
#include "nautilus-view-item-model.h"

G_BEGIN_DECLS

#define NAUTILUS_TYPE_VIEW_MODEL (nautilus_view_model_get_type())

G_DECLARE_FINAL_TYPE (NautilusViewModel, nautilus_view_model, NAUTILUS, VIEW_MODEL, GObject)

typedef struct
{
    NautilusFileSortType sort_type;
    gboolean reversed;
    gboolean directories_first;
} NautilusViewModelSortData;

NautilusViewModel * nautilus_view_model_new (void);

void nautilus_view_model_set_sort_type (NautilusViewModel         *self,
                                        NautilusViewModelSortData *sort_data);
NautilusViewModelSortData * nautilus_view_model_get_sort_type (NautilusViewModel *self);
GListStore * nautilus_view_model_get_g_model (NautilusViewModel *self);
NautilusViewItemModel * nautilus_view_model_get_item_from_file (NautilusViewModel *self,
                                                                NautilusFile      *file);
GQueue * nautilus_view_model_get_items_from_files (NautilusViewModel *self,
                                                   GQueue            *files);
30
/* Don't use inside a loop, use nautilus_view_model_remove_all_items instead. */
31 32
void nautilus_view_model_remove_item (NautilusViewModel     *self,
                                      NautilusViewItemModel *item);
33 34
void nautilus_view_model_remove_all_items (NautilusViewModel *self);
/* Don't use inside a loop, use nautilus_view_model_add_items instead. */
35 36
void nautilus_view_model_add_item (NautilusViewModel     *self,
                                   NautilusViewItemModel *item);
37 38
void nautilus_view_model_add_items (NautilusViewModel *self,
                                    GQueue            *items);
39 40

G_END_DECLS