![]() |
LibInsane
1.0.10
Cross-platform Cross-API Cross-driver Cross-image-scanner Image Scan Library
|
Describes a scanner or source option and provides callback to read or change its value. More...
#include <capi.h>
Data Fields | |
const char * | name |
const char * | title |
const char * | desc |
int | capabilities |
Option capabilities. More... | |
struct { | |
enum lis_value_type type | |
enum lis_unit unit | |
} | value |
Description of the type of values for this option. More... | |
struct { | |
enum | { LIS_CONSTRAINT_NONE , LIS_CONSTRAINT_RANGE , LIS_CONSTRAINT_LIST } |
enum lis_option_descriptor:: { ... } type | |
union { | |
struct lis_value_range range | |
struct lis_value_list list | |
} possible | |
} | constraint |
Restrictions defining the possible values for this option. More... | |
struct { | |
enum lis_error(* get_value )(struct lis_option_descriptor *self, union lis_value *value) | |
return the option value. More... | |
enum lis_error(* set_value )(struct lis_option_descriptor *self, union lis_value value, int *set_flags) | |
set the option value. More... | |
} | fn |
Describes a scanner or source option and provides callback to read or change its value.
int lis_option_descriptor::capabilities |
Option capabilities.
Bit fields:
struct { ... } lis_option_descriptor::constraint |
Restrictions defining the possible values for this option.
const char* lis_option_descriptor::desc |
struct { ... } lis_option_descriptor::fn |
Functions to read and set the option value
enum lis_error(* lis_option_descriptor::get_value) (struct lis_option_descriptor *self, union lis_value *value) |
return the option value.
No need to free the value. However further calls to this library functions may modify the value. Depending on the backend and the driver, setting another value may also change this value. If you need to keep the value, you should copy the value.
[in] | opt | option for which we want the value. |
[out] | value | option value. Type is defined by lis_option_descriptor::type . |
LIS_OK | value successful read. See LIS_IS_OK. |
LIS_ACCESS_DENIED | value cannot be read because the option is inactive. value may or may not be set. See LIS_IS_ERROR. |
LIS_IO_ERROR | things are going the wrong way. value may or may not be set. See LIS_IS_ERROR. |
struct lis_value_list lis_option_descriptor::list |
const char* lis_option_descriptor::name |
union { ... } lis_option_descriptor::possible |
Content undefined if lis_option_descriptor::type == LIS_CONSTRAINT_NONE.
struct lis_value_range lis_option_descriptor::range |
enum lis_error(* lis_option_descriptor::set_value) (struct lis_option_descriptor *self, union lis_value value, int *set_flags) |
set the option value.
[in] | opt | option for which we want the value. |
[in] | value | option value. Type is defined by lis_option_descriptor::type. |
[out] | set_flags | (can be NULL). Indicates side effect of setting this value. |
LIS_OK | value has been successfully set. See LIS_IS_OK. |
LIS_APPROXIMATE_VALUE | value has been successfully set, but value has been approximated. See LIS_IS_OK. |
LIS_ACCESS_DENIED | option is read-only. See LIS_IS_ERROR. |
LIS_INVALID_VALUE | value doesn't match in type or doesn't fit in expected constraints. See LIS_IS_ERROR. |
const char* lis_option_descriptor::title |
enum lis_value_type lis_option_descriptor::type |
enum { ... } lis_option_descriptor::type |
Type of constaint
enum lis_unit lis_option_descriptor::unit |
struct { ... } lis_option_descriptor::value |
Description of the type of values for this option.