Commit 125efed8 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

twain_32: Split out the sane specific parts from twain_32 code.

Autoprobing via DG_CONTROL/DAT_IDENTITY/MSG_GET.
parent 1d5e2be0
...@@ -1636,6 +1636,7 @@ dlls/rsabase/Makefile ...@@ -1636,6 +1636,7 @@ dlls/rsabase/Makefile
dlls/rsabase/tests/Makefile dlls/rsabase/tests/Makefile
dlls/rsaenh/Makefile dlls/rsaenh/Makefile
dlls/rsaenh/tests/Makefile dlls/rsaenh/tests/Makefile
dlls/sane.ds/Makefile
dlls/secur32/Makefile dlls/secur32/Makefile
dlls/secur32/tests/Makefile dlls/secur32/tests/Makefile
dlls/security/Makefile dlls/security/Makefile
......
...@@ -124,6 +124,7 @@ BASEDIRS = \ ...@@ -124,6 +124,7 @@ BASEDIRS = \
rpcrt4 \ rpcrt4 \
rsabase \ rsabase \
rsaenh \ rsaenh \
sane.ds \
secur32 \ secur32 \
security \ security \
sensapi \ sensapi \
......
Makefile
rsrc.res
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = sane.ds
IMPORTS = comctl32 user32 gdi32 kernel32 ntdll
EXTRALIBS = @SANELIBS@
EXTRAINCL = @SANEINCL@
C_SRCS = \
capability.c \
ds_ctrl.c \
ds_image.c \
sane_main.c \
ui.c
RC_SRCS = \
rsrc.rc
@MAKE_DLL_RULES@
### Dependencies:
...@@ -26,13 +26,12 @@ ...@@ -26,13 +26,12 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "twain.h" #include "twain.h"
#include "twain_i.h" #include "sane_i.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(twain); WINE_DEFAULT_DEBUG_CHANNEL(twain);
TW_UINT16 TWAIN_SaneCapability (activeDS *pSource, pTW_CAPABILITY pCapability, TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
TW_UINT16 action)
{ {
TW_UINT16 twCC = TWCC_SUCCESS; TW_UINT16 twCC = TWCC_SUCCESS;
...@@ -158,7 +157,7 @@ TW_UINT16 TWAIN_SaneCapability (activeDS *pSource, pTW_CAPABILITY pCapability, ...@@ -158,7 +157,7 @@ TW_UINT16 TWAIN_SaneCapability (activeDS *pSource, pTW_CAPABILITY pCapability,
twCC = TWCC_CAPUNSUPPORTED; twCC = TWCC_CAPUNSUPPORTED;
break; break;
case ICAP_XFERMECH: case ICAP_XFERMECH:
twCC = TWAIN_ICAPXferMech (pSource, pCapability, action); twCC = SANE_ICAPXferMech (pCapability, action);
break; break;
case ICAP_UNDEFINEDIMAGESIZE: case ICAP_UNDEFINEDIMAGESIZE:
case CAP_CAMERAPREVIEWUI: case CAP_CAMERAPREVIEWUI:
...@@ -206,8 +205,7 @@ static TW_BOOL TWAIN_OneValueGet (pTW_CAPABILITY pCapability, TW_UINT32 *pValue) ...@@ -206,8 +205,7 @@ static TW_BOOL TWAIN_OneValueGet (pTW_CAPABILITY pCapability, TW_UINT32 *pValue)
} }
/* ICAP_XFERMECH */ /* ICAP_XFERMECH */
TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability, TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action)
TW_UINT16 action)
{ {
TRACE("ICAP_XFERMECH\n"); TRACE("ICAP_XFERMECH\n");
...@@ -216,7 +214,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability, ...@@ -216,7 +214,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability,
case MSG_GET: case MSG_GET:
if (pCapability->ConType == TWON_ONEVALUE) if (pCapability->ConType == TWON_ONEVALUE)
{ {
if (!TWAIN_OneValueSet (pCapability, pSource->capXferMech)) if (!TWAIN_OneValueSet (pCapability, activeDS.capXferMech))
return TWCC_LOWMEMORY; return TWCC_LOWMEMORY;
} }
break; break;
...@@ -226,7 +224,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability, ...@@ -226,7 +224,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability,
TW_UINT32 xfermechtemp = 0; TW_UINT32 xfermechtemp = 0;
if (!TWAIN_OneValueGet (pCapability, &xfermechtemp)) if (!TWAIN_OneValueGet (pCapability, &xfermechtemp))
return TWCC_LOWMEMORY; return TWCC_LOWMEMORY;
pSource->capXferMech = xfermechtemp; activeDS.capXferMech = xfermechtemp;
} }
else if (pCapability->ConType == TWON_ENUMERATION) else if (pCapability->ConType == TWON_ENUMERATION)
{ {
...@@ -234,7 +232,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability, ...@@ -234,7 +232,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability,
} }
break; break;
case MSG_GETCURRENT: case MSG_GETCURRENT:
if (!TWAIN_OneValueSet (pCapability, pSource->capXferMech)) if (!TWAIN_OneValueSet (pCapability, activeDS.capXferMech))
return TWCC_LOWMEMORY; return TWCC_LOWMEMORY;
break; break;
case MSG_GETDEFAULT: case MSG_GETDEFAULT:
...@@ -242,7 +240,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability, ...@@ -242,7 +240,7 @@ TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability,
return TWCC_LOWMEMORY; return TWCC_LOWMEMORY;
break; break;
case MSG_RESET: case MSG_RESET:
pSource->capXferMech = TWSX_NATIVE; activeDS.capXferMech = TWSX_NATIVE;
break; break;
} }
return TWCC_SUCCESS; return TWCC_SUCCESS;
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
#include "resource.h" #include "resource.h"
#include "twain_De.rc" #include "sane_De.rc"
#include "twain_En.rc" #include "sane_En.rc"
#include "twain_Fi.rc" #include "sane_Fi.rc"
#include "twain_Fr.rc" #include "sane_Fr.rc"
#include "twain_Ko.rc" #include "sane_Ko.rc"
#include "twain_No.rc" #include "sane_No.rc"
@ stdcall DS_Entry(ptr long long long ptr)
/*
* Copyright 2000 Corel Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _TWAIN32_H
#define _TWAIN32_H
#ifndef __WINE_CONFIG_H
# error You must include config.h first
#endif
#ifdef HAVE_SANE
# include <sane/sane.h>
#endif
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "twain.h"
extern HINSTANCE SANE_instance;
/* internal information about an active data source */
struct tagActiveDS
{
struct tagActiveDS *next; /* next active DS */
TW_IDENTITY identity; /* identity */
TW_UINT16 currentState; /* current state */
TW_EVENT pendingEvent; /* pending event to be sent to
application */
TW_UINT16 twCC; /* condition code */
HWND hwndOwner; /* window handle of the app */
HWND progressWnd; /* window handle of the scanning window */
#ifdef HAVE_SANE
SANE_Handle deviceHandle; /* device handle */
SANE_Parameters sane_param; /* parameters about the image
transferred */
BOOL sane_param_valid; /* true if valid sane_param*/
INT deviceIndex; /* index of the current device */
#endif
/* Capabiblities */
TW_UINT16 capXferMech; /* ICAP_XFERMECH */
} activeDS;
/* Helper functions */
extern TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action);
/* */
extern TW_UINT16 SANE_ControlGroupHandler (
pTW_IDENTITY pOrigin, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
extern TW_UINT16 SANE_ImageGroupHandler (
pTW_IDENTITY pOrigin, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
extern TW_UINT16 SANE_AudioGroupHandler (
pTW_IDENTITY pOrigin, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
extern TW_UINT16 SANE_SourceManagerHandler (
pTW_IDENTITY pOrigin, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
/* Implementation of operation triplets
* From Application to Source (Control Information) */
TW_UINT16 SANE_CapabilityGet (pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CapabilityGetCurrent
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CapabilityGetDefault
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CapabilityQuerySupport
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CapabilityReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CapabilitySet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CustomDSDataGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CustomDSDataSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_AutomaticCaptureDirectory
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ChangeDirectory
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemCopy
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_CreateDirectory
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemDelete
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FormatMedia
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemGetClose
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemGetFirstFile
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemGetInfo
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemGetNextFile
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_FileSystemRename
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ProcessEvent
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_PassThrough
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_PendingXfersEndXfer
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_PendingXfersGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_PendingXfersReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_PendingXfersStopFeeder
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXferGetDefault
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXferReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXferSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXfer2Get
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXfer2GetDefault
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXfer2Reset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupFileXfer2Set
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_SetupMemXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_GetDSStatus
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_DisableDSUserInterface
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_EnableDSUserInterface
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_EnableDSUIOnly
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_XferGroupGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_XferGroupSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
/* Implementation of operation triplets
* From Application to Source (Image Information) */
TW_UINT16 SANE_CIEColorGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ExtImageInfoGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_GrayResponseReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_GrayResponseSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageFileXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageInfoGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageLayoutGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageLayoutGetDefault
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageLayoutReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageLayoutSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageMemXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_ImageNativeXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_JPEGCompressionGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_JPEGCompressionGetDefault
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_JPEGCompressionReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_JPEGCompressionSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_Palette8Get
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_Palette8GetDefault
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_Palette8Reset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_Palette8Set
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_RGBResponseReset
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_RGBResponseSet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
/* Implementation of operation triplets
* From Application to Source (Audio Information) */
TW_UINT16 SANE_AudioFileXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_AudioInfoGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
TW_UINT16 SANE_AudioNativeXferGet
(pTW_IDENTITY pOrigin, TW_MEMREF pData);
/* Implementation of TWAIN capabilities */
TW_UINT16 SANE_ICAPXferMech (pTW_CAPABILITY pCapability, TW_UINT16 action);
/* UI function */
BOOL DoScannerUI(void);
HWND ScanningDialogBox(HWND dialog, LONG progress);
#endif
...@@ -3,25 +3,15 @@ TOPOBJDIR = ../.. ...@@ -3,25 +3,15 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = twain_32.dll MODULE = twain_32.dll
IMPORTS = comctl32 user32 gdi32 kernel32 ntdll IMPORTS = kernel32 ntdll
EXTRALIBS = @SANELIBS@
EXTRAINCL = @SANEINCL@
C_SRCS = \ C_SRCS = \
capability.c \
ds_audio.c \
ds_ctrl.c \
ds_image.c \
dsm_ctrl.c \ dsm_ctrl.c \
twain32_main.c \ twain32_main.c
ui.c
C_SRCS16 = \ C_SRCS16 = \
twain16_main.c twain16_main.c
RC_SRCS = \
rsrc.rc
SPEC_SRCS16 = twain.spec SPEC_SRCS16 = twain.spec
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
......
/*
* Copyright 2000 Corel Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "twain.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(twain);
/* DG_AUDIO/DAT_AUDIOFILEXFER/MSG_GET */
TW_UINT16 TWAIN_AudioFileXferGet (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_AUDIO/DAT_AUDIOINFO/MSG_GET */
TW_UINT16 TWAIN_AudioInfoGet (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* DG_AUDIO/DAT_AUDIONATIVEXFER/MSG_GET */
TW_UINT16 TWAIN_AudioNativeXferGet (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
TW_MEMREF pData)
{
FIXME ("stub!\n");
return TWRC_FAILURE;
}
/* /*
* Copyright 2000 Corel Corporation * Copyright 2000 Corel Corporation
* Copyright 2006 Marcus Meissner
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -23,9 +24,6 @@ ...@@ -23,9 +24,6 @@
# error You must include config.h first # error You must include config.h first
#endif #endif
#ifdef HAVE_SANE
# include <sane/sane.h>
#endif
#include <stdarg.h> #include <stdarg.h>
#include "windef.h" #include "windef.h"
...@@ -37,42 +35,20 @@ typedef struct tagActiveDS ...@@ -37,42 +35,20 @@ typedef struct tagActiveDS
{ {
struct tagActiveDS *next; /* next active DS */ struct tagActiveDS *next; /* next active DS */
TW_IDENTITY identity; /* identity */ TW_IDENTITY identity; /* identity */
TW_UINT16 currentState; /* current state */ HMODULE hmod;
TW_EVENT pendingEvent; /* pending event to be sent to DSENTRYPROC dsEntry;
application */
TW_UINT16 twCC; /* condition code */
HWND hwndOwner; /* window handle of the app */
HWND progressWnd; /* window handle of the scanning window */
#ifdef HAVE_SANE
SANE_Handle deviceHandle; /* device handle */
SANE_Parameters sane_param; /* parameters about the image
transferred */
BOOL sane_param_valid; /* true if valid sane_param*/
INT deviceIndex; /* index of the current device */
#endif
/* Capabiblities */
TW_UINT16 capXferMech; /* ICAP_XFERMECH */
} activeDS; } activeDS;
TW_UINT16 DSM_initialized; /* whether Source Manager is initialized */ TW_UINT16 DSM_initialized; /* whether Source Manager is initialized */
TW_UINT16 DSM_currentState; /* current state of Source Manager */ TW_UINT16 DSM_currentState; /* current state of Source Manager */
TW_UINT16 DSM_twCC; /* current condition code of Source Manager */ TW_UINT16 DSM_twCC; /* current condition code of Source Manager */
TW_HANDLE DSM_parentHWND; /* window handle of the Source's "parent" */
TW_UINT32 DSM_sourceId; /* source id generator */ TW_UINT32 DSM_sourceId; /* source id generator */
TW_UINT16 DSM_currentDevice; /* keep track of device during enumeration */ TW_UINT16 DSM_currentDevice; /* keep track of device during enumeration */
HINSTANCE DSM_instance; HINSTANCE DSM_instance;
#ifdef HAVE_SANE
const SANE_Device **device_list;/* a list of all sane devices */
#endif
activeDS *activeSources; /* list of active data sources */ activeDS *activeSources; /* list of active data sources */
/* Helper functions */ /* Device Source Manager Control handlers */
extern activeDS *TWAIN_LookupSource (pTW_IDENTITY pDest);
extern TW_UINT16 TWAIN_SaneCapability (activeDS *pSource,
pTW_CAPABILITY pCapability, TW_UINT16 action);
/* */
extern TW_UINT16 TWAIN_ControlGroupHandler ( extern TW_UINT16 TWAIN_ControlGroupHandler (
pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
...@@ -105,151 +81,4 @@ extern TW_UINT16 TWAIN_OpenDSM ...@@ -105,151 +81,4 @@ extern TW_UINT16 TWAIN_OpenDSM
extern TW_UINT16 TWAIN_GetDSMStatus extern TW_UINT16 TWAIN_GetDSMStatus
(pTW_IDENTITY pOrigin, TW_MEMREF pData); (pTW_IDENTITY pOrigin, TW_MEMREF pData);
/* Implementation of operation triplets
* From Application to Source (Control Information) */
TW_UINT16 TWAIN_CapabilityGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CapabilityGetCurrent
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,TW_MEMREF pData);
TW_UINT16 TWAIN_CapabilityGetDefault
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CapabilityQuerySupport
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CapabilityReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CapabilitySet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CustomDSDataGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CustomDSDataSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_AutomaticCaptureDirectory
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ChangeDirectory
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemCopy
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_CreateDirectory
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemDelete
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FormatMedia
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemGetClose
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemGetFirstFile
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemGetInfo
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemGetNextFile
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_FileSystemRename
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ProcessEvent
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_PassThrough
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_PendingXfersEndXfer
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_PendingXfersGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_PendingXfersReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_PendingXfersStopFeeder
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXferGetDefault
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXferReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXferSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXfer2Get
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXfer2GetDefault
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXfer2Reset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupFileXfer2Set
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_SetupMemXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_GetDSStatus
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_DisableDSUserInterface
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_EnableDSUserInterface
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_EnableDSUIOnly
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_XferGroupGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_XferGroupSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
/* Implementation of operation triplets
* From Application to Source (Image Information) */
TW_UINT16 TWAIN_CIEColorGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ExtImageInfoGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_GrayResponseReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_GrayResponseSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageFileXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageInfoGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageLayoutGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageLayoutGetDefault
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageLayoutReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageLayoutSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageMemXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_ImageNativeXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_JPEGCompressionGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_JPEGCompressionGetDefault
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_JPEGCompressionReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_JPEGCompressionSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_Palette8Get
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_Palette8GetDefault
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_Palette8Reset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_Palette8Set
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_RGBResponseReset
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_RGBResponseSet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
/* Implementation of operation triplets
* From Application to Source (Audio Information) */
TW_UINT16 TWAIN_AudioFileXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_AudioInfoGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
TW_UINT16 TWAIN_AudioNativeXferGet
(pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
/* Implementation of TWAIN capabilities */
TW_UINT16 TWAIN_ICAPXferMech
(activeDS *pSource, pTW_CAPABILITY pCapability, TW_UINT16 action);
/* UI function */
BOOL DoScannerUI(activeDS *pSource);
HWND ScanningDialogBox(HWND dialog, DWORD progress);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment