[TWAIN_32] Sync with Wine 3.0. CORE-14225
[reactos.git] / dll / win32 / twain_32 / twain_i.h
1 /*
2 * Copyright 2000 Corel Corporation
3 * Copyright 2006 Marcus Meissner
4 *
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.
9 *
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.
14 *
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
18 */
19
20 #ifndef _TWAIN32_H
21 #define _TWAIN32_H
22
23 #include <wine/config.h>
24
25 #include <stdarg.h>
26
27 #define NONAMELESSUNION
28 #define NONAMELESSSTRUCT
29
30 #include <windef.h>
31 #include <winbase.h>
32 #include <twain.h>
33
34 #include <wine/debug.h>
35 #include <wine/list.h>
36
37 WINE_DEFAULT_DEBUG_CHANNEL(twain);
38
39 struct pending_message
40 {
41 struct list entry;
42 TW_UINT16 msg;
43 };
44
45 /* internal information about an active data source */
46 typedef struct tagActiveDS
47 {
48 struct tagActiveDS *next; /* next active DS */
49 TW_IDENTITY identity; /* identity */
50 HMODULE hmod;
51 DSENTRYPROC dsEntry;
52 struct list pending_messages;
53 HWND ui_window;
54 HWND event_window;
55 } activeDS;
56
57 TW_UINT16 DSM_twCC DECLSPEC_HIDDEN; /* current condition code of Source Manager */
58
59 activeDS *activeSources DECLSPEC_HIDDEN; /* list of active data sources */
60
61 HINSTANCE DSM_hinstance DECLSPEC_HIDDEN;
62
63 /* Implementation of operation triplets (From Application to Source Manager) */
64 extern TW_UINT16 TWAIN_CloseDS
65 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
66 extern TW_UINT16 TWAIN_IdentityGetDefault
67 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
68 extern TW_UINT16 TWAIN_IdentityGetFirst
69 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
70 extern TW_UINT16 TWAIN_IdentityGetNext
71 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
72 extern TW_UINT16 TWAIN_OpenDS
73 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
74 extern TW_UINT16 TWAIN_UserSelect
75 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
76 extern TW_UINT16 TWAIN_CloseDSM
77 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
78 extern TW_UINT16 TWAIN_OpenDSM
79 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
80 extern TW_UINT16 TWAIN_GetDSMStatus
81 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
82 extern TW_UINT16 TWAIN_ControlNull
83 (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, activeDS *pSource, TW_UINT16 MSG, TW_MEMREF pData) DECLSPEC_HIDDEN;
84 extern TW_UINT16 TWAIN_ProcessEvent
85 (pTW_IDENTITY pOrigin, activeDS *pSource, TW_MEMREF pData) DECLSPEC_HIDDEN;
86
87 #endif /* _TWAIN32_H */