Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
982482e7
Commit
982482e7
authored
Feb 25, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Feb 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sane.ds: Add support for ICAP_BITDEPTH.
parent
8e4aff7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
capability.c
dlls/sane.ds/capability.c
+39
-1
dsm.c
dlls/twain_32/tests/dsm.c
+3
-1
No files found.
dlls/sane.ds/capability.c
View file @
982482e7
...
...
@@ -154,7 +154,7 @@ static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability)
{
TW_ARRAY
*
a
;
static
const
UINT16
supported_caps
[]
=
{
CAP_SUPPORTEDCAPS
,
CAP_XFERCOUNT
,
CAP_UICONTROLLABLE
,
ICAP_XFERMECH
,
ICAP_PIXELTYPE
,
ICAP_COMPRESSION
,
ICAP_PIXELFLAVOR
,
ICAP_XFERMECH
,
ICAP_PIXELTYPE
,
ICAP_
BITDEPTH
,
ICAP_
COMPRESSION
,
ICAP_PIXELFLAVOR
,
ICAP_XRESOLUTION
,
ICAP_YRESOLUTION
};
pCapability
->
hContainer
=
GlobalAlloc
(
0
,
FIELD_OFFSET
(
TW_ARRAY
,
ItemList
[
sizeof
(
supported_caps
)]
));
...
...
@@ -311,6 +311,40 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio
return
twCC
;
}
/* ICAP_BITDEPTH */
static
TW_UINT16
SANE_ICAPBitDepth
(
pTW_CAPABILITY
pCapability
,
TW_UINT16
action
)
{
TW_UINT16
twCC
=
TWCC_BADCAP
;
#ifdef SONAME_LIBSANE
TW_UINT32
possible_values
[
1
];
TRACE
(
"ICAP_BITDEPTH
\n
"
);
possible_values
[
0
]
=
activeDS
.
sane_param
.
depth
;
switch
(
action
)
{
case
MSG_QUERYSUPPORT
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_INT32
,
TWQC_GET
|
TWQC_GETDEFAULT
|
TWQC_GETCURRENT
);
break
;
case
MSG_GET
:
twCC
=
msg_get_enum
(
pCapability
,
possible_values
,
sizeof
(
possible_values
)
/
sizeof
(
possible_values
[
0
]),
TWTY_UINT16
,
activeDS
.
sane_param
.
depth
,
activeDS
.
sane_param
.
depth
);
break
;
case
MSG_GETDEFAULT
:
/* .. Fall through intentional .. */
case
MSG_GETCURRENT
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_UINT16
,
activeDS
.
sane_param
.
depth
);
break
;
}
#endif
return
twCC
;
}
/* CAP_UICONTROLLABLE */
static
TW_UINT16
SANE_CAPUiControllable
(
pTW_CAPABILITY
pCapability
,
TW_UINT16
action
)
{
...
...
@@ -547,6 +581,10 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
twCC
=
SANE_ICAPPixelType
(
pCapability
,
action
);
break
;
case
ICAP_BITDEPTH
:
twCC
=
SANE_ICAPBitDepth
(
pCapability
,
action
);
break
;
case
ICAP_XFERMECH
:
twCC
=
SANE_ICAPXferMech
(
pCapability
,
action
);
break
;
...
...
dlls/twain_32/tests/dsm.c
View file @
982482e7
...
...
@@ -463,8 +463,10 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source)
Sources that supply image information must support DG_CONTROL / DAT_CAPABILITY /
MSG_GET, MSG_GETCURRENT, MSG_GETDEFAULT, MSG_RESET and MSG_SET on:
*/
todo_wine
ok
(
capabilities
[
ICAP_BITDEPTH
],
"ICAP_BITDEPTH not supported
\n
"
);
if
(
capabilities
[
ICAP_BITDEPTH
])
test_onevalue_cap
(
appid
,
source
,
ICAP_BITDEPTH
,
TWTY_UINT16
,
TWQC_GET
|
TWQC_GETDEFAULT
|
TWQC_GETCURRENT
);
todo_wine
ok
(
capabilities
[
ICAP_BITORDER
],
"ICAP_BITORDER not supported
\n
"
);
ok
(
capabilities
[
ICAP_PIXELTYPE
],
"ICAP_PIXELTYPE not supported
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment