2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __FOLDERVIEW_H__
21 #define __FOLDERVIEW_H__
23 typedef struct _FolderView FolderView
;
24 typedef struct _FolderViewPopup FolderViewPopup
;
25 typedef struct _FolderColumnState FolderColumnState
;
28 #include <gtk/gtkwidget.h>
29 #include <gtk/gtkctree.h>
31 #include "mainwindow.h"
32 #include "summaryview.h"
43 #define N_FOLDER_COLS 4
45 struct _FolderColumnState
47 FolderColumnType type
;
53 GtkWidget
*scrolledwin
;
58 GtkCTreeNode
*selected
;
67 SummaryView
*summaryview
;
69 gint folder_update_callback_id
;
70 gint folder_item_update_callback_id
;
73 GSList
*nodes_to_recollapse
;
74 guint drag_timer
; /* timer id */
75 FolderItem
*drag_item
; /* dragged item */
76 GtkCTreeNode
*drag_node
; /* drag node */
78 GtkTargetList
*target_list
; /* DnD */
79 FolderColumnState col_state
[N_FOLDER_COLS
];
80 gint col_pos
[N_FOLDER_COLS
];
81 gint deferred_refresh_id
;
84 struct _FolderViewPopup
89 void (*set_sensitivity
) (GtkItemFactory
*menu
, FolderItem
*item
);
92 void folderview_initialize (void);
93 FolderView
*folderview_create (void);
94 void folderview_init (FolderView
*folderview
);
96 void folderview_set (FolderView
*folderview
);
97 void folderview_set_all (void);
99 void folderview_select (FolderView
*folderview
,
101 void folderview_unselect (FolderView
*folderview
);
102 void folderview_select_next_unread (FolderView
*folderview
,
103 gboolean force_open
);
104 void folderview_select_next_new (FolderView
*folderview
);
105 void folderview_select_next_marked (FolderView
*folderview
);
107 FolderItem
*folderview_get_selected_item(FolderView
*folderview
);
109 void folderview_rescan_tree (Folder
*folder
,
111 void folderview_fast_rescan_tree (Folder
*folder
);
112 gint
folderview_check_new (Folder
*folder
);
113 void folderview_check_new_all (void);
115 void folderview_update_all_updated (gboolean update_summary
);
117 void folderview_move_folder (FolderView
*folderview
,
118 FolderItem
*from_folder
,
119 FolderItem
*to_folder
,
122 void folderview_set_target_folder_color (gint color_op
);
124 void folderview_reflect_prefs_pixmap_theme (FolderView
*folderview
);
126 void folderview_reflect_prefs (void);
127 void folderview_register_popup (FolderViewPopup
*fpopup
);
128 void folderview_unregister_popup (FolderViewPopup
*fpopup
);
129 void folderview_update_search_icon (FolderItem
*item
,
131 void folderview_set_column_order (FolderView
*folderview
);
132 void folderview_finish_dnd (const gchar
*data
,
133 GdkDragContext
*drag_context
,
136 void folderview_close_opened (FolderView
*folderview
);
138 #endif /* __FOLDERVIEW_H__ */