Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentwain.h
Go to the documentation of this file.
00001 /* ======================================================================== *\ 00002 00003 Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak, 00004 Hewlett-Packard and Logitech Corporations. All rights reserved. 00005 00006 Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix, 00007 Fujitsu, Genoa Technology, Hewlett-Packard, Kofax Imaging Products, and 00008 Ricoh Corporation. All rights reserved. 00009 00010 Copyright © 1998 TWAIN Working Group: Adobe Systems Incorporated, 00011 Canon Information Systems, Eastman Kodak Company, 00012 Fujitsu Computer Products of America, Genoa Technology, 00013 Hewlett-Packard Company, Intel Corporation, Kofax Image Products, 00014 JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation. 00015 All rights reserved. 00016 00017 TWAIN.h - This is the definitive include file for applications and 00018 data sources written to the TWAIN specification. 00019 It defines constants, data structures, messages etc. 00020 for the public interface to TWAIN. 00021 00022 Revision History: 00023 version 1.0, March 6, 1992. TWAIN 1.0. 00024 version 1.1, January 1993. Tech Notes 1.1 00025 version 1.5, June 1993. Specification Update 1.5 00026 Change DC to TW 00027 Change filename from DC.H to TWAIN.H 00028 version 1.5, July 1993. Remove spaces from country identifiers 00029 00030 version 1.7, July 1997 Added Capabilities and data structure for 00031 document imaging and digital cameras. 00032 KHL. 00033 version 1.7, July 1997 Inserted Borland compatibile structure packing 00034 directives provided by Mentor. JMH 00035 version 1.7, Aug 1997 Expanded file tabs to spaces. 00036 NOTE: future authors should be sure to have 00037 their editors set to automatically expand tabs 00038 to spaces (original tab setting was 4 spaces). 00039 version 1.7, Sept 1997 Added job control values 00040 Added return codes 00041 version 1.7, Sept 1997 changed definition of pRGBRESPONSE to 00042 pTW_RGBRESPONSE 00043 version 1.7 Aug 1998 Added missing TWEI_BARCODEROTATION values 00044 TWBCOR_ types JMH 00045 version 1.8 August 1998 Added new types and definitions required 00046 for 1.8 Specification JMH 00047 version 1.8 January 1999 Changed search mode from SRCH_ to TWBD_ as 00048 in 1.8 Specification, added TWBT_MAXICODE JMH 00049 version 1.8 January 1999 Removed undocumented duplicate AUTO<cap> JMH 00050 \* ======================================================================== */ 00051 00052 #ifndef TWAIN 00053 #define TWAIN 00054 00055 #include "windef.h" 00056 00057 #ifndef FAR 00058 #define FAR 00059 #endif 00060 #define huge 00061 //#define WIN32 00062 //#define _WIN32 00063 //#define __declspec(spec) 00064 00065 /**************************************************************************** 00066 * TWAIN Version * 00067 ****************************************************************************/ 00068 #define TWON_PROTOCOLMINOR 8 /* Changed for Version 1.8 */ 00069 #define TWON_PROTOCOLMAJOR 1 00070 00071 /**************************************************************************** 00072 * Platform Dependent Definitions and Typedefs * 00073 ****************************************************************************/ 00074 00075 /* Define one of the following, depending on the platform */ 00076 /* #define _MAC_ */ 00077 /* #define _UNIX_ */ 00078 #define _MSWIN_ 00079 00080 #ifdef _MSWIN_ 00081 typedef HANDLE TW_HANDLE; 00082 typedef LPVOID TW_MEMREF; 00083 00084 /* SDH - 05/05/95 - TWUNK */ 00085 /* For common code between 16 and 32 bits. */ 00086 #ifdef WIN32 00087 #define TW_HUGE 00088 #else /* WIN32 */ 00089 #define TW_HUGE huge 00090 #endif /* WIN32 */ 00091 typedef BYTE TW_HUGE * HPBYTE; 00092 typedef void TW_HUGE * HPVOID; 00093 #endif /* _MSWIN_ */ 00094 00095 #ifdef _MAC_ 00096 #define PASCAL pascal 00097 #define FAR 00098 typedef Handle TW_HANDLE; 00099 typedef char *TW_MEMREF; 00100 #endif /* _MAC_ */ 00101 00102 #ifdef _UNIX_ 00103 /* #define PASCAL pascal */ 00104 #define FAR 00105 typedef unsigned char *TW_HANDLE; 00106 typedef unsigned char *TW_MEMREF; 00107 #endif /* _UNIX_ */ 00108 00109 /**************************************************************************** 00110 * Type Definitions * 00111 ****************************************************************************/ 00112 00113 /* String types. These include room for the strings and a NULL char, * 00114 * or, on the Mac, a length byte followed by the string. * 00115 * TW_STR255 must hold less than 256 chars so length fits in first byte. */ 00116 typedef char TW_STR32[34], FAR *pTW_STR32; 00117 typedef char TW_STR64[66], FAR *pTW_STR64; 00118 typedef char TW_STR128[130], FAR *pTW_STR128; 00119 typedef char TW_STR255[256], FAR *pTW_STR255; 00120 00121 /* Numeric types. */ 00122 typedef char TW_INT8, FAR *pTW_INT8; 00123 typedef short TW_INT16, FAR *pTW_INT16; 00124 typedef long TW_INT32, FAR *pTW_INT32; 00125 typedef unsigned char TW_UINT8, FAR *pTW_UINT8; 00126 typedef unsigned short TW_UINT16, FAR *pTW_UINT16; 00127 typedef unsigned long TW_UINT32, FAR *pTW_UINT32; 00128 typedef unsigned short TW_BOOL, FAR *pTW_BOOL; 00129 00130 /* Fixed point structure type. */ 00131 typedef struct { 00132 TW_INT16 Whole; /* maintains the sign */ 00133 TW_UINT16 Frac; 00134 } TW_FIX32, FAR *pTW_FIX32; 00135 00136 /**************************************************************************** 00137 * Structure Definitions * 00138 ****************************************************************************/ 00139 00140 /* No DAT needed. */ 00141 typedef struct { 00142 TW_FIX32 X; 00143 TW_FIX32 Y; 00144 TW_FIX32 Z; 00145 } TW_CIEPOINT, FAR * pTW_CIEPOINT; 00146 00147 /* No DAT needed. */ 00148 typedef struct { 00149 TW_FIX32 StartIn; 00150 TW_FIX32 BreakIn; 00151 TW_FIX32 EndIn; 00152 TW_FIX32 StartOut; 00153 TW_FIX32 BreakOut; 00154 TW_FIX32 EndOut; 00155 TW_FIX32 Gamma; 00156 TW_FIX32 SampleCount; /* if =0 use the gamma */ 00157 } TW_DECODEFUNCTION, FAR * pTW_DECODEFUNCTION; 00158 00159 /* No DAT needed. */ 00160 typedef struct { 00161 TW_UINT8 Index; /* Value used to index into the color table. */ 00162 TW_UINT8 Channel1; /* First tri-stimulus value (e.g Red) */ 00163 TW_UINT8 Channel2; /* Second tri-stimulus value (e.g Green) */ 00164 TW_UINT8 Channel3; /* Third tri-stimulus value (e.g Blue) */ 00165 } TW_ELEMENT8, FAR * pTW_ELEMENT8; 00166 00167 /* No DAT. Defines a frame rectangle in ICAP_UNITS coordinates. */ 00168 typedef struct { 00169 TW_FIX32 Left; 00170 TW_FIX32 Top; 00171 TW_FIX32 Right; 00172 TW_FIX32 Bottom; 00173 } TW_FRAME, FAR * pTW_FRAME; 00174 00175 /* No DAT needed. Used to manage memory buffers. */ 00176 typedef struct { 00177 TW_UINT32 Flags; /* Any combination of the TWMF_ constants. */ 00178 TW_UINT32 Length; /* Number of bytes stored in buffer TheMem. */ 00179 TW_MEMREF TheMem; /* Pointer or handle to the allocated memory buffer. */ 00180 } TW_MEMORY, FAR * pTW_MEMORY; 00181 00182 /* No DAT needed. */ 00183 typedef struct { 00184 TW_DECODEFUNCTION Decode[3]; 00185 TW_FIX32 Mix[3][3]; 00186 } TW_TRANSFORMSTAGE, FAR * pTW_TRANSFORMSTAGE; 00187 00188 /* No DAT needed. Describes version of software currently running. */ 00189 typedef struct { 00190 TW_UINT16 MajorNum; /* Major revision number of the software. */ 00191 TW_UINT16 MinorNum; /* Incremental revision number of the software. */ 00192 TW_UINT16 Language; /* e.g. TWLG_SWISSFRENCH */ 00193 TW_UINT16 Country; /* e.g. TWCY_SWITZERLAND */ 00194 TW_STR32 Info; /* e.g. "1.0b3 Beta release" */ 00195 } TW_VERSION, FAR * pTW_VERSION; 00196 00197 /* TWON_ARRAY. Container for array of values (a simplified TW_ENUMERATION) */ 00198 typedef struct { 00199 TW_UINT16 ItemType; 00200 TW_UINT32 NumItems; /* How many items in ItemList */ 00201 TW_UINT8 ItemList[1]; /* Array of ItemType values starts here */ 00202 } TW_ARRAY, FAR * pTW_ARRAY; 00203 00204 /* TWON_ENUMERATION. Container for a collection of values. */ 00205 typedef struct { 00206 TW_UINT16 ItemType; 00207 TW_UINT32 NumItems; /* How many items in ItemList */ 00208 TW_UINT32 CurrentIndex; /* Current value is in ItemList[CurrentIndex] */ 00209 TW_UINT32 DefaultIndex; /* Powerup value is in ItemList[DefaultIndex] */ 00210 TW_UINT8 ItemList[1]; /* Array of ItemType values starts here */ 00211 } TW_ENUMERATION, FAR * pTW_ENUMERATION; 00212 00213 /* TWON_ONEVALUE. Container for one value. */ 00214 typedef struct { 00215 TW_UINT16 ItemType; 00216 TW_UINT32 Item; 00217 } TW_ONEVALUE, FAR * pTW_ONEVALUE; 00218 00219 /* TWON_RANGE. Container for a range of values. */ 00220 typedef struct { 00221 TW_UINT16 ItemType; 00222 TW_UINT32 MinValue; /* Starting value in the range. */ 00223 TW_UINT32 MaxValue; /* Final value in the range. */ 00224 TW_UINT32 StepSize; /* Increment from MinValue to MaxValue. */ 00225 TW_UINT32 DefaultValue; /* Power-up value. */ 00226 TW_UINT32 CurrentValue; /* The value that is currently in effect. */ 00227 } TW_RANGE, FAR * pTW_RANGE; 00228 00229 /* DAT_CAPABILITY. Used by application to get/set capability from/in a data source. */ 00230 typedef struct { 00231 TW_UINT16 Cap; /* id of capability to set or get, e.g. CAP_BRIGHTNESS */ 00232 TW_UINT16 ConType; /* TWON_ONEVALUE, _RANGE, _ENUMERATION or _ARRAY */ 00233 TW_HANDLE hContainer; /* Handle to container of type Dat */ 00234 } TW_CAPABILITY, FAR * pTW_CAPABILITY; 00235 00236 /* DAT_CIECOLOR. */ 00237 typedef struct { 00238 TW_UINT16 ColorSpace; 00239 TW_INT16 LowEndian; 00240 TW_INT16 DeviceDependent; 00241 TW_INT32 VersionNumber; 00242 TW_TRANSFORMSTAGE StageABC; 00243 TW_TRANSFORMSTAGE StageLMN; 00244 TW_CIEPOINT WhitePoint; 00245 TW_CIEPOINT BlackPoint; 00246 TW_CIEPOINT WhitePaper; 00247 TW_CIEPOINT BlackInk; 00248 TW_FIX32 Samples[1]; 00249 } TW_CIECOLOR, FAR * pTW_CIECOLOR; 00250 00251 /* DAT_EVENT. For passing events down from the application to the DS. */ 00252 typedef struct { 00253 TW_MEMREF pEvent; /* Windows pMSG or Mac pEvent. */ 00254 TW_UINT16 TWMessage; /* TW msg from data source, e.g. MSG_XFERREADY */ 00255 } TW_EVENT, FAR * pTW_EVENT; 00256 00257 /* DAT_GRAYRESPONSE */ 00258 typedef struct { 00259 TW_ELEMENT8 Response[1]; 00260 } TW_GRAYRESPONSE, FAR * pTW_GRAYRESPONSE; 00261 00262 /* DAT_IDENTITY. Identifies the program/library/code resource. */ 00263 typedef struct { 00264 TW_UINT32 Id; /* Unique number. In Windows, application hWnd */ 00265 TW_VERSION Version; /* Identifies the piece of code */ 00266 TW_UINT16 ProtocolMajor; /* Application and DS must set to TWON_PROTOCOLMAJOR */ 00267 TW_UINT16 ProtocolMinor; /* Application and DS must set to TWON_PROTOCOLMINOR */ 00268 TW_UINT32 SupportedGroups; /* Bit field OR combination of DG_ constants */ 00269 TW_STR32 Manufacturer; /* Manufacturer name, e.g. "Hewlett-Packard" */ 00270 TW_STR32 ProductFamily; /* Product family name, e.g. "ScanJet" */ 00271 TW_STR32 ProductName; /* Product name, e.g. "ScanJet Plus" */ 00272 } TW_IDENTITY, FAR * pTW_IDENTITY; 00273 00274 /* DAT_IMAGEINFO. Application gets detailed image info from DS with this. */ 00275 typedef struct { 00276 TW_FIX32 XResolution; /* Resolution in the horizontal */ 00277 TW_FIX32 YResolution; /* Resolution in the vertical */ 00278 TW_INT32 ImageWidth; /* Columns in the image, -1 if unknown by DS*/ 00279 TW_INT32 ImageLength; /* Rows in the image, -1 if unknown by DS */ 00280 TW_INT16 SamplesPerPixel; /* Number of samples per pixel, 3 for RGB */ 00281 TW_INT16 BitsPerSample[8]; /* Number of bits for each sample */ 00282 TW_INT16 BitsPerPixel; /* Number of bits for each padded pixel */ 00283 TW_BOOL Planar; /* True if Planar, False if chunky */ 00284 TW_INT16 PixelType; /* How to interp data; photo interp (TWPT_) */ 00285 TW_UINT16 Compression; /* How the data is compressed (TWCP_xxxx) */ 00286 } TW_IMAGEINFO, FAR * pTW_IMAGEINFO; 00287 00288 /* DAT_IMAGELAYOUT. Provides image layout information in current units. */ 00289 typedef struct { 00290 TW_FRAME Frame; /* Frame coords within larger document */ 00291 TW_UINT32 DocumentNumber; 00292 TW_UINT32 PageNumber; /* Reset when you go to next document */ 00293 TW_UINT32 FrameNumber; /* Reset when you go to next page */ 00294 } TW_IMAGELAYOUT, FAR * pTW_IMAGELAYOUT; 00295 00296 /* DAT_IMAGEMEMXFER. Used to pass image data (e.g. in strips) from DS to application.*/ 00297 typedef struct { 00298 TW_UINT16 Compression; /* How the data is compressed */ 00299 TW_UINT32 BytesPerRow; /* Number of bytes in a row of data */ 00300 TW_UINT32 Columns; /* How many columns */ 00301 TW_UINT32 Rows; /* How many rows */ 00302 TW_UINT32 XOffset; /* How far from the side of the image */ 00303 TW_UINT32 YOffset; /* How far from the top of the image */ 00304 TW_UINT32 BytesWritten; /* How many bytes written in Memory */ 00305 TW_MEMORY Memory; /* Mem struct used to pass actual image data */ 00306 } TW_IMAGEMEMXFER, FAR * pTW_IMAGEMEMXFER; 00307 00308 /* Changed in 1.1: QuantTable, HuffmanDC, HuffmanAC TW_MEMREF -> TW_MEMORY */ 00309 /* DAT_JPEGCOMPRESSION. Based on JPEG Draft International Std, ver 10918-1. */ 00310 typedef struct { 00311 TW_UINT16 ColorSpace; /* One of the TWPT_xxxx values */ 00312 TW_UINT32 SubSampling; /* Two word "array" for subsampling values */ 00313 TW_UINT16 NumComponents; /* Number of color components in image */ 00314 TW_UINT16 RestartFrequency; /* Frequency of restart marker codes in MDU's */ 00315 TW_UINT16 QuantMap[4]; /* Mapping of components to QuantTables */ 00316 TW_MEMORY QuantTable[4]; /* Quantization tables */ 00317 TW_UINT16 HuffmanMap[4]; /* Mapping of components to Huffman tables */ 00318 TW_MEMORY HuffmanDC[2]; /* DC Huffman tables */ 00319 TW_MEMORY HuffmanAC[2]; /* AC Huffman tables */ 00320 } TW_JPEGCOMPRESSION, FAR * pTW_JPEGCOMPRESSION; 00321 00322 /* DAT_PALETTE8. Color palette when TWPT_PALETTE pixels xfer'd in mem buf. */ 00323 typedef struct { 00324 TW_UINT16 NumColors; /* Number of colors in the color table. */ 00325 TW_UINT16 PaletteType; /* TWPA_xxxx, specifies type of palette. */ 00326 TW_ELEMENT8 Colors[256]; /* Array of palette values starts here. */ 00327 } TW_PALETTE8, FAR * pTW_PALETTE8; 00328 00329 /* DAT_PENDINGXFERS. Used with MSG_ENDXFER to indicate additional data. */ 00330 typedef struct { 00331 TW_UINT16 Count; 00332 union { 00333 TW_UINT32 EOJ; 00334 TW_UINT32 Reserved; 00335 } DUMMYUNIONNAME; 00336 } TW_PENDINGXFERS, FAR *pTW_PENDINGXFERS; 00337 00338 /* DAT_RGBRESPONSE */ 00339 typedef struct { 00340 TW_ELEMENT8 Response[1]; 00341 } TW_RGBRESPONSE, FAR * pTW_RGBRESPONSE; 00342 00343 /* DAT_SETUPFILEXFER. Sets up DS to application data transfer via a file. */ 00344 typedef struct { 00345 TW_STR255 FileName; 00346 TW_UINT16 Format; /* Any TWFF_ constant */ 00347 TW_INT16 VRefNum; /* Used for Mac only */ 00348 } TW_SETUPFILEXFER, FAR * pTW_SETUPFILEXFER; 00349 00350 /* DAT_SETUPMEMXFER. Sets up DS to application data transfer via a memory buffer. */ 00351 typedef struct { 00352 TW_UINT32 MinBufSize; 00353 TW_UINT32 MaxBufSize; 00354 TW_UINT32 Preferred; 00355 } TW_SETUPMEMXFER, FAR * pTW_SETUPMEMXFER; 00356 00357 /* DAT_STATUS. Application gets detailed status info from a data source with this. */ 00358 typedef struct { 00359 TW_UINT16 ConditionCode; /* Any TWCC_ constant */ 00360 TW_UINT16 Reserved; /* Future expansion space */ 00361 } TW_STATUS, FAR * pTW_STATUS; 00362 00363 /* DAT_USERINTERFACE. Coordinates UI between application and data source. */ 00364 typedef struct { 00365 TW_BOOL ShowUI; /* TRUE if DS should bring up its UI */ 00366 TW_BOOL ModalUI; /* For Mac only - true if the DS's UI is modal */ 00367 TW_HANDLE hParent; /* For windows only - Application window handle */ 00368 } TW_USERINTERFACE, FAR * pTW_USERINTERFACE; 00369 00370 /* SDH - 03/21/95 - TWUNK */ 00371 /* DAT_TWUNKIDENTITY. Provides DS identity and 'other' information necessary */ 00372 /* across thunk link. */ 00373 typedef struct { 00374 TW_IDENTITY identity; /* Identity of data source. */ 00375 TW_STR255 dsPath; /* Full path and file name of data source. */ 00376 } TW_TWUNKIDENTITY, FAR * pTW_TWUNKIDENTITY; 00377 00378 /* SDH - 03/21/95 - TWUNK */ 00379 /* Provides DS_Entry parameters over thunk link. */ 00380 typedef struct 00381 { 00382 TW_INT8 destFlag; /* TRUE if dest is not NULL */ 00383 TW_IDENTITY dest; /* Identity of data source (if used) */ 00384 TW_INT32 dataGroup; /* DSM_Entry dataGroup parameter */ 00385 TW_INT16 dataArgType; /* DSM_Entry dataArgType parameter */ 00386 TW_INT16 message; /* DSM_Entry message parameter */ 00387 TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ 00388 /* TW_MEMREF pData; */ /* Based on implementation specifics, a */ 00389 /* pData parameter makes no sense in this */ 00390 /* structure, but data (if provided) will be*/ 00391 /* appended in the data block. */ 00392 } TW_TWUNKDSENTRYPARAMS, FAR * pTW_TWUNKDSENTRYPARAMS; 00393 00394 /* SDH - 03/21/95 - TWUNK */ 00395 /* Provides DS_Entry results over thunk link. */ 00396 typedef struct 00397 { 00398 TW_UINT16 returnCode; /* Thunker DsEntry return code. */ 00399 TW_UINT16 conditionCode; /* Thunker DsEntry condition code. */ 00400 TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ 00401 /* TW_MEMREF pData; */ /* Based on implementation specifics, a */ 00402 /* pData parameter makes no sense in this */ 00403 /* structure, but data (if provided) will be*/ 00404 /* appended in the data block. */ 00405 } TW_TWUNKDSENTRYRETURN, FAR * pTW_TWUNKDSENTRYRETURN; 00406 00407 /* WJD - 950818 */ 00408 /* Added for 1.6 Specification */ 00409 /* TWAIN 1.6 CAP_SUPPORTEDCAPSEXT structure */ 00410 typedef struct 00411 { 00412 TW_UINT16 Cap; /* Which CAP/ICAP info is relevant to */ 00413 TW_UINT16 Properties; /* Messages this CAP/ICAP supports */ 00414 } TW_CAPEXT, FAR * pTW_CAPEXT; 00415 00416 /* ----------------------------------------------------------------------- *\ 00417 00418 Version 1.7: Added Following data structure for Document Imaging 00419 July 1997 Enhancement. 00420 KHL TW_CUSTOMDSDATA -- For Saving and Restoring Source's 00421 state. 00422 TW_INFO -- Each attribute for extended image 00423 information. 00424 TW_EXTIMAGEINFO -- Extended image information structure. 00425 00426 \* ----------------------------------------------------------------------- */ 00427 00428 typedef struct { 00429 TW_UINT32 InfoLength; /* Length of Information in bytes. */ 00430 TW_HANDLE hData; /* Place holder for data, DS Allocates */ 00431 }TW_CUSTOMDSDATA, FAR *pTW_CUSTOMDSDATA; 00432 00433 typedef struct { 00434 TW_UINT16 InfoID; 00435 TW_UINT16 ItemType; 00436 TW_UINT16 NumItems; 00437 TW_UINT16 CondCode; 00438 TW_UINT32 Item; 00439 }TW_INFO, FAR* pTW_INFO; 00440 00441 typedef struct { 00442 TW_UINT32 NumInfos; 00443 TW_INFO Info[1]; 00444 }TW_EXTIMAGEINFO, FAR* pTW_EXTIMAGEINFO; 00445 00446 /* Added 1.8 */ 00447 00448 /* DAT_AUDIOINFO, information about audio data */ 00449 typedef struct { 00450 TW_STR255 Name; /* name of audio data */ 00451 TW_UINT32 Reserved; /* reserved space */ 00452 } TW_AUDIOINFO, FAR * pTW_AUDIOINFO; 00453 00454 /* DAT_DEVICEEVENT, information about events */ 00455 typedef struct { 00456 TW_UINT32 Event; /* One of the TWDE_xxxx values. */ 00457 TW_STR255 DeviceName; /* The name of the device that generated the event */ 00458 TW_UINT32 BatteryMinutes; /* Battery Minutes Remaining */ 00459 TW_INT16 BatteryPercentage; /* Battery Percentage Remaining */ 00460 TW_INT32 PowerSupply; /* Power Supply */ 00461 TW_FIX32 XResolution; /* Resolution */ 00462 TW_FIX32 YResolution; /* Resolution */ 00463 TW_UINT32 FlashUsed2; /* Flash Used2 */ 00464 TW_UINT32 AutomaticCapture; /* Automatic Capture */ 00465 TW_UINT32 TimeBeforeFirstCapture; /* Automatic Capture */ 00466 TW_UINT32 TimeBetweenCaptures; /* Automatic Capture */ 00467 } TW_DEVICEEVENT, FAR * pTW_DEVICEEVENT; 00468 00469 /* DAT_FILESYSTEM, information about TWAIN file system */ 00470 typedef struct { 00471 /* DG_CONTROL / DAT_FILESYSTEM / MSG_xxxx fields */ 00472 TW_STR255 InputName; /* The name of the input or source file */ 00473 TW_STR255 OutputName; /* The result of an operation or the name of a destination file */ 00474 TW_MEMREF Context; /* Source specific data used to remember state information */ 00475 /* DG_CONTROL / DAT_FILESYSTEM / MSG_DELETE field */ 00476 int Recursive; /* recursively delete all sub-directories */ 00477 /* DG_CONTROL / DAT_FILESYSTEM / MSG_GETINFO fields */ 00478 TW_INT32 FileType; /* One of the TWFT_xxxx values */ 00479 TW_UINT32 Size; /* Size of current FileType */ 00480 TW_STR32 CreateTimeDate; /* creation date of the file */ 00481 TW_STR32 ModifiedTimeDate; /* last date the file was modified */ 00482 TW_UINT32 FreeSpace; /* bytes of free space on the current device */ 00483 TW_INT32 NewImageSize; /* estimate of the amount of space a new image would take up */ 00484 TW_UINT32 NumberOfFiles; /* number of files, depends on FileType */ 00485 TW_UINT32 NumberOfSnippets; 00486 char Reserved[512]; 00487 } TW_FILESYSTEM, FAR * pTW_FILESYSTEM; 00488 00489 /* DAT_PASSTHRU, device dependent data to pass through Data Source */ 00490 typedef struct { 00491 TW_MEMREF pCommand; /* Pointer to Command buffer */ 00492 TW_UINT32 CommandBytes; /* Number of bytes in Command buffer */ 00493 TW_INT32 Direction; /* One of the TWDR_xxxx values. Defines the direction of data flow */ 00494 TW_MEMREF pData; /* Pointer to Data buffer */ 00495 TW_UINT32 DataBytes; /* Number of bytes in Data buffer */ 00496 TW_UINT32 DataBytesXfered; /* Number of bytes successfully transferred */ 00497 } TW_PASSTHRU, FAR * pTW_PASSTHRU; 00498 00499 /* DAT_SETUPAUDIOFILEXFER, information required to setup an audio file transfer */ 00500 typedef struct { 00501 TW_STR255 FileName; /* full path target file */ 00502 TW_UINT16 Format; /* one of TWAF_xxxx */ 00503 TW_INT16 VRefNum; 00504 } TW_SETUPAUDIOFILEXFER, FAR * pTW_SETUPAUDIOFILEXFER; 00505 00506 /**************************************************************************** 00507 * Generic Constants * 00508 ****************************************************************************/ 00509 00510 #define TWON_ARRAY 3 /* indicates TW_ARRAY container */ 00511 #define TWON_ENUMERATION 4 /* indicates TW_ENUMERATION container */ 00512 #define TWON_ONEVALUE 5 /* indicates TW_ONEVALUE container */ 00513 #define TWON_RANGE 6 /* indicates TW_RANGE container */ 00514 00515 #define TWON_ICONID 962 /* res Id of icon used in USERSELECT lbox */ 00516 #define TWON_DSMID 461 /* res Id of the DSM version num resource */ 00517 #define TWON_DSMCODEID 63 /* res Id of the Mac SM Code resource */ 00518 00519 #define TWON_DONTCARE8 0xff 00520 #define TWON_DONTCARE16 0xffff 00521 #define TWON_DONTCARE32 0xffffffff 00522 00523 /* Flags used in TW_MEMORY structure. */ 00524 #define TWMF_APPOWNS 0x1 00525 #define TWMF_DSMOWNS 0x2 00526 #define TWMF_DSOWNS 0x4 00527 #define TWMF_POINTER 0x8 00528 #define TWMF_HANDLE 0x10 00529 00530 /* Palette types for TW_PALETTE8 */ 00531 #define TWPA_RGB 0 00532 #define TWPA_GRAY 1 00533 #define TWPA_CMY 2 00534 00535 /* There are four containers used for capabilities negotiation: 00536 * TWON_ONEVALUE, TWON_RANGE, TWON_ENUMERATION, TWON_ARRAY 00537 * In each container structure ItemType can be TWTY_INT8, TWTY_INT16, etc. 00538 * The kind of data stored in the container can be determined by doing 00539 * DCItemSize[ItemType] where the following is defined in TWAIN glue code: 00540 * DCItemSize[]= { sizeof(TW_INT8), 00541 * sizeof(TW_INT16), 00542 * etc. 00543 * sizeof(TW_UINT32) }; 00544 * 00545 */ 00546 00547 #define TWTY_INT8 0x0000 /* Means Item is a TW_INT8 */ 00548 #define TWTY_INT16 0x0001 /* Means Item is a TW_INT16 */ 00549 #define TWTY_INT32 0x0002 /* Means Item is a TW_INT32 */ 00550 00551 #define TWTY_UINT8 0x0003 /* Means Item is a TW_UINT8 */ 00552 #define TWTY_UINT16 0x0004 /* Means Item is a TW_UINT16 */ 00553 #define TWTY_UINT32 0x0005 /* Means Item is a TW_UINT32 */ 00554 00555 #define TWTY_BOOL 0x0006 /* Means Item is a TW_BOOL */ 00556 00557 #define TWTY_FIX32 0x0007 /* Means Item is a TW_FIX32 */ 00558 00559 #define TWTY_FRAME 0x0008 /* Means Item is a TW_FRAME */ 00560 00561 #define TWTY_STR32 0x0009 /* Means Item is a TW_STR32 */ 00562 #define TWTY_STR64 0x000a /* Means Item is a TW_STR64 */ 00563 #define TWTY_STR128 0x000b /* Means Item is a TW_STR128 */ 00564 #define TWTY_STR255 0x000c /* Means Item is a TW_STR255 */ 00565 00566 /**************************************************************************** 00567 * Capability Constants * 00568 ****************************************************************************/ 00569 00570 /* ICAP_BITORDER values (BO_ means Bit Order) */ 00571 #define TWBO_LSBFIRST 0 00572 #define TWBO_MSBFIRST 1 00573 00574 /* ICAP_COMPRESSION values (CP_ means ComPression ) */ 00575 #define TWCP_NONE 0 00576 #define TWCP_PACKBITS 1 00577 #define TWCP_GROUP31D 2 /* Follows CCITT spec (no End Of Line) */ 00578 #define TWCP_GROUP31DEOL 3 /* Follows CCITT spec (has End Of Line) */ 00579 #define TWCP_GROUP32D 4 /* Follows CCITT spec (use cap for K Factor) */ 00580 #define TWCP_GROUP4 5 /* Follows CCITT spec */ 00581 #define TWCP_JPEG 6 /* Use capability for more info */ 00582 #define TWCP_LZW 7 /* Must license from Unisys and IBM to use */ 00583 #define TWCP_JBIG 8 /* For Bitonal images -- Added 1.7 KHL */ 00584 /* Added 1.8 */ 00585 #define TWCP_PNG 9 00586 #define TWCP_RLE4 10 00587 #define TWCP_RLE8 11 00588 #define TWCP_BITFIELDS 12 00589 00590 00591 /* ICAP_IMAGEFILEFORMAT values (FF_means File Format) */ 00592 #define TWFF_TIFF 0 /* Tagged Image File Format */ 00593 #define TWFF_PICT 1 /* Macintosh PICT */ 00594 #define TWFF_BMP 2 /* Windows Bitmap */ 00595 #define TWFF_XBM 3 /* X-Windows Bitmap */ 00596 #define TWFF_JFIF 4 /* JPEG File Interchange Format */ 00597 #define TWFF_FPX 5 /* Flash Pix */ 00598 #define TWFF_TIFFMULTI 6 /* Multi-page tiff file */ 00599 #define TWFF_PNG 7 00600 #define TWFF_SPIFF 8 00601 #define TWFF_EXIF 9 00602 00603 00604 /* ICAP_FILTER values (FT_ means Filter Type) */ 00605 #define TWFT_RED 0 00606 #define TWFT_GREEN 1 00607 #define TWFT_BLUE 2 00608 #define TWFT_NONE 3 00609 #define TWFT_WHITE 4 00610 #define TWFT_CYAN 5 00611 #define TWFT_MAGENTA 6 00612 #define TWFT_YELLOW 7 00613 #define TWFT_BLACK 8 00614 00615 /* ICAP_LIGHTPATH values (LP_ means Light Path) */ 00616 #define TWLP_REFLECTIVE 0 00617 #define TWLP_TRANSMISSIVE 1 00618 00619 /* ICAP_LIGHTSOURCE values (LS_ means Light Source) */ 00620 #define TWLS_RED 0 00621 #define TWLS_GREEN 1 00622 #define TWLS_BLUE 2 00623 #define TWLS_NONE 3 00624 #define TWLS_WHITE 4 00625 #define TWLS_UV 5 00626 #define TWLS_IR 6 00627 00628 /* ICAP_ORIENTATION values (OR_ means ORientation) */ 00629 #define TWOR_ROT0 0 00630 #define TWOR_ROT90 1 00631 #define TWOR_ROT180 2 00632 #define TWOR_ROT270 3 00633 #define TWOR_PORTRAIT TWOR_ROT0 00634 #define TWOR_LANDSCAPE TWOR_ROT270 00635 00636 /* ICAP_PLANARCHUNKY values (PC_ means Planar/Chunky ) */ 00637 #define TWPC_CHUNKY 0 00638 #define TWPC_PLANAR 1 00639 00640 /* ICAP_PIXELFLAVOR values (PF_ means Pixel Flavor) */ 00641 #define TWPF_CHOCOLATE 0 /* zero pixel represents darkest shade */ 00642 #define TWPF_VANILLA 1 /* zero pixel represents lightest shade */ 00643 00644 /* ICAP_PIXELTYPE values (PT_ means Pixel Type) */ 00645 #define TWPT_BW 0 /* Black and White */ 00646 #define TWPT_GRAY 1 00647 #define TWPT_RGB 2 00648 #define TWPT_PALETTE 3 00649 #define TWPT_CMY 4 00650 #define TWPT_CMYK 5 00651 #define TWPT_YUV 6 00652 #define TWPT_YUVK 7 00653 #define TWPT_CIEXYZ 8 00654 00655 /* ICAP_SUPPORTEDSIZES values (SS_ means Supported Sizes) */ 00656 #define TWSS_NONE 0 00657 #define TWSS_A4LETTER 1 00658 #define TWSS_B5LETTER 2 00659 #define TWSS_USLETTER 3 00660 #define TWSS_USLEGAL 4 00661 /* Added 1.5 */ 00662 #define TWSS_A5 5 00663 #define TWSS_B4 6 00664 #define TWSS_B6 7 00665 /*#define TWSS_B 8 */ 00666 /* Added 1.7 */ 00667 #define TWSS_USLEDGER 9 00668 #define TWSS_USEXECUTIVE 10 00669 #define TWSS_A3 11 00670 #define TWSS_B3 12 00671 #define TWSS_A6 13 00672 #define TWSS_C4 14 00673 #define TWSS_C5 15 00674 #define TWSS_C6 16 00675 /* Added 1.8 */ 00676 #define TWSS_4A0 17 00677 #define TWSS_2A0 18 00678 #define TWSS_A0 19 00679 #define TWSS_A1 20 00680 #define TWSS_A2 21 00681 #define TWSS_A4 TWSS_A4LETTER 00682 #define TWSS_A7 22 00683 #define TWSS_A8 23 00684 #define TWSS_A9 24 00685 #define TWSS_A10 25 00686 #define TWSS_ISOB0 26 00687 #define TWSS_ISOB1 27 00688 #define TWSS_ISOB2 28 00689 #define TWSS_ISOB3 TWSS_B3 00690 #define TWSS_ISOB4 TWSS_B4 00691 #define TWSS_ISOB5 29 00692 #define TWSS_ISOB6 TWSS_B6 00693 #define TWSS_ISOB7 30 00694 #define TWSS_ISOB8 31 00695 #define TWSS_ISOB9 32 00696 #define TWSS_ISOB10 33 00697 #define TWSS_JISB0 34 00698 #define TWSS_JISB1 35 00699 #define TWSS_JISB2 36 00700 #define TWSS_JISB3 37 00701 #define TWSS_JISB4 38 00702 #define TWSS_JISB5 TWSS_B5LETTER 00703 #define TWSS_JISB6 39 00704 #define TWSS_JISB7 40 00705 #define TWSS_JISB8 41 00706 #define TWSS_JISB9 42 00707 #define TWSS_JISB10 43 00708 #define TWSS_C0 44 00709 #define TWSS_C1 45 00710 #define TWSS_C2 46 00711 #define TWSS_C3 47 00712 #define TWSS_C7 48 00713 #define TWSS_C8 49 00714 #define TWSS_C9 50 00715 #define TWSS_C10 51 00716 #define TWSS_USSTATEMENT 52 00717 #define TWSS_BUSINESSCARD 53 00718 00719 /* ICAP_XFERMECH values (SX_ means Setup XFer) */ 00720 #define TWSX_NATIVE 0 00721 #define TWSX_FILE 1 00722 #define TWSX_MEMORY 2 00723 00724 /* ICAP_UNITS values (UN_ means UNits) */ 00725 #define TWUN_INCHES 0 00726 #define TWUN_CENTIMETERS 1 00727 #define TWUN_PICAS 2 00728 #define TWUN_POINTS 3 00729 #define TWUN_TWIPS 4 00730 #define TWUN_PIXELS 5 00731 00732 /* Added 1.5 */ 00733 /* ICAP_BITDEPTHREDUCTION values (BR_ means Bitdepth Reduction) */ 00734 #define TWBR_THRESHOLD 0 00735 #define TWBR_HALFTONE 1 00736 #define TWBR_CUSTHALFTONE 2 00737 #define TWBR_DIFFUSION 3 00738 00739 /* Added 1.7 */ 00740 /* ICAP_DUPLEX values */ 00741 #define TWDX_NONE 0 00742 #define TWDX_1PASSDUPLEX 1 00743 #define TWDX_2PASSDUPLEX 2 00744 00745 /* Added 1.7 */ 00746 /* TWEI_BARCODETYPE values */ 00747 #define TWBT_3OF9 0 00748 #define TWBT_2OF5INTERLEAVED 1 00749 #define TWBT_2OF5NONINTERLEAVED 2 00750 #define TWBT_CODE93 3 00751 #define TWBT_CODE128 4 00752 #define TWBT_UCC128 5 00753 #define TWBT_CODABAR 6 00754 #define TWBT_UPCA 7 00755 #define TWBT_UPCE 8 00756 #define TWBT_EAN8 9 00757 #define TWBT_EAN13 10 00758 #define TWBT_POSTNET 11 00759 #define TWBT_PDF417 12 00760 /* Added 1.8 */ 00761 #define TWBT_2OF5INDUSTRIAL 13 00762 #define TWBT_2OF5MATRIX 14 00763 #define TWBT_2OF5DATALOGIC 15 00764 #define TWBT_2OF5IATA 16 00765 #define TWBT_3OF9FULLASCII 17 00766 #define TWBT_CODABARWITHSTARTSTOP 18 00767 #define TWBT_MAXICODE 19 00768 00769 /* Added 1.7 */ 00770 /* TWEI_DESKEWSTATUS values */ 00771 #define TWDSK_SUCCESS 0 00772 #define TWDSK_REPORTONLY 1 00773 #define TWDSK_FAIL 2 00774 #define TWDSK_DISABLED 3 00775 00776 /* Added 1.7 */ 00777 /* TWEI_PATCHCODE values */ 00778 #define TWPCH_PATCH1 0 00779 #define TWPCH_PATCH2 1 00780 #define TWPCH_PATCH3 2 00781 #define TWPCH_PATCH4 3 00782 #define TWPCH_PATCH6 4 00783 #define TWPCH_PATCHT 5 00784 00785 /* Added 1.7 */ 00786 /* CAP_JOBCONTROL values */ 00787 #define TWJC_NONE 0 00788 #define TWJC_JSIC 1 00789 #define TWJC_JSIS 2 00790 #define TWJC_JSXC 3 00791 #define TWJC_JSXS 4 00792 00793 /* Added 1.7 */ 00794 /* TWEI_BARCODEROTATION values (BCOR_ means barcode rotation) */ 00795 #define TWBCOR_ROT0 0 00796 #define TWBCOR_ROT90 1 00797 #define TWBCOR_ROT180 2 00798 #define TWBCOR_ROT270 3 00799 #define TWBCOR_ROTX 4 00800 00801 /* Added 1.8 */ 00802 /* ACAP_AUDIOFILEFORMAT values (AF_ means audio format) */ 00803 #define TWAF_WAV 0 00804 #define TWAF_AIFF 1 00805 #define TWAF_AU 3 00806 #define TWAF_SND 4 00807 00808 /* CAP_ALARMS values (AL_ means alarms) */ 00809 #define TWAL_ALARM 0 00810 #define TWAL_FEEDERERROR 1 00811 #define TWAL_FEEDERWARNING 2 00812 #define TWAL_BARCODE 3 00813 #define TWAL_DOUBLEFEED 4 00814 #define TWAL_JAM 5 00815 #define TWAL_PATCHCODE 6 00816 #define TWAL_POWER 7 00817 #define TWAL_SKEW 8 00818 00819 /* CAP_CLEARBUFFERS values (CB_ means clear buffers) */ 00820 #define TWCB_AUTO 0 00821 #define TWCB_CLEAR 1 00822 #define TWCB_NOCLEAR 2 00823 00824 /* CAP_DEVICEEVENT values (DE_ means device event) */ 00825 #define TWDE_CUSTOMEVENTS 0x8000 00826 #define TWDE_CHECKAUTOMATICCAPTURE 0 00827 #define TWDE_CHECKBATTERY 1 00828 #define TWDE_CHECKDEVICEONLINE 2 00829 #define TWDE_CHECKFLASH 3 00830 #define TWDE_CHECKPOWERSUPPLY 4 00831 #define TWDE_CHECKRESOLUTION 5 00832 #define TWDE_DEVICEADDED 6 00833 #define TWDE_DEVICEOFFLINE 7 00834 #define TWDE_DEVICEREADY 8 00835 #define TWDE_DEVICEREMOVED 9 00836 #define TWDE_IMAGECAPTURED 10 00837 #define TWDE_IMAGEDELETED 11 00838 #define TWDE_PAPERDOUBLEFEED 12 00839 #define TWDE_PAPERJAM 13 00840 #define TWDE_LAMPFAILURE 14 00841 #define TWDE_POWERSAVE 15 00842 #define TWDE_POWERSAVENOTIFY 16 00843 00844 /* CAP_FEEDERALIGNMENT values (FA_ means feeder alignment) */ 00845 #define TWFA_NONE 0 00846 #define TWFA_LEFT 1 00847 #define TWFA_CENTER 2 00848 #define TWFA_RIGHT 3 00849 00850 /* CAP_FEEDERORDER values (FO_ means feeder order) */ 00851 #define TWFO_FIRSTPAGEFIRST 0 00852 #define TWFO_LASTPAGEFIRST 1 00853 00854 /* CAP_FILESYSTEM values (FS_ means file system) */ 00855 #define TWFS_FILESYSTEM 0 00856 #define TWFS_RECURSIVEDELETE 1 00857 00858 /* CAP_POWERSUPPLY values (PS_ means power supply) */ 00859 #define TWPS_EXTERNAL 0 00860 #define TWPS_BATTERY 1 00861 00862 /* CAP_PRINTER values (PR_ means printer) */ 00863 #define TWPR_IMPRINTERTOPBEFORE 0 00864 #define TWPR_IMPRINTERTOPAFTER 1 00865 #define TWPR_IMPRINTERBOTTOMBEFORE 2 00866 #define TWPR_IMPRINTERBOTTOMAFTER 3 00867 #define TWPR_ENDORSERTOPBEFORE 4 00868 #define TWPR_ENDORSERTOPAFTER 5 00869 #define TWPR_ENDORSERBOTTOMBEFORE 6 00870 #define TWPR_ENDORSERBOTTOMAFTER 7 00871 00872 /* CAP_PRINTERMODE values (PM_ means printer mode) */ 00873 #define TWPM_SINGLESTRING 0 00874 #define TWPM_MULTISTRING 1 00875 #define TWPM_COMPOUNDSTRING 2 00876 00877 /* ICAP_BARCODESEARCHMODE values (TWBD_ means search) */ 00878 #define TWBD_HORZ 0 00879 #define TWBD_VERT 1 00880 #define TWBD_HORZVERT 2 00881 #define TWBD_VERTHORZ 3 00882 00883 /* ICAP_FLASHUSED2 values (FL_ means flash) */ 00884 #define TWFL_NONE 0 00885 #define TWFL_OFF 1 00886 #define TWFL_ON 2 00887 #define TWFL_AUTO 3 00888 #define TWFL_REDEYE 4 00889 00890 /* ICAP_FLIPROTATION values (FR_ means flip rotation) */ 00891 #define TWFR_BOOK 0 00892 #define TWFR_FANFOLD 1 00893 00894 /* ICAP_IMAGEFILTER values (IF_ means image filter) */ 00895 #define TWIF_NONE 0 00896 #define TWIF_AUTO 1 00897 #define TWIF_LOWPASS 2 00898 #define TWIF_BANDPASS 3 00899 #define TWIF_HIGHPASS 4 00900 #define TWIF_TEXT TWIF_BANDPASS 00901 #define TWIF_FINELINE TWIF_HIGHPASS 00902 00903 /* ICAP_NOISEFILTER values (NF_ means noise filter) */ 00904 #define TWNF_NONE 0 00905 #define TWNF_AUTO 1 00906 #define TWNF_LONEPIXEL 2 00907 #define TWNF_MAJORITYRULE 3 00908 00909 /* ICAP_OVERSCAN values (OV_ means overscan) */ 00910 #define TWOV_NONE 0 00911 #define TWOV_AUTO 1 00912 #define TWOV_TOPBOTTOM 2 00913 #define TWOV_LEFTRIGHT 3 00914 #define TWOV_ALL 4 00915 00916 /* TW_FILESYSTEM.FileType values (FT_ means file type) */ 00917 #define TWFY_CAMERA 0 00918 #define TWFY_CAMERATOP 1 00919 #define TWFY_CAMERABOTTOM 2 00920 #define TWFY_CAMERAPREVIEW 3 00921 #define TWFY_DOMAIN 4 00922 #define TWFY_HOST 5 00923 #define TWFY_DIRECTORY 6 00924 #define TWFY_IMAGE 7 00925 #define TWFY_UNKNOWN 8 00926 00927 /**************************************************************************** 00928 * Country Constants * 00929 ****************************************************************************/ 00930 00931 #define TWCY_AFGHANISTAN 1001 00932 #define TWCY_ALGERIA 213 00933 #define TWCY_AMERICANSAMOA 684 00934 #define TWCY_ANDORRA 033 00935 #define TWCY_ANGOLA 1002 00936 #define TWCY_ANGUILLA 8090 00937 #define TWCY_ANTIGUA 8091 00938 #define TWCY_ARGENTINA 54 00939 #define TWCY_ARUBA 297 00940 #define TWCY_ASCENSIONI 247 00941 #define TWCY_AUSTRALIA 61 00942 #define TWCY_AUSTRIA 43 00943 #define TWCY_BAHAMAS 8092 00944 #define TWCY_BAHRAIN 973 00945 #define TWCY_BANGLADESH 880 00946 #define TWCY_BARBADOS 8093 00947 #define TWCY_BELGIUM 32 00948 #define TWCY_BELIZE 501 00949 #define TWCY_BENIN 229 00950 #define TWCY_BERMUDA 8094 00951 #define TWCY_BHUTAN 1003 00952 #define TWCY_BOLIVIA 591 00953 #define TWCY_BOTSWANA 267 00954 #define TWCY_BRITAIN 6 00955 #define TWCY_BRITVIRGINIS 8095 00956 #define TWCY_BRAZIL 55 00957 #define TWCY_BRUNEI 673 00958 #define TWCY_BULGARIA 359 00959 #define TWCY_BURKINAFASO 1004 00960 #define TWCY_BURMA 1005 00961 #define TWCY_BURUNDI 1006 00962 #define TWCY_CAMAROON 237 00963 #define TWCY_CANADA 2 00964 #define TWCY_CAPEVERDEIS 238 00965 #define TWCY_CAYMANIS 8096 00966 #define TWCY_CENTRALAFREP 1007 00967 #define TWCY_CHAD 1008 00968 #define TWCY_CHILE 56 00969 #define TWCY_CHINA 86 00970 #define TWCY_CHRISTMASIS 1009 00971 #define TWCY_COCOSIS 1009 00972 #define TWCY_COLOMBIA 57 00973 #define TWCY_COMOROS 1010 00974 #define TWCY_CONGO 1011 00975 #define TWCY_COOKIS 1012 00976 #define TWCY_COSTARICA 506 00977 #define TWCY_CUBA 005 00978 #define TWCY_CYPRUS 357 00979 #define TWCY_CZECHOSLOVAKIA 42 00980 #define TWCY_DENMARK 45 00981 #define TWCY_DJIBOUTI 1013 00982 #define TWCY_DOMINICA 8097 00983 #define TWCY_DOMINCANREP 8098 00984 #define TWCY_EASTERIS 1014 00985 #define TWCY_ECUADOR 593 00986 #define TWCY_EGYPT 20 00987 #define TWCY_ELSALVADOR 503 00988 #define TWCY_EQGUINEA 1015 00989 #define TWCY_ETHIOPIA 251 00990 #define TWCY_FALKLANDIS 1016 00991 #define TWCY_FAEROEIS 298 00992 #define TWCY_FIJIISLANDS 679 00993 #define TWCY_FINLAND 358 00994 #define TWCY_FRANCE 33 00995 #define TWCY_FRANTILLES 596 00996 #define TWCY_FRGUIANA 594 00997 #define TWCY_FRPOLYNEISA 689 00998 #define TWCY_FUTANAIS 1043 00999 #define TWCY_GABON 241 01000 #define TWCY_GAMBIA 220 01001 #define TWCY_GERMANY 49 01002 #define TWCY_GHANA 233 01003 #define TWCY_GIBRALTER 350 01004 #define TWCY_GREECE 30 01005 #define TWCY_GREENLAND 299 01006 #define TWCY_GRENADA 8099 01007 #define TWCY_GRENEDINES 8015 01008 #define TWCY_GUADELOUPE 590 01009 #define TWCY_GUAM 671 01010 #define TWCY_GUANTANAMOBAY 5399 01011 #define TWCY_GUATEMALA 502 01012 #define TWCY_GUINEA 224 01013 #define TWCY_GUINEABISSAU 1017 01014 #define TWCY_GUYANA 592 01015 #define TWCY_HAITI 509 01016 #define TWCY_HONDURAS 504 01017 #define TWCY_HONGKONG 852 01018 #define TWCY_HUNGARY 36 01019 #define TWCY_ICELAND 354 01020 #define TWCY_INDIA 91 01021 #define TWCY_INDONESIA 62 01022 #define TWCY_IRAN 98 01023 #define TWCY_IRAQ 964 01024 #define TWCY_IRELAND 353 01025 #define TWCY_ISRAEL 972 01026 #define TWCY_ITALY 39 01027 #define TWCY_IVORYCOAST 225 01028 #define TWCY_JAMAICA 8010 01029 #define TWCY_JAPAN 81 01030 #define TWCY_JORDAN 962 01031 #define TWCY_KENYA 254 01032 #define TWCY_KIRIBATI 1018 01033 #define TWCY_KOREA 82 01034 #define TWCY_KUWAIT 965 01035 #define TWCY_LAOS 1019 01036 #define TWCY_LEBANON 1020 01037 #define TWCY_LIBERIA 231 01038 #define TWCY_LIBYA 218 01039 #define TWCY_LIECHTENSTEIN 41 01040 #define TWCY_LUXENBOURG 352 01041 #define TWCY_MACAO 853 01042 #define TWCY_MADAGASCAR 1021 01043 #define TWCY_MALAWI 265 01044 #define TWCY_MALAYSIA 60 01045 #define TWCY_MALDIVES 960 01046 #define TWCY_MALI 1022 01047 #define TWCY_MALTA 356 01048 #define TWCY_MARSHALLIS 692 01049 #define TWCY_MAURITANIA 1023 01050 #define TWCY_MAURITIUS 230 01051 #define TWCY_MEXICO 3 01052 #define TWCY_MICRONESIA 691 01053 #define TWCY_MIQUELON 508 01054 #define TWCY_MONACO 33 01055 #define TWCY_MONGOLIA 1024 01056 #define TWCY_MONTSERRAT 8011 01057 #define TWCY_MOROCCO 212 01058 #define TWCY_MOZAMBIQUE 1025 01059 #define TWCY_NAMIBIA 264 01060 #define TWCY_NAURU 1026 01061 #define TWCY_NEPAL 977 01062 #define TWCY_NETHERLANDS 31 01063 #define TWCY_NETHANTILLES 599 01064 #define TWCY_NEVIS 8012 01065 #define TWCY_NEWCALEDONIA 687 01066 #define TWCY_NEWZEALAND 64 01067 #define TWCY_NICARAGUA 505 01068 #define TWCY_NIGER 227 01069 #define TWCY_NIGERIA 234 01070 #define TWCY_NIUE 1027 01071 #define TWCY_NORFOLKI 1028 01072 #define TWCY_NORWAY 47 01073 #define TWCY_OMAN 968 01074 #define TWCY_PAKISTAN 92 01075 #define TWCY_PALAU 1029 01076 #define TWCY_PANAMA 507 01077 #define TWCY_PARAGUAY 595 01078 #define TWCY_PERU 51 01079 #define TWCY_PHILLIPPINES 63 01080 #define TWCY_PITCAIRNIS 1030 01081 #define TWCY_PNEWGUINEA 675 01082 #define TWCY_POLAND 48 01083 #define TWCY_PORTUGAL 351 01084 #define TWCY_QATAR 974 01085 #define TWCY_REUNIONI 1031 01086 #define TWCY_ROMANIA 40 01087 #define TWCY_RWANDA 250 01088 #define TWCY_SAIPAN 670 01089 #define TWCY_SANMARINO 39 01090 #define TWCY_SAOTOME 1033 01091 #define TWCY_SAUDIARABIA 966 01092 #define TWCY_SENEGAL 221 01093 #define TWCY_SEYCHELLESIS 1034 01094 #define TWCY_SIERRALEONE 1035 01095 #define TWCY_SINGAPORE 65 01096 #define TWCY_SOLOMONIS 1036 01097 #define TWCY_SOMALI 1037 01098 #define TWCY_SOUTHAFRICA 27 01099 #define TWCY_SPAIN 34 01100 #define TWCY_SRILANKA 94 01101 #define TWCY_STHELENA 1032 01102 #define TWCY_STKITTS 8013 01103 #define TWCY_STLUCIA 8014 01104 #define TWCY_STPIERRE 508 01105 #define TWCY_STVINCENT 8015 01106 #define TWCY_SUDAN 1038 01107 #define TWCY_SURINAME 597 01108 #define TWCY_SWAZILAND 268 01109 #define TWCY_SWEDEN 46 01110 #define TWCY_SWITZERLAND 41 01111 #define TWCY_SYRIA 1039 01112 #define TWCY_TAIWAN 886 01113 #define TWCY_TANZANIA 255 01114 #define TWCY_THAILAND 66 01115 #define TWCY_TOBAGO 8016 01116 #define TWCY_TOGO 228 01117 #define TWCY_TONGAIS 676 01118 #define TWCY_TRINIDAD 8016 01119 #define TWCY_TUNISIA 216 01120 #define TWCY_TURKEY 90 01121 #define TWCY_TURKSCAICOS 8017 01122 #define TWCY_TUVALU 1040 01123 #define TWCY_UGANDA 256 01124 #define TWCY_USSR 7 01125 #define TWCY_UAEMIRATES 971 01126 #define TWCY_UNITEDKINGDOM 44 01127 #define TWCY_USA 1 01128 #define TWCY_URUGUAY 598 01129 #define TWCY_VANUATU 1041 01130 #define TWCY_VATICANCITY 39 01131 #define TWCY_VENEZUELA 58 01132 #define TWCY_WAKE 1042 01133 #define TWCY_WALLISIS 1043 01134 #define TWCY_WESTERNSAHARA 1044 01135 #define TWCY_WESTERNSAMOA 1045 01136 #define TWCY_YEMEN 1046 01137 #define TWCY_YUGOSLAVIA 38 01138 #define TWCY_ZAIRE 243 01139 #define TWCY_ZAMBIA 260 01140 #define TWCY_ZIMBABWE 263 01141 /* Added for 1.8 */ 01142 #define TWCY_ALBANIA 355 01143 #define TWCY_ARMENIA 374 01144 #define TWCY_AZERBAIJAN 994 01145 #define TWCY_BELARUS 375 01146 #define TWCY_BOSNIAHERZGO 387 01147 #define TWCY_CAMBODIA 855 01148 #define TWCY_CROATIA 385 01149 #define TWCY_CZECHREPUBLIC 420 01150 #define TWCY_DIEGOGARCIA 246 01151 #define TWCY_ERITREA 291 01152 #define TWCY_ESTONIA 372 01153 #define TWCY_GEORGIA 995 01154 #define TWCY_LATVIA 371 01155 #define TWCY_LESOTHO 266 01156 #define TWCY_LITHUANIA 370 01157 #define TWCY_MACEDONIA 389 01158 #define TWCY_MAYOTTEIS 269 01159 #define TWCY_MOLDOVA 373 01160 #define TWCY_MYANMAR 95 01161 #define TWCY_NORTHKOREA 850 01162 #define TWCY_PUERTORICO 787 01163 #define TWCY_RUSSIA 7 01164 #define TWCY_SERBIA 381 01165 #define TWCY_SLOVAKIA 421 01166 #define TWCY_SLOVENIA 386 01167 #define TWCY_SOUTHKOREA 82 01168 #define TWCY_UKRAINE 380 01169 #define TWCY_USVIRGINIS 340 01170 #define TWCY_VIETNAM 84 01171 01172 /**************************************************************************** 01173 * Language Constants * 01174 ****************************************************************************/ 01175 01176 #define TWLG_DAN 0 /* Danish */ 01177 #define TWLG_DUT 1 /* Dutch */ 01178 #define TWLG_ENG 2 /* International English */ 01179 #define TWLG_FCF 3 /* French Canadian */ 01180 #define TWLG_FIN 4 /* Finnish */ 01181 #define TWLG_FRN 5 /* French */ 01182 #define TWLG_GER 6 /* German */ 01183 #define TWLG_ICE 7 /* Icelandic */ 01184 #define TWLG_ITN 8 /* Italian */ 01185 #define TWLG_NOR 9 /* Norwegian */ 01186 #define TWLG_POR 10 /* Portuguese */ 01187 #define TWLG_SPA 11 /* Spanish */ 01188 #define TWLG_SWE 12 /* Swedish */ 01189 #define TWLG_USA 13 /* U.S. English */ 01190 /* Added for 1.8 */ 01191 #define TWLG_USERLOCALE -1 01192 #define TWLG_AFRIKAANS 14 01193 #define TWLG_ALBANIA 15 01194 #define TWLG_ARABIC 16 01195 #define TWLG_ARABIC_ALGERIA 17 01196 #define TWLG_ARABIC_BAHRAIN 18 01197 #define TWLG_ARABIC_EGYPT 19 01198 #define TWLG_ARABIC_IRAQ 20 01199 #define TWLG_ARABIC_JORDAN 21 01200 #define TWLG_ARABIC_KUWAIT 22 01201 #define TWLG_ARABIC_LEBANON 23 01202 #define TWLG_ARABIC_LIBYA 24 01203 #define TWLG_ARABIC_MOROCCO 25 01204 #define TWLG_ARABIC_OMAN 26 01205 #define TWLG_ARABIC_QATAR 27 01206 #define TWLG_ARABIC_SAUDIARABIA 28 01207 #define TWLG_ARABIC_SYRIA 29 01208 #define TWLG_ARABIC_TUNISIA 30 01209 #define TWLG_ARABIC_UAE 31 /* United Arabic Emirates */ 01210 #define TWLG_ARABIC_YEMEN 32 01211 #define TWLG_BASQUE 33 01212 #define TWLG_BYELORUSSIAN 34 01213 #define TWLG_BULGARIAN 35 01214 #define TWLG_CATALAN 36 01215 #define TWLG_CHINESE 37 01216 #define TWLG_CHINESE_HONGKONG 38 01217 #define TWLG_CHINESE_PRC 39 /* People's Republic of China */ 01218 #define TWLG_CHINESE_SINGAPORE 40 01219 #define TWLG_CHINESE_SIMPLIFIED 41 01220 #define TWLG_CHINESE_TAIWAN 42 01221 #define TWLG_CHINESE_TRADITIONAL 43 01222 #define TWLG_CROATIA 44 01223 #define TWLG_CZECH 45 01224 #define TWLG_DANISH TWLG_DAN 01225 #define TWLG_DUTCH TWLG_DUT 01226 #define TWLG_DUTCH_BELGIAN 46 01227 #define TWLG_ENGLISH TWLG_ENG 01228 #define TWLG_ENGLISH_AUSTRALIAN 47 01229 #define TWLG_ENGLISH_CANADIAN 48 01230 #define TWLG_ENGLISH_IRELAND 49 01231 #define TWLG_ENGLISH_NEWZEALAND 50 01232 #define TWLG_ENGLISH_SOUTHAFRICA 51 01233 #define TWLG_ENGLISH_UK 52 01234 #define TWLG_ENGLISH_USA TWLG_USA 01235 #define TWLG_ESTONIAN 53 01236 #define TWLG_FAEROESE 54 01237 #define TWLG_FARSI 55 01238 #define TWLG_FINNISH TWLG_FIN 01239 #define TWLG_FRENCH TWLG_FRN 01240 #define TWLG_FRENCH_BELGIAN 56 01241 #define TWLG_FRENCH_CANADIAN TWLG_FCF 01242 #define TWLG_FRENCH_LUXEMBOURG 57 01243 #define TWLG_FRENCH_SWISS 58 01244 #define TWLG_GERMAN TWLG_GER 01245 #define TWLG_GERMAN_AUSTRIAN 59 01246 #define TWLG_GERMAN_LUXEMBOURG 60 01247 #define TWLG_GERMAN_LIECHTENSTEIN 61 01248 #define TWLG_GERMAN_SWISS 62 01249 #define TWLG_GREEK 63 01250 #define TWLG_HEBREW 64 01251 #define TWLG_HUNGARIAN 65 01252 #define TWLG_ICELANDIC TWLG_ICE 01253 #define TWLG_INDONESIAN 66 01254 #define TWLG_ITALIAN TWLG_ITN 01255 #define TWLG_ITALIAN_SWISS 67 01256 #define TWLG_JAPANESE 68 01257 #define TWLG_KOREAN 69 01258 #define TWLG_KOREAN_JOHAB 70 01259 #define TWLG_LATVIAN 71 01260 #define TWLG_LITHUANIAN 72 01261 #define TWLG_NORWEGIAN TWLG_NOR 01262 #define TWLG_NORWEGIAN_BOKMAL 73 01263 #define TWLG_NORWEGIAN_NYNORSK 74 01264 #define TWLG_POLISH 75 01265 #define TWLG_PORTUGUESE TWLG_POR 01266 #define TWLG_PORTUGUESE_BRAZIL 76 01267 #define TWLG_ROMANIAN 77 01268 #define TWLG_RUSSIAN 78 01269 #define TWLG_SERBIAN_LATIN 79 01270 #define TWLG_SLOVAK 80 01271 #define TWLG_SLOVENIAN 81 01272 #define TWLG_SPANISH TWLG_SPA 01273 #define TWLG_SPANISH_MEXICAN 82 01274 #define TWLG_SPANISH_MODERN 83 01275 #define TWLG_SWEDISH TWLG_SWE 01276 #define TWLG_THAI 84 01277 #define TWLG_TURKISH 85 01278 #define TWLG_UKRANIAN 86 01279 /* More stuff added for 1.8 */ 01280 #define TWLG_ASSAMESE 87 01281 #define TWLG_BENGALI 88 01282 #define TWLG_BIHARI 89 01283 #define TWLG_BODO 90 01284 #define TWLG_DOGRI 91 01285 #define TWLG_GUJARATI 92 01286 #define TWLG_HARYANVI 93 01287 #define TWLG_HINDI 94 01288 #define TWLG_KANNADA 95 01289 #define TWLG_KASHMIRI 96 01290 #define TWLG_MALAYALAM 97 01291 #define TWLG_MARATHI 98 01292 #define TWLG_MARWARI 99 01293 #define TWLG_MEGHALAYAN 100 01294 #define TWLG_MIZO 101 01295 #define TWLG_NAGA 102 01296 #define TWLG_ORISSI 103 01297 #define TWLG_PUNJABI 104 01298 #define TWLG_PUSHTU 105 01299 #define TWLG_SERBIAN_CYRILLIC 106 01300 #define TWLG_SIKKIMI 107 01301 #define TWLG_SWEDISH_FINLAND 108 01302 #define TWLG_TAMIL 109 01303 #define TWLG_TELUGU 110 01304 #define TWLG_TRIPURI 111 01305 #define TWLG_URDU 112 01306 #define TWLG_VIETNAMESE 113 01307 01308 /**************************************************************************** 01309 * Data Groups * 01310 ****************************************************************************/ 01311 01312 /* More Data Groups may be added in the future. 01313 * Possible candidates include text, vector graphics, sound, etc. 01314 * NOTE: Data Group constants must be powers of 2 as they are used 01315 * as bitflags when Application asks DSM to present a list of DSs. 01316 */ 01317 01318 #define DG_CONTROL 0x0001L /* data pertaining to control */ 01319 #define DG_IMAGE 0x0002L /* data pertaining to raster images */ 01320 /* Added 1.8 */ 01321 #define DG_AUDIO 0x0004L /* data pertaining to audio */ 01322 01323 /**************************************************************************** 01324 * Data Argument Types * 01325 ****************************************************************************/ 01326 01327 /* SDH - 03/23/95 - WATCH */ 01328 /* The thunker requires knowledge about size of data being passed in the */ 01329 /* lpData parameter to DS_Entry (which is not readily available due to */ 01330 /* type LPVOID. Thus, we key off the DAT_ argument to determine the size. */ 01331 /* This has a couple implications: */ 01332 /* 1) Any additional DAT_ features require modifications to the thunk code */ 01333 /* for thunker support. */ 01334 /* 2) Any applications which use the custom capabailites are not supported */ 01335 /* under thunking since we have no way of knowing what size data (if */ 01336 /* any) is being passed. */ 01337 01338 #define DAT_NULL 0x0000 /* No data or structure. */ 01339 #define DAT_CUSTOMBASE 0x8000 /* Base of custom DATs. */ 01340 01341 /* Data Argument Types for the DG_CONTROL Data Group. */ 01342 #define DAT_CAPABILITY 0x0001 /* TW_CAPABILITY */ 01343 #define DAT_EVENT 0x0002 /* TW_EVENT */ 01344 #define DAT_IDENTITY 0x0003 /* TW_IDENTITY */ 01345 #define DAT_PARENT 0x0004 /* TW_HANDLE, application win handle in Windows */ 01346 #define DAT_PENDINGXFERS 0x0005 /* TW_PENDINGXFERS */ 01347 #define DAT_SETUPMEMXFER 0x0006 /* TW_SETUPMEMXFER */ 01348 #define DAT_SETUPFILEXFER 0x0007 /* TW_SETUPFILEXFER */ 01349 #define DAT_STATUS 0x0008 /* TW_STATUS */ 01350 #define DAT_USERINTERFACE 0x0009 /* TW_USERINTERFACE */ 01351 #define DAT_XFERGROUP 0x000a /* TW_UINT32 */ 01352 /* SDH - 03/21/95 - TWUNK */ 01353 /* Additional message required for thunker to request the special */ 01354 /* identity information. */ 01355 #define DAT_TWUNKIDENTITY 0x000b /* TW_TWUNKIDENTITY */ 01356 #define DAT_CUSTOMDSDATA 0x000c /* TW_CUSTOMDSDATA. */ 01357 /* Added 1.8 */ 01358 #define DAT_DEVICEEVENT 0x000d /* TW_DEVICEEVENT */ 01359 #define DAT_FILESYSTEM 0x000e /* TW_FILESYSTEM */ 01360 #define DAT_PASSTHRU 0x000f /* TW_PASSTHRU */ 01361 01362 /* Data Argument Types for the DG_IMAGE Data Group. */ 01363 #define DAT_IMAGEINFO 0x0101 /* TW_IMAGEINFO */ 01364 #define DAT_IMAGELAYOUT 0x0102 /* TW_IMAGELAYOUT */ 01365 #define DAT_IMAGEMEMXFER 0x0103 /* TW_IMAGEMEMXFER */ 01366 #define DAT_IMAGENATIVEXFER 0x0104 /* TW_UINT32 loword is hDIB, PICHandle */ 01367 #define DAT_IMAGEFILEXFER 0x0105 /* Null data */ 01368 #define DAT_CIECOLOR 0x0106 /* TW_CIECOLOR */ 01369 #define DAT_GRAYRESPONSE 0x0107 /* TW_GRAYRESPONSE */ 01370 #define DAT_RGBRESPONSE 0x0108 /* TW_RGBRESPONSE */ 01371 #define DAT_JPEGCOMPRESSION 0x0109 /* TW_JPEGCOMPRESSION */ 01372 #define DAT_PALETTE8 0x010a /* TW_PALETTE8 */ 01373 #define DAT_EXTIMAGEINFO 0x010b /* TW_EXTIMAGEINFO -- for 1.7 Spec. */ 01374 01375 /* Added 1.8 */ 01376 /* Data Argument Types for the DG_AUDIO Data Group. */ 01377 #define DAT_AUDIOFILEXFER 0x0201 /* Null data */ 01378 #define DAT_AUDIOINFO 0x0202 /* TW_AUDIOINFO */ 01379 #define DAT_AUDIONATIVEXFER 0x0203 /* TW_UINT32 handle to WAV, (AIFF Mac) */ 01380 01381 /**************************************************************************** 01382 * Messages * 01383 ****************************************************************************/ 01384 01385 /* All message constants are unique. 01386 * Messages are grouped according to which DATs they are used with.*/ 01387 01388 #define MSG_NULL 0x0000 /* Used in TW_EVENT structure */ 01389 #define MSG_CUSTOMBASE 0x8000 /* Base of custom messages */ 01390 01391 /* Generic messages may be used with any of several DATs. */ 01392 #define MSG_GET 0x0001 /* Get one or more values */ 01393 #define MSG_GETCURRENT 0x0002 /* Get current value */ 01394 #define MSG_GETDEFAULT 0x0003 /* Get default (e.g. power up) value */ 01395 #define MSG_GETFIRST 0x0004 /* Get first of a series of items, e.g. DSs */ 01396 #define MSG_GETNEXT 0x0005 /* Iterate through a series of items. */ 01397 #define MSG_SET 0x0006 /* Set one or more values */ 01398 #define MSG_RESET 0x0007 /* Set current value to default value */ 01399 #define MSG_QUERYSUPPORT 0x0008 /* Get supported operations on the cap. */ 01400 01401 /* Messages used with DAT_NULL */ 01402 #define MSG_XFERREADY 0x0101 /* The data source has data ready */ 01403 #define MSG_CLOSEDSREQ 0x0102 /* Request for Application. to close DS */ 01404 #define MSG_CLOSEDSOK 0x0103 /* Tell the Application. to save the state. */ 01405 /* Added 1.8 */ 01406 #define MSG_DEVICEEVENT 0X0104 /* Some event has taken place */ 01407 01408 /* Messages used with a pointer to a DAT_STATUS structure */ 01409 #define MSG_CHECKSTATUS 0x0201 /* Get status information */ 01410 01411 /* Messages used with a pointer to DAT_PARENT data */ 01412 #define MSG_OPENDSM 0x0301 /* Open the DSM */ 01413 #define MSG_CLOSEDSM 0x0302 /* Close the DSM */ 01414 01415 /* Messages used with a pointer to a DAT_IDENTITY structure */ 01416 #define MSG_OPENDS 0x0401 /* Open a data source */ 01417 #define MSG_CLOSEDS 0x0402 /* Close a data source */ 01418 #define MSG_USERSELECT 0x0403 /* Put up a dialog of all DS */ 01419 01420 /* Messages used with a pointer to a DAT_USERINTERFACE structure */ 01421 #define MSG_DISABLEDS 0x0501 /* Disable data transfer in the DS */ 01422 #define MSG_ENABLEDS 0x0502 /* Enable data transfer in the DS */ 01423 #define MSG_ENABLEDSUIONLY 0x0503 /* Enable for saving DS state only. */ 01424 01425 /* Messages used with a pointer to a DAT_EVENT structure */ 01426 #define MSG_PROCESSEVENT 0x0601 01427 01428 /* Messages used with a pointer to a DAT_PENDINGXFERS structure */ 01429 #define MSG_ENDXFER 0x0701 01430 01431 /* Added 1.8 */ 01432 /* Messages used with a pointer to a DAT_FILESYSTEM structure */ 01433 #define MSG_CHANGEDIRECTORY 0x0801 01434 #define MSG_CREATEDIRECTORY 0x0802 01435 #define MSG_DELETE 0x0803 01436 #define MSG_FORMATMEDIA 0x0804 01437 #define MSG_GETCLOSE 0x0805 01438 #define MSG_GETFIRSTFILE 0x0806 01439 #define MSG_GETINFO 0x0807 01440 #define MSG_GETNEXTFILE 0x0808 01441 #define MSG_RENAME 0x0809 01442 01443 /* Messages used with a pointer to a DAT_PASSTHRU structure */ 01444 #define MSG_PASSTHRU 0x0901 01445 01446 /**************************************************************************** 01447 * Capabilities * 01448 ****************************************************************************/ 01449 01450 #define CAP_CUSTOMBASE 0x8000 /* Base of custom capabilities */ 01451 01452 /* all data sources are REQUIRED to support these caps */ 01453 #define CAP_XFERCOUNT 0x0001 01454 01455 /* image data sources are REQUIRED to support these caps */ 01456 #define ICAP_COMPRESSION 0x0100 01457 #define ICAP_PIXELTYPE 0x0101 01458 #define ICAP_UNITS 0x0102 /* default is TWUN_INCHES */ 01459 #define ICAP_XFERMECH 0x0103 01460 01461 /* all data sources MAY support these caps */ 01462 #define CAP_AUTHOR 0x1000 01463 #define CAP_CAPTION 0x1001 01464 #define CAP_FEEDERENABLED 0x1002 01465 #define CAP_FEEDERLOADED 0x1003 01466 #define CAP_TIMEDATE 0x1004 01467 #define CAP_SUPPORTEDCAPS 0x1005 01468 #define CAP_EXTENDEDCAPS 0x1006 01469 #define CAP_AUTOFEED 0x1007 01470 #define CAP_CLEARPAGE 0x1008 01471 #define CAP_FEEDPAGE 0x1009 01472 #define CAP_REWINDPAGE 0x100a 01473 #define CAP_INDICATORS 0x100b /* Added 1.1 */ 01474 #define CAP_SUPPORTEDCAPSEXT 0x100c /* Added 1.6 */ 01475 #define CAP_PAPERDETECTABLE 0x100d /* Added 1.6 */ 01476 #define CAP_UICONTROLLABLE 0x100e /* Added 1.6 */ 01477 #define CAP_DEVICEONLINE 0x100f /* Added 1.6 */ 01478 #define CAP_AUTOSCAN 0x1010 /* Added 1.6 */ 01479 #define CAP_THUMBNAILSENABLED 0x1011 /* Added 1.7 */ 01480 #define CAP_DUPLEX 0x1012 /* Added 1.7 */ 01481 #define CAP_DUPLEXENABLED 0x1013 /* Added 1.7 */ 01482 #define CAP_ENABLEDSUIONLY 0x1014 /* Added 1.7 */ 01483 #define CAP_CUSTOMDSDATA 0x1015 /* Added 1.7 */ 01484 #define CAP_ENDORSER 0x1016 /* Added 1.7 */ 01485 #define CAP_JOBCONTROL 0x1017 /* Added 1.7 */ 01486 #define CAP_ALARMS 0x1018 /* Added 1.8 */ 01487 #define CAP_ALARMVOLUME 0x1019 /* Added 1.8 */ 01488 #define CAP_AUTOMATICCAPTURE 0x101a /* Added 1.8 */ 01489 #define CAP_TIMEBEFOREFIRSTCAPTURE 0x101b /* Added 1.8 */ 01490 #define CAP_TIMEBETWEENCAPTURES 0x101c /* Added 1.8 */ 01491 #define CAP_CLEARBUFFERS 0x101d /* Added 1.8 */ 01492 #define CAP_MAXBATCHBUFFERS 0x101e /* Added 1.8 */ 01493 #define CAP_DEVICETIMEDATE 0x101f /* Added 1.8 */ 01494 #define CAP_POWERSUPPLY 0x1020 /* Added 1.8 */ 01495 #define CAP_CAMERAPREVIEWUI 0x1021 /* Added 1.8 */ 01496 #define CAP_DEVICEEVENT 0x1022 /* Added 1.8 */ 01497 #define CAP_PAGEMULTIPLEACQUIRE 0x1023 /* Added 1.8 */ 01498 #define CAP_SERIALNUMBER 0x1024 /* Added 1.8 */ 01499 #define CAP_FILESYSTEM 0x1025 /* Added 1.8 */ 01500 #define CAP_PRINTER 0x1026 /* Added 1.8 */ 01501 #define CAP_PRINTERENABLED 0x1027 /* Added 1.8 */ 01502 #define CAP_PRINTERINDEX 0x1028 /* Added 1.8 */ 01503 #define CAP_PRINTERMODE 0x1029 /* Added 1.8 */ 01504 #define CAP_PRINTERSTRING 0x102a /* Added 1.8 */ 01505 #define CAP_PRINTERSUFFIX 0x102b /* Added 1.8 */ 01506 #define CAP_LANGUAGE 0x102c /* Added 1.8 */ 01507 #define CAP_FEEDERALIGNMENT 0x102d /* Added 1.8 */ 01508 #define CAP_FEEDERORDER 0x102e /* Added 1.8 */ 01509 #define CAP_PAPERBINDING 0x102f /* Added 1.8 */ 01510 #define CAP_REACQUIREALLOWED 0x1030 /* Added 1.8 */ 01511 #define CAP_PASSTHRU 0x1031 /* Added 1.8 */ 01512 #define CAP_BATTERYMINUTES 0x1032 /* Added 1.8 */ 01513 #define CAP_BATTERYPERCENTAGE 0x1033 /* Added 1.8 */ 01514 #define CAP_POWERDOWNTIME 0x1034 /* Added 1.8 */ 01515 01516 /* image data sources MAY support these caps */ 01517 #define ICAP_AUTOBRIGHT 0x1100 01518 #define ICAP_BRIGHTNESS 0x1101 01519 #define ICAP_CONTRAST 0x1103 01520 #define ICAP_CUSTHALFTONE 0x1104 01521 #define ICAP_EXPOSURETIME 0x1105 01522 #define ICAP_FILTER 0x1106 01523 #define ICAP_FLASHUSED 0x1107 01524 #define ICAP_GAMMA 0x1108 01525 #define ICAP_HALFTONES 0x1109 01526 #define ICAP_HIGHLIGHT 0x110a 01527 #define ICAP_IMAGEFILEFORMAT 0x110c 01528 #define ICAP_LAMPSTATE 0x110d 01529 #define ICAP_LIGHTSOURCE 0x110e 01530 #define ICAP_ORIENTATION 0x1110 01531 #define ICAP_PHYSICALWIDTH 0x1111 01532 #define ICAP_PHYSICALHEIGHT 0x1112 01533 #define ICAP_SHADOW 0x1113 01534 #define ICAP_FRAMES 0x1114 01535 #define ICAP_XNATIVERESOLUTION 0x1116 01536 #define ICAP_YNATIVERESOLUTION 0x1117 01537 #define ICAP_XRESOLUTION 0x1118 01538 #define ICAP_YRESOLUTION 0x1119 01539 #define ICAP_MAXFRAMES 0x111a 01540 #define ICAP_TILES 0x111b 01541 #define ICAP_BITORDER 0x111c 01542 #define ICAP_CCITTKFACTOR 0x111d 01543 #define ICAP_LIGHTPATH 0x111e 01544 #define ICAP_PIXELFLAVOR 0x111f 01545 #define ICAP_PLANARCHUNKY 0x1120 01546 #define ICAP_ROTATION 0x1121 01547 #define ICAP_SUPPORTEDSIZES 0x1122 01548 #define ICAP_THRESHOLD 0x1123 01549 #define ICAP_XSCALING 0x1124 01550 #define ICAP_YSCALING 0x1125 01551 #define ICAP_BITORDERCODES 0x1126 01552 #define ICAP_PIXELFLAVORCODES 0x1127 01553 #define ICAP_JPEGPIXELTYPE 0x1128 01554 #define ICAP_TIMEFILL 0x112a 01555 #define ICAP_BITDEPTH 0x112b 01556 #define ICAP_BITDEPTHREDUCTION 0x112c /* Added 1.5 */ 01557 #define ICAP_UNDEFINEDIMAGESIZE 0x112d /* Added 1.6 */ 01558 #define ICAP_IMAGEDATASET 0x112e /* Added 1.7 */ 01559 #define ICAP_EXTIMAGEINFO 0x112f /* Added 1.7 */ 01560 #define ICAP_MINIMUMHEIGHT 0x1130 /* Added 1.7 */ 01561 #define ICAP_MINIMUMWIDTH 0x1131 /* Added 1.7 */ 01562 #define ICAP_AUTODISCARDBLANKPAGES 0x1134 /* Added 1.8 */ 01563 #define ICAP_FLIPROTATION 0x1136 /* Added 1.8 */ 01564 #define ICAP_BARCODEDETECTIONENABLED 0x1137 /* Added 1.8 */ 01565 #define ICAP_SUPPORTEDBARCODETYPES 0x1138 /* Added 1.8 */ 01566 #define ICAP_BARCODEMAXSEARCHPRIORITIES 0x1139 /* Added 1.8 */ 01567 #define ICAP_BARCODESEARCHPRIORITIES 0x113a /* Added 1.8 */ 01568 #define ICAP_BARCODESEARCHMODE 0x113b /* Added 1.8 */ 01569 #define ICAP_BARCODEMAXRETRIES 0x113c /* Added 1.8 */ 01570 #define ICAP_BARCODETIMEOUT 0x113d /* Added 1.8 */ 01571 #define ICAP_ZOOMFACTOR 0x113e /* Added 1.8 */ 01572 #define ICAP_PATCHCODEDETECTIONENABLED 0x113f /* Added 1.8 */ 01573 #define ICAP_SUPPORTEDPATCHCODETYPES 0x1140 /* Added 1.8 */ 01574 #define ICAP_PATCHCODEMAXSEARCHPRIORITIES 0x1141 /* Added 1.8 */ 01575 #define ICAP_PATCHCODESEARCHPRIORITIES 0x1142 /* Added 1.8 */ 01576 #define ICAP_PATCHCODESEARCHMODE 0x1143 /* Added 1.8 */ 01577 #define ICAP_PATCHCODEMAXRETRIES 0x1144 /* Added 1.8 */ 01578 #define ICAP_PATCHCODETIMEOUT 0x1145 /* Added 1.8 */ 01579 #define ICAP_FLASHUSED2 0x1146 /* Added 1.8 */ 01580 #define ICAP_IMAGEFILTER 0x1147 /* Added 1.8 */ 01581 #define ICAP_NOISEFILTER 0x1148 /* Added 1.8 */ 01582 #define ICAP_OVERSCAN 0x1149 /* Added 1.8 */ 01583 #define ICAP_AUTOMATICBORDERDETECTION 0x1150 /* Added 1.8 */ 01584 #define ICAP_AUTOMATICDESKEW 0x1151 /* Added 1.8 */ 01585 #define ICAP_AUTOMATICROTATE 0x1152 /* Added 1.8 */ 01586 01587 /* image data sources MAY support these audio caps */ 01588 #define ACAP_AUDIOFILEFORMAT 0x1201 /* Added 1.8 */ 01589 #define ACAP_XFERMECH 0x1202 /* Added 1.8 */ 01590 01591 /* ----------------------------------------------------------------------- *\ 01592 01593 Version 1.7: Following is Extended Image Info Attributes. 01594 July 1997 01595 KHL 01596 01597 \* ----------------------------------------------------------------------- */ 01598 01599 #define TWEI_BARCODEX 0x1200 01600 #define TWEI_BARCODEY 0x1201 01601 #define TWEI_BARCODETEXT 0x1202 01602 #define TWEI_BARCODETYPE 0x1203 01603 #define TWEI_DESHADETOP 0x1204 01604 #define TWEI_DESHADELEFT 0x1205 01605 #define TWEI_DESHADEHEIGHT 0x1206 01606 #define TWEI_DESHADEWIDTH 0x1207 01607 #define TWEI_DESHADESIZE 0x1208 01608 #define TWEI_SPECKLESREMOVED 0x1209 01609 #define TWEI_HORZLINEXCOORD 0x120A 01610 #define TWEI_HORZLINEYCOORD 0x120B 01611 #define TWEI_HORZLINELENGTH 0x120C 01612 #define TWEI_HORZLINETHICKNESS 0x120D 01613 #define TWEI_VERTLINEXCOORD 0x120E 01614 #define TWEI_VERTLINEYCOORD 0x120F 01615 #define TWEI_VERTLINELENGTH 0x1210 01616 #define TWEI_VERTLINETHICKNESS 0x1211 01617 #define TWEI_PATCHCODE 0x1212 01618 #define TWEI_ENDORSEDTEXT 0x1213 01619 #define TWEI_FORMCONFIDENCE 0x1214 01620 #define TWEI_FORMTEMPLATEMATCH 0x1215 01621 #define TWEI_FORMTEMPLATEPAGEMATCH 0x1216 01622 #define TWEI_FORMHORZDOCOFFSET 0x1217 01623 #define TWEI_FORMVERTDOCOFFSET 0x1218 01624 #define TWEI_BARCODECOUNT 0x1219 01625 #define TWEI_BARCODECONFIDENCE 0x121A 01626 #define TWEI_BARCODEROTATION 0x121B 01627 #define TWEI_BARCODETEXTLENGTH 0x121C 01628 #define TWEI_DESHADECOUNT 0x121D 01629 #define TWEI_DESHADEBLACKCOUNTOLD 0x121E 01630 #define TWEI_DESHADEBLACKCOUNTNEW 0x121F 01631 #define TWEI_DESHADEBLACKRLMIN 0x1220 01632 #define TWEI_DESHADEBLACKRLMAX 0x1221 01633 #define TWEI_DESHADEWHITECOUNTOLD 0x1222 01634 #define TWEI_DESHADEWHITECOUNTNEW 0x1223 01635 #define TWEI_DESHADEWHITERLMIN 0x1224 01636 #define TWEI_DESHADEWHITERLAVE 0x1225 01637 #define TWEI_DESHADEWHITERLMAX 0x1226 01638 #define TWEI_BLACKSPECKLESREMOVED 0x1227 01639 #define TWEI_WHITESPECKLESREMOVED 0x1228 01640 #define TWEI_HORZLINECOUNT 0x1229 01641 #define TWEI_VERTLINECOUNT 0x122A 01642 #define TWEI_DESKEWSTATUS 0x122B 01643 #define TWEI_SKEWORIGINALANGLE 0x122C 01644 #define TWEI_SKEWFINALANGLE 0x122D 01645 #define TWEI_SKEWCONFIDENCE 0x122E 01646 #define TWEI_SKEWWINDOWX1 0x122F 01647 #define TWEI_SKEWWINDOWY1 0x1230 01648 #define TWEI_SKEWWINDOWX2 0x1231 01649 #define TWEI_SKEWWINDOWY2 0x1232 01650 #define TWEI_SKEWWINDOWX3 0x1233 01651 #define TWEI_SKEWWINDOWY3 0x1234 01652 #define TWEI_SKEWWINDOWX4 0x1235 01653 #define TWEI_SKEWWINDOWY4 0x1236 01654 01655 #define TWEJ_NONE 0x0000 01656 #define TWEJ_MIDSEPARATOR 0x0001 01657 #define TWEJ_PATCH1 0x0002 01658 #define TWEJ_PATCH2 0x0003 01659 #define TWEJ_PATCH3 0x0004 01660 #define TWEJ_PATCH4 0x0005 01661 #define TWEJ_PATCH6 0x0006 01662 #define TWEJ_PATCHT 0x0007 01663 01664 /*************************************************************************** 01665 * Return Codes and Condition Codes section * 01666 ***************************************************************************/ 01667 01668 /* Return Codes: DSM_Entry and DS_Entry may return any one of these values. */ 01669 #define TWRC_CUSTOMBASE 0x8000 01670 01671 #define TWRC_SUCCESS 0 01672 #define TWRC_FAILURE 1 /* Application may get TW_STATUS for info on failure */ 01673 #define TWRC_CHECKSTATUS 2 /* "tried hard"; get status */ 01674 #define TWRC_CANCEL 3 01675 #define TWRC_DSEVENT 4 01676 #define TWRC_NOTDSEVENT 5 01677 #define TWRC_XFERDONE 6 01678 #define TWRC_ENDOFLIST 7 /* After MSG_GETNEXT if nothing left */ 01679 #define TWRC_INFONOTSUPPORTED 8 01680 #define TWRC_DATANOTAVAILABLE 9 01681 01682 /* Condition Codes: Application gets these by doing DG_CONTROL DAT_STATUS MSG_GET. */ 01683 #define TWCC_CUSTOMBASE 0x8000 01684 01685 #define TWCC_SUCCESS 0 /* It worked! */ 01686 #define TWCC_BUMMER 1 /* Failure due to unknown causes */ 01687 #define TWCC_LOWMEMORY 2 /* Not enough memory to perform operation */ 01688 #define TWCC_NODS 3 /* No Data Source */ 01689 #define TWCC_MAXCONNECTIONS 4 /* DS is connected to max possible applications */ 01690 #define TWCC_OPERATIONERROR 5 /* DS or DSM reported error, application shouldn't */ 01691 #define TWCC_BADCAP 6 /* Unknown capability */ 01692 #define TWCC_BADPROTOCOL 9 /* Unrecognized MSG DG DAT combination */ 01693 #define TWCC_BADVALUE 10 /* Data parameter out of range */ 01694 #define TWCC_SEQERROR 11 /* DG DAT MSG out of expected sequence */ 01695 #define TWCC_BADDEST 12 /* Unknown destination Application/Source in DSM_Entry */ 01696 #define TWCC_CAPUNSUPPORTED 13 /* Capability not supported by source */ 01697 #define TWCC_CAPBADOPERATION 14 /* Operation not supported by capability */ 01698 #define TWCC_CAPSEQERROR 15 /* Capability has dependency on other capability */ 01699 /* Added 1.8 */ 01700 #define TWCC_DENIED 16 /* File System operation is denied (file is protected) */ 01701 #define TWCC_FILEEXISTS 17 /* Operation failed because file already exists. */ 01702 #define TWCC_FILENOTFOUND 18 /* File not found */ 01703 #define TWCC_NOTEMPTY 19 /* Operation failed because directory is not empty */ 01704 #define TWCC_PAPERJAM 20 /* The feeder is jammed */ 01705 #define TWCC_PAPERDOUBLEFEED 21 /* The feeder detected multiple pages */ 01706 #define TWCC_FILEWRITEERROR 22 /* Error writing the file (meant for things like disk full conditions) */ 01707 #define TWCC_CHECKDEVICEONLINE 23 /* The device went offline prior to or during this operation */ 01708 01709 01710 /* bit patterns: for query the operation that are supported by the data source on a capability */ 01711 /* Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT */ 01712 /* Added 1.6 */ 01713 #define TWQC_GET 0x0001 01714 #define TWQC_SET 0x0002 01715 #define TWQC_GETDEFAULT 0x0004 01716 #define TWQC_GETCURRENT 0x0008 01717 #define TWQC_RESET 0x0010 01718 01719 01720 /**************************************************************************** 01721 * Entry Points * 01722 ****************************************************************************/ 01723 01724 /********************************************************************** 01725 * Function: DSM_Entry, the only entry point into the Data Source Manager. 01726 * 01727 * Parameters: 01728 * pOrigin Identifies the source module of the message. This could 01729 * identify an Application, a Source, or the Source Manager. 01730 * 01731 * pDest Identifies the destination module for the message. 01732 * This could identify an application or a data source. 01733 * If this is NULL, the message goes to the Source Manager. 01734 * 01735 * DG The Data Group. 01736 * Example: DG_IMAGE. 01737 * 01738 * DAT The Data Attribute Type. 01739 * Example: DAT_IMAGEMEMXFER. 01740 * 01741 * MSG The message. Messages are interpreted by the destination module 01742 * with respect to the Data Group and the Data Attribute Type. 01743 * Example: MSG_GET. 01744 * 01745 * pData A pointer to the data structure or variable identified 01746 * by the Data Attribute Type. 01747 * Example: (TW_MEMREF)&ImageMemXfer 01748 * where ImageMemXfer is a TW_IMAGEMEMXFER structure. 01749 * 01750 * Returns: 01751 * ReturnCode 01752 * Example: TWRC_SUCCESS. 01753 * 01754 ********************************************************************/ 01755 01756 /* Don't mangle the name "DSM_Entry" if we're compiling in C++! */ 01757 #ifdef __cplusplus 01758 extern "C" { 01759 #endif /* __cplusplus */ 01760 01761 #ifdef _MSWIN_ 01762 TW_UINT16 FAR PASCAL DSM_Entry( pTW_IDENTITY pOrigin, 01763 pTW_IDENTITY pDest, 01764 TW_UINT32 DG, 01765 TW_UINT16 DAT, 01766 TW_UINT16 MSG, 01767 TW_MEMREF pData); 01768 01769 typedef TW_UINT16 (FAR PASCAL *DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, 01770 TW_UINT32, TW_UINT16, 01771 TW_UINT16, TW_MEMREF); 01772 #else /* _MSWIN_ */ 01773 01774 /*FAR PASCAL TW_UINT16 DSM_Entry( pTW_IDENTITY pOrigin, 01775 pTW_IDENTITY pDest, 01776 TW_UINT32 DG, 01777 TW_UINT16 DAT, 01778 TW_UINT16 MSG, 01779 TW_MEMREF pData);*/ 01780 01781 typedef TW_UINT16 (*DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, 01782 TW_UINT32, TW_UINT16, 01783 TW_UINT16, TW_MEMREF); 01784 #endif /* _MSWIN_ */ 01785 01786 #ifdef __cplusplus 01787 } 01788 #endif /* cplusplus */ 01789 01790 01791 /********************************************************************** 01792 * Function: DS_Entry, the entry point provided by a Data Source. 01793 * 01794 * Parameters: 01795 * pOrigin Identifies the source module of the message. This could 01796 * identify an application or the Data Source Manager. 01797 * 01798 * DG The Data Group. 01799 * Example: DG_IMAGE. 01800 * 01801 * DAT The Data Attribute Type. 01802 * Example: DAT_IMAGEMEMXFER. 01803 * 01804 * MSG The message. Messages are interpreted by the data source 01805 * with respect to the Data Group and the Data Attribute Type. 01806 * Example: MSG_GET. 01807 * 01808 * pData A pointer to the data structure or variable identified 01809 * by the Data Attribute Type. 01810 * Example: (TW_MEMREF)&ImageMemXfer 01811 * where ImageMemXfer is a TW_IMAGEMEMXFER structure. 01812 * 01813 * Returns: 01814 * ReturnCode 01815 * Example: TWRC_SUCCESS. 01816 * 01817 * Note: 01818 * The DSPROC type is only used by an application when it calls 01819 * a Data Source directly, bypassing the Data Source Manager. 01820 * 01821 ********************************************************************/ 01822 /* Don't mangle the name "DS_Entry" if we're compiling in C++! */ 01823 #ifdef __cplusplus 01824 extern "C" { 01825 #endif /* __cplusplus */ 01826 #ifdef _MSWIN_ 01827 #ifdef _WIN32 01828 __declspec(dllexport) TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin, 01829 TW_UINT32 DG, 01830 TW_UINT16 DAT, 01831 TW_UINT16 MSG, 01832 TW_MEMREF pData); 01833 #else /* _WIN32 */ 01834 TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin, 01835 TW_UINT32 DG, 01836 TW_UINT16 DAT, 01837 TW_UINT16 MSG, 01838 TW_MEMREF pData); 01839 #endif /* _WIN32 */ 01840 01841 typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin, 01842 TW_UINT32 DG, 01843 TW_UINT16 DAT, 01844 TW_UINT16 MSG, 01845 TW_MEMREF pData); 01846 #else /* _MSWIN_ */ 01847 /*FAR PASCAL TW_UINT16 DS_Entry( pTW_IDENTITY pOrigin, 01848 TW_UINT32 DG, 01849 TW_UINT16 DAT, 01850 TW_UINT16 MSG, 01851 TW_MEMREF pData);*/ 01852 01853 typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY, 01854 TW_UINT32, TW_UINT16, 01855 TW_UINT16, TW_MEMREF); 01856 #endif /* _MSWIN_ */ 01857 #ifdef __cplusplus 01858 } 01859 #endif /* cplusplus */ 01860 01861 #endif /* TWAIN */ Generated on Sat May 26 2012 04:25:10 for ReactOS by
1.7.6.1
|