1*c2c66affSColin Finck /* ======================================================================== *\ 2*c2c66affSColin Finck 3*c2c66affSColin Finck Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak, 4*c2c66affSColin Finck Hewlett-Packard and Logitech Corporations. All rights reserved. 5*c2c66affSColin Finck 6*c2c66affSColin Finck Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix, 7*c2c66affSColin Finck Fujitsu, Genoa Technology, Hewlett-Packard, Kofax Imaging Products, and 8*c2c66affSColin Finck Ricoh Corporation. All rights reserved. 9*c2c66affSColin Finck 10*c2c66affSColin Finck Copyright (C) 1998 TWAIN Working Group: Adobe Systems Incorporated, 11*c2c66affSColin Finck Canon Information Systems, Eastman Kodak Company, 12*c2c66affSColin Finck Fujitsu Computer Products of America, Genoa Technology, 13*c2c66affSColin Finck Hewlett-Packard Company, Intel Corporation, Kofax Image Products, 14*c2c66affSColin Finck JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation. 15*c2c66affSColin Finck All rights reserved. 16*c2c66affSColin Finck 17*c2c66affSColin Finck TWAIN.h - This is the definitive include file for applications and 18*c2c66affSColin Finck data sources written to the TWAIN specification. 19*c2c66affSColin Finck It defines constants, data structures, messages etc. 20*c2c66affSColin Finck for the public interface to TWAIN. 21*c2c66affSColin Finck 22*c2c66affSColin Finck Revision History: 23*c2c66affSColin Finck version 1.0, March 6, 1992. TWAIN 1.0. 24*c2c66affSColin Finck version 1.1, January 1993. Tech Notes 1.1 25*c2c66affSColin Finck version 1.5, June 1993. Specification Update 1.5 26*c2c66affSColin Finck Change DC to TW 27*c2c66affSColin Finck Change filename from DC.H to TWAIN.H 28*c2c66affSColin Finck version 1.5, July 1993. Remove spaces from country identifiers 29*c2c66affSColin Finck 30*c2c66affSColin Finck version 1.7, July 1997 Added Capabilities and data structure for 31*c2c66affSColin Finck document imaging and digital cameras. 32*c2c66affSColin Finck KHL. 33*c2c66affSColin Finck version 1.7, July 1997 Inserted Borland compatible structure packing 34*c2c66affSColin Finck directives provided by Mentor. JMH 35*c2c66affSColin Finck version 1.7, Aug 1997 Expanded file tabs to spaces. 36*c2c66affSColin Finck NOTE: future authors should be sure to have 37*c2c66affSColin Finck their editors set to automatically expand tabs 38*c2c66affSColin Finck to spaces (original tab setting was 4 spaces). 39*c2c66affSColin Finck version 1.7, Sept 1997 Added job control values 40*c2c66affSColin Finck Added return codes 41*c2c66affSColin Finck version 1.7, Sept 1997 changed definition of pRGBRESPONSE to 42*c2c66affSColin Finck pTW_RGBRESPONSE 43*c2c66affSColin Finck version 1.7 Aug 1998 Added missing TWEI_BARCODEROTATION values 44*c2c66affSColin Finck TWBCOR_ types JMH 45*c2c66affSColin Finck version 1.8 August 1998 Added new types and definitions required 46*c2c66affSColin Finck for 1.8 Specification JMH 47*c2c66affSColin Finck version 1.8 January 1999 Changed search mode from SRCH_ to TWBD_ as 48*c2c66affSColin Finck in 1.8 Specification, added TWBT_MAXICODE JMH 49*c2c66affSColin Finck version 1.8 January 1999 Removed undocumented duplicate AUTO<cap> JMH 50*c2c66affSColin Finck \* ======================================================================== */ 51*c2c66affSColin Finck 52*c2c66affSColin Finck #ifndef TWAIN 53*c2c66affSColin Finck #define TWAIN 54*c2c66affSColin Finck 55*c2c66affSColin Finck #include <stdarg.h> 56*c2c66affSColin Finck 57*c2c66affSColin Finck #include "windef.h" 58*c2c66affSColin Finck #include "winbase.h" 59*c2c66affSColin Finck 60*c2c66affSColin Finck /* The Twain structures must be packed on 2 byte alignment */ 61*c2c66affSColin Finck #include "pshpack2.h" 62*c2c66affSColin Finck 63*c2c66affSColin Finck #undef FAR 64*c2c66affSColin Finck #define FAR 65*c2c66affSColin Finck 66*c2c66affSColin Finck /**************************************************************************** 67*c2c66affSColin Finck * TWAIN Version * 68*c2c66affSColin Finck ****************************************************************************/ 69*c2c66affSColin Finck #define TWON_PROTOCOLMINOR 8 /* Changed for Version 1.8 */ 70*c2c66affSColin Finck #define TWON_PROTOCOLMAJOR 1 71*c2c66affSColin Finck 72*c2c66affSColin Finck /**************************************************************************** 73*c2c66affSColin Finck * Platform Dependent Definitions and Typedefs * 74*c2c66affSColin Finck ****************************************************************************/ 75*c2c66affSColin Finck 76*c2c66affSColin Finck /* Define one of the following, depending on the platform */ 77*c2c66affSColin Finck /* #define _MAC_ */ 78*c2c66affSColin Finck /* #define _UNIX_ */ 79*c2c66affSColin Finck #define _MSWIN_ 80*c2c66affSColin Finck 81*c2c66affSColin Finck #ifdef _MSWIN_ 82*c2c66affSColin Finck typedef HANDLE TW_HANDLE; 83*c2c66affSColin Finck typedef LPVOID TW_MEMREF; 84*c2c66affSColin Finck typedef BYTE * HPBYTE; 85*c2c66affSColin Finck typedef void * HPVOID; 86*c2c66affSColin Finck #endif /* _MSWIN_ */ 87*c2c66affSColin Finck 88*c2c66affSColin Finck #ifdef _MAC_ 89*c2c66affSColin Finck #define PASCAL pascal 90*c2c66affSColin Finck #define FAR 91*c2c66affSColin Finck typedef Handle TW_HANDLE; 92*c2c66affSColin Finck typedef char *TW_MEMREF; 93*c2c66affSColin Finck #endif /* _MAC_ */ 94*c2c66affSColin Finck 95*c2c66affSColin Finck #ifdef _UNIX_ 96*c2c66affSColin Finck /* #define PASCAL pascal */ 97*c2c66affSColin Finck #define FAR 98*c2c66affSColin Finck typedef unsigned char *TW_HANDLE; 99*c2c66affSColin Finck typedef unsigned char *TW_MEMREF; 100*c2c66affSColin Finck #endif /* _UNIX_ */ 101*c2c66affSColin Finck 102*c2c66affSColin Finck /**************************************************************************** 103*c2c66affSColin Finck * Type Definitions * 104*c2c66affSColin Finck ****************************************************************************/ 105*c2c66affSColin Finck 106*c2c66affSColin Finck /* String types. These include room for the strings and a NULL char, * 107*c2c66affSColin Finck * or, on the Mac, a length byte followed by the string. * 108*c2c66affSColin Finck * TW_STR255 must hold less than 256 chars so length fits in first byte. */ 109*c2c66affSColin Finck typedef char TW_STR32[34], FAR *pTW_STR32; 110*c2c66affSColin Finck typedef char TW_STR64[66], FAR *pTW_STR64; 111*c2c66affSColin Finck typedef char TW_STR128[130], FAR *pTW_STR128; 112*c2c66affSColin Finck typedef char TW_STR255[256], FAR *pTW_STR255; 113*c2c66affSColin Finck 114*c2c66affSColin Finck /* Numeric types. */ 115*c2c66affSColin Finck typedef char TW_INT8, FAR *pTW_INT8; 116*c2c66affSColin Finck typedef short TW_INT16, FAR *pTW_INT16; 117*c2c66affSColin Finck typedef LONG TW_INT32, FAR *pTW_INT32; 118*c2c66affSColin Finck typedef unsigned char TW_UINT8, FAR *pTW_UINT8; 119*c2c66affSColin Finck typedef unsigned short TW_UINT16, FAR *pTW_UINT16; 120*c2c66affSColin Finck typedef ULONG TW_UINT32, FAR *pTW_UINT32; 121*c2c66affSColin Finck typedef unsigned short TW_BOOL, FAR *pTW_BOOL; 122*c2c66affSColin Finck 123*c2c66affSColin Finck /* Fixed point structure type. */ 124*c2c66affSColin Finck typedef struct { 125*c2c66affSColin Finck TW_INT16 Whole; /* maintains the sign */ 126*c2c66affSColin Finck TW_UINT16 Frac; 127*c2c66affSColin Finck } TW_FIX32, FAR *pTW_FIX32; 128*c2c66affSColin Finck 129*c2c66affSColin Finck /**************************************************************************** 130*c2c66affSColin Finck * Structure Definitions * 131*c2c66affSColin Finck ****************************************************************************/ 132*c2c66affSColin Finck 133*c2c66affSColin Finck /* No DAT needed. */ 134*c2c66affSColin Finck typedef struct { 135*c2c66affSColin Finck TW_FIX32 X; 136*c2c66affSColin Finck TW_FIX32 Y; 137*c2c66affSColin Finck TW_FIX32 Z; 138*c2c66affSColin Finck } TW_CIEPOINT, FAR * pTW_CIEPOINT; 139*c2c66affSColin Finck 140*c2c66affSColin Finck /* No DAT needed. */ 141*c2c66affSColin Finck typedef struct { 142*c2c66affSColin Finck TW_FIX32 StartIn; 143*c2c66affSColin Finck TW_FIX32 BreakIn; 144*c2c66affSColin Finck TW_FIX32 EndIn; 145*c2c66affSColin Finck TW_FIX32 StartOut; 146*c2c66affSColin Finck TW_FIX32 BreakOut; 147*c2c66affSColin Finck TW_FIX32 EndOut; 148*c2c66affSColin Finck TW_FIX32 Gamma; 149*c2c66affSColin Finck TW_FIX32 SampleCount; /* if =0 use the gamma */ 150*c2c66affSColin Finck } TW_DECODEFUNCTION, FAR * pTW_DECODEFUNCTION; 151*c2c66affSColin Finck 152*c2c66affSColin Finck /* No DAT needed. */ 153*c2c66affSColin Finck typedef struct { 154*c2c66affSColin Finck TW_UINT8 Index; /* Value used to index into the color table. */ 155*c2c66affSColin Finck TW_UINT8 Channel1; /* First tri-stimulus value (e.g Red) */ 156*c2c66affSColin Finck TW_UINT8 Channel2; /* Second tri-stimulus value (e.g Green) */ 157*c2c66affSColin Finck TW_UINT8 Channel3; /* Third tri-stimulus value (e.g Blue) */ 158*c2c66affSColin Finck } TW_ELEMENT8, FAR * pTW_ELEMENT8; 159*c2c66affSColin Finck 160*c2c66affSColin Finck /* No DAT. Defines a frame rectangle in ICAP_UNITS coordinates. */ 161*c2c66affSColin Finck typedef struct { 162*c2c66affSColin Finck TW_FIX32 Left; 163*c2c66affSColin Finck TW_FIX32 Top; 164*c2c66affSColin Finck TW_FIX32 Right; 165*c2c66affSColin Finck TW_FIX32 Bottom; 166*c2c66affSColin Finck } TW_FRAME, FAR * pTW_FRAME; 167*c2c66affSColin Finck 168*c2c66affSColin Finck /* No DAT needed. Used to manage memory buffers. */ 169*c2c66affSColin Finck typedef struct { 170*c2c66affSColin Finck TW_UINT32 Flags; /* Any combination of the TWMF_ constants. */ 171*c2c66affSColin Finck TW_UINT32 Length; /* Number of bytes stored in buffer TheMem. */ 172*c2c66affSColin Finck TW_MEMREF TheMem; /* Pointer or handle to the allocated memory buffer. */ 173*c2c66affSColin Finck } TW_MEMORY, FAR * pTW_MEMORY; 174*c2c66affSColin Finck 175*c2c66affSColin Finck /* No DAT needed. */ 176*c2c66affSColin Finck typedef struct { 177*c2c66affSColin Finck TW_DECODEFUNCTION Decode[3]; 178*c2c66affSColin Finck TW_FIX32 Mix[3][3]; 179*c2c66affSColin Finck } TW_TRANSFORMSTAGE, FAR * pTW_TRANSFORMSTAGE; 180*c2c66affSColin Finck 181*c2c66affSColin Finck /* No DAT needed. Describes version of software currently running. */ 182*c2c66affSColin Finck typedef struct { 183*c2c66affSColin Finck TW_UINT16 MajorNum; /* Major revision number of the software. */ 184*c2c66affSColin Finck TW_UINT16 MinorNum; /* Incremental revision number of the software. */ 185*c2c66affSColin Finck TW_UINT16 Language; /* e.g. TWLG_SWISSFRENCH */ 186*c2c66affSColin Finck TW_UINT16 Country; /* e.g. TWCY_SWITZERLAND */ 187*c2c66affSColin Finck TW_STR32 Info; /* e.g. "1.0b3 Beta release" */ 188*c2c66affSColin Finck } TW_VERSION, FAR * pTW_VERSION; 189*c2c66affSColin Finck 190*c2c66affSColin Finck /* TWON_ARRAY. Container for array of values (a simplified TW_ENUMERATION) */ 191*c2c66affSColin Finck typedef struct { 192*c2c66affSColin Finck TW_UINT16 ItemType; 193*c2c66affSColin Finck TW_UINT32 NumItems; /* How many items in ItemList */ 194*c2c66affSColin Finck TW_UINT8 ItemList[1]; /* Array of ItemType values starts here */ 195*c2c66affSColin Finck } TW_ARRAY, FAR * pTW_ARRAY; 196*c2c66affSColin Finck 197*c2c66affSColin Finck /* TWON_ENUMERATION. Container for a collection of values. */ 198*c2c66affSColin Finck typedef struct { 199*c2c66affSColin Finck TW_UINT16 ItemType; 200*c2c66affSColin Finck TW_UINT32 NumItems; /* How many items in ItemList */ 201*c2c66affSColin Finck TW_UINT32 CurrentIndex; /* Current value is in ItemList[CurrentIndex] */ 202*c2c66affSColin Finck TW_UINT32 DefaultIndex; /* Powerup value is in ItemList[DefaultIndex] */ 203*c2c66affSColin Finck TW_UINT8 ItemList[1]; /* Array of ItemType values starts here */ 204*c2c66affSColin Finck } TW_ENUMERATION, FAR * pTW_ENUMERATION; 205*c2c66affSColin Finck 206*c2c66affSColin Finck /* TWON_ONEVALUE. Container for one value. */ 207*c2c66affSColin Finck typedef struct { 208*c2c66affSColin Finck TW_UINT16 ItemType; 209*c2c66affSColin Finck TW_UINT32 Item; 210*c2c66affSColin Finck } TW_ONEVALUE, FAR * pTW_ONEVALUE; 211*c2c66affSColin Finck 212*c2c66affSColin Finck /* TWON_RANGE. Container for a range of values. */ 213*c2c66affSColin Finck typedef struct { 214*c2c66affSColin Finck TW_UINT16 ItemType; 215*c2c66affSColin Finck TW_UINT32 MinValue; /* Starting value in the range. */ 216*c2c66affSColin Finck TW_UINT32 MaxValue; /* Final value in the range. */ 217*c2c66affSColin Finck TW_UINT32 StepSize; /* Increment from MinValue to MaxValue. */ 218*c2c66affSColin Finck TW_UINT32 DefaultValue; /* Power-up value. */ 219*c2c66affSColin Finck TW_UINT32 CurrentValue; /* The value that is currently in effect. */ 220*c2c66affSColin Finck } TW_RANGE, FAR * pTW_RANGE; 221*c2c66affSColin Finck 222*c2c66affSColin Finck /* DAT_CAPABILITY. Used by application to get/set capability from/in a data source. */ 223*c2c66affSColin Finck typedef struct { 224*c2c66affSColin Finck TW_UINT16 Cap; /* id of capability to set or get, e.g. CAP_BRIGHTNESS */ 225*c2c66affSColin Finck TW_UINT16 ConType; /* TWON_ONEVALUE, _RANGE, _ENUMERATION or _ARRAY */ 226*c2c66affSColin Finck TW_HANDLE hContainer; /* Handle to container of type Dat */ 227*c2c66affSColin Finck } TW_CAPABILITY, FAR * pTW_CAPABILITY; 228*c2c66affSColin Finck 229*c2c66affSColin Finck /* DAT_CIECOLOR. */ 230*c2c66affSColin Finck typedef struct { 231*c2c66affSColin Finck TW_UINT16 ColorSpace; 232*c2c66affSColin Finck TW_INT16 LowEndian; 233*c2c66affSColin Finck TW_INT16 DeviceDependent; 234*c2c66affSColin Finck TW_INT32 VersionNumber; 235*c2c66affSColin Finck TW_TRANSFORMSTAGE StageABC; 236*c2c66affSColin Finck TW_TRANSFORMSTAGE StageLMN; 237*c2c66affSColin Finck TW_CIEPOINT WhitePoint; 238*c2c66affSColin Finck TW_CIEPOINT BlackPoint; 239*c2c66affSColin Finck TW_CIEPOINT WhitePaper; 240*c2c66affSColin Finck TW_CIEPOINT BlackInk; 241*c2c66affSColin Finck TW_FIX32 Samples[1]; 242*c2c66affSColin Finck } TW_CIECOLOR, FAR * pTW_CIECOLOR; 243*c2c66affSColin Finck 244*c2c66affSColin Finck /* DAT_EVENT. For passing events down from the application to the DS. */ 245*c2c66affSColin Finck typedef struct { 246*c2c66affSColin Finck TW_MEMREF pEvent; /* Windows pMSG or Mac pEvent. */ 247*c2c66affSColin Finck TW_UINT16 TWMessage; /* TW msg from data source, e.g. MSG_XFERREADY */ 248*c2c66affSColin Finck } TW_EVENT, FAR * pTW_EVENT; 249*c2c66affSColin Finck 250*c2c66affSColin Finck /* DAT_GRAYRESPONSE */ 251*c2c66affSColin Finck typedef struct { 252*c2c66affSColin Finck TW_ELEMENT8 Response[1]; 253*c2c66affSColin Finck } TW_GRAYRESPONSE, FAR * pTW_GRAYRESPONSE; 254*c2c66affSColin Finck 255*c2c66affSColin Finck /* DAT_IDENTITY. Identifies the program/library/code resource. */ 256*c2c66affSColin Finck typedef struct { 257*c2c66affSColin Finck TW_UINT32 Id; /* Unique number. In Windows, application hWnd */ 258*c2c66affSColin Finck TW_VERSION Version; /* Identifies the piece of code */ 259*c2c66affSColin Finck TW_UINT16 ProtocolMajor; /* Application and DS must set to TWON_PROTOCOLMAJOR */ 260*c2c66affSColin Finck TW_UINT16 ProtocolMinor; /* Application and DS must set to TWON_PROTOCOLMINOR */ 261*c2c66affSColin Finck TW_UINT32 SupportedGroups; /* Bit field OR combination of DG_ constants */ 262*c2c66affSColin Finck TW_STR32 Manufacturer; /* Manufacturer name, e.g. "Hewlett-Packard" */ 263*c2c66affSColin Finck TW_STR32 ProductFamily; /* Product family name, e.g. "ScanJet" */ 264*c2c66affSColin Finck TW_STR32 ProductName; /* Product name, e.g. "ScanJet Plus" */ 265*c2c66affSColin Finck } TW_IDENTITY, FAR * pTW_IDENTITY; 266*c2c66affSColin Finck 267*c2c66affSColin Finck /* DAT_IMAGEINFO. Application gets detailed image info from DS with this. */ 268*c2c66affSColin Finck typedef struct { 269*c2c66affSColin Finck TW_FIX32 XResolution; /* Resolution in the horizontal */ 270*c2c66affSColin Finck TW_FIX32 YResolution; /* Resolution in the vertical */ 271*c2c66affSColin Finck TW_INT32 ImageWidth; /* Columns in the image, -1 if unknown by DS*/ 272*c2c66affSColin Finck TW_INT32 ImageLength; /* Rows in the image, -1 if unknown by DS */ 273*c2c66affSColin Finck TW_INT16 SamplesPerPixel; /* Number of samples per pixel, 3 for RGB */ 274*c2c66affSColin Finck TW_INT16 BitsPerSample[8]; /* Number of bits for each sample */ 275*c2c66affSColin Finck TW_INT16 BitsPerPixel; /* Number of bits for each padded pixel */ 276*c2c66affSColin Finck TW_BOOL Planar; /* True if Planar, False if chunky */ 277*c2c66affSColin Finck TW_INT16 PixelType; /* How to interp data; photo interp (TWPT_) */ 278*c2c66affSColin Finck TW_UINT16 Compression; /* How the data is compressed (TWCP_xxxx) */ 279*c2c66affSColin Finck } TW_IMAGEINFO, FAR * pTW_IMAGEINFO; 280*c2c66affSColin Finck 281*c2c66affSColin Finck /* DAT_IMAGELAYOUT. Provides image layout information in current units. */ 282*c2c66affSColin Finck typedef struct { 283*c2c66affSColin Finck TW_FRAME Frame; /* Frame coords within larger document */ 284*c2c66affSColin Finck TW_UINT32 DocumentNumber; 285*c2c66affSColin Finck TW_UINT32 PageNumber; /* Reset when you go to next document */ 286*c2c66affSColin Finck TW_UINT32 FrameNumber; /* Reset when you go to next page */ 287*c2c66affSColin Finck } TW_IMAGELAYOUT, FAR * pTW_IMAGELAYOUT; 288*c2c66affSColin Finck 289*c2c66affSColin Finck /* DAT_IMAGEMEMXFER. Used to pass image data (e.g. in strips) from DS to application.*/ 290*c2c66affSColin Finck typedef struct { 291*c2c66affSColin Finck TW_UINT16 Compression; /* How the data is compressed */ 292*c2c66affSColin Finck TW_UINT32 BytesPerRow; /* Number of bytes in a row of data */ 293*c2c66affSColin Finck TW_UINT32 Columns; /* How many columns */ 294*c2c66affSColin Finck TW_UINT32 Rows; /* How many rows */ 295*c2c66affSColin Finck TW_UINT32 XOffset; /* How far from the side of the image */ 296*c2c66affSColin Finck TW_UINT32 YOffset; /* How far from the top of the image */ 297*c2c66affSColin Finck TW_UINT32 BytesWritten; /* How many bytes written in Memory */ 298*c2c66affSColin Finck TW_MEMORY Memory; /* Mem struct used to pass actual image data */ 299*c2c66affSColin Finck } TW_IMAGEMEMXFER, FAR * pTW_IMAGEMEMXFER; 300*c2c66affSColin Finck 301*c2c66affSColin Finck /* Changed in 1.1: QuantTable, HuffmanDC, HuffmanAC TW_MEMREF -> TW_MEMORY */ 302*c2c66affSColin Finck /* DAT_JPEGCOMPRESSION. Based on JPEG Draft International Std, ver 10918-1. */ 303*c2c66affSColin Finck typedef struct { 304*c2c66affSColin Finck TW_UINT16 ColorSpace; /* One of the TWPT_xxxx values */ 305*c2c66affSColin Finck TW_UINT32 SubSampling; /* Two word "array" for subsampling values */ 306*c2c66affSColin Finck TW_UINT16 NumComponents; /* Number of color components in image */ 307*c2c66affSColin Finck TW_UINT16 RestartFrequency; /* Frequency of restart marker codes in MDU's */ 308*c2c66affSColin Finck TW_UINT16 QuantMap[4]; /* Mapping of components to QuantTables */ 309*c2c66affSColin Finck TW_MEMORY QuantTable[4]; /* Quantization tables */ 310*c2c66affSColin Finck TW_UINT16 HuffmanMap[4]; /* Mapping of components to Huffman tables */ 311*c2c66affSColin Finck TW_MEMORY HuffmanDC[2]; /* DC Huffman tables */ 312*c2c66affSColin Finck TW_MEMORY HuffmanAC[2]; /* AC Huffman tables */ 313*c2c66affSColin Finck } TW_JPEGCOMPRESSION, FAR * pTW_JPEGCOMPRESSION; 314*c2c66affSColin Finck 315*c2c66affSColin Finck /* DAT_PALETTE8. Color palette when TWPT_PALETTE pixels xfer'd in mem buf. */ 316*c2c66affSColin Finck typedef struct { 317*c2c66affSColin Finck TW_UINT16 NumColors; /* Number of colors in the color table. */ 318*c2c66affSColin Finck TW_UINT16 PaletteType; /* TWPA_xxxx, specifies type of palette. */ 319*c2c66affSColin Finck TW_ELEMENT8 Colors[256]; /* Array of palette values starts here. */ 320*c2c66affSColin Finck } TW_PALETTE8, FAR * pTW_PALETTE8; 321*c2c66affSColin Finck 322*c2c66affSColin Finck /* DAT_PENDINGXFERS. Used with MSG_ENDXFER to indicate additional data. */ 323*c2c66affSColin Finck typedef struct { 324*c2c66affSColin Finck TW_UINT16 Count; 325*c2c66affSColin Finck union { 326*c2c66affSColin Finck TW_UINT32 EOJ; 327*c2c66affSColin Finck TW_UINT32 Reserved; 328*c2c66affSColin Finck } u; 329*c2c66affSColin Finck } TW_PENDINGXFERS, FAR *pTW_PENDINGXFERS; 330*c2c66affSColin Finck 331*c2c66affSColin Finck /* DAT_RGBRESPONSE */ 332*c2c66affSColin Finck typedef struct { 333*c2c66affSColin Finck TW_ELEMENT8 Response[1]; 334*c2c66affSColin Finck } TW_RGBRESPONSE, FAR * pTW_RGBRESPONSE; 335*c2c66affSColin Finck 336*c2c66affSColin Finck /* DAT_SETUPFILEXFER. Sets up DS to application data transfer via a file. */ 337*c2c66affSColin Finck typedef struct { 338*c2c66affSColin Finck TW_STR255 FileName; 339*c2c66affSColin Finck TW_UINT16 Format; /* Any TWFF_ constant */ 340*c2c66affSColin Finck TW_INT16 VRefNum; /* Used for Mac only */ 341*c2c66affSColin Finck } TW_SETUPFILEXFER, FAR * pTW_SETUPFILEXFER; 342*c2c66affSColin Finck 343*c2c66affSColin Finck /* DAT_SETUPMEMXFER. Sets up DS to application data transfer via a memory buffer. */ 344*c2c66affSColin Finck typedef struct { 345*c2c66affSColin Finck TW_UINT32 MinBufSize; 346*c2c66affSColin Finck TW_UINT32 MaxBufSize; 347*c2c66affSColin Finck TW_UINT32 Preferred; 348*c2c66affSColin Finck } TW_SETUPMEMXFER, FAR * pTW_SETUPMEMXFER; 349*c2c66affSColin Finck 350*c2c66affSColin Finck /* DAT_STATUS. Application gets detailed status info from a data source with this. */ 351*c2c66affSColin Finck typedef struct { 352*c2c66affSColin Finck TW_UINT16 ConditionCode; /* Any TWCC_ constant */ 353*c2c66affSColin Finck TW_UINT16 Reserved; /* Future expansion space */ 354*c2c66affSColin Finck } TW_STATUS, FAR * pTW_STATUS; 355*c2c66affSColin Finck 356*c2c66affSColin Finck /* DAT_USERINTERFACE. Coordinates UI between application and data source. */ 357*c2c66affSColin Finck typedef struct { 358*c2c66affSColin Finck TW_BOOL ShowUI; /* TRUE if DS should bring up its UI */ 359*c2c66affSColin Finck TW_BOOL ModalUI; /* For Mac only - true if the DS's UI is modal */ 360*c2c66affSColin Finck TW_HANDLE hParent; /* For windows only - Application window handle */ 361*c2c66affSColin Finck } TW_USERINTERFACE, FAR * pTW_USERINTERFACE; 362*c2c66affSColin Finck 363*c2c66affSColin Finck /* SDH - 03/21/95 - TWUNK */ 364*c2c66affSColin Finck /* DAT_TWUNKIDENTITY. Provides DS identity and 'other' information necessary */ 365*c2c66affSColin Finck /* across thunk link. */ 366*c2c66affSColin Finck typedef struct { 367*c2c66affSColin Finck TW_IDENTITY identity; /* Identity of data source. */ 368*c2c66affSColin Finck TW_STR255 dsPath; /* Full path and file name of data source. */ 369*c2c66affSColin Finck } TW_TWUNKIDENTITY, FAR * pTW_TWUNKIDENTITY; 370*c2c66affSColin Finck 371*c2c66affSColin Finck /* SDH - 03/21/95 - TWUNK */ 372*c2c66affSColin Finck /* Provides DS_Entry parameters over thunk link. */ 373*c2c66affSColin Finck typedef struct 374*c2c66affSColin Finck { 375*c2c66affSColin Finck TW_INT8 destFlag; /* TRUE if dest is not NULL */ 376*c2c66affSColin Finck TW_IDENTITY dest; /* Identity of data source (if used) */ 377*c2c66affSColin Finck TW_INT32 dataGroup; /* DSM_Entry dataGroup parameter */ 378*c2c66affSColin Finck TW_INT16 dataArgType; /* DSM_Entry dataArgType parameter */ 379*c2c66affSColin Finck TW_INT16 message; /* DSM_Entry message parameter */ 380*c2c66affSColin Finck TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ 381*c2c66affSColin Finck /* TW_MEMREF pData; */ /* Based on implementation specifics, a */ 382*c2c66affSColin Finck /* pData parameter makes no sense in this */ 383*c2c66affSColin Finck /* structure, but data (if provided) will be*/ 384*c2c66affSColin Finck /* appended in the data block. */ 385*c2c66affSColin Finck } TW_TWUNKDSENTRYPARAMS, FAR * pTW_TWUNKDSENTRYPARAMS; 386*c2c66affSColin Finck 387*c2c66affSColin Finck /* SDH - 03/21/95 - TWUNK */ 388*c2c66affSColin Finck /* Provides DS_Entry results over thunk link. */ 389*c2c66affSColin Finck typedef struct 390*c2c66affSColin Finck { 391*c2c66affSColin Finck TW_UINT16 returnCode; /* Thunker DsEntry return code. */ 392*c2c66affSColin Finck TW_UINT16 conditionCode; /* Thunker DsEntry condition code. */ 393*c2c66affSColin Finck TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ 394*c2c66affSColin Finck /* TW_MEMREF pData; */ /* Based on implementation specifics, a */ 395*c2c66affSColin Finck /* pData parameter makes no sense in this */ 396*c2c66affSColin Finck /* structure, but data (if provided) will be*/ 397*c2c66affSColin Finck /* appended in the data block. */ 398*c2c66affSColin Finck } TW_TWUNKDSENTRYRETURN, FAR * pTW_TWUNKDSENTRYRETURN; 399*c2c66affSColin Finck 400*c2c66affSColin Finck /* WJD - 950818 */ 401*c2c66affSColin Finck /* Added for 1.6 Specification */ 402*c2c66affSColin Finck /* TWAIN 1.6 CAP_SUPPORTEDCAPSEXT structure */ 403*c2c66affSColin Finck typedef struct 404*c2c66affSColin Finck { 405*c2c66affSColin Finck TW_UINT16 Cap; /* Which CAP/ICAP info is relevant to */ 406*c2c66affSColin Finck TW_UINT16 Properties; /* Messages this CAP/ICAP supports */ 407*c2c66affSColin Finck } TW_CAPEXT, FAR * pTW_CAPEXT; 408*c2c66affSColin Finck 409*c2c66affSColin Finck /* ----------------------------------------------------------------------- *\ 410*c2c66affSColin Finck 411*c2c66affSColin Finck Version 1.7: Added Following data structure for Document Imaging 412*c2c66affSColin Finck July 1997 Enhancement. 413*c2c66affSColin Finck KHL TW_CUSTOMDSDATA -- For Saving and Restoring Source's 414*c2c66affSColin Finck state. 415*c2c66affSColin Finck TW_INFO -- Each attribute for extended image 416*c2c66affSColin Finck information. 417*c2c66affSColin Finck TW_EXTIMAGEINFO -- Extended image information structure. 418*c2c66affSColin Finck 419*c2c66affSColin Finck \* ----------------------------------------------------------------------- */ 420*c2c66affSColin Finck 421*c2c66affSColin Finck typedef struct { 422*c2c66affSColin Finck TW_UINT32 InfoLength; /* Length of Information in bytes. */ 423*c2c66affSColin Finck TW_HANDLE hData; /* Place holder for data, DS Allocates */ 424*c2c66affSColin Finck }TW_CUSTOMDSDATA, FAR *pTW_CUSTOMDSDATA; 425*c2c66affSColin Finck 426*c2c66affSColin Finck typedef struct { 427*c2c66affSColin Finck TW_UINT16 InfoID; 428*c2c66affSColin Finck TW_UINT16 ItemType; 429*c2c66affSColin Finck TW_UINT16 NumItems; 430*c2c66affSColin Finck TW_UINT16 CondCode; 431*c2c66affSColin Finck TW_UINT32 Item; 432*c2c66affSColin Finck }TW_INFO, FAR* pTW_INFO; 433*c2c66affSColin Finck 434*c2c66affSColin Finck typedef struct { 435*c2c66affSColin Finck TW_UINT32 NumInfos; 436*c2c66affSColin Finck TW_INFO Info[1]; 437*c2c66affSColin Finck }TW_EXTIMAGEINFO, FAR* pTW_EXTIMAGEINFO; 438*c2c66affSColin Finck 439*c2c66affSColin Finck /* Added 1.8 */ 440*c2c66affSColin Finck 441*c2c66affSColin Finck /* DAT_AUDIOINFO, information about audio data */ 442*c2c66affSColin Finck typedef struct { 443*c2c66affSColin Finck TW_STR255 Name; /* name of audio data */ 444*c2c66affSColin Finck TW_UINT32 Reserved; /* reserved space */ 445*c2c66affSColin Finck } TW_AUDIOINFO, FAR * pTW_AUDIOINFO; 446*c2c66affSColin Finck 447*c2c66affSColin Finck /* DAT_DEVICEEVENT, information about events */ 448*c2c66affSColin Finck typedef struct { 449*c2c66affSColin Finck TW_UINT32 Event; /* One of the TWDE_xxxx values. */ 450*c2c66affSColin Finck TW_STR255 DeviceName; /* The name of the device that generated the event */ 451*c2c66affSColin Finck TW_UINT32 BatteryMinutes; /* Battery Minutes Remaining */ 452*c2c66affSColin Finck TW_INT16 BatteryPercentage; /* Battery Percentage Remaining */ 453*c2c66affSColin Finck TW_INT32 PowerSupply; /* Power Supply */ 454*c2c66affSColin Finck TW_FIX32 XResolution; /* Resolution */ 455*c2c66affSColin Finck TW_FIX32 YResolution; /* Resolution */ 456*c2c66affSColin Finck TW_UINT32 FlashUsed2; /* Flash Used2 */ 457*c2c66affSColin Finck TW_UINT32 AutomaticCapture; /* Automatic Capture */ 458*c2c66affSColin Finck TW_UINT32 TimeBeforeFirstCapture; /* Automatic Capture */ 459*c2c66affSColin Finck TW_UINT32 TimeBetweenCaptures; /* Automatic Capture */ 460*c2c66affSColin Finck } TW_DEVICEEVENT, FAR * pTW_DEVICEEVENT; 461*c2c66affSColin Finck 462*c2c66affSColin Finck /* DAT_FILESYSTEM, information about TWAIN file system */ 463*c2c66affSColin Finck typedef struct { 464*c2c66affSColin Finck /* DG_CONTROL / DAT_FILESYSTEM / MSG_xxxx fields */ 465*c2c66affSColin Finck TW_STR255 InputName; /* The name of the input or source file */ 466*c2c66affSColin Finck TW_STR255 OutputName; /* The result of an operation or the name of a destination file */ 467*c2c66affSColin Finck TW_MEMREF Context; /* Source specific data used to remember state information */ 468*c2c66affSColin Finck /* DG_CONTROL / DAT_FILESYSTEM / MSG_DELETE field */ 469*c2c66affSColin Finck int Recursive; /* recursively delete all sub-directories */ 470*c2c66affSColin Finck /* DG_CONTROL / DAT_FILESYSTEM / MSG_GETINFO fields */ 471*c2c66affSColin Finck TW_INT32 FileType; /* One of the TWFT_xxxx values */ 472*c2c66affSColin Finck TW_UINT32 Size; /* Size of current FileType */ 473*c2c66affSColin Finck TW_STR32 CreateTimeDate; /* creation date of the file */ 474*c2c66affSColin Finck TW_STR32 ModifiedTimeDate; /* last date the file was modified */ 475*c2c66affSColin Finck TW_UINT32 FreeSpace; /* bytes of free space on the current device */ 476*c2c66affSColin Finck TW_INT32 NewImageSize; /* estimate of the amount of space a new image would take up */ 477*c2c66affSColin Finck TW_UINT32 NumberOfFiles; /* number of files, depends on FileType */ 478*c2c66affSColin Finck TW_UINT32 NumberOfSnippets; /**/ 479*c2c66affSColin Finck char Reserved[512]; /**/ 480*c2c66affSColin Finck } TW_FILESYSTEM, FAR * pTW_FILESYSTEM; 481*c2c66affSColin Finck 482*c2c66affSColin Finck /* DAT_PASSTHRU, device dependent data to pass through Data Source */ 483*c2c66affSColin Finck typedef struct { 484*c2c66affSColin Finck TW_MEMREF pCommand; /* Pointer to Command buffer */ 485*c2c66affSColin Finck TW_UINT32 CommandBytes; /* Number of bytes in Command buffer */ 486*c2c66affSColin Finck TW_INT32 Direction; /* One of the TWDR_xxxx values. Defines the direction of data flow */ 487*c2c66affSColin Finck TW_MEMREF pData; /* Pointer to Data buffer */ 488*c2c66affSColin Finck TW_UINT32 DataBytes; /* Number of bytes in Data buffer */ 489*c2c66affSColin Finck TW_UINT32 DataBytesXfered; /* Number of bytes successfully transferred */ 490*c2c66affSColin Finck } TW_PASSTHRU, FAR * pTW_PASSTHRU; 491*c2c66affSColin Finck 492*c2c66affSColin Finck /* DAT_SETUPAUDIOFILEXFER, information required to setup an audio file transfer */ 493*c2c66affSColin Finck typedef struct { 494*c2c66affSColin Finck TW_STR255 FileName; /* full path target file */ 495*c2c66affSColin Finck TW_UINT16 Format; /* one of TWAF_xxxx */ 496*c2c66affSColin Finck TW_INT16 VRefNum; 497*c2c66affSColin Finck } TW_SETUPAUDIOFILEXFER, FAR * pTW_SETUPAUDIOFILEXFER; 498*c2c66affSColin Finck 499*c2c66affSColin Finck /**************************************************************************** 500*c2c66affSColin Finck * Generic Constants * 501*c2c66affSColin Finck ****************************************************************************/ 502*c2c66affSColin Finck 503*c2c66affSColin Finck #define TWON_ARRAY 3 /* indicates TW_ARRAY container */ 504*c2c66affSColin Finck #define TWON_ENUMERATION 4 /* indicates TW_ENUMERATION container */ 505*c2c66affSColin Finck #define TWON_ONEVALUE 5 /* indicates TW_ONEVALUE container */ 506*c2c66affSColin Finck #define TWON_RANGE 6 /* indicates TW_RANGE container */ 507*c2c66affSColin Finck 508*c2c66affSColin Finck #define TWON_ICONID 962 /* res Id of icon used in USERSELECT lbox */ 509*c2c66affSColin Finck #define TWON_DSMID 461 /* res Id of the DSM version num resource */ 510*c2c66affSColin Finck #define TWON_DSMCODEID 63 /* res Id of the Mac SM Code resource */ 511*c2c66affSColin Finck 512*c2c66affSColin Finck #define TWON_DONTCARE8 0xff 513*c2c66affSColin Finck #define TWON_DONTCARE16 0xffff 514*c2c66affSColin Finck #define TWON_DONTCARE32 0xffffffff 515*c2c66affSColin Finck 516*c2c66affSColin Finck /* Flags used in TW_MEMORY structure. */ 517*c2c66affSColin Finck #define TWMF_APPOWNS 0x1 518*c2c66affSColin Finck #define TWMF_DSMOWNS 0x2 519*c2c66affSColin Finck #define TWMF_DSOWNS 0x4 520*c2c66affSColin Finck #define TWMF_POINTER 0x8 521*c2c66affSColin Finck #define TWMF_HANDLE 0x10 522*c2c66affSColin Finck 523*c2c66affSColin Finck /* Palette types for TW_PALETTE8 */ 524*c2c66affSColin Finck #define TWPA_RGB 0 525*c2c66affSColin Finck #define TWPA_GRAY 1 526*c2c66affSColin Finck #define TWPA_CMY 2 527*c2c66affSColin Finck 528*c2c66affSColin Finck /* There are four containers used for capabilities negotiation: 529*c2c66affSColin Finck * TWON_ONEVALUE, TWON_RANGE, TWON_ENUMERATION, TWON_ARRAY 530*c2c66affSColin Finck * In each container structure ItemType can be TWTY_INT8, TWTY_INT16, etc. 531*c2c66affSColin Finck * The kind of data stored in the container can be determined by doing 532*c2c66affSColin Finck * DCItemSize[ItemType] where the following is defined in TWAIN glue code: 533*c2c66affSColin Finck * DCItemSize[]= { sizeof(TW_INT8), 534*c2c66affSColin Finck * sizeof(TW_INT16), 535*c2c66affSColin Finck * etc. 536*c2c66affSColin Finck * sizeof(TW_UINT32) }; 537*c2c66affSColin Finck * 538*c2c66affSColin Finck */ 539*c2c66affSColin Finck 540*c2c66affSColin Finck #define TWTY_INT8 0x0000 /* Means Item is a TW_INT8 */ 541*c2c66affSColin Finck #define TWTY_INT16 0x0001 /* Means Item is a TW_INT16 */ 542*c2c66affSColin Finck #define TWTY_INT32 0x0002 /* Means Item is a TW_INT32 */ 543*c2c66affSColin Finck 544*c2c66affSColin Finck #define TWTY_UINT8 0x0003 /* Means Item is a TW_UINT8 */ 545*c2c66affSColin Finck #define TWTY_UINT16 0x0004 /* Means Item is a TW_UINT16 */ 546*c2c66affSColin Finck #define TWTY_UINT32 0x0005 /* Means Item is a TW_UINT32 */ 547*c2c66affSColin Finck 548*c2c66affSColin Finck #define TWTY_BOOL 0x0006 /* Means Item is a TW_BOOL */ 549*c2c66affSColin Finck 550*c2c66affSColin Finck #define TWTY_FIX32 0x0007 /* Means Item is a TW_FIX32 */ 551*c2c66affSColin Finck 552*c2c66affSColin Finck #define TWTY_FRAME 0x0008 /* Means Item is a TW_FRAME */ 553*c2c66affSColin Finck 554*c2c66affSColin Finck #define TWTY_STR32 0x0009 /* Means Item is a TW_STR32 */ 555*c2c66affSColin Finck #define TWTY_STR64 0x000a /* Means Item is a TW_STR64 */ 556*c2c66affSColin Finck #define TWTY_STR128 0x000b /* Means Item is a TW_STR128 */ 557*c2c66affSColin Finck #define TWTY_STR255 0x000c /* Means Item is a TW_STR255 */ 558*c2c66affSColin Finck 559*c2c66affSColin Finck /**************************************************************************** 560*c2c66affSColin Finck * Capability Constants * 561*c2c66affSColin Finck ****************************************************************************/ 562*c2c66affSColin Finck 563*c2c66affSColin Finck /* ICAP_BITORDER values (BO_ means Bit Order) */ 564*c2c66affSColin Finck #define TWBO_LSBFIRST 0 565*c2c66affSColin Finck #define TWBO_MSBFIRST 1 566*c2c66affSColin Finck 567*c2c66affSColin Finck /* ICAP_COMPRESSION values (CP_ means ComPression ) */ 568*c2c66affSColin Finck #define TWCP_NONE 0 569*c2c66affSColin Finck #define TWCP_PACKBITS 1 570*c2c66affSColin Finck #define TWCP_GROUP31D 2 /* Follows CCITT spec (no End Of Line) */ 571*c2c66affSColin Finck #define TWCP_GROUP31DEOL 3 /* Follows CCITT spec (has End Of Line) */ 572*c2c66affSColin Finck #define TWCP_GROUP32D 4 /* Follows CCITT spec (use cap for K Factor) */ 573*c2c66affSColin Finck #define TWCP_GROUP4 5 /* Follows CCITT spec */ 574*c2c66affSColin Finck #define TWCP_JPEG 6 /* Use capability for more info */ 575*c2c66affSColin Finck #define TWCP_LZW 7 /* Must license from Unisys and IBM to use */ 576*c2c66affSColin Finck #define TWCP_JBIG 8 /* For Bitonal images -- Added 1.7 KHL */ 577*c2c66affSColin Finck /* Added 1.8 */ 578*c2c66affSColin Finck #define TWCP_PNG 9 579*c2c66affSColin Finck #define TWCP_RLE4 10 580*c2c66affSColin Finck #define TWCP_RLE8 11 581*c2c66affSColin Finck #define TWCP_BITFIELDS 12 582*c2c66affSColin Finck 583*c2c66affSColin Finck 584*c2c66affSColin Finck /* ICAP_IMAGEFILEFORMAT values (FF_means File Format) */ 585*c2c66affSColin Finck #define TWFF_TIFF 0 /* Tagged Image File Format */ 586*c2c66affSColin Finck #define TWFF_PICT 1 /* Macintosh PICT */ 587*c2c66affSColin Finck #define TWFF_BMP 2 /* Windows Bitmap */ 588*c2c66affSColin Finck #define TWFF_XBM 3 /* X-Windows Bitmap */ 589*c2c66affSColin Finck #define TWFF_JFIF 4 /* JPEG File Interchange Format */ 590*c2c66affSColin Finck #define TWFF_FPX 5 /* Flash Pix */ 591*c2c66affSColin Finck #define TWFF_TIFFMULTI 6 /* Multi-page tiff file */ 592*c2c66affSColin Finck #define TWFF_PNG 7 593*c2c66affSColin Finck #define TWFF_SPIFF 8 594*c2c66affSColin Finck #define TWFF_EXIF 9 595*c2c66affSColin Finck 596*c2c66affSColin Finck 597*c2c66affSColin Finck /* ICAP_FILTER values (FT_ means Filter Type) */ 598*c2c66affSColin Finck #define TWFT_RED 0 599*c2c66affSColin Finck #define TWFT_GREEN 1 600*c2c66affSColin Finck #define TWFT_BLUE 2 601*c2c66affSColin Finck #define TWFT_NONE 3 602*c2c66affSColin Finck #define TWFT_WHITE 4 603*c2c66affSColin Finck #define TWFT_CYAN 5 604*c2c66affSColin Finck #define TWFT_MAGENTA 6 605*c2c66affSColin Finck #define TWFT_YELLOW 7 606*c2c66affSColin Finck #define TWFT_BLACK 8 607*c2c66affSColin Finck 608*c2c66affSColin Finck /* ICAP_LIGHTPATH values (LP_ means Light Path) */ 609*c2c66affSColin Finck #define TWLP_REFLECTIVE 0 610*c2c66affSColin Finck #define TWLP_TRANSMISSIVE 1 611*c2c66affSColin Finck 612*c2c66affSColin Finck /* ICAP_LIGHTSOURCE values (LS_ means Light Source) */ 613*c2c66affSColin Finck #define TWLS_RED 0 614*c2c66affSColin Finck #define TWLS_GREEN 1 615*c2c66affSColin Finck #define TWLS_BLUE 2 616*c2c66affSColin Finck #define TWLS_NONE 3 617*c2c66affSColin Finck #define TWLS_WHITE 4 618*c2c66affSColin Finck #define TWLS_UV 5 619*c2c66affSColin Finck #define TWLS_IR 6 620*c2c66affSColin Finck 621*c2c66affSColin Finck /* ICAP_ORIENTATION values (OR_ means ORientation) */ 622*c2c66affSColin Finck #define TWOR_ROT0 0 623*c2c66affSColin Finck #define TWOR_ROT90 1 624*c2c66affSColin Finck #define TWOR_ROT180 2 625*c2c66affSColin Finck #define TWOR_ROT270 3 626*c2c66affSColin Finck #define TWOR_PORTRAIT TWOR_ROT0 627*c2c66affSColin Finck #define TWOR_LANDSCAPE TWOR_ROT270 628*c2c66affSColin Finck 629*c2c66affSColin Finck /* ICAP_PLANARCHUNKY values (PC_ means Planar/Chunky ) */ 630*c2c66affSColin Finck #define TWPC_CHUNKY 0 631*c2c66affSColin Finck #define TWPC_PLANAR 1 632*c2c66affSColin Finck 633*c2c66affSColin Finck /* ICAP_PIXELFLAVOR values (PF_ means Pixel Flavor) */ 634*c2c66affSColin Finck #define TWPF_CHOCOLATE 0 /* zero pixel represents darkest shade */ 635*c2c66affSColin Finck #define TWPF_VANILLA 1 /* zero pixel represents lightest shade */ 636*c2c66affSColin Finck 637*c2c66affSColin Finck /* ICAP_PIXELTYPE values (PT_ means Pixel Type) */ 638*c2c66affSColin Finck #define TWPT_BW 0 /* Black and White */ 639*c2c66affSColin Finck #define TWPT_GRAY 1 640*c2c66affSColin Finck #define TWPT_RGB 2 641*c2c66affSColin Finck #define TWPT_PALETTE 3 642*c2c66affSColin Finck #define TWPT_CMY 4 643*c2c66affSColin Finck #define TWPT_CMYK 5 644*c2c66affSColin Finck #define TWPT_YUV 6 645*c2c66affSColin Finck #define TWPT_YUVK 7 646*c2c66affSColin Finck #define TWPT_CIEXYZ 8 647*c2c66affSColin Finck 648*c2c66affSColin Finck /* ICAP_SUPPORTEDSIZES values (SS_ means Supported Sizes) */ 649*c2c66affSColin Finck #define TWSS_NONE 0 650*c2c66affSColin Finck #define TWSS_A4LETTER 1 651*c2c66affSColin Finck #define TWSS_B5LETTER 2 652*c2c66affSColin Finck #define TWSS_USLETTER 3 653*c2c66affSColin Finck #define TWSS_USLEGAL 4 654*c2c66affSColin Finck /* Added 1.5 */ 655*c2c66affSColin Finck #define TWSS_A5 5 656*c2c66affSColin Finck #define TWSS_B4 6 657*c2c66affSColin Finck #define TWSS_B6 7 658*c2c66affSColin Finck /*#define TWSS_B 8 */ 659*c2c66affSColin Finck /* Added 1.7 */ 660*c2c66affSColin Finck #define TWSS_USLEDGER 9 661*c2c66affSColin Finck #define TWSS_USEXECUTIVE 10 662*c2c66affSColin Finck #define TWSS_A3 11 663*c2c66affSColin Finck #define TWSS_B3 12 664*c2c66affSColin Finck #define TWSS_A6 13 665*c2c66affSColin Finck #define TWSS_C4 14 666*c2c66affSColin Finck #define TWSS_C5 15 667*c2c66affSColin Finck #define TWSS_C6 16 668*c2c66affSColin Finck /* Added 1.8 */ 669*c2c66affSColin Finck #define TWSS_4A0 17 670*c2c66affSColin Finck #define TWSS_2A0 18 671*c2c66affSColin Finck #define TWSS_A0 19 672*c2c66affSColin Finck #define TWSS_A1 20 673*c2c66affSColin Finck #define TWSS_A2 21 674*c2c66affSColin Finck #define TWSS_A4 TWSS_A4LETTER 675*c2c66affSColin Finck #define TWSS_A7 22 676*c2c66affSColin Finck #define TWSS_A8 23 677*c2c66affSColin Finck #define TWSS_A9 24 678*c2c66affSColin Finck #define TWSS_A10 25 679*c2c66affSColin Finck #define TWSS_ISOB0 26 680*c2c66affSColin Finck #define TWSS_ISOB1 27 681*c2c66affSColin Finck #define TWSS_ISOB2 28 682*c2c66affSColin Finck #define TWSS_ISOB3 TWSS_B3 683*c2c66affSColin Finck #define TWSS_ISOB4 TWSS_B4 684*c2c66affSColin Finck #define TWSS_ISOB5 29 685*c2c66affSColin Finck #define TWSS_ISOB6 TWSS_B6 686*c2c66affSColin Finck #define TWSS_ISOB7 30 687*c2c66affSColin Finck #define TWSS_ISOB8 31 688*c2c66affSColin Finck #define TWSS_ISOB9 32 689*c2c66affSColin Finck #define TWSS_ISOB10 33 690*c2c66affSColin Finck #define TWSS_JISB0 34 691*c2c66affSColin Finck #define TWSS_JISB1 35 692*c2c66affSColin Finck #define TWSS_JISB2 36 693*c2c66affSColin Finck #define TWSS_JISB3 37 694*c2c66affSColin Finck #define TWSS_JISB4 38 695*c2c66affSColin Finck #define TWSS_JISB5 TWSS_B5LETTER 696*c2c66affSColin Finck #define TWSS_JISB6 39 697*c2c66affSColin Finck #define TWSS_JISB7 40 698*c2c66affSColin Finck #define TWSS_JISB8 41 699*c2c66affSColin Finck #define TWSS_JISB9 42 700*c2c66affSColin Finck #define TWSS_JISB10 43 701*c2c66affSColin Finck #define TWSS_C0 44 702*c2c66affSColin Finck #define TWSS_C1 45 703*c2c66affSColin Finck #define TWSS_C2 46 704*c2c66affSColin Finck #define TWSS_C3 47 705*c2c66affSColin Finck #define TWSS_C7 48 706*c2c66affSColin Finck #define TWSS_C8 49 707*c2c66affSColin Finck #define TWSS_C9 50 708*c2c66affSColin Finck #define TWSS_C10 51 709*c2c66affSColin Finck #define TWSS_USSTATEMENT 52 710*c2c66affSColin Finck #define TWSS_BUSINESSCARD 53 711*c2c66affSColin Finck 712*c2c66affSColin Finck /* ICAP_XFERMECH values (SX_ means Setup XFer) */ 713*c2c66affSColin Finck #define TWSX_NATIVE 0 714*c2c66affSColin Finck #define TWSX_FILE 1 715*c2c66affSColin Finck #define TWSX_MEMORY 2 716*c2c66affSColin Finck 717*c2c66affSColin Finck /* ICAP_UNITS values (UN_ means UNits) */ 718*c2c66affSColin Finck #define TWUN_INCHES 0 719*c2c66affSColin Finck #define TWUN_CENTIMETERS 1 720*c2c66affSColin Finck #define TWUN_PICAS 2 721*c2c66affSColin Finck #define TWUN_POINTS 3 722*c2c66affSColin Finck #define TWUN_TWIPS 4 723*c2c66affSColin Finck #define TWUN_PIXELS 5 724*c2c66affSColin Finck 725*c2c66affSColin Finck /* Added 1.5 */ 726*c2c66affSColin Finck /* ICAP_BITDEPTHREDUCTION values (BR_ means Bitdepth Reduction) */ 727*c2c66affSColin Finck #define TWBR_THRESHOLD 0 728*c2c66affSColin Finck #define TWBR_HALFTONE 1 729*c2c66affSColin Finck #define TWBR_CUSTHALFTONE 2 730*c2c66affSColin Finck #define TWBR_DIFFUSION 3 731*c2c66affSColin Finck 732*c2c66affSColin Finck /* Added 1.7 */ 733*c2c66affSColin Finck /* ICAP_DUPLEX values */ 734*c2c66affSColin Finck #define TWDX_NONE 0 735*c2c66affSColin Finck #define TWDX_1PASSDUPLEX 1 736*c2c66affSColin Finck #define TWDX_2PASSDUPLEX 2 737*c2c66affSColin Finck 738*c2c66affSColin Finck /* Added 1.7 */ 739*c2c66affSColin Finck /* TWEI_BARCODETYPE values */ 740*c2c66affSColin Finck #define TWBT_3OF9 0 741*c2c66affSColin Finck #define TWBT_2OF5INTERLEAVED 1 742*c2c66affSColin Finck #define TWBT_2OF5NONINTERLEAVED 2 743*c2c66affSColin Finck #define TWBT_CODE93 3 744*c2c66affSColin Finck #define TWBT_CODE128 4 745*c2c66affSColin Finck #define TWBT_UCC128 5 746*c2c66affSColin Finck #define TWBT_CODABAR 6 747*c2c66affSColin Finck #define TWBT_UPCA 7 748*c2c66affSColin Finck #define TWBT_UPCE 8 749*c2c66affSColin Finck #define TWBT_EAN8 9 750*c2c66affSColin Finck #define TWBT_EAN13 10 751*c2c66affSColin Finck #define TWBT_POSTNET 11 752*c2c66affSColin Finck #define TWBT_PDF417 12 753*c2c66affSColin Finck /* Added 1.8 */ 754*c2c66affSColin Finck #define TWBT_2OF5INDUSTRIAL 13 755*c2c66affSColin Finck #define TWBT_2OF5MATRIX 14 756*c2c66affSColin Finck #define TWBT_2OF5DATALOGIC 15 757*c2c66affSColin Finck #define TWBT_2OF5IATA 16 758*c2c66affSColin Finck #define TWBT_3OF9FULLASCII 17 759*c2c66affSColin Finck #define TWBT_CODABARWITHSTARTSTOP 18 760*c2c66affSColin Finck #define TWBT_MAXICODE 19 761*c2c66affSColin Finck 762*c2c66affSColin Finck /* Added 1.7 */ 763*c2c66affSColin Finck /* TWEI_DESKEWSTATUS values */ 764*c2c66affSColin Finck #define TWDSK_SUCCESS 0 765*c2c66affSColin Finck #define TWDSK_REPORTONLY 1 766*c2c66affSColin Finck #define TWDSK_FAIL 2 767*c2c66affSColin Finck #define TWDSK_DISABLED 3 768*c2c66affSColin Finck 769*c2c66affSColin Finck /* Added 1.7 */ 770*c2c66affSColin Finck /* TWEI_PATCHCODE values */ 771*c2c66affSColin Finck #define TWPCH_PATCH1 0 772*c2c66affSColin Finck #define TWPCH_PATCH2 1 773*c2c66affSColin Finck #define TWPCH_PATCH3 2 774*c2c66affSColin Finck #define TWPCH_PATCH4 3 775*c2c66affSColin Finck #define TWPCH_PATCH6 4 776*c2c66affSColin Finck #define TWPCH_PATCHT 5 777*c2c66affSColin Finck 778*c2c66affSColin Finck /* Added 1.7 */ 779*c2c66affSColin Finck /* CAP_JOBCONTROL values */ 780*c2c66affSColin Finck #define TWJC_NONE 0 781*c2c66affSColin Finck #define TWJC_JSIC 1 782*c2c66affSColin Finck #define TWJC_JSIS 2 783*c2c66affSColin Finck #define TWJC_JSXC 3 784*c2c66affSColin Finck #define TWJC_JSXS 4 785*c2c66affSColin Finck 786*c2c66affSColin Finck /* Added 1.7 */ 787*c2c66affSColin Finck /* TWEI_BARCODEROTATION values (BCOR_ means barcode rotation) */ 788*c2c66affSColin Finck #define TWBCOR_ROT0 0 789*c2c66affSColin Finck #define TWBCOR_ROT90 1 790*c2c66affSColin Finck #define TWBCOR_ROT180 2 791*c2c66affSColin Finck #define TWBCOR_ROT270 3 792*c2c66affSColin Finck #define TWBCOR_ROTX 4 793*c2c66affSColin Finck 794*c2c66affSColin Finck /* Added 1.8 */ 795*c2c66affSColin Finck /* ACAP_AUDIOFILEFORMAT values (AF_ means audio format) */ 796*c2c66affSColin Finck #define TWAF_WAV 0 797*c2c66affSColin Finck #define TWAF_AIFF 1 798*c2c66affSColin Finck #define TWAF_AU 3 799*c2c66affSColin Finck #define TWAF_SND 4 800*c2c66affSColin Finck 801*c2c66affSColin Finck /* CAP_ALARMS values (AL_ means alarms) */ 802*c2c66affSColin Finck #define TWAL_ALARM 0 803*c2c66affSColin Finck #define TWAL_FEEDERERROR 1 804*c2c66affSColin Finck #define TWAL_FEEDERWARNING 2 805*c2c66affSColin Finck #define TWAL_BARCODE 3 806*c2c66affSColin Finck #define TWAL_DOUBLEFEED 4 807*c2c66affSColin Finck #define TWAL_JAM 5 808*c2c66affSColin Finck #define TWAL_PATCHCODE 6 809*c2c66affSColin Finck #define TWAL_POWER 7 810*c2c66affSColin Finck #define TWAL_SKEW 8 811*c2c66affSColin Finck 812*c2c66affSColin Finck /* CAP_CLEARBUFFERS values (CB_ means clear buffers) */ 813*c2c66affSColin Finck #define TWCB_AUTO 0 814*c2c66affSColin Finck #define TWCB_CLEAR 1 815*c2c66affSColin Finck #define TWCB_NOCLEAR 2 816*c2c66affSColin Finck 817*c2c66affSColin Finck /* CAP_DEVICEEVENT values (DE_ means device event) */ 818*c2c66affSColin Finck #define TWDE_CUSTOMEVENTS 0x8000 819*c2c66affSColin Finck #define TWDE_CHECKAUTOMATICCAPTURE 0 820*c2c66affSColin Finck #define TWDE_CHECKBATTERY 1 821*c2c66affSColin Finck #define TWDE_CHECKDEVICEONLINE 2 822*c2c66affSColin Finck #define TWDE_CHECKFLASH 3 823*c2c66affSColin Finck #define TWDE_CHECKPOWERSUPPLY 4 824*c2c66affSColin Finck #define TWDE_CHECKRESOLUTION 5 825*c2c66affSColin Finck #define TWDE_DEVICEADDED 6 826*c2c66affSColin Finck #define TWDE_DEVICEOFFLINE 7 827*c2c66affSColin Finck #define TWDE_DEVICEREADY 8 828*c2c66affSColin Finck #define TWDE_DEVICEREMOVED 9 829*c2c66affSColin Finck #define TWDE_IMAGECAPTURED 10 830*c2c66affSColin Finck #define TWDE_IMAGEDELETED 11 831*c2c66affSColin Finck #define TWDE_PAPERDOUBLEFEED 12 832*c2c66affSColin Finck #define TWDE_PAPERJAM 13 833*c2c66affSColin Finck #define TWDE_LAMPFAILURE 14 834*c2c66affSColin Finck #define TWDE_POWERSAVE 15 835*c2c66affSColin Finck #define TWDE_POWERSAVENOTIFY 16 836*c2c66affSColin Finck 837*c2c66affSColin Finck /* CAP_FEEDERALIGNMENT values (FA_ means feeder alignment) */ 838*c2c66affSColin Finck #define TWFA_NONE 0 839*c2c66affSColin Finck #define TWFA_LEFT 1 840*c2c66affSColin Finck #define TWFA_CENTER 2 841*c2c66affSColin Finck #define TWFA_RIGHT 3 842*c2c66affSColin Finck 843*c2c66affSColin Finck /* CAP_FEEDERORDER values (FO_ means feeder order) */ 844*c2c66affSColin Finck #define TWFO_FIRSTPAGEFIRST 0 845*c2c66affSColin Finck #define TWFO_LASTPAGEFIRST 1 846*c2c66affSColin Finck 847*c2c66affSColin Finck /* CAP_FILESYSTEM values (FS_ means file system) */ 848*c2c66affSColin Finck #define TWFS_FILESYSTEM 0 849*c2c66affSColin Finck #define TWFS_RECURSIVEDELETE 1 850*c2c66affSColin Finck 851*c2c66affSColin Finck /* CAP_POWERSUPPLY values (PS_ means power supply) */ 852*c2c66affSColin Finck #define TWPS_EXTERNAL 0 853*c2c66affSColin Finck #define TWPS_BATTERY 1 854*c2c66affSColin Finck 855*c2c66affSColin Finck /* CAP_PRINTER values (PR_ means printer) */ 856*c2c66affSColin Finck #define TWPR_IMPRINTERTOPBEFORE 0 857*c2c66affSColin Finck #define TWPR_IMPRINTERTOPAFTER 1 858*c2c66affSColin Finck #define TWPR_IMPRINTERBOTTOMBEFORE 2 859*c2c66affSColin Finck #define TWPR_IMPRINTERBOTTOMAFTER 3 860*c2c66affSColin Finck #define TWPR_ENDORSERTOPBEFORE 4 861*c2c66affSColin Finck #define TWPR_ENDORSERTOPAFTER 5 862*c2c66affSColin Finck #define TWPR_ENDORSERBOTTOMBEFORE 6 863*c2c66affSColin Finck #define TWPR_ENDORSERBOTTOMAFTER 7 864*c2c66affSColin Finck 865*c2c66affSColin Finck /* CAP_PRINTERMODE values (PM_ means printer mode) */ 866*c2c66affSColin Finck #define TWPM_SINGLESTRING 0 867*c2c66affSColin Finck #define TWPM_MULTISTRING 1 868*c2c66affSColin Finck #define TWPM_COMPOUNDSTRING 2 869*c2c66affSColin Finck 870*c2c66affSColin Finck /* ICAP_BARCODESEARCHMODE values (TWBD_ means search) */ 871*c2c66affSColin Finck #define TWBD_HORZ 0 872*c2c66affSColin Finck #define TWBD_VERT 1 873*c2c66affSColin Finck #define TWBD_HORZVERT 2 874*c2c66affSColin Finck #define TWBD_VERTHORZ 3 875*c2c66affSColin Finck 876*c2c66affSColin Finck /* ICAP_FLASHUSED2 values (FL_ means flash) */ 877*c2c66affSColin Finck #define TWFL_NONE 0 878*c2c66affSColin Finck #define TWFL_OFF 1 879*c2c66affSColin Finck #define TWFL_ON 2 880*c2c66affSColin Finck #define TWFL_AUTO 3 881*c2c66affSColin Finck #define TWFL_REDEYE 4 882*c2c66affSColin Finck 883*c2c66affSColin Finck /* ICAP_FLIPROTATION values (FR_ means flip rotation) */ 884*c2c66affSColin Finck #define TWFR_BOOK 0 885*c2c66affSColin Finck #define TWFR_FANFOLD 1 886*c2c66affSColin Finck 887*c2c66affSColin Finck /* ICAP_IMAGEFILTER values (IF_ means image filter) */ 888*c2c66affSColin Finck #define TWIF_NONE 0 889*c2c66affSColin Finck #define TWIF_AUTO 1 890*c2c66affSColin Finck #define TWIF_LOWPASS 2 891*c2c66affSColin Finck #define TWIF_BANDPASS 3 892*c2c66affSColin Finck #define TWIF_HIGHPASS 4 893*c2c66affSColin Finck #define TWIF_TEXT TWIF_BANDPASS 894*c2c66affSColin Finck #define TWIF_FINELINE TWIF_HIGHPASS 895*c2c66affSColin Finck 896*c2c66affSColin Finck /* ICAP_NOISEFILTER values (NF_ means noise filter) */ 897*c2c66affSColin Finck #define TWNF_NONE 0 898*c2c66affSColin Finck #define TWNF_AUTO 1 899*c2c66affSColin Finck #define TWNF_LONEPIXEL 2 900*c2c66affSColin Finck #define TWNF_MAJORITYRULE 3 901*c2c66affSColin Finck 902*c2c66affSColin Finck /* ICAP_OVERSCAN values (OV_ means overscan) */ 903*c2c66affSColin Finck #define TWOV_NONE 0 904*c2c66affSColin Finck #define TWOV_AUTO 1 905*c2c66affSColin Finck #define TWOV_TOPBOTTOM 2 906*c2c66affSColin Finck #define TWOV_LEFTRIGHT 3 907*c2c66affSColin Finck #define TWOV_ALL 4 908*c2c66affSColin Finck 909*c2c66affSColin Finck /* TW_FILESYSTEM.FileType values (FT_ means file type) */ 910*c2c66affSColin Finck #define TWFY_CAMERA 0 911*c2c66affSColin Finck #define TWFY_CAMERATOP 1 912*c2c66affSColin Finck #define TWFY_CAMERABOTTOM 2 913*c2c66affSColin Finck #define TWFY_CAMERAPREVIEW 3 914*c2c66affSColin Finck #define TWFY_DOMAIN 4 915*c2c66affSColin Finck #define TWFY_HOST 5 916*c2c66affSColin Finck #define TWFY_DIRECTORY 6 917*c2c66affSColin Finck #define TWFY_IMAGE 7 918*c2c66affSColin Finck #define TWFY_UNKNOWN 8 919*c2c66affSColin Finck 920*c2c66affSColin Finck /**************************************************************************** 921*c2c66affSColin Finck * Country Constants * 922*c2c66affSColin Finck ****************************************************************************/ 923*c2c66affSColin Finck 924*c2c66affSColin Finck #define TWCY_AFGHANISTAN 1001 925*c2c66affSColin Finck #define TWCY_ALGERIA 213 926*c2c66affSColin Finck #define TWCY_AMERICANSAMOA 684 927*c2c66affSColin Finck #define TWCY_ANDORRA 033 928*c2c66affSColin Finck #define TWCY_ANGOLA 1002 929*c2c66affSColin Finck #define TWCY_ANGUILLA 8090 930*c2c66affSColin Finck #define TWCY_ANTIGUA 8091 931*c2c66affSColin Finck #define TWCY_ARGENTINA 54 932*c2c66affSColin Finck #define TWCY_ARUBA 297 933*c2c66affSColin Finck #define TWCY_ASCENSIONI 247 934*c2c66affSColin Finck #define TWCY_AUSTRALIA 61 935*c2c66affSColin Finck #define TWCY_AUSTRIA 43 936*c2c66affSColin Finck #define TWCY_BAHAMAS 8092 937*c2c66affSColin Finck #define TWCY_BAHRAIN 973 938*c2c66affSColin Finck #define TWCY_BANGLADESH 880 939*c2c66affSColin Finck #define TWCY_BARBADOS 8093 940*c2c66affSColin Finck #define TWCY_BELGIUM 32 941*c2c66affSColin Finck #define TWCY_BELIZE 501 942*c2c66affSColin Finck #define TWCY_BENIN 229 943*c2c66affSColin Finck #define TWCY_BERMUDA 8094 944*c2c66affSColin Finck #define TWCY_BHUTAN 1003 945*c2c66affSColin Finck #define TWCY_BOLIVIA 591 946*c2c66affSColin Finck #define TWCY_BOTSWANA 267 947*c2c66affSColin Finck #define TWCY_BRITAIN 6 948*c2c66affSColin Finck #define TWCY_BRITVIRGINIS 8095 949*c2c66affSColin Finck #define TWCY_BRAZIL 55 950*c2c66affSColin Finck #define TWCY_BRUNEI 673 951*c2c66affSColin Finck #define TWCY_BULGARIA 359 952*c2c66affSColin Finck #define TWCY_BURKINAFASO 1004 953*c2c66affSColin Finck #define TWCY_BURMA 1005 954*c2c66affSColin Finck #define TWCY_BURUNDI 1006 955*c2c66affSColin Finck #define TWCY_CAMAROON 237 956*c2c66affSColin Finck #define TWCY_CANADA 2 957*c2c66affSColin Finck #define TWCY_CAPEVERDEIS 238 958*c2c66affSColin Finck #define TWCY_CAYMANIS 8096 959*c2c66affSColin Finck #define TWCY_CENTRALAFREP 1007 960*c2c66affSColin Finck #define TWCY_CHAD 1008 961*c2c66affSColin Finck #define TWCY_CHILE 56 962*c2c66affSColin Finck #define TWCY_CHINA 86 963*c2c66affSColin Finck #define TWCY_CHRISTMASIS 1009 964*c2c66affSColin Finck #define TWCY_COCOSIS 1009 965*c2c66affSColin Finck #define TWCY_COLOMBIA 57 966*c2c66affSColin Finck #define TWCY_COMOROS 1010 967*c2c66affSColin Finck #define TWCY_CONGO 1011 968*c2c66affSColin Finck #define TWCY_COOKIS 1012 969*c2c66affSColin Finck #define TWCY_COSTARICA 506 970*c2c66affSColin Finck #define TWCY_CUBA 005 971*c2c66affSColin Finck #define TWCY_CYPRUS 357 972*c2c66affSColin Finck #define TWCY_CZECHOSLOVAKIA 42 973*c2c66affSColin Finck #define TWCY_DENMARK 45 974*c2c66affSColin Finck #define TWCY_DJIBOUTI 1013 975*c2c66affSColin Finck #define TWCY_DOMINICA 8097 976*c2c66affSColin Finck #define TWCY_DOMINCANREP 8098 977*c2c66affSColin Finck #define TWCY_EASTERIS 1014 978*c2c66affSColin Finck #define TWCY_ECUADOR 593 979*c2c66affSColin Finck #define TWCY_EGYPT 20 980*c2c66affSColin Finck #define TWCY_ELSALVADOR 503 981*c2c66affSColin Finck #define TWCY_EQGUINEA 1015 982*c2c66affSColin Finck #define TWCY_ETHIOPIA 251 983*c2c66affSColin Finck #define TWCY_FALKLANDIS 1016 984*c2c66affSColin Finck #define TWCY_FAEROEIS 298 985*c2c66affSColin Finck #define TWCY_FIJIISLANDS 679 986*c2c66affSColin Finck #define TWCY_FINLAND 358 987*c2c66affSColin Finck #define TWCY_FRANCE 33 988*c2c66affSColin Finck #define TWCY_FRANTILLES 596 989*c2c66affSColin Finck #define TWCY_FRGUIANA 594 990*c2c66affSColin Finck #define TWCY_FRPOLYNEISA 689 991*c2c66affSColin Finck #define TWCY_FUTANAIS 1043 992*c2c66affSColin Finck #define TWCY_GABON 241 993*c2c66affSColin Finck #define TWCY_GAMBIA 220 994*c2c66affSColin Finck #define TWCY_GERMANY 49 995*c2c66affSColin Finck #define TWCY_GHANA 233 996*c2c66affSColin Finck #define TWCY_GIBRALTER 350 997*c2c66affSColin Finck #define TWCY_GREECE 30 998*c2c66affSColin Finck #define TWCY_GREENLAND 299 999*c2c66affSColin Finck #define TWCY_GRENADA 8099 1000*c2c66affSColin Finck #define TWCY_GRENEDINES 8015 1001*c2c66affSColin Finck #define TWCY_GUADELOUPE 590 1002*c2c66affSColin Finck #define TWCY_GUAM 671 1003*c2c66affSColin Finck #define TWCY_GUANTANAMOBAY 5399 1004*c2c66affSColin Finck #define TWCY_GUATEMALA 502 1005*c2c66affSColin Finck #define TWCY_GUINEA 224 1006*c2c66affSColin Finck #define TWCY_GUINEABISSAU 1017 1007*c2c66affSColin Finck #define TWCY_GUYANA 592 1008*c2c66affSColin Finck #define TWCY_HAITI 509 1009*c2c66affSColin Finck #define TWCY_HONDURAS 504 1010*c2c66affSColin Finck #define TWCY_HONGKONG 852 1011*c2c66affSColin Finck #define TWCY_HUNGARY 36 1012*c2c66affSColin Finck #define TWCY_ICELAND 354 1013*c2c66affSColin Finck #define TWCY_INDIA 91 1014*c2c66affSColin Finck #define TWCY_INDONESIA 62 1015*c2c66affSColin Finck #define TWCY_IRAN 98 1016*c2c66affSColin Finck #define TWCY_IRAQ 964 1017*c2c66affSColin Finck #define TWCY_IRELAND 353 1018*c2c66affSColin Finck #define TWCY_ISRAEL 972 1019*c2c66affSColin Finck #define TWCY_ITALY 39 1020*c2c66affSColin Finck #define TWCY_IVORYCOAST 225 1021*c2c66affSColin Finck #define TWCY_JAMAICA 8010 1022*c2c66affSColin Finck #define TWCY_JAPAN 81 1023*c2c66affSColin Finck #define TWCY_JORDAN 962 1024*c2c66affSColin Finck #define TWCY_KENYA 254 1025*c2c66affSColin Finck #define TWCY_KIRIBATI 1018 1026*c2c66affSColin Finck #define TWCY_KOREA 82 1027*c2c66affSColin Finck #define TWCY_KUWAIT 965 1028*c2c66affSColin Finck #define TWCY_LAOS 1019 1029*c2c66affSColin Finck #define TWCY_LEBANON 1020 1030*c2c66affSColin Finck #define TWCY_LIBERIA 231 1031*c2c66affSColin Finck #define TWCY_LIBYA 218 1032*c2c66affSColin Finck #define TWCY_LIECHTENSTEIN 41 1033*c2c66affSColin Finck #define TWCY_LUXENBOURG 352 1034*c2c66affSColin Finck #define TWCY_MACAO 853 1035*c2c66affSColin Finck #define TWCY_MADAGASCAR 1021 1036*c2c66affSColin Finck #define TWCY_MALAWI 265 1037*c2c66affSColin Finck #define TWCY_MALAYSIA 60 1038*c2c66affSColin Finck #define TWCY_MALDIVES 960 1039*c2c66affSColin Finck #define TWCY_MALI 1022 1040*c2c66affSColin Finck #define TWCY_MALTA 356 1041*c2c66affSColin Finck #define TWCY_MARSHALLIS 692 1042*c2c66affSColin Finck #define TWCY_MAURITANIA 1023 1043*c2c66affSColin Finck #define TWCY_MAURITIUS 230 1044*c2c66affSColin Finck #define TWCY_MEXICO 3 1045*c2c66affSColin Finck #define TWCY_MICRONESIA 691 1046*c2c66affSColin Finck #define TWCY_MIQUELON 508 1047*c2c66affSColin Finck #define TWCY_MONACO 33 1048*c2c66affSColin Finck #define TWCY_MONGOLIA 1024 1049*c2c66affSColin Finck #define TWCY_MONTSERRAT 8011 1050*c2c66affSColin Finck #define TWCY_MOROCCO 212 1051*c2c66affSColin Finck #define TWCY_MOZAMBIQUE 1025 1052*c2c66affSColin Finck #define TWCY_NAMIBIA 264 1053*c2c66affSColin Finck #define TWCY_NAURU 1026 1054*c2c66affSColin Finck #define TWCY_NEPAL 977 1055*c2c66affSColin Finck #define TWCY_NETHERLANDS 31 1056*c2c66affSColin Finck #define TWCY_NETHANTILLES 599 1057*c2c66affSColin Finck #define TWCY_NEVIS 8012 1058*c2c66affSColin Finck #define TWCY_NEWCALEDONIA 687 1059*c2c66affSColin Finck #define TWCY_NEWZEALAND 64 1060*c2c66affSColin Finck #define TWCY_NICARAGUA 505 1061*c2c66affSColin Finck #define TWCY_NIGER 227 1062*c2c66affSColin Finck #define TWCY_NIGERIA 234 1063*c2c66affSColin Finck #define TWCY_NIUE 1027 1064*c2c66affSColin Finck #define TWCY_NORFOLKI 1028 1065*c2c66affSColin Finck #define TWCY_NORWAY 47 1066*c2c66affSColin Finck #define TWCY_OMAN 968 1067*c2c66affSColin Finck #define TWCY_PAKISTAN 92 1068*c2c66affSColin Finck #define TWCY_PALAU 1029 1069*c2c66affSColin Finck #define TWCY_PANAMA 507 1070*c2c66affSColin Finck #define TWCY_PARAGUAY 595 1071*c2c66affSColin Finck #define TWCY_PERU 51 1072*c2c66affSColin Finck #define TWCY_PHILLIPPINES 63 1073*c2c66affSColin Finck #define TWCY_PITCAIRNIS 1030 1074*c2c66affSColin Finck #define TWCY_PNEWGUINEA 675 1075*c2c66affSColin Finck #define TWCY_POLAND 48 1076*c2c66affSColin Finck #define TWCY_PORTUGAL 351 1077*c2c66affSColin Finck #define TWCY_QATAR 974 1078*c2c66affSColin Finck #define TWCY_REUNIONI 1031 1079*c2c66affSColin Finck #define TWCY_ROMANIA 40 1080*c2c66affSColin Finck #define TWCY_RWANDA 250 1081*c2c66affSColin Finck #define TWCY_SAIPAN 670 1082*c2c66affSColin Finck #define TWCY_SANMARINO 39 1083*c2c66affSColin Finck #define TWCY_SAOTOME 1033 1084*c2c66affSColin Finck #define TWCY_SAUDIARABIA 966 1085*c2c66affSColin Finck #define TWCY_SENEGAL 221 1086*c2c66affSColin Finck #define TWCY_SEYCHELLESIS 1034 1087*c2c66affSColin Finck #define TWCY_SIERRALEONE 1035 1088*c2c66affSColin Finck #define TWCY_SINGAPORE 65 1089*c2c66affSColin Finck #define TWCY_SOLOMONIS 1036 1090*c2c66affSColin Finck #define TWCY_SOMALI 1037 1091*c2c66affSColin Finck #define TWCY_SOUTHAFRICA 27 1092*c2c66affSColin Finck #define TWCY_SPAIN 34 1093*c2c66affSColin Finck #define TWCY_SRILANKA 94 1094*c2c66affSColin Finck #define TWCY_STHELENA 1032 1095*c2c66affSColin Finck #define TWCY_STKITTS 8013 1096*c2c66affSColin Finck #define TWCY_STLUCIA 8014 1097*c2c66affSColin Finck #define TWCY_STPIERRE 508 1098*c2c66affSColin Finck #define TWCY_STVINCENT 8015 1099*c2c66affSColin Finck #define TWCY_SUDAN 1038 1100*c2c66affSColin Finck #define TWCY_SURINAME 597 1101*c2c66affSColin Finck #define TWCY_SWAZILAND 268 1102*c2c66affSColin Finck #define TWCY_SWEDEN 46 1103*c2c66affSColin Finck #define TWCY_SWITZERLAND 41 1104*c2c66affSColin Finck #define TWCY_SYRIA 1039 1105*c2c66affSColin Finck #define TWCY_TAIWAN 886 1106*c2c66affSColin Finck #define TWCY_TANZANIA 255 1107*c2c66affSColin Finck #define TWCY_THAILAND 66 1108*c2c66affSColin Finck #define TWCY_TOBAGO 8016 1109*c2c66affSColin Finck #define TWCY_TOGO 228 1110*c2c66affSColin Finck #define TWCY_TONGAIS 676 1111*c2c66affSColin Finck #define TWCY_TRINIDAD 8016 1112*c2c66affSColin Finck #define TWCY_TUNISIA 216 1113*c2c66affSColin Finck #define TWCY_TURKEY 90 1114*c2c66affSColin Finck #define TWCY_TURKSCAICOS 8017 1115*c2c66affSColin Finck #define TWCY_TUVALU 1040 1116*c2c66affSColin Finck #define TWCY_UGANDA 256 1117*c2c66affSColin Finck #define TWCY_USSR 7 1118*c2c66affSColin Finck #define TWCY_UAEMIRATES 971 1119*c2c66affSColin Finck #define TWCY_UNITEDKINGDOM 44 1120*c2c66affSColin Finck #define TWCY_USA 1 1121*c2c66affSColin Finck #define TWCY_URUGUAY 598 1122*c2c66affSColin Finck #define TWCY_VANUATU 1041 1123*c2c66affSColin Finck #define TWCY_VATICANCITY 39 1124*c2c66affSColin Finck #define TWCY_VENEZUELA 58 1125*c2c66affSColin Finck #define TWCY_WAKE 1042 1126*c2c66affSColin Finck #define TWCY_WALLISIS 1043 1127*c2c66affSColin Finck #define TWCY_WESTERNSAHARA 1044 1128*c2c66affSColin Finck #define TWCY_WESTERNSAMOA 1045 1129*c2c66affSColin Finck #define TWCY_YEMEN 1046 1130*c2c66affSColin Finck #define TWCY_YUGOSLAVIA 38 1131*c2c66affSColin Finck #define TWCY_ZAIRE 243 1132*c2c66affSColin Finck #define TWCY_ZAMBIA 260 1133*c2c66affSColin Finck #define TWCY_ZIMBABWE 263 1134*c2c66affSColin Finck /* Added for 1.8 */ 1135*c2c66affSColin Finck #define TWCY_ALBANIA 355 1136*c2c66affSColin Finck #define TWCY_ARMENIA 374 1137*c2c66affSColin Finck #define TWCY_AZERBAIJAN 994 1138*c2c66affSColin Finck #define TWCY_BELARUS 375 1139*c2c66affSColin Finck #define TWCY_BOSNIAHERZGO 387 1140*c2c66affSColin Finck #define TWCY_CAMBODIA 855 1141*c2c66affSColin Finck #define TWCY_CROATIA 385 1142*c2c66affSColin Finck #define TWCY_CZECHREPUBLIC 420 1143*c2c66affSColin Finck #define TWCY_DIEGOGARCIA 246 1144*c2c66affSColin Finck #define TWCY_ERITREA 291 1145*c2c66affSColin Finck #define TWCY_ESTONIA 372 1146*c2c66affSColin Finck #define TWCY_GEORGIA 995 1147*c2c66affSColin Finck #define TWCY_LATVIA 371 1148*c2c66affSColin Finck #define TWCY_LESOTHO 266 1149*c2c66affSColin Finck #define TWCY_LITHUANIA 370 1150*c2c66affSColin Finck #define TWCY_MACEDONIA 389 1151*c2c66affSColin Finck #define TWCY_MAYOTTEIS 269 1152*c2c66affSColin Finck #define TWCY_MOLDOVA 373 1153*c2c66affSColin Finck #define TWCY_MYANMAR 95 1154*c2c66affSColin Finck #define TWCY_NORTHKOREA 850 1155*c2c66affSColin Finck #define TWCY_PUERTORICO 787 1156*c2c66affSColin Finck #define TWCY_RUSSIA 7 1157*c2c66affSColin Finck #define TWCY_SERBIA 381 1158*c2c66affSColin Finck #define TWCY_SLOVAKIA 421 1159*c2c66affSColin Finck #define TWCY_SLOVENIA 386 1160*c2c66affSColin Finck #define TWCY_SOUTHKOREA 82 1161*c2c66affSColin Finck #define TWCY_UKRAINE 380 1162*c2c66affSColin Finck #define TWCY_USVIRGINIS 340 1163*c2c66affSColin Finck #define TWCY_VIETNAM 84 1164*c2c66affSColin Finck 1165*c2c66affSColin Finck /**************************************************************************** 1166*c2c66affSColin Finck * Language Constants * 1167*c2c66affSColin Finck ****************************************************************************/ 1168*c2c66affSColin Finck 1169*c2c66affSColin Finck #define TWLG_DAN 0 /* Danish */ 1170*c2c66affSColin Finck #define TWLG_DUT 1 /* Dutch */ 1171*c2c66affSColin Finck #define TWLG_ENG 2 /* International English */ 1172*c2c66affSColin Finck #define TWLG_FCF 3 /* French Canadian */ 1173*c2c66affSColin Finck #define TWLG_FIN 4 /* Finnish */ 1174*c2c66affSColin Finck #define TWLG_FRN 5 /* French */ 1175*c2c66affSColin Finck #define TWLG_GER 6 /* German */ 1176*c2c66affSColin Finck #define TWLG_ICE 7 /* Icelandic */ 1177*c2c66affSColin Finck #define TWLG_ITN 8 /* Italian */ 1178*c2c66affSColin Finck #define TWLG_NOR 9 /* Norwegian */ 1179*c2c66affSColin Finck #define TWLG_POR 10 /* Portuguese */ 1180*c2c66affSColin Finck #define TWLG_SPA 11 /* Spanish */ 1181*c2c66affSColin Finck #define TWLG_SWE 12 /* Swedish */ 1182*c2c66affSColin Finck #define TWLG_USA 13 /* U.S. English */ 1183*c2c66affSColin Finck /* Added for 1.8 */ 1184*c2c66affSColin Finck #define TWLG_USERLOCALE -1 1185*c2c66affSColin Finck #define TWLG_AFRIKAANS 14 1186*c2c66affSColin Finck #define TWLG_ALBANIA 15 1187*c2c66affSColin Finck #define TWLG_ARABIC 16 1188*c2c66affSColin Finck #define TWLG_ARABIC_ALGERIA 17 1189*c2c66affSColin Finck #define TWLG_ARABIC_BAHRAIN 18 1190*c2c66affSColin Finck #define TWLG_ARABIC_EGYPT 19 1191*c2c66affSColin Finck #define TWLG_ARABIC_IRAQ 20 1192*c2c66affSColin Finck #define TWLG_ARABIC_JORDAN 21 1193*c2c66affSColin Finck #define TWLG_ARABIC_KUWAIT 22 1194*c2c66affSColin Finck #define TWLG_ARABIC_LEBANON 23 1195*c2c66affSColin Finck #define TWLG_ARABIC_LIBYA 24 1196*c2c66affSColin Finck #define TWLG_ARABIC_MOROCCO 25 1197*c2c66affSColin Finck #define TWLG_ARABIC_OMAN 26 1198*c2c66affSColin Finck #define TWLG_ARABIC_QATAR 27 1199*c2c66affSColin Finck #define TWLG_ARABIC_SAUDIARABIA 28 1200*c2c66affSColin Finck #define TWLG_ARABIC_SYRIA 29 1201*c2c66affSColin Finck #define TWLG_ARABIC_TUNISIA 30 1202*c2c66affSColin Finck #define TWLG_ARABIC_UAE 31 /* United Arabic Emirates */ 1203*c2c66affSColin Finck #define TWLG_ARABIC_YEMEN 32 1204*c2c66affSColin Finck #define TWLG_BASQUE 33 1205*c2c66affSColin Finck #define TWLG_BYELORUSSIAN 34 1206*c2c66affSColin Finck #define TWLG_BULGARIAN 35 1207*c2c66affSColin Finck #define TWLG_CATALAN 36 1208*c2c66affSColin Finck #define TWLG_CHINESE 37 1209*c2c66affSColin Finck #define TWLG_CHINESE_HONGKONG 38 1210*c2c66affSColin Finck #define TWLG_CHINESE_PRC 39 /* People's Republic of China */ 1211*c2c66affSColin Finck #define TWLG_CHINESE_SINGAPORE 40 1212*c2c66affSColin Finck #define TWLG_CHINESE_SIMPLIFIED 41 1213*c2c66affSColin Finck #define TWLG_CHINESE_TAIWAN 42 1214*c2c66affSColin Finck #define TWLG_CHINESE_TRADITIONAL 43 1215*c2c66affSColin Finck #define TWLG_CROATIA 44 1216*c2c66affSColin Finck #define TWLG_CZECH 45 1217*c2c66affSColin Finck #define TWLG_DANISH TWLG_DAN 1218*c2c66affSColin Finck #define TWLG_DUTCH TWLG_DUT 1219*c2c66affSColin Finck #define TWLG_DUTCH_BELGIAN 46 1220*c2c66affSColin Finck #define TWLG_ENGLISH TWLG_ENG 1221*c2c66affSColin Finck #define TWLG_ENGLISH_AUSTRALIAN 47 1222*c2c66affSColin Finck #define TWLG_ENGLISH_CANADIAN 48 1223*c2c66affSColin Finck #define TWLG_ENGLISH_IRELAND 49 1224*c2c66affSColin Finck #define TWLG_ENGLISH_NEWZEALAND 50 1225*c2c66affSColin Finck #define TWLG_ENGLISH_SOUTHAFRICA 51 1226*c2c66affSColin Finck #define TWLG_ENGLISH_UK 52 1227*c2c66affSColin Finck #define TWLG_ENGLISH_USA TWLG_USA 1228*c2c66affSColin Finck #define TWLG_ESTONIAN 53 1229*c2c66affSColin Finck #define TWLG_FAEROESE 54 1230*c2c66affSColin Finck #define TWLG_FARSI 55 1231*c2c66affSColin Finck #define TWLG_FINNISH TWLG_FIN 1232*c2c66affSColin Finck #define TWLG_FRENCH TWLG_FRN 1233*c2c66affSColin Finck #define TWLG_FRENCH_BELGIAN 56 1234*c2c66affSColin Finck #define TWLG_FRENCH_CANADIAN TWLG_FCF 1235*c2c66affSColin Finck #define TWLG_FRENCH_LUXEMBOURG 57 1236*c2c66affSColin Finck #define TWLG_FRENCH_SWISS 58 1237*c2c66affSColin Finck #define TWLG_GERMAN TWLG_GER 1238*c2c66affSColin Finck #define TWLG_GERMAN_AUSTRIAN 59 1239*c2c66affSColin Finck #define TWLG_GERMAN_LUXEMBOURG 60 1240*c2c66affSColin Finck #define TWLG_GERMAN_LIECHTENSTEIN 61 1241*c2c66affSColin Finck #define TWLG_GERMAN_SWISS 62 1242*c2c66affSColin Finck #define TWLG_GREEK 63 1243*c2c66affSColin Finck #define TWLG_HEBREW 64 1244*c2c66affSColin Finck #define TWLG_HUNGARIAN 65 1245*c2c66affSColin Finck #define TWLG_ICELANDIC TWLG_ICE 1246*c2c66affSColin Finck #define TWLG_INDONESIAN 66 1247*c2c66affSColin Finck #define TWLG_ITALIAN TWLG_ITN 1248*c2c66affSColin Finck #define TWLG_ITALIAN_SWISS 67 1249*c2c66affSColin Finck #define TWLG_JAPANESE 68 1250*c2c66affSColin Finck #define TWLG_KOREAN 69 1251*c2c66affSColin Finck #define TWLG_KOREAN_JOHAB 70 1252*c2c66affSColin Finck #define TWLG_LATVIAN 71 1253*c2c66affSColin Finck #define TWLG_LITHUANIAN 72 1254*c2c66affSColin Finck #define TWLG_NORWEGIAN TWLG_NOR 1255*c2c66affSColin Finck #define TWLG_NORWEGIAN_BOKMAL 73 1256*c2c66affSColin Finck #define TWLG_NORWEGIAN_NYNORSK 74 1257*c2c66affSColin Finck #define TWLG_POLISH 75 1258*c2c66affSColin Finck #define TWLG_PORTUGUESE TWLG_POR 1259*c2c66affSColin Finck #define TWLG_PORTUGUESE_BRAZIL 76 1260*c2c66affSColin Finck #define TWLG_ROMANIAN 77 1261*c2c66affSColin Finck #define TWLG_RUSSIAN 78 1262*c2c66affSColin Finck #define TWLG_SERBIAN_LATIN 79 1263*c2c66affSColin Finck #define TWLG_SLOVAK 80 1264*c2c66affSColin Finck #define TWLG_SLOVENIAN 81 1265*c2c66affSColin Finck #define TWLG_SPANISH TWLG_SPA 1266*c2c66affSColin Finck #define TWLG_SPANISH_MEXICAN 82 1267*c2c66affSColin Finck #define TWLG_SPANISH_MODERN 83 1268*c2c66affSColin Finck #define TWLG_SWEDISH TWLG_SWE 1269*c2c66affSColin Finck #define TWLG_THAI 84 1270*c2c66affSColin Finck #define TWLG_TURKISH 85 1271*c2c66affSColin Finck #define TWLG_UKRANIAN 86 1272*c2c66affSColin Finck /* More stuff added for 1.8 */ 1273*c2c66affSColin Finck #define TWLG_ASSAMESE 87 1274*c2c66affSColin Finck #define TWLG_BENGALI 88 1275*c2c66affSColin Finck #define TWLG_BIHARI 89 1276*c2c66affSColin Finck #define TWLG_BODO 90 1277*c2c66affSColin Finck #define TWLG_DOGRI 91 1278*c2c66affSColin Finck #define TWLG_GUJARATI 92 1279*c2c66affSColin Finck #define TWLG_HARYANVI 93 1280*c2c66affSColin Finck #define TWLG_HINDI 94 1281*c2c66affSColin Finck #define TWLG_KANNADA 95 1282*c2c66affSColin Finck #define TWLG_KASHMIRI 96 1283*c2c66affSColin Finck #define TWLG_MALAYALAM 97 1284*c2c66affSColin Finck #define TWLG_MARATHI 98 1285*c2c66affSColin Finck #define TWLG_MARWARI 99 1286*c2c66affSColin Finck #define TWLG_MEGHALAYAN 100 1287*c2c66affSColin Finck #define TWLG_MIZO 101 1288*c2c66affSColin Finck #define TWLG_NAGA 102 1289*c2c66affSColin Finck #define TWLG_ORISSI 103 1290*c2c66affSColin Finck #define TWLG_PUNJABI 104 1291*c2c66affSColin Finck #define TWLG_PUSHTU 105 1292*c2c66affSColin Finck #define TWLG_SERBIAN_CYRILLIC 106 1293*c2c66affSColin Finck #define TWLG_SIKKIMI 107 1294*c2c66affSColin Finck #define TWLG_SWEDISH_FINLAND 108 1295*c2c66affSColin Finck #define TWLG_TAMIL 109 1296*c2c66affSColin Finck #define TWLG_TELUGU 110 1297*c2c66affSColin Finck #define TWLG_TRIPURI 111 1298*c2c66affSColin Finck #define TWLG_URDU 112 1299*c2c66affSColin Finck #define TWLG_VIETNAMESE 113 1300*c2c66affSColin Finck 1301*c2c66affSColin Finck /**************************************************************************** 1302*c2c66affSColin Finck * Data Groups * 1303*c2c66affSColin Finck ****************************************************************************/ 1304*c2c66affSColin Finck 1305*c2c66affSColin Finck /* More Data Groups may be added in the future. 1306*c2c66affSColin Finck * Possible candidates include text, vector graphics, sound, etc. 1307*c2c66affSColin Finck * NOTE: Data Group constants must be powers of 2 as they are used 1308*c2c66affSColin Finck * as bitflags when Application asks DSM to present a list of DSs. 1309*c2c66affSColin Finck */ 1310*c2c66affSColin Finck 1311*c2c66affSColin Finck #define DG_CONTROL 0x0001L /* data pertaining to control */ 1312*c2c66affSColin Finck #define DG_IMAGE 0x0002L /* data pertaining to raster images */ 1313*c2c66affSColin Finck /* Added 1.8 */ 1314*c2c66affSColin Finck #define DG_AUDIO 0x0004L /* data pertaining to audio */ 1315*c2c66affSColin Finck 1316*c2c66affSColin Finck /**************************************************************************** 1317*c2c66affSColin Finck * Data Argument Types * 1318*c2c66affSColin Finck ****************************************************************************/ 1319*c2c66affSColin Finck 1320*c2c66affSColin Finck /* SDH - 03/23/95 - WATCH */ 1321*c2c66affSColin Finck /* The thunker requires knowledge about size of data being passed in the */ 1322*c2c66affSColin Finck /* lpData parameter to DS_Entry (which is not readily available due to */ 1323*c2c66affSColin Finck /* type LPVOID. Thus, we key off the DAT_ argument to determine the size. */ 1324*c2c66affSColin Finck /* This has a couple implications: */ 1325*c2c66affSColin Finck /* 1) Any additional DAT_ features require modifications to the thunk code */ 1326*c2c66affSColin Finck /* for thunker support. */ 1327*c2c66affSColin Finck /* 2) Any applications which use the custom capabilities are not supported */ 1328*c2c66affSColin Finck /* under thunking since we have no way of knowing what size data (if */ 1329*c2c66affSColin Finck /* any) is being passed. */ 1330*c2c66affSColin Finck 1331*c2c66affSColin Finck #define DAT_NULL 0x0000 /* No data or structure. */ 1332*c2c66affSColin Finck #define DAT_CUSTOMBASE 0x8000 /* Base of custom DATs. */ 1333*c2c66affSColin Finck 1334*c2c66affSColin Finck /* Data Argument Types for the DG_CONTROL Data Group. */ 1335*c2c66affSColin Finck #define DAT_CAPABILITY 0x0001 /* TW_CAPABILITY */ 1336*c2c66affSColin Finck #define DAT_EVENT 0x0002 /* TW_EVENT */ 1337*c2c66affSColin Finck #define DAT_IDENTITY 0x0003 /* TW_IDENTITY */ 1338*c2c66affSColin Finck #define DAT_PARENT 0x0004 /* TW_HANDLE, application win handle in Windows */ 1339*c2c66affSColin Finck #define DAT_PENDINGXFERS 0x0005 /* TW_PENDINGXFERS */ 1340*c2c66affSColin Finck #define DAT_SETUPMEMXFER 0x0006 /* TW_SETUPMEMXFER */ 1341*c2c66affSColin Finck #define DAT_SETUPFILEXFER 0x0007 /* TW_SETUPFILEXFER */ 1342*c2c66affSColin Finck #define DAT_STATUS 0x0008 /* TW_STATUS */ 1343*c2c66affSColin Finck #define DAT_USERINTERFACE 0x0009 /* TW_USERINTERFACE */ 1344*c2c66affSColin Finck #define DAT_XFERGROUP 0x000a /* TW_UINT32 */ 1345*c2c66affSColin Finck /* SDH - 03/21/95 - TWUNK */ 1346*c2c66affSColin Finck /* Additional message required for thunker to request the special */ 1347*c2c66affSColin Finck /* identity information. */ 1348*c2c66affSColin Finck #define DAT_TWUNKIDENTITY 0x000b /* TW_TWUNKIDENTITY */ 1349*c2c66affSColin Finck #define DAT_CUSTOMDSDATA 0x000c /* TW_CUSTOMDSDATA. */ 1350*c2c66affSColin Finck /* Added 1.8 */ 1351*c2c66affSColin Finck #define DAT_DEVICEEVENT 0x000d /* TW_DEVICEEVENT */ 1352*c2c66affSColin Finck #define DAT_FILESYSTEM 0x000e /* TW_FILESYSTEM */ 1353*c2c66affSColin Finck #define DAT_PASSTHRU 0x000f /* TW_PASSTHRU */ 1354*c2c66affSColin Finck 1355*c2c66affSColin Finck /* Data Argument Types for the DG_IMAGE Data Group. */ 1356*c2c66affSColin Finck #define DAT_IMAGEINFO 0x0101 /* TW_IMAGEINFO */ 1357*c2c66affSColin Finck #define DAT_IMAGELAYOUT 0x0102 /* TW_IMAGELAYOUT */ 1358*c2c66affSColin Finck #define DAT_IMAGEMEMXFER 0x0103 /* TW_IMAGEMEMXFER */ 1359*c2c66affSColin Finck #define DAT_IMAGENATIVEXFER 0x0104 /* TW_UINT32 loword is hDIB, PICHandle */ 1360*c2c66affSColin Finck #define DAT_IMAGEFILEXFER 0x0105 /* Null data */ 1361*c2c66affSColin Finck #define DAT_CIECOLOR 0x0106 /* TW_CIECOLOR */ 1362*c2c66affSColin Finck #define DAT_GRAYRESPONSE 0x0107 /* TW_GRAYRESPONSE */ 1363*c2c66affSColin Finck #define DAT_RGBRESPONSE 0x0108 /* TW_RGBRESPONSE */ 1364*c2c66affSColin Finck #define DAT_JPEGCOMPRESSION 0x0109 /* TW_JPEGCOMPRESSION */ 1365*c2c66affSColin Finck #define DAT_PALETTE8 0x010a /* TW_PALETTE8 */ 1366*c2c66affSColin Finck #define DAT_EXTIMAGEINFO 0x010b /* TW_EXTIMAGEINFO -- for 1.7 Spec. */ 1367*c2c66affSColin Finck 1368*c2c66affSColin Finck /* Added 1.8 */ 1369*c2c66affSColin Finck /* Data Argument Types for the DG_AUDIO Data Group. */ 1370*c2c66affSColin Finck #define DAT_AUDIOFILEXFER 0x0201 /* Null data */ 1371*c2c66affSColin Finck #define DAT_AUDIOINFO 0x0202 /* TW_AUDIOINFO */ 1372*c2c66affSColin Finck #define DAT_AUDIONATIVEXFER 0x0203 /* TW_UINT32 handle to WAV, (AIFF Mac) */ 1373*c2c66affSColin Finck 1374*c2c66affSColin Finck /**************************************************************************** 1375*c2c66affSColin Finck * Messages * 1376*c2c66affSColin Finck ****************************************************************************/ 1377*c2c66affSColin Finck 1378*c2c66affSColin Finck /* All message constants are unique. 1379*c2c66affSColin Finck * Messages are grouped according to which DATs they are used with.*/ 1380*c2c66affSColin Finck 1381*c2c66affSColin Finck #define MSG_NULL 0x0000 /* Used in TW_EVENT structure */ 1382*c2c66affSColin Finck #define MSG_CUSTOMBASE 0x8000 /* Base of custom messages */ 1383*c2c66affSColin Finck 1384*c2c66affSColin Finck /* Generic messages may be used with any of several DATs. */ 1385*c2c66affSColin Finck #define MSG_GET 0x0001 /* Get one or more values */ 1386*c2c66affSColin Finck #define MSG_GETCURRENT 0x0002 /* Get current value */ 1387*c2c66affSColin Finck #define MSG_GETDEFAULT 0x0003 /* Get default (e.g. power up) value */ 1388*c2c66affSColin Finck #define MSG_GETFIRST 0x0004 /* Get first of a series of items, e.g. DSs */ 1389*c2c66affSColin Finck #define MSG_GETNEXT 0x0005 /* Iterate through a series of items. */ 1390*c2c66affSColin Finck #define MSG_SET 0x0006 /* Set one or more values */ 1391*c2c66affSColin Finck #define MSG_RESET 0x0007 /* Set current value to default value */ 1392*c2c66affSColin Finck #define MSG_QUERYSUPPORT 0x0008 /* Get supported operations on the cap. */ 1393*c2c66affSColin Finck 1394*c2c66affSColin Finck /* Messages used with DAT_NULL */ 1395*c2c66affSColin Finck #define MSG_XFERREADY 0x0101 /* The data source has data ready */ 1396*c2c66affSColin Finck #define MSG_CLOSEDSREQ 0x0102 /* Request for Application. to close DS */ 1397*c2c66affSColin Finck #define MSG_CLOSEDSOK 0x0103 /* Tell the Application. to save the state. */ 1398*c2c66affSColin Finck /* Added 1.8 */ 1399*c2c66affSColin Finck #define MSG_DEVICEEVENT 0X0104 /* Some event has taken place */ 1400*c2c66affSColin Finck 1401*c2c66affSColin Finck /* Messages used with a pointer to a DAT_STATUS structure */ 1402*c2c66affSColin Finck #define MSG_CHECKSTATUS 0x0201 /* Get status information */ 1403*c2c66affSColin Finck 1404*c2c66affSColin Finck /* Messages used with a pointer to DAT_PARENT data */ 1405*c2c66affSColin Finck #define MSG_OPENDSM 0x0301 /* Open the DSM */ 1406*c2c66affSColin Finck #define MSG_CLOSEDSM 0x0302 /* Close the DSM */ 1407*c2c66affSColin Finck 1408*c2c66affSColin Finck /* Messages used with a pointer to a DAT_IDENTITY structure */ 1409*c2c66affSColin Finck #define MSG_OPENDS 0x0401 /* Open a data source */ 1410*c2c66affSColin Finck #define MSG_CLOSEDS 0x0402 /* Close a data source */ 1411*c2c66affSColin Finck #define MSG_USERSELECT 0x0403 /* Put up a dialog of all DS */ 1412*c2c66affSColin Finck 1413*c2c66affSColin Finck /* Messages used with a pointer to a DAT_USERINTERFACE structure */ 1414*c2c66affSColin Finck #define MSG_DISABLEDS 0x0501 /* Disable data transfer in the DS */ 1415*c2c66affSColin Finck #define MSG_ENABLEDS 0x0502 /* Enable data transfer in the DS */ 1416*c2c66affSColin Finck #define MSG_ENABLEDSUIONLY 0x0503 /* Enable for saving DS state only. */ 1417*c2c66affSColin Finck 1418*c2c66affSColin Finck /* Messages used with a pointer to a DAT_EVENT structure */ 1419*c2c66affSColin Finck #define MSG_PROCESSEVENT 0x0601 1420*c2c66affSColin Finck 1421*c2c66affSColin Finck /* Messages used with a pointer to a DAT_PENDINGXFERS structure */ 1422*c2c66affSColin Finck #define MSG_ENDXFER 0x0701 1423*c2c66affSColin Finck 1424*c2c66affSColin Finck /* Added 1.8 */ 1425*c2c66affSColin Finck /* Messages used with a pointer to a DAT_FILESYSTEM structure */ 1426*c2c66affSColin Finck #define MSG_CHANGEDIRECTORY 0x0801 1427*c2c66affSColin Finck #define MSG_CREATEDIRECTORY 0x0802 1428*c2c66affSColin Finck #define MSG_DELETE 0x0803 1429*c2c66affSColin Finck #define MSG_FORMATMEDIA 0x0804 1430*c2c66affSColin Finck #define MSG_GETCLOSE 0x0805 1431*c2c66affSColin Finck #define MSG_GETFIRSTFILE 0x0806 1432*c2c66affSColin Finck #define MSG_GETINFO 0x0807 1433*c2c66affSColin Finck #define MSG_GETNEXTFILE 0x0808 1434*c2c66affSColin Finck #define MSG_RENAME 0x0809 1435*c2c66affSColin Finck 1436*c2c66affSColin Finck /* Messages used with a pointer to a DAT_PASSTHRU structure */ 1437*c2c66affSColin Finck #define MSG_PASSTHRU 0x0901 1438*c2c66affSColin Finck 1439*c2c66affSColin Finck /**************************************************************************** 1440*c2c66affSColin Finck * Capabilities * 1441*c2c66affSColin Finck ****************************************************************************/ 1442*c2c66affSColin Finck 1443*c2c66affSColin Finck #define CAP_CUSTOMBASE 0x8000 /* Base of custom capabilities */ 1444*c2c66affSColin Finck 1445*c2c66affSColin Finck /* all data sources are REQUIRED to support these caps */ 1446*c2c66affSColin Finck #define CAP_XFERCOUNT 0x0001 1447*c2c66affSColin Finck 1448*c2c66affSColin Finck /* image data sources are REQUIRED to support these caps */ 1449*c2c66affSColin Finck #define ICAP_COMPRESSION 0x0100 1450*c2c66affSColin Finck #define ICAP_PIXELTYPE 0x0101 1451*c2c66affSColin Finck #define ICAP_UNITS 0x0102 /* default is TWUN_INCHES */ 1452*c2c66affSColin Finck #define ICAP_XFERMECH 0x0103 1453*c2c66affSColin Finck 1454*c2c66affSColin Finck /* all data sources MAY support these caps */ 1455*c2c66affSColin Finck #define CAP_AUTHOR 0x1000 1456*c2c66affSColin Finck #define CAP_CAPTION 0x1001 1457*c2c66affSColin Finck #define CAP_FEEDERENABLED 0x1002 1458*c2c66affSColin Finck #define CAP_FEEDERLOADED 0x1003 1459*c2c66affSColin Finck #define CAP_TIMEDATE 0x1004 1460*c2c66affSColin Finck #define CAP_SUPPORTEDCAPS 0x1005 1461*c2c66affSColin Finck #define CAP_EXTENDEDCAPS 0x1006 1462*c2c66affSColin Finck #define CAP_AUTOFEED 0x1007 1463*c2c66affSColin Finck #define CAP_CLEARPAGE 0x1008 1464*c2c66affSColin Finck #define CAP_FEEDPAGE 0x1009 1465*c2c66affSColin Finck #define CAP_REWINDPAGE 0x100a 1466*c2c66affSColin Finck #define CAP_INDICATORS 0x100b /* Added 1.1 */ 1467*c2c66affSColin Finck #define CAP_SUPPORTEDCAPSEXT 0x100c /* Added 1.6 */ 1468*c2c66affSColin Finck #define CAP_PAPERDETECTABLE 0x100d /* Added 1.6 */ 1469*c2c66affSColin Finck #define CAP_UICONTROLLABLE 0x100e /* Added 1.6 */ 1470*c2c66affSColin Finck #define CAP_DEVICEONLINE 0x100f /* Added 1.6 */ 1471*c2c66affSColin Finck #define CAP_AUTOSCAN 0x1010 /* Added 1.6 */ 1472*c2c66affSColin Finck #define CAP_THUMBNAILSENABLED 0x1011 /* Added 1.7 */ 1473*c2c66affSColin Finck #define CAP_DUPLEX 0x1012 /* Added 1.7 */ 1474*c2c66affSColin Finck #define CAP_DUPLEXENABLED 0x1013 /* Added 1.7 */ 1475*c2c66affSColin Finck #define CAP_ENABLEDSUIONLY 0x1014 /* Added 1.7 */ 1476*c2c66affSColin Finck #define CAP_CUSTOMDSDATA 0x1015 /* Added 1.7 */ 1477*c2c66affSColin Finck #define CAP_ENDORSER 0x1016 /* Added 1.7 */ 1478*c2c66affSColin Finck #define CAP_JOBCONTROL 0x1017 /* Added 1.7 */ 1479*c2c66affSColin Finck #define CAP_ALARMS 0x1018 /* Added 1.8 */ 1480*c2c66affSColin Finck #define CAP_ALARMVOLUME 0x1019 /* Added 1.8 */ 1481*c2c66affSColin Finck #define CAP_AUTOMATICCAPTURE 0x101a /* Added 1.8 */ 1482*c2c66affSColin Finck #define CAP_TIMEBEFOREFIRSTCAPTURE 0x101b /* Added 1.8 */ 1483*c2c66affSColin Finck #define CAP_TIMEBETWEENCAPTURES 0x101c /* Added 1.8 */ 1484*c2c66affSColin Finck #define CAP_CLEARBUFFERS 0x101d /* Added 1.8 */ 1485*c2c66affSColin Finck #define CAP_MAXBATCHBUFFERS 0x101e /* Added 1.8 */ 1486*c2c66affSColin Finck #define CAP_DEVICETIMEDATE 0x101f /* Added 1.8 */ 1487*c2c66affSColin Finck #define CAP_POWERSUPPLY 0x1020 /* Added 1.8 */ 1488*c2c66affSColin Finck #define CAP_CAMERAPREVIEWUI 0x1021 /* Added 1.8 */ 1489*c2c66affSColin Finck #define CAP_DEVICEEVENT 0x1022 /* Added 1.8 */ 1490*c2c66affSColin Finck #define CAP_PAGEMULTIPLEACQUIRE 0x1023 /* Added 1.8 */ 1491*c2c66affSColin Finck #define CAP_SERIALNUMBER 0x1024 /* Added 1.8 */ 1492*c2c66affSColin Finck #define CAP_FILESYSTEM 0x1025 /* Added 1.8 */ 1493*c2c66affSColin Finck #define CAP_PRINTER 0x1026 /* Added 1.8 */ 1494*c2c66affSColin Finck #define CAP_PRINTERENABLED 0x1027 /* Added 1.8 */ 1495*c2c66affSColin Finck #define CAP_PRINTERINDEX 0x1028 /* Added 1.8 */ 1496*c2c66affSColin Finck #define CAP_PRINTERMODE 0x1029 /* Added 1.8 */ 1497*c2c66affSColin Finck #define CAP_PRINTERSTRING 0x102a /* Added 1.8 */ 1498*c2c66affSColin Finck #define CAP_PRINTERSUFFIX 0x102b /* Added 1.8 */ 1499*c2c66affSColin Finck #define CAP_LANGUAGE 0x102c /* Added 1.8 */ 1500*c2c66affSColin Finck #define CAP_FEEDERALIGNMENT 0x102d /* Added 1.8 */ 1501*c2c66affSColin Finck #define CAP_FEEDERORDER 0x102e /* Added 1.8 */ 1502*c2c66affSColin Finck #define CAP_PAPERBINDING 0x102f /* Added 1.8 */ 1503*c2c66affSColin Finck #define CAP_REACQUIREALLOWED 0x1030 /* Added 1.8 */ 1504*c2c66affSColin Finck #define CAP_PASSTHRU 0x1031 /* Added 1.8 */ 1505*c2c66affSColin Finck #define CAP_BATTERYMINUTES 0x1032 /* Added 1.8 */ 1506*c2c66affSColin Finck #define CAP_BATTERYPERCENTAGE 0x1033 /* Added 1.8 */ 1507*c2c66affSColin Finck #define CAP_POWERDOWNTIME 0x1034 /* Added 1.8 */ 1508*c2c66affSColin Finck 1509*c2c66affSColin Finck /* image data sources MAY support these caps */ 1510*c2c66affSColin Finck #define ICAP_AUTOBRIGHT 0x1100 1511*c2c66affSColin Finck #define ICAP_BRIGHTNESS 0x1101 1512*c2c66affSColin Finck #define ICAP_CONTRAST 0x1103 1513*c2c66affSColin Finck #define ICAP_CUSTHALFTONE 0x1104 1514*c2c66affSColin Finck #define ICAP_EXPOSURETIME 0x1105 1515*c2c66affSColin Finck #define ICAP_FILTER 0x1106 1516*c2c66affSColin Finck #define ICAP_FLASHUSED 0x1107 1517*c2c66affSColin Finck #define ICAP_GAMMA 0x1108 1518*c2c66affSColin Finck #define ICAP_HALFTONES 0x1109 1519*c2c66affSColin Finck #define ICAP_HIGHLIGHT 0x110a 1520*c2c66affSColin Finck #define ICAP_IMAGEFILEFORMAT 0x110c 1521*c2c66affSColin Finck #define ICAP_LAMPSTATE 0x110d 1522*c2c66affSColin Finck #define ICAP_LIGHTSOURCE 0x110e 1523*c2c66affSColin Finck #define ICAP_ORIENTATION 0x1110 1524*c2c66affSColin Finck #define ICAP_PHYSICALWIDTH 0x1111 1525*c2c66affSColin Finck #define ICAP_PHYSICALHEIGHT 0x1112 1526*c2c66affSColin Finck #define ICAP_SHADOW 0x1113 1527*c2c66affSColin Finck #define ICAP_FRAMES 0x1114 1528*c2c66affSColin Finck #define ICAP_XNATIVERESOLUTION 0x1116 1529*c2c66affSColin Finck #define ICAP_YNATIVERESOLUTION 0x1117 1530*c2c66affSColin Finck #define ICAP_XRESOLUTION 0x1118 1531*c2c66affSColin Finck #define ICAP_YRESOLUTION 0x1119 1532*c2c66affSColin Finck #define ICAP_MAXFRAMES 0x111a 1533*c2c66affSColin Finck #define ICAP_TILES 0x111b 1534*c2c66affSColin Finck #define ICAP_BITORDER 0x111c 1535*c2c66affSColin Finck #define ICAP_CCITTKFACTOR 0x111d 1536*c2c66affSColin Finck #define ICAP_LIGHTPATH 0x111e 1537*c2c66affSColin Finck #define ICAP_PIXELFLAVOR 0x111f 1538*c2c66affSColin Finck #define ICAP_PLANARCHUNKY 0x1120 1539*c2c66affSColin Finck #define ICAP_ROTATION 0x1121 1540*c2c66affSColin Finck #define ICAP_SUPPORTEDSIZES 0x1122 1541*c2c66affSColin Finck #define ICAP_THRESHOLD 0x1123 1542*c2c66affSColin Finck #define ICAP_XSCALING 0x1124 1543*c2c66affSColin Finck #define ICAP_YSCALING 0x1125 1544*c2c66affSColin Finck #define ICAP_BITORDERCODES 0x1126 1545*c2c66affSColin Finck #define ICAP_PIXELFLAVORCODES 0x1127 1546*c2c66affSColin Finck #define ICAP_JPEGPIXELTYPE 0x1128 1547*c2c66affSColin Finck #define ICAP_TIMEFILL 0x112a 1548*c2c66affSColin Finck #define ICAP_BITDEPTH 0x112b 1549*c2c66affSColin Finck #define ICAP_BITDEPTHREDUCTION 0x112c /* Added 1.5 */ 1550*c2c66affSColin Finck #define ICAP_UNDEFINEDIMAGESIZE 0x112d /* Added 1.6 */ 1551*c2c66affSColin Finck #define ICAP_IMAGEDATASET 0x112e /* Added 1.7 */ 1552*c2c66affSColin Finck #define ICAP_EXTIMAGEINFO 0x112f /* Added 1.7 */ 1553*c2c66affSColin Finck #define ICAP_MINIMUMHEIGHT 0x1130 /* Added 1.7 */ 1554*c2c66affSColin Finck #define ICAP_MINIMUMWIDTH 0x1131 /* Added 1.7 */ 1555*c2c66affSColin Finck #define ICAP_AUTODISCARDBLANKPAGES 0x1134 /* Added 1.8 */ 1556*c2c66affSColin Finck #define ICAP_FLIPROTATION 0x1136 /* Added 1.8 */ 1557*c2c66affSColin Finck #define ICAP_BARCODEDETECTIONENABLED 0x1137 /* Added 1.8 */ 1558*c2c66affSColin Finck #define ICAP_SUPPORTEDBARCODETYPES 0x1138 /* Added 1.8 */ 1559*c2c66affSColin Finck #define ICAP_BARCODEMAXSEARCHPRIORITIES 0x1139 /* Added 1.8 */ 1560*c2c66affSColin Finck #define ICAP_BARCODESEARCHPRIORITIES 0x113a /* Added 1.8 */ 1561*c2c66affSColin Finck #define ICAP_BARCODESEARCHMODE 0x113b /* Added 1.8 */ 1562*c2c66affSColin Finck #define ICAP_BARCODEMAXRETRIES 0x113c /* Added 1.8 */ 1563*c2c66affSColin Finck #define ICAP_BARCODETIMEOUT 0x113d /* Added 1.8 */ 1564*c2c66affSColin Finck #define ICAP_ZOOMFACTOR 0x113e /* Added 1.8 */ 1565*c2c66affSColin Finck #define ICAP_PATCHCODEDETECTIONENABLED 0x113f /* Added 1.8 */ 1566*c2c66affSColin Finck #define ICAP_SUPPORTEDPATCHCODETYPES 0x1140 /* Added 1.8 */ 1567*c2c66affSColin Finck #define ICAP_PATCHCODEMAXSEARCHPRIORITIES 0x1141 /* Added 1.8 */ 1568*c2c66affSColin Finck #define ICAP_PATCHCODESEARCHPRIORITIES 0x1142 /* Added 1.8 */ 1569*c2c66affSColin Finck #define ICAP_PATCHCODESEARCHMODE 0x1143 /* Added 1.8 */ 1570*c2c66affSColin Finck #define ICAP_PATCHCODEMAXRETRIES 0x1144 /* Added 1.8 */ 1571*c2c66affSColin Finck #define ICAP_PATCHCODETIMEOUT 0x1145 /* Added 1.8 */ 1572*c2c66affSColin Finck #define ICAP_FLASHUSED2 0x1146 /* Added 1.8 */ 1573*c2c66affSColin Finck #define ICAP_IMAGEFILTER 0x1147 /* Added 1.8 */ 1574*c2c66affSColin Finck #define ICAP_NOISEFILTER 0x1148 /* Added 1.8 */ 1575*c2c66affSColin Finck #define ICAP_OVERSCAN 0x1149 /* Added 1.8 */ 1576*c2c66affSColin Finck #define ICAP_AUTOMATICBORDERDETECTION 0x1150 /* Added 1.8 */ 1577*c2c66affSColin Finck #define ICAP_AUTOMATICDESKEW 0x1151 /* Added 1.8 */ 1578*c2c66affSColin Finck #define ICAP_AUTOMATICROTATE 0x1152 /* Added 1.8 */ 1579*c2c66affSColin Finck 1580*c2c66affSColin Finck /* image data sources MAY support these audio caps */ 1581*c2c66affSColin Finck #define ACAP_AUDIOFILEFORMAT 0x1201 /* Added 1.8 */ 1582*c2c66affSColin Finck #define ACAP_XFERMECH 0x1202 /* Added 1.8 */ 1583*c2c66affSColin Finck 1584*c2c66affSColin Finck /* ----------------------------------------------------------------------- *\ 1585*c2c66affSColin Finck 1586*c2c66affSColin Finck Version 1.7: Following is Extended Image Info Attributes. 1587*c2c66affSColin Finck July 1997 1588*c2c66affSColin Finck KHL 1589*c2c66affSColin Finck 1590*c2c66affSColin Finck \* ----------------------------------------------------------------------- */ 1591*c2c66affSColin Finck 1592*c2c66affSColin Finck #define TWEI_BARCODEX 0x1200 1593*c2c66affSColin Finck #define TWEI_BARCODEY 0x1201 1594*c2c66affSColin Finck #define TWEI_BARCODETEXT 0x1202 1595*c2c66affSColin Finck #define TWEI_BARCODETYPE 0x1203 1596*c2c66affSColin Finck #define TWEI_DESHADETOP 0x1204 1597*c2c66affSColin Finck #define TWEI_DESHADELEFT 0x1205 1598*c2c66affSColin Finck #define TWEI_DESHADEHEIGHT 0x1206 1599*c2c66affSColin Finck #define TWEI_DESHADEWIDTH 0x1207 1600*c2c66affSColin Finck #define TWEI_DESHADESIZE 0x1208 1601*c2c66affSColin Finck #define TWEI_SPECKLESREMOVED 0x1209 1602*c2c66affSColin Finck #define TWEI_HORZLINEXCOORD 0x120A 1603*c2c66affSColin Finck #define TWEI_HORZLINEYCOORD 0x120B 1604*c2c66affSColin Finck #define TWEI_HORZLINELENGTH 0x120C 1605*c2c66affSColin Finck #define TWEI_HORZLINETHICKNESS 0x120D 1606*c2c66affSColin Finck #define TWEI_VERTLINEXCOORD 0x120E 1607*c2c66affSColin Finck #define TWEI_VERTLINEYCOORD 0x120F 1608*c2c66affSColin Finck #define TWEI_VERTLINELENGTH 0x1210 1609*c2c66affSColin Finck #define TWEI_VERTLINETHICKNESS 0x1211 1610*c2c66affSColin Finck #define TWEI_PATCHCODE 0x1212 1611*c2c66affSColin Finck #define TWEI_ENDORSEDTEXT 0x1213 1612*c2c66affSColin Finck #define TWEI_FORMCONFIDENCE 0x1214 1613*c2c66affSColin Finck #define TWEI_FORMTEMPLATEMATCH 0x1215 1614*c2c66affSColin Finck #define TWEI_FORMTEMPLATEPAGEMATCH 0x1216 1615*c2c66affSColin Finck #define TWEI_FORMHORZDOCOFFSET 0x1217 1616*c2c66affSColin Finck #define TWEI_FORMVERTDOCOFFSET 0x1218 1617*c2c66affSColin Finck #define TWEI_BARCODECOUNT 0x1219 1618*c2c66affSColin Finck #define TWEI_BARCODECONFIDENCE 0x121A 1619*c2c66affSColin Finck #define TWEI_BARCODEROTATION 0x121B 1620*c2c66affSColin Finck #define TWEI_BARCODETEXTLENGTH 0x121C 1621*c2c66affSColin Finck #define TWEI_DESHADECOUNT 0x121D 1622*c2c66affSColin Finck #define TWEI_DESHADEBLACKCOUNTOLD 0x121E 1623*c2c66affSColin Finck #define TWEI_DESHADEBLACKCOUNTNEW 0x121F 1624*c2c66affSColin Finck #define TWEI_DESHADEBLACKRLMIN 0x1220 1625*c2c66affSColin Finck #define TWEI_DESHADEBLACKRLMAX 0x1221 1626*c2c66affSColin Finck #define TWEI_DESHADEWHITECOUNTOLD 0x1222 1627*c2c66affSColin Finck #define TWEI_DESHADEWHITECOUNTNEW 0x1223 1628*c2c66affSColin Finck #define TWEI_DESHADEWHITERLMIN 0x1224 1629*c2c66affSColin Finck #define TWEI_DESHADEWHITERLAVE 0x1225 1630*c2c66affSColin Finck #define TWEI_DESHADEWHITERLMAX 0x1226 1631*c2c66affSColin Finck #define TWEI_BLACKSPECKLESREMOVED 0x1227 1632*c2c66affSColin Finck #define TWEI_WHITESPECKLESREMOVED 0x1228 1633*c2c66affSColin Finck #define TWEI_HORZLINECOUNT 0x1229 1634*c2c66affSColin Finck #define TWEI_VERTLINECOUNT 0x122A 1635*c2c66affSColin Finck #define TWEI_DESKEWSTATUS 0x122B 1636*c2c66affSColin Finck #define TWEI_SKEWORIGINALANGLE 0x122C 1637*c2c66affSColin Finck #define TWEI_SKEWFINALANGLE 0x122D 1638*c2c66affSColin Finck #define TWEI_SKEWCONFIDENCE 0x122E 1639*c2c66affSColin Finck #define TWEI_SKEWWINDOWX1 0x122F 1640*c2c66affSColin Finck #define TWEI_SKEWWINDOWY1 0x1230 1641*c2c66affSColin Finck #define TWEI_SKEWWINDOWX2 0x1231 1642*c2c66affSColin Finck #define TWEI_SKEWWINDOWY2 0x1232 1643*c2c66affSColin Finck #define TWEI_SKEWWINDOWX3 0x1233 1644*c2c66affSColin Finck #define TWEI_SKEWWINDOWY3 0x1234 1645*c2c66affSColin Finck #define TWEI_SKEWWINDOWX4 0x1235 1646*c2c66affSColin Finck #define TWEI_SKEWWINDOWY4 0x1236 1647*c2c66affSColin Finck 1648*c2c66affSColin Finck #define TWEJ_NONE 0x0000 1649*c2c66affSColin Finck #define TWEJ_MIDSEPARATOR 0x0001 1650*c2c66affSColin Finck #define TWEJ_PATCH1 0x0002 1651*c2c66affSColin Finck #define TWEJ_PATCH2 0x0003 1652*c2c66affSColin Finck #define TWEJ_PATCH3 0x0004 1653*c2c66affSColin Finck #define TWEJ_PATCH4 0x0005 1654*c2c66affSColin Finck #define TWEJ_PATCH6 0x0006 1655*c2c66affSColin Finck #define TWEJ_PATCHT 0x0007 1656*c2c66affSColin Finck 1657*c2c66affSColin Finck /*************************************************************************** 1658*c2c66affSColin Finck * Return Codes and Condition Codes section * 1659*c2c66affSColin Finck ***************************************************************************/ 1660*c2c66affSColin Finck 1661*c2c66affSColin Finck /* Return Codes: DSM_Entry and DS_Entry may return any one of these values. */ 1662*c2c66affSColin Finck #define TWRC_CUSTOMBASE 0x8000 1663*c2c66affSColin Finck 1664*c2c66affSColin Finck #define TWRC_SUCCESS 0 1665*c2c66affSColin Finck #define TWRC_FAILURE 1 /* Application may get TW_STATUS for info on failure */ 1666*c2c66affSColin Finck #define TWRC_CHECKSTATUS 2 /* "tried hard"; get status */ 1667*c2c66affSColin Finck #define TWRC_CANCEL 3 1668*c2c66affSColin Finck #define TWRC_DSEVENT 4 1669*c2c66affSColin Finck #define TWRC_NOTDSEVENT 5 1670*c2c66affSColin Finck #define TWRC_XFERDONE 6 1671*c2c66affSColin Finck #define TWRC_ENDOFLIST 7 /* After MSG_GETNEXT if nothing left */ 1672*c2c66affSColin Finck #define TWRC_INFONOTSUPPORTED 8 1673*c2c66affSColin Finck #define TWRC_DATANOTAVAILABLE 9 1674*c2c66affSColin Finck 1675*c2c66affSColin Finck /* Condition Codes: Application gets these by doing DG_CONTROL DAT_STATUS MSG_GET. */ 1676*c2c66affSColin Finck #define TWCC_CUSTOMBASE 0x8000 1677*c2c66affSColin Finck 1678*c2c66affSColin Finck #define TWCC_SUCCESS 0 /* It worked! */ 1679*c2c66affSColin Finck #define TWCC_BUMMER 1 /* Failure due to unknown causes */ 1680*c2c66affSColin Finck #define TWCC_LOWMEMORY 2 /* Not enough memory to perform operation */ 1681*c2c66affSColin Finck #define TWCC_NODS 3 /* No Data Source */ 1682*c2c66affSColin Finck #define TWCC_MAXCONNECTIONS 4 /* DS is connected to max possible applications */ 1683*c2c66affSColin Finck #define TWCC_OPERATIONERROR 5 /* DS or DSM reported error, application shouldn't */ 1684*c2c66affSColin Finck #define TWCC_BADCAP 6 /* Unknown capability */ 1685*c2c66affSColin Finck #define TWCC_BADPROTOCOL 9 /* Unrecognized MSG DG DAT combination */ 1686*c2c66affSColin Finck #define TWCC_BADVALUE 10 /* Data parameter out of range */ 1687*c2c66affSColin Finck #define TWCC_SEQERROR 11 /* DG DAT MSG out of expected sequence */ 1688*c2c66affSColin Finck #define TWCC_BADDEST 12 /* Unknown destination Application/Source in DSM_Entry */ 1689*c2c66affSColin Finck #define TWCC_CAPUNSUPPORTED 13 /* Capability not supported by source */ 1690*c2c66affSColin Finck #define TWCC_CAPBADOPERATION 14 /* Operation not supported by capability */ 1691*c2c66affSColin Finck #define TWCC_CAPSEQERROR 15 /* Capability has dependency on other capability */ 1692*c2c66affSColin Finck /* Added 1.8 */ 1693*c2c66affSColin Finck #define TWCC_DENIED 16 /* File System operation is denied (file is protected) */ 1694*c2c66affSColin Finck #define TWCC_FILEEXISTS 17 /* Operation failed because file already exists. */ 1695*c2c66affSColin Finck #define TWCC_FILENOTFOUND 18 /* File not found */ 1696*c2c66affSColin Finck #define TWCC_NOTEMPTY 19 /* Operation failed because directory is not empty */ 1697*c2c66affSColin Finck #define TWCC_PAPERJAM 20 /* The feeder is jammed */ 1698*c2c66affSColin Finck #define TWCC_PAPERDOUBLEFEED 21 /* The feeder detected multiple pages */ 1699*c2c66affSColin Finck #define TWCC_FILEWRITEERROR 22 /* Error writing the file (meant for things like disk full conditions) */ 1700*c2c66affSColin Finck #define TWCC_CHECKDEVICEONLINE 23 /* The device went offline prior to or during this operation */ 1701*c2c66affSColin Finck 1702*c2c66affSColin Finck 1703*c2c66affSColin Finck /* bit patterns: for query the operation that are supported by the data source on a capability */ 1704*c2c66affSColin Finck /* Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT */ 1705*c2c66affSColin Finck /* Added 1.6 */ 1706*c2c66affSColin Finck #define TWQC_GET 0x0001 1707*c2c66affSColin Finck #define TWQC_SET 0x0002 1708*c2c66affSColin Finck #define TWQC_GETDEFAULT 0x0004 1709*c2c66affSColin Finck #define TWQC_GETCURRENT 0x0008 1710*c2c66affSColin Finck #define TWQC_RESET 0x0010 1711*c2c66affSColin Finck 1712*c2c66affSColin Finck 1713*c2c66affSColin Finck /**************************************************************************** 1714*c2c66affSColin Finck * Entry Points * 1715*c2c66affSColin Finck ****************************************************************************/ 1716*c2c66affSColin Finck 1717*c2c66affSColin Finck /********************************************************************** 1718*c2c66affSColin Finck * Function: DSM_Entry, the only entry point into the Data Source Manager. 1719*c2c66affSColin Finck * 1720*c2c66affSColin Finck * Parameters: 1721*c2c66affSColin Finck * pOrigin Identifies the source module of the message. This could 1722*c2c66affSColin Finck * identify an Application, a Source, or the Source Manager. 1723*c2c66affSColin Finck * 1724*c2c66affSColin Finck * pDest Identifies the destination module for the message. 1725*c2c66affSColin Finck * This could identify an application or a data source. 1726*c2c66affSColin Finck * If this is NULL, the message goes to the Source Manager. 1727*c2c66affSColin Finck * 1728*c2c66affSColin Finck * DG The Data Group. 1729*c2c66affSColin Finck * Example: DG_IMAGE. 1730*c2c66affSColin Finck * 1731*c2c66affSColin Finck * DAT The Data Attribute Type. 1732*c2c66affSColin Finck * Example: DAT_IMAGEMEMXFER. 1733*c2c66affSColin Finck * 1734*c2c66affSColin Finck * MSG The message. Messages are interpreted by the destination module 1735*c2c66affSColin Finck * with respect to the Data Group and the Data Attribute Type. 1736*c2c66affSColin Finck * Example: MSG_GET. 1737*c2c66affSColin Finck * 1738*c2c66affSColin Finck * pData A pointer to the data structure or variable identified 1739*c2c66affSColin Finck * by the Data Attribute Type. 1740*c2c66affSColin Finck * Example: (TW_MEMREF)&ImageMemXfer 1741*c2c66affSColin Finck * where ImageMemXfer is a TW_IMAGEMEMXFER structure. 1742*c2c66affSColin Finck * 1743*c2c66affSColin Finck * Returns: 1744*c2c66affSColin Finck * ReturnCode 1745*c2c66affSColin Finck * Example: TWRC_SUCCESS. 1746*c2c66affSColin Finck * 1747*c2c66affSColin Finck ********************************************************************/ 1748*c2c66affSColin Finck 1749*c2c66affSColin Finck /* Don't mangle the name "DSM_Entry" if we're compiling in C++! */ 1750*c2c66affSColin Finck #ifdef __cplusplus 1751*c2c66affSColin Finck extern "C" { 1752*c2c66affSColin Finck #endif /* __cplusplus */ 1753*c2c66affSColin Finck 1754*c2c66affSColin Finck #ifdef _MSWIN_ 1755*c2c66affSColin Finck TW_UINT16 FAR PASCAL DSM_Entry( pTW_IDENTITY pOrigin, 1756*c2c66affSColin Finck pTW_IDENTITY pDest, 1757*c2c66affSColin Finck TW_UINT32 DG, 1758*c2c66affSColin Finck TW_UINT16 DAT, 1759*c2c66affSColin Finck TW_UINT16 MSG, 1760*c2c66affSColin Finck TW_MEMREF pData); 1761*c2c66affSColin Finck 1762*c2c66affSColin Finck typedef TW_UINT16 (FAR PASCAL *DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, 1763*c2c66affSColin Finck TW_UINT32, TW_UINT16, 1764*c2c66affSColin Finck TW_UINT16, TW_MEMREF); 1765*c2c66affSColin Finck #else /* _MSWIN_ */ 1766*c2c66affSColin Finck 1767*c2c66affSColin Finck /*FAR PASCAL TW_UINT16 DSM_Entry( pTW_IDENTITY pOrigin, 1768*c2c66affSColin Finck pTW_IDENTITY pDest, 1769*c2c66affSColin Finck TW_UINT32 DG, 1770*c2c66affSColin Finck TW_UINT16 DAT, 1771*c2c66affSColin Finck TW_UINT16 MSG, 1772*c2c66affSColin Finck TW_MEMREF pData);*/ 1773*c2c66affSColin Finck 1774*c2c66affSColin Finck typedef TW_UINT16 (*DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, 1775*c2c66affSColin Finck TW_UINT32, TW_UINT16, 1776*c2c66affSColin Finck TW_UINT16, TW_MEMREF); 1777*c2c66affSColin Finck #endif /* _MSWIN_ */ 1778*c2c66affSColin Finck 1779*c2c66affSColin Finck #ifdef __cplusplus 1780*c2c66affSColin Finck } 1781*c2c66affSColin Finck #endif /* cplusplus */ 1782*c2c66affSColin Finck 1783*c2c66affSColin Finck 1784*c2c66affSColin Finck /********************************************************************** 1785*c2c66affSColin Finck * Function: DS_Entry, the entry point provided by a Data Source. 1786*c2c66affSColin Finck * 1787*c2c66affSColin Finck * Parameters: 1788*c2c66affSColin Finck * pOrigin Identifies the source module of the message. This could 1789*c2c66affSColin Finck * identify an application or the Data Source Manager. 1790*c2c66affSColin Finck * 1791*c2c66affSColin Finck * DG The Data Group. 1792*c2c66affSColin Finck * Example: DG_IMAGE. 1793*c2c66affSColin Finck * 1794*c2c66affSColin Finck * DAT The Data Attribute Type. 1795*c2c66affSColin Finck * Example: DAT_IMAGEMEMXFER. 1796*c2c66affSColin Finck * 1797*c2c66affSColin Finck * MSG The message. Messages are interpreted by the data source 1798*c2c66affSColin Finck * with respect to the Data Group and the Data Attribute Type. 1799*c2c66affSColin Finck * Example: MSG_GET. 1800*c2c66affSColin Finck * 1801*c2c66affSColin Finck * pData A pointer to the data structure or variable identified 1802*c2c66affSColin Finck * by the Data Attribute Type. 1803*c2c66affSColin Finck * Example: (TW_MEMREF)&ImageMemXfer 1804*c2c66affSColin Finck * where ImageMemXfer is a TW_IMAGEMEMXFER structure. 1805*c2c66affSColin Finck * 1806*c2c66affSColin Finck * Returns: 1807*c2c66affSColin Finck * ReturnCode 1808*c2c66affSColin Finck * Example: TWRC_SUCCESS. 1809*c2c66affSColin Finck * 1810*c2c66affSColin Finck * Note: 1811*c2c66affSColin Finck * The DSPROC type is only used by an application when it calls 1812*c2c66affSColin Finck * a Data Source directly, bypassing the Data Source Manager. 1813*c2c66affSColin Finck * 1814*c2c66affSColin Finck ********************************************************************/ 1815*c2c66affSColin Finck /* Don't mangle the name "DS_Entry" if we're compiling in C++! */ 1816*c2c66affSColin Finck #ifdef __cplusplus 1817*c2c66affSColin Finck extern "C" { 1818*c2c66affSColin Finck #endif /* __cplusplus */ 1819*c2c66affSColin Finck #ifdef _MSWIN_ 1820*c2c66affSColin Finck TW_UINT16 DECLSPEC_EXPORT PASCAL DS_Entry (pTW_IDENTITY pOrigin, 1821*c2c66affSColin Finck TW_UINT32 DG, 1822*c2c66affSColin Finck TW_UINT16 DAT, 1823*c2c66affSColin Finck TW_UINT16 MSG, 1824*c2c66affSColin Finck TW_MEMREF pData); 1825*c2c66affSColin Finck 1826*c2c66affSColin Finck typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin, 1827*c2c66affSColin Finck TW_UINT32 DG, 1828*c2c66affSColin Finck TW_UINT16 DAT, 1829*c2c66affSColin Finck TW_UINT16 MSG, 1830*c2c66affSColin Finck TW_MEMREF pData); 1831*c2c66affSColin Finck #else /* _MSWIN_ */ 1832*c2c66affSColin Finck /*FAR PASCAL TW_UINT16 DS_Entry( pTW_IDENTITY pOrigin, 1833*c2c66affSColin Finck TW_UINT32 DG, 1834*c2c66affSColin Finck TW_UINT16 DAT, 1835*c2c66affSColin Finck TW_UINT16 MSG, 1836*c2c66affSColin Finck TW_MEMREF pData);*/ 1837*c2c66affSColin Finck 1838*c2c66affSColin Finck typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY, 1839*c2c66affSColin Finck TW_UINT32, TW_UINT16, 1840*c2c66affSColin Finck TW_UINT16, TW_MEMREF); 1841*c2c66affSColin Finck #endif /* _MSWIN_ */ 1842*c2c66affSColin Finck #ifdef __cplusplus 1843*c2c66affSColin Finck } 1844*c2c66affSColin Finck #endif /* cplusplus */ 1845*c2c66affSColin Finck 1846*c2c66affSColin Finck /* The Twain structures must be packed on 2 byte alignment */ 1847*c2c66affSColin Finck #include "poppack.h" 1848*c2c66affSColin Finck 1849*c2c66affSColin Finck #endif /* TWAIN */ 1850