1 /* LIBGIMP - The GIMP Library
2  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3  *
4  * gimpenumstore.h
5  * Copyright (C) 2004  Sven Neumann <sven@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_ENUM_STORE_H__
27 #define __GIMP_ENUM_STORE_H__
28 
29 #include <libgimpwidgets/gimpintstore.h>
30 
31 
32 G_BEGIN_DECLS
33 
34 #define GIMP_TYPE_ENUM_STORE            (gimp_enum_store_get_type ())
35 #define GIMP_ENUM_STORE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_ENUM_STORE, GimpEnumStore))
36 #define GIMP_ENUM_STORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_ENUM_STORE, GimpEnumStoreClass))
37 #define GIMP_IS_ENUM_STORE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_ENUM_STORE))
38 #define GIMP_IS_ENUM_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_ENUM_STORE))
39 #define GIMP_ENUM_STORE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ENUM_STORE, GimpEnumStoreClass))
40 
41 
42 typedef struct _GimpEnumStoreClass  GimpEnumStoreClass;
43 
44 struct _GimpEnumStore
45 {
46   GimpIntStore       parent_instance;
47 
48   GEnumClass        *enum_class;
49 };
50 
51 struct _GimpEnumStoreClass
52 {
53   GimpIntStoreClass  parent_class;
54 
55   void (* _gimp_reserved1) (void);
56   void (* _gimp_reserved2) (void);
57   void (* _gimp_reserved3) (void);
58   void (* _gimp_reserved4) (void);
59 };
60 
61 
62 GType          gimp_enum_store_get_type               (void) G_GNUC_CONST;
63 
64 GtkListStore * gimp_enum_store_new                    (GType    enum_type);
65 GtkListStore * gimp_enum_store_new_with_range         (GType    enum_type,
66                                                        gint     minimum,
67                                                        gint     maximum);
68 GtkListStore * gimp_enum_store_new_with_values        (GType    enum_type,
69                                                        gint     n_values,
70                                                        ...);
71 GtkListStore * gimp_enum_store_new_with_values_valist (GType    enum_type,
72                                                        gint     n_values,
73                                                        va_list  args);
74 
75 GIMP_DEPRECATED_FOR(gimp_enum_store_set_icon_prefix)
76 void           gimp_enum_store_set_stock_prefix (GimpEnumStore *store,
77                                                  const gchar   *stock_prefix);
78 
79 void           gimp_enum_store_set_icon_prefix  (GimpEnumStore *store,
80                                                  const gchar   *icon_prefix);
81 
82 
83 G_END_DECLS
84 
85 #endif  /* __GIMP_ENUM_STORE_H__ */
86