mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
sane.ds: Add stub support for ICAP_COMPRESSION.
This commit is contained in:
parent
e02528e629
commit
b0ec8880e2
@ -126,7 +126,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_XFERMECH, ICAP_PIXELTYPE, ICAP_COMPRESSION };
|
||||
|
||||
pCapability->hContainer = GlobalAlloc (0, FIELD_OFFSET( TW_ARRAY, ItemList[sizeof(supported_caps)] ));
|
||||
pCapability->ConType = TWON_ARRAY;
|
||||
@ -303,6 +303,48 @@ static TW_UINT16 SANE_CAPUiControllable(pTW_CAPABILITY pCapability, TW_UINT16 ac
|
||||
return twCC;
|
||||
}
|
||||
|
||||
/* ICAP_COMPRESSION */
|
||||
static TW_UINT16 SANE_ICAPCompression (pTW_CAPABILITY pCapability, TW_UINT16 action)
|
||||
{
|
||||
static const TW_UINT32 possible_values[] = { TWCP_NONE };
|
||||
TW_UINT32 val;
|
||||
TW_UINT16 twCC = TWCC_BADCAP;
|
||||
|
||||
TRACE("ICAP_COMPRESSION\n");
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case MSG_QUERYSUPPORT:
|
||||
twCC = set_onevalue(pCapability, TWTY_INT32,
|
||||
TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET );
|
||||
break;
|
||||
|
||||
case MSG_GET:
|
||||
twCC = msg_get_enum(pCapability, possible_values, sizeof(possible_values) / sizeof(possible_values[0]),
|
||||
TWTY_UINT16, TWCP_NONE, TWCP_NONE);
|
||||
FIXME("Partial stub: We don't attempt to support compression\n");
|
||||
break;
|
||||
|
||||
case MSG_SET:
|
||||
twCC = msg_set(pCapability, &val);
|
||||
if (twCC == TWCC_SUCCESS)
|
||||
FIXME("Partial Stub: COMPRESSION set to %d, but ignored\n", val);
|
||||
break;
|
||||
|
||||
case MSG_GETDEFAULT:
|
||||
twCC = set_onevalue(pCapability, TWTY_UINT16, TWCP_NONE);
|
||||
break;
|
||||
|
||||
case MSG_RESET:
|
||||
/* .. fall through intentional .. */
|
||||
|
||||
case MSG_GETCURRENT:
|
||||
twCC = set_onevalue(pCapability, TWTY_UINT16, TWCP_NONE);
|
||||
break;
|
||||
}
|
||||
return twCC;
|
||||
}
|
||||
|
||||
TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
|
||||
{
|
||||
TW_UINT16 twCC = TWCC_CAPUNSUPPORTED;
|
||||
@ -333,6 +375,10 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
|
||||
case ICAP_XFERMECH:
|
||||
twCC = SANE_ICAPXferMech (pCapability, action);
|
||||
break;
|
||||
|
||||
case ICAP_COMPRESSION:
|
||||
twCC = SANE_ICAPCompression(pCapability, action);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Twain specifies that you should return a 0 in response to QUERYSUPPORT,
|
||||
|
@ -323,8 +323,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 on:
|
||||
*/
|
||||
todo_wine
|
||||
ok(capabilities[ICAP_COMPRESSION], "ICAP_COMPRESSION not supported\n");
|
||||
if (capabilities[ICAP_COMPRESSION])
|
||||
test_onevalue_cap(appid, source, ICAP_COMPRESSION, TWTY_UINT16,
|
||||
TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT);
|
||||
todo_wine
|
||||
ok(capabilities[ICAP_PLANARCHUNKY], "ICAP_PLANARCHUNKY not supported\n");
|
||||
todo_wine
|
||||
|
Loading…
Reference in New Issue
Block a user