wined3d: Pass a wined3d_device_context to wined3d_cs_emit_blt_sub_resource().
[wine/zf.git] / dlls / gphoto2.ds / gphoto2_i.h
blob4171fcae4f4c0ae9048d87ab7c5ef20cfab61b03
1 /*
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
20 #ifndef _TWAIN32_H
21 #define _TWAIN32_H
23 #ifndef __WINE_CONFIG_H
24 # error You must include config.h first
25 #endif
27 #if defined(HAVE_GPHOTO2) && !defined(SONAME_LIBJPEG)
28 # warning "gphoto2 support in twain needs jpeg development headers"
29 # undef HAVE_GPHOTO2
30 #endif
32 #ifdef HAVE_GPHOTO2
33 /* Hack for gphoto2, which changes behaviour when WIN32 is set. */
34 #undef WIN32
35 #include <gphoto2/gphoto2-camera.h>
36 #define WIN32
37 #endif
39 #include <stdio.h>
41 #ifdef SONAME_LIBJPEG
42 /* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
43 # define XMD_H
44 # define UINT8 JPEG_UINT8
45 # define UINT16 JPEG_UINT16
46 # undef FAR
47 # undef HAVE_STDLIB_H
48 # include <jpeglib.h>
49 # undef HAVE_STDLIB_H
50 # define HAVE_STDLIB_H 1
51 # undef UINT8
52 # undef UINT16
53 #endif
55 #include <stdarg.h>
57 #include "windef.h"
58 #include "winbase.h"
59 #include "twain.h"
61 #include "wine/list.h"
63 extern HINSTANCE GPHOTO2_instance DECLSPEC_HIDDEN;
65 struct gphoto2_file {
66 struct list entry;
68 char *folder;
69 char *filename;
70 BOOL download; /* flag for downloading, set by GUI or so */
73 /* internal information about an active data source */
74 struct tagActiveDS
76 TW_IDENTITY identity; /* identity of the data source */
77 TW_IDENTITY appIdentity; /* identity of the app */
78 TW_UINT16 currentState; /* current state */
79 TW_UINT16 twCC; /* condition code */
80 HWND progressWnd; /* window handle of the scanning window */
82 #ifdef HAVE_GPHOTO2
83 Camera *camera;
84 GPContext *context;
85 #endif
87 /* Capabilities */
88 TW_UINT32 capXferMech; /* ICAP_XFERMECH */
89 TW_UINT16 pixeltype; /* ICAP_PIXELTYPE */
90 TW_UINT16 pixelflavor; /* ICAP_PIXELFLAVOR */
92 struct list files;
94 /* Download and decode JPEG STATE */
95 #ifdef HAVE_GPHOTO2
96 CameraFile *file;
97 #endif
98 #ifdef SONAME_LIBJPEG
99 struct jpeg_source_mgr xjsm;
100 struct jpeg_decompress_struct jd;
101 struct jpeg_error_mgr jerr;
102 #endif
105 extern struct tagActiveDS activeDS DECLSPEC_HIDDEN;
107 /* Helper functions */
108 extern TW_UINT16 GPHOTO2_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) DECLSPEC_HIDDEN;
110 /* Implementation of operation triplets
111 * From Application to Source (Image Information) */
112 TW_UINT16 GPHOTO2_CIEColorGet
113 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
114 TW_UINT16 GPHOTO2_ExtImageInfoGet
115 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
116 TW_UINT16 GPHOTO2_GrayResponseReset
117 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
118 TW_UINT16 GPHOTO2_GrayResponseSet
119 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
120 TW_UINT16 GPHOTO2_ImageFileXferGet
121 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
122 TW_UINT16 GPHOTO2_ImageInfoGet
123 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
124 TW_UINT16 GPHOTO2_ImageLayoutGet
125 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
126 TW_UINT16 GPHOTO2_ImageLayoutGetDefault
127 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
128 TW_UINT16 GPHOTO2_ImageLayoutReset
129 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
130 TW_UINT16 GPHOTO2_ImageLayoutSet
131 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
132 TW_UINT16 GPHOTO2_ImageMemXferGet
133 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
134 TW_UINT16 GPHOTO2_ImageNativeXferGet
135 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
136 TW_UINT16 GPHOTO2_JPEGCompressionGet
137 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
138 TW_UINT16 GPHOTO2_JPEGCompressionGetDefault
139 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
140 TW_UINT16 GPHOTO2_JPEGCompressionReset
141 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
142 TW_UINT16 GPHOTO2_JPEGCompressionSet
143 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
144 TW_UINT16 GPHOTO2_Palette8Get
145 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
146 TW_UINT16 GPHOTO2_Palette8GetDefault
147 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
148 TW_UINT16 GPHOTO2_Palette8Reset
149 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
150 TW_UINT16 GPHOTO2_Palette8Set
151 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
152 TW_UINT16 GPHOTO2_RGBResponseReset
153 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
154 TW_UINT16 GPHOTO2_RGBResponseSet
155 (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN;
157 /* UI function */
158 BOOL DoCameraUI(void) DECLSPEC_HIDDEN;
159 HWND TransferringDialogBox(HWND dialog, LONG progress) DECLSPEC_HIDDEN;
161 #ifdef HAVE_GPHOTO2
162 /* Helper function for GUI */
163 TW_UINT16
164 _get_gphoto2_file_as_DIB(
165 const char *folder, const char *filename, CameraFileType type,
166 HWND hwnd, HBITMAP *hDIB
167 ) DECLSPEC_HIDDEN;
168 #endif
169 #endif