gimpunit.h 2.26 KB
Newer Older
1 2
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3 4
 *
 * gimpunit.h
5
 * Copyright (C) 1999-2003 Michael Natterer <mitch@gimp.org>
6 7
 *
 * This library is free software; you can redistribute it and/or
Marc Lehmann's avatar
Marc Lehmann committed
8
 * modify it under the terms of the GNU Lesser General Public
9 10 11 12 13 14
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Manish Singh's avatar
Manish Singh committed
15
 * Lesser General Public License for more details.
16
 *
Marc Lehmann's avatar
Marc Lehmann committed
17
 * You should have received a copy of the GNU Lesser General Public
18 19 20 21 22
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

23 24
#ifndef __GIMP_UNIT_H__
#define __GIMP_UNIT_H__
25

26
G_BEGIN_DECLS
27

28 29 30
/* For information look into the C source or the html documentation */


31 32
gint          gimp_unit_get_number_of_units          (void);
gint          gimp_unit_get_number_of_built_in_units (void) G_GNUC_CONST;
33

34 35 36 37 38 39 40
GimpUnit      gimp_unit_new                 (gchar    *identifier,
                                             gdouble   factor,
                                             gint      digits,
                                             gchar    *symbol,
                                             gchar    *abbreviation,
                                             gchar    *singular,
                                             gchar    *plural);
41

42 43 44
gboolean      gimp_unit_get_deletion_flag   (GimpUnit  unit);
void          gimp_unit_set_deletion_flag   (GimpUnit  unit,
                                             gboolean  deletion_flag);
45

46
gdouble       gimp_unit_get_factor          (GimpUnit  unit);
47

48
gint          gimp_unit_get_digits          (GimpUnit  unit);
49

50
const gchar * gimp_unit_get_identifier      (GimpUnit  unit);
51

52 53 54 55
const gchar * gimp_unit_get_symbol          (GimpUnit  unit);
const gchar * gimp_unit_get_abbreviation    (GimpUnit  unit);
const gchar * gimp_unit_get_singular        (GimpUnit  unit);
const gchar * gimp_unit_get_plural          (GimpUnit  unit);
56

57

58
G_END_DECLS
59

60
#endif /* __GIMP_UNIT_H__ */