2 * Copyright 2000 Corel Corporation
3 * Copyright 2006 Marcus Meissner
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #ifndef __WINE_CONFIG_H
24 # error You must include config.h first
33 /* internal information about an active data source */
34 typedef struct tagActiveDS
36 struct tagActiveDS *next; /* next active DS */
37 TW_IDENTITY identity; /* identity */
42 TW_UINT16 DSM_initialized; /* whether Source Manager is initialized */
43 TW_UINT16 DSM_currentState; /* current state of Source Manager */
44 TW_UINT16 DSM_twCC; /* current condition code of Source Manager */
45 TW_UINT32 DSM_sourceId; /* source id generator */
46 TW_UINT16 DSM_currentDevice; /* keep track of device during enumeration */
47 HINSTANCE DSM_instance;
49 activeDS *activeSources; /* list of active data sources */
51 /* Device Source Manager Control handlers */
52 extern TW_UINT16 TWAIN_ControlGroupHandler (
53 pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
54 TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
55 extern TW_UINT16 TWAIN_ImageGroupHandler (
56 pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
57 TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
58 extern TW_UINT16 TWAIN_AudioGroupHandler (
59 pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
60 TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
61 extern TW_UINT16 TWAIN_SourceManagerHandler (
62 pTW_IDENTITY pOrigin, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData);
64 /* Implementation of operation triplets (From Application to Source Manager) */
65 extern TW_UINT16 TWAIN_CloseDS
66 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
67 extern TW_UINT16 TWAIN_IdentityGetDefault
68 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
69 extern TW_UINT16 TWAIN_IdentityGetFirst
70 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
71 extern TW_UINT16 TWAIN_IdentityGetNext
72 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
73 extern TW_UINT16 TWAIN_OpenDS
74 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
75 extern TW_UINT16 TWAIN_UserSelect
76 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
77 extern TW_UINT16 TWAIN_CloseDSM
78 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
79 extern TW_UINT16 TWAIN_OpenDSM
80 (pTW_IDENTITY pOrigin, TW_MEMREF pData);
81 extern TW_UINT16 TWAIN_GetDSMStatus
82 (pTW_IDENTITY pOrigin, TW_MEMREF pData);