1 /* sane - Scanner Access Now Easy. 2 3 Copyright (C) 1998 David Huggins-Daines, heavily based on the Apple 4 scanner driver (since Abaton scanners are very similar to old Apple 5 scanners), which is (C) 1998 Milon Firikis, which is, in turn, based 6 on the Mustek driver, (C) 1996-7 David Mosberger-Tang. 7 8 This file is part of the SANE package. 9 10 This program is free software; you can redistribute it and/or 11 modify it under the terms of the GNU General Public License as 12 published by the Free Software Foundation; either version 2 of the 13 License, or (at your option) any later version. 14 15 This program is distributed in the hope that it will be useful, but 16 WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program. If not, see <https://www.gnu.org/licenses/>. 22 23 As a special exception, the authors of SANE give permission for 24 additional uses of the libraries contained in this release of SANE. 25 26 The exception is that, if you link a SANE library with other files 27 to produce an executable, this does not by itself cause the 28 resulting executable to be covered by the GNU General Public 29 License. Your use of that executable is in no way restricted on 30 account of linking the SANE library code into it. 31 32 This exception does not, however, invalidate any other reasons why 33 the executable file might be covered by the GNU General Public 34 License. 35 36 If you submit changes to SANE to the maintainers to be included in 37 a subsequent release, you agree by submitting the changes that 38 those changes may be distributed with this exception intact. 39 40 If you write modifications of your own for SANE, it is your choice 41 whether to permit this exception to apply to your modifications. 42 If you do not wish that, delete this exception notice. */ 43 44 #ifndef abaton_h 45 #define abaton_h 46 47 #include <sys/types.h> 48 49 enum Abaton_Modes 50 { 51 ABATON_MODE_LINEART=0, 52 ABATON_MODE_HALFTONE, 53 ABATON_MODE_GRAY 54 }; 55 56 enum Abaton_Option 57 { 58 OPT_NUM_OPTS = 0, 59 60 OPT_MODE_GROUP, 61 OPT_MODE, 62 OPT_X_RESOLUTION, 63 OPT_Y_RESOLUTION, 64 OPT_RESOLUTION_BIND, 65 OPT_PREVIEW, 66 OPT_HALFTONE_PATTERN, 67 68 OPT_GEOMETRY_GROUP, 69 OPT_TL_X, /* top-left x */ 70 OPT_TL_Y, /* top-left y */ 71 OPT_BR_X, /* bottom-right x */ 72 OPT_BR_Y, /* bottom-right y */ 73 74 OPT_ENHANCEMENT_GROUP, 75 OPT_BRIGHTNESS, 76 OPT_CONTRAST, 77 OPT_THRESHOLD, 78 OPT_NEGATIVE, 79 OPT_MIRROR, 80 81 /* must come last: */ 82 NUM_OPTIONS 83 }; 84 85 enum ScannerModels 86 { 87 ABATON_300GS, 88 ABATON_300S 89 }; 90 91 typedef struct Abaton_Device 92 { 93 struct Abaton_Device *next; 94 SANE_Int ScannerModel; 95 SANE_Device sane; 96 SANE_Range dpi_range; 97 unsigned flags; 98 } 99 Abaton_Device; 100 101 typedef struct Abaton_Scanner 102 { 103 /* all the state needed to define a scan request: */ 104 struct Abaton_Scanner *next; 105 106 SANE_Option_Descriptor opt[NUM_OPTIONS]; 107 Option_Value val[NUM_OPTIONS]; 108 109 SANE_Bool scanning; 110 SANE_Bool AbortedByUser; 111 112 SANE_Parameters params; 113 114 /* The actual bpp, before "Pseudo-8-bit" fiddling */ 115 SANE_Int bpp; 116 117 /* window, in pixels */ 118 SANE_Int ULx; 119 SANE_Int ULy; 120 SANE_Int Width; 121 SANE_Int Height; 122 123 int fd; /* SCSI filedescriptor */ 124 125 /* scanner dependent/low-level state: */ 126 Abaton_Device *hw; 127 128 } 129 Abaton_Scanner; 130 131 #endif /* abaton_h */ 132