1 /* -*- Mode: C; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3 -*- */ 2 3 /* 4 * GImageView 5 * Copyright (C) 2001 Takuro Ashie 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: dirview.h,v 1.16 2004/06/21 15:45:37 makeinu Exp $ 22 */ 23 24 #ifndef __DIRVIEW_H__ 25 #define __DIRVIEW_H__ 26 27 #include "gimageview.h" 28 29 typedef struct DirViewPrivate_Tag DirViewPrivate; 30 31 typedef enum 32 { 33 DIRVIEW_TREE, 34 DIRVIEW_LIST, 35 DIRVIEW_TREE_WITH_FILE, 36 DIRVIEW_LIST_WITH_FILE 37 } DirViewMode; 38 39 40 struct DirView_Tag 41 { 42 GtkWidget *container; 43 GtkWidget *toolbar; 44 GtkWidget *toolbar_eventbox; 45 GtkWidget *scroll_win; 46 GtkWidget *dirtree; 47 GtkWidget *popup_menu; 48 49 GimvThumbWin *tw; 50 51 gchar *root_dir; 52 DirViewMode mode; 53 gboolean show_toolbar; 54 gboolean show_dotfile; 55 56 DirViewPrivate *priv; 57 }; 58 59 60 void dirview_change_root (DirView *dv, 61 const gchar *root_dir); 62 void dirview_change_root_to_parent (DirView *dv); 63 void dirview_change_dir (DirView *dv, 64 const gchar *str); 65 void dirview_go_home (DirView *dv); 66 void dirview_refresh_list (DirView *dv); 67 gchar *dirview_get_selected_path (DirView *dv); 68 void dirview_expand_dir (DirView *dv, 69 const gchar *dir, 70 gboolean open_all); 71 gboolean dirview_set_opened_mark (DirView *dv, 72 const gchar *path); 73 gboolean dirview_unset_opened_mark (DirView *dv, 74 const gchar *path); 75 void dirview_show_toolbar (DirView *dv); 76 void dirview_hide_toolbar (DirView *dv); 77 78 DirView *dirview_create (const gchar *root_dir, 79 GtkWidget *parent_win, 80 GimvThumbWin *tw); 81 82 #endif /* __DIRVIEW_H__ */ 83