diff options
author | Carlos Garnacho <carlos@imendio.com> | 2008-06-10 00:39:35 +0000 |
---|---|---|
committer | Carlos Garnacho <carlosg@src.gnome.org> | 2008-06-10 00:39:35 +0000 |
commit | 640d68778a82ae1c338d1583af49120c7119e3ae (patch) | |
tree | 72c424513afd4aeae2885ad037ce2f1cfe203546 /gtk/gtkfilesystem.h | |
parent | d717e77c1dc6a4588154a779062aa385554c8bb9 (diff) | |
download | gtk+-640d68778a82ae1c338d1583af49120c7119e3ae.tar.gz |
Bug 520874 - Should use gio directly.
2008-06-10 Carlos Garnacho <carlos@imendio.com>
Bug 520874 - Should use gio directly.
* gtk/gtkfilesystem.[ch]: Turn into a private object, which mostly
provides helper functions for asynchronous calls, folder abstraction
and uniform handling of volumes/drives/mounts.
* gtk/gtkfilesystemwin32.[ch]:
* gtk/gtkfilesystemunix.[ch]: Removed, these are no longer required.
* gtk/gtkfilechooser.c:
* gtk/gtkfilechooserbutton.c:
* gtk/gtkfilechooserdefault.c:
* gtk/gtkfilechooserentry.[ch]:
* gtk/gtkfilechooserprivate.h:
* gtk/gtkfilechooserutils.c:
* gtk/gtkfilesystemmodel.[ch]:
* gtk/gtkpathbar.[ch]: Use GIO internally. Adapt to GtkFileSystem API.
Do not load filesystem implementation modules.
* gtk/Makefile.am:
* gtk/gtk.symbols: the gtkfilesystem.h private header isn't installed
anymore, nor the unix/win32 implementations.
* README.in: Add blurb about these changes.
svn path=/trunk/; revision=20342
Diffstat (limited to 'gtk/gtkfilesystem.h')
-rw-r--r-- | gtk/gtkfilesystem.h | 513 |
1 files changed, 130 insertions, 383 deletions
diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h index 18aa584855..8c40816cd7 100644 --- a/gtk/gtkfilesystem.h +++ b/gtk/gtkfilesystem.h @@ -1,5 +1,5 @@ /* GTK - The GIMP Toolkit - * gtkfilesystem.h: Abstract file system interfaces + * gtkfilesystem.h: Filesystem abstraction functions. * Copyright (C) 2003, Red Hat, Inc. * * This library is free software; you can redistribute it and/or @@ -21,43 +21,25 @@ #ifndef __GTK_FILE_SYSTEM_H__ #define __GTK_FILE_SYSTEM_H__ -/* This is a "semi-private" header; it is meant only for - * alternate GtkFileChooser backend modules; no stability guarantees - * are made at this point - */ -#ifndef GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -#error "GtkFileSystem is not supported API for general use" -#endif - +#include <gio/gio.h> #include <glib-object.h> #include <gtk/gtkwidget.h> /* For icon handling */ G_BEGIN_DECLS -typedef gint64 GtkFileTime; - -typedef struct _GtkFileFolder GtkFileFolder; -typedef struct _GtkFileFolderIface GtkFileFolderIface; -typedef struct _GtkFileInfo GtkFileInfo; -typedef struct _GtkFileSystem GtkFileSystem; -typedef struct _GtkFileSystemIface GtkFileSystemIface; -typedef struct _GtkFileSystemVolume GtkFileSystemVolume; +#define GTK_TYPE_FILE_SYSTEM (gtk_file_system_get_type ()) +#define GTK_FILE_SYSTEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_FILE_SYSTEM, GtkFileSystem)) +#define GTK_FILE_SYSTEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GTK_TYPE_FILE_SYSTEM, GtkFileSystemClass)) +#define GTK_IS_FILE_SYSTEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_FILE_SYSTEM)) +#define GTK_IS_FILE_SYSTEM_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GTK_TYPE_FILE_SYSTEM)) +#define GTK_FILE_SYSTEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_FILE_SYSTEM, GtkFileSystemClass)) -typedef struct _GtkFilePath GtkFilePath; - -/* Mask of information about a file, for monitoring and - * gtk_file_system_get_info() - */ -typedef enum { - GTK_FILE_INFO_DISPLAY_NAME = 1 << 0, - GTK_FILE_INFO_IS_FOLDER = 1 << 1, - GTK_FILE_INFO_IS_HIDDEN = 1 << 2, - GTK_FILE_INFO_MIME_TYPE = 1 << 3, - GTK_FILE_INFO_MODIFICATION_TIME = 1 << 4, - GTK_FILE_INFO_SIZE = 1 << 5, - GTK_FILE_INFO_ICON = 1 << 6, - GTK_FILE_INFO_ALL = (1 << 7) - 1 -} GtkFileInfoType; +#define GTK_TYPE_FOLDER (gtk_folder_get_type ()) +#define GTK_FOLDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_FOLDER, GtkFolder)) +#define GTK_FOLDER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GTK_TYPE_FOLDER, GtkFolderClass)) +#define GTK_IS_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_FOLDER)) +#define GTK_IS_FOLDER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GTK_TYPE_FOLDER)) +#define GTK_FOLDER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_FOLDER, GtkFolderClass)) /* GError enumeration for GtkFileSystem */ @@ -76,372 +58,137 @@ typedef enum GQuark gtk_file_system_error_quark (void); -/* Boxed-type for gtk_file_folder_get_info() results - */ -#define GTK_TYPE_FILE_INFO (gtk_file_info_get_type ()) - -GType gtk_file_info_get_type (void) G_GNUC_CONST; - -GtkFileInfo *gtk_file_info_new (void); -GtkFileInfo *gtk_file_info_copy (GtkFileInfo *info); -void gtk_file_info_free (GtkFileInfo *info); - - -G_CONST_RETURN gchar *gtk_file_info_get_display_name (const GtkFileInfo *info); -G_CONST_RETURN gchar *gtk_file_info_get_display_key (const GtkFileInfo *info); -void gtk_file_info_set_display_name (GtkFileInfo *info, - const gchar *display_name); -gboolean gtk_file_info_get_is_folder (const GtkFileInfo *info); -void gtk_file_info_set_is_folder (GtkFileInfo *info, - gboolean is_folder); -gboolean gtk_file_info_get_is_hidden (const GtkFileInfo *info); -void gtk_file_info_set_is_hidden (GtkFileInfo *info, - gboolean is_hidden); -G_CONST_RETURN gchar *gtk_file_info_get_mime_type (const GtkFileInfo *info); -void gtk_file_info_set_mime_type (GtkFileInfo *info, - const gchar *mime_type); -GtkFileTime gtk_file_info_get_modification_time (const GtkFileInfo *info); -void gtk_file_info_set_modification_time (GtkFileInfo *info, - GtkFileTime modification_time); -gint64 gtk_file_info_get_size (const GtkFileInfo *info); -void gtk_file_info_set_size (GtkFileInfo *info, - gint64 size); - -void gtk_file_info_set_icon_name (GtkFileInfo *info, - const gchar *con_name); -G_CONST_RETURN gchar *gtk_file_info_get_icon_name (const GtkFileInfo *info); -GdkPixbuf *gtk_file_info_render_icon (const GtkFileInfo *info, - GtkWidget *widget, - gint pixel_size, - GError **error); - -/* GtkFileSystemHandle - */ - -#define GTK_TYPE_FILE_SYSTEM_HANDLE (gtk_file_system_handle_get_type ()) -#define GTK_FILE_SYSTEM_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_SYSTEM_HANDLE, GtkFileSystemHandle)) -#define GTK_IS_FILE_SYSTEM_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_SYSTEM_HANDLE)) -#define GTK_FILE_SYSTEM_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_SYSTEM_HANDLE, GtkFileSystemHandleUnixClass)) -#define GTK_IS_FILE_SYSTEM_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_SYSTEM_HANDLE)) -#define GTK_FILE_SYSTEM_HANDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FILE_SYSTEM_HANDLE, GtkFileSystemHandleClass)) - -typedef struct _GtkFileSystemHandle GtkFileSystemHandle; -typedef struct _GtkFileSystemHandleClass GtkFileSystemHandleClass; +typedef struct GtkFileSystemClass GtkFileSystemClass; +typedef struct GtkFileSystem GtkFileSystem; +typedef struct GtkFolderClass GtkFolderClass; +typedef struct GtkFolder GtkFolder; +typedef struct GtkFileSystemVolume GtkFileSystemVolume; /* opaque struct */ +typedef struct GtkFileSystemBookmark GtkFileSystemBookmark; /* opaque struct */ -struct _GtkFileSystemHandle +struct GtkFileSystemClass { - GObject parent_instance; - - GtkFileSystem *file_system; + GObjectClass parent_class; - guint cancelled : 1; + void (*bookmarks_changed) (GtkFileSystem *file_system); + void (*volumes_changed) (GtkFileSystem *file_system); }; -struct _GtkFileSystemHandleClass +struct GtkFileSystem { - GObjectClass parent_class; + GObject parent_object; }; -GType gtk_file_system_handle_get_type (void); - -/* The base GtkFileSystem interface - */ -#define GTK_TYPE_FILE_SYSTEM (gtk_file_system_get_type ()) -#define GTK_FILE_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_SYSTEM, GtkFileSystem)) -#define GTK_IS_FILE_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_SYSTEM)) -#define GTK_FILE_SYSTEM_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_FILE_SYSTEM, GtkFileSystemIface)) - -/* Callbacks for the asynchronous GtkFileSystem operations - */ - -typedef void (* GtkFileSystemGetInfoCallback) (GtkFileSystemHandle *handle, - const GtkFileInfo *file_info, - const GError *error, - gpointer data); -typedef void (* GtkFileSystemGetFolderCallback) (GtkFileSystemHandle *handle, - GtkFileFolder *folder, - const GError *error, - gpointer data); -typedef void (* GtkFileSystemCreateFolderCallback) (GtkFileSystemHandle *handle, - const GtkFilePath *path, - const GError *error, - gpointer data); -typedef void (* GtkFileSystemVolumeMountCallback) (GtkFileSystemHandle *handle, - GtkFileSystemVolume *volume, - const GError *error, - gpointer data); - -/* - */ - -struct _GtkFileSystemIface +struct GtkFolderClass { - GTypeInterface base_iface; - - /* Methods - */ - GSList * (*list_volumes) (GtkFileSystem *file_system); - GtkFileSystemVolume * (*get_volume_for_path) (GtkFileSystem *file_system, - const GtkFilePath *path); - - GtkFileSystemHandle * (*get_folder) (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFileInfoType types, - GtkFileSystemGetFolderCallback callback, - gpointer data); - GtkFileSystemHandle * (*get_info) (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFileInfoType types, - GtkFileSystemGetInfoCallback callback, - gpointer data); - GtkFileSystemHandle * (*create_folder) (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFileSystemCreateFolderCallback callback, - gpointer data); - - void (*cancel_operation) (GtkFileSystemHandle *handle); - - /* Volumes - */ - void (*volume_free) (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); - GtkFilePath * (*volume_get_base_path) (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); - gboolean (*volume_get_is_mounted) (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); - GtkFileSystemHandle * (*volume_mount) (GtkFileSystem *file_system, - GtkFileSystemVolume *volume, - GtkFileSystemVolumeMountCallback callback, - gpointer data); - char * (*volume_get_display_name) (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); - gchar * (*volume_get_icon_name) (GtkFileSystem *file_system, - GtkFileSystemVolume *volume, - GError **error); - - /* Path Manipulation - */ - gboolean (*get_parent) (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFilePath **parent, - GError **error); - GtkFilePath * (*make_path) (GtkFileSystem *file_system, - const GtkFilePath *base_path, - const gchar *display_name, - GError **error); - gboolean (*parse) (GtkFileSystem *file_system, - const GtkFilePath *base_path, - const gchar *str, - GtkFilePath **folder, - gchar **file_part, - GError **error); - gchar * (*path_to_uri) (GtkFileSystem *file_system, - const GtkFilePath *path); - gchar * (*path_to_filename) (GtkFileSystem *file_system, - const GtkFilePath *path); - GtkFilePath *(*uri_to_path) (GtkFileSystem *file_system, - const gchar *uri); - GtkFilePath *(*filename_to_path) (GtkFileSystem *file_system, - const gchar *path); - - /* Bookmarks - */ - gboolean (*insert_bookmark) (GtkFileSystem *file_system, - const GtkFilePath *path, - gint position, - GError **error); - gboolean (*remove_bookmark) (GtkFileSystem *file_system, - const GtkFilePath *path, - GError **error); - GSList * (*list_bookmarks) (GtkFileSystem *file_system); - - /* Signals - */ - void (*volumes_changed) (GtkFileSystem *file_system); - void (*bookmarks_changed) (GtkFileSystem *file_system); + GObjectClass parent_class; - /* Bookmark labels - */ - gchar * (*get_bookmark_label) (GtkFileSystem *file_system, - const GtkFilePath *path); - void (*set_bookmark_label) (GtkFileSystem *file_system, - const GtkFilePath *path, - const gchar *label); + void (*files_added) (GtkFolder *folder, + GList *paths); + void (*files_removed) (GtkFolder *folder, + GList *paths); + void (*files_changed) (GtkFolder *folder, + GList *paths); + void (*finished_loading) (GtkFolder *folder); + void (*deleted) (GtkFolder *folder); }; -GType gtk_file_system_get_type (void) G_GNUC_CONST; - -GSList * gtk_file_system_list_volumes (GtkFileSystem *file_system); - -GtkFileSystemVolume *gtk_file_system_get_volume_for_path (GtkFileSystem *file_system, - const GtkFilePath *path); - -void gtk_file_system_volume_free (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); -GtkFilePath * gtk_file_system_volume_get_base_path (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); -gboolean gtk_file_system_volume_get_is_mounted (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); -GtkFileSystemHandle *gtk_file_system_volume_mount (GtkFileSystem *file_system, - GtkFileSystemVolume *volume, - GtkFileSystemVolumeMountCallback callback, - gpointer data); -char * gtk_file_system_volume_get_display_name (GtkFileSystem *file_system, - GtkFileSystemVolume *volume); -GdkPixbuf * gtk_file_system_volume_render_icon (GtkFileSystem *file_system, - GtkFileSystemVolume *volume, - GtkWidget *widget, - gint pixel_size, - GError **error); -gchar * gtk_file_system_volume_get_icon_name (GtkFileSystem *file_system, - GtkFileSystemVolume *volume, - GError **error); - -gboolean gtk_file_system_get_parent (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFilePath **parent, - GError **error); -GtkFileSystemHandle *gtk_file_system_get_folder (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFileInfoType types, - GtkFileSystemGetFolderCallback callback, - gpointer data); -GtkFileSystemHandle *gtk_file_system_get_info (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFileInfoType types, - GtkFileSystemGetInfoCallback callback, - gpointer data); -GtkFileSystemHandle *gtk_file_system_create_folder (GtkFileSystem *file_system, - const GtkFilePath *path, - GtkFileSystemCreateFolderCallback callback, - gpointer data); -void gtk_file_system_cancel_operation (GtkFileSystemHandle *handle); -GtkFilePath * gtk_file_system_make_path (GtkFileSystem *file_system, - const GtkFilePath *base_path, - const gchar *display_name, - GError **error); -gboolean gtk_file_system_parse (GtkFileSystem *file_system, - const GtkFilePath *base_path, - const gchar *str, - GtkFilePath **folder, - gchar **file_part, - GError **error); - -gchar * gtk_file_system_path_to_uri (GtkFileSystem *file_system, - const GtkFilePath *path); -gchar * gtk_file_system_path_to_filename (GtkFileSystem *file_system, - const GtkFilePath *path); -GtkFilePath *gtk_file_system_uri_to_path (GtkFileSystem *file_system, - const gchar *uri); -GtkFilePath *gtk_file_system_filename_to_path (GtkFileSystem *file_system, - const gchar *filename); - -gboolean gtk_file_system_path_is_local (GtkFileSystem *filesystem, - const GtkFilePath *path); - -gboolean gtk_file_system_insert_bookmark (GtkFileSystem *file_system, - const GtkFilePath *path, - gint position, - GError **error); -gboolean gtk_file_system_remove_bookmark (GtkFileSystem *file_system, - const GtkFilePath *path, - GError **error); -GSList *gtk_file_system_list_bookmarks (GtkFileSystem *file_system); - -gchar *gtk_file_system_get_bookmark_label (GtkFileSystem *file_system, - const GtkFilePath *path); -void gtk_file_system_set_bookmark_label (GtkFileSystem *file_system, - const GtkFilePath *path, - const gchar *label); - -/* - * Detailed information about a particular folder - */ -#define GTK_TYPE_FILE_FOLDER (gtk_file_folder_get_type ()) -#define GTK_FILE_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_FOLDER, GtkFileFolder)) -#define GTK_IS_FILE_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_FOLDER)) -#define GTK_FILE_FOLDER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_FILE_FOLDER, GtkFileFolderIface)) - -struct _GtkFileFolderIface +struct GtkFolder { - GTypeInterface base_iface; - - /* Methods - */ - GtkFileInfo * (*get_info) (GtkFileFolder *folder, - const GtkFilePath *path, - GError **error); - gboolean (*list_children) (GtkFileFolder *folder, - GSList **children, - GError **error); - - /* ??? refresh() ??? */ - - /* Signals - */ - void (*deleted) (GtkFileFolder *monitor); - void (*files_added) (GtkFileFolder *monitor, - GSList *paths); - void (*files_changed) (GtkFileFolder *monitor, - GSList *paths); - void (*files_removed) (GtkFileFolder *monitor, - GSList *paths); - - /* Method / signal */ - gboolean (*is_finished_loading) (GtkFileFolder *folder); - void (*finished_loading) (GtkFileFolder *folder); + GObject parent_object; }; -GType gtk_file_folder_get_type (void) G_GNUC_CONST; -gboolean gtk_file_folder_list_children (GtkFileFolder *folder, - GSList **children, - GError **error); -GtkFileInfo *gtk_file_folder_get_info (GtkFileFolder *folder, - const GtkFilePath *path, - GError **error); - -gboolean gtk_file_folder_is_finished_loading (GtkFileFolder *folder); - - -/* GtkFilePath */ -#define GTK_TYPE_FILE_PATH (gtk_file_path_get_type ()) - -GType gtk_file_path_get_type (void) G_GNUC_CONST; -#ifdef __GNUC__ -#define gtk_file_path_new_dup(str) \ - ({ const gchar *__s = (str); (GtkFilePath *)g_strdup(__s); }) -#define gtk_file_path_new_steal(str) \ - ({ gchar *__s = (str); (GtkFilePath *)__s; }) -#define gtk_file_path_get_string(path) \ - ({ const GtkFilePath *__p = (path); (const gchar *)__p; }) -#define gtk_file_path_free(path) \ - ({ GtkFilePath *__p = (path); g_free (__p); }) -#else /* __GNUC__ */ -#define gtk_file_path_new_dup(str) ((GtkFilePath *)g_strdup(str)) -#define gtk_file_path_new_steal(str) ((GtkFilePath *)(str)) -#define gtk_file_path_get_string(str) ((const gchar *)(str)) -#define gtk_file_path_free(path) g_free (path) -#endif/* __GNUC__ */ - -#define gtk_file_path_copy(path) gtk_file_path_new_dup (gtk_file_path_get_string(path)) -#ifdef G_OS_WIN32 -int _gtk_file_system_win32_path_compare (const gchar *path1, - const gchar *path2); -#define gtk_file_path_compare(path1,path2) \ - _gtk_file_system_win32_path_compare (gtk_file_path_get_string (path1), \ - gtk_file_path_get_string (path2)) -#else -#define gtk_file_path_compare(path1,path2) strcmp (gtk_file_path_get_string (path1), \ - gtk_file_path_get_string (path2)) -#endif - -GSList *gtk_file_paths_sort (GSList *paths); -GSList *gtk_file_paths_copy (GSList *paths); -void gtk_file_paths_free (GSList *paths); - -/* GtkFileSystem modules support */ - -GtkFileSystem *gtk_file_system_create (const char *file_system_name); +typedef void (* GtkFileSystemGetFolderCallback) (GCancellable *cancellable, + GtkFolder *folder, + const GError *error, + gpointer data); +typedef void (* GtkFileSystemGetInfoCallback) (GCancellable *cancellable, + GFileInfo *file_info, + const GError *error, + gpointer data); +typedef void (* GtkFileSystemVolumeMountCallback) (GCancellable *cancellable, + GtkFileSystemVolume *volume, + const GError *error, + gpointer data); + +/* GtkFileSystem methods */ +GType gtk_file_system_get_type (void) G_GNUC_CONST; + +GtkFileSystem * gtk_file_system_new (void); + +GSList * gtk_file_system_list_volumes (GtkFileSystem *file_system); +GSList * gtk_file_system_list_bookmarks (GtkFileSystem *file_system); + +gboolean gtk_file_system_parse (GtkFileSystem *file_system, + GFile *base_file, + const gchar *str, + GFile **folder, + gchar **file_part, + GError **error); + +GCancellable * gtk_file_system_get_folder (GtkFileSystem *file_system, + GFile *file, + const gchar *attributes, + GtkFileSystemGetFolderCallback callback, + gpointer data); +GCancellable * gtk_file_system_get_info (GtkFileSystem *file_system, + GFile *file, + const gchar *attributes, + GtkFileSystemGetInfoCallback callback, + gpointer data); +GCancellable * gtk_file_system_mount_volume (GtkFileSystem *file_system, + GtkFileSystemVolume *volume, + GMountOperation *mount_operation, + GtkFileSystemVolumeMountCallback callback, + gpointer data); +GCancellable * gtk_file_system_mount_enclosing_volume (GtkFileSystem *file_system, + GFile *file, + GMountOperation *mount_operation, + GtkFileSystemVolumeMountCallback callback, + gpointer data); + +gboolean gtk_file_system_insert_bookmark (GtkFileSystem *file_system, + GFile *file, + gint position, + GError **error); +gboolean gtk_file_system_remove_bookmark (GtkFileSystem *file_system, + GFile *file, + GError **error); + +gchar * gtk_file_system_get_bookmark_label (GtkFileSystem *file_system, + GFile *file); +void gtk_file_system_set_bookmark_label (GtkFileSystem *file_system, + GFile *file, + const gchar *label); + +GtkFileSystemVolume * gtk_file_system_get_volume_for_file (GtkFileSystem *file_system, + GFile *file); + +/* GtkFolder functions */ +GSList * gtk_folder_list_children (GtkFolder *folder); +GFileInfo * gtk_folder_get_info (GtkFolder *folder, + GFile *file); + +gboolean gtk_folder_is_finished_loading (GtkFolder *folder); + + +/* GtkFileSystemVolume methods */ +gchar * gtk_file_system_volume_get_display_name (GtkFileSystemVolume *volume); +gboolean gtk_file_system_volume_is_mounted (GtkFileSystemVolume *volume); +GFile * gtk_file_system_volume_get_root (GtkFileSystemVolume *volume); +GdkPixbuf * gtk_file_system_volume_render_icon (GtkFileSystemVolume *volume, + GtkWidget *widget, + gint icon_size, + GError **error); + +void gtk_file_system_volume_free (GtkFileSystemVolume *volume); + +/* GtkFileSystemBookmark methods */ +void gtk_file_system_bookmark_free (GtkFileSystemBookmark *bookmark); + +/* GFileInfo helper functions */ +GdkPixbuf * gtk_file_info_render_icon (GFileInfo *info, + GtkWidget *widget, + gint icon_size); G_END_DECLS |