1 /* gtkdirtree - gtkdirtree widget for gtk+ 2 * Copyright 1999-2001 Adrian E. Feiguin <feiguin@ifir.edu.ar> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 * Boston, MA 02111-1307, USA. 18 */ 19 20 21 #ifndef __GTK_DIR_TREE_H__ 22 #define __GTK_DIR_TREE_H__ 23 24 25 #include <gdk/gdk.h> 26 #include <gtk/gtk.h> 27 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif /* __cplusplus */ 32 33 34 #define G_TYPE_DIR_TREE (gtk_dir_tree_get_type ()) 35 #define GTK_DIR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DIR_TREE, GtkDirTree)) 36 #define GTK_DIR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_DIR_TREE, GtkDirTreeClass)) 37 #define GTK_IS_DIR_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DIR_TREE)) 38 #define GTK_IS_DIR_TREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), G_TYPE_DIR_TREE)) 39 40 typedef struct _GtkDirTree GtkDirTree; 41 typedef struct _GtkDirTreeNode GtkDirTreeNode; 42 typedef struct _GtkDirTreeClass GtkDirTreeClass; 43 44 45 struct _GtkDirTreeNode 46 { 47 gboolean scanned; 48 gchar *path; 49 }; 50 51 52 struct _GtkDirTree 53 { 54 GtkCTree ctree; 55 56 gchar *local_hostname; 57 58 gboolean show_hidden; 59 60 GdkPixmap *my_pc; 61 GdkPixmap *folder; 62 GdkPixmap *ofolder; 63 GdkPixmap *dennied; 64 65 GdkBitmap *my_pc_mask; 66 GdkBitmap *folder_mask; 67 GdkBitmap *ofolder_mask; 68 GdkBitmap *dennied_mask; 69 }; 70 71 struct _GtkDirTreeClass 72 { 73 GtkCTreeClass parent_class; 74 75 }; 76 77 78 GType gtk_dir_tree_get_type (void); 79 GtkWidget* gtk_dir_tree_new (void); 80 81 gint gtk_dir_tree_open_dir(GtkDirTree *dir_tree, const gchar *path); 82 83 #ifdef __cplusplus 84 } 85 #endif /* __cplusplus */ 86 87 88 #endif /* __GTK_DIR_TREE_H__ */ 89 90 91