1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2001-2002 CodeFactory AB 4 * Copyright (C) 2001-2002 Mikael Hallendal <micke@imendio.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of the 9 * License, or (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 GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public 17 * License along with this program; if not, write to the 18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 * Boston, MA 02111-1307, USA. 20 */ 21 22 #ifndef __DH_SEARCH_H__ 23 #define __DH_SEARCH_H__ 24 25 #include <gtk/gtk.h> 26 #include "dh-link.h" 27 #include "dh-book-manager.h" 28 29 G_BEGIN_DECLS 30 31 #define DH_TYPE_SEARCH (dh_search_get_type ()) 32 #define DH_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DH_TYPE_SEARCH, DhSearch)) 33 #define DH_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DH_TYPE_SEARCH, DhSearchClass)) 34 #define DH_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DH_TYPE_SEARCH)) 35 #define DH_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DH_TYPE_SEARCH)) 36 37 typedef struct _DhSearch DhSearch; 38 typedef struct _DhSearchClass DhSearchClass; 39 40 struct _DhSearch { 41 GtkVBox parent_instance; 42 }; 43 44 struct _DhSearchClass { 45 GtkVBoxClass parent_class; 46 47 /* Signals */ 48 void (*link_selected) (DhSearch *search, 49 DhLink *link); 50 }; 51 52 GType dh_search_get_type (void); 53 GtkWidget *dh_search_new (DhBookManager *book_manager); 54 void dh_search_set_search_string (DhSearch *search, 55 const gchar *str, 56 const gchar *book_id); 57 58 G_END_DECLS 59 60 #endif /* __DH_SEARCH_H__ */ 61