comctl32/tests: Use CRT allocation functions.
[wine.git] / dlls / sane.ds / unixlib.h
blobd3ffbf1878d3ebe8859eb5b8edf4954be951435e
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 read_data_params
58 void *buffer;
59 int len;
60 int *retlen;
63 struct option_get_value_params
65 int optno;
66 void *val;
69 struct option_set_value_params
71 int optno;
72 void *val;
73 BOOL *reload;
76 struct option_find_descriptor_params
78 const char *name;
79 int type;
80 struct option_descriptor *descr;
83 enum sane_funcs
85 unix_process_attach,
86 unix_process_detach,
87 unix_get_identity,
88 unix_open_ds,
89 unix_close_ds,
90 unix_start_device,
91 unix_cancel_device,
92 unix_read_data,
93 unix_get_params,
94 unix_option_get_value,
95 unix_option_set_value,
96 unix_option_get_descriptor,
97 unix_option_find_descriptor,
100 #define SANE_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )