1 /* 2 * main-win.h 3 * 4 * Copyright 2009 PCMan <pcman.tw@gmail.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301, USA. 20 */ 21 22 23 #ifndef __MAIN_WIN_H__ 24 #define __MAIN_WIN_H__ 25 26 #include <gtk/gtk.h> 27 #include "fm-gtk.h" 28 29 G_BEGIN_DECLS 30 31 #define FM_MAIN_WIN_TYPE (fm_main_win_get_type()) 32 #define FM_MAIN_WIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\ 33 FM_MAIN_WIN_TYPE, FmMainWin)) 34 #define FM_MAIN_WIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\ 35 FM_MAIN_WIN_TYPE, FmMainWinClass)) 36 #define FM_IS_MAIN_WIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\ 37 FM_MAIN_WIN_TYPE)) 38 #define FM_IS_MAIN_WIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\ 39 FM_MAIN_WIN_TYPE)) 40 41 typedef struct _FmMainWin FmMainWin; 42 typedef struct _FmMainWinClass FmMainWinClass; 43 44 struct _FmMainWin 45 { 46 GtkWindow parent; 47 48 GtkUIManager* ui; 49 GtkWidget* toolbar; 50 GtkWidget* location; 51 GtkWidget* pathbar; 52 GtkWidget* hpaned; 53 FmSidePane* left_pane; 54 FmFolderView* folder_view; 55 GtkWidget* statusbar; 56 GtkWidget* vol_status; 57 GtkWidget* bookmarks_menu; 58 GtkWidget* history_menu; 59 /* <private> */ 60 FmFolder* folder; 61 FmNavHistory* nav_history; 62 guint statusbar_ctx; 63 guint statusbar_ctx2; 64 FmBookmarks* bookmarks; 65 guint update_scroll_id; 66 gboolean pathbar_active; 67 }; 68 69 struct _FmMainWinClass 70 { 71 GtkWindowClass parent_class; 72 }; 73 74 GType fm_main_win_get_type (void); 75 FmMainWin* fm_main_win_new (void); 76 void fm_main_win_chdir(FmMainWin* win, FmPath* path); 77 void fm_main_win_chdir_by_name(FmMainWin* win, const char* path_str); 78 void fm_main_win_chdir_without_history(FmMainWin* win, FmPath* path); 79 80 G_END_DECLS 81 82 #endif /* __MAIN-WIN_H__ */ 83