1 /* LIBGIMP - The GIMP Library
2  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3  *
4  * gimpbase-private.h
5  * Copyright (C) 2003 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 #ifndef __GIMP_BASE_PRIVATE_H__
23 #define __GIMP_BASE_PRIVATE_H__
24 
25 
26 typedef struct _GimpUnitVtable GimpUnitVtable;
27 
28 struct _GimpUnitVtable
29 {
30   gint          (* unit_get_number_of_units)          (void);
31   gint          (* unit_get_number_of_built_in_units) (void);
32 
33   GimpUnit      (* unit_new)                          (gchar    *identifier,
34                                                        gdouble   factor,
35                                                        gint      digits,
36                                                        gchar    *symbol,
37                                                        gchar    *abbreviation,
38                                                        gchar    *singular,
39                                                        gchar    *plural);
40   gboolean      (* unit_get_deletion_flag)            (GimpUnit  unit);
41   void          (* unit_set_deletion_flag)            (GimpUnit  unit,
42                                                        gboolean  deletion_flag);
43 
44   gdouble       (* unit_get_factor)                   (GimpUnit  unit);
45   gint          (* unit_get_digits)                   (GimpUnit  unit);
46   const gchar * (* unit_get_identifier)               (GimpUnit  unit);
47   const gchar * (* unit_get_symbol)                   (GimpUnit  unit);
48   const gchar * (* unit_get_abbreviation)             (GimpUnit  unit);
49   const gchar * (* unit_get_singular)                 (GimpUnit  unit);
50   const gchar * (* unit_get_plural)                   (GimpUnit  unit);
51 
52   void          (* _reserved_1)                       (void);
53   void          (* _reserved_2)                       (void);
54   void          (* _reserved_3)                       (void);
55   void          (* _reserved_4)                       (void);
56 };
57 
58 
59 extern GimpUnitVtable _gimp_unit_vtable;
60 
61 
62 G_BEGIN_DECLS
63 
64 void   gimp_base_init              (GimpUnitVtable *vtable);
65 void   gimp_base_compat_enums_init (void);
66 
67 G_END_DECLS
68 
69 #endif /* __GIMP_BASE_PRIVATE_H__ */
70