From 49c66099b9fafa3fe8655658f4d9bb6bfaa43b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Sun, 22 Nov 2009 22:00:11 +0100 Subject: [PATCH] add and use move_paper to command sets - add move_paper to command sets - define move_paper only for mustek_gt6816_sheetfed_command_set who needs it --- backend/gt68xx_devices.c | 12 ++++++++---- backend/gt68xx_low.h | 8 ++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/backend/gt68xx_devices.c b/backend/gt68xx_devices.c index 19eca3cf7..b1e95ad31 100644 --- a/backend/gt68xx_devices.c +++ b/backend/gt68xx_devices.c @@ -85,7 +85,8 @@ static GT68xx_Command_Set mustek_gt6816_command_set = { gt68xx_generic_setup_scan, gt68xx_generic_set_afe, gt68xx_generic_set_exposure_time, - gt68xx_generic_get_id + gt68xx_generic_get_id, + /* gt68xx_generic_move_paper */ NULL }; static GT68xx_Command_Set mustek_gt6816_sheetfed_command_set = { @@ -124,7 +125,8 @@ static GT68xx_Command_Set mustek_gt6816_sheetfed_command_set = { gt68xx_generic_setup_scan, gt68xx_generic_set_afe, gt68xx_generic_set_exposure_time, - gt68xx_generic_get_id + gt68xx_generic_get_id, + gt68xx_generic_move_paper }; static GT68xx_Command_Set mustek_gt6801_command_set = { @@ -164,7 +166,8 @@ static GT68xx_Command_Set mustek_gt6801_command_set = { gt68xx_generic_setup_scan, gt68xx_generic_set_afe, gt68xx_generic_set_exposure_time, - gt68xx_generic_get_id + gt68xx_generic_get_id, + /* gt68xx_generic_move_paper */ NULL }; static GT68xx_Command_Set plustek_gt6801_command_set = { @@ -203,7 +206,8 @@ static GT68xx_Command_Set plustek_gt6801_command_set = { gt68xx_generic_setup_scan, gt68xx_generic_set_afe, /* set_exposure_time */ NULL, - gt68xx_generic_get_id + gt68xx_generic_get_id, + /* gt68xx_generic_move_paper */ NULL }; static GT68xx_Model unknown_model = { diff --git a/backend/gt68xx_low.h b/backend/gt68xx_low.h index 182c748bf..ef62aa0a7 100644 --- a/backend/gt68xx_low.h +++ b/backend/gt68xx_low.h @@ -389,6 +389,14 @@ struct GT68xx_Command_Set /** Get the vendor, product and some more ids from the scanner */ SANE_Status (*get_id) (GT68xx_Device * dev); + + /** Move the paper by the amount of y offset needed to reach scan area + * + * @param dev Device object. + * @param request scan request used to compute move to reach scan area + */ + SANE_Status (*move_paper) (GT68xx_Device * dev, + GT68xx_Scan_Request * request); /*@} */ };