Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2000 Corel Corporation |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library; if not, write to the Free Software |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 17 | */ |
| 18 | |
| 19 | #ifndef _TWAIN32_H |
| 20 | #define _TWAIN32_H |
| 21 | |
| 22 | #ifndef __WINE_CONFIG_H |
| 23 | # error You must include config.h first |
| 24 | #endif |
| 25 | |
Alexandre Julliard | 37e3584 | 2011-09-05 17:22:50 +0200 | [diff] [blame] | 26 | #include <stdarg.h> |
| 27 | |
Alexandre Julliard | 418e74b | 2007-07-02 19:42:13 +0200 | [diff] [blame] | 28 | #ifdef SONAME_LIBSANE |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 29 | # include <sane/sane.h> |
Jeremy White | 00f9ef0 | 2009-02-25 20:58:42 -0600 | [diff] [blame] | 30 | # include <sane/saneopts.h> |
Alexandre Julliard | 37e3584 | 2011-09-05 17:22:50 +0200 | [diff] [blame] | 31 | #endif |
Jeremy White | 16f33d8 | 2007-03-14 13:10:03 -0500 | [diff] [blame] | 32 | |
Alexandre Julliard | 37e3584 | 2011-09-05 17:22:50 +0200 | [diff] [blame] | 33 | #include "windef.h" |
| 34 | #include "winbase.h" |
| 35 | #include "winuser.h" |
| 36 | #include "twain.h" |
| 37 | |
| 38 | #ifdef SONAME_LIBSANE |
Marcus Meissner | 4af3081 | 2011-05-13 18:16:13 +0200 | [diff] [blame] | 39 | #define MAKE_FUNCPTR(f) typeof(f) * p##f DECLSPEC_HIDDEN; |
Jeremy White | 16f33d8 | 2007-03-14 13:10:03 -0500 | [diff] [blame] | 40 | MAKE_FUNCPTR(sane_init) |
| 41 | MAKE_FUNCPTR(sane_exit) |
| 42 | MAKE_FUNCPTR(sane_get_devices) |
| 43 | MAKE_FUNCPTR(sane_open) |
| 44 | MAKE_FUNCPTR(sane_close) |
| 45 | MAKE_FUNCPTR(sane_get_option_descriptor) |
| 46 | MAKE_FUNCPTR(sane_control_option) |
| 47 | MAKE_FUNCPTR(sane_get_parameters) |
| 48 | MAKE_FUNCPTR(sane_start) |
| 49 | MAKE_FUNCPTR(sane_read) |
| 50 | MAKE_FUNCPTR(sane_cancel) |
| 51 | MAKE_FUNCPTR(sane_set_io_mode) |
| 52 | MAKE_FUNCPTR(sane_get_select_fd) |
| 53 | MAKE_FUNCPTR(sane_strstatus) |
| 54 | #undef MAKE_FUNCPTR |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 55 | #endif |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 56 | |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 57 | extern HINSTANCE SANE_instance DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 58 | |
Jeremy White | 6ace799 | 2009-02-23 16:25:26 -0600 | [diff] [blame] | 59 | #define TWCC_CHECKSTATUS (TWCC_CUSTOMBASE + 1) |
| 60 | |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 61 | /* internal information about an active data source */ |
| 62 | struct tagActiveDS |
| 63 | { |
| 64 | struct tagActiveDS *next; /* next active DS */ |
| 65 | TW_IDENTITY identity; /* identity */ |
| 66 | TW_UINT16 currentState; /* current state */ |
Jeremy White | 0cab16c | 2009-02-09 13:02:28 -0600 | [diff] [blame] | 67 | UINT windowMessage; /* message to use to send status */ |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 68 | TW_UINT16 twCC; /* condition code */ |
| 69 | HWND hwndOwner; /* window handle of the app */ |
| 70 | HWND progressWnd; /* window handle of the scanning window */ |
Alexandre Julliard | 418e74b | 2007-07-02 19:42:13 +0200 | [diff] [blame] | 71 | #ifdef SONAME_LIBSANE |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 72 | SANE_Handle deviceHandle; /* device handle */ |
| 73 | SANE_Parameters sane_param; /* parameters about the image |
| 74 | transferred */ |
| 75 | BOOL sane_param_valid; /* true if valid sane_param*/ |
Jeremy White | e472c49 | 2009-03-05 13:25:58 -0600 | [diff] [blame] | 76 | BOOL sane_started; /* If sane_start has been called */ |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 77 | INT deviceIndex; /* index of the current device */ |
| 78 | #endif |
Austin English | 313a85f | 2008-04-10 21:17:14 -0500 | [diff] [blame] | 79 | /* Capabilities */ |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 80 | TW_UINT16 capXferMech; /* ICAP_XFERMECH */ |
Jeremy White | 00f9ef0 | 2009-02-25 20:58:42 -0600 | [diff] [blame] | 81 | BOOL PixelTypeSet; |
| 82 | TW_UINT16 defaultPixelType; /* ICAP_PIXELTYPE */ |
Jeremy White | 6ace799 | 2009-02-23 16:25:26 -0600 | [diff] [blame] | 83 | BOOL XResolutionSet; |
| 84 | TW_FIX32 defaultXResolution; |
| 85 | BOOL YResolutionSet; |
| 86 | TW_FIX32 defaultYResolution; |
Marcus Meissner | 4af3081 | 2011-05-13 18:16:13 +0200 | [diff] [blame] | 87 | } activeDS DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 88 | |
| 89 | /* Helper functions */ |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 90 | extern TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) DECLSPEC_HIDDEN; |
| 91 | extern TW_UINT16 SANE_SaneSetDefaults (void) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 92 | |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 93 | /* Implementation of operation triplets |
| 94 | * From Application to Source (Control Information) */ |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 95 | TW_UINT16 SANE_CapabilityGet (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 96 | TW_UINT16 SANE_CapabilityGetCurrent |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 97 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 98 | TW_UINT16 SANE_CapabilityGetDefault |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 99 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 100 | TW_UINT16 SANE_CapabilityQuerySupport |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 101 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 102 | TW_UINT16 SANE_CapabilityReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 103 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 104 | TW_UINT16 SANE_CapabilitySet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 105 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 106 | TW_UINT16 SANE_CustomDSDataGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 107 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 108 | TW_UINT16 SANE_CustomDSDataSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 109 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 110 | TW_UINT16 SANE_AutomaticCaptureDirectory |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 111 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 112 | TW_UINT16 SANE_ChangeDirectory |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 113 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 114 | TW_UINT16 SANE_FileSystemCopy |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 115 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 116 | TW_UINT16 SANE_CreateDirectory |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 117 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 118 | TW_UINT16 SANE_FileSystemDelete |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 119 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 120 | TW_UINT16 SANE_FormatMedia |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 121 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 122 | TW_UINT16 SANE_FileSystemGetClose |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 123 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 124 | TW_UINT16 SANE_FileSystemGetFirstFile |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 125 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 126 | TW_UINT16 SANE_FileSystemGetInfo |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 127 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 128 | TW_UINT16 SANE_FileSystemGetNextFile |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 129 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 130 | TW_UINT16 SANE_FileSystemRename |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 131 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 132 | TW_UINT16 SANE_ProcessEvent |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 133 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 134 | TW_UINT16 SANE_PassThrough |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 135 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 136 | TW_UINT16 SANE_PendingXfersEndXfer |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 137 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 138 | TW_UINT16 SANE_PendingXfersGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 139 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 140 | TW_UINT16 SANE_PendingXfersReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 141 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 142 | TW_UINT16 SANE_PendingXfersStopFeeder |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 143 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 144 | TW_UINT16 SANE_SetupFileXferGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 145 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 146 | TW_UINT16 SANE_SetupFileXferGetDefault |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 147 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 148 | TW_UINT16 SANE_SetupFileXferReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 149 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 150 | TW_UINT16 SANE_SetupFileXferSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 151 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 152 | TW_UINT16 SANE_SetupFileXfer2Get |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 153 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 154 | TW_UINT16 SANE_SetupFileXfer2GetDefault |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 155 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 156 | TW_UINT16 SANE_SetupFileXfer2Reset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 157 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 158 | TW_UINT16 SANE_SetupFileXfer2Set |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 159 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 160 | TW_UINT16 SANE_SetupMemXferGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 161 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 162 | TW_UINT16 SANE_GetDSStatus |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 163 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 164 | TW_UINT16 SANE_DisableDSUserInterface |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 165 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 166 | TW_UINT16 SANE_EnableDSUserInterface |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 167 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 168 | TW_UINT16 SANE_EnableDSUIOnly |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 169 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 170 | TW_UINT16 SANE_XferGroupGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 171 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 172 | TW_UINT16 SANE_XferGroupSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 173 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 174 | |
| 175 | /* Implementation of operation triplets |
| 176 | * From Application to Source (Image Information) */ |
| 177 | TW_UINT16 SANE_CIEColorGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 178 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 179 | TW_UINT16 SANE_ExtImageInfoGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 180 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 181 | TW_UINT16 SANE_GrayResponseReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 182 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 183 | TW_UINT16 SANE_GrayResponseSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 184 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 185 | TW_UINT16 SANE_ImageFileXferGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 186 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 187 | TW_UINT16 SANE_ImageInfoGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 188 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 189 | TW_UINT16 SANE_ImageLayoutGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 190 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 191 | TW_UINT16 SANE_ImageLayoutGetDefault |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 192 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 193 | TW_UINT16 SANE_ImageLayoutReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 194 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 195 | TW_UINT16 SANE_ImageLayoutSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 196 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 197 | TW_UINT16 SANE_ImageMemXferGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 198 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 199 | TW_UINT16 SANE_ImageNativeXferGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 200 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 201 | TW_UINT16 SANE_JPEGCompressionGet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 202 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 203 | TW_UINT16 SANE_JPEGCompressionGetDefault |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 204 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 205 | TW_UINT16 SANE_JPEGCompressionReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 206 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 207 | TW_UINT16 SANE_JPEGCompressionSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 208 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 209 | TW_UINT16 SANE_Palette8Get |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 210 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 211 | TW_UINT16 SANE_Palette8GetDefault |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 212 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 213 | TW_UINT16 SANE_Palette8Reset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 214 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 215 | TW_UINT16 SANE_Palette8Set |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 216 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 217 | TW_UINT16 SANE_RGBResponseReset |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 218 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 219 | TW_UINT16 SANE_RGBResponseSet |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 220 | (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 221 | |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 222 | /* UI function */ |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 223 | BOOL DoScannerUI(void) DECLSPEC_HIDDEN; |
| 224 | HWND ScanningDialogBox(HWND dialog, LONG progress) DECLSPEC_HIDDEN; |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 225 | |
Jeremy White | 4b794be | 2009-02-13 13:14:30 -0600 | [diff] [blame] | 226 | /* Option functions */ |
| 227 | #ifdef SONAME_LIBSANE |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 228 | SANE_Status sane_option_get_int(SANE_Handle h, const char *option_name, SANE_Int *val) DECLSPEC_HIDDEN; |
| 229 | SANE_Status sane_option_set_int(SANE_Handle h, const char *option_name, SANE_Int val, SANE_Int *status) DECLSPEC_HIDDEN; |
| 230 | SANE_Status sane_option_get_str(SANE_Handle h, const char *option_name, SANE_String val, size_t len, SANE_Int *status) DECLSPEC_HIDDEN; |
| 231 | SANE_Status sane_option_set_str(SANE_Handle h, const char *option_name, SANE_String val, SANE_Int *status) DECLSPEC_HIDDEN; |
| 232 | SANE_Status sane_option_probe_resolution(SANE_Handle h, const char *option_name, SANE_Int *minval, SANE_Int *maxval, SANE_Int *quant) DECLSPEC_HIDDEN; |
| 233 | SANE_Status sane_option_probe_mode(SANE_Handle h, SANE_String_Const **choices, char *current, int current_size) DECLSPEC_HIDDEN; |
Jeremy White | eae4ac9 | 2009-03-05 13:15:06 -0600 | [diff] [blame] | 234 | SANE_Status sane_option_probe_scan_area(SANE_Handle h, const char *option_name, SANE_Fixed *val, |
Marcus Meissner | a247c7f | 2011-04-26 19:11:44 +0200 | [diff] [blame] | 235 | SANE_Unit *unit, SANE_Fixed *min, SANE_Fixed *max, SANE_Fixed *quant) DECLSPEC_HIDDEN; |
| 236 | SANE_Status sane_option_get_bool(SANE_Handle h, const char *option_name, SANE_Bool *val, SANE_Int *status) DECLSPEC_HIDDEN; |
| 237 | SANE_Status sane_option_set_bool(SANE_Handle h, const char *option_name, SANE_Bool val, SANE_Int *status) DECLSPEC_HIDDEN; |
| 238 | SANE_Status sane_option_set_fixed(SANE_Handle h, const char *option_name, SANE_Fixed val, SANE_Int *status) DECLSPEC_HIDDEN; |
| 239 | TW_UINT16 sane_status_to_twcc(SANE_Status rc) DECLSPEC_HIDDEN; |
| 240 | BOOL convert_sane_res_to_twain(double sane_res, SANE_Unit unit, TW_FIX32 *twain_res, TW_UINT16 twtype) DECLSPEC_HIDDEN; |
Jeremy White | 4b794be | 2009-02-13 13:14:30 -0600 | [diff] [blame] | 241 | #endif |
| 242 | |
| 243 | |
Marcus Meissner | 125efed | 2006-05-08 20:05:42 +0200 | [diff] [blame] | 244 | #endif |