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
35 #include "wine/list.h"
37 extern HINSTANCE GPHOTO2_instance
;
39 /* internal information about an active data source */
42 TW_IDENTITY identity
; /* identity of the data source */
43 TW_IDENTITY appIdentity
; /* identity of the app */
44 TW_UINT16 currentState
; /* current state */
45 TW_UINT16 twCC
; /* condition code */
46 HWND progressWnd
; /* window handle of the scanning window */
49 TW_UINT32 capXferMech
; /* ICAP_XFERMECH */
50 TW_UINT16 pixeltype
; /* ICAP_PIXELTYPE */
51 TW_UINT16 pixelflavor
; /* ICAP_PIXELFLAVOR */
53 unsigned int file_count
;
54 unsigned int download_count
;
57 /* Download and decode JPEG STATE */
59 unsigned char *file_data
;
60 unsigned int file_size
;
61 struct jpeg_source_mgr xjsm
;
62 struct jpeg_decompress_struct jd
;
63 struct jpeg_error_mgr jerr
;
66 extern struct tagActiveDS activeDS
;
68 /* Helper functions */
69 extern TW_UINT16
GPHOTO2_SaneCapability (pTW_CAPABILITY pCapability
, TW_UINT16 action
);
71 /* Implementation of operation triplets
72 * From Application to Source (Image Information) */
73 TW_UINT16 GPHOTO2_CIEColorGet
74 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
75 TW_UINT16 GPHOTO2_ExtImageInfoGet
76 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
77 TW_UINT16 GPHOTO2_GrayResponseReset
78 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
79 TW_UINT16 GPHOTO2_GrayResponseSet
80 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
81 TW_UINT16 GPHOTO2_ImageFileXferGet
82 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
83 TW_UINT16 GPHOTO2_ImageInfoGet
84 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
85 TW_UINT16 GPHOTO2_ImageLayoutGet
86 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
87 TW_UINT16 GPHOTO2_ImageLayoutGetDefault
88 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
89 TW_UINT16 GPHOTO2_ImageLayoutReset
90 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
91 TW_UINT16 GPHOTO2_ImageLayoutSet
92 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
93 TW_UINT16 GPHOTO2_ImageMemXferGet
94 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
95 TW_UINT16 GPHOTO2_ImageNativeXferGet
96 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
97 TW_UINT16 GPHOTO2_JPEGCompressionGet
98 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
99 TW_UINT16 GPHOTO2_JPEGCompressionGetDefault
100 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
101 TW_UINT16 GPHOTO2_JPEGCompressionReset
102 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
103 TW_UINT16 GPHOTO2_JPEGCompressionSet
104 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
105 TW_UINT16 GPHOTO2_Palette8Get
106 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
107 TW_UINT16 GPHOTO2_Palette8GetDefault
108 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
109 TW_UINT16 GPHOTO2_Palette8Reset
110 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
111 TW_UINT16 GPHOTO2_Palette8Set
112 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
113 TW_UINT16 GPHOTO2_RGBResponseReset
114 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
115 TW_UINT16 GPHOTO2_RGBResponseSet
116 (pTW_IDENTITY pOrigin
, TW_MEMREF pData
);
119 BOOL
DoCameraUI(void);
120 HWND
TransferringDialogBox(HWND dialog
, LONG progress
);
122 /* Helper function for GUI */
124 _get_gphoto2_file_as_DIB( unsigned int idx
, BOOL preview
, HWND hwnd
, HBITMAP
*hDIB
);