1
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2002 Anders Carlsson
* Copyright (C) 2002 Bent Spoon Software
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: Anders Carlsson <andersca@gnu.org>
*/
/* nautilus-tree-model.h - Model for the tree view */
#ifndef NAUTILUS_TREE_MODEL_H
#define NAUTILUS_TREE_MODEL_H
#include <glib-object.h>
#include <gtk/gtktreemodel.h>
#include <libnautilus-private/nautilus-file.h>
#define NAUTILUS_TYPE_TREE_MODEL (nautilus_tree_model_get_type ())
#define NAUTILUS_TREE_MODEL(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_TREE_MODEL, NautilusTreeModel))
#define NAUTILUS_TREE_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_TREE_MODEL, NautilusTreeModelClass))
#define NAUTILUS_IS_TREE_MODEL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_TREE_MODEL))
#define NAUTILUS_IS_TREE_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_TREE_MODEL))
enum {
NAUTILUS_TREE_MODEL_DISPLAY_NAME_COLUMN,
NAUTILUS_TREE_MODEL_CLOSED_PIXBUF_COLUMN,
NAUTILUS_TREE_MODEL_OPEN_PIXBUF_COLUMN,
NAUTILUS_TREE_MODEL_FONT_STYLE_COLUMN,
NAUTILUS_TREE_MODEL_FONT_WEIGHT_COLUMN,
NAUTILUS_TREE_MODEL_NUM_COLUMNS
};
typedef struct NautilusTreeModelDetails NautilusTreeModelDetails;
typedef struct {
GObject parent;
NautilusTreeModelDetails *details;
} NautilusTreeModel;
typedef struct {
GObjectClass parent_class;
void (* row_loaded) (NautilusTreeModel *tree_model,
GtkTreeIter *iter);
} NautilusTreeModelClass;
GType nautilus_tree_model_get_type (void);
NautilusTreeModel *nautilus_tree_model_new (void);
void nautilus_tree_model_set_show_hidden_files (NautilusTreeModel *model,
gboolean show_hidden_files);
void nautilus_tree_model_set_show_backup_files (NautilusTreeModel *model,
gboolean show_backup_files);
void nautilus_tree_model_set_show_only_directories (NautilusTreeModel *model,
gboolean show_only_directories);
NautilusFile * nautilus_tree_model_iter_get_file (NautilusTreeModel *model,
GtkTreeIter *iter);
void nautilus_tree_model_add_root_uri (NautilusTreeModel *model,
const char *root_uri,
const char *display_name,
const char *icon_name);
void nautilus_tree_model_remove_root_uri (NautilusTreeModel *model,
const char *root_uri);
gboolean nautilus_tree_model_iter_is_root (NautilusTreeModel *model,
GtkTreeIter *iter);
gboolean nautilus_tree_model_file_get_iter (NautilusTreeModel *model,
GtkTreeIter *iter,
NautilusFile *file,
GtkTreeIter *currentIter);
void nautilus_tree_model_set_theme (NautilusTreeModel *model);
#endif /* NAUTILUS_TREE_MODEL_H */
|