2006-05-08 20:09:37 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2000 Corel Corporation
|
|
|
|
* Copyright 2006 Marcus Meissner
|
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-05-08 20:09:37 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _TWAIN32_H
|
|
|
|
#define _TWAIN32_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
2021-10-29 09:35:12 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <basetsd.h>
|
|
|
|
#include <jpeglib.h>
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "twain.h"
|
|
|
|
|
|
|
|
#include "wine/list.h"
|
|
|
|
|
2011-04-26 10:51:31 +02:00
|
|
|
extern HINSTANCE GPHOTO2_instance DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
/* internal information about an active data source */
|
|
|
|
struct tagActiveDS
|
|
|
|
{
|
2017-11-21 22:48:27 +01:00
|
|
|
TW_IDENTITY identity; /* identity of the data source */
|
|
|
|
TW_IDENTITY appIdentity; /* identity of the app */
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 currentState; /* current state */
|
|
|
|
TW_UINT16 twCC; /* condition code */
|
|
|
|
HWND progressWnd; /* window handle of the scanning window */
|
|
|
|
|
2008-04-03 19:10:30 +02:00
|
|
|
/* Capabilities */
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT32 capXferMech; /* ICAP_XFERMECH */
|
|
|
|
TW_UINT16 pixeltype; /* ICAP_PIXELTYPE */
|
|
|
|
TW_UINT16 pixelflavor; /* ICAP_PIXELFLAVOR */
|
|
|
|
|
2021-10-29 09:34:35 +02:00
|
|
|
unsigned int file_count;
|
|
|
|
unsigned int download_count;
|
|
|
|
BOOL *download_flags;
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
/* Download and decode JPEG STATE */
|
2021-11-08 20:54:25 +01:00
|
|
|
UINT64 file_handle;
|
2021-10-29 09:34:35 +02:00
|
|
|
unsigned char *file_data;
|
|
|
|
unsigned int file_size;
|
2006-05-08 20:09:37 +02:00
|
|
|
struct jpeg_source_mgr xjsm;
|
|
|
|
struct jpeg_decompress_struct jd;
|
|
|
|
struct jpeg_error_mgr jerr;
|
2020-01-24 00:05:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct tagActiveDS activeDS DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
/* Helper functions */
|
2011-04-26 10:51:31 +02:00
|
|
|
extern TW_UINT16 GPHOTO2_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
/* Implementation of operation triplets
|
|
|
|
* From Application to Source (Image Information) */
|
|
|
|
TW_UINT16 GPHOTO2_CIEColorGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ExtImageInfoGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_GrayResponseReset
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_GrayResponseSet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageFileXferGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageInfoGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageLayoutGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageLayoutGetDefault
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageLayoutReset
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageLayoutSet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageMemXferGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_ImageNativeXferGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_JPEGCompressionGet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_JPEGCompressionGetDefault
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_JPEGCompressionReset
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_JPEGCompressionSet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_Palette8Get
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_Palette8GetDefault
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_Palette8Reset
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_Palette8Set
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_RGBResponseReset
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
TW_UINT16 GPHOTO2_RGBResponseSet
|
2011-04-26 10:51:31 +02:00
|
|
|
(pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
/* UI function */
|
2011-04-26 10:51:31 +02:00
|
|
|
BOOL DoCameraUI(void) DECLSPEC_HIDDEN;
|
|
|
|
HWND TransferringDialogBox(HWND dialog, LONG progress) DECLSPEC_HIDDEN;
|
2006-05-08 20:09:37 +02:00
|
|
|
|
|
|
|
/* Helper function for GUI */
|
|
|
|
TW_UINT16
|
2021-10-29 09:34:35 +02:00
|
|
|
_get_gphoto2_file_as_DIB( unsigned int idx, BOOL preview, HWND hwnd, HBITMAP *hDIB ) DECLSPEC_HIDDEN;
|
2021-10-29 09:33:30 +02:00
|
|
|
|
2006-05-08 20:09:37 +02:00
|
|
|
#endif
|