~ubuntu-branches/ubuntu/breezy/gimp/breezy

« back to all changes in this revision

Viewing changes to app/widgets/gimpunitstore.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-10-04 19:04:46 UTC
  • Revision ID: james.westby@ubuntu.com-20051004190446-ukh32kwk56s4sjhu
Tags: upstream-2.2.8
ImportĀ upstreamĀ versionĀ 2.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* The GIMP -- an image manipulation program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
4
 * gimpunitstore.h
 
5
 * Copyright (C) 2004  Sven Neumann <sven@gimp.org>
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program 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
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
 */
 
21
 
 
22
#ifndef __GIMP_UNIT_STORE_H__
 
23
#define __GIMP_UNIT_STORE_H__
 
24
 
 
25
 
 
26
enum
 
27
{
 
28
  GIMP_UNIT_STORE_UNIT,
 
29
  GIMP_UNIT_STORE_UNIT_FACTOR,
 
30
  GIMP_UNIT_STORE_UNIT_DIGITS,
 
31
  GIMP_UNIT_STORE_UNIT_IDENTIFIER,
 
32
  GIMP_UNIT_STORE_UNIT_SYMBOL,
 
33
  GIMP_UNIT_STORE_UNIT_ABBREVIATION,
 
34
  GIMP_UNIT_STORE_UNIT_SINGULAR,
 
35
  GIMP_UNIT_STORE_UNIT_PLURAL,
 
36
  GIMP_UNIT_STORE_UNIT_COLUMNS,
 
37
  GIMP_UNIT_STORE_FIRST_VALUE = GIMP_UNIT_STORE_UNIT_COLUMNS
 
38
};
 
39
 
 
40
 
 
41
#define GIMP_TYPE_UNIT_STORE            (gimp_unit_store_get_type ())
 
42
#define GIMP_UNIT_STORE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_UNIT_STORE, GimpUnitStore))
 
43
#define GIMP_UNIT_STORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_UNIT_STORE, GimpUnitStoreClass))
 
44
#define GIMP_IS_UNIT_STORE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_UNIT_STORE))
 
45
#define GIMP_IS_UNIT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_UNIT_STORE))
 
46
#define GIMP_UNIT_STORE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_UNIT_STORE, GimpUnitStoreClass))
 
47
 
 
48
 
 
49
typedef struct _GimpUnitStoreClass  GimpUnitStoreClass;
 
50
 
 
51
struct _GimpUnitStoreClass
 
52
{
 
53
  GObjectClass  parent_class;
 
54
};
 
55
 
 
56
struct _GimpUnitStore
 
57
{
 
58
  GObject       parent_instance;
 
59
 
 
60
  gint          num_values;
 
61
  gdouble      *values;
 
62
  gdouble      *resolutions;
 
63
};
 
64
 
 
65
 
 
66
GType           gimp_unit_store_get_type (void) G_GNUC_CONST;
 
67
 
 
68
GimpUnitStore * gimp_unit_store_new              (gint           num_values);
 
69
 
 
70
void            gimp_unit_store_set_pixel_value  (GimpUnitStore *store,
 
71
                                                  gint           index,
 
72
                                                  gdouble        value);
 
73
void            gimp_unit_store_set_pixel_values (GimpUnitStore *store,
 
74
                                                  gdouble        first_value,
 
75
                                                  ...);
 
76
void            gimp_unit_store_set_resolution   (GimpUnitStore *store,
 
77
                                                  gint           index,
 
78
                                                  gdouble        resolution);
 
79
void            gimp_unit_store_set_resolutions  (GimpUnitStore *store,
 
80
                                                  gdouble        first_resolution,
 
81
                                                  ...);
 
82
gdouble         gimp_unit_store_get_value        (GimpUnitStore *store,
 
83
                                                  GimpUnit       unit,
 
84
                                                  gint           index);
 
85
void            gimp_unit_store_get_values       (GimpUnitStore *store,
 
86
                                                  GimpUnit       unit,
 
87
                                                  gdouble       *first_value,
 
88
                                                  ...);
 
89
 
 
90
 
 
91
#endif  /* __GIMP_UNIT_STORE_H__ */