1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3
/* fm-list-model.h - a GtkTreeModel for file lists.
5
Copyright (C) 2001, 2002 Anders Carlsson
7
The Gnome Library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Library General Public License as
9
published by the Free Software Foundation; either version 2 of the
10
License, or (at your option) any later version.
12
The Gnome Library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Library General Public License for more details.
17
You should have received a copy of the GNU Library General Public
18
License along with the Gnome Library; see the file COPYING.LIB. If not,
19
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
Boston, MA 02111-1307, USA.
22
Authors: Anders Carlsson <andersca@gnu.org>
28
#include "gof-directory-async.h"
29
/*#include <libnautilus-private/nautilus-file.h>
30
#include <libnautilus-private/nautilus-directory.h>
31
#include <libnautilus-extension/nautilus-column.h>*/
33
#ifndef FM_LIST_MODEL_H
34
#define FM_LIST_MODEL_H
36
#define FM_TYPE_LIST_MODEL fm_list_model_get_type()
37
#define FM_LIST_MODEL(obj) \
38
(G_TYPE_CHECK_INSTANCE_CAST ((obj), FM_TYPE_LIST_MODEL, FMListModel))
39
#define FM_LIST_MODEL_CLASS(klass) \
40
(G_TYPE_CHECK_CLASS_CAST ((klass), FM_TYPE_LIST_MODEL, FMListModelClass))
41
#define FM_IS_LIST_MODEL(obj) \
42
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), FM_TYPE_LIST_MODEL))
43
#define FM_IS_LIST_MODEL_CLASS(klass) \
44
(G_TYPE_CHECK_CLASS_TYPE ((klass), FM_TYPE_LIST_MODEL))
45
#define FM_LIST_MODEL_GET_CLASS(obj) \
46
(G_TYPE_INSTANCE_GET_CLASS ((obj), FM_TYPE_LIST_MODEL, FMListModelClass))
49
FM_LIST_MODEL_FILE_COLUMN,
51
FM_LIST_MODEL_FILENAME,
54
FM_LIST_MODEL_MODIFIED,
55
/*FM_LIST_MODEL_SUBDIRECTORY_COLUMN,
56
FM_LIST_MODEL_SMALLEST_ICON_COLUMN,
57
FM_LIST_MODEL_SMALLER_ICON_COLUMN,
58
FM_LIST_MODEL_SMALL_ICON_COLUMN,
59
FM_LIST_MODEL_STANDARD_ICON_COLUMN,
60
FM_LIST_MODEL_LARGE_ICON_COLUMN,
61
FM_LIST_MODEL_LARGER_ICON_COLUMN,
62
FM_LIST_MODEL_LARGEST_ICON_COLUMN,
63
FM_LIST_MODEL_SMALLEST_EMBLEM_COLUMN,
64
FM_LIST_MODEL_SMALLER_EMBLEM_COLUMN,
65
FM_LIST_MODEL_SMALL_EMBLEM_COLUMN,
66
FM_LIST_MODEL_STANDARD_EMBLEM_COLUMN,
67
FM_LIST_MODEL_LARGE_EMBLEM_COLUMN,
68
FM_LIST_MODEL_LARGER_EMBLEM_COLUMN,
69
FM_LIST_MODEL_LARGEST_EMBLEM_COLUMN,
70
FM_LIST_MODEL_FILE_NAME_IS_EDITABLE_COLUMN,*/
71
FM_LIST_MODEL_NUM_COLUMNS
74
typedef struct FMListModelDetails FMListModelDetails;
76
typedef struct FMListModel {
77
GObject parent_instance;
78
FMListModelDetails *details;
82
GObjectClass parent_class;
84
void (* subdirectory_unloaded)(FMListModel *model, GOFDirectoryAsync *subdirectory);
87
GType fm_list_model_get_type (void);
88
/*gboolean fm_list_model_add_file (FMListModel *model,
90
NautilusDirectory *directory);*/
91
/*gboolean fm_list_model_add_file (FMListModel *model,
93
gboolean fm_list_model_add_file (FMListModel *model, GOFFile *file, GOFDirectoryAsync *directory);
94
/*void fm_list_model_file_changed (FMListModel *model,
96
NautilusDirectory *directory);*/
97
gboolean fm_list_model_is_empty (FMListModel *model);
98
guint fm_list_model_get_length (FMListModel *model);
99
/*void fm_list_model_remove_file (FMListModel *model,
101
GOFDirectoryAsync *directory);*/
102
void fm_list_model_clear (FMListModel *model);
103
gboolean fm_list_model_get_tree_iter_from_file (FMListModel *model,
105
GOFDirectoryAsync *directory,
107
GList * fm_list_model_get_all_iters_for_file (FMListModel *model, GOFFile *file);
108
gboolean fm_list_model_get_first_iter_for_file (FMListModel *model, GOFFile *file, GtkTreeIter *iter);
109
void fm_list_model_set_should_sort_directories_first (FMListModel *model, gboolean sort_directories_first);
111
int fm_list_model_get_sort_column_id_from_attribute (FMListModel *model, GQuark attribute);
112
GQuark fm_list_model_get_attribute_from_sort_column_id (FMListModel *model, int sort_column_id);
113
void fm_list_model_sort_files (FMListModel *model, GList **files);
115
//NautilusZoomLevel fm_list_model_get_zoom_level_from_column_id (int column);
116
//int fm_list_model_get_column_id_from_zoom_level (NautilusZoomLevel zoom_level);
117
//NautilusZoomLevel fm_list_model_get_zoom_level_from_emblem_column_id (int column);
118
//int fm_list_model_get_emblem_column_id_from_zoom_level (NautilusZoomLevel zoom_level);
120
GOFFile * fm_list_model_file_for_path (FMListModel *model, GtkTreePath *path);
121
void fm_list_model_get_directory_file (FMListModel *model, GtkTreePath *path,
122
GOFDirectoryAsync **directory, GOFFile **file);
123
gboolean fm_list_model_load_subdirectory (FMListModel *model, GtkTreePath *path, GOFDirectoryAsync **directory);
124
void fm_list_model_unload_subdirectory (FMListModel *model, GtkTreeIter *iter);
126
/*void fm_list_model_set_drag_view (FMListModel *model,
131
GtkTargetList * fm_list_model_get_drag_target_list (void);*/
133
int fm_list_model_compare_func (FMListModel *model,
138
/*int fm_list_model_add_column (FMListModel *model,
139
NautilusColumn *column);*/
140
/*int fm_list_model_get_column_number (FMListModel *model,
141
const char *column_name);*/
143
/*void fm_list_model_subdirectory_done_loading (FMListModel *model,
144
NautilusDirectory *directory);*/
146
#endif /* FM_LIST_MODEL_H */