dinput: Implement SetProperty DIPROP_APPDATA using enum_objects.
[wine.git] / dlls / sane.ds / unixlib.h
blobd07812fb175450f13714273a2381d3c1365ac371
1 /*
2 * Unix library interface for SANE
4 * Copyright 2000 Corel Corporation
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
22 #include "windef.h"
23 #include "winternl.h"
24 #include "wine/unixlib.h"
25 #include "twain.h"
27 struct frame_parameters
29 enum { FMT_GRAY, FMT_RGB, FMT_OTHER } format;
30 BOOL last_frame;
31 int bytes_per_line;
32 int pixels_per_line;
33 int lines;
34 int depth;
37 struct option_descriptor
39 int optno;
40 int size;
41 int is_active;
42 enum { TYPE_BOOL, TYPE_INT, TYPE_FIXED, TYPE_STRING, TYPE_BUTTON, TYPE_GROUP } type;
43 enum { UNIT_NONE, UNIT_PIXEL, UNIT_BIT, UNIT_MM, UNIT_DPI, UNIT_PERCENT, UNIT_MICROSECOND } unit;
44 enum { CONSTRAINT_NONE, CONSTRAINT_RANGE, CONSTRAINT_WORD_LIST, CONSTRAINT_STRING_LIST } constraint_type;
46 WCHAR title[256];
48 union
50 WCHAR strings[256];
51 int word_list[256]; /* first element is list-length */
52 struct { int min, max, quant; } range;
53 } constraint;
56 struct get_identity_params
58 TW_IDENTITY *id;
61 struct open_ds_params
63 TW_IDENTITY *id;
66 struct read_data_params
68 void *buffer;
69 int len;
70 int *retlen;
73 struct option_get_value_params
75 int optno;
76 void *val;
79 struct option_set_value_params
81 int optno;
82 void *val;
83 BOOL *reload;
86 struct option_find_descriptor_params
88 const char *name;
89 int type;
90 struct option_descriptor *descr;
93 enum sane_funcs
95 unix_process_attach,
96 unix_process_detach,
97 unix_get_identity,
98 unix_open_ds,
99 unix_close_ds,
100 unix_start_device,
101 unix_cancel_device,
102 unix_read_data,
103 unix_get_params,
104 unix_option_get_value,
105 unix_option_set_value,
106 unix_option_get_descriptor,
107 unix_option_find_descriptor,
110 extern unixlib_handle_t sane_handle DECLSPEC_HIDDEN;
112 #define SANE_CALL( func, params ) __wine_unix_call( sane_handle, unix_ ## func, params )