From e91fea4ac1ced39c911db91489c7069784bea037 Mon Sep 17 00:00:00 2001 From: "m. allan noah" Date: Wed, 21 May 2008 01:38:12 +0000 Subject: [PATCH] include/sane/sane.h: add SANE_STATUS_WARMING_UP and SANE_STATUS_HW_LOCKED, remove SANE_CAP_ALWAYS_SETTABLE,add SANE_FRAME_XML, improve comments on other new frame types. include/sane/saneopts.h: add common option groups, add new page-width and page-height well-known options --- ChangeLog | 7 +++++++ include/sane/sane.h | 22 ++++++++++++---------- include/sane/saneopts.h | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4734f352..d16dd662c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-20 m. allan noah + * include/sane/sane.h: add SANE_STATUS_WARMING_UP and + SANE_STATUS_HW_LOCKED, remove SANE_CAP_ALWAYS_SETTABLE, + add SANE_FRAME_XML, improve comments on other new frame types. + * include/sane/saneopts.h: add common option groups, add new + page-width and page-height well-known options + 2008-05-20 m. allan noah * backend/qcam.c, backend/v4l.c, frontend/tstbackend.c: remove undocumented and otherwise unused SANE_CAP_ALWAYS_SETTABLE diff --git a/include/sane/sane.h b/include/sane/sane.h index 97b88571c..bd20b6ad1 100644 --- a/include/sane/sane.h +++ b/include/sane/sane.h @@ -65,7 +65,10 @@ typedef enum SANE_STATUS_COVER_OPEN, /* scanner cover is open */ SANE_STATUS_IO_ERROR, /* error during device I/O */ SANE_STATUS_NO_MEM, /* out of memory */ - SANE_STATUS_ACCESS_DENIED /* access to resource has been denied */ + SANE_STATUS_ACCESS_DENIED, /* access to resource has been denied */ + /* the following were added for sane 1.1.0, older frontends wont support */ + SANE_STATUS_WARMING_UP, /* lamp not ready, please retry */ + SANE_STATUS_HW_LOCKED /* scanner mechanism locked for transport */ } SANE_Status; @@ -108,7 +111,6 @@ SANE_Device; #define SANE_CAP_AUTOMATIC (1 << 4) #define SANE_CAP_INACTIVE (1 << 5) #define SANE_CAP_ADVANCED (1 << 6) -#define SANE_CAP_ALWAYS_SETTABLE (1 << 7) #define SANE_OPTION_IS_ACTIVE(cap) (((cap) & SANE_CAP_INACTIVE) == 0) #define SANE_OPTION_IS_SETTABLE(cap) (((cap) & SANE_CAP_SOFT_SELECT) != 0) @@ -172,19 +174,19 @@ typedef enum SANE_FRAME_BLUE, /* blue band only */ /* push remaining types down to match existing backends */ - /* these frame types should not be used by default, */ - /* as most front-ends will not understand them */ - /* these will be enabled in SANE 1.1.0 */ + /* these were first exposed in SANE 1.1.0 */ + /* most front-ends will require updates to understand them */ - SANE_FRAME_TEXT = 0x0A, /* for various textual/xml data */ + SANE_FRAME_TEXT = 0x0A, /* backend specific textual data */ SANE_FRAME_JPEG, /* complete baseline JPEG file */ - SANE_FRAME_G31D, /* CCITT Group 3 1-D Compressed file */ - SANE_FRAME_G32D, /* CCITT Group 3 2-D Compressed file */ - SANE_FRAME_G42D, /* CCITT Group 4 2-D Compressed file */ + SANE_FRAME_G31D, /* CCITT Group 3 1-D Compressed (MH) */ + SANE_FRAME_G32D, /* CCITT Group 3 2-D Compressed (MR) */ + SANE_FRAME_G42D, /* CCITT Group 4 2-D Compressed (MMR) */ SANE_FRAME_IR, /* bare infrared channel */ SANE_FRAME_RGBI, /* red+green+blue+infrared */ - SANE_FRAME_GRAYI /* gray+infrared */ + SANE_FRAME_GRAYI, /* gray+infrared */ + SANE_FRAME_XML /* undefined schema */ } SANE_Frame; diff --git a/include/sane/saneopts.h b/include/sane/saneopts.h index 7f99303f1..adc4baa95 100644 --- a/include/sane/saneopts.h +++ b/include/sane/saneopts.h @@ -59,6 +59,14 @@ /* This _must_ be the first option (index 0): */ #define SANE_NAME_NUM_OPTIONS "" /* never settable */ + +/* The common option groups */ +#define SANE_NAME_STANDARD "standard" +#define SANE_NAME_GEOMETRY "geometry" +#define SANE_NAME_ENHANCEMENT "enhancement" +#define SANE_NAME_ADVANCED "advanced" +#define SANE_NAME_SENSORS "sensors" + #define SANE_NAME_PREVIEW "preview" #define SANE_NAME_GRAY_PREVIEW "preview-in-gray" #define SANE_NAME_BIT_DEPTH "depth" @@ -78,6 +86,8 @@ #define SANE_NAME_SCAN_RESOLUTION "resolution" #define SANE_NAME_SCAN_X_RESOLUTION "resolution" #define SANE_NAME_SCAN_Y_RESOLUTION "y-resolution" +#define SANE_NAME_PAGE_WIDTH "page-width" +#define SANE_NAME_PAGE_HEIGHT "page-height" #define SANE_NAME_CUSTOM_GAMMA "custom-gamma" #define SANE_NAME_GAMMA_VECTOR "gamma-table" #define SANE_NAME_GAMMA_VECTOR_R "red-gamma-table" @@ -132,6 +142,13 @@ #define SANE_NAME_LAMP_OFF_AT_EXIT "lamp-off-at-exit" #define SANE_TITLE_NUM_OPTIONS SANE_I18N("Number of options") + +#define SANE_TITLE_STANDARD SANE_I18N("Standard") +#define SANE_TITLE_GEOMETRY SANE_I18N("Geometry") +#define SANE_TITLE_ENHANCEMENT SANE_I18N("Enhancement") +#define SANE_TITLE_ADVANCED SANE_I18N("Advanced") +#define SANE_TITLE_SENSORS SANE_I18N("Sensors") + #define SANE_TITLE_PREVIEW SANE_I18N("Preview") #define SANE_TITLE_GRAY_PREVIEW SANE_I18N("Force monochrome preview") #define SANE_TITLE_BIT_DEPTH SANE_I18N("Bit depth") @@ -146,6 +163,8 @@ #define SANE_TITLE_SCAN_RESOLUTION SANE_I18N("Scan resolution") #define SANE_TITLE_SCAN_X_RESOLUTION SANE_I18N("X-resolution") #define SANE_TITLE_SCAN_Y_RESOLUTION SANE_I18N("Y-resolution") +#define SANE_TITLE_PAGE_WIDTH SANE_I18N("Page width") +#define SANE_TITLE_PAGE_HEIGHT SANE_I18N("Page height") #define SANE_TITLE_CUSTOM_GAMMA SANE_I18N("Use custom gamma table") #define SANE_TITLE_GAMMA_VECTOR SANE_I18N("Image intensity") #define SANE_TITLE_GAMMA_VECTOR_R SANE_I18N("Red intensity") @@ -206,6 +225,12 @@ SANE_I18N("Read-only option that specifies how many options a specific " \ "devices supports.") +#define SANE_DESC_STANDARD SANE_I18N("Source, mode and resolution options") +#define SANE_DESC_GEOMETRY SANE_I18N("Scan area and media size options") +#define SANE_DESC_ENHANCEMENT SANE_I18N("Image modification options") +#define SANE_DESC_ADVANCED SANE_I18N("Hardware specific options") +#define SANE_DESC_SENSORS SANE_I18N("Scanner sensors and buttons") + #define SANE_DESC_PREVIEW \ SANE_I18N("Request a preview-quality scan.") @@ -252,6 +277,13 @@ SANE_I18N("Sets the horizontal resolution of the scanned image.") #define SANE_DESC_SCAN_Y_RESOLUTION \ SANE_I18N("Sets the vertical resolution of the scanned image.") +#define SANE_DESC_PAGE_WIDTH \ +SANE_I18N("Specifies the width of the media. Required for automatic " \ +"centering of sheet-fed scans.") + +#define SANE_DESC_PAGE_HEIGHT \ +SANE_I18N("Specifies the height of the media.") + #define SANE_DESC_CUSTOM_GAMMA \ SANE_I18N("Determines whether a builtin or a custom gamma-table should be " \ "used.")