summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-07-16 21:07:38 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-07-16 21:07:38 +0000
commit7e54248bc3c4890aabdde5da3a929bca425a6649 (patch)
tree4bb378fd3d278cb15241f19c94a85fdad7a953ec /gtk/gtkfilesystem.h
parentbc8567d488c8222f655f2ed746ecfa8041c81137 (diff)
downloadgtk+-7e54248bc3c4890aabdde5da3a929bca425a6649.tar.gz
auto-ize.
Wed Jul 16 16:50:31 2003 Owen Taylor <otaylor@redhat.com> * configure.ac Makefile.am: auto-ize. * xdgmime/: Add freedesktop.org MIME spec implementatin by Jonathan Blandford. * gtkfilesystem.[ch]: Add gtk_file_info_render_icon() gtk_file_info_set/get_icon_type to do icon handling based on MIME type. Add a simple icon caching system. * gtkfilesystemgnomevfs.c: Implement ensure_types() so that extending the set of types for a loaded directory works. Set the MIME type to get the default icon handling. * gtkfilesystemunix.c: Look up the MIME type using xdgmime. * gtkfilechooserimpldefault.c: Display icons in the list.
Diffstat (limited to 'gtk/gtkfilesystem.h')
-rw-r--r--gtk/gtkfilesystem.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h
index 055b9d9bf5..275efb2bf2 100644
--- a/gtk/gtkfilesystem.h
+++ b/gtk/gtkfilesystem.h
@@ -22,7 +22,7 @@
#define __GTK_FILE_SYSTEM_H__
#include <glib-object.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gtk/gtkwidget.h> /* For icon handling */
G_BEGIN_DECLS
@@ -50,6 +50,19 @@ typedef enum {
GTK_FILE_INFO_ALL = (1 << 7) - 1
} GtkFileInfoType;
+/* Icon type, supplemented by MIME type
+ */
+typedef enum {
+ GTK_FILE_ICON_REGULAR, /* Use mime type for icon */
+ GTK_FILE_ICON_BLOCK_DEVICE,
+ GTK_FILE_ICON_BROKEN_SYMBOLIC_LINK,
+ GTK_FILE_ICON_CHARACTER_DEVICE,
+ GTK_FILE_ICON_DIRECTORY,
+ GTK_FILE_ICON_EXECUTABLE,
+ GTK_FILE_ICON_FIFO,
+ GTK_FILE_ICON_SOCKET
+} GtkFileIconType;
+
/* GError enumeration for GtkFileSystem
*/
@@ -96,9 +109,12 @@ void gtk_file_info_set_modification_time (GtkFileInfo *in
gint64 gtk_file_info_get_size (const GtkFileInfo *info);
void gtk_file_info_set_size (GtkFileInfo *info,
gint64 size);
-GdkPixbuf * gtk_file_info_get_icon (const GtkFileInfo *info);
-void gtk_file_info_set_icon (GtkFileInfo *info,
- GdkPixbuf *icon);
+void gtk_file_info_set_icon_type (GtkFileInfo *info,
+ GtkFileIconType icon_type);
+GtkFileIconType gtk_file_info_get_icon_type (const GtkFileInfo *info);
+GdkPixbuf * gtk_file_info_render_icon (const GtkFileInfo *info,
+ GtkWidget *widget,
+ gint pixel_size);
/* The base GtkFileSystem interface
*/