include/mscvpdb.h: Use flexible array members for the rest of structures.
[wine.git] / dlls / sane.ds / unixlib.h
blob34e7a9a9796ba40b8f8da0b22b576b0b0c4dce7d
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 int is_settable;
43 enum { TYPE_BOOL, TYPE_INT, TYPE_FIXED, TYPE_STRING, TYPE_BUTTON, TYPE_GROUP } type;
44 enum { UNIT_NONE, UNIT_PIXEL, UNIT_BIT, UNIT_MM, UNIT_DPI, UNIT_PERCENT, UNIT_MICROSECOND } unit;
45 enum { CONSTRAINT_NONE, CONSTRAINT_RANGE, CONSTRAINT_WORD_LIST, CONSTRAINT_STRING_LIST } constraint_type;
47 WCHAR title[256];
49 union
51 WCHAR strings[256];
52 int word_list[256]; /* first element is list-length */
53 struct { int min, max, quant; } range;
54 } constraint;
57 struct read_data_params
59 void *buffer;
60 int len;
61 int *retlen;
64 struct option_get_value_params
66 int optno;
67 void *val;
70 struct option_set_value_params
72 int optno;
73 void *val;
74 BOOL *reload;
77 struct option_find_descriptor_params
79 const char *name;
80 int type;
81 struct option_descriptor *descr;
84 enum sane_funcs
86 unix_process_attach,
87 unix_process_detach,
88 unix_get_identity,
89 unix_open_ds,
90 unix_close_ds,
91 unix_start_device,
92 unix_cancel_device,
93 unix_read_data,
94 unix_get_params,
95 unix_option_get_value,
96 unix_option_set_value,
97 unix_option_get_descriptor,
98 unix_option_find_descriptor,
101 #define SANE_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )