LibInsane  1.0.10
Cross-platform Cross-API Cross-driver Cross-image-scanner Image Scan Library
Data Structures | Macros | Enumerations
capi.h File Reference
#include <stdlib.h>
#include "error.h"
Include dependency graph for capi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lis_device_descriptor
 Basic informations regarding a scanner. More...
 
union  lis_value
 Variable. More...
 
struct  lis_value_range
 
struct  lis_value_list
 
struct  lis_option_descriptor
 Describes a scanner or source option and provides callback to read or change its value. More...
 
struct  lis_scan_parameters
 Describes what will be returned when scanning. More...
 
struct  lis_scan_session
 
struct  lis_item
 
struct  lis_api
 LibInsane C API. More...
 

Macros

#define LIS_CAP_EMULATED   (1<<0)
 
#define LIS_CAP_AUTOMATIC   (1<<1)
 
#define LIS_CAP_HW_SELECT   (1<<2)
 
#define LIS_CAP_SW_SELECT   (1<<3)
 
#define LIS_CAP_INACTIVE   (1<<4)
 requires another option to be set to a specific value to become active More...
 
#define LIS_OPT_IS_READABLE(opt_desc)   (!((opt_desc)->capabilities & LIS_CAP_INACTIVE))
 
#define LIS_OPT_IS_WRITABLE(opt_desc)   ((opt_desc)->capabilities & LIS_CAP_SW_SELECT)
 
#define LIS_SET_FLAG_INEXACT   (1<<0)
 
#define LIS_SET_FLAG_MUST_RELOAD_OPTIONS   (1<<1)
 
#define LIS_SET_FLAG_MUST_RELOAD_PARAMS   (1<<2)
 

Enumerations

enum  lis_value_type {
  LIS_TYPE_BOOL = 0 , LIS_TYPE_INTEGER , LIS_TYPE_DOUBLE , LIS_TYPE_STRING ,
  LIS_TYPE_IMAGE_FORMAT
}
 Variable type. More...
 
enum  lis_img_format {
  LIS_IMG_FORMAT_RAW_RGB_24 = 0 , LIS_IMG_FORMAT_GRAYSCALE_8 , LIS_IMG_FORMAT_BW_1 , LIS_IMG_FORMAT_BMP ,
  LIS_IMG_FORMAT_CIFF , LIS_IMG_FORMAT_EXIF , LIS_IMG_FORMAT_FLASHPIX , LIS_IMG_FORMAT_GIF ,
  LIS_IMG_FORMAT_JPEG , LIS_IMG_FORMAT_PNG , LIS_IMG_FORMAT_ICO , LIS_IMG_FORMAT_JPEG2K ,
  LIS_IMG_FORMAT_JPEG2KX , LIS_IMG_FORMAT_MEMORYBMP , LIS_IMG_FORMAT_PHOTOCD , LIS_IMG_FORMAT_PICT ,
  LIS_IMG_FORMAT_TIFF
}
 Image format. More...
 
enum  lis_unit {
  LIS_UNIT_NONE = 0 , LIS_UNIT_PIXEL , LIS_UNIT_BIT , LIS_UNIT_MM ,
  LIS_UNIT_DPI , LIS_UNIT_PERCENT , LIS_UNIT_MICROSECOND
}
 
enum  lis_item_type { LIS_ITEM_DEVICE , LIS_ITEM_FLATBED , LIS_ITEM_ADF , LIS_ITEM_UNIDENTIFIED = -1 }
 
enum  lis_device_locations { LIS_DEVICE_LOCATIONS_ANY = 0 , LIS_DEVICE_LOCATIONS_LOCAL_ONLY }
 

Macro Definition Documentation

◆ LIS_CAP_AUTOMATIC

#define LIS_CAP_AUTOMATIC   (1<<1)

can be set automatically by the driver

Definition at line 126 of file capi.h.

◆ LIS_CAP_EMULATED

#define LIS_CAP_EMULATED   (1<<0)

emulated option (either by LibInsane or backend)

Definition at line 125 of file capi.h.

◆ LIS_CAP_HW_SELECT

#define LIS_CAP_HW_SELECT   (1<<2)

can be set by a hardware switch

Definition at line 127 of file capi.h.

◆ LIS_CAP_INACTIVE

#define LIS_CAP_INACTIVE   (1<<4)

requires another option to be set to a specific value to become active

Definition at line 133 of file capi.h.

◆ LIS_CAP_SW_SELECT

#define LIS_CAP_SW_SELECT   (1<<3)

read/write ; can be set by software

Definition at line 128 of file capi.h.

◆ LIS_OPT_IS_READABLE

#define LIS_OPT_IS_READABLE (   opt_desc)    (!((opt_desc)->capabilities & LIS_CAP_INACTIVE))

Definition at line 135 of file capi.h.

◆ LIS_OPT_IS_WRITABLE

#define LIS_OPT_IS_WRITABLE (   opt_desc)    ((opt_desc)->capabilities & LIS_CAP_SW_SELECT)

Definition at line 136 of file capi.h.

◆ LIS_SET_FLAG_INEXACT

#define LIS_SET_FLAG_INEXACT   (1<<0)

value was set, but not specifically at the given value

Definition at line 207 of file capi.h.

◆ LIS_SET_FLAG_MUST_RELOAD_OPTIONS

#define LIS_SET_FLAG_MUST_RELOAD_OPTIONS   (1<<1)

has changed values of other options

Definition at line 208 of file capi.h.

◆ LIS_SET_FLAG_MUST_RELOAD_PARAMS

#define LIS_SET_FLAG_MUST_RELOAD_PARAMS   (1<<2)

has changed scan parameters

Definition at line 209 of file capi.h.

Enumeration Type Documentation

◆ lis_device_locations

Enumerator
LIS_DEVICE_LOCATIONS_ANY 

local and remote

LIS_DEVICE_LOCATIONS_LOCAL_ONLY 

Definition at line 412 of file capi.h.

◆ lis_img_format

Image format.

Used to defined the type of content that will be returned by lis_scan_session::scan_read() .

Enumerator
LIS_IMG_FORMAT_RAW_RGB_24 

Raw image, 24bits per pixel.

For each pixel:

  • 8bits for red,
  • 8bits for green,
  • 8bits for blue.

No header, just pixels.

LIS_IMG_FORMAT_GRAYSCALE_8 
LIS_IMG_FORMAT_BW_1 
LIS_IMG_FORMAT_BMP 
LIS_IMG_FORMAT_CIFF 
LIS_IMG_FORMAT_EXIF 
LIS_IMG_FORMAT_FLASHPIX 
LIS_IMG_FORMAT_GIF 
LIS_IMG_FORMAT_JPEG 
LIS_IMG_FORMAT_PNG 
LIS_IMG_FORMAT_ICO 
LIS_IMG_FORMAT_JPEG2K 
LIS_IMG_FORMAT_JPEG2KX 
LIS_IMG_FORMAT_MEMORYBMP 
LIS_IMG_FORMAT_PHOTOCD 
LIS_IMG_FORMAT_PICT 
LIS_IMG_FORMAT_TIFF 

Definition at line 46 of file capi.h.

◆ lis_item_type

Enumerator
LIS_ITEM_DEVICE 

root node ; shouldn't be used for scanning

LIS_ITEM_FLATBED 

will scan only one image at each session

LIS_ITEM_ADF 

will scan many images in one session

LIS_ITEM_UNIDENTIFIED 

don't know ; should be treated as an ADF by default

Definition at line 342 of file capi.h.

◆ lis_unit

enum lis_unit
Enumerator
LIS_UNIT_NONE 
LIS_UNIT_PIXEL 
LIS_UNIT_BIT 
LIS_UNIT_MM 
LIS_UNIT_DPI 
LIS_UNIT_PERCENT 
LIS_UNIT_MICROSECOND 

Definition at line 78 of file capi.h.

◆ lis_value_type

Variable type.

Enumerator
LIS_TYPE_BOOL 

int: 0 (false) or 1 (true)

LIS_TYPE_INTEGER 

int

LIS_TYPE_DOUBLE 

double

LIS_TYPE_STRING 

(char *)

LIS_TYPE_IMAGE_FORMAT 

Image format. See lis_img_format .

Definition at line 32 of file capi.h.