1 /* GTK - The GIMP Toolkit
2 * gtkfilesystemmodel.h: GtkTreeModel wrapping a GtkFileSystem
3 * Copyright (C) 2003, Red Hat, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GTK_FILE_SYSTEM_MODEL_H__
22 #define __GTK_FILE_SYSTEM_MODEL_H__
24 #include <glib-object.h>
25 #include "gtkfilesystem.h"
26 #include <gtk/gtktreemodel.h>
30 #define GTK_TYPE_FILE_SYSTEM_MODEL (_gtk_file_system_model_get_type ())
31 #define GTK_FILE_SYSTEM_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_SYSTEM_MODEL, GtkFileSystemModel))
32 #define GTK_IS_FILE_SYSTEM_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_SYSTEM_MODEL))
34 typedef struct _GtkFileSystemModel GtkFileSystemModel;
36 GType _gtk_file_system_model_get_type (void);
39 GTK_FILE_SYSTEM_MODEL_INFO,
40 GTK_FILE_SYSTEM_MODEL_DISPLAY_NAME,
41 GTK_FILE_SYSTEM_MODEL_N_COLUMNS
42 } GtkFileSystemModelColumns;
44 GtkFileSystemModel *_gtk_file_system_model_new (GtkFileSystem *file_system,
45 const GtkFilePath *root_path,
47 GtkFileInfoType types);
48 const GtkFileInfo * _gtk_file_system_model_get_info (GtkFileSystemModel *model,
50 const GtkFilePath * _gtk_file_system_model_get_path (GtkFileSystemModel *model,
52 void _gtk_file_system_model_set_show_hidden (GtkFileSystemModel *model,
53 gboolean show_hidden);
54 void _gtk_file_system_model_set_show_folders (GtkFileSystemModel *model,
55 gboolean show_folders);
56 void _gtk_file_system_model_set_show_files (GtkFileSystemModel *model,
59 typedef gboolean (*GtkFileSystemModelFilter) (GtkFileSystemModel *model,
61 const GtkFileInfo *info,
64 void _gtk_file_system_model_set_filter (GtkFileSystemModel *model,
65 GtkFileSystemModelFilter filter,
68 typedef void (*GtkFileSystemModelPathFunc) (GtkFileSystemModel *model,
73 gboolean _gtk_file_system_model_path_do (GtkFileSystemModel *model,
74 const GtkFilePath *path,
75 GtkFileSystemModelPathFunc func,
78 void _gtk_file_system_model_add_editable (GtkFileSystemModel *model,
80 void _gtk_file_system_model_remove_editable (GtkFileSystemModel *model);
84 #endif /* __GTK_FILE_SYSTEM_MODEL_H__ */