1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __GIMP_TOOL_OPTIONS_H__
19 #define __GIMP_TOOL_OPTIONS_H__
20 
21 
22 #include "gimpcontext.h"
23 
24 
25 #define GIMP_TYPE_TOOL_OPTIONS            (gimp_tool_options_get_type ())
26 #define GIMP_TOOL_OPTIONS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TOOL_OPTIONS, GimpToolOptions))
27 #define GIMP_TOOL_OPTIONS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_TOOL_OPTIONS, GimpToolOptionsClass))
28 #define GIMP_IS_TOOL_OPTIONS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TOOL_OPTIONS))
29 #define GIMP_IS_TOOL_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_TOOL_OPTIONS))
30 #define GIMP_TOOL_OPTIONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_TOOL_OPTIONS, GimpToolOptionsClass))
31 
32 
33 typedef struct _GimpToolOptionsClass GimpToolOptionsClass;
34 
35 struct _GimpToolOptions
36 {
37   GimpContext   parent_instance;
38 
39   GimpToolInfo *tool_info;
40 
41   /*  if TRUE this instance is the main tool options object used for
42    *  the GUI, this is not exactly clean, but there are some things
43    *  (like linking brush properties to the active brush, or properly
44    *  maintaining global brush, pattern etc.) that can only be done
45    *  right in the object, and not by signal connections from the GUI,
46    *  or upon switching tools, all of which was much more horrible.
47    */
48   gboolean      gui_mode;
49 };
50 
51 struct _GimpToolOptionsClass
52 {
53   GimpContextClass parent_class;
54 };
55 
56 
57 GType      gimp_tool_options_get_type      (void) G_GNUC_CONST;
58 
59 void       gimp_tool_options_set_gui_mode  (GimpToolOptions   *tool_options,
60                                             gboolean           gui_mode);
61 gboolean   gimp_tool_options_get_gui_mode  (GimpToolOptions   *tool_options);
62 
63 gboolean   gimp_tool_options_serialize     (GimpToolOptions   *tool_options,
64                                             GError           **error);
65 gboolean   gimp_tool_options_deserialize   (GimpToolOptions   *tool_options,
66                                             GError           **error);
67 
68 gboolean   gimp_tool_options_delete        (GimpToolOptions   *tool_options,
69                                             GError           **error);
70 void       gimp_tool_options_create_folder (void);
71 
72 
73 #endif  /*  __GIMP_TOOL_OPTIONS_H__  */
74