[BACK]Return to scanio.h CVS log [TXT][DIR] Up to [local] / sys / sys

Annotation of sys/sys/scanio.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: scanio.h,v 1.7 1997/04/15 10:51:33 tholo Exp $        */
        !             2: /*     $NetBSD: scanio.h,v 1.1 1996/02/18 20:33:18 mycroft Exp $       */
        !             3:
        !             4: /*
        !             5:  * Copyright (c) 1995 Kenneth Stailey.  All rights reserved.
        !             6:  *
        !             7:  * Redistribution and use in source and binary forms, with or without
        !             8:  * modification, are permitted provided that the following conditions
        !             9:  * are met:
        !            10:  * 1. Redistributions of source code must retain the above copyright
        !            11:  *    notice, this list of conditions and the following disclaimer.
        !            12:  * 2. Redistributions in binary form must reproduce the above copyright
        !            13:  *    notice, this list of conditions and the following disclaimer in the
        !            14:  *    documentation and/or other materials provided with the distribution.
        !            15:  * 3. All advertising materials mentioning features or use of this software
        !            16:  *    must display the following acknowledgement:
        !            17:  *     This product includes software developed by Kenneth Stailey.
        !            18:  * 4. The name of the author may not be used to endorse or promote products
        !            19:  *    derived from this software without specific prior written permission.
        !            20:  *
        !            21:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            22:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            23:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            24:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            25:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        !            26:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        !            27:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        !            28:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            29:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
        !            30:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        !            31:  */
        !            32:
        !            33: /*
        !            34:  * Definitions for PINT scanner drivers
        !            35:  */
        !            36:
        !            37: #ifndef _SYS_SCANIO_H
        !            38: #define _SYS_SCANIO_H
        !            39:
        !            40: /*
        !            41:  * Some comments about the values in the scan_io struct:
        !            42:  *
        !            43:  * All user-changeable values have minimum and maximum values for
        !            44:  * specific scanner types and are rejected by the special drivers if
        !            45:  * they are not in range. For values in the range, the driver selects
        !            46:  * the next physically possible setting for the particular scanner.
        !            47:  * So it is good practice to issue a SCIOCGET after a SCIOCSET to see
        !            48:  * what the driver has chosen.
        !            49:  *
        !            50:  * Brightness and contrast default to 100 (%) but scanners may support
        !            51:  * higher and/or lower values, though the maximum value is 255.
        !            52:  * velocity is the scan speed and defaults to 100 (%), only slower
        !            53:  * values may be possible.
        !            54:  */
        !            55:
        !            56: struct scan_io {
        !            57:        u_long  scan_width;             /* width in 1/1200ths of an inch */
        !            58:        u_long  scan_height;            /* height in 1/1200ths of an inch */
        !            59:        u_short scan_x_resolution;      /* horizontal resolution in dots-per-inch */
        !            60:        u_short scan_y_resolution;      /* vertical resolution in dots-per-inch */
        !            61:        u_long  scan_x_origin;          /* horizontal coordinate of upper left corner */
        !            62:        u_long  scan_y_origin;          /* vertical coordinate of upper left corner */
        !            63:        u_char  scan_image_mode;        /* type of image data sent by scanner */
        !            64:        u_char  scan_brightness;        /* brightness control for those to can do it */
        !            65:        u_char  scan_contrast;          /* contrast control for those to can do it */
        !            66:        u_char  scan_quality;           /* speed of scan for instance */
        !            67:        u_long  scan_window_size;       /* size of window in bytes (ro) */
        !            68:        u_long  scan_lines;             /* number of pixels per column (ro) */
        !            69:        u_long  scan_pixels_per_line;   /* number of pixels per line (ro) */
        !            70:        u_short scan_bits_per_pixel;    /* number of bits per pixel (ro) */
        !            71:        u_char  scan_scanner_type;      /* type of scanner (ro) */
        !            72: };
        !            73:
        !            74: /*
        !            75:  * defines for different commands
        !            76:  */
        !            77:
        !            78: #define SCIOCGET       _IOR('S', 1, struct scan_io) /* retrieve parameters */
        !            79: #define SCIOCSET       _IOW('S', 2, struct scan_io) /* set parameters */
        !            80: #define SCIOCRESTART   _IO('S', 3) /* restart scan */
        !            81: #define SCIOC_USE_ADF  _IO('S', 4) /* use ADF as paper source for next scan */
        !            82:                                    /* even after close() */
        !            83: /*
        !            84:  * defines for scan_image_mode field
        !            85:  */
        !            86:
        !            87: #define SIM_BINARY_MONOCHROME  0
        !            88: #define SIM_DITHERED_MONOCHROME        1
        !            89: #define SIM_GRAYSCALE          2
        !            90: #define SIM_COLOR              5
        !            91: #define SIM_RED                        103
        !            92: #define SIM_GREEN              104
        !            93: #define SIM_BLUE               105
        !            94:
        !            95: /*
        !            96:  * defines for different types of scanners & product names as comments
        !            97:  */
        !            98:
        !            99: #define RICOH_IS410    1       /* Ricoh IS-410 */
        !           100: #define FUJITSU_M3096G 2       /* Fujitsu M3096G */
        !           101: #define HP_SCANJET_IIC 3       /* HP SCL scanners (ScanJet IIc, IIcx, ...) */
        !           102: #define RICOH_FS1      4       /* Ricoh FS1 */
        !           103: #define SHARP_JX600    5       /* Sharp JX600 */
        !           104: #define RICOH_IS50     6       /* Ricoh IS-50 */
        !           105: #define IBM_2456       7       /* IBM 2456 */
        !           106: #define UMAX_UC630     8       /* UMAX UC630 */
        !           107: #define UMAX_UG630     9       /* UMAX UG630 */
        !           108: #define MUSTEK_06000CX 10      /* Mustek MFS06000CX */
        !           109: #define MUSTEK_12000CX 11      /* Mustek MFS12000CX */
        !           110: #define EPSON_ES300C   12      /* epson es300c */
        !           111: #define GENERIC_SCSI2  13      /* good luck 8c{)] */
        !           112: #define ULTIMA_AC6000C 14      /* Ultima A6000C */
        !           113: #define ULTIMA_AT3     15      /* Ultima AT3 */
        !           114:
        !           115: #endif /* _SYS_SCANIO_H */

CVSweb