1 /* LIBGIMP - The GIMP Library 2 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball 3 * 4 * gimpbrowser.h 5 * Copyright (C) 2005 Michael Natterer <mitch@gimp.org> 6 * 7 * This library is free software: you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 3 of the License, or (at your option) any later version. 11 * 12 * This library 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 GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library. If not, see 19 * <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION) 23 #error "Only <libgimpwidgets/gimpwidgets.h> can be included directly." 24 #endif 25 26 #ifndef __GIMP_BROWSER_H__ 27 #define __GIMP_BROWSER_H__ 28 29 G_BEGIN_DECLS 30 31 /* For information look into the C source or the html documentation */ 32 33 34 #define GIMP_TYPE_BROWSER (gimp_browser_get_type ()) 35 #define GIMP_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BROWSER, GimpBrowser)) 36 #define GIMP_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_BROWSER, GimpBrowserClass)) 37 #define GIMP_IS_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_BROWSER)) 38 #define GIMP_IS_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_BROWSER)) 39 #define GIMP_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BROWSER, GimpBrowserClass)) 40 41 42 typedef struct _GimpBrowserClass GimpBrowserClass; 43 44 struct _GimpBrowser 45 { 46 GtkHPaned parent_instance; 47 48 GtkWidget *left_vbox; 49 50 GtkWidget *search_entry; 51 guint search_timeout_id; 52 53 GtkWidget *search_type_combo; 54 gint search_type; 55 56 GtkWidget *count_label; 57 58 GtkWidget *right_vbox; 59 GtkWidget *right_widget; 60 }; 61 62 struct _GimpBrowserClass 63 { 64 GtkHPanedClass parent_class; 65 66 void (* search) (GimpBrowser *browser, 67 const gchar *search_string, 68 gint search_type); 69 70 /* Padding for future expansion */ 71 void (* _gimp_reserved1) (void); 72 void (* _gimp_reserved2) (void); 73 void (* _gimp_reserved3) (void); 74 void (* _gimp_reserved4) (void); 75 }; 76 77 78 GType gimp_browser_get_type (void) G_GNUC_CONST; 79 80 GtkWidget * gimp_browser_new (void); 81 82 void gimp_browser_add_search_types (GimpBrowser *browser, 83 const gchar *first_type_label, 84 gint first_type_id, 85 ...) G_GNUC_NULL_TERMINATED; 86 87 void gimp_browser_set_widget (GimpBrowser *browser, 88 GtkWidget *widget); 89 void gimp_browser_show_message (GimpBrowser *browser, 90 const gchar *message); 91 92 93 G_END_DECLS 94 95 #endif /* __GIMP_BROWSER_H__ */ 96