1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2001 Mikael Hallendal <micke@imendio.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
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 GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 #ifndef __DH_BOOK_TREE_H__
22 #define __DH_BOOK_TREE_H__
23 
24 #include <gtk/gtk.h>
25 #include "dh-link.h"
26 #include "dh-book-manager.h"
27 
28 G_BEGIN_DECLS
29 
30 #define DH_TYPE_BOOK_TREE            (dh_book_tree_get_type ())
31 #define DH_BOOK_TREE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), DH_TYPE_BOOK_TREE, DhBookTree))
32 #define DH_BOOK_TREE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), DH_TYPE_BOOK_TREE, DhBookTreeClass))
33 #define DH_IS_BOOK_TREE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DH_TYPE_BOOK_TREE))
34 #define DH_IS_BOOK_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), DH_TYPE_BOOK_TREE))
35 
36 typedef struct _DhBookTree      DhBookTree;
37 typedef struct _DhBookTreeClass DhBookTreeClass;
38 
39 struct _DhBookTree {
40         GtkTreeView parent_instance;
41 };
42 
43 struct _DhBookTreeClass {
44         GtkTreeViewClass parent_class;
45 };
46 
47 GType        dh_book_tree_get_type                (void) G_GNUC_CONST;
48 GtkWidget *  dh_book_tree_new                     (DhBookManager *book_manager);
49 void         dh_book_tree_select_uri              (DhBookTree    *book_tree,
50                                                    const gchar   *uri);
51 const gchar *dh_book_tree_get_selected_book_title (DhBookTree    *tree);
52 
53 G_END_DECLS
54 
55 #endif /* __DH_BOOK_TREE_H__ */
56