1 /* LIBGIMP - The GIMP Library
2  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3  *
4  * gimpprocbrowserdialog.c
5  *
6  * This library is free software: you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 3 of the License, or (at your option) any later version.
10  *
11  * This library 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  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library.  If not, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION)
22 #error "Only <libgimp/gimpui.h> can be included directly."
23 #endif
24 
25 #ifndef __GIMP_PROC_BROWSER_DIALOG_H__
26 #define __GIMP_PROC_BROWSER_DIALOG_H__
27 
28 G_BEGIN_DECLS
29 
30 
31 /* For information look into the C source or the html documentation */
32 
33 
34 #define GIMP_TYPE_PROC_BROWSER_DIALOG            (gimp_proc_browser_dialog_get_type ())
35 #define GIMP_PROC_BROWSER_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROC_BROWSER_DIALOG, GimpProcBrowserDialog))
36 #define GIMP_PROC_BROWSER_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PROC_BROWSER_DIALOG, GimpProcBrowserDialogClass))
37 #define GIMP_IS_PROC_BROWSER_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROC_BROWSER_DIALOG))
38 #define GIMP_IS_PROC_BROWSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PROC_BROWSER_DIALOG))
39 #define GIMP_PROC_BROWSER_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PROC_BROWSER_DIALOG, GimpProcBrowserDialogClass))
40 
41 
42 typedef struct _GimpProcBrowserDialogClass GimpProcBrowserDialogClass;
43 
44 struct _GimpProcBrowserDialog
45 {
46   GimpDialog    parent_instance;
47 
48   GtkWidget    *browser;
49 
50   GtkListStore *store;
51   GtkWidget    *tree_view;
52 };
53 
54 struct _GimpProcBrowserDialogClass
55 {
56   GimpDialogClass  parent_class;
57 
58   void (* selection_changed) (GimpProcBrowserDialog *dialog);
59   void (* row_activated)     (GimpProcBrowserDialog *dialog);
60 
61   /* Padding for future expansion */
62   void (* _gimp_reserved1) (void);
63   void (* _gimp_reserved2) (void);
64   void (* _gimp_reserved3) (void);
65   void (* _gimp_reserved4) (void);
66 };
67 
68 
69 GType       gimp_proc_browser_dialog_get_type     (void) G_GNUC_CONST;
70 
71 GtkWidget * gimp_proc_browser_dialog_new          (const gchar  *title,
72                                                    const gchar  *role,
73                                                    GimpHelpFunc  help_func,
74                                                    const gchar  *help_id,
75                                                    ...) G_GNUC_NULL_TERMINATED;
76 
77 gchar     * gimp_proc_browser_dialog_get_selected (GimpProcBrowserDialog *dialog);
78 
79 
80 G_END_DECLS
81 
82 #endif  /* __GIMP_PROC_BROWSER_DIALOG_H__ */
83