Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6320266e
Commit
6320266e
authored
Feb 09, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Feb 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sane.ds: Add support for CAP_UICONTROLLABLE.
parent
272c1881
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
capability.c
dlls/sane.ds/capability.c
+26
-1
dsm.c
dlls/twain_32/tests/dsm.c
+5
-4
No files found.
dlls/sane.ds/capability.c
View file @
6320266e
...
...
@@ -125,7 +125,7 @@ static TW_UINT16 msg_get_enum(pTW_CAPABILITY pCapability, const TW_UINT32 *value
static
TW_UINT16
TWAIN_GetSupportedCaps
(
pTW_CAPABILITY
pCapability
)
{
TW_ARRAY
*
a
;
static
const
UINT16
supported_caps
[]
=
{
CAP_SUPPORTEDCAPS
,
CAP_XFERCOUNT
,
static
const
UINT16
supported_caps
[]
=
{
CAP_SUPPORTEDCAPS
,
CAP_XFERCOUNT
,
CAP_UICONTROLLABLE
,
ICAP_XFERMECH
,
ICAP_PIXELTYPE
};
pCapability
->
hContainer
=
GlobalAlloc
(
0
,
FIELD_OFFSET
(
TW_ARRAY
,
ItemList
[
sizeof
(
supported_caps
)]
));
...
...
@@ -282,6 +282,27 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio
return
twCC
;
}
/* CAP_UICONTROLLABLE */
static
TW_UINT16
SANE_CAPUiControllable
(
pTW_CAPABILITY
pCapability
,
TW_UINT16
action
)
{
TW_UINT16
twCC
=
TWCC_BADCAP
;
TRACE
(
"CAP_UICONTROLLABLE
\n
"
);
switch
(
action
)
{
case
MSG_QUERYSUPPORT
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_INT32
,
TWQC_GET
);
break
;
case
MSG_GET
:
twCC
=
set_onevalue
(
pCapability
,
TWTY_BOOL
,
TRUE
);
break
;
}
return
twCC
;
}
TW_UINT16
SANE_SaneCapability
(
pTW_CAPABILITY
pCapability
,
TW_UINT16
action
)
{
TW_UINT16
twCC
=
TWCC_CAPUNSUPPORTED
;
...
...
@@ -301,6 +322,10 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
twCC
=
SANE_CAPXferCount
(
pCapability
,
action
);
break
;
case
CAP_UICONTROLLABLE
:
twCC
=
SANE_CAPUiControllable
(
pCapability
,
action
);
break
;
case
ICAP_PIXELTYPE
:
twCC
=
SANE_ICAPPixelType
(
pCapability
,
action
);
break
;
...
...
dlls/twain_32/tests/dsm.c
View file @
6320266e
...
...
@@ -95,7 +95,7 @@ static TW_HANDLE alloc_and_set_onevalue(TW_UINT32 val, TW_UINT16 type)
return
hcontainer
;
}
static
void
check_get
(
TW_CAPABILITY
*
pCapability
,
static
void
check_get
(
TW_CAPABILITY
*
pCapability
,
TW_INT32
actual_support
,
TW_UINT32
orig_value
,
TW_UINT32
default_value
,
TW_UINT32
*
suggested_set_value
)
{
void
*
p
;
...
...
@@ -104,7 +104,7 @@ static void check_get(TW_CAPABILITY *pCapability,
p
=
GlobalLock
(
pCapability
->
hContainer
);
if
(
p
)
{
if
(
pCapability
->
ConType
==
TWON_ONEVALUE
)
if
(
pCapability
->
ConType
==
TWON_ONEVALUE
&&
actual_support
&
TWQC_GETCURRENT
)
{
TW_ONEVALUE
*
onev
=
(
TW_ONEVALUE
*
)
p
;
ok
(
onev
->
Item
==
orig_value
,
"MSG_GET of 0x%x returned 0x%x, expecting 0x%x
\n
"
,
...
...
@@ -233,7 +233,7 @@ static void test_onevalue_cap(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16
get_condition_code
(
appid
,
source
,
&
status
);
ok
(
rc
==
TWRC_SUCCESS
&&
status
.
ConditionCode
==
TWCC_SUCCESS
,
"Error [rc %d|cc %d] doing MSG_GET for type 0x%x
\n
"
,
rc
,
status
.
ConditionCode
,
captype
);
check_get
(
&
cap
,
orig_value
,
default_value
,
&
new_value
);
check_get
(
&
cap
,
actual_support
,
orig_value
,
default_value
,
&
new_value
);
if
(
rc
==
TWRC_SUCCESS
)
GlobalFree
(
cap
.
hContainer
);
}
...
...
@@ -313,8 +313,9 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source)
if
(
capabilities
[
CAP_XFERCOUNT
])
test_onevalue_cap
(
appid
,
source
,
CAP_XFERCOUNT
,
TWTY_INT16
,
TWQC_GET
|
TWQC_SET
|
TWQC_GETDEFAULT
|
TWQC_GETCURRENT
|
TWQC_RESET
);
todo_wine
ok
(
capabilities
[
CAP_UICONTROLLABLE
],
"CAP_UICONTROLLABLE not supported
\n
"
);
if
(
capabilities
[
CAP_UICONTROLLABLE
])
test_onevalue_cap
(
appid
,
source
,
CAP_UICONTROLLABLE
,
TWTY_BOOL
,
TWQC_GET
);
if
(
source
->
SupportedGroups
&
DG_IMAGE
)
{
...
...
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