1 /* xsane -- a graphical (X11, gtk) scanner-oriented SANE frontend
2 
3    xsane-viewer.h
4 
5    Oliver Rauch <Oliver.Rauch@rauch-domain.de>
6    Copyright (C) 2001-2007 Oliver Rauch
7    This file is part of the XSANE package.
8 
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13 
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
22 
23 /* ---------------------------------------------------------------------------------------------------------------------- */
24 
25 #ifndef XSANE_VIEWER_H
26 #define XSANE_VIEWER_H
27 
28 #include <gdk/gdkkeysyms.h>
29 #include <gdk/gdk.h>
30 #include <gtk/gtk.h>
31 
32 typedef enum
33 {
34   VIEWER_NO_MODIFICATION = 0,
35   VIEWER_NO_NAME_AND_SIZE_MODIFICATION,
36   VIEWER_NO_NAME_MODIFICATION,
37   VIEWER_FULL_MODIFICATION
38 } viewer_modification;
39 
40 typedef struct Viewer
41 {
42   struct Viewer *next_viewer;
43 
44   char *filename;
45   char *output_filename;
46   char *last_saved_filename;
47   char *undo_filename;
48   char *selection_filetype;
49 
50   int cms_function;
51 
52   int allow_reduction_to_lineart;
53   int keep_viewer_pnm_format;
54   float zoom;
55   int image_saved;
56   int cancel_save;
57   viewer_modification allow_modification;
58 
59   int despeckle_radius;
60   float blur_radius;
61 
62   int enable_color_management;
63   int cms_enable;
64   int cms_bpc;
65   int cms_proofing;
66   int cms_intent;
67   int cms_proofing_intent;
68   int cms_gamut_check;
69   int cms_gamut_alarm_color;
70 
71   int bind_scale;
72   double x_scale_factor;
73   double y_scale_factor;
74 
75   GtkWidget *top;
76   GtkWidget *button_box;
77 
78   GtkWidget *file_button_box;
79   GtkWidget *edit_button_box;
80   GtkWidget *filters_button_box;
81   GtkWidget *geometry_button_box;
82 
83   GtkWidget *file_menu;
84   GtkWidget *edit_menu;
85   GtkWidget *filters_menu;
86   GtkWidget *geometry_menu;
87   GtkWidget *color_management_menu;
88 
89   GtkWidget *viewport;
90   GtkWidget *window;
91 
92   GtkWidget *save_menu_item;
93   GtkWidget *ocr_menu_item;
94   GtkWidget *clone_menu_item;
95 
96   GtkWidget *undo_menu_item;
97 
98   GtkWidget *despeckle_menu_item;
99   GtkWidget *blur_menu_item;
100 
101   GtkWidget *save;
102   GtkWidget *ocr;
103   GtkWidget *undo;
104   GtkWidget *clone;
105 
106   GtkWidget *despeckle;
107   GtkWidget *blur;
108 
109   GtkWidget *cms_proofing_widget[3];
110   GtkWidget *cms_intent_widget[4];
111   GtkWidget *cms_proofing_intent_widget[2];
112   GtkWidget *cms_gamut_alarm_color_widget[6];
113 
114   GtkWidget *image_info_label;
115 
116   GtkProgressBar *progress_bar;
117 
118   GtkWidget *active_dialog;
119 
120   int block_actions;
121 }
122 Viewer;
123 
124 extern Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_reduction_to_lineart,
125                                 char *output_filename, viewer_modification allow_modification, int image_saved);
126 
127 #endif
128