|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef __TTWAIN_UTIL_H__
|
|
Toshihiro Shimizu |
890ddd |
#define __TTWAIN_UTIL_H__
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "ttwain.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef TNZAPI
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZ_IS_DEVICELIB
|
|
Toshihiro Shimizu |
890ddd |
#define TNZ_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define TNZ_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef __cplusplus
|
|
Toshihiro Shimizu |
890ddd |
extern "C" {
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsAvailable(void);
|
|
Toshihiro Shimizu |
890ddd |
void TTWAIN_SetAvailable(TWAINAVAILABLE status);
|
|
Toshihiro Shimizu |
890ddd |
char *TTWAIN_GetLastError(TUINT32 *rc, TUINT32 *cc);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetResolution(float *min, float *max, float *step, float *def);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetOpticalResolution(float *min, float *max, float *step, float *def);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetBrightness(float *min, float *max, float *step, float *def);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetContrast(float *min, float *max, float *step, float *def);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetThreshold(float *min, float *max, float *step, float *def);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetPhysicalWidthWAdf(float *width);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetPhysicalHeightWAdf(float *height);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetMinimumWidthWAdf(float *width);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetMinimumHeightWAdf(float *height);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetPhysicalWidthWoAdf(float *width);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetPhysicalHeightWoAdf(float *height);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetMinimumWidthWoAdf(float *width);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetMinimumHeightWoAdf(float *height);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SupportsPixelType(TTWAIN_PIXTYPE pix);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SupportsFeeder(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SupportsCompressionType(TW_UINT16 comprType);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetSupportedCaps(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetFeeder(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsFeederLoaded(void);
|
|
Toshihiro Shimizu |
890ddd |
/* this function should return the current value */
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetCurrentPixelType(TTWAIN_PIXTYPE *pixType);
|
|
Toshihiro Shimizu |
890ddd |
/* */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapResolutionSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapOpticalResolutionSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapBrightnessSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapContrastSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapThresholdSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapPhysicalWidthSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapPhysicalHeightSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapMinimumWidthSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapMinimumHeightSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapPixelTypeSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapFeederSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapImageLayoutSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapOrientationSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapDeviceOnLineSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapBitDepthSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapBitOrderSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsCapCompressionSupported(void);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetResolution(float resolution);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetContrast(float contrast);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetBrightness(float brightness);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetThreshold(float threshold);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetXScaling(float scale);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetYScaling(float scale);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetPixelType(TTWAIN_PIXTYPE pixtype);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetBitDepth(USHORT bitDepth);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetBitOrder(TTWAIN_BITORDER bitOrder);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetImageLayout(float L, float T, float R, float B);
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetOrientation(USHORT orientation);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetFeeder(int status); /* TRUE->enabled */
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetPage(void);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void TTWAIN_DumpCapabilities(void (*trace_fun)(const char *fmt, ...));
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/* USER INTERFACE */
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_HasControllableUI(void);
|
|
Toshihiro Shimizu |
890ddd |
/* Return 1 if source claims UI can be hidden (see SetUIStatus above)
|
|
Toshihiro Shimizu |
890ddd |
Return 0 if source says UI *cannot* be hidden
|
|
Toshihiro Shimizu |
890ddd |
Return -1 if source (pre TWAIN 1.6) cannot answer the question. */
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_GetUIStatus(void);
|
|
Toshihiro Shimizu |
890ddd |
void TTWAIN_SetUIStatus(int status);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_IsDeviceOnLine(void); /* -1 unknown, 0 no, 1 yes */
|
|
Toshihiro Shimizu |
890ddd |
/* info about the twain driver */
|
|
Toshihiro Shimizu |
890ddd |
char *TTWAIN_GetManufacturer(void); /* */
|
|
Toshihiro Shimizu |
890ddd |
char *TTWAIN_GetProductFamily(void); /* return an internal static var*/
|
|
Toshihiro Shimizu |
890ddd |
char *TTWAIN_GetProductName(void); /* don't free ret. value */
|
|
Toshihiro Shimizu |
890ddd |
char *TTWAIN_GetVersion(void); /* */
|
|
Toshihiro Shimizu |
890ddd |
char *TTWAIN_GetTwainVersion(void); /* */
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_Native2Raster(void *handle, void *the_ras, int *lx, int *ly);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int TTWAIN_SetXferMech(TTWAIN_TRANSFER_MECH mech, void *ptr, TUINT32 size,
|
|
Toshihiro Shimizu |
890ddd |
int preferredLx, int preferredLy, TUINT32 numberOfImages);
|
|
Toshihiro Shimizu |
890ddd |
/* NATIVE BUFFERED FILE
|
|
Toshihiro Shimizu |
890ddd |
mech the transfer mechanism
|
|
Toshihiro Shimizu |
890ddd |
ptr 0 memory buffer ?Not Impl. filename ?
|
|
Toshihiro Shimizu |
890ddd |
size 0 size of the buffer ?Not Impl.?
|
|
Toshihiro Shimizu |
890ddd |
preferredLx lx lx ?Not Impl.? lx?
|
|
Toshihiro Shimizu |
890ddd |
preferredLy ly ly ?Not Impl.? ly?
|
|
Toshihiro Shimizu |
890ddd |
numberOfImages 1,2,.... or -1 for all in the ADF
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef NOTES
|
|
Toshihiro Shimizu |
890ddd |
here
|
|
Toshihiro Shimizu |
890ddd |
/* The XScaling cap. should be negotiated before the YScaling, this is because
|
|
Toshihiro Shimizu |
890ddd |
some Sources may set the YScaling capability whenever XScaling capability
|
|
Toshihiro Shimizu |
890ddd |
is set, to maintain a square aspect ratio for Applications that do not
|
|
Toshihiro Shimizu |
890ddd |
bother to negotiate YScaling capability. (note from Twain Spec 1.9 draft)
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef __cplusplus
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
#endif
|