1 /* sane - Scanner Access Now Easy. 2 Copyright (C) 2001-2002 Matthew C. Duggan and Simon Krix 3 This file is part of the SANE package. 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 as 7 published by the Free Software Foundation; either version 2 of the 8 License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, but 11 WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 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, see <https://www.gnu.org/licenses/>. 17 18 As a special exception, the authors of SANE give permission for 19 additional uses of the libraries contained in this release of SANE. 20 21 The exception is that, if you link a SANE library with other files 22 to produce an executable, this does not by itself cause the 23 resulting executable to be covered by the GNU General Public 24 License. Your use of that executable is in no way restricted on 25 account of linking the SANE library code into it. 26 27 This exception does not, however, invalidate any other reasons why 28 the executable file might be covered by the GNU General Public 29 License. 30 31 If you submit changes to SANE to the maintainers to be included in 32 a subsequent release, you agree by submitting the changes that 33 those changes may be distributed with this exception intact. 34 35 If you write modifications of your own for SANE, it is your choice 36 whether to permit this exception to apply to your modifications. 37 If you do not wish that, delete this exception notice. 38 39 ----- 40 41 This file is part of the canon_pp backend, supporting Canon FBX30P 42 and NX40P scanners 43 44 */ 45 46 47 #ifndef CANON_PARALLEL_H 48 49 #define CANON_PARALLEL_H 50 51 #ifdef BACKEND_NAME 52 #undef BACKEND_NAME 53 #define BACKEND_NAME canon_pp 54 #endif 55 56 #define DEBUG_NOT_STATIC 57 #include "../include/sane/sanei_debug.h" 58 59 #ifndef PACKAGE 60 #define PACKAGE "Canon Parallel SANE Backend" 61 #endif 62 63 #define CMODE_COLOUR "Colour" 64 #define CMODE_MONO "Mono" 65 #define CANONP_CONFIG_FILE "canon_pp.conf" 66 /* options: num,res,colour,depth,tl-x,tl-y,br-x,br-y,cal */ 67 /* preview option disabled */ 68 #define NUM_OPTIONS 9 69 #define BUF_MAX 64000 70 71 /* Indexes into options array */ 72 #define OPT_NUM_OPTIONS 0 73 #define OPT_RESOLUTION 1 74 #define OPT_COLOUR_MODE 2 75 #define OPT_DEPTH 3 76 #define OPT_TL_X 4 77 #define OPT_TL_Y 5 78 #define OPT_BR_X 6 79 #define OPT_BR_Y 7 80 #define OPT_CAL 8 81 #define OPT_PREVIEW 9 82 #if 0 83 #define OPT_GAMMA_R 10 84 #define OPT_GAMMA_G 11 85 #define OPT_GAMMA_B 12 86 #endif 87 /*#define OPT_GAMMA 13*/ 88 89 typedef struct CANONP_Scanner_Struct CANONP_Scanner; 90 91 struct CANONP_Scanner_Struct 92 { 93 CANONP_Scanner *next; 94 SANE_Device hw; 95 SANE_Option_Descriptor opt[NUM_OPTIONS]; 96 SANE_Int vals[NUM_OPTIONS]; 97 SANE_Bool opened; 98 SANE_Bool scanning; 99 SANE_Bool sent_eof; 100 SANE_Bool cancelled; 101 SANE_Bool setup; 102 SANE_Int lines_scanned; 103 SANE_Int bytes_sent; 104 105 char *weights_file; 106 SANE_Bool cal_readonly; 107 SANE_Bool cal_valid; 108 109 scanner_parameters params; 110 scan_parameters scan; 111 112 int ieee1284_mode; 113 int init_mode; 114 115 SANE_Bool scanner_present; 116 117 }; 118 119 120 #endif 121