1 /*
2  * * Copyright (C) 2006-2011 Anders Brander <anders@brander.dk>,
3  * * Anders Kvist <akv@lnxbx.dk> and Klaus Post <klauspost@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19 
20 #ifndef RS_TYPES_H
21 #define RS_TYPES_H
22 
23 #include <gtk/gtk.h>
24 
25 /* Defined in rawfile.c */
26 typedef struct _RAWFILE RAWFILE;
27 
28 /* Defined in rs-image.c */
29 typedef struct _RSImage RSImage;
30 
31 /* Defined in rs-image16.h */
32 typedef struct _rs_image16 RS_IMAGE16;
33 
34 /* Defined in rs-metadata.h */
35 typedef struct _RSMetadata RSMetadata;
36 
37 /* Defined in rs-color-transform.c */
38 typedef struct _RSColorTransform RSColorTransform;
39 
40 typedef struct {
41 	GObject parent;
42 
43 	gboolean dispose_has_run;
44 
45 	gchar *filename;
46 	guchar *map;
47 	gsize map_length;
48 
49 	gushort byte_order;
50 	guchar tiff_version;
51 	guint first_ifd_offset;
52 	guint num_ifd;
53 	GList *ifds;
54 
55 	GType ifd_type;
56 	GType ifd_entry_type;
57 } RSTiff;
58 
59 typedef struct {double coeff[3][3]; } RS_MATRIX3;
60 typedef struct {int coeff[3][3]; } RS_MATRIX3Int;
61 typedef struct {double coeff[4][4]; } RS_MATRIX4;
62 typedef struct {int coeff[4][4]; } RS_MATRIX4Int;
63 
64 typedef struct {
65 		union { gfloat x; gfloat X; gfloat R; gfloat h; gfloat fHueShift; };
66 		union { gfloat y; gfloat Y; gfloat G; gfloat s; gfloat fSatScale; };
67 		union { gfloat z; gfloat Z; gfloat B; gfloat v; gfloat fValScale; };
68 } RS_VECTOR3;
69 
70 typedef struct {
71 	gfloat x;
72 	gfloat y;
73 	gfloat padding_to_match_RS_VECTOR3;
74 } RS_xy_COORD;
75 
76 typedef RS_VECTOR3 RS_XYZ_VECTOR;
77 
78 typedef struct {
79 	gint x1;
80 	gint y1;
81 	gint x2;
82 	gint y2;
83 } RS_RECT;
84 
85 typedef enum {
86 	R = 0,
87 	G = 1,
88 	B = 2,
89 	G2 = 3
90 } RSColor;
91 
92 #endif /* RS_TYPES_H */
93 
94