color-balance.h 2.77 KB
Newer Older
Elliot Lee's avatar
Elliot Lee committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* The GIMP -- an image manipulation program
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Elliot Lee's avatar
Elliot Lee committed
17
 */
Sven Neumann's avatar
Sven Neumann committed
18

Michael Natterer's avatar
Michael Natterer committed
19
20
21
22
23
#ifndef __GIMP_COLOR_BALANCE_DIALOG_H__
#define __GIMP_COLOR_BALANCE_DIALOG_H__


#include "gimpimagemaptool.h"
Elliot Lee's avatar
Elliot Lee committed
24

Michael Natterer's avatar
Michael Natterer committed
25

Manish Singh's avatar
Manish Singh committed
26
27
28
29
30
31
32
typedef enum
{
  SHADOWS,
  MIDTONES,
  HIGHLIGHTS
} TransferMode;

Michael Natterer's avatar
Michael Natterer committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

#define GIMP_TYPE_COLOR_BALANCE_TOOL            (gimp_color_balance_tool_get_type ())
#define GIMP_COLOR_BALANCE_TOOL(obj)            (GTK_CHECK_CAST ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceTool))
#define GIMP_IS_COLOR_BALANCE_TOOL(obj)         (GTK_CHECK_TYPE ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL))
#define GIMP_COLOR_BALANCE_TOOL_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceToolClass))
#define GIMP_IS_COLOR_BALANCE_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL))


typedef struct _GimpColorBalanceTool      GimpColorBalanceTool;
typedef struct _GimpColorBalanceToolClass GimpColorBalanceToolClass;

struct _GimpColorBalanceTool
{
  GimpImageMapTool  parent_instance;
};

struct _GimpColorBalanceToolClass
{
  GimpImageMapToolClass  parent_class;
};


Manish Singh's avatar
Manish Singh committed
55
typedef struct _ColorBalanceDialog ColorBalanceDialog;
Michael Natterer's avatar
Michael Natterer committed
56

Manish Singh's avatar
Manish Singh committed
57
58
struct _ColorBalanceDialog
{
Michael Natterer's avatar
Michael Natterer committed
59
  GtkWidget     *shell;
Manish Singh's avatar
Manish Singh committed
60

Michael Natterer's avatar
Michael Natterer committed
61
62
63
  GtkAdjustment *cyan_red_data;
  GtkAdjustment *magenta_green_data;
  GtkAdjustment *yellow_blue_data;
Manish Singh's avatar
Manish Singh committed
64

Michael Natterer's avatar
Michael Natterer committed
65
  GimpDrawable  *drawable;
66
  ImageMap      *image_map;
Manish Singh's avatar
Manish Singh committed
67

Michael Natterer's avatar
Michael Natterer committed
68
69
70
  gdouble        cyan_red[3];
  gdouble        magenta_green[3];
  gdouble        yellow_blue[3];
Manish Singh's avatar
Manish Singh committed
71

Michael Natterer's avatar
Michael Natterer committed
72
73
74
75
76
77
78
  guchar         r_lookup[256];
  guchar         g_lookup[256];
  guchar         b_lookup[256];

  gboolean       preserve_luminosity;
  gboolean       preview;
  TransferMode   application_mode;
Manish Singh's avatar
Manish Singh committed
79
};
Elliot Lee's avatar
Elliot Lee committed
80
81


Michael Natterer's avatar
Michael Natterer committed
82
void       gimp_color_balance_tool_register (Gimp *gimp);
Michael Natterer's avatar
Michael Natterer committed
83
84
85
86

GtkType    gimp_color_balance_tool_get_type (void);


87
void   color_balance_dialog_hide	  (void);
Michael Natterer's avatar
Michael Natterer committed
88
89
90
void   color_balance                      (PixelRegion       *srcPR,
					   PixelRegion       *destPR,
					   void              *data);
Elliot Lee's avatar
Elliot Lee committed
91

Michael Natterer's avatar
Michael Natterer committed
92
void   color_balance_create_lookup_tables (ColorBalanceDialog *cbd);
Elliot Lee's avatar
Elliot Lee committed
93

Sven Neumann's avatar
Sven Neumann committed
94

Michael Natterer's avatar
Michael Natterer committed
95
#endif  /*  __GIMP_COLOR_BALANCE_GIMP_H__  */