xref: /reactos/dll/win32/twain_32/twain_i.h (revision fb5d5ecd)
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 #ifndef __WINE_CONFIG_H
24 # error You must include config.h first
25 #endif
26 
27 #include <stdarg.h>
28 
29 #include "windef.h"
30 #include "winbase.h"
31 #include "twain.h"
32 #include "wine/list.h"
33 
34 struct pending_message
35 {
36     struct list entry;
37     TW_UINT16 msg;
38 };
39 
40 /* internal information about an active data source */
41 typedef struct tagActiveDS
42 {
43     struct tagActiveDS	*next;			/* next active DS */
44     TW_IDENTITY		identity;		/* identity */
45     HMODULE		hmod;
46     DSENTRYPROC		dsEntry;
47     struct list         pending_messages;
48     HWND                ui_window;
49     HWND                event_window;
50 } activeDS;
51 
52 TW_UINT16 DSM_twCC DECLSPEC_HIDDEN;             /* current condition code of Source Manager */
53 
54 activeDS *activeSources DECLSPEC_HIDDEN;	/* list of active data sources */
55 
56 HINSTANCE DSM_hinstance DECLSPEC_HIDDEN;
57 
58 /* Implementation of operation triplets (From Application to Source Manager) */
59 extern TW_UINT16 TWAIN_CloseDS
60            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
61 extern TW_UINT16 TWAIN_IdentityGetDefault
62            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
63 extern TW_UINT16 TWAIN_IdentityGetFirst
64            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
65 extern TW_UINT16 TWAIN_IdentityGetNext
66            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
67 extern TW_UINT16 TWAIN_OpenDS
68            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
69 extern TW_UINT16 TWAIN_UserSelect
70            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
71 extern TW_UINT16 TWAIN_CloseDSM
72            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
73 extern TW_UINT16 TWAIN_OpenDSM
74            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
75 extern TW_UINT16 TWAIN_GetDSMStatus
76            (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
77 extern TW_UINT16 TWAIN_ControlNull
78            (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, activeDS *pSource, TW_UINT16 MSG, TW_MEMREF pData) DECLSPEC_HIDDEN;
79 extern TW_UINT16 TWAIN_ProcessEvent
80            (pTW_IDENTITY pOrigin, activeDS *pSource, TW_MEMREF pData) DECLSPEC_HIDDEN;
81 
82 #endif
83