/////////////////////////////////////////////////////////////////////////////
//
//  Kodak Document Scanner TWAIN Source
//  Custom Stuff...
//
//  Copyright (c) 1998-2005 Eastman Kodak Company, All Rights Reserved
//
//  Altering the information in this file is not authorized except
//  with the express consent of Eastman Kodak Company.  The values
//  of the constants in this file are set at the discretion of
//  Eastman Kodak Company.  New constants may be added at any
//  time and old ones may be removed or modified at any time.
//
//  The capabilities contained in this header file are unique to the
//  Kodak Digital Science(tm) Scanners.  As such, the application
//  has a responsibility to verify that it is communicating with
//  this Source before attempting to use them.  Verification is
//  accomplished by examining the TW_IDENTITY structure returned by
//  the Source from the DG_CONTROL / DAT_PARENT / MSG_OPENDS call.
//  This Source reports its identity in the following fields:
//
//    TW_IDENTITY
//        Manufacturer     "Eastman Kodak Company"
//        Version.Info     "KDS v#.#.# YYYY/MM/DD"
//
//  By looking at the Manufacturer name, and looking for KDS as the
//  first three letters in the Version.Info, it should be possible
//  for an application to unambiguously identify this Source.
//
//
//  The Family names break down into the following models...
//
//    GEMINI:
//      500,  500A,
//      900,   923,  990,
//      5500, 5520,
//      7500, 7520, 7550, 7560,
//      9500, 9520
//
//    VIPER:
//      3500, 3510, 3520, 3590,
//      4500
//
//    PRISM:
//      i810, i820, i830, i840
//
//    PHOENIX:
//      i610, i620, i640, i660
//
//    ALIEN:
//      i250, i260, i280
//
//    Alf:
//      i150, i160
//
//    Pony:
//      i30, i40, i40T
//
//    MUSTANG2:
//      i55, i65
//
//
//  For more information about these capabilities and the driver,
//  please refer to the Integrator's Guide on the media that came
//  with your scanner.
//  
/////////////////////////////////////////////////////////////////////////////

#ifndef KDSCUST_H
#define KDSCUST_H



////////////////////////////////////////////////////////////////////////////////
//									INCLUDE FILES
////////////////////////////////////////////////////////////////////////////////

#ifdef _WIN32
#include "twain.h"
#endif



////////////////////////////////////////////////////////////////////////////////
//						DEFINES, TYPEDEFS, CONSTS & ENUMS
////////////////////////////////////////////////////////////////////////////////



// ICAP_ADDBORDER
// Family:      Prism
// Type:        TWTY_BOOL
// Container:   OneValue (per camera)
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Adds a black border around a bitonal document.
#define ICAP_ADDBORDER                      0x8023


// ICAP_AUTOCOLORAMOUNT
// Family:      Phoenix
// Type:        TWTY_INT32
// Container:   Range (per camera)
// Allowed:     1 to 200
// Default:     1
// Notes:       The amount of color that needs to be present in a document
//              before it will be saved as either a color or grayscale image.
#define ICAP_AUTOCOLORAMOUNT                0x8092


// ICAP_AUTOCOLORCONTENT
// Family:      Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration (per camera)
// Allowed:     TWCL_NONE,TWCL_LOW,TWCL_MEDIUM,TWCL_HIGH,TWCL_CUSTOM
// Default:     TWCL_NONE
// Notes:       The documents require amount of color to be saved as color
#define ICAP_AUTOCOLORCONTENT               0x8093
#define   TWCL_NONE                         0
#define   TWCL_LOW                          1
#define   TWCL_MEDIUM                       2
#define   TWCL_HIGH                         3
#define   TWCL_CUSTOM                       4


// ICAP_AUTOCOLORTHRESHOLD
// Family:      Phoenix
// Type:        TWTY_INT32
// Container:   Range (per camera)
// Allowed:     0 to 100
// Default:     50
// Notes:       The color threshold or intensity (i.e. pale blue vs. dark blue)
//              at which a given a color will be included in the Color Amount
//              calculation . A higher value indicates that a more intense color
//              is required.
#define ICAP_AUTOCOLORTHRESHOLD             0x8094


// CAP_BACKGROUND
// Family:      Alf, Mustang2, Phoenix
// Type:        TWTY_INT16
// Container:   Enumeration
// Allowed:     TWBK_BLACK, TWBK_WHITE
// Default:     (scanner dependent)
// Notes:       Reports what the scanner background was at the
//              time the scanner was started.  This capability
//              cannot detect a "hot" change.
#define CAP_BACKGROUND                      0x8089
#define   TWBK_BLACK                        0
#define   TWBK_WHITE                        1


// CAP_BACKGROUNDFRONT
// Family:      Alf
// Type:        TWTY_INT16
// Container:   Enumeration
// Allowed:     TWBF_BLACK, TWBF_WHITE
// Default:     (scanner dependent)
// Notes:       Reports what the scanner front background was at the
//              time the scanner was started.  This capability
//              cannot detect a "hot" change.
#define CAP_BACKGROUNDFRONT                 0x808C
#define   TWBF_BLACK                        0
#define   TWBF_WHITE                        1


// CAP_BACKGROUNDREAR
// Family:      Alf
// Type:        TWTY_INT16
// Container:   Enumeration
// Allowed:     TWBR_BLACK, TWBR_WHITE
// Default:     (scanner dependent)
// Notes:       Reports what the scanner rear background was at the
//              time the scanner was started.  This capability
//              cannot detect a "hot" change.
#define CAP_BACKGROUNDREAR                  0x808D
#define   TWBR_BLACK                        0
#define   TWBR_WHITE                        1


// CAP_BACKGROUNDPLATEN
// Family:      n/a
// Type:        TWTY_INT16
// Container:   Enumeration
// Allowed:     TWBP_BLACK, TWBP_WHITE
// Default:     (scanner dependent)
// Notes:       Reports what the scanner background was at the
//              time the scanner was started.  This capability
//              cannot detect a "hot" change.
//				This capability is not available at this time.
#define CAP_BACKGROUNDPLATEN                0x808E
#define   TWBP_BLACK                        0
#define   TWBP_WHITE                        1


// CAP_BATCHCOUNT
// Family:      Prism
// Type:        TWTY_FIX32
// Container:   Range
// Allowed:     0 - 32767
// Default:     0
// Notes:       Count of CAP_BATCHLEVEL's...
#define CAP_BATCHCOUNT                      0x802B


// CAP_BATCHENDFUNCTION
// Family:      Prism
// Type:        TWTY_INT16
// Container:   Enumeration (per camera)
// Allowed:     TWPL_NONE, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3
// Default:     TWPL_NONE
// Notes:       Determines the level that batching will count
//              and test against the batch counting value.
#define CAP_BATCHENDFUNCTION                0x804F
#define   TWBE_NONE                         0
#define   TWBE_STOPFEEDER                   1
#define   TWBE_ENDOFJOB                     2
#define   TWBE_NEWBATCH                     3


// CAP_BATCHLEVEL
// Family:      Prism
// Type:        TWTY_INT16
// Container:   Enumeration (per camera)
// Allowed:     TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3
// Default:     TWPL_LEVEL1
// Notes:       Determines the level that batching will count
//              and test against the batch counting value.
#define CAP_BATCHLEVEL                      0x804E


// CAP_BATCHSTARTFUNCTION
// Family:      Prism
// Type:        TWTY_INT16
// Container:   Enumeration (per camera)
// Allowed:     TWPL_NONE, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3
// Default:     TWPL_NONE
// Notes:       Level that a batch should start in...
#define CAP_BATCHSTARTFUNCTION              0x803F


// CAP_BINARIZATION
// Family:      Viper (3590 only)
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Controls the presence of binarization in the
//              camera control.  It also overrides the value
//              of the front bitonal CAP_CAMERAENABLE.
#define CAP_BINARIZATION                    0x8030


// CAP_BLANKPAGE
// Family:      Mustang2, Pony
// Type:        TW_UINT16
// Container:   Enumeration
// Allowed:     TWBP_IMAGE
// Default:     TWBP_IMAGE
// Notes:       Blank page detection.
#define CAP_BLANKPAGE                   0x809A
#define   TWBP_NONE                     0
#define   TWBP_IMAGE					1
#define   TWBP_PAGE		                2


// CAP_BLANKPAGEMODE
// Family:      Mustang2, Pony
// Type:        TW_UINT16
// Container:   Enumeration
// Allowed:     TWBM_COMPSIZE
// Default:     TWBM_COMPSIZE
// Notes:       Blank page detection mode.
#define CAP_BLANKPAGEMODE               0x809B
#define   TWBM_COMPSIZE                 0


// CAP_BLANKPAGECOMPSIZEBW
// Family:      Mustang2, Pony
// Type:        TW_UINT32
// Container:   Range
// Allowed:     0 to 1000KB
// Default:     0
// Notes:       Delete Bitonal image if the final size is less than specific amount.
//				Value needs to be in 1024 increments
#define CAP_BLANKPAGECOMPSIZEBW          0x809C


// CAP_BLANKPAGECOMPSIZEGRAY
// Family:      Mustang2, Pony
// Type:        TW_UINT32
// Container:   Range
// Allowed:     0 to 1000KB
// Default:     0
// Notes:       Delete Gray image if the final size is less than specific amount.
//				Value needs to be in 1024 increments
#define CAP_BLANKPAGECOMPSIZEGRAY          0x809D


// CAP_BLANKPAGECOMPSIZERGB
// Family:      Mustang2, Pony
// Type:        TW_UINT32
// Container:   Range
// Allowed:     0 to 1000KB
// Default:     0
// Notes:       Delete Color image if the final size is less than specific amount.
//				Value needs to be in 1024 increments
#define CAP_BLANKPAGECOMPSIZERGB           0x809E


// CAP_CAMERAENABLE
// Family:      Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_BOOL
// Container:   OneValue (per camera)
// Allowed:     TRUE / FALSE
// Default:     TRUE (except for the 3590 front bitonal)
// Notes:       Controls the delivery of images.  If this capability
//              is set to TRUE then the Source will deliver an image
//              for this camera during scanning.  You need to use
//              DAT_FILESYSTEM to address each of the cameras.
#define CAP_CAMERAENABLE                    0x801D


// CAP_CAMERAORDER
// Family:      Viper (3590/4500), Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Array
// Allowed:     TWCM_BW_BOTH, TWCM_CL_BOTH
// Default:     TWCM_CL_BOTH, TWCM_BW_BOTH
// Notes:       Selects the ordering of the cameras according to the
//              order that they appear in the list.  So the default
//              indicates that a color front or rear will precede a
//              bitonal front or rear.
#define CAP_CAMERAORDER                     0x801E
#define    TWCM_BW_BOTH                     0
#define    TWCM_BW_TOP                      1
#define    TWCM_BW_BOTTOM                   2
#define    TWCM_CLBW_BOTH                   3
#define    TWCM_CL_TOP                      4
#define    TWCM_CL_BOTTOM                   5
#define    TWCM_CL_BOTH                     6
#define    TWCM_GR_TOP                      7
#define    TWCM_GR_BOTTOM                   8
#define    TWCM_GR_BOTH                     9


// CAP_CHECKDIGIT
// Family:      Prism
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       To set the check image address digit ON/OFF.
#define CAP_CHECKDIGIT					0x808B


// ICAP_COLORSHARPENING
// Family:      Viper, Prism
// Type:        TWTY_INT16
// Container:   Enumeration (per camera)
// Allowed:     TWCS_NONE, TWCS_3X3FIRFILTER
// Default:     TWCS_3X3FIRFILTER
// Notes:       Color image sharpening.  This setting only has
//              meaning if ICAP_COMPRESSION is set to TWCP_JPEG.
#define ICAP_COLORSHARPENING                0x8041
#define   TWCS_NONE                         0
#define   TWCS_3X3FIRFILTER                 1


// ICAP_COLORTABLE
// Family:      Viper (3590/4500), Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     (as discovered in scanner)
// Notes:       Selects the color table to use.  This capability
//              is like ICAP_HALFTONES in that there is no
//              programmatic way to guarantee the results of a
//              given selection.  The best tactic is to present
//              the data to the user 'as is' and let them select
//              what they want.
#define ICAP_COLORTABLE                     0x8020
#define    TWCT_UNKNOWN                     -1
#define    TWCT_DEFAULT                     0
#define    TWCT_FILE01                      1
#define    TWCT_FILE02                      2
#define    TWCT_FILE03                      3
#define    TWCT_FILE04                      4
#define    TWCT_FILE05                      5
#define    TWCT_FILE06                      6
#define    TWCT_FILE07                      7
#define    TWCT_FILE08                      8
#define    TWCT_FILE09                      9
#define    TWCT_FILE10                      10
#define    TWCT_FILE11                      11
#define    TWCT_FILE12                      12
#define    TWCT_FILE13                      13
#define    TWCT_FILE14                      14
#define    TWCT_FILE15                      15
#define    TWCT_FILE16                      16


// ICAP_CROPPINGMODE
// Family:      Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Enumeration (per camera)
// Allowed:     See below...
// Default:     TWCR_AUTOMATICBORDERDETECTION
// Notes:       Selects the mode of cropping.  This capability is
//              tied to ICAP_AUTOMATICBORDERDETECTION, where FALSE
//              equals TWCR_TRANSPORT and TRUE equals
//              TWCR_AUTOMATICBORDERDETECTION.
//              Continuous cropping mode is also known as Long Paper mode.    
//				If the user set one of the camera to TWCR_CONTIUOUS
//				all the camera force to set cropping to TWCR_CONTIUOUS
//				and if all camera in TWCR_CONTIUOUS cropping mode, the 
//				user change one of the camera to other cropping mode
//              then all the camera will force to set the same cropping mode
#define ICAP_CROPPINGMODE                   0x8022
#define    TWCR_AUTOMATICBORDERDETECTION    0
#define    TWCR_TRANSPORT                   1
#define    TWCR_DOCUMENT                    2
#define    TWCR_AGGRESSIVEAUTOCROP          3
#define	   TWCR_CONTINUOUS					4


// CAP_DOCUMENTCOUNT
// Family:      Gemini
// Type:        TWTY_STR32
// Container:   OneValue
// Allowed:     0 - 999,999,999
// Default:     0
// Notes:       5000/7000/9000 only.  Sets the document count, but
//              only if CAP_PRINTERENABLED is either undefined or
//              set to FALSE.
#define CAP_DOCUMENTCOUNT                   0x8017


// CAP_DOCUMENTCOUNTENABLED
// Family:      Gemini
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       5000/7000/9000 only.  Determines whether or not
//              the CAP_DOCUMENTCOUNT is to be downloaded.
#define CAP_DOCUMENTCOUNTENABLED            0x8018


// CAP_DOUBLEFEEDENDJOB
// Family:      Prism
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       Controls the action the scanner takes when a double
//              feed is detected.  A value of TRUE will cause the
//              session to be terminated.  A value of FALSE will
//              cause the multifeed to be ignored (though an audible
//              alarm will still be sounded, if it is turned on).
#define CAP_DOUBLEFEEDENDJOB				0x806E


// CAP_DOUBLEFEEDSTOP
// Family:      Viper (not 3500), Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       Controls the action the scanner takes when a double
//              feed is detected.  A value of TRUE will cause the
//              session to be terminated.  A value of FALSE will
//              cause the multifeed to be ignored (though an audible
//              alarm will still be sounded, if it is turned on).
#define CAP_DOUBLEFEEDSTOP                  0x8056


// CAP_EASYSTACKING
// Family:      Phoenix
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       If set to TRUE then the scanner makes adjustments
//              to improve the arrangement of the output stack as
//              the paper exits the transport.
#define CAP_EASYSTACKING                    0x8075


// CAP_ENABLECOLORPATCHCODE
// Family:      Viper (3590)
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Controls recognition of the 3590 patch page.
#define CAP_ENABLECOLORPATCHCODE            0x8054


// CAP_ENERGYSTAR
// Family:      Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_FIX32
// Container:   Range
// Allowed:     Alien:	 0, 15 - 60 (minutes)
//				Alf/Phoenix/Pony/Mustang2: 0,  5 - 60 (minutes)
// Default:     Alien/Alf/Phoenix/Pony/Mustang2:  15
// Notes:       Minutes of idle time before Energy Star kicks in...
#define CAP_ENERGYSTAR                      0x802F


// CAP_FEEDERKEEPALIVE
// Family:      Viper
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Controls the behavior of the feeder in the following way:
// 
// State       ICAP_XFERCOUNT       First Page       All Other Pages
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// FALSE             -1             Timeout          Timeout
// FALSE             >0             Timeout          Timeout
// TRUE              -1             Keep Alive       Timeout
// TRUE              >0             Keep Alive       Timeout
//
// The effect when TRUE from the user's perspective is that if the
// transport times out while waiting for the first sheet of paper,
// the Source will reenable the scanner, and start the transport
// back up again.  It will continue to do this until it gets the
// first sheet of paper, or until the user stops the scanner from
// the application.
#define CAP_FEEDERKEEPALIVE                 0x8001


// CAP_FEEDERMODE
// Family:      Alien (i280)
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     TWFM_NONE, TWFM_SPECIAL
// Default:     TWFM_NONE
// Notes:       Selects TWFM_NONE will show Off on the UI
//				and TWFM_SPECIAL is On on the UI
//				CAP_FEEDERMODE is for Special Document
#define CAP_FEEDERMODE		                0x806F
#define      TWFM_NONE                          0
#define      TWFM_SPECIAL                       1


// ICAP_FILTERBACKGROUND
// Family:      Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Range
// Allowed:     0 - 255
// Default:     245
// Notes:       Selects the grayscale color to replace the dropout
//              color when capturing bitonal images...
#define ICAP_FILTERBACKGROUND               0x8026


// ICAP_FILTERENUM
// Family:      Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     See ICAP_FILTER
// Default:     TWFT_NONE
// Notes:       Tied to ICAP_FILTER...
//              ICAP_FILTER is an array...and we need an enum (sigh)...
#define ICAP_FILTERENUM                     0x8024


// ICAP_FILTERPROCESSING
// Family:      Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     TWFP_NORMAL, TWFP_LOWRES
// Default:     TWFP_NORMAL
// Notes:       If color dropout at low resolutions results in
//              unwanted artifacts, try changing this capability
//              to TWFP_LOWRES.
#define ICAP_FILTERPROCESSING               0x8088
#define      TWFP_NORMAL                         0
#define      TWFP_LOWRES                         1


// ICAP_FILTERTHRESHOLD
// Family:      Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Range
// Allowed:     0 - 255
// Default:     175
// Notes:       Selects the threshold point of the color data when
//              capturing bitonal images...
#define ICAP_FILTERTHRESHOLD                0x8025


// CAP_FIXEDDOCUMENTSIZE
// Family:      Viper (not 3500)
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Controls the scanner speed-up feature.  Note that this
//              feature cannot be used with overscan.  And it does
//              require that all the documents in the batch be of the
//              same size.
#define CAP_FIXEDDOCUMENTSIZE               0x8055


// ICAP_FLIPBACKGROUNDCOLOR
// Family:      Gemini
// Type:        TWTY_BOOL
// Container:   OneValue (per camera)
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       5000/7000 only.  This is Border Reduction.  A feature
//              that changes the borders on the left and the right to
//              white the opposite pixel flavor 'color'.  A value of
//              TRUE does the change, a value of FALSE leaves it as is...
#define ICAP_FLIPBACKGROUNDCOLOR            0x8043


// CAP_FOLDEDCORNER
// Family:      Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     TWFC_DISABLED, TWFC_STOP, TWFC_ENDOFJOB
// Default:     TWFC_DISABLED
// Notes:       Controls Folded Corner detection and the action taken
//              if one is discovered during scanning...
#define CAP_FOLDEDCORNER		            0x8070
#define      TWFC_DISABLED                       0
#define      TWFC_STOPFEEDER                     1
#define      TWFC_ENDOFJOB                       2
#define TWCC_FOLDEDCORNER					0x8001
#define TWDE_FOLDEDCORNER					0x8001


// CAP_FOLDEDCORNERSENSITIVITY
// Family:      Phoenix
// Type:        TWTY_UINT16
// Container:   Range
// Allowed:     1 - 100
// Default:     2
// Notes:       Controls the folded corner sensitivity, if folder
//				corner detection is turned on...
#define CAP_FOLDEDCORNERSENSITIVITY         0x8071


// ICAP_FORCECOMPRESSION
// Family:      Gemini, Viper, Prism, Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration (per camera)
// Allowed:     same rules as ICAP_COMPRESSION
// Default:     TWCP_NONE
// Notes:       A throughput efficiency mechanism.  If an application
//              requires uncompressed data, but the size of the image
//              is more than SCSI can manage, then use this capability
//              to force the scanner to compress the data, and the
//              Source to decompress in software before transferring
//              it to the application.  Note that with the Prism
//              this value is always TWCP_JPEG for the color cameras.
#define ICAP_FORCECOMPRESSION               0x8008


// ICAP_FRAMELENGTHCONTROL
// Family:      Gemini
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       5000/7000 only.  Controls the way the scanner detects
//              the end of the document.  A value of TRUE reflects the
//              way all other scanners work.  A value of FALSE should
//              be used for documents with ragged bottom edges...
#define ICAP_FRAMELENGTHCONTROL             0x8042


// CAP_FUNCTIONKEY*
// Family:      Prism
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     TWFK_NONE
// Notes:       i800 series only.  Controls the action taken by the
//              function keys during a scanning session...
#define CAP_FUNCTIONKEY1                    0x8037
#define CAP_FUNCTIONKEY2                    0x8038
#define CAP_FUNCTIONKEY3                    0x8039
#define CAP_FUNCTIONKEY4                    0x803A // not used
#define      TWFK_NONE                         0
#define      TWFK_ENDOFJOB                     1
#define      TWFK_TERMINATEBATCH               2
#define      TWFK_SKIPMULTIFEED                3
#define      TWFK_SKIPPRINTING                 4
#define      TWFK_SKIPPATCH                    5
#define      TWFK_LOWERELEVATOR                6


// ICAP_GAMMAENABLED
// Family:      Phoenix
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       A value of TRUE causes the scanner to apply
//              its gamma table to the image.  This only has
//              meaning for grayscale output.
#define ICAP_GAMMAENABLED                   0x8074


// ICAP_GRAYSCALE
// Family:      Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       If set to TRUE then the color output will be
//              converted to grayscale.  You can also get to
//              this mode by setting ICAP_PIXELTYPE to
//              TWPT_GRAY, though if you do it that way you
//              will get grayscale output for both the front
//              and the rear images...
#define ICAP_GRAYSCALE                      0x802E


// ICAP_HALFTONESQUALITY
// Family:      Viper (3590/4500)
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     TWHQ_SOFTWAREFAST and TWHQ_SOFTWAREBEST or
//              TWHQ_HARDWAREBEST
// Default:     TWHQ_SOFTWAREFAST or TWHQ_HARDWAREBEST
// Notes:       Selects the quality/performance of the 
//              ChromaTHR(tm) software quality settings for
//              making bitonal images from color data.  If
//              a hardware card is present, than it is the
//              only option available; otherwise the two
//              software options are made available...
#define ICAP_HALFTONESQUALITY               0x801F
#define    TWHQ_NONE                        0
#define    TWHQ_SOFTWAREFAST                1
#define    TWHQ_SOFTWAREBEST                2
#define    TWHQ_HARDWAREBEST                3


// CAP_IMAGEADDRESS
// Family:      Gemini, Prism
// Type:        TWTY_STR255
// Container:   OneValue
// Allowed:     The image address string...
// Default:     Scanner Next Image Address (read from device)
// Notes:       800/5000/7000/9000 only.  Sets the image address.
#define CAP_IMAGEADDRESS                    0x8015


// CAP_IMAGEADDRESSENABLED
// Family:      Gemini
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       5000/7000/9000 only.  Determines whether or not
//              the CAP_IMAGEADDRESS is to be downloaded.
#define CAP_IMAGEADDRESSENABLED             0x8016


// CAP_IMAGEADDRESSTEMPLATES
// Family:      Prism
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see below)
// Default:     TWIA_1
// Notes:       800 only.  Determines what kind of image address
//              format is allowed.  See CONST.INI for the user
//              selectable list of formats, and the language files
//              L_XX_XXX.INI for the associated text in the image
//              address presets dropdown list.  Note that, like
//              with ICAP_HALFTONES and ICAP_SUPPORTEDSIZES, it is
//              not really possible for an application to know
//              what the user is selecting, it just has to be
//              accepted blindly.
#define CAP_IMAGEADDRESSTEMPLATES           0x803E
#define      TWIA_CUSTOM                       -1
#define      TWIA_NONE                         0
#define      TWIA_1                            1
#define      TWIA_2                            2
#define      TWIA_3                            3
#define      TWIA_4                            4
#define      TWIA_5                            5
#define      TWIA_6                            6
#define      TWIA_7                            7
#define      TWIA_8                            8
#define      TWIA_9                            9
#define      TWIA_10                           10
#define      TWIA_11                           11
#define      TWIA_12                           12
#define      TWIA_13                           13
#define      TWIA_14                           14
#define      TWIA_15                           15
#define      TWIA_16                           16


// CAP_IMAGEADDRESS_A
// CAP_IMAGEADDRESS_B
// CAP_IMAGEADDRESS_C
// CAP_IMAGEADDRESS_D
// Family:      Prism
// Type:        TWTY_STR255
// Container:   OneValue
// Allowed:     The image address template fields...
// Default:     (see CAP_IMAGEADDRESSTEMPLATES)
// Notes:       800 only.  Specifies the meaning and the maximum sizes
//              of the fields in the image address.  A value of 'f'
//              indicates a fixed field.  Values of 1, 2, 3 indicate
//              level fields.  The number of characters determines the
//              maximum allowed in that field.
#define CAP_IMAGEADDRESS_A                  0x804A
#define CAP_IMAGEADDRESS_B                  0x804B
#define CAP_IMAGEADDRESS_C                  0x804C
#define CAP_IMAGEADDRESS_D                  0x804D


// ICAP_IMAGEEDGEFILL
// Family:      Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Enumeration (per camera)
// Allowed:     (see list below)
// Default:     TWIE_NONE
// Notes:       Fills in each edge of the image with the selected color
#define ICAP_IMAGEEDGEFILL					0x8095
#define      TWIE_NONE						   0
#define      TWIE_WHITE		                   1
#define		 TWIE_BLACK						   2


// ICAP_IMAGEEDGE*
// Family:      Pony, Mustang2
// Type:        TWTY_FIX32
// Container:   Range (per camera)
// Allowed:     8.64 inches for left and right
//				26 inches for the the top and bottom
// Default:     0
// Notes:       Amount of fill for the left/right/top/bottom edge of the image
#define ICAP_IMAGEEDGELEFT					0x8096
#define ICAP_IMAGEEDGERIGHT					0x8097
#define ICAP_IMAGEEDGETOP					0x8098
#define ICAP_IMAGEEDGEBOTTOM				0x8099


// CAP_IMAGEMAGNIFICATIONFACTOR
// Family:      n/a
// Type:        TWTY_UINT16
// Container:   Range
// Allowed:     0 - 255
// Default:     0
// Notes:       Helps the scanner determine the 'real' size of images
//              coming from the P-Card.  This information is used to
//              optimize buffer thresholding.
//				This capability is not available at this time.
#define CAP_IMAGEMAGNIFICATIONFACTOR        0x806B


// CAP_INDICATORSWARMUP
// Family:      Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       Controls the appearance of the LampSaver and Warmup
//              dialogs.  Only turn this off if these dialogs are
//              interfering with the operation of your application.
#define CAP_INDICATORSWARMUP                0x806C


// OBS_JPEGQUALITY
// Notes:       Same as standard ICAP_JPEGQUALITY, do not use.
#define OBS_JPEGQUALITY                     0x8040


// ICAP_LAMPSAVER
// Family:      Viper, Prism    
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       If TRUE the scanner's lamps will automatically turn off
//              after ten minutes of non-use; saving power and extending
//              the life of the lamps.
#define ICAP_LAMPSAVER                      0x8005


// ICAP_LAMPTIMEOUT
// Family:      Viper, Prism
// Type:        TWTY_UINT16
// Container:   Range
// Allowed:     Viper:0,10  Prism:0-30 (minutes)
// Default:     10, 20
// Notes:       Controls the lamp saver option.  Please note that this
//              capability should be used instead of ICAP_LAMPSAVER.
#define ICAP_LAMPTIMEOUT                    0x802A


// CAP_LEVELTOFOLLOW1
// CAP_LEVELTOFOLLOW2
// CAP_LEVELTOFOLLOW3
// Family:      Prism
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3
// Default:     TWPL_LEVEL1
// Notes:       For Image Addressing, determines dependencies among the
//              level counters.
#define CAP_LEVELTOFOLLOW1                  0x803B
#define CAP_LEVELTOFOLLOW2                  0x803C
#define CAP_LEVELTOFOLLOW3                  0x803D


// CAP_MODE
// Family:      Gemini
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     TWMO_MODE1
// Notes:       Selects the current mode.
#define CAP_MODE                            0x8019
#define   TWMO_MODE1                        1
#define   TWMO_MODE2                        2
#define   TWMO_MODE3                        3
#define   TWMO_MODE4                        4
#define   TWMO_MODE5                        5
#define   TWMO_MODE6                        6
#define   TWMO_MODE7                        7
#define   TWMO_MODE8                        8
#define   TWMO_MODE9                        9
#define   TWMO_MODE10                       10
#define   TWMO_MODE11                       11
#define   TWMO_MODE12                       12
#define   TWMO_MODE13                       13
#define   TWMO_MODE14                       14
#define   TWMO_MODE15                       15
#define   TWMO_MODE16                       16
#define   TWMO_MODE17                       17
#define   TWMO_MODE18                       18


// CAP_MULTIFEEDCOUNT
// Family:      Phoenix, Pony, Mustang2
// Type:        TWTY_INT32
// Container:   OneValue
// Allowed:     0 - 32767
// Default:     0
// Notes:       Count of multifeeds per scan session
#define CAP_MULTIFEEDCOUNT					0x8086


// CAP_MULTIFEEDSOUND
// Family:      Alf, Alien, Pony, Mustang2
// Type:        TWTY_STR255
// Container:   OneValue
// Allowed:     Text
// Default:     "C:\Window\media\ding.wav"
// Notes:       Sound when detect document multifeeds.
#define CAP_MULTIFEEDSOUND                  0x802D


// CAP_MULTIFEEDTHICKNESSDETECTION
// Family:      Viper (not 3500)
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Controls the whether thickness is used to detect
//              document multifeeds.
#define CAP_MULTIFEEDTHICKNESSDETECTION     0x8057


// CAP_NOWAIT
// Family:      Gemini, Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       Legacy behavior for this Source is to wait inside
//              of the MSG_ENDXFER command until the next image
//              is scanned or until the session is terminated, so
//              that it can properly set the value of the
//              TW_PENDINGXFERS.Count field.  This has the unhappy
//              side-effect of hanging the application.
//
//              This capability allows the application to issue a
//              non-blocking call to MSG_ENDXFER.  The application
//              must NOT move on to the next image until it receives
//              a TWRC_SUCCESS from the command.  A custom return
//              code of TWRC_BUSY will indicate that the Source
//              is still waiting on the device.  The application can
//              end the session by issuing a MSG_STOPFEEDER command.
//
//              Note that if CAP_AUTOSCAN is off then this situation
//              can happen for any image related command that is
//              issued:  DAT_IMAGEINFO, DAT_IMAGELAYOUT,
//              DAT_IMAGEFILEXFER, DAT_IMAGEMEMXFER, DAT_IMAGEFILEXFER...
#define CAP_NOWAIT                          0x8032
#define   TWRC_BUSY                         0x8001


// ICAP_OVERSCANX
// Family:      Viper, Prism, Phoenix, Alf, Alien
// Type:        TWTY_FIX32
// Container:   Range (per camera)
// Allowed:     3500: 0-0.5"  All others: 0-0.375"
// Default:     3500: 0.5"    All others: 0.375"
// Notes:       Amount of overscan (in ICAP_UNITS) on the left and
//              right sides of the cropping region.
#define ICAP_OVERSCANX                      0x8006


// ICAP_OVERSCANY
// Family:      Viper, Prism, Phoenix, Alf, Alien
// Type:        TWTY_FIX32
// Container:   Range (per camera)
// Allowed:     3500: 0-0.5"  All others: 0-0.375"
// Default:     3500: 0.5"    All others: 0.375"
// Notes:       Amount of overscan (in ICAP_UNITS) on the top and
//              bottom sides of the cropping region.
#define ICAP_OVERSCANY                      0x8007


// CAP_PAGECOUNT
// Family:      Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_FIX32
// Container:   Range
// Allowed:     0 - 32767
// Default:     0
// Notes:       Count of pages to transfer.  This capability only
//              takes effect if CAP_XFERCOUNT is -1.  A value of 0
//              disables this capability.
#define CAP_PAGECOUNT                       0x8031


// CAP_PAGESIZELIMIT
// Family:      Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_FIX32
// Container:   Range
// Allowed:     0 - ICAP_PHYSICALHEIGHT
// Default:     0
// Notes:       Maximum allowed physical page height (in ICAP_UNITS).
//              This is a double document detection feature.
#define CAP_PAGESIZELIMIT                   0x8002


// CAP_PAPERSOURCE
// Family:      Alf, Alien, Phoenix, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     Alien - TWPU_ADF.  If platen installed TWPU_AUTO and TWPU_PLATEN also allowed.
//				Alf, Pony - TWPU_ADF.
//				Mustang2 - TWPU_ADF, TWPU_AUTO, TWPU_PLATEN
//				Phoenix - TWPU_ADF, TWPU_ELEVATOR100, TWPU_ELEVATOR250, TWPU_ELEVATOR500
// Default:     Alf, Alien, Pony - TWPU_ADF
//				Phoenix - TWPU_ELEVATOR500
//				Mustang2 - TWPU_AUTO
// Notes:       Selects source of paper (ADF or Platen).  TWPU_AUTO
//              selects ADF but changes to Platen if the ADF has no
//              paper in it at the start of the scanning session.
#define CAP_PAPERSOURCE                     0x802C
#define    TWPU_AUTO                        0
#define    TWPU_ADF                         1
#define    TWPU_PLATEN                      2
#define    TWPU_ELEVATOR500                 3
#define    TWPU_ELEVATOR250                 4
#define    TWPU_ELEVATOR100                 5


// CAP_PATCHCOUNT
// Family:      Phoenix
// Type:        TWTY_INT32
// Container:   OneValue
// Allowed:     0 - 32767
// Default:     0
// Notes:       Count of patches per scan session
#define CAP_PATCHCOUNT						0x8087


// CAP_PCARDENABLED
// Family:      n/a
// Type:        TWTY_BOOL
// Container:   OneValue (per camera)
// Allowed:     TRUE / FALSE
// Default:     TRUE
// Notes:       Enables/disables the P-Card (note that this operates
//              in tandem with the DAT_PCARD operation, setting this
//              value here or there will modify both values).
//				This capability is not available at this time.
#define CAP_PCARDENABLED                    0x806A


// CAP_PRINTERDATEDELIMITER
// Family:      Viper (3520/4500), Prism, Alien, Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     Prism - TWPD_FORWARDSLASH
//				Others - TWPD_NONE
// Notes:       Selects the delimiter to be used in the date
//              (not the time, though, time always uses a
//              delimiter of colon ':').
#define CAP_PRINTERDATEDELIMITER            0x801C
#define   TWPD_NONE                         0
#define   TWPD_FORWARDSLASH                 1
#define   TWPD_HYPHEN                       2
#define   TWPD_PERIOD                       3
#define   TWPD_BLANK                        4


// CAP_PRINTERDATEFORMAT
// Family:      Prism
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     TWPE_MMDDYYYY
// Notes:       Selects the format to be used to display
//              the date (not the time, though).
#define CAP_PRINTERDATEFORMAT               0x8033
#define   TWPE_MMDDYYYY                     0
#define   TWPE_DDMMYYYY                     1
#define   TWPE_YYYYMMDD                     2


// CAP_PRINTERFONT
// Family:      Gemini, Viper (3520/4500), Prism, Alien, Phoenix
// Type:        TWTY_UINT16
// Allowed:     Gemini-  TWPN_LARGECOMIC,    TWPN_LARGECINE,  TWPN_LARGECOMIC180,
//                       TWPN_LARGECINE180,  TWPN_SMALLCOMIC, TWPN_SMALLCINE,
//                       TWPN_SMALLCOMIC180, TWPN_SMALLCINE180
//              Viper-   TWPN_LARGECOMIC,    TWPN_LARGECINE,  TWPN_SMALLCOMIC,
//                       TWPN_SMALLCINE
//              Prism-   TWPN_LARGECOMIC,    TWPN_LARGECINE,  TWPN_SMALLCOMIC,
//                       TWPN_SMALLCINE
//              Alien-   TWPN_LARGECOMIC,    TWPN_LARGECINE,  TWPN_SMALLCOMIC,
//                       TWPN_SMALLCINE
//              Phoenix- TWPN_LARGECOMIC,    TWPN_LARGECINE,  TWPN_LARGECOMIC180,
//                       TWPN_LARGECINE180,  TWPN_SMALLCOMIC, TWPN_SMALLCINE,
//                       TWPN_SMALLCOMIC180, TWPN_SMALLCINE180
// Default:     Gemini-  TWPN_LARGECOMIC
//              Viper-   TWPN_LARGECOMIC
//              Prism-   TWPN_SMALLCOMIC
//              Alien-   TWPN_LARGECOMIC
//              Phoenix- TWPN_LARGECOMIC
// Notes:       elects the printer font to be used.
#define CAP_PRINTERFONT                     0x8044
#define   TWPN_LARGECOMIC                   0
#define   TWPN_LARGECINE                    1
#define   TWPN_LARGECOMIC180                2
#define   TWPN_LARGECINE180                 3
#define   TWPN_SMALLCOMIC                   4
#define   TWPN_SMALLCINE                    5
#define   TWPN_SMALLCOMIC180                6
#define   TWPN_SMALLCINE180                 7
#define   TWPN_BOLDLARGECOMIC               8
#define   TWPN_BOLDLARGECINE                9
#define   TWPN_BOLDLARGECOMIC180            10
#define   TWPN_BOLDLARGECINE180             11
#define   TWPN_BOLDSMALLCOMIC               12
#define   TWPN_BOLDSMALLCINE                13
#define   TWPN_BOLDSMALLCOMIC180            14
#define   TWPN_BOLDSMALLCINE180             15


// CAP_PRINTERIMAGEADDRESSFORMAT
// Family:      Gemini, Prism
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     Gemini-TWPI_DISPLAYLEADINGZEROS
//              Prism-TWPI_SUPPRESSLEADINGZEROS
// Notes:       Selects the print format of leading zeros
//              in the image address.
#define CAP_PRINTERIMAGEADDRESSFORMAT       0x8045
#define   TWPI_DISPLAYLEADINGZEROS          0
#define   TWPI_SUPPRESSLEADINGZEROS         1
#define   TWPI_COMPRESSLEADINGZEROS         2


// CAP_PRINTERIMAGEADDRESSLEVEL
// Family:      Gemini, Prism
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     Gemini-TWPL_LEVEL0, TWPL_LEVEL1, TWPL_LEVEL2,
//                     TWPL_LEVEL3, TWPL_ALLLEVELS
//              Prism- TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3,
//                     TWPL_ALLLEVELS
// Default:     TWPL_ALLLEVELS
// Notes:       Selects the image address level that printing
//              will occur on.  A value of TWPL_ALLLEVELS
//              overrides any of the others.
#define CAP_PRINTERIMAGEADDRESSLEVEL        0x8047
#define   TWPL_LEVEL0                       0
#define   TWPL_LEVEL1                       1
#define   TWPL_LEVEL2                       2
#define   TWPL_LEVEL3                       3
#define   TWPL_ALLLEVELS                    4
#define   TWPL_NONE                         5


// CAP_PRINTERINDEXDIGITS
// Family:      Viper (3520/4500), Prism, Phoenix, Alien
// Type:        TWTY_UINT16
// Container:   Range
// Allowed:     1 - 9
// Default:     9
// Notes:       Sets the number of digits of the counter to be
//              printed.  Note that the data will be truncated
//              if the number of digits in the count exceeds
//              this value.
#define CAP_PRINTERINDEXDIGITS              0x801B


// CAP_PRINTERINDEXFORMAT
// Family:      Viper (3520/4500), Prism, Alien, Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see CAP_PRINTERIMAGEADDRESSFORMAT)
// Default:     Viper-TWPI_DISPLAYLEADINGZEROS
//              Prism-TWPI_SUPPRESSLEADINGZEROS
//              Alien-TWPI_DISPLAYLEADINGZEROS
//				Phoenix-TWPI_DISPLAYLEADINGZEROS
// Notes:       Selects the use of leading zeros or spaces when
//              printing the counter value.
#define CAP_PRINTERINDEXFORMAT              0x801A


// CAP_PRINTERPOSITION
// Family       Gemini, Viper (3520/4500), Prism, Alien, Phoenix
// Type:        TWTY_FIX32
// Container:   Range
// Allowed:     0.125" - 30",  0.35" - 26", 0.5" - 30", 0.35" - 25.5”
// Default:     0.125", 0.35", 0.5", 0.35"
// Notes:       Selects the printer position (y-offset, in ICAP_UNITS)
//              to be used as the starting position for printing.
#define CAP_PRINTERPOSITION                 0x8046


// CAP_PRINTERWRITESEQUENCE
// Family:      Gemini (5000/7000), Prism, Alien, Phoenix
// Type:        TWTY_UINT16
// Allowed:     All the stuff below (sheesh)...
// Notes:       Selects the write sequence.
#define CAP_PRINTERWRITESEQUENCE            0x8049
#define   TWPW_NONE                         0
#define   TWPW_FULLIAALLDELIMITERS          1
#define   TWPW_FULLIANODELIMITERS           2
#define   TWPW_FULLIAFIXEDDELIMITERS        3
#define   TWPW_DELIMITER                    4
#define   TWPW_FIXEDIA                      5
#define   TWPW_INDEXIA                      6
#define   TWPW_CURRENTLEVELIA               7
#define   TWPW_DATE                         8
#define   TWPW_DAY                          9
#define   TWPW_TIME                         10
#define   TWPW_DOCUMENTCOUNT                11
#define   TWPW_MESSAGE1                     12
#define   TWPW_MESSAGE2                     13
#define   TWPW_MESSAGE3                     14
#define   TWPW_MESSAGE4                     15
#define   TWPW_MESSAGE5                     16
#define   TWPW_MESSAGE6                     17
#define   TWPW_MESSAGE7                     18
#define   TWPW_MESSAGE8                     19
#define   TWPW_MESSAGE9                     20
#define   TWPW_SPACE                        21
#define   TWPW_TEXT                         22
#define   TWPW_INDEX                        23
#define   TWPW_MMDDYYYY                     24
#define   TWPW_DDMMYYYY                     25
#define   TWPW_YYYYMMDD                     26
#define   TWPW_IMAGEADDRESS_A               27
#define   TWPW_IMAGEADDRESS_B               28
#define   TWPW_IMAGEADDRESS_C               29
#define   TWPW_IMAGEADDRESS_D               30


// CAP_PRINTERWRITESEQUENCEINDEX
// Family:      Gemini (5000/7000)
// Type:        TWTY_UINT16
// Allowed:     1 - 7
// Notes:       Selects the write sequence index.
#define CAP_PRINTERWRITESEQUENCEINDEX       0x8048


// CAP_PRINTERWRITESEQUENCEMESSAGE1 - 12
// Family:      Gemini, Viper (3520/4500), Prism, Phoenix
// Type:        TWTY_STR255
// Container:   OneValue
// Allowed:     Gemini-
//              Viper- 
//              Prism- 
//              Phoenix-
// Default:     Gemini-#1
//              Viper- ABC
//              Prism- (empty string)
//              Phoenix- ABC
// Notes:       5000/7000 only...selects the write sequence
//              messages (1 - 9).  Prism only...selects the
//				write sequence messages 1-6 if the levels
//				are independent and 7-12 for 'all' levels.
#define CAP_PRINTERWRITESEQUENCEMESSAGE1    0x800C
#define CAP_PRINTERWRITESEQUENCEMESSAGE2    0x800D
#define CAP_PRINTERWRITESEQUENCEMESSAGE3    0x800E
#define CAP_PRINTERWRITESEQUENCEMESSAGE4    0x800F
#define CAP_PRINTERWRITESEQUENCEMESSAGE5    0x8010
#define CAP_PRINTERWRITESEQUENCEMESSAGE6    0x8011
#define CAP_PRINTERWRITESEQUENCEMESSAGE7    0x8012
#define CAP_PRINTERWRITESEQUENCEMESSAGE8    0x8013
#define CAP_PRINTERWRITESEQUENCEMESSAGE9    0x8014
#define CAP_PRINTERWRITESEQUENCEMESSAGE10   0x8034
#define CAP_PRINTERWRITESEQUENCEMESSAGE11   0x8035
#define CAP_PRINTERWRITESEQUENCEMESSAGE12   0x8036


// CAP_PRINTERWRITESEQUENCEMESSAGEINDEX
// Family:      Alien, Phoenix
// Type:        TWTY_UINT16
// Container:   OneValue
// Allowed:     Phoenix	1 - 6
//				Alien	1
// Default:     1
// Notes:       Selects the write sequence messages.
#define CAP_PRINTERWRITESEQUENCEMESSAGEINDEX  0x808A


// CAP_PRINTERWRITESEQUENCESPACE
// Type:        TWTY_UINT16
// Allowed:     Number of blanks...
// Notes:       5000/7000 only.  Blank count for the write sequence.
#define CAP_PRINTERWRITESEQUENCESPACE       0x800A


// CAP_PRINTERWRITESEQUENCESPACESTRING
// Type:        TWTY_STR255
// Allowed:     The WriteSequenceSpace string...
// Notes:       5000/7000 only.  Selects the write sequence
//              count of spaces.
#define CAP_PRINTERWRITESEQUENCESPACESTRING 0x800B


// CAP_PRINTERWRITESEQUENCESTRING
// Family:      Gemini (5000/7000), Prism, Alien, Phoenix
// Type:        TWTY_STR255
// Allowed:     The WriteSequence string...
// Notes:       5000/7000 only.  Selects the write sequence.
#define CAP_PRINTERWRITESEQUENCESTRING      0x8009


// CAP_SUPPORTEDSIZES
// Family:      Gemini, Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     TWSS_A4
// Notes:       This list adds custom values to this standard TWAIN
//              capability.  The TWSS_USER* values may be set up by
//              an end-user through the CONST.INI and appropriate
//              language file(s) to add custom sizes to the existing
//              list.  See the CONST.INI file under the section
//              [SupportedSizes] for more info on how to do this.
#define TWSS_6X5                            0x8001
#define TWSS_12X12                          0x8002
#define TWSS_USER0                          0x8100
#define TWSS_USER1                          0x8101
#define TWSS_USER2                          0x8102
#define TWSS_USER3                          0x8103
#define TWSS_USER4                          0x8104
#define TWSS_USER5                          0x8105
#define TWSS_USER6                          0x8106
#define TWSS_USER7                          0x8107
#define TWSS_USER8                          0x8108
#define TWSS_USER9                          0x8109


// CAP_TOGGLEPATCH
// Family:      Alien (i280), Prism, Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     (see list below)
// Default:     TWTP_DISABLED
// Notes:       Controls recognition of the color patch.
#define CAP_TOGGLEPATCH                     0x806D
#define   TWTP_DISABLED                     0
#define   TWTP_BOTHSIDE                     1
#define   TWTP_FRONTSIDE                    2
#define   TWTP_SAMESIDE                     4
#define	  TWTP_DETECTONLY                   7


// CAP_TRANSPORTAUTOSTART
// Family:      Prism, Phoenix
// Type:        TWTY_BOOL
// Container:   OneValue
// Allowed:     TRUE / FALSE
// Default:     FALSE
// Notes:       A value of TRUE will cause the scanner transport to
//              start up when the MSG_ENABLEDS command is issued.
#define CAP_TRANSPORTAUTOSTART              0x8029


// CAP_TRANSPORTTIMEOUT
// Family:      Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_INT32
// Container:   Range
// Allowed:     Viper: 3-30   Prism: 0,5-300    Alf/Alien: 3-30     Phoenix: 0,1-300    Pony/Mustang2: 1-30
// Default:     Viper: 8      Prism: 10         Alf/Alien: 8        Phoenix: 15         Pony/Mustang2: 1
// Notes:       Number of seconds before transport times out.
#define CAP_TRANSPORTTIMEOUT                0x8003


// CAP_TRANSPORTTIMEOUTRESPONSE
// Family:      Prism, Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     See below..
// Default:     TWTR_STOPFEEDER
// Notes:       Selects action taken when the transport times out.
//              If the transport timeout is disabled, then this
//              capability is ignored.
#define CAP_TRANSPORTTIMEOUTRESPONSE        0x8028
#define    TWTR_STOPFEEDER                  0
#define    TWTR_ENDOFJOB                    1


// CAP_ULTRASONICSENSITIVITY
// Family:      Prism, Alf, Alien, Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     See below...
// Default:     TWUS_DISABLED
// Notes:       Controls the sensitivity of the ultrasonic multifeed
//              detector.
#define CAP_ULTRASONICSENSITIVITY           0x8027
#define    TWUS_DISABLED                    0
#define    TWUS_LOW                         1
#define    TWUS_MEDIUM                      2
#define    TWUS_HIGH                        3


// CAP_ULTRASONICSENSOR*
// Family:      Phoenix
// Type:        TWTY_UINT16
// Container:   Enumeration
// Allowed:     See below...
// Default:     TWUO_ENABLED
// Notes:       Controls the individual ultrasonic sensor
//              detector.
#define CAP_ULTRASONICSENSORCENTER          0x808F
#define CAP_ULTRASONICSENSORLEFT            0x8090
#define CAP_ULTRASONICSENSORRIGHT           0x8091
#define    TWUO_DISABLED                    0
#define    TWUO_ENABLED                     1


// ICAP_VERTICALBLACKLINEREMOVAL
// Family:      Prism (not implemented, ignore this for now)
// Type:        TWTY_BOOL
// Container:   OneValue (per camera)
// Allowed:     TRUE/FALSE
// Default:     TRUE
// Notes:       Controls vertical black line removal (VBLR).
//              Only supported for bitonal with ATP...
#define ICAP_VERTICALBLACKLINEREMOVAL       0x8021


// CAP_WINDOWPOSITION
// Family:      Gemini, Viper, Prism, Phoenix, Alf, Alien, Pony, Mustang2
// Type:        TWTY_FRAME
// Container:   OneValue
// Allowed:     Anything
// Default:     0,0 (top left of screen)
// Notes:       Left and Top position of dialog (Width and Height are
//              ignored).  Use this to select the location of the
//              Source's GUI when it is displayed to the user.
#define CAP_WINDOWPOSITION                  0x8004


//
//  Gemini/Viper RAW Status (DG_CONTROL)...
//  Notes:  This command may be issued at any time. It reports
//          the raw data for the last error status reported by
//          the scanner.  These are device dependent values
//          which may be reported for servicing issues, but
//          should not be used to drive code...
//
#define DAT_STATUSRAW                       0x8001
typedef struct
{
    TW_INT32  LastToolkitStatus;
    TW_INT32  LastSenseData[3];
    TW_STR255 LastText;
    TW_INT32  CurrentState;
    TW_INT32  LastKDSStatus;
} TW_STATUSRAW, *pTW_STATUSRAW;


//
//  Alien Personality Card (DG_CONTROL)...
//  Notes:  These represent the common commands that pcards
//          may support.  Other commands documented by the
//          manufacturer of the card may be accessed using
//          the DAT_PASSTHRU operation...
#define DAT_PCARD                           0x8002
typedef struct
{
    TW_UINT32    StructSize;
    TW_UINT32    Action;
    TW_UINT32    DataSize;
    TW_MEMREF    Data;
} TW_PCARD, *pTW_PCARD;

// Additional return codes...
#define TWRC_PCARD_CHECKSTATUS              0x8002  // something interesting has happened
#define TWRC_PCARD_FATAL                    0x8003  // the card is dead
#define TWRC_PCARD_RETRYIMAGE               0x8004  // the image failed a quality test
#define TWRC_PCARD_NOCARD                   0x8005  // no card installed

// Supported actions...
#define TWPCD_ACTION_INQUIRY                0
#define TWPCD_ACTION_STATUS                 1
#define TWPCD_ACTION_ATTRIBUTES             2
#define TWPCD_ACTION_DIAGNOSTIC             3

// Support structures for the various actions...
typedef struct
{
    TW_INT8      StructSize[4];             // 0-3
	TW_INT8      VendorId[8];               // 4-11
	TW_INT8	     ProductId[16];             // 12-27
    TW_INT8      RevisionNumber[4];         // 28-31
	TW_INT8	     BuildNumber[2];            // 32-33
	TW_INT8      Reserved[2048-34];         // 34-2048
} TW_PCARD_INQUIRY, FAR * pTW_PCARD_INQUIRY;

typedef struct
{
    TW_INT8      StructSize[4];             // 0-3
	TW_INT8      Code[4];                   // 4-7
	TW_INT8      Severity;                  // 8
	TW_INT8      Text[1011];                // 9-1019
	TW_INT8      Reserved[2048-1020];       // 1020-2048
} TW_PCARD_STATUS, *pTW_PCARD_STATUS;

typedef struct
{
    TW_INT8      StructSize[4];             // 0-3
} TW_PCARD_ATTRIBUTES, *pTW_PCARD_ATTRIBUTES;

typedef struct
{
    TW_INT8      StructSize[4];             // 0-3
} TW_PCARD_HEADER, *pTW_PCARD_HEADER;


//
//  Color Table Map (DG_CONTROL)...
//  Notes:  This data structure allows an application to
//          map the ICAP_COLORTABLE numeric values to
//          both the English and current language strings.
//          The call allocates the data structure.  The
//          application parses the items (a value of
//          0xFFFF for ColorTableValue indicates the end
//          of the array).
#define DAT_COLORTABLEMAP                   0x8003
typedef struct
{
	TW_UINT16    ColorTableValue;
	TW_STR255    szEnglish;
	TW_STR255    szCurrent;
} TW_COLORTABLEMAP, *pTW_COLORTABLEMAP;


//
//  Device Information
//  Notes:  This data structure provides additional
//          information about the device that may be
//          useful with some system message, such
//          as WM_DEVICECHANGE.  The dwFields value
//          indicates how many fields are supported
//          by the driver (the value doesn't include
//          the dwFields, itself)...
//
//          dwModelNumber  - ex: 200, 990, 3520...
//          szModelName    - ex: i200, 990...
//          szProtocol     - ex: ASPI, SCSISCAN...
//          dwFirmware     - ex: 10427 (1.4.27)
//
//          Only if szProtocol is SCSISCAN
//          szDeviceName   - \\.\Scanner# style
//          szDeviceChange - \\?\SBP2... style
//
//          Only if szProtocol is ASPI
//          dwHostAdapter
//          dwTarget
//
#define DAT_DEVICEINFO                      0x8005
#define TWCNST_DEVICEINFOFIELDS             8
typedef struct
{
    TW_UINT32    dwFields;
    TW_UINT32    dwModelNumber;             // field 1
    TW_STR255    szModelName;               // field 2
    TW_STR255    szProtocol;                // field 3
    TW_STR255    szDeviceName;              // field 4
    TW_UINT32    dwHostAdapter;             // field 5
    TW_UINT32    dwTarget;                  // field 6
    // put new fields here...
    TW_STR255    szDeviceChange;            // field 7  + 256 =  256
    TW_UINT32    dwFirmware;                // field 8  +  32 =  288
    // always reduce this if we add fields...
    TW_UINT8     reserved[65536-288];
} TW_DEVICEINFO, *pTW_DEVICEINFO;


//
//  Phoenix auto color learning (DG_CONTROL)...
//  Notes:  This utility will determine the proper ‘Color Amount’ value
//          to use with the current ‘Color Threshold’ value, in order to
//          save a representative stack of color documents as either color
//          or grayscale images...
#define DAT_AUTOCOLORLEARN                  0x8006

//
//  Gemini/Viper/Prism/Phoenix Custom TWEI_ fields for DAT_EXTIMAGEINFO...
//  Notes:  These fields return custom image information
//          taken from the image header (or footer)...
//
#define TWEI_HDR_PAGESIDE                   0x8001  // 0-front 1-rear
#define TWEI_HDR_DOCUMENTCOUNT              0x8002  // Count of pages (seeded by user)
#define TWEI_HDR_LENGTH                     0x8003  // Number of bytes of image data
#define TWEI_HDR_LEVEL                      0x8004  // Image Address Level
#define TWEI_HDR_MODE                       0x8005  // Gemini Mode (1-18)
#define TWEI_HDR_LINELENGTH                 0x8006  // Width
#define TWEI_HDR_PAGELENGTH                 0x8007  // Height
#define TWEI_HDR_COMPRESSION                0x8008  // ICAP_COMPRESSION TWCP_* value
#define TWEI_HDR_DATE                       0x8009  // YY/MM/DD
#define TWEI_HDR_TIME                       0x800A  // HH/MM/00
#define TWEI_HDR_ROLL                       0x800B  // Imagelink 990 Film Roll Number
#define TWEI_HDR_RESOLUTION                 0x800C  // Dots Per Inch (DPI)
#define TWEI_HDR_BITORDER                   0x800D  // Bit order in a byte
#define TWEI_HDR_SKEW                       0x800E  // (obsolete)
#define TWEI_HDR_MOMENTARYFLAG              0x800F  // Gemini Momentary
#define TWEI_HDR_LATCHEDFLAG                0x8010  // Gemini Latched
#define TWEI_HDR_BARCODE                    0x8011  // Gemini Barcode(s)
#define TWEI_HDR_DESKEW                     0x8012  // Deskew status
#define TWEI_HDR_DESKEWANGLE                0x8013  // Deskew angle
#define TWEI_HDR_POLARITY                   0x8014  // ICAP_PIXELFLAVOR TWPF_* value
#define TWEI_HDR_PRINTERSTRING              0x8015  // Viper/Prism printed string
#define TWEI_HDR_PRINTERINDEX               0x8016  // Kinda like the document count
#define TWEI_HDR_IMAGENUMBER                0x8017  // Count images this session
#define TWEI_HDR_PAGENUMBER                 0x8018  // Count sheets of paper this session
#define TWEI_HDR_PAGEIMAGENUMBER            0x8019  // Image count on a page (1 - 4)
#define TWEI_HDR_BOOKNAME_A                 0x801A  // Fixed field Gemini and Prism A
#define TWEI_HDR_BOOKNAME_B                 0x801B  // Fixed field Prism B
#define TWEI_HDR_BOOKNAME_C                 0x801C  // Fixed field Prism C
#define TWEI_HDR_BOOKNAME_D                 0x801D  // Fixed field Prism D
#define TWEI_HDR_IMAGEADDRESSSTRING         0x801E  // Prism image address string
#define TWEI_HDR_XOFFSET                    0x801F  // Left cropping offset
#define TWEI_HDR_YOFFSET                    0x8020  // Right cropping offset
#define TWEI_HDR_FEATUREPATCH               0x8021  // Feature patch (only image with patch: i200/i600)
#define TWEI_HDR_IMAGEADDRESSDEFS           0x8022  // Image Address field definitions
#define TWEI_HDR_PCARD_HEADER               0x8023  // Personality-Card Header
#define TWEI_HDR_PCARD_FOOTER               0x8024  // Personality-Card Footer
#define TWEI_HDR_TOKEN_COUNT                0x8025  // Alien token flag
#define TWEI_HDR_REGENERATION               0x8026  // Alien retry count
#define TWEI_HDR_IMAGESTATUS                0x8027  // Alien image status
#define TWEI_HDR_DITHER                     0x8028  // Bitonal dithering algorithm used
#define	TWEI_HDR_PATCHDETECTED				0x8029	// Patch was found on the document
#define TWEI_HDR_FOLDEDCORNERPERCENTAGE     0x802A  // Phoenix folded corner percentage
#define TWEI_HDR_DESKEWCONFIDENCEFACTOR     0x802B  // Phoenix deskew confidence factor
#define TWEI_HDR_BITONALCONTRASTPERCENTAGE  0x802C  // Phoenix bitonal contrast percentage
#define TWEI_HDR_BITONALCONTRAST            0x802D  // Phoenix bitonal contrast
#define TWEI_HDR_BITONALTHRESHOLD           0x802E  // Phoenix bitonal threshold
#define TWEI_HDR_SUMHISTOGRAM               0x802F  // Phoenix sum historgram
#define TWEI_HDR_DIFFERENCEHISTOGRAM        0x8030  // Phoenix difference histogram
#define TWEI_HDR_GAMMATABLE                 0x8031  // Phoenix gamma table
#define TWEI_HDR_MULTIFEED                  0x8032  // Multifeed detected
#define TWEI_HDR_DESKEWANGLEACTUAL			0x8033  // Signed deskew angle to scanner precision
#define	TWEI_HDR_RAWIMAGEHEADER             0x8034  // Raw image header from scanner
#define	TWEI_HDR_LONGPAPERSEGMENT           0x8035  // Long paper segment number
#define	TWEI_HDR_LONGPAPERLASTSEGMENT       0x8036  // Long pager last segment
#define TWEI_HDR_AUTOCOLORDETECTED          0x8037  // Auto color detected
#define TWEI_HDR_AUTOCOLORAMOUNT            0x8038  // Auto color amount
#define TWEI_HDR_AUTOCOLORTHRESHOLD         0x8039  // Auto color threshold


//
//  All Stop Feeder...
//  Notes:  This message is added to DG_CONTROL / DAT_PENDINGXFERS
//          to allow the user to turn off the transport.
//          Do not use this message, use MSG_STOPFEEDER...
//
#define OBS_STOPFEEDER                      0x8001


//
//  All Setup DS...
//  Notes:  This message is added to DG_CONTROL / DAT_USERINTERFACE
//          to allow the user download the current settings without
//          initiating a scanning session.  The state remains at 4,
//          no matter what the outcome of the command.
//
#define MSG_SETUPDS                         0x8002


//
//  All Disable/Enable UI...
//  Notes:  This message is added to DG_CONTROL / DAT_USERINTERFACE
//          to allow the application to temporarily disable access
//          to the Source's GUI.
//
#define MSG_DISABLEUI                       0x8003
#define MSG_ENABLEUI                        0x8004


//
//  All Special Get...
//  Notes:  Used to get data out of sequence with the specification.
//          The only example at this time is use with DG_IMAGE / 
//          DAT_EXTIMAGEINFO...
//
#define MSG_GETSPECIAL                      0x8005


//
//  All Enable Scanner...
//  Notes:  This message is added to DG_CONTROL / DAT_USERINTERFACE
//          to allow the user to enable the scanner.  The main use
//          for this command is to allow a filter writer to split
//          a MSG_ENABLEDS into a MSG_SETUPDS followed by a
//          MSG_ENABLESCANNER, allowing the filter to interrogate
//          the scanner about its current setting before moving paper.
//          This command is only permitted in State 4, and if ShowUI
//          is set to FALSE...
//
#define MSG_ENABLESCANNER                   0x8006


//
//  All Enable Info...
//  Notes:  This message is added to DG_CONTROL / DAT_USERINTERFACE
//          to allow the user to bring up just the Info tab.
//
#define MSG_ENABLEINFO                      0x8007


//
//  Prism Patchcode extensions...
//  Notes:  This section extends the patch codes to match those
//          supported by the Prism scanner family.  Note that
//          a transfer patch is interpreted to be a level 2 or
//          a level three, so even though it can be set, a
//          transfer patch is never received as part of the
//          extended image info data...
//
#define TWPCH_PATCHT2                       0x8001
#define TWPCH_PATCHT3                       0x8002
#define TWEJ_PATCHT2                        0x8001
#define TWEJ_PATCHT3                        0x8002


//
//  QuerySupport extensions...
//
#define TWQC_MACHINE                        0x1000
#define TWQC_BITONAL                        0x2000
#define TWQC_COLOR                          0x4000



// Filter...
#define TWRC_FILTER_CONTINUE                0x8010


/*
** List of custom capabilities in numeric order...
**
CAP_FEEDERKEEPALIVE                     0x8001
CAP_PAGESIZELIMIT                       0x8002
CAP_TRANSPORTTIMEOUT                    0x8003
CAP_WINDOWPOSITION                      0x8004
ICAP_LAMPSAVER                          0x8005
ICAP_OVERSCANX                          0x8006
ICAP_OVERSCANY                          0x8007
ICAP_FORCECOMPRESSION                   0x8008
CAP_PRINTERWRITESEQUENCESTRING          0x8009
CAP_PRINTERWRITESEQUENCESPACE           0x800A
CAP_PRINTERWRITESEQUENCESPACESTRING     0x800B
CAP_PRINTERWRITESEQUENCEMESSAGE1        0x800C
CAP_PRINTERWRITESEQUENCEMESSAGE2        0x800D
CAP_PRINTERWRITESEQUENCEMESSAGE3        0x800E
CAP_PRINTERWRITESEQUENCEMESSAGE4        0x800F
CAP_PRINTERWRITESEQUENCEMESSAGE5        0x8010
CAP_PRINTERWRITESEQUENCEMESSAGE6        0x8011
CAP_PRINTERWRITESEQUENCEMESSAGE7        0x8012
CAP_PRINTERWRITESEQUENCEMESSAGE8        0x8013
CAP_PRINTERWRITESEQUENCEMESSAGE9        0x8014
CAP_IMAGEADDRESS                        0x8015
CAP_IMAGEADDRESSENABLED                 0x8016
CAP_DOCUMENTCOUNT                       0x8017
CAP_DOCUMENTCOUNTENABLED                0x8018
CAP_MODE                                0x8019
CAP_PRINTERINDEXFORMAT                  0x801A
CAP_PRINTERINDEXDIGITS                  0x801B
CAP_PRINTERDATEDELIMITER                0x801C
CAP_CAMERAENABLE                        0x801D
CAP_CAMERAORDER                         0x801E
ICAP_HALFTONESQUALITY                   0x801F
ICAP_COLORTABLE                         0x8020
ICAP_VERTICALBLACKLINEREMOVAL           0x8021
ICAP_CROPPINGMODE                       0x8022
ICAP_ADDBORDER                          0x8023
ICAP_FILTERENUM                         0x8024
ICAP_FILTERTHRESHOLD                    0x8025
ICAP_FILTERBACKGROUND                   0x8026
CAP_ULTRASONICSENSITIVITY               0x8027
CAP_TRANSPORTTIMEOUTRESPONSE            0x8028
CAP_TRANSPORTAUTOSTART                  0x8029
ICAP_LAMPTIMEOUT                        0x802A
CAP_BATCHCOUNT                          0x802B
CAP_PAPERSOURCE                         0x802C
CAP_MULTIFEEDSOUND                      0x802D
ICAP_GRAYSCALE                          0x802E
CAP_ENERGYSTAR                          0x802F
CAP_BINARIZATION                        0x8030
CAP_PAGECOUNT                           0x8031
CAP_NOWAIT                              0x8032
CAP_PRINTERDATEFORMAT                   0x8033
CAP_PRINTERWRITESEQUENCEMESSAGE10       0x8034
CAP_PRINTERWRITESEQUENCEMESSAGE11       0x8035
CAP_PRINTERWRITESEQUENCEMESSAGE12       0x8036
CAP_FUNCTIONKEY1                        0x8037
CAP_FUNCTIONKEY2                        0x8038
CAP_FUNCTIONKEY3                        0x8039
CAP_FUNCTIONKEY4                        0x803A
CAP_LEVELTOFOLLOW1                      0x803B
CAP_LEVELTOFOLLOW2                      0x803C
CAP_LEVELTOFOLLOW3                      0x803D
CAP_IMAGEADDRESSTEMPLATES               0x803E
CAP_BATCHSTARTFUNCTION                  0x803F
OBS_JPEGQUALITY                         0x8040
ICAP_COLORSHARPENING                    0x8041
ICAP_FRAMELENGTHCONTROL                 0x8042
ICAP_FLIPBACKGROUNDCOLOR                0x8043
CAP_PRINTERFONT                         0x8044
CAP_PRINTERIMAGEADDRESSFORMAT           0x8045
CAP_PRINTERPOSITION                     0x8046
CAP_PRINTERIMAGEADDRESSLEVEL            0x8047
CAP_PRINTERWRITESEQUENCEINDEX           0x8048
CAP_PRINTERWRITESEQUENCE                0x8049
CAP_IMAGEADDRESS_A                      0x804A
CAP_IMAGEADDRESS_B                      0x804B
CAP_IMAGEADDRESS_C                      0x804C
CAP_IMAGEADDRESS_D                      0x804D
CAP_BATCHLEVEL                          0x804E
CAP_BATCHENDFUNCTION                    0x804F
// Reserved 0x8050 - 0x8053
CAP_ENABLECOLORPATCHCODE                0x8054
CAP_FIXEDDOCUMENTSIZE                   0x8055
CAP_DOUBLEFEEDSTOP                      0x8056
CAP_MULTIFEEDTHICKNESSDETECTION         0x8057
// Reserved 0x8058 - 0x8069
CAP_PCARDENABLED                        0x806A
CAP_IMAGEMAGNIFICATIONFACTOR            0x806B
CAP_INDICATORSWARMUP                    0x806C
CAP_TOGGLEPATCH                         0x806D
CAP_DOUBLEFEEDENDJOB                    0x806E
CAP_FEEDERMODE                          0x806F
CAP_FOLDEDCORNER                        0x8070
CAP_FOLDEDCORNERSENSITIVITY             0x8071
ICAP_GAMMAENABLED                       0x8074
CAP_EASYSTACKING                        0x8075
// Reserved 0x8076 - 0x8085
CAP_MULTIFEEDCOUNT                      0x8086
CAP_PATCHCOUNT                          0x8087
ICAP_FILTERPROCESSING                   0x8088
CAP_BACKGROUND                          0x8089
CAP_PRINTERWRITESEQUENCEMESSAGEINDEX    0x808A
CAP_CHECKDIGIT                          0x808B
CAP_BACKGROUNDFRONT                     0x808C
CAP_BACKGROUNDREAR                      0x808D
CAP_BACKGROUNDPLATEN                    0x808E
CAP_ULTRASONICSENSORCENTER              0x808F
CAP_ULTRASONICSENSORLEFT                0x8090
CAP_ULTRASONICSENSORRIGHT               0x8091
ICAP_AUTOCOLORAMOUNT                    0x8092
ICAP_AUTOCOLORCONTENT                   0x8093
ICAP_AUTOCOLORTHRESHOLD                 0x8094
ICAP_IMAGEEDGEFILL						0x8095
ICAP_IMAGEEDGELEFT						0x8096
ICAP_IMAGEEDGERIGHT						0x8097
ICAP_IMAGEEDGETOP						0x8098
ICAP_IMAGEEDGEBOTTOM					0x8099
CAP_BLANKPAGE							0x809A
CAP_BLANKPAGEMODE						0x809B
CAP_BLANKPAGECOMPBW						0x809C
CAP_BLANKPAGECOMPGRAY					0x809D
CAP_BLANKPAGECOMPRGB					0x809E
*/

/*
DAT_STATUSRAW                           0x8001
DAT_PCARD                               0x8002
DAT_COLORTABLEMAP                       0x8003
DAT_DEVICEINFO                          0x8005
DAT_AUTOCOLORLEARN                      0x8006
*/

#endif // KDSCUST_H
