Blame gtk/gtkfilesystem.h

Packit Service fb6fa5
/* GTK - The GIMP Toolkit
Packit Service fb6fa5
 * gtkfilesystem.h: Filesystem abstraction functions.
Packit Service fb6fa5
 * Copyright (C) 2003, Red Hat, Inc.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * This library is free software; you can redistribute it and/or
Packit Service fb6fa5
 * modify it under the terms of the GNU Lesser General Public
Packit Service fb6fa5
 * License as published by the Free Software Foundation; either
Packit Service fb6fa5
 * version 2 of the License, or (at your option) any later version.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * This library is distributed in the hope that it will be useful,
Packit Service fb6fa5
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fb6fa5
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service fb6fa5
 * Lesser General Public License for more details.
Packit Service fb6fa5
 *
Packit Service fb6fa5
 * You should have received a copy of the GNU Lesser General Public
Packit Service fb6fa5
 * License along with this library; if not, write to the
Packit Service fb6fa5
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit Service fb6fa5
 * Boston, MA 02111-1307, USA.
Packit Service fb6fa5
 */
Packit Service fb6fa5
Packit Service fb6fa5
#ifndef __GTK_FILE_SYSTEM_H__
Packit Service fb6fa5
#define __GTK_FILE_SYSTEM_H__
Packit Service fb6fa5
Packit Service fb6fa5
#include <gio/gio.h>
Packit Service fb6fa5
#include <gtk/gtkwidget.h>	/* For icon handling */
Packit Service fb6fa5
Packit Service fb6fa5
G_BEGIN_DECLS
Packit Service fb6fa5
Packit Service fb6fa5
#define GTK_TYPE_FILE_SYSTEM         (_gtk_file_system_get_type ())
Packit Service fb6fa5
#define GTK_FILE_SYSTEM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_FILE_SYSTEM, GtkFileSystem))
Packit Service fb6fa5
#define GTK_FILE_SYSTEM_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST    ((c), GTK_TYPE_FILE_SYSTEM, GtkFileSystemClass))
Packit Service fb6fa5
#define GTK_IS_FILE_SYSTEM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_FILE_SYSTEM))
Packit Service fb6fa5
#define GTK_IS_FILE_SYSTEM_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_FILE_SYSTEM))
Packit Service fb6fa5
#define GTK_FILE_SYSTEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_FILE_SYSTEM, GtkFileSystemClass))
Packit Service fb6fa5
Packit Service fb6fa5
#define GTK_TYPE_FOLDER         (_gtk_folder_get_type ())
Packit Service fb6fa5
#define GTK_FOLDER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_FOLDER, GtkFolder))
Packit Service fb6fa5
#define GTK_FOLDER_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST    ((c), GTK_TYPE_FOLDER, GtkFolderClass))
Packit Service fb6fa5
#define GTK_IS_FOLDER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_FOLDER))
Packit Service fb6fa5
#define GTK_IS_FOLDER_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_FOLDER))
Packit Service fb6fa5
#define GTK_FOLDER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_FOLDER, GtkFolderClass))
Packit Service fb6fa5
Packit Service fb6fa5
typedef struct GtkFileSystemClass GtkFileSystemClass;
Packit Service fb6fa5
typedef struct GtkFileSystem GtkFileSystem;
Packit Service fb6fa5
typedef struct GtkFolderClass GtkFolderClass;
Packit Service fb6fa5
typedef struct GtkFolder GtkFolder;
Packit Service fb6fa5
typedef struct GtkFileSystemVolume GtkFileSystemVolume; /* opaque struct */
Packit Service fb6fa5
typedef struct GtkFileSystemBookmark GtkFileSystemBookmark; /* opaque struct */
Packit Service fb6fa5
Packit Service fb6fa5
struct GtkFileSystemClass
Packit Service fb6fa5
{
Packit Service fb6fa5
  GObjectClass parent_class;
Packit Service fb6fa5
Packit Service fb6fa5
  void (*bookmarks_changed) (GtkFileSystem *file_system);
Packit Service fb6fa5
  void (*volumes_changed)   (GtkFileSystem *file_system);
Packit Service fb6fa5
};
Packit Service fb6fa5
Packit Service fb6fa5
struct GtkFileSystem
Packit Service fb6fa5
{
Packit Service fb6fa5
  GObject parent_object;
Packit Service fb6fa5
};
Packit Service fb6fa5
Packit Service fb6fa5
struct GtkFolderClass
Packit Service fb6fa5
{
Packit Service fb6fa5
  GObjectClass parent_class;
Packit Service fb6fa5
Packit Service fb6fa5
  void (*files_added)      (GtkFolder *folder,
Packit Service fb6fa5
			    GList     *paths);
Packit Service fb6fa5
  void (*files_removed)    (GtkFolder *folder,
Packit Service fb6fa5
			    GList     *paths);
Packit Service fb6fa5
  void (*files_changed)    (GtkFolder *folder,
Packit Service fb6fa5
			    GList     *paths);
Packit Service fb6fa5
  void (*finished_loading) (GtkFolder *folder);
Packit Service fb6fa5
  void (*deleted)          (GtkFolder *folder);
Packit Service fb6fa5
};
Packit Service fb6fa5
Packit Service fb6fa5
struct GtkFolder
Packit Service fb6fa5
{
Packit Service fb6fa5
  GObject parent_object;
Packit Service fb6fa5
};
Packit Service fb6fa5
Packit Service fb6fa5
typedef void (* GtkFileSystemGetFolderCallback)    (GCancellable        *cancellable,
Packit Service fb6fa5
						    GtkFolder           *folder,
Packit Service fb6fa5
						    const GError        *error,
Packit Service fb6fa5
						    gpointer             data);
Packit Service fb6fa5
typedef void (* GtkFileSystemGetInfoCallback)      (GCancellable        *cancellable,
Packit Service fb6fa5
						    GFileInfo           *file_info,
Packit Service fb6fa5
						    const GError        *error,
Packit Service fb6fa5
						    gpointer             data);
Packit Service fb6fa5
typedef void (* GtkFileSystemVolumeMountCallback)  (GCancellable        *cancellable,
Packit Service fb6fa5
						    GtkFileSystemVolume *volume,
Packit Service fb6fa5
						    const GError        *error,
Packit Service fb6fa5
						    gpointer             data);
Packit Service fb6fa5
Packit Service fb6fa5
/* GtkFileSystem methods */
Packit Service fb6fa5
GType           _gtk_file_system_get_type     (void) G_GNUC_CONST;
Packit Service fb6fa5
Packit Service fb6fa5
GtkFileSystem * _gtk_file_system_new          (void);
Packit Service fb6fa5
Packit Service fb6fa5
GSList *        _gtk_file_system_list_volumes   (GtkFileSystem *file_system);
Packit Service fb6fa5
GSList *        _gtk_file_system_list_bookmarks (GtkFileSystem *file_system);
Packit Service fb6fa5
Packit Service fb6fa5
GCancellable *  _gtk_file_system_get_info               (GtkFileSystem                     *file_system,
Packit Service fb6fa5
							 GFile                             *file,
Packit Service fb6fa5
							 const gchar                       *attributes,
Packit Service fb6fa5
							 GtkFileSystemGetInfoCallback       callback,
Packit Service fb6fa5
							 gpointer                           data);
Packit Service fb6fa5
GCancellable *  _gtk_file_system_mount_volume           (GtkFileSystem                     *file_system,
Packit Service fb6fa5
							 GtkFileSystemVolume               *volume,
Packit Service fb6fa5
							 GMountOperation                   *mount_operation,
Packit Service fb6fa5
							 GtkFileSystemVolumeMountCallback   callback,
Packit Service fb6fa5
							 gpointer                           data);
Packit Service fb6fa5
GCancellable *  _gtk_file_system_mount_enclosing_volume (GtkFileSystem                     *file_system,
Packit Service fb6fa5
							 GFile                             *file,
Packit Service fb6fa5
							 GMountOperation                   *mount_operation,
Packit Service fb6fa5
							 GtkFileSystemVolumeMountCallback   callback,
Packit Service fb6fa5
							 gpointer                           data);
Packit Service fb6fa5
Packit Service fb6fa5
gboolean        _gtk_file_system_insert_bookmark    (GtkFileSystem      *file_system,
Packit Service fb6fa5
						     GFile              *file,
Packit Service fb6fa5
						     gint                position,
Packit Service fb6fa5
						     GError            **error);
Packit Service fb6fa5
gboolean        _gtk_file_system_remove_bookmark    (GtkFileSystem      *file_system,
Packit Service fb6fa5
						     GFile              *file,
Packit Service fb6fa5
						     GError            **error);
Packit Service fb6fa5
Packit Service fb6fa5
gchar *         _gtk_file_system_get_bookmark_label (GtkFileSystem *file_system,
Packit Service fb6fa5
						     GFile         *file);
Packit Service fb6fa5
void            _gtk_file_system_set_bookmark_label (GtkFileSystem *file_system,
Packit Service fb6fa5
						     GFile         *file,
Packit Service fb6fa5
						     const gchar   *label);
Packit Service fb6fa5
Packit Service fb6fa5
GtkFileSystemVolume * _gtk_file_system_get_volume_for_file (GtkFileSystem       *file_system,
Packit Service fb6fa5
							    GFile               *file);
Packit Service fb6fa5
Packit Service fb6fa5
/* GtkFolder functions */
Packit Service fb6fa5
GSList *     _gtk_folder_list_children (GtkFolder  *folder);
Packit Service fb6fa5
GFileInfo *  _gtk_folder_get_info      (GtkFolder  *folder,
Packit Service fb6fa5
				        GFile      *file);
Packit Service fb6fa5
Packit Service fb6fa5
gboolean     _gtk_folder_is_finished_loading (GtkFolder *folder);
Packit Service fb6fa5
Packit Service fb6fa5
Packit Service fb6fa5
/* GtkFileSystemVolume methods */
Packit Service fb6fa5
gchar *               _gtk_file_system_volume_get_display_name (GtkFileSystemVolume *volume);
Packit Service fb6fa5
gboolean              _gtk_file_system_volume_is_mounted       (GtkFileSystemVolume *volume);
Packit Service fb6fa5
GFile *               _gtk_file_system_volume_get_root         (GtkFileSystemVolume *volume);
Packit Service fb6fa5
GdkPixbuf *           _gtk_file_system_volume_render_icon      (GtkFileSystemVolume  *volume,
Packit Service fb6fa5
							        GtkWidget            *widget,
Packit Service fb6fa5
							        gint                  icon_size,
Packit Service fb6fa5
							        GError              **error);
Packit Service fb6fa5
Packit Service fb6fa5
GtkFileSystemVolume  *_gtk_file_system_volume_ref              (GtkFileSystemVolume *volume);
Packit Service fb6fa5
void                  _gtk_file_system_volume_unref            (GtkFileSystemVolume *volume);
Packit Service fb6fa5
Packit Service fb6fa5
/* GtkFileSystemBookmark methods */
Packit Service fb6fa5
void                   _gtk_file_system_bookmark_free          (GtkFileSystemBookmark *bookmark);
Packit Service fb6fa5
Packit Service fb6fa5
/* GFileInfo helper functions */
Packit Service fb6fa5
GdkPixbuf *     _gtk_file_info_render_icon (GFileInfo *info,
Packit Service fb6fa5
					    GtkWidget *widget,
Packit Service fb6fa5
					    gint       icon_size);
Packit Service fb6fa5
Packit Service fb6fa5
gboolean	_gtk_file_info_consider_as_directory (GFileInfo *info);
Packit Service fb6fa5
Packit Service fb6fa5
/* GFile helper functions */
Packit Service fb6fa5
gboolean	_gtk_file_has_native_path (GFile *file);
Packit Service fb6fa5
Packit Service fb6fa5
G_END_DECLS
Packit Service fb6fa5
Packit Service fb6fa5
#endif /* __GTK_FILE_SYSTEM_H__ */